From a89186c03c3f286e8ccaffc2f68ec5e8e2407e30 Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Fri, 20 Dec 2024 10:07:47 +0100 Subject: [PATCH] STYLE: Run clang-format, having disabled `AlignConsecutiveDeclarations` Did run clang-format on the entire source tree, by: pixi run pre-commit-run -a clang-format As suggested by Hans Johnson. --- Examples/DataRepresentation/Image/Image4.cxx | 2 +- Examples/DataRepresentation/Image/Image5.cxx | 4 +- .../DataRepresentation/Image/RGBImage.cxx | 4 +- .../DataRepresentation/Mesh/AutomaticMesh.cxx | 2 +- Examples/DataRepresentation/Mesh/Mesh2.cxx | 4 +- Examples/DataRepresentation/Mesh/Mesh3.cxx | 4 +- .../Mesh/MeshCellVisitor2.cxx | 4 +- .../DataRepresentation/Mesh/MeshKComplex.cxx | 10 +- .../DataRepresentation/Mesh/MeshPolyLine.cxx | 2 +- .../DataRepresentation/Mesh/MeshTraits.cxx | 4 +- .../DataRepresentation/Mesh/PointSet1.cxx | 2 +- .../DataRepresentation/Mesh/PointSet3.cxx | 2 +- .../Mesh/PointSetWithCovariantVectors.cxx | 4 +- .../Mesh/PointSetWithVectors.cxx | 4 +- .../DataRepresentation/Mesh/RGBPointSet.cxx | 8 +- .../Path/PolyLineParametricPath1.cxx | 4 +- .../Filtering/AntiAliasBinaryImageFilter.cxx | 2 +- Examples/Filtering/BilateralImageFilter.cxx | 2 +- Examples/Filtering/CompositeFilterExample.cxx | 6 +- ...rvatureAnisotropicDiffusionImageFilter.cxx | 6 +- .../Filtering/CurvatureFlowImageFilter.cxx | 2 +- ...usionTensor3DReconstructionImageFilter.cxx | 10 +- .../DigitallyReconstructedRadiograph1.cxx | 6 +- .../Filtering/DiscreteGaussianImageFilter.cxx | 2 +- .../GradientVectorFlowImageFilter.cxx | 2 +- .../GrayscaleFunctionDilateImageFilter.cxx | 2 +- .../MinMaxCurvatureFlowImageFilter.cxx | 2 +- ...rvatureAnisotropicDiffusionImageFilter.cxx | 2 +- ...radientAnisotropicDiffusionImageFilter.cxx | 2 +- Examples/Filtering/ResampleImageFilter4.cxx | 4 +- ...DerivativeRecursiveGaussianImageFilter.cxx | 2 +- Examples/Filtering/SpatialObjectToImage1.cxx | 4 +- Examples/Filtering/SpatialObjectToImage3.cxx | 4 +- ...rvatureAnisotropicDiffusionImageFilter.cxx | 2 +- ...radientAnisotropicDiffusionImageFilter.cxx | 2 +- Examples/IO/DicomImageReadPrintTags.cxx | 8 +- Examples/IO/DicomPrintPatientInformation.cxx | 4 +- Examples/IO/IOFactoryRegistration.cxx | 2 +- Examples/IO/IOPlugin.cxx | 6 +- Examples/IO/ImageReadDicomSeriesWrite.cxx | 2 +- .../IO/ImageReadExtractFilterInsertWrite.cxx | 4 +- Examples/IO/ImageReadExtractWrite.cxx | 2 +- Examples/IO/ImageReadImageSeriesWrite.cxx | 4 +- Examples/IO/XML/DOMFindDemo.cxx | 2 +- .../itkParticleSwarmOptimizerSAXReader.cxx | 30 +- .../XML/itkParticleSwarmOptimizerSAXReader.h | 4 +- .../itkParticleSwarmOptimizerSAXWriter.cxx | 4 +- .../ImageLinearIteratorWithIndex.cxx | 4 +- .../ImageLinearIteratorWithIndex2.cxx | 12 +- .../ImageRandomConstIteratorWithIndex.cxx | 2 +- Examples/Iterators/ImageRegionIterator.cxx | 8 +- .../Iterators/ImageSliceIteratorWithIndex.cxx | 6 +- Examples/Iterators/NeighborhoodIterators3.cxx | 4 +- Examples/Iterators/NeighborhoodIterators4.cxx | 6 +- Examples/Iterators/NeighborhoodIterators5.cxx | 6 +- .../ShapedNeighborhoodIterators1.cxx | 6 +- .../ShapedNeighborhoodIterators2.cxx | 6 +- .../RegistrationITKv4/BSplineWarping1.cxx | 10 +- .../RegistrationITKv4/BSplineWarping2.cxx | 10 +- .../ChangeInformationImageFilter.cxx | 4 +- .../DeformableRegistration1.cxx | 6 +- .../DeformableRegistration10.cxx | 4 +- .../DeformableRegistration11.cxx | 4 +- .../DeformableRegistration12.cxx | 14 +- .../DeformableRegistration13.cxx | 10 +- .../DeformableRegistration14.cxx | 10 +- .../DeformableRegistration15.cxx | 10 +- .../DeformableRegistration16.cxx | 2 +- .../DeformableRegistration17.cxx | 2 +- .../DeformableRegistration2.cxx | 6 +- .../DeformableRegistration3.cxx | 4 +- .../DeformableRegistration4.cxx | 2 +- .../DeformableRegistration5.cxx | 10 +- .../DeformableRegistration7.cxx | 4 +- .../DeformableRegistration8.cxx | 6 +- .../DeformableRegistration9.cxx | 4 +- .../DisplacementFieldInitialization.cxx | 4 +- .../RegistrationITKv4/ImageRegistration1.cxx | 4 +- .../RegistrationITKv4/ImageRegistration12.cxx | 4 +- .../RegistrationITKv4/ImageRegistration14.cxx | 10 +- .../RegistrationITKv4/ImageRegistration15.cxx | 8 +- .../RegistrationITKv4/ImageRegistration20.cxx | 2 +- .../RegistrationITKv4/ImageRegistration5.cxx | 12 +- .../RegistrationITKv4/ImageRegistration6.cxx | 4 +- .../RegistrationITKv4/ImageRegistration7.cxx | 2 +- .../RegistrationITKv4/ImageRegistration8.cxx | 16 +- .../RegistrationITKv4/ImageRegistration9.cxx | 6 +- .../ImageRegistrationHistogramPlotter.cxx | 8 +- .../IterativeClosestPoint1.cxx | 6 +- .../IterativeClosestPoint2.cxx | 6 +- .../IterativeClosestPoint3.cxx | 6 +- .../ModelToImageRegistration1.cxx | 4 +- .../ModelToImageRegistration2.cxx | 24 +- .../MultiResImageRegistration1.cxx | 2 +- .../MultiStageImageRegistration1.cxx | 6 +- .../RegistrationITKv4/ThinPlateSplineWarp.cxx | 18 +- .../Segmentation/FastMarchingImageFilter.cxx | 2 +- ...veContourShapePriorLevelSetImageFilter.cxx | 2 +- .../HoughTransform2DLinesImageFilter.cxx | 4 +- .../ShapeDetectionLevelSetFilter.cxx | 2 +- .../VectorConfidenceConnected.cxx | 2 +- Examples/SpatialObjects/BlobSpatialObject.cxx | 2 +- .../SpatialObjects/DTITubeSpatialObject.cxx | 2 +- .../SpatialObjects/ImageMaskSpatialObject.cxx | 10 +- .../SpatialObjects/ImageSpatialObject.cxx | 6 +- .../SpatialObjects/LandmarkSpatialObject.cxx | 2 +- Examples/SpatialObjects/LineSpatialObject.cxx | 2 +- ...atialObjectToImageStatisticsCalculator.cxx | 2 +- .../SpatialObjects/SurfaceSpatialObject.cxx | 2 +- Examples/SpatialObjects/TubeSpatialObject.cxx | 2 +- .../VesselTubeSpatialObject.cxx | 2 +- .../Statistics/BayesianPluginClassifier.cxx | 6 +- .../Statistics/EuclideanDistanceMetric.cxx | 4 +- ...ationMaximizationMixtureModelEstimator.cxx | 4 +- Examples/Statistics/ImageEntropy1.cxx | 2 +- Examples/Statistics/ImageHistogram1.cxx | 2 +- Examples/Statistics/ImageHistogram2.cxx | 2 +- Examples/Statistics/ImageHistogram4.cxx | 2 +- Examples/Statistics/KdTree.cxx | 4 +- .../KdTreeBasedKMeansClustering.cxx | 4 +- Examples/Statistics/MembershipSample.cxx | 2 +- .../Statistics/MembershipSampleGenerator.cxx | 2 +- .../ScalarImageMarkovRandomField1.cxx | 4 +- .../SelectiveSubsampleGenerator.cxx | 2 +- Examples/Statistics/Subsample.cxx | 2 +- Modules/Bridge/NumPy/include/itkPyBuffer.hxx | 12 +- .../NumPy/include/itkPyVectorContainer.hxx | 8 +- Modules/Bridge/NumPy/include/itkPyVnl.hxx | 10 +- .../Bridge/VTK/include/itkVTKImageExport.h | 14 +- .../Bridge/VTK/include/itkVTKImageExport.hxx | 10 +- .../VTK/include/itkVTKImageExportBase.h | 2 +- .../Bridge/VTK/include/itkVTKImageImport.h | 28 +- .../Bridge/VTK/include/itkVTKImageImport.hxx | 24 +- Modules/Bridge/VtkGlue/include/QuickView.h | 24 +- .../include/itkImageToVTKImageFilter.h | 2 +- Modules/Bridge/VtkGlue/include/itkViewImage.h | 6 +- .../Bridge/VtkGlue/include/itkViewImage.hxx | 4 +- Modules/Bridge/VtkGlue/src/QuickView.cxx | 18 +- Modules/Bridge/VtkGlue/test/QuickViewTest.cxx | 12 +- Modules/Bridge/VtkGlue/test/runViewImage.cxx | 4 +- .../include/VNLIterativeSparseSolverTraits.h | 6 +- .../Common/include/VNLSparseLUSolverTraits.h | 14 +- .../Common/include/itkAnatomicalOrientation.h | 10 +- .../Core/Common/include/itkAnnulusOperator.h | 14 +- .../Common/include/itkAnnulusOperator.hxx | 12 +- Modules/Core/Common/include/itkArray2D.h | 4 +- Modules/Core/Common/include/itkAutoPointer.h | 2 +- .../itkBSplineInterpolationWeightFunction.hxx | 8 +- Modules/Core/Common/include/itkBoundingBox.h | 4 +- .../Core/Common/include/itkBoundingBox.hxx | 6 +- .../Core/Common/include/itkBresenhamLine.hxx | 8 +- ...fferedImageNeighborhoodPixelAccessPolicy.h | 8 +- .../Core/Common/include/itkBuildInformation.h | 2 +- .../Core/Common/include/itkCellInterface.hxx | 2 +- Modules/Core/Common/include/itkColorTable.h | 2 +- Modules/Core/Common/include/itkColorTable.hxx | 8 +- Modules/Core/Common/include/itkCommand.h | 16 +- Modules/Core/Common/include/itkCommonEnums.h | 22 +- .../include/itkCompensatedSummation.hxx | 2 +- .../Core/Common/include/itkConceptChecking.h | 8 +- ...onicShellInteriorExteriorSpatialFunction.h | 10 +- .../itkConnectedImageNeighborhoodShape.h | 2 +- .../include/itkConstNeighborhoodIterator.h | 8 +- .../include/itkConstNeighborhoodIterator.hxx | 40 +- ...tkConstNeighborhoodIteratorWithOnlyIndex.h | 6 +- ...ConstNeighborhoodIteratorWithOnlyIndex.hxx | 26 +- .../itkConstShapedNeighborhoodIterator.h | 2 +- .../itkConstShapedNeighborhoodIterator.hxx | 16 +- ...undaryImageNeighborhoodPixelAccessPolicy.h | 8 +- .../itkCorrespondenceDataStructureIterator.h | 8 +- Modules/Core/Common/include/itkDataObject.h | 2 +- .../itkDefaultVectorPixelAccessorFunctor.h | 2 +- .../Common/include/itkDerivativeOperator.hxx | 10 +- .../Core/Common/include/itkDomainThreader.h | 8 +- .../Core/Common/include/itkDomainThreader.hxx | 8 +- Modules/Core/Common/include/itkEventObject.h | 2 +- .../Core/Common/include/itkExceptionObject.h | 6 +- .../Common/include/itkExtractImageFilter.h | 4 +- .../Common/include/itkExtractImageFilter.hxx | 18 +- .../itkExtractImageFilterRegionCopier.h | 22 +- .../Core/Common/include/itkFactoryTestLib.h | 2 +- .../include/itkFloatingPointExceptions.h | 2 +- ...odFilledFunctionConditionalConstIterator.h | 4 +- ...FilledFunctionConditionalConstIterator.hxx | 10 +- ...ledImageFunctionConditionalConstIterator.h | 8 +- ...odFilledImageFunctionConditionalIterator.h | 4 +- ...dSpatialFunctionConditionalConstIterator.h | 4 +- ...patialFunctionConditionalConstIterator.hxx | 18 +- .../include/itkFrustumSpatialFunction.h | 14 +- .../include/itkFrustumSpatialFunction.hxx | 2 +- .../include/itkGaussianDerivativeOperator.h | 4 +- .../include/itkGaussianDerivativeOperator.hxx | 6 +- .../Common/include/itkGaussianOperator.hxx | 12 +- .../Core/Common/include/itkHexahedronCell.h | 8 +- .../Core/Common/include/itkHexahedronCell.hxx | 32 +- .../Core/Common/include/itkImageAlgorithm.h | 40 +- .../Core/Common/include/itkImageAlgorithm.hxx | 34 +- Modules/Core/Common/include/itkImageBase.h | 20 +- Modules/Core/Common/include/itkImageBase.hxx | 10 +- .../include/itkImageBoundaryCondition.h | 12 +- .../Core/Common/include/itkImageBufferRange.h | 6 +- .../Common/include/itkImageConstIterator.h | 4 +- .../include/itkImageConstIteratorWithIndex.h | 2 +- .../itkImageConstIteratorWithIndex.hxx | 2 +- .../Core/Common/include/itkImageDuplicator.h | 4 +- Modules/Core/Common/include/itkImageHelper.h | 12 +- .../Core/Common/include/itkImageIORegion.h | 18 +- .../itkImageLinearConstIteratorWithIndex.h | 2 +- .../itkImageLinearConstIteratorWithIndex.hxx | 2 +- .../itkImageRandomConstIteratorWithIndex.h | 6 +- .../itkImageRandomConstIteratorWithIndex.hxx | 4 +- ...itkImageRandomConstIteratorWithOnlyIndex.h | 6 +- ...kImageRandomConstIteratorWithOnlyIndex.hxx | 4 +- ...RandomNonRepeatingConstIteratorWithIndex.h | 12 +- ...ndomNonRepeatingConstIteratorWithIndex.hxx | 8 +- ...ageRandomNonRepeatingIteratorWithIndex.hxx | 2 +- Modules/Core/Common/include/itkImageRegion.h | 2 +- .../Core/Common/include/itkImageRegion.hxx | 4 +- .../include/itkImageRegionConstIterator.hxx | 4 +- ...eRegionExclusionConstIteratorWithIndex.hxx | 2 +- ...kImageRegionExclusionIteratorWithIndex.hxx | 2 +- .../Core/Common/include/itkImageRegionRange.h | 8 +- .../itkImageRegionReverseConstIterator.h | 8 +- .../include/itkImageRegionSplitterBase.h | 14 +- .../include/itkImageRegionSplitterDirection.h | 14 +- .../itkImageRegionSplitterMultidimensional.h | 22 +- .../itkImageRegionSplitterSlowDimension.h | 14 +- .../include/itkImageReverseConstIterator.h | 8 +- .../include/itkImageScanlineConstIterator.hxx | 2 +- Modules/Core/Common/include/itkImageSink.h | 4 +- Modules/Core/Common/include/itkImageSink.hxx | 12 +- .../itkImageSliceConstIteratorWithIndex.h | 4 +- .../Core/Common/include/itkImageSource.hxx | 14 +- .../Common/include/itkImageToImageFilter.hxx | 4 +- .../include/itkImageToImageFilterDetail.h | 30 +- ...tkImageVectorOptimizerParametersHelper.hxx | 4 +- .../Common/include/itkImportImageContainer.h | 4 +- .../include/itkImportImageContainer.hxx | 8 +- .../Common/include/itkImportImageFilter.h | 8 +- .../Common/include/itkImportImageFilter.hxx | 4 +- .../Common/include/itkInPlaceImageFilter.hxx | 2 +- Modules/Core/Common/include/itkIndent.h | 2 +- Modules/Core/Common/include/itkIndexRange.h | 4 +- .../Common/include/itkIterationReporter.h | 6 +- .../Common/include/itkLaplacianOperator.hxx | 2 +- Modules/Core/Common/include/itkLightObject.h | 2 +- .../Common/include/itkLightProcessObject.h | 2 +- Modules/Core/Common/include/itkLineCell.hxx | 6 +- .../Common/include/itkLineConstIterator.hxx | 2 +- Modules/Core/Common/include/itkLoggerBase.h | 4 +- .../Core/Common/include/itkLoggerManager.h | 4 +- .../Common/include/itkLoggerThreadWrapper.h | 2 +- .../Common/include/itkLoggerThreadWrapper.hxx | 6 +- Modules/Core/Common/include/itkMacro.h | 2 +- Modules/Core/Common/include/itkMath.h | 6 +- Modules/Core/Common/include/itkMathDetail.h | 4 +- ...itkMersenneTwisterRandomVariateGenerator.h | 2 +- .../itkMinimumMaximumImageCalculator.h | 6 +- .../Common/include/itkMultiThreaderBase.h | 50 +- .../Core/Common/include/itkNeighborhood.hxx | 2 +- .../include/itkNeighborhoodAccessorFunctor.h | 6 +- .../Common/include/itkNeighborhoodAlgorithm.h | 2 +- .../include/itkNeighborhoodAlgorithm.hxx | 8 +- .../Common/include/itkNeighborhoodAllocator.h | 2 +- .../include/itkNeighborhoodInnerProduct.h | 12 +- .../include/itkNeighborhoodInnerProduct.hxx | 14 +- .../include/itkNeighborhoodIterator.hxx | 2 +- .../itkNeighborhoodIteratorTestCommon.hxx | 8 +- .../include/itkNeighborhoodOperator.hxx | 8 +- .../Core/Common/include/itkNumberToString.h | 4 +- .../Common/include/itkObjectFactoryBase.h | 14 +- Modules/Core/Common/include/itkObjectStore.h | 4 +- Modules/Core/Common/include/itkOctree.h | 26 +- Modules/Core/Common/include/itkOctree.hxx | 34 +- Modules/Core/Common/include/itkOctreeNode.h | 2 +- Modules/Core/Common/include/itkOutputWindow.h | 4 +- .../include/itkPeriodicBoundaryCondition.h | 10 +- .../include/itkPeriodicBoundaryCondition.hxx | 28 +- .../itkPhasedArray3DSpecialCoordinatesImage.h | 20 +- .../Common/include/itkPlatformMultiThreader.h | 8 +- Modules/Core/Common/include/itkPoint.h | 4 +- Modules/Core/Common/include/itkPoint.hxx | 12 +- .../Core/Common/include/itkPointSetBase.hxx | 2 +- .../include/itkPointSetToImageFilter.hxx | 6 +- .../Core/Common/include/itkPolyLineCell.hxx | 4 +- Modules/Core/Common/include/itkPolygonCell.h | 2 +- .../Core/Common/include/itkPolygonCell.hxx | 6 +- .../Common/include/itkPoolMultiThreader.h | 12 +- .../include/itkPriorityQueueContainer.h | 4 +- .../include/itkPriorityQueueContainer.hxx | 14 +- .../Core/Common/include/itkProcessObject.h | 6 +- .../Core/Common/include/itkProgressReporter.h | 26 +- .../Common/include/itkQuadraticEdgeCell.h | 2 +- .../Common/include/itkQuadraticEdgeCell.hxx | 8 +- .../Common/include/itkQuadraticTriangleCell.h | 2 +- .../include/itkQuadraticTriangleCell.hxx | 8 +- .../Common/include/itkQuadrilateralCell.h | 16 +- .../Common/include/itkQuadrilateralCell.hxx | 34 +- .../Core/Common/include/itkRealTimeInterval.h | 2 +- .../Core/Common/include/itkRealTimeStamp.h | 4 +- .../Core/Common/include/itkResourceProbe.h | 6 +- .../Core/Common/include/itkResourceProbe.hxx | 16 +- .../include/itkResourceProbesCollectorBase.h | 22 +- .../itkResourceProbesCollectorBase.hxx | 28 +- ...odFilledFunctionConditionalConstIterator.h | 8 +- ...FilledFunctionConditionalConstIterator.hxx | 14 +- ...ledImageFunctionConditionalConstIterator.h | 8 +- ...odFilledImageFunctionConditionalIterator.h | 4 +- .../include/itkShapedImageNeighborhoodRange.h | 32 +- .../include/itkSimpleDataObjectDecorator.h | 2 +- .../Common/include/itkSimpleFilterWatcher.h | 14 +- Modules/Core/Common/include/itkSingleton.h | 12 +- .../Core/Common/include/itkSmapsFileParser.h | 12 +- .../Common/include/itkSmapsFileParser.hxx | 2 +- .../Core/Common/include/itkSobelOperator.hxx | 2 +- .../Core/Common/include/itkSparseFieldLayer.h | 2 +- .../Common/include/itkSparseFieldLayer.hxx | 4 +- .../Common/include/itkSpatialOrientation.h | 4 +- .../Common/include/itkStdStreamStateSave.h | 2 +- .../Common/include/itkStreamingImageFilter.h | 2 +- .../include/itkStreamingImageFilter.hxx | 4 +- .../Common/include/itkStructHashFunction.h | 4 +- .../include/itkSymmetricEigenAnalysis.h | 46 +- .../include/itkSymmetricEigenAnalysis.hxx | 58 +- ...lipsoidInteriorExteriorSpatialFunction.hxx | 4 +- .../include/itkSymmetricSecondRankTensor.hxx | 4 +- .../Core/Common/include/itkTBBMultiThreader.h | 12 +- .../Common/include/itkTetrahedronCell.hxx | 30 +- .../Core/Common/include/itkThreadSupport.h | 2 +- .../include/itkThreadedDomainPartitioner.h | 2 +- .../itkThreadedImageRegionPartitioner.h | 2 +- .../itkThreadedImageRegionPartitioner.hxx | 2 +- .../itkThreadedIndexedContainerPartitioner.h | 2 +- .../itkThreadedIteratorRangePartitioner.h | 2 +- .../itkThreadedIteratorRangePartitioner.hxx | 2 +- .../itkTorusInteriorExteriorSpatialFunction.h | 4 +- .../Common/include/itkTotalProgressReporter.h | 18 +- .../Core/Common/include/itkTriangleCell.hxx | 56 +- .../Core/Common/include/itkTriangleHelper.h | 6 +- .../Core/Common/include/itkTriangleHelper.hxx | 14 +- .../include/itkUnaryFunctorImageFilter.hxx | 6 +- .../Common/include/itkVariableLengthVector.h | 8 +- Modules/Core/Common/include/itkVector.h | 8 +- .../Core/Common/include/itkVectorContainer.h | 4 +- .../Common/include/itkVectorContainer.hxx | 2 +- ...tkVectorImageNeighborhoodAccessorFunctor.h | 6 +- .../itkVectorNeighborhoodInnerProduct.hxx | 12 +- Modules/Core/Common/include/itkVersor.hxx | 10 +- Modules/Core/Common/include/itkVertexCell.hxx | 12 +- .../itkZeroFluxNeumannBoundaryCondition.h | 10 +- .../itkZeroFluxNeumannBoundaryCondition.hxx | 22 +- ...eumannImageNeighborhoodPixelAccessPolicy.h | 10 +- .../Common/src/itkAnatomicalOrientation.cxx | 8 +- .../Core/Common/src/itkEquivalencyTable.cxx | 4 +- .../Core/Common/src/itkExceptionObject.cxx | 8 +- .../Common/src/itkFloatingPointExceptions.cxx | 2 +- ...tingPointExceptions_unix_signalhandler.cxx | 4 +- .../src/itkImageRegionSplitterDirection.cxx | 22 +- ...itkImageRegionSplitterMultidimensional.cxx | 26 +- .../itkImageRegionSplitterSlowDimension.cxx | 22 +- Modules/Core/Common/src/itkLightObject.cxx | 4 +- Modules/Core/Common/src/itkLoggerBase.cxx | 2 +- .../Common/src/itkMemoryUsageObserver.cxx | 62 +- ...kMersenneTwisterRandomVariateGenerator.cxx | 8 +- .../Core/Common/src/itkMetaDataDictionary.cxx | 4 +- .../Core/Common/src/itkMultiThreaderBase.cxx | 34 +- Modules/Core/Common/src/itkNumberToString.cxx | 8 +- Modules/Core/Common/src/itkObject.cxx | 14 +- .../Core/Common/src/itkObjectFactoryBase.cxx | 26 +- Modules/Core/Common/src/itkOutputWindow.cxx | 2 +- .../Common/src/itkPlatformMultiThreader.cxx | 4 +- .../Core/Common/src/itkPoolMultiThreader.cxx | 18 +- Modules/Core/Common/src/itkProcessObject.cxx | 4 +- .../Common/src/itkProgressAccumulator.cxx | 2 +- .../Core/Common/src/itkProgressReporter.cxx | 10 +- Modules/Core/Common/src/itkPyCommand.cxx | 2 +- Modules/Core/Common/src/itkRealTimeClock.cxx | 4 +- .../Core/Common/src/itkRealTimeInterval.cxx | 8 +- Modules/Core/Common/src/itkRealTimeStamp.cxx | 4 +- .../Core/Common/src/itkSmapsFileParser.cxx | 10 +- .../src/itkSpatialOrientationAdapter.cxx | 2 +- .../Core/Common/src/itkTBBMultiThreader.cxx | 14 +- Modules/Core/Common/src/itkThreadLogger.cxx | 6 +- Modules/Core/Common/src/itkThreadPool.cxx | 2 +- ...itkThreadedIndexedContainerPartitioner.cxx | 6 +- .../Common/src/itkTotalProgressReporter.cxx | 6 +- .../Common/src/itkXMLFileOutputWindow.cxx | 2 +- Modules/Core/Common/test/ClientTestLibraryB.h | 4 +- .../test/VNLSparseLUSolverTraitsTest.cxx | 14 +- .../Common/test/itkAbortProcessObjectTest.cxx | 8 +- .../Common/test/itkAdaptorComparisonTest.cxx | 2 +- .../Common/test/itkAggregateTypesGTest.cxx | 18 +- Modules/Core/Common/test/itkArray2DGTest.cxx | 4 +- Modules/Core/Common/test/itkArray2DTest.cxx | 2 +- Modules/Core/Common/test/itkArrayTest.cxx | 10 +- ...nRegularizedHeavisideStepFunctionTest1.cxx | 2 +- ...BSplineInterpolationWeightFunctionTest.cxx | 14 +- .../test/itkBSplineKernelFunctionTest.cxx | 2 +- .../Common/test/itkBoundaryConditionTest.cxx | 4 +- .../Core/Common/test/itkBoundingBoxTest.cxx | 10 +- .../Core/Common/test/itkBresenhamLineTest.cxx | 4 +- Modules/Core/Common/test/itkByteSwapTest.cxx | 14 +- .../Core/Common/test/itkColorTableTest.cxx | 10 +- .../test/itkCommandObserverObjectTest.cxx | 4 +- .../test/itkCompensatedSummationTest.cxx | 2 +- .../test/itkCompensatedSummationTest2.cxx | 6 +- ...tkConnectedImageNeighborhoodShapeGTest.cxx | 28 +- .../test/itkConstNeighborhoodIteratorTest.cxx | 10 +- ...tNeighborhoodIteratorWithOnlyIndexTest.cxx | 8 +- ...itkConstShapedNeighborhoodIteratorTest.cxx | 10 +- ...tkConstShapedNeighborhoodIteratorTest2.cxx | 6 +- .../test/itkConstantBoundaryConditionTest.cxx | 16 +- ...mageNeighborhoodPixelAccessPolicyGTest.cxx | 14 +- .../test/itkCovariantVectorGeometryTest.cxx | 4 +- .../itkDataObjectAndProcessObjectTest.cxx | 6 +- Modules/Core/Common/test/itkDataTypeTest.cxx | 2 +- Modules/Core/Common/test/itkDecoratorTest.cxx | 6 +- ...oidInteriorExteriorSpatialFunctionTest.cxx | 6 +- .../Common/test/itkExceptionObjectGTest.cxx | 2 +- .../Common/test/itkExtractImage3Dto2DTest.cxx | 2 +- .../Core/Common/test/itkExtractImageTest.cxx | 14 +- .../Common/test/itkFilterDispatchTest.cxx | 2 +- .../itkFiniteCylinderSpatialFunctionTest.cxx | 4 +- .../Core/Common/test/itkFixedArrayGTest.cxx | 8 +- .../Core/Common/test/itkFixedArrayTest.cxx | 4 +- .../Core/Common/test/itkFixedArrayTest2.cxx | 2 +- .../test/itkFloatingPointExceptionsTest.cxx | 2 +- .../Common/test/itkFloodFillIteratorTest.cxx | 6 +- .../itkFloodFilledSpatialFunctionTest.cxx | 6 +- .../itkGaussianDerivativeOperatorTest.cxx | 6 +- Modules/Core/Common/test/itkHashTableTest.cxx | 4 +- .../test/itkHeavisideStepFunctionTest1.cxx | 2 +- .../test/itkImageAlgorithmCopyTest2.cxx | 2 +- .../Core/Common/test/itkImageBaseGTest.cxx | 6 +- .../Common/test/itkImageBufferRangeGTest.cxx | 50 +- .../itkImageComputeOffsetAndIndexTest.cxx | 180 +++--- .../Common/test/itkImageDuplicatorTest.cxx | 4 +- .../Common/test/itkImageDuplicatorTest2.cxx | 2 +- Modules/Core/Common/test/itkImageGTest.cxx | 2 +- .../Common/test/itkImageIORegionGTest.cxx | 6 +- .../Core/Common/test/itkImageIteratorTest.cxx | 2 +- .../test/itkImageIteratorWithIndexTest.cxx | 22 +- .../test/itkImageLinearIteratorTest.cxx | 2 +- .../test/itkImageNeighborhoodOffsetsGTest.cxx | 10 +- ...ImageRandomConstIteratorWithIndexGTest.cxx | 2 +- ...geRandomConstIteratorWithOnlyIndexTest.cxx | 2 +- .../test/itkImageRandomIteratorTest.cxx | 2 +- ...andomNonRepeatingIteratorWithIndexTest.cxx | 18 +- ...ndomNonRepeatingIteratorWithIndexTest2.cxx | 14 +- ...geRegionExclusionIteratorWithIndexTest.cxx | 10 +- .../Core/Common/test/itkImageRegionGTest.cxx | 2 +- .../test/itkImageRegionIteratorGTest.cxx | 2 +- .../Common/test/itkImageRegionRangeGTest.cxx | 66 +- Modules/Core/Common/test/itkImageTest.cxx | 26 +- .../Common/test/itkImageTransformTest.cxx | 2 +- ...ageVectorOptimizerParametersHelperTest.cxx | 8 +- .../Core/Common/test/itkImportImageTest.cxx | 6 +- .../Core/Common/test/itkIndexRangeGTest.cxx | 22 +- Modules/Core/Common/test/itkIteratorTests.cxx | 4 +- .../Core/Common/test/itkLightObjectTest.cxx | 2 +- .../test/itkLoggerThreadWrapperTest.cxx | 4 +- .../Core/Common/test/itkMapContainerTest.cxx | 14 +- .../Common/test/itkMathRoundProfileTest1.cxx | 4 +- Modules/Core/Common/test/itkMathTest.cxx | 20 +- Modules/Core/Common/test/itkMatrixGTest.cxx | 8 +- Modules/Core/Common/test/itkMatrixTest.cxx | 4 +- .../test/itkMemoryProbesCollecterBaseTest.cxx | 2 +- ...enneTwisterRandomVariateGeneratorGTest.cxx | 2 +- ...senneTwisterRandomVariateGeneratorTest.cxx | 4 +- .../test/itkMetaDataDictionaryGTest.cxx | 12 +- .../Common/test/itkMetaDataDictionaryTest.cxx | 6 +- .../itkMinimumMaximumImageCalculatorTest.cxx | 10 +- .../Core/Common/test/itkModifiedTimeTest.cxx | 2 +- .../itkMultiThreaderParallelizeArrayTest.cxx | 2 +- .../Common/test/itkMultipleLogOutputTest.cxx | 2 +- .../Common/test/itkMultithreadingTest.cxx | 10 +- .../test/itkNeighborhoodAlgorithmTest.cxx | 6 +- .../test/itkNeighborhoodIteratorTest.cxx | 2 +- .../Core/Common/test/itkNeighborhoodTest.cxx | 2 +- .../Common/test/itkNumberToStringGTest.cxx | 6 +- .../Core/Common/test/itkNumericTraitsTest.cxx | 14 +- Modules/Core/Common/test/itkNumericsTest.cxx | 8 +- .../test/itkObjectFactoryOnlyNewTest.cxx | 8 +- .../Core/Common/test/itkObjectFactoryTest.cxx | 8 +- .../Common/test/itkObjectFactoryTest2.cxx | 10 +- .../Core/Common/test/itkObjectStoreTest.cxx | 2 +- Modules/Core/Common/test/itkOctreeTest.cxx | 8 +- .../test/itkOptimizerParametersTest.cxx | 2 +- .../test/itkPeriodicBoundaryConditionTest.cxx | 18 +- ...asedArray3DSpecialCoordinatesImageTest.cxx | 6 +- .../Core/Common/test/itkPointGeometryTest.cxx | 54 +- Modules/Core/Common/test/itkPointSetGTest.cxx | 2 +- .../test/itkPointSetToImageFilterTest1.cxx | 2 +- .../Core/Common/test/itkPriorityQueueTest.cxx | 2 +- Modules/Core/Common/test/itkRGBPixelTest.cxx | 12 +- .../Core/Common/test/itkRangeGTestUtilities.h | 2 +- .../Core/Common/test/itkRealTimeClockTest.cxx | 2 +- .../Common/test/itkRealTimeIntervalTest.cxx | 4 +- .../Core/Common/test/itkRealTimeStampTest.cxx | 4 +- .../test/itkSTLContainerAdaptorTest.cxx | 16 +- Modules/Core/Common/test/itkSTLThreadTest.cxx | 8 +- .../itkShapedImageNeighborhoodRangeGTest.cxx | 140 ++--- .../itkShapedNeighborhoodIteratorTest.cxx | 10 +- .../test/itkSimpleFilterWatcherTest.cxx | 2 +- ...nRegularizedHeavisideStepFunctionTest1.cxx | 2 +- Modules/Core/Common/test/itkSizeGTest.cxx | 2 +- .../Core/Common/test/itkSliceIteratorTest.cxx | 20 +- .../Core/Common/test/itkSmartPointerGTest.cxx | 6 +- .../itkSobelOperatorImageConvolutionTest.cxx | 8 +- .../Common/test/itkSparseFieldLayerTest.cxx | 6 +- .../Core/Common/test/itkSparseImageTest.cxx | 12 +- .../itkSpatialOrientationAdaptorGTest.cxx | 2 +- .../Common/test/itkStdStreamStateSaveTest.cxx | 6 +- .../test/itkStreamingImageFilterTest.cxx | 4 +- .../test/itkStreamingImageFilterTest2.cxx | 6 +- .../test/itkStreamingImageFilterTest3.cxx | 4 +- .../test/itkSymmetricEigenAnalysisTest.cxx | 26 +- ...oidInteriorExteriorSpatialFunctionTest.cxx | 4 +- .../test/itkSymmetricSecondRankTensorTest.cxx | 10 +- .../Core/Common/test/itkThreadLoggerTest.cxx | 4 +- .../itkThreadedImageRegionPartitionerTest.cxx | 4 +- ...hreadedIndexedContainerPartitionerTest.cxx | 6 +- ...tkThreadedIteratorRangePartitionerTest.cxx | 16 +- ...kThreadedIteratorRangePartitionerTest2.cxx | 18 +- ...kThreadedIteratorRangePartitionerTest3.cxx | 18 +- .../Core/Common/test/itkTimeProbesTest.cxx | 2 +- Modules/Core/Common/test/itkTimeStampTest.cxx | 2 +- .../Common/test/itkVNLRoundProfileTest1.cxx | 2 +- .../test/itkVariableLengthVectorTest.cxx | 2 +- .../Common/test/itkVectorContainerGTest.cxx | 2 +- .../Common/test/itkVectorGeometryTest.cxx | 2 +- .../Common/test/itkVectorMultiplyTest.cxx | 2 +- Modules/Core/Common/test/itkVectorTest.cxx | 2 +- Modules/Core/Common/test/itkVersorTest.cxx | 28 +- .../Core/Common/test/itkWeakPointerGTest.cxx | 4 +- .../test/itkXMLFileOutputWindowTest.cxx | 8 +- .../test/itkZeroFluxBoundaryConditionTest.cxx | 14 +- .../itkDenseFiniteDifferenceImageFilter.h | 4 +- .../itkDenseFiniteDifferenceImageFilter.hxx | 18 +- .../include/itkFiniteDifferenceFunction.h | 6 +- .../itkFiniteDifferenceImageFilter.hxx | 4 +- .../itkFiniteDifferenceSparseImageFilter.h | 6 +- .../itkFiniteDifferenceSparseImageFilter.hxx | 16 +- .../itkFiniteDifferenceSparseImageFunction.h | 4 +- .../GPUCommon/include/itkGPUContextManager.h | 6 +- .../include/itkGPUImageDataManager.h | 4 +- .../include/itkGPUImageDataManager.hxx | 8 +- .../include/itkGPUImageToImageFilter.hxx | 2 +- .../GPUCommon/include/itkGPUKernelManager.h | 10 +- .../Core/GPUCommon/include/itkGPUReduction.h | 22 +- .../GPUCommon/include/itkGPUReduction.hxx | 34 +- .../include/itkGPUUnaryFunctorImageFilter.hxx | 2 +- .../GPUCommon/src/itkGPUKernelManager.cxx | 4 +- Modules/Core/GPUCommon/src/itkOpenCLUtil.cxx | 22 +- .../Core/GPUCommon/test/itkGPUImageTest.cxx | 2 +- .../GPUCommon/test/itkGPUReductionTest.cxx | 2 +- ...itkGPUDenseFiniteDifferenceImageFilter.hxx | 2 +- .../itkGPUFiniteDifferenceFilterEnum.h | 2 +- .../include/itkGPUFiniteDifferenceFunction.h | 4 +- .../itkGPUFiniteDifferenceImageFilter.hxx | 6 +- .../ImageAdaptors/include/itkImageAdaptor.h | 8 +- .../itkComplexConjugateImageAdaptorTest.cxx | 6 +- .../test/itkImageAdaptorGTest.cxx | 16 +- .../test/itkImageAdaptorTest.cxx | 2 +- .../test/itkNthElementPixelAccessorTest.cxx | 2 +- .../ImageAdaptors/test/itkVectorImageTest.cxx | 58 +- .../test/itkVectorImageToImageAdaptorTest.cxx | 6 +- .../itkBSplineDecompositionImageFilter.hxx | 8 +- .../itkBSplineInterpolateImageFunction.h | 62 +- .../itkBSplineInterpolateImageFunction.hxx | 48 +- .../itkCentralDifferenceImageFunction.h | 10 +- .../itkCentralDifferenceImageFunction.hxx | 50 +- .../include/itkCovarianceImageFunction.hxx | 2 +- .../include/itkGaussianBlurImageFunction.h | 12 +- .../include/itkGaussianBlurImageFunction.hxx | 10 +- .../itkGaussianDerivativeImageFunction.hxx | 4 +- .../itkGaussianInterpolateImageFunction.h | 10 +- .../itkGaussianInterpolateImageFunction.hxx | 26 +- ...lImageGaussianInterpolateImageFunction.hxx | 10 +- .../itkLinearInterpolateImageFunction.h | 12 +- .../itkLinearInterpolateImageFunction.hxx | 8 +- ...ahalanobisDistanceThresholdImageFunction.h | 2 +- ...ighborhoodBinaryThresholdImageFunction.hxx | 8 +- .../itkRayCastInterpolateImageFunction.h | 6 +- .../itkRayCastInterpolateImageFunction.hxx | 18 +- .../itkVectorInterpolateImageFunction.h | 2 +- ...tkVectorLinearInterpolateImageFunction.hxx | 8 +- ...earestNeighborExtrapolateImageFunction.hxx | 4 +- .../include/itkVectorMeanImageFunction.hxx | 2 +- ...tkWindowedSincInterpolateImageFunction.hxx | 8 +- ...itkBSplineDecompositionImageFilterTest.cxx | 6 +- ...itkBSplineInterpolateImageFunctionTest.cxx | 34 +- .../itkBSplineResampleImageFunctionTest.cxx | 4 +- .../itkBinaryThresholdImageFunctionTest.cxx | 8 +- ...fferenceImageFunctionOnVectorSpeedTest.cxx | 8 +- ...ralDifferenceImageFunctionOnVectorTest.cxx | 10 +- ...entralDifferenceImageFunctionSpeedTest.cxx | 8 +- .../itkCentralDifferenceImageFunctionTest.cxx | 8 +- .../test/itkCovarianceImageFunctionTest.cxx | 6 +- .../test/itkGaussianBlurImageFunctionTest.cxx | 8 +- ...itkGaussianDerivativeImageFunctionTest.cxx | 8 +- ...tkGaussianInterpolateImageFunctionTest.cxx | 2 +- ...ageAdaptorInterpolateImageFunctionTest.cxx | 32 +- .../ImageFunction/test/itkInterpolateTest.cxx | 12 +- ...geGaussianInterpolateImageFunctionTest.cxx | 14 +- .../itkLinearInterpolateImageFunctionTest.cxx | 10 +- ...obisDistanceThresholdImageFunctionTest.cxx | 8 +- .../test/itkMeanImageFunctionTest.cxx | 4 +- .../test/itkMedianImageFunctionTest.cxx | 12 +- ...stNeighborInterpolateImageFunctionTest.cxx | 12 +- ...kNeighborhoodOperatorImageFunctionTest.cxx | 6 +- .../itkRGBInterpolateImageFunctionTest.cxx | 60 +- ...itkRayCastInterpolateImageFunctionTest.cxx | 4 +- .../itkScatterMatrixImageFunctionTest.cxx | 6 +- .../itkSumOfSquaresImageFunctionGTest.cxx | 6 +- .../test/itkVarianceImageFunctionTest.cxx | 6 +- .../itkVectorInterpolateImageFunctionTest.cxx | 34 +- ...stNeighborExtrapolateImageFunctionTest.cxx | 40 +- .../test/itkVectorMeanImageFunctionTest.cxx | 6 +- ...ndowedSincInterpolateImageFunctionTest.cxx | 22 +- .../include/itkAutomaticTopologyMeshSource.h | 6 +- .../itkAutomaticTopologyMeshSource.hxx | 34 +- .../Mesh/include/itkBinaryMask3DMeshSource.h | 24 +- .../include/itkBinaryMask3DMeshSource.hxx | 20 +- .../include/itkConnectedRegionsMeshFilter.h | 12 +- .../include/itkConnectedRegionsMeshFilter.hxx | 46 +- .../itkImageToParametricSpaceFilter.hxx | 12 +- .../include/itkInteriorExteriorMeshFilter.hxx | 6 +- Modules/Core/Mesh/include/itkMesh.h | 14 +- Modules/Core/Mesh/include/itkMesh.hxx | 50 +- .../Core/Mesh/include/itkMeshToMeshFilter.hxx | 30 +- ...kParametricSpaceToImageSpaceMeshFilter.hxx | 12 +- .../include/itkRegularSphereMeshSource.hxx | 18 +- Modules/Core/Mesh/include/itkSimplexMesh.hxx | 18 +- .../itkSimplexMeshAdaptTopologyFilter.h | 14 +- .../itkSimplexMeshAdaptTopologyFilter.hxx | 30 +- .../itkSimplexMeshToTriangleMeshFilter.h | 4 +- .../itkSimplexMeshToTriangleMeshFilter.hxx | 10 +- .../include/itkSimplexMeshVolumeCalculator.h | 6 +- .../itkSimplexMeshVolumeCalculator.hxx | 4 +- .../Core/Mesh/include/itkSphereMeshSource.hxx | 2 +- .../Mesh/include/itkTransformMeshFilter.hxx | 6 +- .../itkTriangleMeshCurvatureCalculator.h | 6 +- .../itkTriangleMeshCurvatureCalculator.hxx | 8 +- .../itkTriangleMeshToBinaryImageFilter.h | 2 +- .../itkTriangleMeshToBinaryImageFilter.hxx | 62 +- .../itkTriangleMeshToSimplexMeshFilter.h | 6 +- .../itkTriangleMeshToSimplexMeshFilter.hxx | 32 +- .../Mesh/include/itkVTKPolyDataReader.hxx | 2 +- .../Mesh/include/itkVTKPolyDataWriter.hxx | 6 +- .../Core/Mesh/include/itkWarpMeshFilter.hxx | 10 +- .../Core/Mesh/src/itkSimplexMeshGeometry.cxx | 2 +- .../test/itkBinaryMask3DMeshSourceTest.cxx | 32 +- .../itkConnectedRegionsMeshFilterTest1.cxx | 8 +- .../itkConnectedRegionsMeshFilterTest2.cxx | 4 +- Modules/Core/Mesh/test/itkDynamicMeshTest.cxx | 4 +- .../itkImageToParametricSpaceFilterTest.cxx | 2 +- .../itkInteriorExteriorMeshFilterTest.cxx | 2 +- .../test/itkMeshSourceGraftOutputTest.cxx | 6 +- .../Mesh/test/itkMeshSpatialObjectIOTest.cxx | 10 +- Modules/Core/Mesh/test/itkMeshTest.cxx | 14 +- ...ametricSpaceToImageSpaceMeshFilterTest.cxx | 2 +- .../Mesh/test/itkQuadrilateralCellTest.cxx | 16 +- .../test/itkRegularSphereMeshSourceTest2.cxx | 8 +- .../itkSimplexMeshAdaptTopologyFilterTest.cxx | 6 +- ...itkSimplexMeshToTriangleMeshFilterTest.cxx | 8 +- .../itkSimplexMeshVolumeCalculatorTest.cxx | 6 +- .../Mesh/test/itkSphereMeshSourceTest.cxx | 6 +- .../Mesh/test/itkTransformMeshFilterTest.cxx | 4 +- .../Core/Mesh/test/itkTriangleCellTest.cxx | 22 +- ...itkTriangleMeshCurvatureCalculatorTest.cxx | 6 +- ...itkTriangleMeshToBinaryImageFilterTest.cxx | 10 +- ...tkTriangleMeshToBinaryImageFilterTest1.cxx | 8 +- ...tkTriangleMeshToBinaryImageFilterTest2.cxx | 8 +- ...tkTriangleMeshToBinaryImageFilterTest4.cxx | 2 +- ...tkTriangleMeshToSimplexMeshFilter2Test.cxx | 8 +- ...itkTriangleMeshToSimplexMeshFilterTest.cxx | 6 +- .../Core/Mesh/test/itkWarpMeshFilterTest.cxx | 4 +- .../include/itkGeometricalQuadEdge.h | 6 +- .../include/itkGeometricalQuadEdge.hxx | 6 +- .../Core/QuadEdgeMesh/include/itkQuadEdge.h | 2 +- .../QuadEdgeMesh/include/itkQuadEdgeMesh.h | 36 +- .../QuadEdgeMesh/include/itkQuadEdgeMesh.hxx | 66 +- .../include/itkQuadEdgeMeshBaseIterator.h | 12 +- ...kQuadEdgeMeshBoundaryEdgesMeshFunction.hxx | 6 +- ...ulerOperatorCreateCenterVertexFunction.hxx | 4 +- ...ulerOperatorDeleteCenterVertexFunction.hxx | 4 +- ...dEdgeMeshEulerOperatorFlipEdgeFunction.hxx | 2 +- ...dgeMeshEulerOperatorJoinVertexFunction.hxx | 18 +- ...dgeMeshEulerOperatorSplitFacetFunction.hxx | 2 +- .../itkQuadEdgeMeshEulerOperatorsTestHelper.h | 36 +- .../include/itkQuadEdgeMeshFrontIterator.h | 6 +- .../include/itkQuadEdgeMeshFrontIterator.hxx | 2 +- .../include/itkQuadEdgeMeshLineCell.h | 4 +- .../include/itkQuadEdgeMeshLineCell.hxx | 4 +- .../include/itkQuadEdgeMeshMacro.h | 2 +- .../include/itkQuadEdgeMeshPolygonCell.h | 6 +- .../include/itkQuadEdgeMeshPolygonCell.hxx | 36 +- ...uadEdgeMeshScalarDataVTKPolyDataWriter.hxx | 2 +- .../itkQuadEdgeMeshToQuadEdgeMeshFilter.h | 10 +- .../itkQuadEdgeMeshToQuadEdgeMeshFilter.hxx | 10 +- .../include/itkQuadEdgeMeshTopologyChecker.h | 6 +- .../itkQuadEdgeMeshTopologyChecker.hxx | 4 +- .../itkQuadEdgeMeshZipMeshFunction.hxx | 10 +- .../test/itkDynamicQuadEdgeMeshTest.cxx | 2 +- .../test/itkGeometricalQuadEdgeTest1.cxx | 2 +- .../test/itkQuadEdgeMeshAddFaceTest1.cxx | 4 +- .../test/itkQuadEdgeMeshBasicLayerTest.cxx | 2 +- .../test/itkQuadEdgeMeshCellInterfaceTest.cxx | 20 +- .../test/itkQuadEdgeMeshDeleteEdgeTest.cxx | 2 +- ...adEdgeMeshDeletePointAndReorderIDsTest.cxx | 2 +- ...eshEulerOperatorDeleteCenterVertexTest.cxx | 2 +- ...uadEdgeMeshEulerOperatorJoinVertexTest.cxx | 8 +- .../test/itkQuadEdgeMeshFrontIteratorTest.cxx | 2 +- .../test/itkQuadEdgeMeshIteratorTest.cxx | 4 +- .../test/itkQuadEdgeMeshPointTest1.cxx | 2 +- .../test/itkQuadEdgeMeshPolygonCellTest.cxx | 2 +- .../test/itkQuadEdgeMeshTest1.cxx | 2 +- .../test/itkQuadEdgeMeshTest2.cxx | 8 +- .../test/itkQuadEdgeMeshTest3.cxx | 2 +- .../QuadEdgeMesh/test/itkQuadEdgeTest1.cxx | 16 +- .../include/itkArrowSpatialObject.h | 4 +- .../include/itkBoxSpatialObject.h | 2 +- .../include/itkCastSpatialObjectFilter.h | 2 +- .../include/itkContourSpatialObject.h | 10 +- .../include/itkContourSpatialObject.hxx | 8 +- .../include/itkContourSpatialObjectPoint.h | 2 +- .../include/itkDTITubeSpatialObjectPoint.h | 2 +- .../include/itkGaussianSpatialObject.h | 8 +- .../include/itkGaussianSpatialObject.hxx | 6 +- .../include/itkImageMaskSpatialObject.h | 2 +- .../include/itkImageMaskSpatialObject.hxx | 4 +- .../include/itkImageSpatialObject.h | 6 +- .../include/itkImageSpatialObject.hxx | 12 +- .../include/itkLineSpatialObjectPoint.hxx | 2 +- .../include/itkMeshSpatialObject.hxx | 6 +- .../include/itkMetaArrowConverter.hxx | 12 +- .../include/itkMetaConverterBase.h | 2 +- .../include/itkMetaConverterBase.hxx | 6 +- .../include/itkMetaDTITubeConverter.hxx | 6 +- .../include/itkMetaGaussianConverter.hxx | 2 +- .../include/itkMetaImageConverter.hxx | 8 +- .../include/itkMetaMeshConverter.hxx | 14 +- .../include/itkMetaSceneConverter.h | 24 +- .../include/itkMetaSceneConverter.hxx | 14 +- .../include/itkMetaTubeConverter.hxx | 2 +- .../include/itkMetaVesselTubeConverter.hxx | 2 +- .../include/itkPointBasedSpatialObject.hxx | 8 +- .../include/itkPolygonSpatialObject.h | 6 +- .../include/itkPolygonSpatialObject.hxx | 32 +- .../SpatialObjects/include/itkSpatialObject.h | 48 +- .../include/itkSpatialObject.hxx | 96 +-- .../include/itkSpatialObjectDuplicator.h | 4 +- .../include/itkSpatialObjectDuplicator.hxx | 6 +- .../include/itkSpatialObjectFactory.h | 2 +- .../include/itkSpatialObjectFactoryBase.h | 8 +- .../include/itkSpatialObjectProperty.h | 2 +- .../include/itkSpatialObjectToImageFilter.h | 10 +- .../include/itkSpatialObjectToImageFilter.hxx | 6 +- ...SpatialObjectToImageStatisticsCalculator.h | 18 +- ...atialObjectToImageStatisticsCalculator.hxx | 24 +- .../itkSpatialObjectToPointSetFilter.hxx | 10 +- .../include/itkSurfaceSpatialObject.hxx | 12 +- .../include/itkTubeSpatialObject.h | 2 +- .../include/itkTubeSpatialObject.hxx | 22 +- .../include/itkTubeSpatialObjectPoint.h | 2 +- .../test/itkBlobSpatialObjectTest.cxx | 4 +- .../test/itkContourSpatialObjectPointTest.cxx | 32 +- .../test/itkContourSpatialObjectTest.cxx | 2 +- .../test/itkDTITubeSpatialObjectTest.cxx | 16 +- .../test/itkImageMaskSpatialObjectTest.cxx | 14 +- .../test/itkImageMaskSpatialObjectTest2.cxx | 14 +- .../test/itkImageMaskSpatialObjectTest3.cxx | 4 +- .../test/itkImageMaskSpatialObjectTest4.cxx | 8 +- .../test/itkImageMaskSpatialObjectTest5.cxx | 22 +- .../test/itkImageSpatialObjectTest.cxx | 12 +- .../test/itkLandmarkSpatialObjectTest.cxx | 2 +- .../test/itkMetaArrowConverterTest.cxx | 2 +- ...SpatialObjectIsInsideInObjectSpaceTest.cxx | 6 +- .../test/itkPolygonSpatialObjectTest.cxx | 18 +- .../itkSpatialObjectToImageFilterTest.cxx | 4 +- ...lObjectToImageStatisticsCalculatorTest.cxx | 4 +- .../itkSpatialObjectToPointSetFilterTest.cxx | 8 +- .../test/itkTubeSpatialObjectTest.cxx | 16 +- .../TestKernel/include/itkGTestPredicate.h | 6 +- .../include/itkPipelineMonitorImageFilter.h | 6 +- .../include/itkPipelineMonitorImageFilter.hxx | 4 +- .../TestKernel/include/itkRandomImageSource.h | 8 +- .../include/itkRandomImageSource.hxx | 6 +- .../TestKernel/include/itkTestDriverInclude.h | 46 +- .../include/itkTestingComparisonImageFilter.h | 4 +- .../itkTestingComparisonImageFilter.hxx | 22 +- .../itkTestingExtractSliceImageFilter.hxx | 22 +- .../include/itkTestingHashImageFilter.hxx | 4 +- .../itkTestingStretchIntensityImageFilter.hxx | 6 +- .../TestKernel/src/itkTestDriverInclude.cxx | 46 +- .../Core/TestKernel/test/itkGoogleTest.cxx | 8 +- .../itkRandomImageSourceAttributesTest.cxx | 34 +- .../itkTestingComparisonImageFilterGTest.cxx | 8 +- ...TestingStretchIntensityImageFilterTest.cxx | 6 +- .../Transform/include/itkAffineTransform.h | 2 +- .../Transform/include/itkAffineTransform.hxx | 6 +- .../itkAzimuthElevationToCartesianTransform.h | 14 +- ...tkAzimuthElevationToCartesianTransform.hxx | 12 +- .../include/itkBSplineBaseTransform.h | 8 +- .../include/itkBSplineBaseTransform.hxx | 20 +- .../include/itkBSplineDeformableTransform.h | 22 +- .../include/itkBSplineDeformableTransform.hxx | 20 +- .../Transform/include/itkBSplineTransform.h | 14 +- .../Transform/include/itkBSplineTransform.hxx | 28 +- .../include/itkBSplineTransformInitializer.h | 4 +- .../itkBSplineTransformInitializer.hxx | 8 +- .../include/itkCenteredAffineTransform.hxx | 2 +- .../include/itkCenteredEuler3DTransform.hxx | 2 +- .../itkCenteredSimilarity2DTransform.hxx | 6 +- .../itkComposeScaleSkewVersor3DTransform.h | 2 +- .../itkComposeScaleSkewVersor3DTransform.hxx | 6 +- .../Transform/include/itkCompositeTransform.h | 16 +- .../include/itkCompositeTransform.hxx | 50 +- ...ticBodyReciprocalSplineKernelTransform.hxx | 2 +- .../itkElasticBodySplineKernelTransform.hxx | 2 +- .../Transform/include/itkEuler3DTransform.h | 2 +- .../Transform/include/itkEuler3DTransform.hxx | 16 +- .../itkFixedCenterOfRotationAffineTransform.h | 2 +- ...tkFixedCenterOfRotationAffineTransform.hxx | 2 +- .../Transform/include/itkKernelTransform.hxx | 26 +- .../include/itkMatrixOffsetTransformBase.h | 14 +- .../include/itkMatrixOffsetTransformBase.hxx | 12 +- .../Transform/include/itkMultiTransform.h | 2 +- .../Transform/include/itkMultiTransform.hxx | 2 +- .../include/itkQuaternionRigidTransform.h | 2 +- .../include/itkQuaternionRigidTransform.hxx | 4 +- .../Transform/include/itkRigid2DTransform.hxx | 6 +- .../itkRigid3DPerspectiveTransform.hxx | 4 +- .../Transform/include/itkRigid3DTransform.h | 4 +- .../Transform/include/itkRigid3DTransform.hxx | 6 +- .../include/itkScalableAffineTransform.h | 4 +- .../include/itkScalableAffineTransform.hxx | 4 +- .../include/itkScaleLogarithmicTransform.hxx | 2 +- .../include/itkScaleSkewVersor3DTransform.h | 2 +- .../include/itkScaleSkewVersor3DTransform.hxx | 4 +- .../Transform/include/itkScaleTransform.hxx | 6 +- .../include/itkScaleVersor3DTransform.h | 2 +- .../include/itkScaleVersor3DTransform.hxx | 4 +- .../include/itkSimilarity2DTransform.hxx | 4 +- .../include/itkSimilarity3DTransform.h | 2 +- .../include/itkSimilarity3DTransform.hxx | 2 +- ...tkThinPlateR2LogRSplineKernelTransform.hxx | 6 +- .../itkThinPlateSplineKernelTransform.hxx | 6 +- Modules/Core/Transform/include/itkTransform.h | 12 +- .../Core/Transform/include/itkTransform.hxx | 30 +- .../Core/Transform/include/itkTransformBase.h | 2 +- .../include/itkTranslationTransform.h | 2 +- .../include/itkVersorRigid3DTransform.h | 2 +- .../include/itkVersorRigid3DTransform.hxx | 6 +- .../Transform/include/itkVersorTransform.h | 2 +- .../Transform/include/itkVersorTransform.hxx | 2 +- .../itkVolumeSplineKernelTransform.hxx | 6 +- .../Transform/test/itkAffineTransformTest.cxx | 18 +- ...imuthElevationToCartesianTransformTest.cxx | 2 +- .../itkBSplineDeformableTransformTest.cxx | 32 +- .../itkBSplineDeformableTransformTest2.cxx | 12 +- .../itkBSplineDeformableTransformTest3.cxx | 12 +- .../test/itkBSplineTransformGTest.cxx | 6 +- .../itkBSplineTransformInitializerTest1.cxx | 12 +- .../itkBSplineTransformInitializerTest2.cxx | 2 +- .../test/itkBSplineTransformTest.cxx | 24 +- .../test/itkBSplineTransformTest2.cxx | 12 +- .../test/itkBSplineTransformTest3.cxx | 12 +- .../test/itkCenteredAffineTransformTest.cxx | 6 +- .../test/itkCenteredEuler3DTransformTest.cxx | 14 +- .../test/itkCenteredRigid2DTransformTest.cxx | 14 +- ...kComposeScaleSkewVersor3DTransformTest.cxx | 18 +- .../test/itkCompositeTransformTest.cxx | 8 +- .../test/itkEuler2DTransformTest.cxx | 12 +- .../test/itkEuler3DTransformGTest.cxx | 4 +- .../test/itkEuler3DTransformTest.cxx | 16 +- ...xedCenterOfRotationAffineTransformTest.cxx | 8 +- .../test/itkIdentityTransformTest.cxx | 4 +- .../itkMatrixOffsetTransformBaseGTest.cxx | 2 +- .../Transform/test/itkMultiTransformTest.cxx | 14 +- .../test/itkQuaternionRigidTransformTest.cxx | 48 +- .../test/itkRigid2DTransformTest.cxx | 34 +- .../itkRigid3DPerspectiveTransformTest.cxx | 20 +- .../test/itkRigid3DTransformTest.cxx | 38 +- .../test/itkScaleLogarithmicTransformTest.cxx | 18 +- .../itkScaleSkewVersor3DTransformTest.cxx | 14 +- .../Transform/test/itkScaleTransformTest.cxx | 18 +- .../test/itkScaleVersor3DTransformTest.cxx | 14 +- .../test/itkSimilarity2DTransformTest.cxx | 14 +- .../test/itkSimilarity3DTransformTest.cxx | 16 +- .../test/itkSplineKernelTransformTest.cxx | 8 +- .../Transform/test/itkTransformCloneTest.cxx | 4 +- .../itkTransformGeometryImageFilterTest.cxx | 8 +- .../test/itkTransformsSetParametersTest.cxx | 2 +- .../test/itkVersorRigid3DTransformTest.cxx | 16 +- .../Transform/test/itkVersorTransformTest.cxx | 16 +- .../include/itkAnisotropicDiffusionFunction.h | 4 +- .../itkAnisotropicDiffusionImageFilter.h | 6 +- ...kCurvatureNDAnisotropicDiffusionFunction.h | 4 +- ...urvatureNDAnisotropicDiffusionFunction.hxx | 4 +- ...tkGradientNDAnisotropicDiffusionFunction.h | 4 +- .../itkScalarAnisotropicDiffusionFunction.hxx | 18 +- .../itkVectorAnisotropicDiffusionFunction.hxx | 8 +- ...rCurvatureNDAnisotropicDiffusionFunction.h | 4 +- ...orGradientNDAnisotropicDiffusionFunction.h | 4 +- ...ntAnisotropicDiffusionImageFilterTest2.cxx | 4 +- .../itkMinMaxCurvatureFlowImageFilterTest.cxx | 38 +- .../include/itkAntiAliasBinaryImageFilter.h | 6 +- .../include/itkAntiAliasBinaryImageFilter.hxx | 8 +- .../itkAntiAliasBinaryImageFilterTest.cxx | 6 +- .../include/itkMRASlabIdentifier.h | 6 +- .../include/itkMRASlabIdentifier.hxx | 16 +- .../include/itkMRIBiasFieldCorrectionFilter.h | 4 +- .../itkMRIBiasFieldCorrectionFilter.hxx | 34 +- .../itkN4BiasFieldCorrectionImageFilter.h | 18 +- .../itkN4BiasFieldCorrectionImageFilter.hxx | 54 +- .../test/itkCompositeValleyFunctionTest.cxx | 2 +- .../itkMRIBiasFieldCorrectionFilterTest.cxx | 38 +- ...tkN4BiasFieldCorrectionImageFilterTest.cxx | 8 +- .../include/itkBinaryDilateImageFilter.hxx | 18 +- .../include/itkBinaryErodeImageFilter.hxx | 20 +- ...kBinaryMorphologicalClosingImageFilter.hxx | 2 +- ...kBinaryMorphologicalOpeningImageFilter.hxx | 2 +- .../itkBinaryMorphologyImageFilter.hxx | 4 +- .../include/itkBinaryPruningImageFilter.hxx | 4 +- .../include/itkBinaryThinningImageFilter.hxx | 6 +- .../itkDilateObjectMorphologyImageFilter.hxx | 6 +- .../itkErodeObjectMorphologyImageFilter.hxx | 6 +- .../itkObjectMorphologyImageFilter.hxx | 8 +- ...ClosingByReconstructionImageFilterTest.cxx | 2 +- .../test/itkBinaryDilateImageFilterTest.cxx | 2 +- .../test/itkBinaryErodeImageFilterTest.cxx | 2 +- ...aryMorphologicalClosingImageFilterTest.cxx | 2 +- ...aryMorphologicalOpeningImageFilterTest.cxx | 2 +- ...OpeningByReconstructionImageFilterTest.cxx | 2 +- ...tkErodeObjectMorphologyImageFilterTest.cxx | 4 +- .../Colormap/include/itkColormapFunction.h | 4 +- .../include/itkCustomColormapFunction.hxx | 4 +- .../itkScalarToRGBColormapImageFilter.hxx | 4 +- .../test/itkCustomColormapFunctionTest.cxx | 2 +- .../itkScalarToRGBColormapImageFilterTest.cxx | 4 +- .../include/itkConvolutionImageFilter.hxx | 18 +- .../include/itkConvolutionImageFilterBase.h | 2 +- .../include/itkConvolutionImageFilterBase.hxx | 2 +- .../include/itkFFTConvolutionImageFilter.h | 36 +- .../include/itkFFTConvolutionImageFilter.hxx | 78 +-- ...kedFFTNormalizedCorrelationImageFilter.hxx | 20 +- .../itkNormalizedCorrelationImageFilter.hxx | 30 +- ...onvolutionImageFilterDeltaFunctionTest.cxx | 2 +- ...itkConvolutionImageFilterStreamingTest.cxx | 2 +- ...itkConvolutionImageFilterSubregionTest.cxx | 8 +- .../test/itkConvolutionImageFilterTest.cxx | 6 +- .../test/itkConvolutionImageFilterTestInt.cxx | 2 +- ...onvolutionImageFilterDeltaFunctionTest.cxx | 2 +- .../test/itkFFTConvolutionImageFilterTest.cxx | 8 +- ...FTNormalizedCorrelationImageFilterTest.cxx | 8 +- ...FTNormalizedCorrelationImageFilterTest.cxx | 12 +- ...tkNormalizedCorrelationImageFilterTest.cxx | 2 +- .../itkBinaryMinMaxCurvatureFlowFunction.h | 4 +- .../itkBinaryMinMaxCurvatureFlowFunction.hxx | 6 +- .../include/itkCurvatureFlowFunction.h | 4 +- .../include/itkCurvatureFlowFunction.hxx | 14 +- .../include/itkCurvatureFlowImageFilter.hxx | 2 +- .../include/itkMinMaxCurvatureFlowFunction.h | 4 +- .../itkMinMaxCurvatureFlowFunction.hxx | 28 +- ...naryMinMaxCurvatureFlowImageFilterTest.cxx | 40 +- .../test/itkCurvatureFlowTest.cxx | 10 +- .../itkInverseDeconvolutionImageFilter.h | 2 +- .../itkInverseDeconvolutionImageFilter.hxx | 2 +- .../itkIterativeDeconvolutionImageFilter.hxx | 10 +- .../itkLandweberDeconvolutionImageFilter.h | 2 +- .../itkLandweberDeconvolutionImageFilter.hxx | 10 +- ...ndLeastSquaresDeconvolutionImageFilter.hxx | 28 +- ...ectedIterativeDeconvolutionImageFilter.hxx | 6 +- ...tkRichardsonLucyDeconvolutionImageFilter.h | 14 +- ...RichardsonLucyDeconvolutionImageFilter.hxx | 10 +- .../itkTikhonovDeconvolutionImageFilter.h | 2 +- .../itkTikhonovDeconvolutionImageFilter.hxx | 2 +- .../itkWienerDeconvolutionImageFilter.hxx | 2 +- .../itkPatchBasedDenoisingBaseImageFilter.h | 12 +- .../itkPatchBasedDenoisingBaseImageFilter.hxx | 2 +- .../itkPatchBasedDenoisingImageFilter.h | 132 ++-- .../itkPatchBasedDenoisingImageFilter.hxx | 152 ++--- .../itkPatchBasedDenoisingImageFilterTest.cxx | 28 +- ...usionTensor3DReconstructionImageFilter.hxx | 12 +- ...nTensor3DReconstructionImageFilterTest.cxx | 18 +- .../test/itkDiffusionTensor3DTest.cxx | 6 +- ...plineExponentialDiffeomorphicTransform.hxx | 8 +- ...othingOnUpdateDisplacementFieldTransform.h | 6 +- ...hingOnUpdateDisplacementFieldTransform.hxx | 6 +- ...tkComposeDisplacementFieldsImageFilter.hxx | 4 +- .../itkConstantVelocityFieldTransform.hxx | 14 +- ...lacementFieldJacobianDeterminantFilter.hxx | 10 +- ...itkDisplacementFieldToBSplineImageFilter.h | 16 +- ...kDisplacementFieldToBSplineImageFilter.hxx | 16 +- .../include/itkDisplacementFieldTransform.h | 14 +- .../include/itkDisplacementFieldTransform.hxx | 34 +- ...kExponentialDisplacementFieldImageFilter.h | 8 +- ...ssianExponentialDiffeomorphicTransform.hxx | 16 +- ...hingOnUpdateDisplacementFieldTransform.hxx | 14 +- ...pdateTimeVaryingVelocityFieldTransform.hxx | 14 +- .../itkInverseDisplacementFieldImageFilter.h | 4 +- ...itkInverseDisplacementFieldImageFilter.hxx | 2 +- .../itkInvertDisplacementFieldImageFilter.h | 14 +- .../itkInvertDisplacementFieldImageFilter.hxx | 18 +- ...iveInverseDisplacementFieldImageFilter.hxx | 20 +- .../itkLandmarkDisplacementFieldSource.h | 4 +- ...TimeVaryingBSplineVelocityFieldTransform.h | 8 +- ...meVaryingBSplineVelocityFieldTransform.hxx | 4 +- ...ingVelocityFieldIntegrationImageFilter.hxx | 22 +- .../itkTransformToDisplacementFieldFilter.h | 12 +- .../itkTransformToDisplacementFieldFilter.hxx | 6 +- .../include/itkVelocityFieldTransform.hxx | 14 +- ...eExponentialDiffeomorphicTransformTest.cxx | 8 +- ...OnUpdateDisplacementFieldTransformTest.cxx | 12 +- ...mposeDisplacementFieldsImageFilterTest.cxx | 6 +- ...mentFieldJacobianDeterminantFilterTest.cxx | 2 +- ...placementFieldToBSplineImageFilterTest.cxx | 6 +- ...itkDisplacementFieldTransformCloneTest.cxx | 8 +- .../itkDisplacementFieldTransformTest.cxx | 24 +- ...entialDisplacementFieldImageFilterTest.cxx | 2 +- ...nExponentialDiffeomorphicTransformTest.cxx | 10 +- ...OnUpdateDisplacementFieldTransformTest.cxx | 10 +- ...nverseDisplacementFieldImageFilterTest.cxx | 2 +- ...InvertDisplacementFieldImageFilterTest.cxx | 10 +- ...itkLandmarkDisplacementFieldSourceTest.cxx | 2 +- ...ryingBSplineVelocityFieldTransformTest.cxx | 6 +- ...elocityFieldIntegrationImageFilterTest.cxx | 4 +- ...TransformToDisplacementFieldFilterTest.cxx | 12 +- ...ransformToDisplacementFieldFilterTest1.cxx | 16 +- ...pproximateSignedDistanceMapImageFilter.hxx | 2 +- ...tkContourDirectedMeanDistanceImageFilter.h | 6 +- ...ContourDirectedMeanDistanceImageFilter.hxx | 4 +- .../itkContourMeanDistanceImageFilter.h | 2 +- .../itkDanielssonDistanceMapImageFilter.hxx | 28 +- .../itkDirectedHausdorffDistanceImageFilter.h | 4 +- ...tkDirectedHausdorffDistanceImageFilter.hxx | 10 +- .../itkFastChamferDistanceImageFilter.hxx | 4 +- .../include/itkHausdorffDistanceImageFilter.h | 2 +- .../itkIsoContourDistanceImageFilter.h | 12 +- .../itkIsoContourDistanceImageFilter.hxx | 42 +- .../itkReflectiveImageRegionConstIterator.h | 2 +- ...SignedDanielssonDistanceMapImageFilter.hxx | 2 +- .../itkSignedMaurerDistanceMapImageFilter.h | 4 +- .../itkSignedMaurerDistanceMapImageFilter.hxx | 34 +- ...ximateSignedDistanceMapImageFilterTest.cxx | 8 +- ...ourDirectedMeanDistanceImageFilterTest.cxx | 6 +- .../itkContourMeanDistanceImageFilterTest.cxx | 6 +- ...tkDanielssonDistanceMapImageFilterTest.cxx | 14 +- ...ectedHausdorffDistanceImageFilterTest1.cxx | 4 +- .../itkFastChamferDistanceImageFilterTest.cxx | 8 +- .../itkHausdorffDistanceImageFilterTest.cxx | 2 +- .../itkIsoContourDistanceImageFilterTest.cxx | 8 +- .../itkReflectiveImageRegionIteratorTest.cxx | 6 +- ...DanielssonDistanceMapImageFilterTest11.cxx | 4 +- ...gnedMaurerDistanceMapImageFilterTest11.cxx | 4 +- .../itkComplexToComplex1DFFTImageFilter.hxx | 8 +- .../FFT/include/itkFFTPadImageFilter.hxx | 6 +- Modules/Filtering/FFT/include/itkFFTWCommon.h | 292 ++++----- .../FFT/include/itkFFTWCommonExtended.h | 148 ++--- .../itkFFTWComplexToComplex1DFFTImageFilter.h | 6 +- ...tkFFTWComplexToComplex1DFFTImageFilter.hxx | 10 +- .../itkFFTWComplexToComplexFFTImageFilter.hxx | 10 +- .../include/itkFFTWForward1DFFTImageFilter.h | 6 +- .../itkFFTWForward1DFFTImageFilter.hxx | 8 +- .../include/itkFFTWForwardFFTImageFilter.hxx | 8 +- .../FFT/include/itkFFTWGlobalConfiguration.h | 10 +- ...lfHermitianToRealInverseFFTImageFilter.hxx | 10 +- .../include/itkFFTWInverse1DFFTImageFilter.h | 6 +- .../itkFFTWInverse1DFFTImageFilter.hxx | 10 +- .../include/itkFFTWInverseFFTImageFilter.hxx | 8 +- ...alToHalfHermitianForwardFFTImageFilter.hxx | 12 +- .../include/itkForward1DFFTImageFilter.hxx | 8 +- .../itkFullToHalfHermitianImageFilter.hxx | 8 +- ...lfHermitianToRealInverseFFTImageFilter.hxx | 6 +- .../itkHalfToFullHermitianImageFilter.hxx | 24 +- .../include/itkInverse1DFFTImageFilter.hxx | 8 +- ...alToHalfHermitianForwardFFTImageFilter.hxx | 6 +- ...itkVnlComplexToComplex1DFFTImageFilter.hxx | 8 +- .../itkVnlComplexToComplexFFTImageFilter.hxx | 4 +- .../include/itkVnlForward1DFFTImageFilter.hxx | 8 +- .../include/itkVnlForwardFFTImageFilter.hxx | 6 +- ...lfHermitianToRealInverseFFTImageFilter.hxx | 10 +- .../include/itkVnlInverse1DFFTImageFilter.hxx | 8 +- .../include/itkVnlInverseFFTImageFilter.hxx | 2 +- ...alToHalfHermitianForwardFFTImageFilter.hxx | 6 +- .../FFT/src/itkFFTWGlobalConfiguration.cxx | 14 +- .../itkComplexToComplexFFTImageFilterTest.cxx | 4 +- .../FFT/test/itkFFTPadImageFilterTest.cxx | 4 +- Modules/Filtering/FFT/test/itkFFTTest.h | 26 +- ...FFTWComplexToComplexFFTImageFilterTest.cxx | 4 +- .../Filtering/FFT/test/itkFFTWD_FFTTest.cxx | 2 +- .../FFT/test/itkFFTWD_RealFFTTest.cxx | 2 +- .../Filtering/FFT/test/itkFFTWF_FFTTest.cxx | 6 +- .../FFT/test/itkFFTWF_RealFFTTest.cxx | 6 +- .../FFT/test/itkForwardInverseFFTTest.h | 2 +- .../itkFullToHalfHermitianImageFilterTest.cxx | 2 +- .../itkHalfToFullHermitianImageFilterTest.cxx | 4 +- Modules/Filtering/FFT/test/itkRealFFTTest.h | 22 +- ...kVnlComplexToComplexFFTImageFilterTest.cxx | 4 +- Modules/Filtering/FFT/test/itkVnlFFTTest.cxx | 2 +- .../FFT/test/itkVnlFFTWD_FFTTest.cxx | 2 +- .../FFT/test/itkVnlFFTWD_RealFFTTest.cxx | 2 +- .../FFT/test/itkVnlFFTWF_FFTTest.cxx | 6 +- .../FFT/test/itkVnlFFTWF_RealFFTTest.cxx | 6 +- .../include/itkFastMarchingBase.h | 2 +- .../itkFastMarchingExtensionImageFilter.hxx | 16 +- ...tkFastMarchingExtensionImageFilterBase.hxx | 16 +- .../include/itkFastMarchingImageFilter.h | 16 +- .../include/itkFastMarchingImageFilter.hxx | 22 +- .../include/itkFastMarchingImageFilterBase.h | 14 +- .../itkFastMarchingImageFilterBase.hxx | 26 +- ...archingImageToNodePairContainerAdaptor.hxx | 4 +- .../itkFastMarchingQuadEdgeMeshFilterBase.h | 38 +- .../itkFastMarchingQuadEdgeMeshFilterBase.hxx | 84 +-- ...chingReachedTargetNodesStoppingCriterion.h | 14 +- ...itkFastMarchingUpwindGradientImageFilter.h | 6 +- ...kFastMarchingUpwindGradientImageFilter.hxx | 16 +- ...tMarchingUpwindGradientImageFilterBase.hxx | 10 +- .../test/itkFastMarchingBaseTest.cxx | 4 +- ...tkFastMarchingExtensionImageFilterTest.cxx | 12 +- .../itkFastMarchingImageFilterRealTest1.cxx | 4 +- .../itkFastMarchingImageFilterRealTest2.cxx | 8 +- ...mageFilterRealWithNumberOfElementsTest.cxx | 2 +- ...FastMarchingQuadEdgeMeshFilterBaseTest.cxx | 2 +- ...astMarchingQuadEdgeMeshFilterBaseTest2.cxx | 4 +- ...astMarchingQuadEdgeMeshFilterBaseTest3.cxx | 6 +- ...astMarchingQuadEdgeMeshFilterBaseTest4.cxx | 8 +- ...EdgeMeshFilterWithNumberOfElementsTest.cxx | 2 +- .../FastMarching/test/itkFastMarchingTest.cxx | 10 +- .../test/itkFastMarchingTest2.cxx | 10 +- .../itkFastMarchingUpwindGradientBaseTest.cxx | 10 +- .../itkFastMarchingUpwindGradientTest.cxx | 8 +- .../itkGPUAnisotropicDiffusionFunction.h | 6 +- ...GradientNDAnisotropicDiffusionFunction.hxx | 8 +- ...kGPUScalarAnisotropicDiffusionFunction.hxx | 6 +- ...entAnisotropicDiffusionImageFilterTest.cxx | 6 +- .../itkGPUNeighborhoodOperatorImageFilter.hxx | 4 +- ...GPUNeighborhoodOperatorImageFilterTest.cxx | 4 +- .../itkGPUDiscreteGaussianImageFilter.h | 6 +- .../include/itkGPUMeanImageFilter.hxx | 2 +- .../itkGPUDiscreteGaussianImageFilterTest.cxx | 4 +- .../itkGPUBinaryThresholdImageFilter.h | 4 +- .../itkGPUBinaryThresholdImageFilter.hxx | 2 +- .../itkGPUBinaryThresholdImageFilterTest.cxx | 10 +- .../test/itkGPUImageFilterTest.cxx | 4 +- .../itkAbsoluteValueDifferenceImageFilter.h | 4 +- .../include/itkCheckerBoardImageFilter.hxx | 6 +- .../include/itkSTAPLEImageFilter.h | 4 +- .../include/itkSTAPLEImageFilter.hxx | 4 +- .../include/itkSimilarityIndexImageFilter.hxx | 2 +- .../include/itkSquaredDifferenceImageFilter.h | 4 +- .../test/itkSTAPLEImageFilterTest.cxx | 4 +- .../itkSimilarityIndexImageFilterTest.cxx | 6 +- .../include/itkJoinSeriesImageFilter.hxx | 18 +- .../test/itkImageToVectorImageFilterTest.cxx | 2 +- .../test/itkJoinImageFilterTest.cxx | 10 +- .../test/itkJoinSeriesImageFilterTest.cxx | 20 +- .../include/itkBilateralImageFilter.h | 10 +- .../include/itkBilateralImageFilter.hxx | 16 +- .../itkCannyEdgeDetectionImageFilter.h | 2 +- .../itkCannyEdgeDetectionImageFilter.hxx | 12 +- ...kDiscreteGaussianDerivativeImageFilter.hxx | 4 +- .../itkGradientVectorFlowImageFilter.h | 2 +- .../itkGradientVectorFlowImageFilter.hxx | 6 +- ...essian3DToVesselnessMeasureImageFilter.hxx | 2 +- .../itkHessianRecursiveGaussianImageFilter.h | 6 +- ...itkHessianRecursiveGaussianImageFilter.hxx | 2 +- ...itkHessianToObjectnessMeasureImageFilter.h | 10 +- ...kHessianToObjectnessMeasureImageFilter.hxx | 4 +- .../itkHoughTransform2DCirclesImageFilter.h | 12 +- .../itkHoughTransform2DCirclesImageFilter.hxx | 8 +- .../itkHoughTransform2DLinesImageFilter.h | 10 +- .../itkHoughTransform2DLinesImageFilter.hxx | 16 +- ...itkLaplacianRecursiveGaussianImageFilter.h | 2 +- .../itkLaplacianSharpeningImageFilter.hxx | 6 +- .../itkMaskFeaturePointSelectionFilter.h | 8 +- .../itkMaskFeaturePointSelectionFilter.hxx | 22 +- ...MultiScaleHessianBasedMeasureImageFilter.h | 2 +- ...ltiScaleHessianBasedMeasureImageFilter.hxx | 4 +- .../itkSimpleContourExtractorImageFilter.h | 4 +- .../itkSimpleContourExtractorImageFilter.hxx | 6 +- .../itkSobelEdgeDetectionImageFilter.hxx | 8 +- .../include/itkUnsharpMaskImageFilter.h | 6 +- .../include/itkZeroCrossingImageFilter.hxx | 12 +- .../test/itkBilateralImageFilterTest.cxx | 4 +- .../test/itkBilateralImageFilterTest2.cxx | 2 +- ...creteGaussianDerivativeImageFilterTest.cxx | 2 +- ...nRecursiveGaussianFilterScaleSpaceTest.cxx | 4 +- .../itkHoughTransform2DCirclesImageTest.cxx | 18 +- .../itkHoughTransform2DLinesImageTest.cxx | 6 +- ...lacianRecursiveGaussianImageFilterTest.cxx | 4 +- ...itkMaskFeaturePointSelectionFilterTest.cxx | 2 +- ...kSimpleContourExtractorImageFilterTest.cxx | 4 +- .../include/itkBinaryFunctorImageFilter.hxx | 12 +- .../include/itkBinaryGeneratorImageFilter.hxx | 16 +- .../include/itkBoxImageFilter.hxx | 2 +- .../include/itkCastImageFilter.hxx | 8 +- .../itkMaskNeighborhoodOperatorImageFilter.h | 2 +- ...itkMaskNeighborhoodOperatorImageFilter.hxx | 14 +- .../include/itkMovingHistogramImageFilter.h | 8 +- .../include/itkMovingHistogramImageFilter.hxx | 20 +- .../itkMovingHistogramImageFilterBase.h | 6 +- .../itkMovingHistogramImageFilterBase.hxx | 12 +- .../itkNeighborhoodOperatorImageFilter.hxx | 4 +- .../include/itkNoiseImageFilter.hxx | 6 +- .../itkNullImageToImageFilterDriver.hxx | 4 +- .../itkRecursiveSeparableImageFilter.h | 24 +- .../itkRecursiveSeparableImageFilter.hxx | 16 +- .../include/itkTernaryFunctorImageFilter.hxx | 2 +- .../itkTernaryGeneratorImageFilter.hxx | 14 +- .../include/itkUnaryGeneratorImageFilter.hxx | 8 +- ...kVectorNeighborhoodOperatorImageFilter.hxx | 4 +- .../test/itkCastImageFilterTest.cxx | 14 +- ...askNeighborhoodOperatorImageFilterTest.cxx | 8 +- .../include/itkFrequencyBandImageFilter.hxx | 8 +- ...TLayoutImageRegionConstIteratorWithIndex.h | 12 +- ...TLayoutImageRegionConstIteratorWithIndex.h | 14 +- ...equencyImageRegionConstIteratorWithIndex.h | 4 +- ...TLayoutImageRegionConstIteratorWithIndex.h | 10 +- .../include/itkUnaryFrequencyDomainFilter.hxx | 4 +- .../test/itkFrequencyBandImageFilterTest.cxx | 6 +- ...LayoutImageRegionIteratorWithIndexTest.cxx | 6 +- .../test/itkFrequencyIteratorsGTest.cxx | 12 +- .../itkLabelMapContourOverlayImageFilter.h | 12 +- .../itkLabelMapContourOverlayImageFilter.hxx | 12 +- .../include/itkLabelMapOverlayImageFilter.h | 2 +- .../include/itkLabelMapOverlayImageFilter.hxx | 10 +- .../include/itkLabelMapToRGBImageFilter.hxx | 6 +- .../include/itkLabelOverlayImageFilter.h | 4 +- .../include/itkLabelToRGBFunctor.h | 2 +- .../include/itkLabelToRGBImageFilter.h | 2 +- .../include/itkScalarToRGBPixelFunctor.h | 2 +- .../include/itkScalarToRGBPixelFunctor.hxx | 2 +- .../test/itkScalarToRGBPixelFunctorTest.cxx | 2 +- ...fferenceOfGaussiansGradientImageFilter.hxx | 4 +- .../include/itkGradientImageFilter.hxx | 6 +- .../itkGradientMagnitudeImageFilter.hxx | 8 +- ...entMagnitudeRecursiveGaussianImageFilter.h | 4 +- ...tMagnitudeRecursiveGaussianImageFilter.hxx | 2 +- .../itkGradientRecursiveGaussianImageFilter.h | 8 +- ...tkGradientRecursiveGaussianImageFilter.hxx | 10 +- .../itkVectorGradientMagnitudeImageFilter.h | 16 +- .../itkVectorGradientMagnitudeImageFilter.hxx | 14 +- .../itkDifferenceOfGaussiansGradientTest.cxx | 8 +- ...ntMagnitudeRecursiveGaussianFilterTest.cxx | 4 +- ...adientRecursiveGaussianFilterSpeedTest.cxx | 2 +- ...itkGradientRecursiveGaussianFilterTest.cxx | 2 +- ...tkGradientRecursiveGaussianFilterTest3.cxx | 38 +- ...ectorGradientMagnitudeImageFilterTest2.cxx | 2 +- ...tkBSplineCenteredResampleImageFilterBase.h | 12 +- ...BSplineCenteredResampleImageFilterBase.hxx | 12 +- .../itkBSplineControlPointImageFilter.h | 18 +- .../itkBSplineControlPointImageFilter.hxx | 36 +- .../itkBSplineControlPointImageFunction.h | 6 +- .../itkBSplineControlPointImageFunction.hxx | 16 +- .../itkBSplineDownsampleImageFilter.hxx | 20 +- .../itkBSplineResampleImageFilterBase.h | 12 +- .../itkBSplineResampleImageFilterBase.hxx | 30 +- ...SplineScatteredDataPointSetToImageFilter.h | 22 +- ...lineScatteredDataPointSetToImageFilter.hxx | 50 +- .../include/itkBSplineUpsampleImageFilter.hxx | 22 +- .../include/itkBinShrinkImageFilter.hxx | 26 +- .../include/itkChangeInformationImageFilter.h | 4 +- .../itkChangeInformationImageFilter.hxx | 20 +- .../itkCoxDeBoorBSplineKernelFunction.h | 2 +- .../itkCoxDeBoorBSplineKernelFunction.hxx | 14 +- .../ImageGrid/include/itkCropImageFilter.hxx | 4 +- .../include/itkCyclicShiftImageFilter.hxx | 2 +- .../ImageGrid/include/itkExpandImageFilter.h | 2 +- .../include/itkExpandImageFilter.hxx | 24 +- .../ImageGrid/include/itkFlipImageFilter.h | 2 +- .../ImageGrid/include/itkFlipImageFilter.hxx | 16 +- .../include/itkInterpolateImageFilter.hxx | 4 +- .../include/itkInterpolateImagePointsFilter.h | 4 +- .../itkInterpolateImagePointsFilter.hxx | 10 +- .../include/itkMirrorPadImageFilter.h | 72 +-- .../include/itkMirrorPadImageFilter.hxx | 126 ++-- .../ImageGrid/include/itkOrientImageFilter.h | 2 +- .../include/itkOrientImageFilter.hxx | 12 +- .../ImageGrid/include/itkPadImageFilter.hxx | 10 +- .../include/itkPadImageFilterBase.hxx | 8 +- .../ImageGrid/include/itkPasteImageFilter.h | 2 +- .../ImageGrid/include/itkPasteImageFilter.hxx | 8 +- .../include/itkPermuteAxesImageFilter.hxx | 26 +- .../itkRegionOfInterestImageFilter.hxx | 6 +- .../include/itkResampleImageFilter.h | 14 +- .../include/itkResampleImageFilter.hxx | 20 +- .../include/itkShrinkImageFilter.hxx | 34 +- .../include/itkSliceBySliceImageFilter.hxx | 10 +- .../ImageGrid/include/itkSliceImageFilter.hxx | 24 +- .../ImageGrid/include/itkTileImageFilter.h | 2 +- .../ImageGrid/include/itkTileImageFilter.hxx | 10 +- .../ImageGrid/include/itkWarpImageFilter.h | 14 +- .../ImageGrid/include/itkWarpImageFilter.hxx | 24 +- .../include/itkWarpVectorImageFilter.h | 6 +- .../include/itkWarpVectorImageFilter.hxx | 14 +- ...tkBSplineControlPointImageFunctionTest.cxx | 8 +- .../itkBSplineResampleImageFilterTest.cxx | 30 +- ...catteredDataPointSetToImageFilterTest2.cxx | 4 +- ...catteredDataPointSetToImageFilterTest3.cxx | 2 +- ...catteredDataPointSetToImageFilterTest4.cxx | 8 +- ...catteredDataPointSetToImageFilterTest5.cxx | 2 +- .../test/itkBasicArchitectureTest.cxx | 6 +- .../test/itkBinShrinkImageFilterTest1.cxx | 4 +- .../test/itkBinShrinkImageFilterTest2.cxx | 2 +- .../itkChangeInformationImageFilterTest.cxx | 6 +- .../test/itkConstantPadImageTest.cxx | 6 +- .../test/itkCropImageFilter3DTest.cxx | 10 +- .../ImageGrid/test/itkCropImageFilterTest.cxx | 4 +- .../ImageGrid/test/itkCyclicReferences.cxx | 8 +- .../test/itkCyclicShiftImageFilterTest.cxx | 8 +- .../test/itkExpandImageFilterTest.cxx | 12 +- .../test/itkExpandImageFilterTest2.cxx | 38 +- .../ImageGrid/test/itkFlipImageFilterTest.cxx | 10 +- .../itkInterpolateImagePointsFilterTest.cxx | 24 +- .../ImageGrid/test/itkMirrorPadImageTest.cxx | 4 +- .../test/itkOrientImageFilterTest.cxx | 6 +- .../test/itkOrientImageFilterTest2.cxx | 12 +- .../ImageGrid/test/itkPadImageFilterTest.cxx | 10 +- .../test/itkPasteImageFilterTest.cxx | 4 +- .../test/itkPermuteAxesImageFilterTest.cxx | 6 +- .../test/itkPushPopTileImageFilterTest.cxx | 2 +- .../test/itkResampleImageFilterGTest.cxx | 4 +- .../ImageGrid/test/itkResampleImageTest.cxx | 16 +- .../ImageGrid/test/itkResampleImageTest2.cxx | 2 +- .../ImageGrid/test/itkResampleImageTest3.cxx | 2 +- .../ImageGrid/test/itkResampleImageTest4.cxx | 8 +- .../ImageGrid/test/itkResampleImageTest5.cxx | 8 +- .../ImageGrid/test/itkResampleImageTest6.cxx | 10 +- .../ImageGrid/test/itkResampleImageTest7.cxx | 6 +- .../ImageGrid/test/itkResampleImageTest8.cxx | 20 +- ...asedArray3DSpecialCoordinatesImageTest.cxx | 8 +- .../test/itkShrinkImageStreamingTest.cxx | 4 +- .../ImageGrid/test/itkShrinkImageTest.cxx | 6 +- .../test/itkSliceBySliceImageFilterTest.cxx | 6 +- .../test/itkSliceImageFilterTest.cxx | 12 +- .../ImageGrid/test/itkTileImageFilterTest.cxx | 6 +- .../ImageGrid/test/itkWarpImageFilterTest.cxx | 12 +- .../test/itkWarpImageFilterTest2.cxx | 16 +- .../test/itkWarpVectorImageFilterTest.cxx | 14 +- .../ImageGrid/test/itkWrapPadImageTest.cxx | 28 +- .../itkZeroFluxNeumannPadImageFilterTest.cxx | 24 +- .../include/itkArithmeticOpsFunctors.h | 2 +- .../itkConstrainedValueAdditionImageFilter.h | 4 +- ...itkConstrainedValueDifferenceImageFilter.h | 4 +- ...iscreteGaussianDerivativeImageFunction.hxx | 8 +- ...GradientMagnitudeGaussianImageFunction.hxx | 8 +- ...tkDiscreteHessianGaussianImageFunction.hxx | 10 +- .../include/itkHistogramMatchingImageFilter.h | 14 +- .../itkHistogramMatchingImageFilter.hxx | 22 +- .../itkIntensityWindowingImageFilter.h | 10 +- .../include/itkMaskImageFilter.h | 4 +- .../include/itkMaskNegatedImageFilter.h | 4 +- .../include/itkNaryFunctorImageFilter.hxx | 2 +- .../itkNormalizeToConstantImageFilter.hxx | 2 +- .../include/itkPolylineMask2DImageFilter.hxx | 8 +- .../include/itkPolylineMaskImageFilter.hxx | 16 +- .../include/itkRescaleIntensityImageFilter.h | 6 +- .../include/itkShiftScaleImageFilter.hxx | 4 +- .../include/itkSigmoidImageFilter.h | 4 +- .../itkSymmetricEigenAnalysisImageFilter.h | 2 +- .../include/itkVectorExpandImageFilter.h | 2 +- .../include/itkVectorExpandImageFilter.hxx | 28 +- .../itkVectorIndexSelectionCastImageFilter.h | 2 +- .../itkVectorRescaleIntensityImageFilter.h | 2 +- .../test/itkAbsImageFilterAndAdaptorTest.cxx | 2 +- .../test/itkAcosImageFilterAndAdaptorTest.cxx | 2 +- .../test/itkArithmeticOpsFunctorsTest.cxx | 8 +- .../test/itkAsinImageFilterAndAdaptorTest.cxx | 2 +- .../test/itkAtan2ImageFilterTest.cxx | 4 +- .../test/itkAtanImageFilterAndAdaptorTest.cxx | 2 +- .../test/itkBitwiseOpsFunctorsTest.cxx | 2 +- .../test/itkClampImageFilterTest.cxx | 18 +- ...ComplexToImaginaryFilterAndAdaptorTest.cxx | 2 +- ...tkComplexToModulusFilterAndAdaptorTest.cxx | 2 +- .../itkComplexToPhaseFilterAndAdaptorTest.cxx | 2 +- .../itkComplexToRealFilterAndAdaptorTest.cxx | 2 +- .../test/itkCosImageFilterAndAdaptorTest.cxx | 2 +- ...eteGaussianDerivativeImageFunctionTest.cxx | 8 +- ...ientMagnitudeGaussianImageFunctionTest.cxx | 10 +- ...screteHessianGaussianImageFunctionTest.cxx | 12 +- .../test/itkDivideImageFilterTest.cxx | 2 +- .../test/itkDivideImageFilterTest2.cxx | 2 +- .../itkDivideOrZeroOutImageFilterTest.cxx | 2 +- .../test/itkEdgePotentialImageFilterTest.cxx | 4 +- .../ImageIntensity/test/itkEqualTest.cxx | 2 +- .../test/itkExpImageFilterAndAdaptorTest.cxx | 2 +- ...tkExpNegativeImageFilterAndAdaptorTest.cxx | 2 +- .../test/itkGreaterEqualTest.cxx | 2 +- .../ImageIntensity/test/itkGreaterTest.cxx | 2 +- .../itkHistogramMatchingImageFilterTest.cxx | 10 +- .../itkIntensityWindowingImageFilterTest.cxx | 2 +- .../ImageIntensity/test/itkLessEqualTest.cxx | 2 +- .../ImageIntensity/test/itkLessTest.cxx | 2 +- .../itkLog10ImageFilterAndAdaptorTest.cxx | 2 +- .../test/itkLogImageFilterAndAdaptorTest.cxx | 2 +- .../ImageIntensity/test/itkLogicTestSupport.h | 18 +- .../test/itkMaskImageFilterTest.cxx | 4 +- .../test/itkMaskNegatedImageFilterTest.cxx | 2 +- ...itkMatrixIndexSelectionImageFilterTest.cxx | 2 +- .../test/itkMultiplyImageFilterTest.cxx | 2 +- .../test/itkNaryAddImageFilterTest.cxx | 14 +- .../test/itkNormalizeImageFilterTest.cxx | 4 +- .../ImageIntensity/test/itkNotEqualTest.cxx | 2 +- .../test/itkNotImageFilterTest.cxx | 2 +- ...GBToLuminanceImageFilterAndAdaptorTest.cxx | 4 +- .../itkRGBToVectorAdaptImageFilterTest.cxx | 2 +- .../test/itkRoundImageFilterTest.cxx | 2 +- .../test/itkShiftScaleImageFilterTest.cxx | 8 +- .../test/itkSigmoidImageFilterTest.cxx | 8 +- .../test/itkSinImageFilterAndAdaptorTest.cxx | 2 +- .../test/itkSqrtImageFilterAndAdaptorTest.cxx | 2 +- .../test/itkSquareImageFilterTest.cxx | 8 +- ...kSymmetricEigenAnalysisImageFilterTest.cxx | 2 +- .../test/itkTanImageFilterAndAdaptorTest.cxx | 2 +- .../itkTernaryOperatorImageFilterTest.cxx | 8 +- .../test/itkVectorExpandImageFilterTest.cxx | 16 +- ...kVectorRescaleIntensityImageFilterTest.cxx | 6 +- .../include/itkBinaryContourImageFilter.h | 2 +- .../include/itkBinaryContourImageFilter.hxx | 12 +- .../include/itkChangeLabelImageFilter.hxx | 2 +- .../include/itkLabelContourImageFilter.hxx | 10 +- .../include/itkScanlineFilterCommon.h | 52 +- .../test/itkChangeLabelImageFilterTest.cxx | 8 +- .../itkAdditiveGaussianNoiseImageFilter.hxx | 6 +- .../itkSaltAndPepperNoiseImageFilter.h | 2 +- .../itkSaltAndPepperNoiseImageFilter.hxx | 6 +- .../include/itkShotNoiseImageFilter.hxx | 10 +- .../include/itkSpeckleNoiseImageFilter.hxx | 8 +- .../itkPeakSignalToNoiseRatioCalculator.hxx | 2 +- .../include/itkGenerateImageSource.h | 10 +- .../include/itkGridImageSource.hxx | 2 +- .../include/itkPhysicalPointImageSource.hxx | 4 +- .../test/itkGaborKernelFunctionTest.cxx | 4 +- .../test/itkGaussianImageSourceTest.cxx | 10 +- .../test/itkPhysicalPointImageSourceTest.cxx | 14 +- .../include/itkAccumulateImageFilter.h | 2 +- .../include/itkAccumulateImageFilter.hxx | 36 +- .../itkAdaptiveEqualizationHistogram.h | 8 +- .../include/itkImageMomentsCalculator.h | 20 +- .../include/itkImageMomentsCalculator.hxx | 6 +- .../itkImagePCADecompositionCalculator.h | 16 +- .../itkImagePCADecompositionCalculator.hxx | 6 +- .../itkImagePCAShapeModelEstimator.hxx | 10 +- .../include/itkLabelStatisticsImageFilter.h | 22 +- .../include/itkLabelStatisticsImageFilter.hxx | 16 +- .../include/itkMeanProjectionImageFilter.h | 2 +- .../include/itkProjectionImageFilter.hxx | 42 +- ...tkStandardDeviationProjectionImageFilter.h | 8 +- .../include/itkStatisticsImageFilter.h | 4 +- .../include/itkStatisticsImageFilter.hxx | 16 +- .../test/itkImageMomentsTest.cxx | 20 +- ...itkImagePCADecompositionCalculatorTest.cxx | 2 +- .../itkImagePCAShapeModelEstimatorTest.cxx | 12 +- ...tkLabelOverlapMeasuresImageFilterGTest.cxx | 2 +- ...itkLabelOverlapMeasuresImageFilterTest.cxx | 6 +- .../itkLabelStatisticsImageFilterTest.cxx | 16 +- .../itkMinimumMaximumImageFilterGTest.cxx | 4 +- .../test/itkMinimumMaximumImageFilterTest.cxx | 6 +- .../test/itkStatisticsImageFilterTest.cxx | 16 +- .../include/itkAggregateLabelMapFilter.hxx | 2 +- .../itkAttributeKeepNObjectsLabelMapFilter.h | 2 +- .../itkAttributeOpeningLabelMapFilter.h | 2 +- .../itkAttributeOpeningLabelMapFilter.hxx | 2 +- .../itkAttributePositionLabelMapFilter.hxx | 2 +- .../itkAttributeSelectionLabelMapFilter.h | 2 +- .../itkAttributeSelectionLabelMapFilter.hxx | 4 +- .../itkAttributeUniqueLabelMapFilter.h | 2 +- .../itkAttributeUniqueLabelMapFilter.hxx | 16 +- .../include/itkAutoCropLabelMapFilter.hxx | 6 +- .../include/itkBinaryImageToLabelMapFilter.h | 4 +- .../itkBinaryImageToLabelMapFilter.hxx | 10 +- .../itkBinaryImageToShapeLabelMapFilter.h | 10 +- ...itkBinaryImageToStatisticsLabelMapFilter.h | 12 +- ...kBinaryImageToStatisticsLabelMapFilter.hxx | 2 +- ...inaryReconstructionByDilationImageFilter.h | 2 +- ...BinaryReconstructionByErosionImageFilter.h | 2 +- .../itkBinaryReconstructionLabelMapFilter.hxx | 4 +- .../itkBinaryShapeKeepNObjectsImageFilter.h | 8 +- .../itkBinaryShapeOpeningImageFilter.h | 8 +- ...kBinaryStatisticsKeepNObjectsImageFilter.h | 8 +- .../itkBinaryStatisticsOpeningImageFilter.h | 8 +- .../include/itkChangeLabelLabelMapFilter.hxx | 2 +- .../include/itkChangeRegionLabelMapFilter.hxx | 6 +- .../include/itkConvertLabelMapFilter.hxx | 4 +- .../include/itkCropLabelMapFilter.hxx | 4 +- .../include/itkInPlaceLabelMapFilter.hxx | 2 +- .../include/itkLabelImageToLabelMapFilter.hxx | 6 +- .../itkLabelImageToShapeLabelMapFilter.h | 6 +- .../itkLabelImageToStatisticsLabelMapFilter.h | 8 +- ...tkLabelImageToStatisticsLabelMapFilter.hxx | 2 +- .../Filtering/LabelMap/include/itkLabelMap.h | 2 +- .../LabelMap/include/itkLabelMap.hxx | 10 +- .../LabelMap/include/itkLabelMapFilter.hxx | 2 +- .../include/itkLabelMapMaskImageFilter.h | 8 +- .../include/itkLabelMapMaskImageFilter.hxx | 22 +- .../itkLabelMapToAttributeImageFilter.hxx | 8 +- .../itkLabelMapToBinaryImageFilter.hxx | 4 +- .../include/itkLabelMapToLabelImageFilter.hxx | 6 +- .../LabelMap/include/itkLabelObject.h | 4 +- .../LabelMap/include/itkLabelObject.hxx | 6 +- .../LabelMap/include/itkLabelObjectLine.h | 2 +- .../itkLabelShapeKeepNObjectsImageFilter.h | 6 +- .../include/itkLabelShapeOpeningImageFilter.h | 6 +- ...tkLabelStatisticsKeepNObjectsImageFilter.h | 6 +- .../itkLabelStatisticsOpeningImageFilter.h | 6 +- .../LabelMap/include/itkMergeLabelMapFilter.h | 2 +- .../include/itkMergeLabelMapFilter.hxx | 8 +- .../include/itkObjectByObjectLabelMapFilter.h | 6 +- .../LabelMap/include/itkPadLabelMapFilter.hxx | 4 +- .../LabelMap/include/itkShapeLabelMapFilter.h | 6 +- .../include/itkShapeLabelMapFilter.hxx | 58 +- .../LabelMap/include/itkShapeLabelObject.h | 36 +- .../include/itkShapeOpeningLabelMapFilter.h | 2 +- .../include/itkShapeRelabelImageFilter.h | 4 +- .../include/itkShapeRelabelLabelMapFilter.h | 2 +- .../include/itkShapeUniqueLabelMapFilter.h | 12 +- .../include/itkShiftScaleLabelMapFilter.hxx | 2 +- .../include/itkStatisticsLabelMapFilter.h | 4 +- .../include/itkStatisticsLabelMapFilter.hxx | 38 +- .../include/itkStatisticsLabelObject.h | 20 +- .../include/itkStatisticsRelabelImageFilter.h | 4 +- .../itkAttributeLabelObjectAccessorsTest1.cxx | 2 +- ...kBinaryImageToShapeLabelMapFilterTest1.cxx | 2 +- ...ryImageToStatisticsLabelMapFilterTest1.cxx | 4 +- ...BinaryReconstructionLabelMapFilterTest.cxx | 2 +- .../test/itkChangeLabelLabelMapFilterTest.cxx | 2 +- .../test/itkConvertLabelMapFilterTest2.cxx | 4 +- ...elImageToStatisticsLabelMapFilterTest1.cxx | 4 +- .../LabelMap/test/itkLabelObjectTest.cxx | 2 +- .../test/itkShapeLabelMapFilterGTest.cxx | 4 +- .../itkShapeLabelObjectAccessorsTest1.cxx | 4 +- .../test/itkShiftScaleLabelMapFilterTest1.cxx | 4 +- .../test/itkStatisticsLabelMapFilterGTest.cxx | 12 +- ...itkStatisticsUniqueLabelMapFilterTest1.cxx | 8 +- .../test/itkUniqueLabelMapFiltersGTest.cxx | 12 +- .../itkAnchorErodeDilateImageFilter.hxx | 4 +- .../include/itkAnchorErodeDilateLine.h | 24 +- .../include/itkAnchorErodeDilateLine.hxx | 34 +- .../include/itkAnchorOpenCloseImageFilter.h | 16 +- .../include/itkAnchorOpenCloseImageFilter.hxx | 38 +- .../include/itkAnchorOpenCloseLine.h | 12 +- .../include/itkAnchorOpenCloseLine.hxx | 12 +- .../include/itkAnchorUtilities.h | 26 +- .../include/itkAnchorUtilities.hxx | 20 +- .../include/itkBasicDilateImageFilter.h | 4 +- .../include/itkBasicDilateImageFilter.hxx | 6 +- .../include/itkBasicErodeImageFilter.h | 4 +- .../include/itkBasicErodeImageFilter.hxx | 6 +- .../itkClosingByReconstructionImageFilter.h | 4 +- .../itkClosingByReconstructionImageFilter.hxx | 4 +- .../include/itkFlatStructuringElement.hxx | 48 +- .../itkGrayscaleConnectedClosingImageFilter.h | 2 +- ...tkGrayscaleConnectedClosingImageFilter.hxx | 2 +- .../itkGrayscaleConnectedOpeningImageFilter.h | 2 +- ...tkGrayscaleConnectedOpeningImageFilter.hxx | 2 +- .../itkGrayscaleFunctionDilateImageFilter.h | 4 +- .../itkGrayscaleFunctionDilateImageFilter.hxx | 4 +- .../itkGrayscaleFunctionErodeImageFilter.h | 4 +- .../itkGrayscaleFunctionErodeImageFilter.hxx | 4 +- .../itkGrayscaleGeodesicDilateImageFilter.h | 4 +- .../itkGrayscaleGeodesicDilateImageFilter.hxx | 4 +- .../itkGrayscaleGeodesicErodeImageFilter.h | 4 +- .../itkGrayscaleGeodesicErodeImageFilter.hxx | 8 +- ...ayscaleMorphologicalClosingImageFilter.hxx | 2 +- ...ayscaleMorphologicalOpeningImageFilter.hxx | 2 +- .../include/itkHConcaveImageFilter.h | 4 +- .../include/itkHConvexImageFilter.h | 4 +- .../include/itkHMaximaImageFilter.h | 4 +- .../include/itkHMinimaImageFilter.h | 4 +- .../itkMaskedMovingHistogramImageFilter.h | 10 +- .../itkMaskedMovingHistogramImageFilter.hxx | 26 +- .../include/itkMorphologyHistogram.h | 12 +- .../include/itkMorphologyImageFilter.h | 4 +- .../include/itkMorphologyImageFilter.hxx | 2 +- ...istogramMorphologicalGradientImageFilter.h | 6 +- .../itkOpeningByReconstructionImageFilter.h | 4 +- .../itkOpeningByReconstructionImageFilter.hxx | 4 +- .../include/itkRankHistogram.h | 34 +- .../include/itkReconstructionImageFilter.hxx | 20 +- .../include/itkRegionalMaximaImageFilter.h | 4 +- .../include/itkRegionalMaximaImageFilter.hxx | 2 +- .../include/itkRegionalMinimaImageFilter.h | 4 +- .../include/itkRegionalMinimaImageFilter.hxx | 2 +- .../include/itkSharedMorphologyUtilities.h | 36 +- .../include/itkSharedMorphologyUtilities.hxx | 66 +- .../itkValuedRegionalExtremaImageFilter.hxx | 10 +- ...VanHerkGilWermanErodeDilateImageFilter.hxx | 6 +- .../include/itkVanHerkGilWermanUtilities.h | 24 +- .../include/itkVanHerkGilWermanUtilities.hxx | 40 +- .../test/itkFlatStructuringElementTest.cxx | 4 +- .../test/itkFlatStructuringElementTest2.cxx | 10 +- .../test/itkFlatStructuringElementTest3.cxx | 12 +- ...GrayscaleFunctionDilateImageFilterTest.cxx | 2 +- ...kGrayscaleFunctionErodeImageFilterTest.cxx | 2 +- ...aleMorphologicalClosingImageFilterTest.cxx | 2 +- ...aleMorphologicalOpeningImageFilterTest.cxx | 2 +- .../test/itkMapMaskedRankImageFilterTest.cxx | 2 +- .../test/itkMapRankImageFilterTest.cxx | 2 +- .../test/itkMaskedRankImageFilterTest.cxx | 2 +- ...kMorphologicalGradientImageFilterTest2.cxx | 2 +- .../itkObjectMorphologyImageFilterTest.cxx | 8 +- ...peningByReconstructionImageFilterTest2.cxx | 4 +- .../test/itkRankImageFilterTest.cxx | 2 +- .../test/itkRegionalMaximaImageFilterTest.cxx | 4 +- .../test/itkRegionalMinimaImageFilterTest.cxx | 4 +- .../test/itkTopHatImageFilterTest.cxx | 18 +- .../Filtering/Path/include/itkChainCodePath.h | 2 +- .../itkChainCodeToFourierSeriesPathFilter.hxx | 14 +- .../itkContourExtractor2DImageFilter.h | 28 +- .../itkContourExtractor2DImageFilter.hxx | 42 +- .../itkExtractOrthogonalSwath2DImageFilter.h | 6 +- ...itkExtractOrthogonalSwath2DImageFilter.hxx | 12 +- .../Path/include/itkFourierSeriesPath.hxx | 8 +- .../Filtering/Path/include/itkHilbertPath.h | 2 +- .../Filtering/Path/include/itkHilbertPath.hxx | 2 +- .../itkOrthogonalSwath2DPathFilter.hxx | 4 +- ...itkOrthogonallyCorrected2DParametricPath.h | 2 +- .../Path/include/itkParametricPath.hxx | 18 +- Modules/Filtering/Path/include/itkPath.h | 2 +- .../Filtering/Path/include/itkPathFunctions.h | 8 +- .../include/itkPathToChainCodePathFilter.hxx | 6 +- .../Path/include/itkPathToImageFilter.h | 6 +- .../Path/include/itkPathToImageFilter.hxx | 4 +- .../include/itkPolyLineParametricPath.hxx | 4 +- ...kOrthogonallyCorrected2DParametricPath.cxx | 2 +- .../Path/test/itkChainCodePath2DTest.cxx | 2 +- .../Path/test/itkChainCodePathTest.cxx | 2 +- .../itkContourExtractor2DImageFilterTest.cxx | 8 +- ...xtractOrthogonalSwath2DImageFilterTest.cxx | 2 +- .../Path/test/itkFourierSeriesPathTest.cxx | 4 +- .../itkOrthogonalSwath2DPathFilterTest.cxx | 2 +- ...hogonallyCorrected2DParametricPathTest.cxx | 2 +- .../Path/test/itkPathFunctionsTest.cxx | 6 +- .../Path/test/itkPathIteratorTest.cxx | 2 +- .../test/itkPolyLineParametricPathTest.cxx | 2 +- .../include/itkBorderQuadEdgeMeshFilter.h | 2 +- .../include/itkBorderQuadEdgeMeshFilter.hxx | 10 +- .../include/itkCleanQuadEdgeMeshFilter.h | 4 +- .../include/itkCleanQuadEdgeMeshFilter.hxx | 10 +- .../include/itkDecimationQuadEdgeMeshFilter.h | 2 +- .../itkDelaunayConformingQuadEdgeMeshFilter.h | 6 +- ...tkDelaunayConformingQuadEdgeMeshFilter.hxx | 6 +- .../itkDiscreteCurvatureQuadEdgeMeshFilter.h | 2 +- ...creteGaussianCurvatureQuadEdgeMeshFilter.h | 2 +- ...kDiscreteMeanCurvatureQuadEdgeMeshFilter.h | 4 +- ...etePrincipalCurvaturesQuadEdgeMeshFilter.h | 4 +- .../itkEdgeDecimationQuadEdgeMeshFilter.h | 20 +- .../itkEdgeDecimationQuadEdgeMeshFilter.hxx | 6 +- ...tkLaplacianDeformationQuadEdgeMeshFilter.h | 18 +- ...LaplacianDeformationQuadEdgeMeshFilter.hxx | 30 +- ...nQuadEdgeMeshFilterWithHardConstraints.hxx | 20 +- ...nQuadEdgeMeshFilterWithSoftConstraints.hxx | 20 +- .../include/itkNormalQuadEdgeMeshFilter.hxx | 28 +- .../itkParameterizationQuadEdgeMeshFilter.h | 4 +- .../itkParameterizationQuadEdgeMeshFilter.hxx | 16 +- .../itkQuadEdgeMeshDecimationCriteria.h | 4 +- ...adEdgeMeshDecimationQuadricElementHelper.h | 12 +- .../itkQuadEdgeMeshParamMatrixCoefficients.h | 18 +- .../itkQuadricDecimationQuadEdgeMeshFilter.h | 2 +- ...itkQuadricDecimationQuadEdgeMeshFilter.hxx | 12 +- .../itkSmoothingQuadEdgeMeshFilter.hxx | 8 +- ...EdgeLengthDecimationQuadEdgeMeshFilter.hxx | 2 +- ...utomaticTopologyQuadEdgeMeshSourceTest.cxx | 2 +- .../test/itkCleanQuadEdgeMeshFilterTest.cxx | 4 +- ...launayConformingQuadEdgeMeshFilterTest.cxx | 2 +- ...dEdgeMeshFilterWithHardConstraintsTest.cxx | 8 +- ...dEdgeMeshFilterWithSoftConstraintsTest.cxx | 4 +- ...ParameterizationQuadEdgeMeshFilterTest.cxx | 8 +- ...uadricDecimationQuadEdgeMeshFilterTest.cxx | 2 +- .../itkSmoothingQuadEdgeMeshFilterTest.cxx | 6 +- ...LengthDecimationQuadEdgeMeshFilterTest.cxx | 2 +- .../include/itkBinomialBlurImageFilter.hxx | 20 +- .../include/itkBoxMeanImageFilter.hxx | 4 +- .../include/itkBoxSigmaImageFilter.hxx | 4 +- .../Smoothing/include/itkBoxUtilities.h | 78 +-- .../itkDiscreteGaussianImageFilter.hxx | 2 +- .../itkFFTDiscreteGaussianImageFilter.hxx | 4 +- .../Smoothing/include/itkMeanImageFilter.h | 12 +- .../Smoothing/include/itkMeanImageFilter.hxx | 16 +- .../include/itkMedianImageFilter.hxx | 4 +- .../include/itkRecursiveGaussianImageFilter.h | 30 +- .../itkRecursiveGaussianImageFilter.hxx | 30 +- ...itkSmoothingRecursiveGaussianImageFilter.h | 4 +- ...kSmoothingRecursiveGaussianImageFilter.hxx | 2 +- .../test/itkBoxMeanImageFilterTest.cxx | 2 +- .../test/itkBoxSigmaImageFilterTest.cxx | 2 +- .../itkDiscreteGaussianImageFilterTest.cxx | 10 +- .../itkDiscreteGaussianImageFilterTest2.cxx | 12 +- .../itkFFTDiscreteGaussianImageFilterTest.cxx | 4 +- .../test/itkMeanImageFilterGTest.cxx | 10 +- .../test/itkMedianImageFilterGTest.cxx | 8 +- ...ursiveGaussianImageFilterOnTensorsTest.cxx | 14 +- ...veGaussianImageFilterOnVectorImageTest.cxx | 12 +- .../itkRecursiveGaussianScaleSpaceTest1.cxx | 2 +- ...eGaussianImageFilterOnImageAdaptorTest.cxx | 2 +- ...GaussianImageFilterOnImageOfVectorTest.cxx | 2 +- ...veGaussianImageFilterOnVectorImageTest.cxx | 2 +- ...itkSpatialFunctionImageEvaluatorFilter.hxx | 2 +- ...patialFunctionImageEvaluatorFilterTest.cxx | 4 +- .../include/itkBinaryThresholdImageFilter.h | 4 +- .../itkBinaryThresholdProjectionImageFilter.h | 2 +- .../itkHistogramThresholdImageFilter.h | 14 +- .../include/itkHuangThresholdCalculator.h | 2 +- .../include/itkHuangThresholdCalculator.hxx | 8 +- .../itkIntermodesThresholdCalculator.h | 2 +- .../itkIntermodesThresholdImageFilter.h | 2 +- .../include/itkIsoDataThresholdCalculator.hxx | 2 +- .../itkKappaSigmaThresholdImageCalculator.h | 10 +- .../itkKappaSigmaThresholdImageCalculator.hxx | 2 +- .../itkKappaSigmaThresholdImageFilter.h | 8 +- ...kKittlerIllingworthThresholdCalculator.hxx | 16 +- .../include/itkLiThresholdCalculator.hxx | 10 +- .../itkMaximumEntropyThresholdCalculator.hxx | 2 +- .../include/itkMomentsThresholdCalculator.hxx | 8 +- .../itkOtsuMultipleThresholdsCalculator.h | 12 +- .../itkOtsuMultipleThresholdsCalculator.hxx | 22 +- .../itkOtsuMultipleThresholdsImageFilter.h | 10 +- .../include/itkOtsuThresholdCalculator.h | 2 +- .../itkRenyiEntropyThresholdCalculator.h | 8 +- .../itkRenyiEntropyThresholdCalculator.hxx | 18 +- .../itkShanbhagThresholdCalculator.hxx | 2 +- .../include/itkThresholdImageFilter.hxx | 4 +- .../include/itkThresholdLabelerImageFilter.h | 6 +- .../itkTriangleThresholdCalculator.hxx | 4 +- .../include/itkYenThresholdCalculator.hxx | 2 +- .../itkBinaryThresholdImageFilterTest.cxx | 4 +- .../itkBinaryThresholdSpatialFunctionTest.cxx | 2 +- .../test/itkHuangThresholdImageFilterTest.cxx | 2 +- .../itkIsoDataThresholdImageFilterTest.cxx | 2 +- ...KappaSigmaThresholdImageCalculatorTest.cxx | 2 +- ...lerIllingworthThresholdImageFilterTest.cxx | 2 +- .../test/itkLiThresholdImageFilterTest.cxx | 2 +- ...MaximumEntropyThresholdImageFilterTest.cxx | 2 +- .../itkMomentsThresholdImageFilterTest.cxx | 2 +- ...tkOtsuMultipleThresholdsCalculatorTest.cxx | 2 +- ...kOtsuMultipleThresholdsCalculatorTest2.cxx | 4 +- .../test/itkOtsuThresholdCalculatorTest.cxx | 2 +- ...usOtsuMultipleThresholdsCalculatorTest.cxx | 2 +- .../test/itkOtsuThresholdImageFilterTest.cxx | 2 +- ...tkRenyiEntropyThresholdImageFilterTest.cxx | 2 +- .../itkShanbhagThresholdImageFilterTest.cxx | 2 +- .../test/itkThresholdImageFilterTest.cxx | 4 +- .../itkThresholdLabelerImageFilterTest.cxx | 6 +- .../itkTriangleThresholdImageFilterTest.cxx | 2 +- .../test/itkYenThresholdImageFilterTest.cxx | 2 +- Modules/IO/BMP/include/itkBMPImageIO.h | 18 +- Modules/IO/BMP/src/itkBMPImageIO.cxx | 16 +- .../BMP/test/itkBMPImageIOTestExtension.cxx | 4 +- Modules/IO/BioRad/src/itkBioRadImageIO.cxx | 60 +- .../IO/Bruker/src/itkBruker2dseqImageIO.cxx | 58 +- Modules/IO/Bruker/test/itkBrukerImageTest.cxx | 2 +- .../IO/CSV/include/itkCSVArray2DDataObject.h | 6 +- .../CSV/include/itkCSVArray2DDataObject.hxx | 12 +- Modules/IO/CSV/include/itkCSVFileReaderBase.h | 18 +- .../include/itkCSVNumericObjectFileWriter.h | 10 +- Modules/IO/CSV/src/itkCSVFileReaderBase.cxx | 2 +- .../itkCSVArray2DFileReaderWriterTest.cxx | 4 +- .../itkCSVNumericObjectFileWriterTest.cxx | 2 +- Modules/IO/DCMTK/include/itkDCMTKFileReader.h | 168 ++--- Modules/IO/DCMTK/include/itkDCMTKImageIO.h | 10 +- Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx | 200 +++--- Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx | 6 +- .../itkDCMTKImageIOMultiFrameImageTest.cxx | 6 +- .../itkDCMTKImageIOSlopeInterceptTest.cxx | 2 +- .../DCMTK/test/itkDCMTKImageIOSpacingTest.cxx | 6 +- Modules/IO/DCMTK/test/itkDCMTKLoggerTest.cxx | 2 +- .../test/itkDCMTKSeriesReadImageWrite.cxx | 2 +- Modules/IO/GDCM/include/itkGDCMImageIO.h | 2 +- Modules/IO/GDCM/src/itkGDCMImageIO.cxx | 60 +- .../IO/GDCM/src/itkGDCMSeriesFileNames.cxx | 2 +- .../test/itkGDCMImageIO32bitsStoredTest.cxx | 2 +- .../test/itkGDCMImageIONoPreambleTest.cxx | 2 +- Modules/IO/GDCM/test/itkGDCMImageIOTest.cxx | 6 +- Modules/IO/GDCM/test/itkGDCMImageIOTest2.cxx | 4 +- .../itkGDCMImageOrientationPatientTest.cxx | 4 +- .../test/itkGDCMImagePositionPatientTest.cxx | 4 +- .../test/itkGDCMImageReadSeriesWriteTest.cxx | 8 +- .../GDCM/test/itkGDCMImageReadWriteTest.cxx | 6 +- .../GDCM/test/itkGDCMLegacyMultiFrameTest.cxx | 2 +- .../GDCM/test/itkGDCMLoadImageSpacingTest.cxx | 2 +- Modules/IO/GE/src/Ge5xHdr.h | 78 +-- Modules/IO/GE/src/itkGE4ImageIO.cxx | 8 +- Modules/IO/GE/test/itkGEImageIOTest.cxx | 12 +- Modules/IO/GIPL/include/itkGiplImageIO.h | 2 +- Modules/IO/GIPL/src/itkGiplImageIO.cxx | 2 +- Modules/IO/HDF5/include/itkHDF5ImageIO.h | 10 +- Modules/IO/HDF5/src/itkHDF5ImageIO.cxx | 148 ++--- .../itkHDF5ImageIOStreamingReadWriteTest.cxx | 6 +- Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx | 12 +- Modules/IO/IPL/include/itkGEImageHeader.h | 20 +- Modules/IO/IPL/include/itkIPLCommonImageIO.h | 20 +- Modules/IO/IPL/include/itkIPLFileNameList.h | 56 +- Modules/IO/IPL/src/itkIPLCommonImageIO.cxx | 32 +- .../include/itkArchetypeSeriesFileNames.h | 4 +- .../ImageBase/include/itkConvertPixelBuffer.h | 36 +- .../include/itkConvertPixelBuffer.hxx | 92 +-- Modules/IO/ImageBase/include/itkIOCommon.h | 2 +- .../IO/ImageBase/include/itkIOTestHelper.h | 16 +- .../ImageBase/include/itkImageFileReader.hxx | 18 +- .../include/itkImageFileReaderException.h | 6 +- .../IO/ImageBase/include/itkImageFileWriter.h | 14 +- .../ImageBase/include/itkImageFileWriter.hxx | 16 +- Modules/IO/ImageBase/include/itkImageIOBase.h | 32 +- .../include/itkImageSeriesReader.hxx | 32 +- .../ImageBase/include/itkImageSeriesWriter.h | 2 +- .../include/itkImageSeriesWriter.hxx | 10 +- .../itkInternationalizationIOHelpers.h | 4 +- .../itkRegularExpressionSeriesFileNames.h | 6 +- .../include/itkStreamingImageIOBase.h | 2 +- .../include/itkfdstream/fdstream.hxx | 6 +- .../src/itkArchetypeSeriesFileNames.cxx | 14 +- Modules/IO/ImageBase/src/itkImageIOBase.cxx | 26 +- .../src/itkNumericSeriesFileNames.cxx | 2 +- .../ImageBase/src/itkRawImageIOUtilities.cxx | 18 +- .../ImageBase/src/itkStreamingImageIOBase.cxx | 12 +- Modules/IO/ImageBase/test/itk64bitTest.cxx | 4 +- .../test/itkArchetypeSeriesFileNamesTest.cxx | 2 +- .../ImageBase/test/itkConvertBufferTest.cxx | 16 +- .../ImageBase/test/itkConvertBufferTest2.cxx | 4 +- .../IO/ImageBase/test/itkFileFreeImageIO.cxx | 12 +- .../test/itkFileFreeImageIOFactory.cxx | 2 +- Modules/IO/ImageBase/test/itkIOPluginTest.cxx | 10 +- .../itkImageFileReaderPositiveSpacingTest.cxx | 12 +- .../test/itkImageFileReaderStreamingTest2.cxx | 4 +- .../test/itkImageFileWriterPastingTest1.cxx | 2 +- .../test/itkImageFileWriterPastingTest2.cxx | 6 +- .../test/itkImageFileWriterPastingTest3.cxx | 4 +- ...WriterStreamingPastingCompressingTest1.cxx | 14 +- .../test/itkImageFileWriterStreamingTest2.cxx | 4 +- .../ImageBase/test/itkImageFileWriterTest.cxx | 4 +- .../test/itkImageFileWriterTest2.cxx | 8 +- ...eWriterUpdateLargestPossibleRegionTest.cxx | 4 +- .../IO/ImageBase/test/itkImageIOBaseTest.cxx | 26 +- .../test/itkImageIODirection2DTest.cxx | 2 +- .../test/itkImageIODirection3DTest.cxx | 2 +- .../test/itkImageSeriesReaderSamplingTest.cxx | 2 +- .../test/itkImageSeriesWriterTest.cxx | 4 +- .../test/itkLargeImageWriteReadTest.cxx | 2 +- .../test/itkNoiseImageFilterTest.cxx | 2 +- .../itkReadWriteImageWithDictionaryTest.cxx | 6 +- ...tkRegularExpressionSeriesFileNamesTest.cxx | 2 +- .../IO/ImageBase/test/itkUnicodeIOTest.cxx | 2 +- .../test/itkVectorImageReadWriteTest.cxx | 6 +- Modules/IO/JPEG/src/itkJPEGImageIO.cxx | 24 +- Modules/IO/JPEG/test/itkJPEGImageIOTest2.cxx | 4 +- .../IO/JPEG2000/include/itkJPEG2000ImageIO.h | 4 +- .../IO/JPEG2000/src/itkJPEG2000ImageIO.cxx | 22 +- .../test/itkJPEG2000ImageIOTest05.cxx | 2 +- Modules/IO/LSM/src/itkLSMImageIO.cxx | 60 +- Modules/IO/LSM/test/itkLSMImageIOTest.cxx | 4 +- Modules/IO/MINC/src/itkMINCImageIO.cxx | 32 +- Modules/IO/MINC/test/itkMINCImageIOTest.cxx | 36 +- Modules/IO/MINC/test/itkMINCImageIOTest2.cxx | 2 +- Modules/IO/MINC/test/itkMINCImageIOTest4.cxx | 10 +- .../IO/MINC/test/itkMINCImageIOTest_2D.cxx | 8 +- Modules/IO/MRC/include/itkMRCHeaderObject.h | 8 +- Modules/IO/MRC/test/itkMRCImageIOTest.cxx | 12 +- Modules/IO/MRC/test/itkMRCImageIOTest2.cxx | 2 +- Modules/IO/MeshBYU/include/itkBYUMeshIO.h | 10 +- Modules/IO/MeshBYU/src/itkBYUMeshIO.cxx | 4 +- .../include/itkConvertArrayPixelBuffer.hxx | 6 +- ...ConvertVariableLengthVectorPixelBuffer.hxx | 6 +- .../IO/MeshBase/include/itkMeshFileReader.h | 6 +- .../IO/MeshBase/include/itkMeshFileReader.hxx | 34 +- .../include/itkMeshFileReaderException.h | 6 +- .../IO/MeshBase/include/itkMeshFileWriter.h | 10 +- .../IO/MeshBase/include/itkMeshFileWriter.hxx | 12 +- .../include/itkMeshFileWriterException.h | 6 +- Modules/IO/MeshBase/include/itkMeshIOBase.h | 16 +- .../IO/MeshBase/include/itkMeshIOTestHelper.h | 2 +- .../src/itkMeshFileReaderException.cxx | 6 +- .../src/itkMeshFileWriterException.cxx | 6 +- .../include/itkFreeSurferAsciiMeshIO.h | 2 +- .../include/itkFreeSurferBinaryMeshIO.h | 4 +- .../src/itkFreeSurferAsciiMeshIO.cxx | 10 +- .../src/itkFreeSurferBinaryMeshIO.cxx | 8 +- .../test/itkFreeSurferMeshIOTest.cxx | 22 +- Modules/IO/MeshGifti/include/itkGiftiMeshIO.h | 2 +- Modules/IO/MeshGifti/src/itkGiftiMeshIO.cxx | 2 +- .../IO/MeshGifti/test/itkGiftiMeshIOTest.cxx | 2 +- Modules/IO/MeshOBJ/include/itkOBJMeshIO.h | 2 +- Modules/IO/MeshOBJ/src/itkOBJMeshIO.cxx | 38 +- Modules/IO/MeshOBJ/test/itkOBJMeshIOTest.cxx | 2 +- Modules/IO/MeshOFF/include/itkOFFMeshIO.h | 8 +- Modules/IO/MeshOFF/src/itkOFFMeshIO.cxx | 2 +- .../IO/MeshVTK/include/itkVTKPolyDataMeshIO.h | 74 +-- .../IO/MeshVTK/src/itkVTKPolyDataMeshIO.cxx | 68 +- .../test/itkVTKPolyDataMeshIOGTest.cxx | 10 +- Modules/IO/Meta/include/itkMetaArrayReader.h | 4 +- Modules/IO/Meta/include/itkMetaImageIO.h | 14 +- Modules/IO/Meta/src/itkMetaImageIO.cxx | 50 +- .../test/itkLargeMetaImageWriteReadTest.cxx | 4 +- .../Meta/test/itkMetaImageIOMetaDataTest.cxx | 30 +- Modules/IO/Meta/test/itkMetaImageIOTest.cxx | 4 +- Modules/IO/Meta/test/itkMetaImageIOTest2.cxx | 2 +- Modules/IO/Meta/test/testMetaArray.cxx | 2 +- Modules/IO/Meta/test/testMetaImage.cxx | 12 +- Modules/IO/Meta/test/testMetaMesh.cxx | 2 +- Modules/IO/NIFTI/include/itkNiftiImageIO.h | 4 +- Modules/IO/NIFTI/src/itkNiftiImageIO.cxx | 54 +- Modules/IO/NIFTI/test/itkNiftiImageIOTest.h | 42 +- .../IO/NIFTI/test/itkNiftiImageIOTest11.cxx | 4 +- .../IO/NIFTI/test/itkNiftiImageIOTest12.cxx | 6 +- .../IO/NIFTI/test/itkNiftiImageIOTest2.cxx | 4 +- .../IO/NIFTI/test/itkNiftiImageIOTest3.cxx | 8 +- .../IO/NIFTI/test/itkNiftiImageIOTest4.cxx | 10 +- .../IO/NIFTI/test/itkNiftiImageIOTest5.cxx | 6 +- .../IO/NIFTI/test/itkNiftiImageIOTest6.cxx | 12 +- .../test/itkNiftiLargeImageRegionReadTest.cxx | 2 +- .../IO/NIFTI/test/itkNiftiReadAnalyzeTest.cxx | 14 +- .../test/itkNiftiReadWriteDirectionTest.cxx | 14 +- ...iftiWriteCoerceOrthogonalDirectionTest.cxx | 6 +- Modules/IO/NRRD/src/itkNrrdImageIO.cxx | 40 +- .../NRRD/test/itkNrrdComplexImageReadTest.cxx | 2 +- .../itkNrrdCovariantVectorImageReadTest.cxx | 2 +- .../itkNrrdDiffusionTensor3DImageReadTest.cxx | 4 +- Modules/IO/NRRD/test/itkNrrdImageIOTest.cxx | 2 +- Modules/IO/NRRD/test/itkNrrdImageIOTest.h | 6 +- Modules/IO/NRRD/test/itkNrrdMetaDataTest.cxx | 2 +- .../NRRD/test/itkNrrdVectorImageReadTest.cxx | 2 +- Modules/IO/PNG/src/itkPNGImageIO.cxx | 50 +- Modules/IO/PNG/test/itkPNGImageIOTest.cxx | 12 +- Modules/IO/PNG/test/itkPNGImageIOTest3.cxx | 2 +- .../IO/PNG/test/itkPNGImageIOTestPalette.cxx | 2 +- Modules/IO/PhilipsREC/include/itkPhilipsPAR.h | 22 +- .../PhilipsREC/include/itkPhilipsRECImageIO.h | 2 +- Modules/IO/PhilipsREC/src/itkPhilipsPAR.cxx | 210 +++---- .../PhilipsREC/src/itkPhilipsRECImageIO.cxx | 36 +- .../test/itkPhilipsRECImageIOPrintTest.cxx | 4 +- Modules/IO/RAW/include/itkRawImageIO.h | 6 +- Modules/IO/RAW/include/itkRawImageIO.hxx | 10 +- Modules/IO/RAW/test/itkRawImageIOTest2.cxx | 4 +- Modules/IO/RAW/test/itkRawImageIOTest3.cxx | 2 +- Modules/IO/RAW/test/itkRawImageIOTest4.cxx | 2 +- Modules/IO/RAW/test/itkRawImageIOTest5.cxx | 8 +- .../Siemens/src/itkSiemensVisionImageIO.cxx | 2 +- .../itkPolygonGroupSpatialObjectXMLFile.h | 6 +- .../include/itkSpatialObjectReader.h | 4 +- .../include/itkSpatialObjectWriter.h | 8 +- .../itkPolygonGroupSpatialObjectXMLFile.cxx | 20 +- ...tkPolygonGroupSpatialObjectXMLFileTest.cxx | 8 +- .../itkReadVesselTubeSpatialObjectTest.cxx | 2 +- .../test/itkReadWriteSpatialObjectTest.cxx | 20 +- .../Stimulate/include/itkStimulateImageIO.h | 6 +- .../IO/Stimulate/src/itkStimulateImageIO.cxx | 20 +- Modules/IO/TIFF/include/itkTIFFImageIO.h | 24 +- Modules/IO/TIFF/src/itkTIFFImageIO.cxx | 40 +- Modules/IO/TIFF/src/itkTIFFReaderInternal.cxx | 12 +- Modules/IO/TIFF/src/itkTIFFReaderInternal.h | 10 +- .../test/itkLargeTIFFImageWriteReadTest.cxx | 2 +- .../IO/TIFF/test/itkTIFFImageIOInfoTest.cxx | 6 +- Modules/IO/TIFF/test/itkTIFFImageIOTest2.cxx | 4 +- .../TIFF/test/itkTIFFImageIOTestPalette.cxx | 2 +- .../include/itkTransformFileReader.h | 4 +- .../include/itkTransformFileWriter.h | 6 +- .../include/itkTransformIOBase.h | 6 +- .../src/itkCompositeTransformIOHelper.cxx | 6 +- .../src/itkTransformFileReader.cxx | 4 +- .../itkTransformFileWriterSpecializations.cxx | 12 +- .../include/itkTransformFactoryBase.h | 8 +- .../test/itkTransformFactoryBaseTest.cxx | 6 +- .../TransformHDF5/src/itkHDF5TransformIO.cxx | 34 +- .../test/itkIOTransformHDF5Test.cxx | 8 +- .../src/itkTxtTransformIO.cxx | 8 +- .../test/itkIOTransformTxtTest.cxx | 8 +- .../include/itkMINCTransformAdapter.h | 4 +- .../include/itkMINCTransformIO.h | 10 +- .../TransformMINC/src/itkMINCTransformIO.cxx | 14 +- .../test/itkIOTransformMINCTest.cxx | 26 +- .../test/itkMINCTransformAdapterTest.cxx | 14 +- .../src/itkMatlabTransformIO.cxx | 4 +- .../test/itkIOTransformMatlabTest.cxx | 4 +- Modules/IO/VTK/include/itkVTKImageIO.h | 2 +- Modules/IO/VTK/src/itkVTKImageIO.cxx | 40 +- Modules/IO/VTK/test/itkVTKImageIO2Test.cxx | 14 +- Modules/IO/VTK/test/itkVTKImageIO2Test2.cxx | 2 +- .../IO/VTK/test/itkVTKImageIOStreamTest.cxx | 8 +- Modules/IO/VTK/test/itkVTKImageIOTest.cxx | 4 +- Modules/IO/XML/include/itkDOMReader.hxx | 2 +- Modules/IO/XML/include/itkDOMWriter.hxx | 2 +- Modules/IO/XML/include/itkXMLFile.h | 4 +- Modules/IO/XML/src/itkDOMNode.cxx | 8 +- Modules/IO/XML/src/itkDOMNodeXMLReader.cxx | 2 +- Modules/IO/XML/src/itkXMLFile.cxx | 2 +- Modules/IO/XML/test/itkDOMTest2.cxx | 4 +- Modules/IO/XML/test/itkDOMTest6.cxx | 6 +- .../IO/XML/test/itkDOMTestObjectDOMReader.h | 2 +- .../IO/XML/test/itkDOMTestObjectDOMWriter.h | 2 +- Modules/IO/XML/test/itkFancyStringTest.cxx | 16 +- .../test/itkBasicFiltersPrintTest.cxx | 4 +- .../test/itkBasicFiltersPrintTest2.cxx | 4 +- .../test/itkCommonPrintTest.cxx | 2 +- .../test/itkNumericsPrintTest.cxx | 4 +- .../test/itkPolygonCellTest.cxx | 2 +- ...nkImagePreserveObjectPhysicalLocations.cxx | 18 +- .../itkAttributeMorphologyBaseImageFilter.h | 2 +- .../itkAttributeMorphologyBaseImageFilter.hxx | 24 +- .../itkConformalFlatteningMeshFilter.hxx | 6 +- ...ourierReconstructionImageToImageFilter.hxx | 48 +- .../include/itkGridForwardWarpImageFilter.h | 4 +- .../include/itkGridForwardWarpImageFilter.hxx | 8 +- .../include/itkLabelGeometryImageFilter.h | 60 +- .../include/itkLabelGeometryImageFilter.hxx | 28 +- .../itkMiniPipelineSeparableImageFilter.h | 2 +- ...iphaseDenseFiniteDifferenceImageFilter.hxx | 20 +- ...itkMultiphaseFiniteDifferenceImageFilter.h | 12 +- ...kMultiphaseFiniteDifferenceImageFilter.hxx | 6 +- ...tiphaseSparseFiniteDifferenceImageFilter.h | 20 +- ...phaseSparseFiniteDifferenceImageFilter.hxx | 74 +-- .../include/itkRegionBasedLevelSetFunction.h | 6 +- .../itkRegionBasedLevelSetFunction.hxx | 12 +- .../itkRegionBasedLevelSetFunctionData.h | 4 +- ...itkRegionBasedLevelSetFunctionSharedData.h | 6 +- .../itkRobustAutomaticThresholdCalculator.h | 6 +- .../itkRobustAutomaticThresholdImageFilter.h | 4 +- ...itkRobustAutomaticThresholdImageFilter.hxx | 2 +- ...larChanAndVeseDenseLevelSetImageFilter.hxx | 2 +- .../itkScalarChanAndVeseLevelSetFunction.h | 8 +- .../itkScalarChanAndVeseLevelSetFunction.hxx | 18 +- ...alarChanAndVeseSparseLevelSetImageFilter.h | 8 +- ...arChanAndVeseSparseLevelSetImageFilter.hxx | 10 +- .../itkScalarRegionBasedLevelSetFunction.h | 14 +- .../itkScalarRegionBasedLevelSetFunction.hxx | 14 +- ...kStochasticFractalDimensionImageFilter.hxx | 10 +- .../Review/include/itkVoxBoCUBImageIO.h | 2 +- .../include/itkWarpHarmonicEnergyCalculator.h | 4 +- .../itkWarpHarmonicEnergyCalculator.hxx | 4 +- .../Nonunit/Review/src/itkVoxBoCUBImageIO.cxx | 18 +- ...erReconstructionImageToImageFilterTest.cxx | 2 +- .../Review/test/itkImageFunctionTest.cxx | 6 +- .../test/itkLabelGeometryImageFilterTest.cxx | 4 +- .../test/itkOptImageToImageMetricsTest.h | 40 +- .../test/itkOptImageToImageMetricsTest2.h | 44 +- ...ormationImageToImageMetricThreadsTest1.cxx | 6 +- ...RobustAutomaticThresholdCalculatorTest.cxx | 2 +- ...obustAutomaticThresholdImageFilterTest.cxx | 2 +- ...anAndVeseDenseLevelSetImageFilterTest2.cxx | 18 +- ...anAndVeseDenseLevelSetImageFilterTest4.cxx | 18 +- ...nAndVeseSparseLevelSetImageFilterTest2.cxx | 12 +- ...kScalarRegionBasedLevelSetFunctionTest.cxx | 6 +- ...eFunctionConditionalConstIteratorTest2.cxx | 2 +- ...eFunctionConditionalConstIteratorTest3.cxx | 2 +- .../Review/test/itkTimeAndMemoryProbeTest.cxx | 2 +- .../itkWarpHarmonicEnergyCalculatorTest.cxx | 2 +- .../itkWarpJacobianDeterminantFilterTest.cxx | 2 +- .../include/itkEigenAnalysis2DImageFilter.hxx | 8 +- .../itkEigenAnalysis2DImageFilterTest.cxx | 2 +- .../FEM/include/itkFEMElement2DC0LinearLine.h | 4 +- ...EMElement2DC0LinearQuadrilateralMembrane.h | 8 +- ...kFEMElement2DC0LinearQuadrilateralStrain.h | 8 +- ...kFEMElement2DC0LinearQuadrilateralStress.h | 8 +- ...kFEMElement2DC0QuadraticTriangularStrain.h | 12 +- ...kFEMElement2DC0QuadraticTriangularStress.h | 12 +- .../itkFEMElement3DC0LinearTriangular.h | 2 +- .../Numerics/FEM/include/itkFEMElementBase.h | 8 +- .../Numerics/FEM/include/itkFEMException.h | 8 +- .../Numerics/FEM/include/itkFEMFactoryBase.h | 10 +- .../FEM/include/itkFEMImageMetricLoad.h | 30 +- .../FEM/include/itkFEMImageMetricLoad.hxx | 38 +- .../FEM/include/itkFEMItpackSparseMatrix.h | 8 +- .../FEM/include/itkFEMLinearSystemWrapper.h | 18 +- .../FEM/include/itkFEMLoadElementBase.h | 2 +- Modules/Numerics/FEM/include/itkFEMLoadTest.h | 2 +- Modules/Numerics/FEM/include/itkFEMObject.h | 6 +- Modules/Numerics/FEM/include/itkFEMObject.hxx | 22 +- .../FEM/include/itkFEMObjectSpatialObject.hxx | 2 +- Modules/Numerics/FEM/include/itkFEMPArray.h | 2 +- .../FEM/include/itkFEMRobustSolver.hxx | 26 +- ...itkFEMScatteredDataPointSetToImageFilter.h | 12 +- ...kFEMScatteredDataPointSetToImageFilter.hxx | 36 +- Modules/Numerics/FEM/include/itkFEMSolver.h | 14 +- Modules/Numerics/FEM/include/itkFEMSolver.hxx | 14 +- .../FEM/include/itkFEMSolverCrankNicolson.h | 2 +- .../FEM/include/itkFEMSolverCrankNicolson.hxx | 2 +- .../FEM/include/itkFEMSolverHyperbolic.h | 6 +- .../itkImageToRectilinearFEMObjectFilter.h | 4 +- .../itkImageToRectilinearFEMObjectFilter.hxx | 18 +- .../FEM/include/itkMetaFEMObjectConverter.hxx | 32 +- Modules/Numerics/FEM/include/itpack.h | 260 ++++---- Modules/Numerics/FEM/src/dsrc2c.c | 588 +++++++++--------- .../FEM/src/itkFEMElement2DC0LinearLine.cxx | 10 +- .../src/itkFEMElement2DC0LinearLineStress.cxx | 2 +- .../itkFEMElement2DC0LinearQuadrilateral.cxx | 2 +- ...Element2DC0LinearQuadrilateralMembrane.cxx | 10 +- ...EMElement2DC0LinearQuadrilateralStrain.cxx | 10 +- ...EMElement2DC0LinearQuadrilateralStress.cxx | 10 +- .../src/itkFEMElement2DC0LinearTriangular.cxx | 2 +- ...FEMElement2DC0LinearTriangularMembrane.cxx | 8 +- ...tkFEMElement2DC0LinearTriangularStrain.cxx | 8 +- ...tkFEMElement2DC0LinearTriangularStress.cxx | 8 +- .../itkFEMElement2DC0QuadraticTriangular.cxx | 6 +- ...EMElement2DC0QuadraticTriangularStrain.cxx | 14 +- ...EMElement2DC0QuadraticTriangularStress.cxx | 14 +- .../FEM/src/itkFEMElement2DC1Beam.cxx | 8 +- .../src/itkFEMElement3DC0LinearHexahedron.cxx | 10 +- ...FEMElement3DC0LinearHexahedronMembrane.cxx | 2 +- ...tkFEMElement3DC0LinearHexahedronStrain.cxx | 2 +- ...EMElement3DC0LinearTetrahedronMembrane.cxx | 2 +- ...kFEMElement3DC0LinearTetrahedronStrain.cxx | 2 +- .../src/itkFEMElement3DC0LinearTriangular.cxx | 24 +- ...ent3DC0LinearTriangularLaplaceBeltrami.cxx | 14 +- ...FEMElement3DC0LinearTriangularMembrane.cxx | 8 +- .../Numerics/FEM/src/itkFEMElementBase.cxx | 26 +- Modules/Numerics/FEM/src/itkFEMException.cxx | 14 +- .../Numerics/FEM/src/itkFEMFactoryBase.cxx | 2 +- .../FEM/src/itkFEMItpackSparseMatrix.cxx | 24 +- .../FEM/src/itkFEMLinearSystemWrapper.cxx | 28 +- .../src/itkFEMLinearSystemWrapperItpack.cxx | 30 +- .../FEM/src/itkFEMLinearSystemWrapperVNL.cxx | 2 +- Modules/Numerics/FEM/src/itkFEMLoadBC.cxx | 2 +- Modules/Numerics/FEM/src/itkFEMLoadBCMFC.cxx | 2 +- Modules/Numerics/FEM/src/itkFEMLoadEdge.cxx | 4 +- .../FEM/src/itkFEMLoadElementBase.cxx | 2 +- Modules/Numerics/FEM/src/itkFEMLoadGrav.cxx | 2 +- .../Numerics/FEM/src/itkFEMLoadLandmark.cxx | 2 +- Modules/Numerics/FEM/src/itkFEMLoadNode.cxx | 2 +- Modules/Numerics/FEM/src/itkFEMLoadPoint.cxx | 2 +- .../src/itkFEMMaterialLinearElasticity.cxx | 2 +- Modules/Numerics/FEM/src/itkFEMUtility.cxx | 2 +- .../itkFEMElement2DC0LinearLineStressTest.cxx | 4 +- ...DC0LinearQuadrilateralStrainItpackTest.cxx | 2 +- .../FEM/test/itkFEMElement2DC1BeamTest.cxx | 2 +- .../FEM/test/itkFEMElement2DMembraneTest.cxx | 2 +- ...itkFEMElement2DQuadraticTriangularTest.cxx | 2 +- .../FEM/test/itkFEMElement2DStrainTest.cxx | 2 +- .../Numerics/FEM/test/itkFEMElement2DTest.cxx | 8 +- ...lement3DC0LinearHexahedronMembraneTest.cxx | 4 +- ...MElement3DC0LinearHexahedronStrainTest.cxx | 10 +- ...ement3DC0LinearTetrahedronMembraneTest.cxx | 2 +- ...Element3DC0LinearTetrahedronStrainTest.cxx | 2 +- .../FEM/test/itkFEMElement3DMembraneTest.cxx | 2 +- .../Numerics/FEM/test/itkFEMElement3DTest.cxx | 8 +- .../Numerics/FEM/test/itkFEMElementTest.cxx | 16 +- .../FEM/test/itkFEMGenerateMeshTest.cxx | 2 +- .../itkFEMLinearSystemWrapperItpackTest.cxx | 2 +- .../Numerics/FEM/test/itkFEMLoadBCMFCTest.cxx | 2 +- .../FEM/test/itkFEMLoadBCMFCTestUser.cxx | 2 +- .../Numerics/FEM/test/itkFEMLoadEdgeTest.cxx | 2 +- .../FEM/test/itkFEMLoadGravConstTest.cxx | 2 +- .../FEM/test/itkFEMLoadPointTestUser.cxx | 6 +- .../Numerics/FEM/test/itkFEMPArrayTest.cxx | 2 +- .../FEM/test/itkFEMRobustSolverTest.cxx | 6 +- ...ScatteredDataPointSetToImageFilterTest.cxx | 4 +- .../FEM/test/itkFEMSolverHyperbolicTest.cxx | 14 +- .../Numerics/FEM/test/itkFEMSolverTest2D.cxx | 2 +- .../Numerics/FEM/test/itkFEMSolverTest3D.cxx | 4 +- ...mageToRectilinearFEMObjectFilter2DTest.cxx | 16 +- ...mageToRectilinearFEMObjectFilter3DTest.cxx | 16 +- .../NarrowBand/include/itkNarrowBand.h | 4 +- .../NarrowBand/include/itkNarrowBand.hxx | 4 +- .../include/itkNarrowBandImageFilterBase.hxx | 24 +- .../test/itkNarrowBandImageFilterBaseTest.cxx | 12 +- .../NarrowBand/test/itkNarrowBandTest.cxx | 6 +- .../Optimizers/include/itkAmoebaOptimizer.h | 12 +- .../include/itkConjugateGradientOptimizer.h | 2 +- .../itkCumulativeGaussianCostFunction.h | 4 +- .../include/itkCumulativeGaussianOptimizer.h | 2 +- .../Optimizers/include/itkFRPROptimizer.h | 2 +- .../include/itkGradientDescentOptimizer.h | 8 +- .../Optimizers/include/itkLBFGSBOptimizer.h | 16 +- .../Optimizers/include/itkLBFGSOptimizer.h | 12 +- .../include/itkLevenbergMarquardtOptimizer.h | 10 +- .../itkMultipleValuedNonLinearVnlOptimizer.h | 4 +- .../itkMultipleValuedVnlCostFunctionAdaptor.h | 6 +- .../itkOnePlusOneEvolutionaryOptimizer.h | 2 +- .../Optimizers/include/itkOptimizer.h | 4 +- .../include/itkParticleSwarmOptimizerBase.h | 38 +- .../Optimizers/include/itkPowellOptimizer.h | 32 +- ...kRegularStepGradientDescentBaseOptimizer.h | 22 +- .../Optimizers/include/itkSPSAOptimizer.h | 12 +- .../itkSingleValuedNonLinearVnlOptimizer.h | 2 +- .../itkSingleValuedVnlCostFunctionAdaptor.h | 10 +- .../Optimizers/src/itkAmoebaOptimizer.cxx | 18 +- .../src/itkCumulativeGaussianCostFunction.cxx | 2 +- .../src/itkCumulativeGaussianOptimizer.cxx | 10 +- .../Optimizers/src/itkExhaustiveOptimizer.cxx | 2 +- ...ializationBiasedParticleSwarmOptimizer.cxx | 2 +- .../Optimizers/src/itkLBFGSOptimizer.cxx | 2 +- .../src/itkLevenbergMarquardtOptimizer.cxx | 2 +- ...tkMultipleValuedVnlCostFunctionAdaptor.cxx | 10 +- .../src/itkParticleSwarmOptimizer.cxx | 2 +- .../src/itkParticleSwarmOptimizerBase.cxx | 16 +- .../Optimizers/src/itkPowellOptimizer.cxx | 42 +- ...RigidTransformGradientDescentOptimizer.cxx | 2 +- ...egularStepGradientDescentBaseOptimizer.cxx | 4 +- .../Optimizers/src/itkSPSAOptimizer.cxx | 2 +- .../src/itkSingleValuedCostFunction.cxx | 4 +- .../itkSingleValuedVnlCostFunctionAdaptor.cxx | 10 +- .../src/itkVersorTransformOptimizer.cxx | 2 +- .../test/itkAmoebaOptimizerTest.cxx | 10 +- .../itkConjugateGradientOptimizerTest.cxx | 4 +- .../itkCumulativeGaussianOptimizerTest.cxx | 2 +- .../test/itkExhaustiveOptimizerTest.cxx | 4 +- .../Optimizers/test/itkFRPROptimizerTest.cxx | 4 +- .../test/itkGradientDescentOptimizerTest.cxx | 2 +- ...zationBiasedParticleSwarmOptimizerTest.cxx | 30 +- .../test/itkLBFGSBOptimizerTest.cxx | 10 +- .../Optimizers/test/itkLBFGSOptimizerTest.cxx | 4 +- .../itkLevenbergMarquardtOptimizerTest.cxx | 16 +- ...itkOnePlusOneEvolutionaryOptimizerTest.cxx | 2 +- .../test/itkOptimizersHierarchyTest.cxx | 6 +- .../test/itkParticleSwarmOptimizerTest.cxx | 32 +- .../itkParticleSwarmOptimizerTestFunctions.h | 2 +- .../test/itkPowellOptimizerTest.cxx | 2 +- ...egularStepGradientDescentOptimizerTest.cxx | 2 +- .../Optimizers/test/itkSPSAOptimizerTest.cxx | 2 +- ...itkVersorRigid3DTransformOptimizerTest.cxx | 10 +- .../test/itkVersorTransformOptimizerTest.cxx | 6 +- .../include/itkAmoebaOptimizerv4.h | 10 +- ...ConjugateGradientLineSearchOptimizerv4.hxx | 2 +- .../include/itkExhaustiveOptimizerv4.h | 12 +- .../include/itkExhaustiveOptimizerv4.hxx | 2 +- ...tkGradientDescentLineSearchOptimizerv4.hxx | 6 +- .../itkGradientDescentOptimizerBasev4.h | 4 +- ...v4ModifyGradientByLearningRateThreader.hxx | 2 +- ...erBasev4ModifyGradientByScalesThreader.hxx | 2 +- .../include/itkGradientDescentOptimizerv4.h | 2 +- .../include/itkLBFGS2Optimizerv4.h | 46 +- .../include/itkLBFGS2Optimizerv4.hxx | 30 +- .../include/itkLBFGSBOptimizerv4.h | 6 +- .../include/itkLBFGSOptimizerBasev4.h | 8 +- .../include/itkLBFGSOptimizerv4.h | 2 +- .../include/itkMultiGradientOptimizerv4.h | 12 +- .../include/itkMultiStartOptimizerv4.h | 16 +- .../include/itkObjectToObjectMetric.h | 12 +- .../include/itkObjectToObjectMetric.hxx | 22 +- .../include/itkObjectToObjectMetricBase.h | 2 +- .../include/itkObjectToObjectOptimizerBase.h | 8 +- .../itkOnePlusOneEvolutionaryOptimizerv4.h | 2 +- .../include/itkPowellOptimizerv4.h | 32 +- .../include/itkPowellOptimizerv4.hxx | 44 +- .../include/itkQuasiNewtonOptimizerv4.h | 6 +- .../include/itkQuasiNewtonOptimizerv4.hxx | 6 +- ...nOptimizerv4EstimateNewtonStepThreader.hxx | 2 +- ...tkRegistrationParameterScalesEstimator.hxx | 18 +- ...istrationParameterScalesFromIndexShift.hxx | 6 +- ...egistrationParameterScalesFromJacobian.hxx | 12 +- ...rationParameterScalesFromPhysicalShift.hxx | 6 +- ...gistrationParameterScalesFromShiftBase.hxx | 6 +- .../itkSingleValuedVnlCostFunctionAdaptorv4.h | 8 +- ...itkWindowConvergenceMonitoringFunction.hxx | 4 +- .../Optimizersv4/src/itkAmoebaOptimizerv4.cxx | 10 +- .../Optimizersv4/src/itkLBFGSOptimizerv4.cxx | 2 +- .../src/itkObjectToObjectOptimizerBase.cxx | 6 +- ...tkSingleValuedVnlCostFunctionAdaptorv4.cxx | 10 +- .../test/itkAmoebaOptimizerv4Test.cxx | 12 +- ...radientDescentRegistrationOnVectorTest.cxx | 12 +- ...oScaledGradientDescentRegistrationTest.cxx | 28 +- ...ugateGradientLineSearchOptimizerv4Test.cxx | 2 +- .../test/itkExhaustiveOptimizerv4Test.cxx | 8 +- ...adientDescentLineSearchOptimizerv4Test.cxx | 2 +- .../itkGradientDescentOptimizerv4Test.cxx | 2 +- .../itkGradientDescentOptimizerv4Test2.cxx | 2 +- .../test/itkLBFGS2Optimizerv4Test.cxx | 6 +- .../test/itkLBFGSBOptimizerv4Test.cxx | 12 +- .../test/itkLBFGSOptimizerv4Test.cxx | 6 +- .../test/itkMultiGradientOptimizerv4Test.cxx | 4 +- ...kOnePlusOneEvolutionaryOptimizerv4Test.cxx | 4 +- .../test/itkPowellOptimizerv4Test.cxx | 4 +- .../test/itkQuasiNewtonOptimizerv4Test.cxx | 14 +- ...gistrationParameterScalesEstimatorTest.cxx | 4 +- ...ationParameterScalesFromIndexShiftTest.cxx | 6 +- ...trationParameterScalesFromJacobianTest.cxx | 10 +- ...terScalesFromPhysicalShiftPointSetTest.cxx | 6 +- ...onParameterScalesFromPhysicalShiftTest.cxx | 6 +- ...ularStepGradientDescentOptimizerv4Test.cxx | 22 +- .../itkMultivariateLegendrePolynomial.h | 20 +- .../src/itkMultivariateLegendrePolynomial.cxx | 10 +- .../include/itkCovarianceSampleFilter.hxx | 2 +- .../include/itkDenseFrequencyContainer2.h | 2 +- ...tkDistanceToCentroidMembershipFunction.hxx | 2 +- ...ctationMaximizationMixtureModelEstimator.h | 8 +- ...ationMaximizationMixtureModelEstimator.hxx | 18 +- .../include/itkGaussianMembershipFunction.h | 2 +- .../include/itkGaussianMembershipFunction.hxx | 2 +- .../itkGaussianMixtureModelComponent.hxx | 10 +- .../Statistics/include/itkHistogram.h | 6 +- .../Statistics/include/itkHistogram.hxx | 48 +- .../include/itkHistogramToImageFilter.hxx | 8 +- .../itkHistogramToRunLengthFeaturesFilter.hxx | 2 +- .../itkHistogramToTextureFeaturesFilter.hxx | 8 +- .../include/itkImageClassifierFilter.hxx | 2 +- .../include/itkImageToHistogramFilter.h | 2 +- .../include/itkImageToHistogramFilter.hxx | 12 +- .../include/itkImageToListSampleAdaptor.h | 14 +- .../include/itkImageToListSampleFilter.hxx | 2 +- .../itkImageToNeighborhoodSampleAdaptor.h | 16 +- .../itkJointDomainImageToListSampleAdaptor.h | 16 +- .../include/itkKalmanLinearEstimator.h | 2 +- .../Numerics/Statistics/include/itkKdTree.h | 26 +- .../Numerics/Statistics/include/itkKdTree.hxx | 76 +-- .../include/itkKdTreeBasedKmeansEstimator.h | 18 +- .../include/itkKdTreeBasedKmeansEstimator.hxx | 22 +- .../Statistics/include/itkKdTreeGenerator.h | 12 +- .../Statistics/include/itkKdTreeGenerator.hxx | 22 +- .../Statistics/include/itkListSample.h | 2 +- .../Statistics/include/itkListSample.hxx | 4 +- ...itkMahalanobisDistanceMembershipFunction.h | 2 +- ...kMahalanobisDistanceMembershipFunction.hxx | 2 +- .../include/itkMahalanobisDistanceMetric.h | 2 +- .../itkMaskedImageToHistogramFilter.hxx | 10 +- .../include/itkMeanSampleFilter.hxx | 2 +- .../include/itkMeasurementVectorTraits.h | 16 +- .../Statistics/include/itkMembershipSample.h | 12 +- .../include/itkNormalVariateGenerator.h | 10 +- .../include/itkPointSetToListSampleAdaptor.h | 2 +- .../include/itkRegionConstrainedSubsampler.h | 4 +- .../include/itkSampleClassifierFilter.hxx | 2 +- .../include/itkSampleToHistogramFilter.hxx | 4 +- ...itkScalarImageToCooccurrenceMatrixFilter.h | 8 +- ...kScalarImageToCooccurrenceMatrixFilter.hxx | 16 +- .../itkScalarImageToRunLengthFeaturesFilter.h | 8 +- ...tkScalarImageToRunLengthFeaturesFilter.hxx | 6 +- .../itkScalarImageToRunLengthMatrixFilter.h | 12 +- .../itkScalarImageToRunLengthMatrixFilter.hxx | 12 +- .../itkScalarImageToTextureFeaturesFilter.h | 8 +- .../itkScalarImageToTextureFeaturesFilter.hxx | 8 +- .../include/itkSparseFrequencyContainer2.h | 2 +- .../include/itkSpatialNeighborSubsampler.h | 2 +- .../include/itkSpatialNeighborSubsampler.hxx | 14 +- ...ndardDeviationPerComponentSampleFilter.hxx | 2 +- .../include/itkStatisticsAlgorithm.h | 38 +- .../include/itkStatisticsAlgorithm.hxx | 66 +- .../Statistics/include/itkSubsample.h | 8 +- .../Statistics/include/itkSubsample.hxx | 4 +- .../Statistics/include/itkSubsamplerBase.h | 6 +- ...tkUniformRandomSpatialNeighborSubsampler.h | 4 +- ...UniformRandomSpatialNeighborSubsampler.hxx | 8 +- .../itkVectorContainerToListSampleAdaptor.h | 2 +- .../itkWeightedCentroidKdTreeGenerator.h | 6 +- .../itkWeightedCentroidKdTreeGenerator.hxx | 18 +- .../itkWeightedCovarianceSampleFilter.hxx | 4 +- .../include/itkWeightedMeanSampleFilter.hxx | 4 +- .../src/itkChiSquareDistribution.cxx | 6 +- .../src/itkGaussianDistribution.cxx | 6 +- .../src/itkNormalVariateGenerator.cxx | 36 +- .../Statistics/src/itkTDistribution.cxx | 14 +- .../test/itkChiSquareDistributionTest.cxx | 2 +- .../test/itkCovarianceSampleFilterTest.cxx | 10 +- .../test/itkCovarianceSampleFilterTest2.cxx | 4 +- .../test/itkCovarianceSampleFilterTest3.cxx | 8 +- .../test/itkDenseFrequencyContainer2Test.cxx | 8 +- .../Statistics/test/itkDistanceMetricTest.cxx | 2 +- .../test/itkDistanceMetricTest2.cxx | 2 +- ...stanceToCentroidMembershipFunctionTest.cxx | 2 +- .../test/itkEuclideanDistanceMetricTest.cxx | 4 +- .../itkEuclideanSquareDistanceMetricTest.cxx | 4 +- ...nMaximizationMixtureModelEstimatorTest.cxx | 20 +- .../test/itkGaussianDistributionTest.cxx | 4 +- .../itkGaussianMembershipFunctionTest.cxx | 2 +- .../itkGaussianMixtureModelComponentTest.cxx | 10 +- ...ianRandomSpatialNeighborSubsamplerTest.cxx | 6 +- .../Statistics/test/itkHistogramTest.cxx | 24 +- ...istogramToTextureFeaturesFilterNaNTest.cxx | 4 +- ...tkHistogramToTextureFeaturesFilterTest.cxx | 2 +- .../test/itkImageToHistogramFilterTest.cxx | 8 +- .../test/itkImageToHistogramFilterTest2.cxx | 2 +- .../test/itkImageToListSampleAdaptorTest.cxx | 4 +- .../test/itkImageToListSampleAdaptorTest2.cxx | 6 +- .../test/itkImageToListSampleFilterTest.cxx | 16 +- .../test/itkImageToListSampleFilterTest2.cxx | 8 +- .../test/itkImageToListSampleFilterTest3.cxx | 6 +- ...ointDomainImageToListSampleAdaptorTest.cxx | 6 +- .../test/itkKalmanLinearEstimatorTest.cxx | 2 +- .../itkKdTreeBasedKmeansEstimatorTest.cxx | 18 +- .../test/itkKdTreeGeneratorTest.cxx | 12 +- .../Statistics/test/itkKdTreeTest1.cxx | 4 +- .../Statistics/test/itkKdTreeTest2.cxx | 2 +- .../Statistics/test/itkKdTreeTest3.cxx | 2 +- .../test/itkKdTreeTestSamplePoints.cxx | 4 +- .../Statistics/test/itkListSampleTest.cxx | 12 +- .../test/itkMahalanobisDistanceMetricTest.cxx | 2 +- .../test/itkManhattanDistanceMetricTest.cxx | 4 +- .../test/itkMeanSampleFilterTest.cxx | 4 +- .../test/itkMeanSampleFilterTest2.cxx | 4 +- .../test/itkMeanSampleFilterTest3.cxx | 6 +- .../test/itkMeasurementVectorTraitsTest.cxx | 2 +- .../test/itkMembershipSampleTest1.cxx | 4 +- .../test/itkMembershipSampleTest2.cxx | 4 +- .../test/itkMembershipSampleTest3.cxx | 4 +- .../test/itkMembershipSampleTest4.cxx | 4 +- .../itkPointSetToListSampleAdaptorTest.cxx | 6 +- .../Statistics/test/itkSampleTest.cxx | 4 +- .../Statistics/test/itkSampleTest2.cxx | 4 +- .../Statistics/test/itkSampleTest3.cxx | 4 +- .../Statistics/test/itkSampleTest4.cxx | 4 +- .../test/itkSampleToHistogramFilterTest3.cxx | 2 +- .../test/itkSampleToHistogramFilterTest4.cxx | 2 +- .../test/itkSampleToHistogramFilterTest5.cxx | 2 +- .../test/itkSampleToHistogramFilterTest6.cxx | 2 +- .../test/itkSampleToHistogramFilterTest7.cxx | 2 +- ...mageToCooccurrenceListSampleFilterTest.cxx | 2 +- ...larImageToCooccurrenceMatrixFilterTest.cxx | 6 +- ...arImageToCooccurrenceMatrixFilterTest2.cxx | 6 +- ...alarImageToRunLengthFeaturesFilterTest.cxx | 2 +- ...ScalarImageToRunLengthMatrixFilterTest.cxx | 4 +- ...ScalarImageToTextureFeaturesFilterTest.cxx | 2 +- .../test/itkSparseFrequencyContainer2Test.cxx | 4 +- .../test/itkSpatialNeighborSubsamplerTest.cxx | 8 +- ...dDeviationPerComponentSampleFilterTest.cxx | 8 +- .../test/itkStatisticsAlgorithmTest2.cxx | 8 +- .../Statistics/test/itkSubsampleTest.cxx | 14 +- .../Statistics/test/itkSubsampleTest2.cxx | 10 +- .../Statistics/test/itkSubsampleTest3.cxx | 2 +- .../Statistics/test/itkTDistributionTest.cxx | 4 +- ...ormRandomSpatialNeighborSubsamplerTest.cxx | 10 +- ...VectorContainerToListSampleAdaptorTest.cxx | 8 +- ...tkWeightedCentroidKdTreeGeneratorTest1.cxx | 4 +- ...tkWeightedCentroidKdTreeGeneratorTest8.cxx | 8 +- ...tkWeightedCentroidKdTreeGeneratorTest9.cxx | 4 +- .../itkWeightedCovarianceSampleFilterTest.cxx | 2 +- ...itkWeightedCovarianceSampleFilterTest2.cxx | 2 +- .../test/itkWeightedMeanSampleFilterTest.cxx | 2 +- ...lDiffeomorphicTransformParametersAdaptor.h | 4 +- ...placementFieldTransformParametersAdaptor.h | 4 +- ...acementFieldTransformParametersAdaptor.hxx | 2 +- .../itkBSplineTransformParametersAdaptor.h | 6 +- .../itkBSplineTransformParametersAdaptor.hxx | 8 +- .../include/itkBlockMatchingImageFilter.h | 4 +- .../include/itkBlockMatchingImageFilter.hxx | 18 +- .../include/itkCenteredTransformInitializer.h | 2 +- .../itkCenteredTransformInitializer.hxx | 10 +- .../itkCenteredVersorTransformInitializer.hxx | 2 +- .../itkCompareHistogramImageToImageMetric.h | 10 +- .../itkCompareHistogramImageToImageMetric.hxx | 2 +- ...elocityFieldTransformParametersAdaptor.hxx | 6 +- ...CoefficientHistogramImageToImageMetric.hxx | 6 +- ...acementFieldTransformParametersAdaptor.hxx | 6 +- .../include/itkEuclideanDistancePointMetric.h | 6 +- .../itkEuclideanDistancePointMetric.hxx | 14 +- ...lDiffeomorphicTransformParametersAdaptor.h | 4 +- ...iffeomorphicTransformParametersAdaptor.hxx | 2 +- ...acementFieldTransformParametersAdaptor.hxx | 2 +- .../itkGradientDifferenceImageToImageMetric.h | 4 +- ...tkGradientDifferenceImageToImageMetric.hxx | 16 +- .../include/itkHistogramImageToImageMetric.h | 10 +- .../itkHistogramImageToImageMetric.hxx | 18 +- .../include/itkImageRegistrationMethod.h | 8 +- .../itkImageRegistrationMethodImageSource.h | 6 +- .../Common/include/itkImageToImageMetric.h | 62 +- .../Common/include/itkImageToImageMetric.hxx | 52 +- .../include/itkImageToSpatialObjectMetric.h | 14 +- ...tkImageToSpatialObjectRegistrationMethod.h | 6 +- ...ImageToSpatialObjectRegistrationMethod.hxx | 2 +- .../itkKappaStatisticImageToImageMetric.h | 6 +- .../itkKappaStatisticImageToImageMetric.hxx | 16 +- ...blerCompareHistogramImageToImageMetric.hxx | 6 +- .../itkLandmarkBasedTransformInitializer.h | 6 +- .../itkLandmarkBasedTransformInitializer.hxx | 24 +- .../itkMatchCardinalityImageToImageMetric.h | 4 +- .../itkMatchCardinalityImageToImageMetric.hxx | 14 +- ...attesMutualInformationImageToImageMetric.h | 44 +- ...tesMutualInformationImageToImageMetric.hxx | 56 +- ...procalSquareDifferenceImageToImageMetric.h | 4 +- ...ocalSquareDifferenceImageToImageMetric.hxx | 8 +- ...calSquareDifferencePointSetToImageMetric.h | 4 +- ...lSquareDifferencePointSetToImageMetric.hxx | 20 +- .../itkMeanSquareRegistrationFunction.h | 4 +- .../itkMeanSquareRegistrationFunction.hxx | 18 +- ...MeanSquaresHistogramImageToImageMetric.hxx | 6 +- .../itkMeanSquaresImageToImageMetric.h | 20 +- .../itkMeanSquaresImageToImageMetric.hxx | 18 +- .../itkMeanSquaresPointSetToImageMetric.h | 4 +- .../itkMeanSquaresPointSetToImageMetric.hxx | 18 +- ...tkMultiResolutionImageRegistrationMethod.h | 10 +- ...MultiResolutionImageRegistrationMethod.hxx | 4 +- .../itkMultiResolutionPyramidImageFilter.hxx | 28 +- ...InformationHistogramImageToImageMetric.hxx | 2 +- .../itkMutualInformationImageToImageMetric.h | 14 +- ...itkMutualInformationImageToImageMetric.hxx | 26 +- ...kNormalizedCorrelationImageToImageMetric.h | 4 +- ...ormalizedCorrelationImageToImageMetric.hxx | 6 +- ...rmalizedCorrelationPointSetToImageMetric.h | 4 +- ...alizedCorrelationPointSetToImageMetric.hxx | 18 +- ...InformationHistogramImageToImageMetric.hxx | 2 +- .../include/itkPointSetToImageMetric.hxx | 2 +- .../itkPointSetToImageRegistrationMethod.h | 6 +- .../itkPointSetToPointSetRegistrationMethod.h | 4 +- ...ointSetToSpatialObjectDemonsRegistration.h | 2 +- ...ntSetToSpatialObjectDemonsRegistration.hxx | 2 +- .../Common/include/itkPointsLocator.h | 6 +- .../Common/include/itkPointsLocator.hxx | 14 +- ...rsiveMultiResolutionPyramidImageFilter.hxx | 14 +- ...SimpleMultiResolutionImageRegistrationUI.h | 4 +- ...eVelocityFieldTransformParametersAdaptor.h | 8 +- ...elocityFieldTransformParametersAdaptor.hxx | 8 +- ...elocityFieldTransformParametersAdaptor.hxx | 6 +- .../DeformableRegistration10.cxx | 10 +- .../DeformableRegistration12.cxx | 22 +- .../DeformableRegistration4.cxx | 18 +- .../DeformableRegistration6.cxx | 16 +- .../DeformableRegistration7.cxx | 22 +- .../DeformableRegistration8.cxx | 24 +- .../RegistrationITKv3/ImageRegistration1.cxx | 10 +- .../RegistrationITKv3/ImageRegistration11.cxx | 8 +- .../RegistrationITKv3/ImageRegistration12.cxx | 12 +- .../RegistrationITKv3/ImageRegistration13.cxx | 6 +- .../RegistrationITKv3/ImageRegistration14.cxx | 22 +- .../RegistrationITKv3/ImageRegistration3.cxx | 8 +- .../RegistrationITKv3/ImageRegistration4.cxx | 8 +- .../RegistrationITKv3/ImageRegistration5.cxx | 20 +- .../RegistrationITKv3/ImageRegistration6.cxx | 12 +- .../RegistrationITKv3/ImageRegistration7.cxx | 10 +- .../RegistrationITKv3/ImageRegistration8.cxx | 28 +- .../RegistrationITKv3/ImageRegistration9.cxx | 14 +- .../MultiResImageRegistration1.cxx | 22 +- ...omorphicTransformParametersAdaptorTest.cxx | 8 +- ...entFieldTransformParametersAdaptorTest.cxx | 8 +- ...kBSplineTransformParametersAdaptorTest.cxx | 2 +- .../test/itkBlockMatchingImageFilterTest.cxx | 6 +- .../itkCenteredTransformInitializerTest.cxx | 30 +- ...CenteredVersorTransformInitializerTest.cxx | 6 +- ...CompareHistogramImageToImageMetricTest.cxx | 12 +- ...ficientHistogramImageToImageMetricTest.cxx | 12 +- ...entFieldTransformParametersAdaptorTest.cxx | 8 +- ...omorphicTransformParametersAdaptorTest.cxx | 8 +- ...entFieldTransformParametersAdaptorTest.cxx | 8 +- ...adientDifferenceImageToImageMetricTest.cxx | 10 +- .../itkHistogramImageToImageMetricTest.cxx | 16 +- .../test/itkImageRegistrationMethodTest_1.cxx | 6 +- .../itkImageRegistrationMethodTest_10.cxx | 12 +- .../itkImageRegistrationMethodTest_11.cxx | 10 +- .../itkImageRegistrationMethodTest_12.cxx | 10 +- .../itkImageRegistrationMethodTest_13.cxx | 20 +- .../itkImageRegistrationMethodTest_14.cxx | 16 +- .../itkImageRegistrationMethodTest_15.cxx | 20 +- .../itkImageRegistrationMethodTest_16.cxx | 8 +- .../itkImageRegistrationMethodTest_17.cxx | 20 +- .../test/itkImageRegistrationMethodTest_2.cxx | 12 +- .../test/itkImageRegistrationMethodTest_3.cxx | 6 +- .../test/itkImageRegistrationMethodTest_4.cxx | 10 +- .../test/itkImageRegistrationMethodTest_5.cxx | 8 +- .../test/itkImageRegistrationMethodTest_6.cxx | 12 +- .../test/itkImageRegistrationMethodTest_7.cxx | 6 +- .../test/itkImageRegistrationMethodTest_8.cxx | 10 +- .../test/itkImageRegistrationMethodTest_9.cxx | 4 +- ...tkImageToSpatialObjectRegistrationTest.cxx | 6 +- ...tkKappaStatisticImageToImageMetricTest.cxx | 2 +- ...CompareHistogramImageToImageMetricTest.cxx | 20 +- ...kLandmarkBasedTransformInitializerTest.cxx | 30 +- ...MatchCardinalityImageToImageMetricTest.cxx | 2 +- ...utualInformationImageToImageMetricTest.cxx | 44 +- ...iprocalSquareDifferenceImageMetricTest.cxx | 10 +- ...areDifferencePointSetToImageMetricTest.cxx | 14 +- ...SquaresHistogramImageToImageMetricTest.cxx | 12 +- .../test/itkMeanSquaresImageMetricTest.cxx | 12 +- ...tkMeanSquaresPointSetToImageMetricTest.cxx | 14 +- ...esolutionImageRegistrationMethodTest_1.cxx | 22 +- ...esolutionImageRegistrationMethodTest_2.cxx | 14 +- ...kMultiResolutionPyramidImageFilterTest.cxx | 18 +- ...rmationHistogramImageToImageMetricTest.cxx | 12 +- .../test/itkMutualInformationMetricTest.cxx | 12 +- ...tkNormalizedCorrelationImageMetricTest.cxx | 10 +- ...edCorrelationPointSetToImageMetricTest.cxx | 12 +- ...rmationHistogramImageToImageMetricTest.cxx | 12 +- .../itkPointSetToImageRegistrationTest.cxx | 10 +- .../itkPointSetToPointSetRegistrationTest.cxx | 6 +- ...eMultiResolutionPyramidImageFilterTest.cxx | 20 +- .../itkFEMFiniteDifferenceFunctionLoad.h | 22 +- .../itkFEMFiniteDifferenceFunctionLoad.hxx | 10 +- .../FEM/include/itkFEMRegistrationFilter.h | 62 +- .../FEM/include/itkFEMRegistrationFilter.hxx | 60 +- .../FEM/include/itkMIRegistrationFunction.h | 8 +- .../FEM/include/itkMIRegistrationFunction.hxx | 38 +- .../FEM/include/itkNCCRegistrationFunction.h | 4 +- .../include/itkNCCRegistrationFunction.hxx | 18 +- ...tkPhysicsBasedNonRigidRegistrationMethod.h | 12 +- ...PhysicsBasedNonRigidRegistrationMethod.hxx | 2 +- ...itkFEMFiniteDifferenceFunctionLoadTest.cxx | 28 +- .../test/itkFEMRegistrationFilter2DTest.cxx | 16 +- .../FEM/test/itkFEMRegistrationFilterTest.cxx | 16 +- .../test/itkFEMRegistrationFilterTest2.cxx | 18 +- .../test/itkMIRegistrationFunctionTest.cxx | 8 +- .../FEM/test/itkVTKTetrahedralMeshReader.hxx | 2 +- .../itkGPUDemonsRegistrationFilter.hxx | 2 +- .../itkGPUDemonsRegistrationFunction.h | 22 +- .../itkGPUDemonsRegistrationFunction.hxx | 16 +- .../itkGPUPDEDeformableRegistrationFilter.h | 14 +- .../itkGPUPDEDeformableRegistrationFilter.hxx | 16 +- .../itkGPUDemonsRegistrationFilterTest.cxx | 28 +- .../itkGPUDemonsRegistrationFilterTest2.cxx | 16 +- ...ageMetricv4GetValueAndDerivativeThreader.h | 96 +-- ...eMetricv4GetValueAndDerivativeThreader.hxx | 100 +-- .../itkCorrelationImageToImageMetricv4.h | 6 +- ...ageMetricv4GetValueAndDerivativeThreader.h | 38 +- ...eMetricv4GetValueAndDerivativeThreader.hxx | 34 +- ...lationImageToImageMetricv4HelperThreader.h | 2 +- ...tionImageToImageMetricv4HelperThreader.hxx | 8 +- .../include/itkDemonsImageToImageMetricv4.hxx | 2 +- ...ageMetricv4GetValueAndDerivativeThreader.h | 20 +- ...eMetricv4GetValueAndDerivativeThreader.hxx | 12 +- ...deanDistancePointSetToPointSetMetricv4.hxx | 8 +- ...pectationBasedPointSetToPointSetMetricv4.h | 6 +- ...ctationBasedPointSetToPointSetMetricv4.hxx | 14 +- .../include/itkImageToImageMetricv4.h | 38 +- .../include/itkImageToImageMetricv4.hxx | 16 +- ...eMetricv4GetValueAndDerivativeThreader.hxx | 6 +- ...etricv4GetValueAndDerivativeThreaderBase.h | 22 +- ...ricv4GetValueAndDerivativeThreaderBase.hxx | 16 +- ...CharvatTsallisPointSetToPointSetMetricv4.h | 12 +- ...arvatTsallisPointSetToPointSetMetricv4.hxx | 18 +- ...alInformationComputeJointPDFThreaderBase.h | 4 +- ...InformationComputeJointPDFThreaderBase.hxx | 8 +- ...InformationGetValueAndDerivativeThreader.h | 26 +- ...formationGetValueAndDerivativeThreader.hxx | 26 +- ...ramMutualInformationImageToImageMetricv4.h | 12 +- ...mMutualInformationImageToImageMetricv4.hxx | 12 +- .../itkLabeledPointSetToPointSetMetricv4.h | 2 +- .../itkLabeledPointSetToPointSetMetricv4.hxx | 16 +- ...itkManifoldParzenWindowsPointSetFunction.h | 8 +- ...kManifoldParzenWindowsPointSetFunction.hxx | 2 +- ...tesMutualInformationImageToImageMetricv4.h | 40 +- ...sMutualInformationImageToImageMetricv4.hxx | 28 +- ...ageMetricv4GetValueAndDerivativeThreader.h | 26 +- ...eMetricv4GetValueAndDerivativeThreader.hxx | 14 +- .../itkMeanSquaresImageToImageMetricv4.h | 4 +- ...ageMetricv4GetValueAndDerivativeThreader.h | 20 +- ...eMetricv4GetValueAndDerivativeThreader.hxx | 10 +- .../include/itkObjectToObjectMultiMetricv4.h | 4 +- .../itkObjectToObjectMultiMetricv4.hxx | 6 +- .../itkPointSetToPointSetMetricWithIndexv4.h | 4 +- ...itkPointSetToPointSetMetricWithIndexv4.hxx | 36 +- .../include/itkPointSetToPointSetMetricv4.h | 6 +- .../include/itkPointSetToPointSetMetricv4.hxx | 2 +- ...oodCorrelationImageToImageMetricv4Test.cxx | 16 +- ...orrelationImageToImageRegistrationTest.cxx | 8 +- ...itkCorrelationImageToImageMetricv4Test.cxx | 26 +- ...nsImageToImageMetricv4RegistrationTest.cxx | 10 +- .../itkDemonsImageToImageMetricv4Test.cxx | 6 +- ...DistancePointSetMetricRegistrationTest.cxx | 16 +- ...itkEuclideanDistancePointSetMetricTest.cxx | 6 +- ...tkEuclideanDistancePointSetMetricTest2.cxx | 12 +- ...tkEuclideanDistancePointSetMetricTest3.cxx | 6 +- ...ionBasedPointSetMetricRegistrationTest.cxx | 6 +- .../itkExpectationBasedPointSetMetricTest.cxx | 6 +- ...tkImageToImageMetricv4RegistrationTest.cxx | 28 +- .../test/itkImageToImageMetricv4Test.cxx | 56 +- ...tTsallisPointSetMetricRegistrationTest.cxx | 6 +- ...HavrdaCharvatTsallisPointSetMetricTest.cxx | 10 +- ...ualInformationImageToImageMetricv4Test.cxx | 6 +- ...nformationImageToImageRegistrationTest.cxx | 20 +- ...kLabeledPointSetMetricRegistrationTest.cxx | 8 +- .../test/itkLabeledPointSetMetricTest.cxx | 6 +- ...onImageToImageMetricv4RegistrationTest.cxx | 10 +- ...ualInformationImageToImageMetricv4Test.cxx | 28 +- ...quaresImageToImageMetricv4OnVectorTest.cxx | 6 +- ...uaresImageToImageMetricv4OnVectorTest2.cxx | 12 +- ...esImageToImageMetricv4RegistrationTest.cxx | 10 +- ...sImageToImageMetricv4RegistrationTest2.cxx | 8 +- ...anSquaresImageToImageMetricv4SpeedTest.cxx | 6 +- ...itkMeanSquaresImageToImageMetricv4Test.cxx | 6 +- ...eToImageMetricv4VectorRegistrationTest.cxx | 10 +- .../test/itkMetricImageGradientTest.cxx | 66 +- ...ntImageToImageMetricv4RegistrationTest.cxx | 8 +- ...rtImageToImageMetricv4RegistrationTest.cxx | 10 +- ...tToObjectMultiMetricv4RegistrationTest.cxx | 26 +- .../itkObjectToObjectMultiMetricv4Test.cxx | 12 +- .../itkCurvatureRegistrationFilter.hxx | 10 +- .../include/itkDemonsRegistrationFilter.hxx | 2 +- .../include/itkDemonsRegistrationFunction.h | 16 +- .../include/itkDemonsRegistrationFunction.hxx | 10 +- ...itkDiffeomorphicDemonsRegistrationFilter.h | 6 +- .../itkESMDemonsRegistrationFunction.h | 18 +- .../itkESMDemonsRegistrationFunction.hxx | 12 +- ...tSymmetricForcesDemonsRegistrationFilter.h | 2 +- ...ymmetricForcesDemonsRegistrationFilter.hxx | 2 +- ...ymmetricForcesDemonsRegistrationFunction.h | 16 +- ...metricForcesDemonsRegistrationFunction.hxx | 16 +- .../itkLevelSetMotionRegistrationFilter.hxx | 2 +- .../itkLevelSetMotionRegistrationFunction.h | 16 +- .../itkLevelSetMotionRegistrationFunction.hxx | 18 +- ...MultiResolutionPDEDeformableRegistration.h | 12 +- ...ltiResolutionPDEDeformableRegistration.hxx | 4 +- .../itkPDEDeformableRegistrationFilter.hxx | 10 +- ...ymmetricForcesDemonsRegistrationFunction.h | 16 +- ...metricForcesDemonsRegistrationFunction.hxx | 16 +- .../itkCurvatureRegistrationFilterTest.cxx | 18 +- .../test/itkDemonsRegistrationFilterTest.cxx | 18 +- ...feomorphicDemonsRegistrationFilterTest.cxx | 22 +- ...eomorphicDemonsRegistrationFilterTest2.cxx | 6 +- ...tricForcesDemonsRegistrationFilterTest.cxx | 18 +- ...tkLevelSetMotionRegistrationFilterTest.cxx | 10 +- ...esolutionPDEDeformableRegistrationTest.cxx | 18 +- ...tricForcesDemonsRegistrationFilterTest.cxx | 14 +- .../itkBSplineSyNImageRegistrationMethod.hxx | 20 +- .../include/itkImageRegistrationMethodv4.h | 52 +- .../include/itkImageRegistrationMethodv4.hxx | 18 +- .../include/itkSyNImageRegistrationMethod.h | 6 +- .../include/itkSyNImageRegistrationMethod.hxx | 42 +- ...lineVelocityFieldImageRegistrationMethod.h | 2 +- ...neVelocityFieldImageRegistrationMethod.hxx | 42 +- ...ngVelocityFieldImageRegistrationMethodv4.h | 2 +- ...VelocityFieldImageRegistrationMethodv4.hxx | 4 +- ...SplineExponentialImageRegistrationTest.cxx | 4 +- .../test/itkBSplineImageRegistrationTest.cxx | 6 +- .../itkBSplineSyNImageRegistrationTest.cxx | 4 +- .../itkBSplineSyNPointSetRegistrationTest.cxx | 10 +- .../itkExponentialImageRegistrationTest.cxx | 4 +- .../test/itkImageRegistrationSamplingTest.cxx | 2 +- ...QuasiNewtonOptimizerv4RegistrationTest.cxx | 12 +- .../test/itkSimpleImageRegistrationTest.cxx | 4 +- .../test/itkSimpleImageRegistrationTest2.cxx | 4 +- .../test/itkSimpleImageRegistrationTest3.cxx | 4 +- .../test/itkSimpleImageRegistrationTest4.cxx | 2 +- ...ageRegistrationTestWithMaskAndSampling.cxx | 4 +- .../itkSimplePointSetRegistrationTest.cxx | 18 +- .../test/itkSyNImageRegistrationTest.cxx | 4 +- .../test/itkSyNPointSetRegistrationTest.cxx | 10 +- ...lineVelocityFieldImageRegistrationTest.cxx | 34 +- ...eVelocityFieldPointSetRegistrationTest.cxx | 24 +- ...yingVelocityFieldImageRegistrationTest.cxx | 30 +- .../itkBayesianClassifierImageFilter.hxx | 16 +- ...esianClassifierInitializationImageFilter.h | 2 +- ...ianClassifierInitializationImageFilter.hxx | 12 +- .../include/itkImageClassifierBase.hxx | 8 +- .../include/itkImageGaussianModelEstimator.h | 4 +- .../itkImageGaussianModelEstimator.hxx | 8 +- .../include/itkImageKmeansModelEstimator.h | 8 +- .../include/itkImageKmeansModelEstimator.hxx | 8 +- .../itkScalarImageKmeansImageFilter.hxx | 6 +- .../itkBayesianClassifierImageFilterTest.cxx | 14 +- .../test/itkImageClassifierFilterTest.cxx | 8 +- .../test/itkKmeansModelEstimatorTest.cxx | 8 +- .../test/itkSampleClassifierFilterTest2.cxx | 6 +- .../test/itkSampleClassifierFilterTest3.cxx | 8 +- .../test/itkSampleClassifierFilterTest4.cxx | 10 +- .../test/itkSampleClassifierFilterTest5.cxx | 8 +- .../test/itkSampleClassifierFilterTest6.cxx | 8 +- .../test/itkSampleClassifierFilterTest7.cxx | 26 +- .../itkScalarImageKmeansImageFilter3DTest.cxx | 10 +- .../itkScalarImageKmeansImageFilterTest.cxx | 4 +- .../test/itkSupervisedImageClassifierTest.cxx | 4 +- ...tkConnectedComponentFunctorImageFilter.hxx | 12 +- .../itkConnectedComponentImageFilter.h | 2 +- .../itkConnectedComponentImageFilter.hxx | 10 +- .../itkHardConnectedComponentImageFilter.hxx | 16 +- .../include/itkRelabelComponentImageFilter.h | 10 +- .../itkRelabelComponentImageFilter.hxx | 14 +- ...oldMaximumConnectedComponentsImageFilter.h | 2 +- ...dMaximumConnectedComponentsImageFilter.hxx | 2 +- ...ctedComponentImageFilterBackgroundTest.cxx | 2 +- .../itkConnectedComponentImageFilterTest.cxx | 2 +- ...tkConnectedComponentImageFilterTestRGB.cxx | 4 +- ...kHardConnectedComponentImageFilterTest.cxx | 4 +- ...kMaskConnectedComponentImageFilterTest.cxx | 6 +- .../itkRelabelComponentImageFilterGTest.cxx | 2 +- .../itkRelabelComponentImageFilterTest.cxx | 4 +- ...calarConnectedComponentImageFilterTest.cxx | 10 +- ...ectorConnectedComponentImageFilterTest.cxx | 6 +- ...ormableSimplexMesh3DBalloonForceFilter.hxx | 2 +- .../itkDeformableSimplexMesh3DFilter.hxx | 24 +- ...lexMesh3DGradientConstraintForceFilter.hxx | 24 +- ...bleSimplexMesh3DBalloonForceFilterTest.cxx | 6 +- .../itkDeformableSimplexMesh3DFilterTest.cxx | 16 +- ...esh3DGradientConstraintForceFilterTest.cxx | 6 +- .../include/itkKLMRegionGrowImageFilter.h | 14 +- .../include/itkKLMRegionGrowImageFilter.hxx | 26 +- .../include/itkKLMSegmentationBorder.h | 2 +- .../include/itkKLMSegmentationRegion.h | 2 +- .../include/itkSegmentationRegion.h | 2 +- .../src/itkKLMSegmentationRegion.cxx | 10 +- .../test/itkRegionGrow2DTest.cxx | 66 +- .../include/itkBinaryMedianImageFilter.hxx | 8 +- .../include/itkLabelVotingImageFilter.h | 4 +- .../include/itkLabelVotingImageFilter.hxx | 2 +- .../include/itkMultiLabelSTAPLEImageFilter.h | 6 +- .../itkMultiLabelSTAPLEImageFilter.hxx | 2 +- .../itkVotingBinaryHoleFillingImageFilter.hxx | 10 +- .../include/itkVotingBinaryImageFilter.hxx | 8 +- .../itkMultiLabelSTAPLEImageFilterTest.cxx | 2 +- .../test/itkVotingBinaryImageFilterTest.cxx | 20 +- .../itkBinaryMaskToNarrowBandPointSetFilter.h | 2 +- ...tkBinaryMaskToNarrowBandPointSetFilter.hxx | 10 +- .../itkCannySegmentationLevelSetFunction.h | 2 +- .../include/itkCollidingFrontsImageFilter.hxx | 6 +- .../include/itkCurvesLevelSetFunction.h | 4 +- .../itkExtensionVelocitiesImageFilter.hxx | 14 +- ...itkGeodesicActiveContourLevelSetFunction.h | 4 +- ...cActiveContourShapePriorLevelSetFunction.h | 4 +- ...ctiveContourShapePriorLevelSetFunction.hxx | 2 +- ...veContourShapePriorLevelSetImageFilter.hxx | 2 +- .../itkImplicitManifoldNormalVectorFilter.h | 4 +- .../itkImplicitManifoldNormalVectorFilter.hxx | 16 +- .../LevelSets/include/itkLevelSetFunction.h | 2 +- .../LevelSets/include/itkLevelSetFunction.hxx | 36 +- .../itkLevelSetFunctionWithRefitTerm.h | 2 +- .../itkLevelSetFunctionWithRefitTerm.hxx | 8 +- .../itkLevelSetNeighborhoodExtractor.h | 6 +- .../itkLevelSetNeighborhoodExtractor.hxx | 16 +- ...itkLevelSetVelocityNeighborhoodExtractor.h | 2 +- ...kLevelSetVelocityNeighborhoodExtractor.hxx | 10 +- ...itkNarrowBandCurvesLevelSetImageFilter.hxx | 2 +- .../itkNarrowBandLevelSetImageFilter.hxx | 2 +- ...resholdSegmentationLevelSetImageFilter.hxx | 2 +- .../itkNormalVectorDiffusionFunction.hxx | 12 +- ...tkParallelSparseFieldLevelSetImageFilter.h | 86 +-- ...ParallelSparseFieldLevelSetImageFilter.hxx | 122 ++-- .../itkReinitializeLevelSetImageFilter.h | 6 +- .../itkReinitializeLevelSetImageFilter.hxx | 12 +- .../itkSegmentationLevelSetFunction.hxx | 6 +- .../itkSegmentationLevelSetImageFilter.hxx | 2 +- .../itkShapeDetectionLevelSetFunction.h | 4 +- .../itkShapeDetectionLevelSetImageFilter.hxx | 2 +- .../include/itkShapePriorMAPCostFunction.h | 4 +- .../include/itkShapePriorMAPCostFunction.hxx | 10 +- ...tkShapePriorSegmentationLevelSetFunction.h | 4 +- ...ShapePriorSegmentationLevelSetFunction.hxx | 6 +- ...hapePriorSegmentationLevelSetImageFilter.h | 8 +- ...pePriorSegmentationLevelSetImageFilter.hxx | 2 +- ...parseFieldFourthOrderLevelSetImageFilter.h | 2 +- ...rseFieldFourthOrderLevelSetImageFilter.hxx | 16 +- .../itkSparseFieldLevelSetImageFilter.h | 20 +- .../itkSparseFieldLevelSetImageFilter.hxx | 42 +- ...itkThresholdSegmentationLevelSetFunction.h | 8 +- ...kThresholdSegmentationLevelSetFunction.hxx | 10 +- ...torThresholdSegmentationLevelSetFunction.h | 4 +- ...rThresholdSegmentationLevelSetFunction.hxx | 2 +- ...opicFourthOrderLevelSetImageFilterTest.cxx | 4 +- ...naryMaskToNarrowBandPointSetFilterTest.cxx | 10 +- ...nnySegmentationLevelSetImageFilterTest.cxx | 6 +- .../itkCollidingFrontsImageFilterTest.cxx | 2 +- .../test/itkCurvesLevelSetImageFilterTest.cxx | 4 +- ...CurvesLevelSetImageFilterZeroSigmaTest.cxx | 4 +- .../itkExtensionVelocitiesImageFilterTest.cxx | 22 +- ...icActiveContourLevelSetImageFilterTest.cxx | 4 +- ...ontourLevelSetImageFilterZeroSigmaTest.cxx | 4 +- ...ntourShapePriorLevelSetImageFilterTest.cxx | 4 +- ...ourShapePriorLevelSetImageFilterTest_2.cxx | 6 +- ...ImplicitManifoldNormalVectorFilterTest.cxx | 6 +- ...opicFourthOrderLevelSetImageFilterTest.cxx | 4 +- ...ianSegmentationLevelSetImageFilterTest.cxx | 6 +- .../test/itkLevelSetFunctionTest.cxx | 6 +- .../itkLevelSetNeighborhoodExtractorTest.cxx | 2 +- ...elSetVelocityNeighborhoodExtractorTest.cxx | 4 +- ...arrowBandCurvesLevelSetImageFilterTest.cxx | 4 +- ...oldSegmentationLevelSetImageFilterTest.cxx | 6 +- ...llelSparseFieldLevelSetImageFilterTest.cxx | 10 +- ...itkReinitializeLevelSetImageFilterTest.cxx | 16 +- ...kShapeDetectionLevelSetImageFilterTest.cxx | 4 +- .../test/itkShapePriorMAPCostFunctionTest.cxx | 6 +- ...ePriorSegmentationLevelSetFunctionTest.cxx | 8 +- ...ieldFourthOrderLevelSetImageFilterTest.cxx | 6 +- ...oldSegmentationLevelSetImageFilterTest.cxx | 6 +- .../itkUnsharpMaskLevelSetImageFilterTest.cxx | 6 +- .../itkBinaryImageToLevelSetImageAdaptor.hxx | 8 +- ...itkBinaryImageToLevelSetImageAdaptorBase.h | 2 +- .../include/itkDiscreteLevelSetImage.hxx | 24 +- .../LevelSetsv4/include/itkLevelSetBase.h | 14 +- .../LevelSetsv4/include/itkLevelSetBase.hxx | 6 +- .../include/itkLevelSetContainer.h | 4 +- .../include/itkLevelSetContainerBase.h | 4 +- .../include/itkLevelSetContainerBase.hxx | 4 +- .../include/itkLevelSetDenseImage.hxx | 2 +- .../include/itkLevelSetDomainMapImageFilter.h | 4 +- .../itkLevelSetDomainMapImageFilter.hxx | 22 +- .../include/itkLevelSetDomainPartition.hxx | 2 +- .../include/itkLevelSetDomainPartitionImage.h | 4 +- .../itkLevelSetDomainPartitionImage.hxx | 4 +- ...tkLevelSetDomainPartitionImageWithKdTree.h | 2 +- ...LevelSetDomainPartitionImageWithKdTree.hxx | 2 +- .../include/itkLevelSetDomainPartitionMesh.h | 2 +- .../itkLevelSetDomainPartitionMesh.hxx | 4 +- .../itkLevelSetEquationAdvectionTerm.hxx | 6 +- .../itkLevelSetEquationBinaryMaskTerm.hxx | 6 +- ...kLevelSetEquationChanAndVeseExternalTerm.h | 2 +- ...evelSetEquationChanAndVeseExternalTerm.hxx | 12 +- ...kLevelSetEquationChanAndVeseInternalTerm.h | 4 +- ...evelSetEquationChanAndVeseInternalTerm.hxx | 8 +- .../include/itkLevelSetEquationContainer.h | 4 +- .../include/itkLevelSetEquationContainer.hxx | 2 +- .../itkLevelSetEquationCurvatureTerm.hxx | 2 +- .../itkLevelSetEquationLaplacianTerm.hxx | 2 +- .../itkLevelSetEquationOverlapPenaltyTerm.h | 2 +- .../itkLevelSetEquationOverlapPenaltyTerm.hxx | 10 +- .../itkLevelSetEquationPropagationTerm.hxx | 2 +- .../include/itkLevelSetEquationTermBase.hxx | 2 +- .../itkLevelSetEquationTermContainer.h | 2 +- .../itkLevelSetEquationTermContainer.hxx | 6 +- .../include/itkLevelSetEvolution.hxx | 16 +- .../include/itkLevelSetEvolutionBase.h | 6 +- .../include/itkLevelSetEvolutionBase.hxx | 10 +- ...elSetEvolutionComputeIterationThreader.hxx | 30 +- .../itkLevelSetEvolutionStoppingCriterion.h | 6 +- ...velSetEvolutionUpdateLevelSetsThreader.hxx | 4 +- .../LevelSetsv4/include/itkLevelSetImage.h | 2 +- .../include/itkLevelSetSparseImage.h | 2 +- .../include/itkLevelSetSparseImage.hxx | 4 +- .../include/itkMalcolmSparseLevelSetImage.hxx | 4 +- .../include/itkShiSparseLevelSetImage.hxx | 2 +- .../include/itkUpdateMalcolmSparseLevelSet.h | 4 +- .../itkUpdateMalcolmSparseLevelSet.hxx | 16 +- .../include/itkUpdateShiSparseLevelSet.h | 10 +- .../include/itkUpdateShiSparseLevelSet.hxx | 14 +- .../include/itkUpdateWhitakerSparseLevelSet.h | 8 +- .../itkUpdateWhitakerSparseLevelSet.hxx | 18 +- .../itkWhitakerSparseLevelSetImage.hxx | 2 +- ...mageToMalcolmSparseLevelSetAdaptorTest.cxx | 2 +- ...aryImageToShiSparseLevelSetAdaptorTest.cxx | 2 +- ...ageToWhitakerSparseLevelSetAdaptorTest.cxx | 2 +- .../itkLevelSetDomainMapImageFilterTest.cxx | 2 +- .../itkLevelSetDomainPartitionImageTest.cxx | 2 +- ...lSetDomainPartitionImageWithKdTreeTest.cxx | 4 +- ...ltiLevelSetChanAndVeseInternalTermTest.cxx | 8 +- .../test/itkMultiLevelSetDenseImageTest.cxx | 6 +- .../test/itkMultiLevelSetEvolutionTest.cxx | 2 +- .../itkSingleLevelSetMalcolmImage2DTest.cxx | 4 +- .../test/itkSingleLevelSetShiImage2DTest.cxx | 4 +- .../itkSingleLevelSetWhitakerImage2DTest.cxx | 4 +- ...velSetWhitakerImage2DWithCurvatureTest.cxx | 4 +- ...velSetWhitakerImage2DWithLaplacianTest.cxx | 4 +- ...lSetWhitakerImage2DWithPropagationTest.cxx | 4 +- .../test/itkTwoLevelSetDenseImage2DTest.cxx | 2 +- .../test/itkTwoLevelSetMalcolmImage2DTest.cxx | 4 +- .../test/itkTwoLevelSetShiImage2DTest.cxx | 4 +- .../itkTwoLevelSetWhitakerImage2DTest.cxx | 4 +- .../include/itkMRFImageFilter.h | 24 +- .../include/itkMRFImageFilter.hxx | 14 +- .../include/itkRGBGibbsPriorFilter.hxx | 36 +- .../itkConfidenceConnectedImageFilter.h | 12 +- .../itkConfidenceConnectedImageFilter.hxx | 18 +- .../itkConnectedThresholdImageFilter.hxx | 2 +- .../itkIsolatedConnectedImageFilter.hxx | 30 +- .../itkNeighborhoodConnectedImageFilter.hxx | 2 +- .../itkVectorConfidenceConnectedImageFilter.h | 8 +- ...tkVectorConfidenceConnectedImageFilter.hxx | 12 +- .../itkConfidenceConnectedImageFilterTest.cxx | 2 +- .../itkIsolatedConnectedImageFilterTest.cxx | 2 +- ...tkNeighborhoodConnectedImageFilterTest.cxx | 2 +- ...ctorConfidenceConnectedImageFilterTest.cxx | 2 +- .../itkPCAShapeSignedDistanceFunction.h | 4 +- .../include/itkSphereSignedDistanceFunction.h | 2 +- .../itkPCAShapeSignedDistanceFunctionTest.cxx | 14 +- .../SuperPixel/include/itkSLICImageFilter.h | 20 +- .../SuperPixel/include/itkSLICImageFilter.hxx | 76 +-- .../test/itkSLICImageFilterTest.cxx | 12 +- .../Voronoi/include/itkVoronoiDiagram2D.h | 18 +- .../include/itkVoronoiDiagram2DGenerator.h | 40 +- .../include/itkVoronoiDiagram2DGenerator.hxx | 40 +- .../itkVoronoiPartitioningImageFilter.hxx | 18 +- .../itkVoronoiSegmentationImageFilter.hxx | 12 +- .../itkVoronoiSegmentationImageFilterBase.h | 18 +- .../itkVoronoiSegmentationImageFilterBase.hxx | 44 +- .../itkVoronoiSegmentationRGBImageFilter.h | 18 +- .../itkVoronoiSegmentationRGBImageFilter.hxx | 26 +- .../Voronoi/test/itkVoronoiDiagram2DTest.cxx | 4 +- .../itkVoronoiSegmentationImageFilterTest.cxx | 4 +- ...kVoronoiSegmentationRGBImageFilterTest.cxx | 30 +- .../itkIsolatedWatershedImageFilter.hxx | 10 +- ...logicalWatershedFromMarkersImageFilter.hxx | 22 +- .../include/itkTobogganImageFilter.hxx | 10 +- .../include/itkWatershedBoundary.hxx | 6 +- .../itkWatershedEquivalenceRelabeler.hxx | 6 +- .../itkWatershedMiniPipelineProgressCommand.h | 4 +- .../include/itkWatershedRelabeler.hxx | 6 +- .../include/itkWatershedSegmentTable.h | 4 +- .../include/itkWatershedSegmentTree.h | 2 +- .../itkWatershedSegmentTreeGenerator.h | 4 +- .../itkWatershedSegmentTreeGenerator.hxx | 18 +- .../include/itkWatershedSegmenter.h | 18 +- .../include/itkWatershedSegmenter.hxx | 94 +-- .../src/itkOneWayEquivalencyTable.cxx | 2 +- .../itkIsolatedWatershedImageFilterTest.cxx | 2 +- ...calWatershedFromMarkersImageFilterTest.cxx | 2 +- .../include/itkOpenCVImageBridge.h | 20 +- .../include/itkOpenCVImageBridge.hxx | 8 +- .../include/itkOpenCVVideoCapture.h | 2 +- .../include/itkOpenCVVideoCapture.hxx | 20 +- .../BridgeOpenCV/include/itkOpenCVVideoIO.h | 16 +- .../BridgeOpenCV/src/itkOpenCVVideoIO.cxx | 14 +- .../test/itkOpenCVBasicTypeBridgeTest.cxx | 6 +- .../itkOpenCVImageBridgeGrayScaleTest.cxx | 4 +- .../test/itkOpenCVImageBridgeRGBTest.cxx | 4 +- .../BridgeOpenCV/test/itkOpenCVTestHelper.cxx | 6 +- .../test/itkOpenCVVideoIOTest.cxx | 36 +- .../Video/BridgeVXL/include/itkVXLVideoIO.h | 16 +- .../BridgeVXL/include/vidl_itk_istream.hxx | 4 +- Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx | 12 +- .../BridgeVXL/test/itkVXLVideoIOTest.cxx | 30 +- .../BridgeVXL/test/vidl_itk_istreamTest.cxx | 2 +- .../Core/include/itkImageToVideoFilter.hxx | 26 +- Modules/Video/Core/include/itkRingBuffer.hxx | 2 +- .../Core/include/itkTemporalDataObject.h | 2 +- .../Video/Core/include/itkTemporalRegion.h | 2 +- Modules/Video/Core/include/itkVideoSource.hxx | 14 +- Modules/Video/Core/include/itkVideoStream.h | 6 +- Modules/Video/Core/include/itkVideoStream.hxx | 32 +- .../Core/include/itkVideoToVideoFilter.hxx | 6 +- .../Core/src/itkTemporalProcessObject.cxx | 18 +- .../Core/test/itkImageToVideoFilterTest.cxx | 2 +- .../test/itkTemporalProcessObjectTest.cxx | 10 +- .../Video/Core/test/itkTemporalRegionTest.cxx | 4 +- .../Video/Core/test/itkVideoSourceTest.cxx | 18 +- .../Video/Core/test/itkVideoStreamTest.cxx | 18 +- .../Core/test/itkVideoToVideoFilterTest.cxx | 34 +- .../include/itkDecimateFramesVideoFilter.hxx | 10 +- .../include/itkFrameAverageVideoFilter.hxx | 14 +- .../include/itkFrameDifferenceVideoFilter.hxx | 14 +- .../itkImageFilterToVideoFilterWrapper.hxx | 6 +- .../test/itkFrameAverageVideoFilterTest.cxx | 14 +- .../itkFrameDifferenceVideoFilterTest.cxx | 14 +- Modules/Video/IO/include/itkFileListVideoIO.h | 8 +- .../Video/IO/include/itkVideoFileReader.hxx | 14 +- Modules/Video/IO/include/itkVideoFileWriter.h | 8 +- .../Video/IO/include/itkVideoFileWriter.hxx | 4 +- Modules/Video/IO/include/itkVideoIOBase.h | 28 +- Modules/Video/IO/include/itkVideoIOFactory.h | 2 +- Modules/Video/IO/src/itkFileListVideoIO.cxx | 10 +- .../Video/IO/test/itkFileListVideoIOTest.cxx | 28 +- .../AddEmptyDefaultMemberInitializers.cxx | 4 +- 3012 files changed, 16228 insertions(+), 16228 deletions(-) diff --git a/Examples/DataRepresentation/Image/Image4.cxx b/Examples/DataRepresentation/Image/Image4.cxx index ceb4c49a2d0..356323b7c39 100644 --- a/Examples/DataRepresentation/Image/Image4.cxx +++ b/Examples/DataRepresentation/Image/Image4.cxx @@ -354,7 +354,7 @@ main(int, char *[]) // Software Guide : BeginCodeSnippet const ImageType::IndexType LeftEyeIndex = GetIndexFromMouseClick(); - ImageType::PointType LeftEyePoint; + ImageType::PointType LeftEyePoint; image->TransformIndexToPhysicalPoint(LeftEyeIndex, LeftEyePoint); // Software Guide : EndCodeSnippet diff --git a/Examples/DataRepresentation/Image/Image5.cxx b/Examples/DataRepresentation/Image/Image5.cxx index ab9ae0b1a4a..a9f6080f328 100644 --- a/Examples/DataRepresentation/Image/Image5.cxx +++ b/Examples/DataRepresentation/Image/Image5.cxx @@ -162,7 +162,7 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet const unsigned int numberOfPixels = size[0] * size[1] * size[2]; - auto * localBuffer = new PixelType[numberOfPixels]; + auto * localBuffer = new PixelType[numberOfPixels]; // Software Guide : EndCodeSnippet constexpr double radius = 80.0; @@ -181,7 +181,7 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet constexpr double radius2 = radius * radius; - PixelType * it = localBuffer; + PixelType * it = localBuffer; for (unsigned int z = 0; z < size[2]; ++z) { diff --git a/Examples/DataRepresentation/Image/RGBImage.cxx b/Examples/DataRepresentation/Image/RGBImage.cxx index 325eb0f71cc..93ba6bb5beb 100644 --- a/Examples/DataRepresentation/Image/RGBImage.cxx +++ b/Examples/DataRepresentation/Image/RGBImage.cxx @@ -83,12 +83,12 @@ main(int, char * argv[]) using ReaderType = itk::ImageFileReader; // Software Guide : EndCodeSnippet - auto reader = ReaderType::New(); + auto reader = ReaderType::New(); const char * const filename = argv[1]; reader->SetFileName(filename); reader->Update(); - const ImageType::Pointer image = reader->GetOutput(); + const ImageType::Pointer image = reader->GetOutput(); constexpr ImageType::IndexType pixelIndex = { { 25, 35, 0 } }; // Software Guide : BeginLatex diff --git a/Examples/DataRepresentation/Mesh/AutomaticMesh.cxx b/Examples/DataRepresentation/Mesh/AutomaticMesh.cxx index a2a5db34364..f1f2b46f0a0 100644 --- a/Examples/DataRepresentation/Mesh/AutomaticMesh.cxx +++ b/Examples/DataRepresentation/Mesh/AutomaticMesh.cxx @@ -140,7 +140,7 @@ main(int, char *[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - PointType p; + PointType p; IdentifierArrayType idArray(4); p[0] = -2; diff --git a/Examples/DataRepresentation/Mesh/Mesh2.cxx b/Examples/DataRepresentation/Mesh/Mesh2.cxx index d12ea68f75d..72bd0252789 100644 --- a/Examples/DataRepresentation/Mesh/Mesh2.cxx +++ b/Examples/DataRepresentation/Mesh/Mesh2.cxx @@ -294,7 +294,7 @@ main(int, char *[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - CellIterator cellIterator = mesh->GetCells()->Begin(); + CellIterator cellIterator = mesh->GetCells()->Begin(); const CellIterator end = mesh->GetCells()->End(); // Software Guide : EndCodeSnippet @@ -326,7 +326,7 @@ main(int, char *[]) while (cellIterator != end) { MeshType::CellType * cellptr = cellIterator.Value(); - auto * line = dynamic_cast(cellptr); + auto * line = dynamic_cast(cellptr); if (line == nullptr) { continue; diff --git a/Examples/DataRepresentation/Mesh/Mesh3.cxx b/Examples/DataRepresentation/Mesh/Mesh3.cxx index 9a0ac50fe86..9a352d2266b 100644 --- a/Examples/DataRepresentation/Mesh/Mesh3.cxx +++ b/Examples/DataRepresentation/Mesh/Mesh3.cxx @@ -128,7 +128,7 @@ main(int, char *[]) // Software Guide : BeginCodeSnippet CellType::CellAutoPointer line; - constexpr unsigned int numberOfCells = numberOfPoints - 1; + constexpr unsigned int numberOfCells = numberOfPoints - 1; for (unsigned int cellId = 0; cellId < numberOfCells; ++cellId) { line.TakeOwnership(new LineType); @@ -218,7 +218,7 @@ main(int, char *[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - CellDataIterator cellDataIterator = mesh->GetCellData()->Begin(); + CellDataIterator cellDataIterator = mesh->GetCellData()->Begin(); const CellDataIterator end = mesh->GetCellData()->End(); // Software Guide : EndCodeSnippet diff --git a/Examples/DataRepresentation/Mesh/MeshCellVisitor2.cxx b/Examples/DataRepresentation/Mesh/MeshCellVisitor2.cxx index 4cadac4fb84..a4bec97ef42 100644 --- a/Examples/DataRepresentation/Mesh/MeshCellVisitor2.cxx +++ b/Examples/DataRepresentation/Mesh/MeshCellVisitor2.cxx @@ -137,8 +137,8 @@ class CustomLineVisitor { std::cout << "cell " << cellId << " is a Line " << std::endl; LineType::PointIdIterator pit = t->PointIdsBegin(); - MeshType::PointType p0; - MeshType::PointType p1; + MeshType::PointType p0; + MeshType::PointType p1; m_Mesh->GetPoint(*pit++, &p0); m_Mesh->GetPoint(*pit++, &p1); const double length = p0.EuclideanDistanceTo(p1); diff --git a/Examples/DataRepresentation/Mesh/MeshKComplex.cxx b/Examples/DataRepresentation/Mesh/MeshKComplex.cxx index 11cd1a8f8fe..2034c145639 100644 --- a/Examples/DataRepresentation/Mesh/MeshKComplex.cxx +++ b/Examples/DataRepresentation/Mesh/MeshKComplex.cxx @@ -331,7 +331,7 @@ main(int, char *[]) // Software Guide : BeginCodeSnippet using PointIterator = MeshType::PointsContainer::ConstIterator; - PointIterator pointIterator = mesh->GetPoints()->Begin(); + PointIterator pointIterator = mesh->GetPoints()->Begin(); const PointIterator pointEnd = mesh->GetPoints()->End(); while (pointIterator != pointEnd) @@ -602,7 +602,7 @@ main(int, char *[]) for (unsigned int b0 = 0; b0 < n0; ++b0) { MeshType::CellIdentifier id; - const bool found = + const bool found = mesh->GetBoundaryAssignment(dimension, cellId, b0, &id); if (found) std::cout << id << std::endl; @@ -614,7 +614,7 @@ main(int, char *[]) for (unsigned int b1 = 0; b1 < n1; ++b1) { MeshType::CellIdentifier id; - const bool found = + const bool found = mesh->GetBoundaryAssignment(dimension, cellId, b1, &id); if (found) { @@ -627,7 +627,7 @@ main(int, char *[]) for (unsigned int b2 = 0; b2 < n2; ++b2) { MeshType::CellIdentifier id; - const bool found = + const bool found = mesh->GetBoundaryAssignment(dimension, cellId, b2, &id); if (found) { @@ -660,7 +660,7 @@ main(int, char *[]) for (unsigned int b1 = 0; b1 < n1; ++b1) { MeshType::CellIdentifier id; - const bool found = + const bool found = mesh->GetBoundaryAssignment(dimension, cellId, b1, &id); if (found) { diff --git a/Examples/DataRepresentation/Mesh/MeshPolyLine.cxx b/Examples/DataRepresentation/Mesh/MeshPolyLine.cxx index 385e93c9491..a7c361daf87 100644 --- a/Examples/DataRepresentation/Mesh/MeshPolyLine.cxx +++ b/Examples/DataRepresentation/Mesh/MeshPolyLine.cxx @@ -207,7 +207,7 @@ main(int, char *[]) // Software Guide : BeginCodeSnippet using PointIterator = MeshType::PointsContainer::ConstIterator; - PointIterator pointIterator = mesh->GetPoints()->Begin(); + PointIterator pointIterator = mesh->GetPoints()->Begin(); const PointIterator pointEnd = mesh->GetPoints()->End(); while (pointIterator != pointEnd) diff --git a/Examples/DataRepresentation/Mesh/MeshTraits.cxx b/Examples/DataRepresentation/Mesh/MeshTraits.cxx index bce06ddb39a..9d66f2ff0b0 100644 --- a/Examples/DataRepresentation/Mesh/MeshTraits.cxx +++ b/Examples/DataRepresentation/Mesh/MeshTraits.cxx @@ -189,7 +189,7 @@ main(int, char *[]) // Software Guide : BeginCodeSnippet CellType::CellAutoPointer line; - constexpr unsigned int numberOfCells = numberOfPoints - 1; + constexpr unsigned int numberOfCells = numberOfPoints - 1; for (unsigned int cellId = 0; cellId < numberOfCells; ++cellId) { line.TakeOwnership(new LineType); @@ -278,7 +278,7 @@ main(int, char *[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - CellDataIterator cellDataIterator = mesh->GetCellData()->Begin(); + CellDataIterator cellDataIterator = mesh->GetCellData()->Begin(); const CellDataIterator end = mesh->GetCellData()->End(); // Software Guide : EndCodeSnippet diff --git a/Examples/DataRepresentation/Mesh/PointSet1.cxx b/Examples/DataRepresentation/Mesh/PointSet1.cxx index b5cb0b51616..77eb169371d 100644 --- a/Examples/DataRepresentation/Mesh/PointSet1.cxx +++ b/Examples/DataRepresentation/Mesh/PointSet1.cxx @@ -195,7 +195,7 @@ main(int, char *[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - PointType pp; + PointType pp; const bool pointExists = pointsSet->GetPoint(1, &pp); if (pointExists) diff --git a/Examples/DataRepresentation/Mesh/PointSet3.cxx b/Examples/DataRepresentation/Mesh/PointSet3.cxx index 1e39a6545e7..e78489a57cb 100644 --- a/Examples/DataRepresentation/Mesh/PointSet3.cxx +++ b/Examples/DataRepresentation/Mesh/PointSet3.cxx @@ -69,7 +69,7 @@ main(int, char *[]) // Software Guide : BeginCodeSnippet unsigned int dataId = 0; - PixelType value = 79; + PixelType value = 79; pointSet->SetPointData(dataId++, value); // Software Guide : EndCodeSnippet diff --git a/Examples/DataRepresentation/Mesh/PointSetWithCovariantVectors.cxx b/Examples/DataRepresentation/Mesh/PointSetWithCovariantVectors.cxx index a25e60b8f88..d2939ba6e2c 100644 --- a/Examples/DataRepresentation/Mesh/PointSetWithCovariantVectors.cxx +++ b/Examples/DataRepresentation/Mesh/PointSetWithCovariantVectors.cxx @@ -102,7 +102,7 @@ main(int, char *[]) PointSetType::PixelType gradient; PointSetType::PointType point; - unsigned int pointId = 0; + unsigned int pointId = 0; constexpr double radius = 300.0; for (unsigned int i = 0; i < 360; ++i) @@ -139,7 +139,7 @@ main(int, char *[]) // Software Guide : BeginCodeSnippet using PointDataIterator = PointSetType::PointDataContainer::ConstIterator; - PointDataIterator pixelIterator = pointSet->GetPointData()->Begin(); + PointDataIterator pixelIterator = pointSet->GetPointData()->Begin(); const PointDataIterator pixelEnd = pointSet->GetPointData()->End(); using PointIterator = PointSetType::PointsContainer::Iterator; diff --git a/Examples/DataRepresentation/Mesh/PointSetWithVectors.cxx b/Examples/DataRepresentation/Mesh/PointSetWithVectors.cxx index 1556c4ca9b3..53cddba4e21 100644 --- a/Examples/DataRepresentation/Mesh/PointSetWithVectors.cxx +++ b/Examples/DataRepresentation/Mesh/PointSetWithVectors.cxx @@ -99,7 +99,7 @@ main(int, char *[]) PointSetType::PixelType tangent; PointSetType::PointType point; - unsigned int pointId = 0; + unsigned int pointId = 0; constexpr double radius = 300.0; for (unsigned int i = 0; i < 360; ++i) @@ -133,7 +133,7 @@ main(int, char *[]) // Software Guide : BeginCodeSnippet using PointDataIterator = PointSetType::PointDataContainer::ConstIterator; - PointDataIterator pixelIterator = pointSet->GetPointData()->Begin(); + PointDataIterator pixelIterator = pointSet->GetPointData()->Begin(); const PointDataIterator pixelEnd = pointSet->GetPointData()->End(); using PointIterator = PointSetType::PointsContainer::Iterator; diff --git a/Examples/DataRepresentation/Mesh/RGBPointSet.cxx b/Examples/DataRepresentation/Mesh/RGBPointSet.cxx index 90d012e4bbb..fb98678fb42 100644 --- a/Examples/DataRepresentation/Mesh/RGBPointSet.cxx +++ b/Examples/DataRepresentation/Mesh/RGBPointSet.cxx @@ -77,8 +77,8 @@ main(int, char *[]) // Software Guide : BeginCodeSnippet PointSetType::PixelType pixel; PointSetType::PointType point; - unsigned int pointId = 0; - constexpr double radius = 3.0; + unsigned int pointId = 0; + constexpr double radius = 3.0; for (unsigned int i = 0; i < 360; ++i) { @@ -108,7 +108,7 @@ main(int, char *[]) // Software Guide : BeginCodeSnippet using PointIterator = PointSetType::PointsContainer::ConstIterator; - PointIterator pointIterator = pointSet->GetPoints()->Begin(); + PointIterator pointIterator = pointSet->GetPoints()->Begin(); const PointIterator pointEnd = pointSet->GetPoints()->End(); while (pointIterator != pointEnd) { @@ -142,7 +142,7 @@ main(int, char *[]) // Software Guide : BeginCodeSnippet using PointDataIterator = PointSetType::PointDataContainer::ConstIterator; - PointDataIterator pixelIterator = pointSet->GetPointData()->Begin(); + PointDataIterator pixelIterator = pointSet->GetPointData()->Begin(); const PointDataIterator pixelEnd = pointSet->GetPointData()->End(); while (pixelIterator != pixelEnd) { diff --git a/Examples/DataRepresentation/Path/PolyLineParametricPath1.cxx b/Examples/DataRepresentation/Path/PolyLineParametricPath1.cxx index 64b58f10eff..92c58d2d248 100644 --- a/Examples/DataRepresentation/Path/PolyLineParametricPath1.cxx +++ b/Examples/DataRepresentation/Path/PolyLineParametricPath1.cxx @@ -85,7 +85,7 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet const ImageType::ConstPointer image = reader->GetOutput(); - auto path = PathType::New(); + auto path = PathType::New(); using ContinuousIndexType = PathType::ContinuousIndexType; ContinuousIndexType cindex; @@ -94,7 +94,7 @@ main(int argc, char * argv[]) ImagePointType origin = image->GetOrigin(); ImageType::SpacingType spacing = image->GetSpacing(); - ImageType::SizeType size = image->GetBufferedRegion().GetSize(); + ImageType::SizeType size = image->GetBufferedRegion().GetSize(); ImagePointType point; diff --git a/Examples/Filtering/AntiAliasBinaryImageFilter.cxx b/Examples/Filtering/AntiAliasBinaryImageFilter.cxx index f9052a19038..8de228eb571 100644 --- a/Examples/Filtering/AntiAliasBinaryImageFilter.cxx +++ b/Examples/Filtering/AntiAliasBinaryImageFilter.cxx @@ -67,7 +67,7 @@ main(int argc, char * argv[]) const char * outputFilename1 = argv[2]; const char * outputFilename2 = argv[3]; - double maximumRMSError = 0.01; + double maximumRMSError = 0.01; unsigned int numberOfIterations = 50; if (argc > 4) diff --git a/Examples/Filtering/BilateralImageFilter.cxx b/Examples/Filtering/BilateralImageFilter.cxx index 9de6bbc879c..a7df9a6ab21 100644 --- a/Examples/Filtering/BilateralImageFilter.cxx +++ b/Examples/Filtering/BilateralImageFilter.cxx @@ -185,7 +185,7 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet constexpr unsigned int Dimension = InputImageType::ImageDimension; - double domainSigmas[Dimension]; + double domainSigmas[Dimension]; for (double & domainSigma : domainSigmas) { domainSigma = std::stod(argv[3]); diff --git a/Examples/Filtering/CompositeFilterExample.cxx b/Examples/Filtering/CompositeFilterExample.cxx index 85aeb620f0b..35facd10972 100644 --- a/Examples/Filtering/CompositeFilterExample.cxx +++ b/Examples/Filtering/CompositeFilterExample.cxx @@ -137,9 +137,9 @@ class CompositeExampleImageFilter : public ImageToImageFilter // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typename GradientType::Pointer m_GradientFilter; + typename GradientType::Pointer m_GradientFilter; typename ThresholdType::Pointer m_ThresholdFilter; - typename RescalerType::Pointer m_RescaleFilter; + typename RescalerType::Pointer m_RescaleFilter; PixelType m_Threshold; }; @@ -233,7 +233,7 @@ CompositeExampleImageFilter::GenerateData() template void CompositeExampleImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Examples/Filtering/CurvatureAnisotropicDiffusionImageFilter.cxx b/Examples/Filtering/CurvatureAnisotropicDiffusionImageFilter.cxx index 35982b5b7cb..53d19676f8f 100644 --- a/Examples/Filtering/CurvatureAnisotropicDiffusionImageFilter.cxx +++ b/Examples/Filtering/CurvatureAnisotropicDiffusionImageFilter.cxx @@ -149,9 +149,9 @@ main(int argc, char * argv[]) const unsigned int numberOfIterations = std::stoi(argv[3]); - const double timeStep = std::stod(argv[4]); - const double conductance = std::stod(argv[5]); - const bool useImageSpacing = (argc != 6); + const double timeStep = std::stod(argv[4]); + const double conductance = std::stod(argv[5]); + const bool useImageSpacing = (argc != 6); // Software Guide : BeginLatex // diff --git a/Examples/Filtering/CurvatureFlowImageFilter.cxx b/Examples/Filtering/CurvatureFlowImageFilter.cxx index 0ef49d54419..d39d77d7bbe 100644 --- a/Examples/Filtering/CurvatureFlowImageFilter.cxx +++ b/Examples/Filtering/CurvatureFlowImageFilter.cxx @@ -158,7 +158,7 @@ main(int argc, char * argv[]) const unsigned int numberOfIterations = std::stoi(argv[3]); - const double timeStep = std::stod(argv[4]); + const double timeStep = std::stod(argv[4]); // Software Guide : BeginLatex diff --git a/Examples/Filtering/DiffusionTensor3DReconstructionImageFilter.cxx b/Examples/Filtering/DiffusionTensor3DReconstructionImageFilter.cxx index e6794b9428b..cb42281f3e9 100644 --- a/Examples/Filtering/DiffusionTensor3DReconstructionImageFilter.cxx +++ b/Examples/Filtering/DiffusionTensor3DReconstructionImageFilter.cxx @@ -79,10 +79,10 @@ main(int argc, char * argv[]) } constexpr unsigned int Dimension = 3; - unsigned int numberOfImages = 0; - unsigned int numberOfGradientImages = 0; - bool readb0 = false; - double b0 = 0; + unsigned int numberOfImages = 0; + unsigned int numberOfGradientImages = 0; + bool readb0 = false; + double b0 = 0; using PixelType = unsigned short; using ImageType = itk::VectorImage; @@ -138,7 +138,7 @@ main(int argc, char * argv[]) img->GetMetaDataDictionary(); std::vector imgMetaKeys = imgMetaDictionary.GetKeys(); std::vector::const_iterator itKey = imgMetaKeys.begin(); - std::string metaString; + std::string metaString; TensorReconstructionImageFilterType::GradientDirectionType vect3d; const TensorReconstructionImageFilterType::GradientDirectionContainerType:: diff --git a/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx b/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx index 559afad1dd0..12fad42e5c8 100644 --- a/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx +++ b/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx @@ -461,7 +461,7 @@ main(int argc, char * argv[]) if (verbose) { - unsigned int i; + unsigned int i; const InputImageType::SpacingType spacing = image->GetSpacing(); std::cout << std::endl << "Input "; @@ -534,14 +534,14 @@ main(int argc, char * argv[]) transform->SetTranslation(translation); transform->SetRotation(dtr * rx, dtr * ry, dtr * rz); - InputImageType::PointType imOrigin = image->GetOrigin(); + InputImageType::PointType imOrigin = image->GetOrigin(); InputImageType::SpacingType imRes = image->GetSpacing(); using InputImageRegionType = InputImageType::RegionType; using InputImageSizeType = InputImageRegionType::SizeType; const InputImageRegionType imRegion = image->GetBufferedRegion(); - InputImageSizeType imSize = imRegion.GetSize(); + InputImageSizeType imSize = imRegion.GetSize(); imOrigin[0] += imRes[0] * static_cast(imSize[0]) / 2.0; imOrigin[1] += imRes[1] * static_cast(imSize[1]) / 2.0; diff --git a/Examples/Filtering/DiscreteGaussianImageFilter.cxx b/Examples/Filtering/DiscreteGaussianImageFilter.cxx index af9cc820415..d00caf76153 100644 --- a/Examples/Filtering/DiscreteGaussianImageFilter.cxx +++ b/Examples/Filtering/DiscreteGaussianImageFilter.cxx @@ -142,7 +142,7 @@ main(int argc, char * argv[]) // Software Guide : EndCodeSnippet - const double gaussianVariance = std::stod(argv[3]); + const double gaussianVariance = std::stod(argv[3]); const unsigned int maxKernelWidth = std::stoi(argv[4]); diff --git a/Examples/Filtering/GradientVectorFlowImageFilter.cxx b/Examples/Filtering/GradientVectorFlowImageFilter.cxx index 21936835958..b3a4c379d74 100644 --- a/Examples/Filtering/GradientVectorFlowImageFilter.cxx +++ b/Examples/Filtering/GradientVectorFlowImageFilter.cxx @@ -144,7 +144,7 @@ main(int argc, char * argv[]) const unsigned int numberOfIterations = std::stoi(argv[3]); - const double noiseLevel = std::stod(argv[4]); + const double noiseLevel = std::stod(argv[4]); // Software Guide : BeginLatex diff --git a/Examples/Filtering/GrayscaleFunctionDilateImageFilter.cxx b/Examples/Filtering/GrayscaleFunctionDilateImageFilter.cxx index e6eb3b7bbf4..46d5bc336b5 100644 --- a/Examples/Filtering/GrayscaleFunctionDilateImageFilter.cxx +++ b/Examples/Filtering/GrayscaleFunctionDilateImageFilter.cxx @@ -54,7 +54,7 @@ main(int argc, char * argv[]) auto filter = FilterType::New(); - KernelType ball; + KernelType ball; KernelType::SizeType ballSize; ballSize[0] = 1; ballSize[1] = 4; diff --git a/Examples/Filtering/MinMaxCurvatureFlowImageFilter.cxx b/Examples/Filtering/MinMaxCurvatureFlowImageFilter.cxx index 7cf2f7f6782..de6c54ae7dc 100644 --- a/Examples/Filtering/MinMaxCurvatureFlowImageFilter.cxx +++ b/Examples/Filtering/MinMaxCurvatureFlowImageFilter.cxx @@ -163,7 +163,7 @@ main(int argc, char * argv[]) const unsigned int numberOfIterations = std::stoi(argv[3]); - const double timeStep = std::stod(argv[4]); + const double timeStep = std::stod(argv[4]); using RadiusType = FilterType::RadiusValueType; const RadiusType radius = atol(argv[5]); diff --git a/Examples/Filtering/RGBCurvatureAnisotropicDiffusionImageFilter.cxx b/Examples/Filtering/RGBCurvatureAnisotropicDiffusionImageFilter.cxx index ecc832ba95d..43bfe30aafe 100644 --- a/Examples/Filtering/RGBCurvatureAnisotropicDiffusionImageFilter.cxx +++ b/Examples/Filtering/RGBCurvatureAnisotropicDiffusionImageFilter.cxx @@ -138,7 +138,7 @@ main(int argc, char * argv[]) const unsigned int numberOfIterations = std::stoi(argv[3]); - const double timeStep = std::stod(argv[4]); + const double timeStep = std::stod(argv[4]); // Software Guide : BeginLatex diff --git a/Examples/Filtering/RGBGradientAnisotropicDiffusionImageFilter.cxx b/Examples/Filtering/RGBGradientAnisotropicDiffusionImageFilter.cxx index f4439727d24..e4298f2518d 100644 --- a/Examples/Filtering/RGBGradientAnisotropicDiffusionImageFilter.cxx +++ b/Examples/Filtering/RGBGradientAnisotropicDiffusionImageFilter.cxx @@ -138,7 +138,7 @@ main(int argc, char * argv[]) const unsigned int numberOfIterations = std::stoi(argv[3]); - const double timeStep = std::stod(argv[4]); + const double timeStep = std::stod(argv[4]); // Software Guide : BeginLatex diff --git a/Examples/Filtering/ResampleImageFilter4.cxx b/Examples/Filtering/ResampleImageFilter4.cxx index 0de5c81193f..4fca5e41a2d 100644 --- a/Examples/Filtering/ResampleImageFilter4.cxx +++ b/Examples/Filtering/ResampleImageFilter4.cxx @@ -123,8 +123,8 @@ main(int argc, char * argv[]) const InputImageType * inputImage = reader->GetOutput(); const InputImageType::SpacingType & spacing = inputImage->GetSpacing(); - const InputImageType::PointType & origin = inputImage->GetOrigin(); - InputImageType::SizeType size = + const InputImageType::PointType & origin = inputImage->GetOrigin(); + InputImageType::SizeType size = inputImage->GetLargestPossibleRegion().GetSize(); filter->SetOutputOrigin(origin); diff --git a/Examples/Filtering/SecondDerivativeRecursiveGaussianImageFilter.cxx b/Examples/Filtering/SecondDerivativeRecursiveGaussianImageFilter.cxx index 7eae5aa5de5..6d896f05e40 100644 --- a/Examples/Filtering/SecondDerivativeRecursiveGaussianImageFilter.cxx +++ b/Examples/Filtering/SecondDerivativeRecursiveGaussianImageFilter.cxx @@ -105,7 +105,7 @@ main(int argc, char * argv[]) reader->SetFileName(argv[1]); const std::string outputPrefix = argv[2]; - std::string outputFileName; + std::string outputFileName; try { diff --git a/Examples/Filtering/SpatialObjectToImage1.cxx b/Examples/Filtering/SpatialObjectToImage1.cxx index 6fccf268ebb..ec77d47f7fa 100644 --- a/Examples/Filtering/SpatialObjectToImage1.cxx +++ b/Examples/Filtering/SpatialObjectToImage1.cxx @@ -186,8 +186,8 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet ellipse->SetRadiusInObjectSpace(size[0] * 0.2 * spacing[0]); - typename TubeType::PointType point; - typename TubeType::TubePointType tubePoint; + typename TubeType::PointType point; + typename TubeType::TubePointType tubePoint; typename TubeType::TubePointListType tubePointList; point[0] = size[0] * 0.2 * spacing[0]; point[1] = size[1] * 0.2 * spacing[1]; diff --git a/Examples/Filtering/SpatialObjectToImage3.cxx b/Examples/Filtering/SpatialObjectToImage3.cxx index 8535b93ed74..604ae7ef84b 100644 --- a/Examples/Filtering/SpatialObjectToImage3.cxx +++ b/Examples/Filtering/SpatialObjectToImage3.cxx @@ -142,8 +142,8 @@ main(int argc, char * argv[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - constexpr unsigned int numberOfPoints = 6; - typename PolygonType::PointType point; + constexpr unsigned int numberOfPoints = 6; + typename PolygonType::PointType point; typename PolygonType::PointType::VectorType radial; radial[0] = 0.0; radial[1] = 0.0; diff --git a/Examples/Filtering/VectorCurvatureAnisotropicDiffusionImageFilter.cxx b/Examples/Filtering/VectorCurvatureAnisotropicDiffusionImageFilter.cxx index 29b06fb32f9..160a9bba9f9 100644 --- a/Examples/Filtering/VectorCurvatureAnisotropicDiffusionImageFilter.cxx +++ b/Examples/Filtering/VectorCurvatureAnisotropicDiffusionImageFilter.cxx @@ -134,7 +134,7 @@ main(int argc, char * argv[]) // Software Guide : EndCodeSnippet const unsigned int numberOfIterations = std::stoi(argv[4]); - const double timeStep = std::stod(argv[5]); + const double timeStep = std::stod(argv[5]); // Software Guide : BeginLatex diff --git a/Examples/Filtering/VectorGradientAnisotropicDiffusionImageFilter.cxx b/Examples/Filtering/VectorGradientAnisotropicDiffusionImageFilter.cxx index 6ea297e88e8..42dbc080dd0 100644 --- a/Examples/Filtering/VectorGradientAnisotropicDiffusionImageFilter.cxx +++ b/Examples/Filtering/VectorGradientAnisotropicDiffusionImageFilter.cxx @@ -133,7 +133,7 @@ main(int argc, char * argv[]) const unsigned int numberOfIterations = std::stoi(argv[4]); - const double timeStep = std::stod(argv[5]); + const double timeStep = std::stod(argv[5]); // Software Guide : BeginLatex diff --git a/Examples/IO/DicomImageReadPrintTags.cxx b/Examples/IO/DicomImageReadPrintTags.cxx index f9095e528ab..19483d5a686 100644 --- a/Examples/IO/DicomImageReadPrintTags.cxx +++ b/Examples/IO/DicomImageReadPrintTags.cxx @@ -222,7 +222,7 @@ main(int argc, char * argv[]) if (entryvalue) { const std::string tagkey = itr->first; - std::string labelId; + std::string labelId; const bool found = itk::GDCMImageIO::GetLabelFromTag(tagkey, labelId); // Software Guide : EndCodeSnippet @@ -282,7 +282,7 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet const std::string entryId = "0010|0010"; - auto tagItr = dictionary.Find(entryId); + auto tagItr = dictionary.Find(entryId); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // @@ -326,7 +326,7 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet const std::string tagkey = "0008|1050"; - std::string labelId; + std::string labelId; if (itk::GDCMImageIO::GetLabelFromTag(tagkey, labelId)) { std::string value; @@ -365,7 +365,7 @@ main(int argc, char * argv[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - const itk::IOPixelEnum pixelType = reader->GetImageIO()->GetPixelType(); + const itk::IOPixelEnum pixelType = reader->GetImageIO()->GetPixelType(); const itk::IOComponentEnum componentType = reader->GetImageIO()->GetComponentType(); std::cout << "PixelType: " diff --git a/Examples/IO/DicomPrintPatientInformation.cxx b/Examples/IO/DicomPrintPatientInformation.cxx index 430ba09d7ee..dda3e92773f 100644 --- a/Examples/IO/DicomPrintPatientInformation.cxx +++ b/Examples/IO/DicomPrintPatientInformation.cxx @@ -28,11 +28,11 @@ #include "itkMetaDataObject.h" std::string -FindDicomTag(const std::string & entryId, +FindDicomTag(const std::string & entryId, const itk::GDCMImageIO::Pointer dicomIO) { std::string tagvalue; - const bool found = dicomIO->GetValueFromTag(entryId, tagvalue); + const bool found = dicomIO->GetValueFromTag(entryId, tagvalue); if (!found) { tagvalue = "NOT FOUND"; diff --git a/Examples/IO/IOFactoryRegistration.cxx b/Examples/IO/IOFactoryRegistration.cxx index 4e31fbcf7e0..83c9d5c2a09 100644 --- a/Examples/IO/IOFactoryRegistration.cxx +++ b/Examples/IO/IOFactoryRegistration.cxx @@ -35,7 +35,7 @@ main() for (const auto & factory : factories) { std::istringstream iss(factory->GetDescription()); - std::string IOType; + std::string IOType; iss >> IOType; // the first word of the description std::cout << IOType << " "; } diff --git a/Examples/IO/IOPlugin.cxx b/Examples/IO/IOPlugin.cxx index 2f70c8f17b9..65dc69d66ce 100644 --- a/Examples/IO/IOPlugin.cxx +++ b/Examples/IO/IOPlugin.cxx @@ -32,7 +32,7 @@ main(int argc, char * argv[]) const char * envName = "ITK_AUTOLOAD_PATH"; - char * oldenv = getenv(envName); + char * oldenv = getenv(envName); std::string myenv = std::string(envName) + "="; @@ -80,7 +80,7 @@ main(int argc, char * argv[]) std::list enableflags = factory->GetEnableFlags(); std::list::const_iterator n = names.begin(); std::list::const_iterator d = descriptions.begin(); - std::list::const_iterator e = enableflags.begin(); + std::list::const_iterator e = enableflags.begin(); for (std::list::const_iterator o = overrides.begin(); o != overrides.end(); ++o, ++n, ++d, e++) @@ -171,7 +171,7 @@ main(int argc, char * argv[]) std::cout << "EnableFlags size: " << enableflags.size() << std::endl; std::list::const_iterator n = names.begin(); std::list::const_iterator d = descriptions.begin(); - std::list::const_iterator e = enableflags.begin(); + std::list::const_iterator e = enableflags.begin(); for (std::list::const_iterator o = overrides.begin(); o != overrides.end(); ++o, ++n, ++d, ++e) diff --git a/Examples/IO/ImageReadDicomSeriesWrite.cxx b/Examples/IO/ImageReadDicomSeriesWrite.cxx index cc91e531d5f..6feab286267 100644 --- a/Examples/IO/ImageReadDicomSeriesWrite.cxx +++ b/Examples/IO/ImageReadDicomSeriesWrite.cxx @@ -119,7 +119,7 @@ main(int argc, char * argv[]) reader->GetOutput()->GetLargestPossibleRegion(); ImageType::IndexType start = region.GetIndex(); - ImageType::SizeType size = region.GetSize(); + ImageType::SizeType size = region.GetSize(); std::string format = outputDirectory; diff --git a/Examples/IO/ImageReadExtractFilterInsertWrite.cxx b/Examples/IO/ImageReadExtractFilterInsertWrite.cxx index 540b76c6623..e8527db4fad 100644 --- a/Examples/IO/ImageReadExtractFilterInsertWrite.cxx +++ b/Examples/IO/ImageReadExtractFilterInsertWrite.cxx @@ -165,7 +165,7 @@ main(int argc, char ** argv) // Software Guide : BeginCodeSnippet reader->Update(); - const InputImageType * inputImage = reader->GetOutput(); + const InputImageType * inputImage = reader->GetOutput(); const InputImageType::RegionType inputRegion = inputImage->GetBufferedRegion(); // Software Guide : EndCodeSnippet @@ -199,7 +199,7 @@ main(int argc, char ** argv) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet InputImageType::IndexType start = inputRegion.GetIndex(); - const unsigned int sliceNumber = std::stoi(argv[3]); + const unsigned int sliceNumber = std::stoi(argv[3]); start[2] = sliceNumber; // Software Guide : EndCodeSnippet diff --git a/Examples/IO/ImageReadExtractWrite.cxx b/Examples/IO/ImageReadExtractWrite.cxx index edae8cd341e..dff2a302af0 100644 --- a/Examples/IO/ImageReadExtractWrite.cxx +++ b/Examples/IO/ImageReadExtractWrite.cxx @@ -215,7 +215,7 @@ main(int argc, char ** argv) // Software Guide : BeginCodeSnippet InputImageType::IndexType start = inputRegion.GetIndex(); - const unsigned int sliceNumber = std::stoi(argv[3]); + const unsigned int sliceNumber = std::stoi(argv[3]); start[2] = sliceNumber; // Software Guide : EndCodeSnippet diff --git a/Examples/IO/ImageReadImageSeriesWrite.cxx b/Examples/IO/ImageReadImageSeriesWrite.cxx index e8d36a4dcd1..328d3052dce 100644 --- a/Examples/IO/ImageReadImageSeriesWrite.cxx +++ b/Examples/IO/ImageReadImageSeriesWrite.cxx @@ -155,8 +155,8 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet const ImageType::ConstPointer inputImage = reader->GetOutput(); const ImageType::RegionType region = inputImage->GetLargestPossibleRegion(); - ImageType::IndexType start = region.GetIndex(); - ImageType::SizeType size = region.GetSize(); + ImageType::IndexType start = region.GetIndex(); + ImageType::SizeType size = region.GetSize(); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex diff --git a/Examples/IO/XML/DOMFindDemo.cxx b/Examples/IO/XML/DOMFindDemo.cxx index 49982407864..3c8e71a2a83 100644 --- a/Examples/IO/XML/DOMFindDemo.cxx +++ b/Examples/IO/XML/DOMFindDemo.cxx @@ -69,7 +69,7 @@ main(int argc, char * argv[]) // it navigates through the loaded XML document by typing a query string // on the console and displaying the returned result. itk::DOMNode::Pointer dom1 = dom; - std::string query = ""; + std::string query = ""; do { std::cout << "query = \"" << query << "\"" << std::endl; diff --git a/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.cxx b/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.cxx index 628c0d4989c..9495d03acf8 100644 --- a/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.cxx +++ b/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.cxx @@ -31,7 +31,7 @@ int ParticleSwarmOptimizerSAXReader::CanReadFile(const char * name) { std::ifstream ifs(name); - const int yes = ifs.is_open(); + const int yes = ifs.is_open(); if (yes) { ifs.close(); @@ -43,7 +43,7 @@ ParticleSwarmOptimizerSAXReader::CanReadFile(const char * name) * Method called when a new xml tag start is encountered. */ void -ParticleSwarmOptimizerSAXReader::StartElement(const char * name, +ParticleSwarmOptimizerSAXReader::StartElement(const char * name, const char ** atts) { if (itksys::SystemTools::Strucmp(name, "optimizer") == 0 && @@ -129,13 +129,13 @@ ParticleSwarmOptimizerSAXReader::EndElement(const char * name) */ void ParticleSwarmOptimizerSAXReader::CharacterDataHandler(const char * inData, - int inLength) + int inLength) { if (this->ContextIs("/optimizer/ParametersConvergenceTolerance")) { std::vector data; - const std::string s(inData, inLength); + const std::string s(inData, inLength); std::istringstream iss(s); while (iss.good()) { @@ -168,7 +168,7 @@ ParticleSwarmOptimizerSAXReader::ReadFile() // so the following is needed if we want to include the file name in the // exception message ExceptionObject e(__FILE__, __LINE__); - std::string message = "Cannot read from "; + std::string message = "Cannot read from "; message += this->m_Filename; message += "!\n"; e.SetDescription(message.c_str()); @@ -196,7 +196,7 @@ ParticleSwarmOptimizerSAXReader::ReadFile() /** Process tag 'optimizer' attributes. */ void ParticleSwarmOptimizerSAXReader::ProcessOptimizerAttributes( - const char ** atts, + const char ** atts, ParticleSwarmOptimizer * opt) { // go over all the attribute-value pairs @@ -205,7 +205,7 @@ ParticleSwarmOptimizerSAXReader::ProcessOptimizerAttributes( if (itksys::SystemTools::Strucmp(atts[i], "NumberOfParticles") == 0) { std::istringstream iss(atts[i + 1]); - int nop = 0; + int nop = 0; iss >> nop; opt->SetNumberOfParticles(nop); } @@ -213,21 +213,21 @@ ParticleSwarmOptimizerSAXReader::ProcessOptimizerAttributes( "MaximumNumberOfIterations") == 0) { std::istringstream iss(atts[i + 1]); - int noi = 0; + int noi = 0; iss >> noi; opt->SetMaximalNumberOfIterations(noi); } else if (itksys::SystemTools::Strucmp(atts[i], "InertiaCoefficient") == 0) { std::istringstream iss(atts[i + 1]); - double icoef = 0; + double icoef = 0; iss >> icoef; opt->SetInertiaCoefficient(icoef); } else if (itksys::SystemTools::Strucmp(atts[i], "GlobalCoefficient") == 0) { std::istringstream iss(atts[i + 1]); - double gcoef = 0; + double gcoef = 0; iss >> gcoef; opt->SetGlobalCoefficient(gcoef); } @@ -235,7 +235,7 @@ ParticleSwarmOptimizerSAXReader::ProcessOptimizerAttributes( 0) { std::istringstream iss(atts[i + 1]); - double pcoef = 0; + double pcoef = 0; iss >> pcoef; opt->SetPersonalCoefficient(pcoef); } @@ -243,7 +243,7 @@ ParticleSwarmOptimizerSAXReader::ProcessOptimizerAttributes( atts[i], "FunctionConvergenceTolerance") == 0) { std::istringstream iss(atts[i + 1]); - double ftol = 0; + double ftol = 0; iss >> ftol; opt->SetFunctionConvergenceTolerance(ftol); } @@ -251,7 +251,7 @@ ParticleSwarmOptimizerSAXReader::ProcessOptimizerAttributes( "ConvergedPercentageToStop") == 0) { std::istringstream iss(atts[i + 1]); - double stoppercent = 0; + double stoppercent = 0; iss >> stoppercent; opt->SetPercentageParticlesConverged(stoppercent); } @@ -261,7 +261,7 @@ ParticleSwarmOptimizerSAXReader::ProcessOptimizerAttributes( /** Process tag 'bound' attributes. */ void ParticleSwarmOptimizerSAXReader::ProcessBoundAttributes( - const char ** atts, + const char ** atts, std::vector & bound) { // go over all the attribute-value pairs @@ -288,7 +288,7 @@ ParticleSwarmOptimizerSAXReader::ProcessBoundAttributes( /** Search for and return a particular attribute from the attribute list. */ const char * ParticleSwarmOptimizerSAXReader::GetAttribute(const char ** atts, - const char * key) + const char * key) { // go over all the attribute-value pairs for (size_t i = 0; atts[i] != nullptr; i += 2) diff --git a/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.h b/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.h index 1b61d75a772..706b8a911e6 100644 --- a/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.h +++ b/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.h @@ -96,7 +96,7 @@ class ParticleSwarmOptimizerSAXReader /** Process tag 'optimizer' attributes. */ void - ProcessOptimizerAttributes(const char ** atts, + ProcessOptimizerAttributes(const char ** atts, ParticleSwarmOptimizer * opt); /** Process tag 'bound' attributes. */ @@ -117,7 +117,7 @@ class ParticleSwarmOptimizerSAXReader // other temporary variables used during XML parsing std::vector m_LowerBound; std::vector m_UpperBound; - Array m_ParametersConvergenceTolerance; + Array m_ParametersConvergenceTolerance; }; } // namespace itk diff --git a/Examples/IO/XML/itkParticleSwarmOptimizerSAXWriter.cxx b/Examples/IO/XML/itkParticleSwarmOptimizerSAXWriter.cxx index 53da4ee2f60..9d483c887af 100644 --- a/Examples/IO/XML/itkParticleSwarmOptimizerSAXWriter.cxx +++ b/Examples/IO/XML/itkParticleSwarmOptimizerSAXWriter.cxx @@ -30,7 +30,7 @@ int ParticleSwarmOptimizerSAXWriter::CanWriteFile(const char * name) { std::ofstream ofs(name); - const int yes = ofs.is_open(); + const int yes = ofs.is_open(); if (yes) { ofs.close(); @@ -49,7 +49,7 @@ ParticleSwarmOptimizerSAXWriter::WriteFile() if (!this->CanWriteFile(this->m_Filename.c_str())) { ExceptionObject e(__FILE__, __LINE__); - std::string message = "Cannot write to "; + std::string message = "Cannot write to "; message += this->m_Filename; message += "!\n"; e.SetDescription(message.c_str()); diff --git a/Examples/Iterators/ImageLinearIteratorWithIndex.cxx b/Examples/Iterators/ImageLinearIteratorWithIndex.cxx index acebd5b5496..b1c4fb690b9 100644 --- a/Examples/Iterators/ImageLinearIteratorWithIndex.cxx +++ b/Examples/Iterators/ImageLinearIteratorWithIndex.cxx @@ -142,7 +142,7 @@ main(int argc, char * argv[]) using WriterType = itk::ImageFileWriter; ImageType::ConstPointer inputImage; - auto reader = ReaderType::New(); + auto reader = ReaderType::New(); reader->SetFileName(argv[1]); try { @@ -181,7 +181,7 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet ConstIteratorType inputIt(inputImage, inputImage->GetRequestedRegion()); - IteratorType outputIt(outputImage, inputImage->GetRequestedRegion()); + IteratorType outputIt(outputImage, inputImage->GetRequestedRegion()); inputIt.SetDirection(0); outputIt.SetDirection(0); diff --git a/Examples/Iterators/ImageLinearIteratorWithIndex2.cxx b/Examples/Iterators/ImageLinearIteratorWithIndex2.cxx index 519e77f6651..bd8d105b307 100644 --- a/Examples/Iterators/ImageLinearIteratorWithIndex2.cxx +++ b/Examples/Iterators/ImageLinearIteratorWithIndex2.cxx @@ -101,17 +101,17 @@ main(int argc, char * argv[]) using Origin4DType = Image4DType::PointType; // Software Guide : EndCodeSnippet - Index3DType index3D; - Size3DType size3D; + Index3DType index3D; + Size3DType size3D; Spacing3DType spacing3D; - Origin3DType origin3D; + Origin3DType origin3D; const Image4DType::RegionType region4D = image4D->GetBufferedRegion(); - Index4DType index4D = region4D.GetIndex(); - Size4DType size4D = region4D.GetSize(); + Index4DType index4D = region4D.GetIndex(); + Size4DType size4D = region4D.GetSize(); Spacing4DType spacing4D = image4D->GetSpacing(); - Origin4DType origin4D = image4D->GetOrigin(); + Origin4DType origin4D = image4D->GetOrigin(); // Software Guide : BeginLatex // diff --git a/Examples/Iterators/ImageRandomConstIteratorWithIndex.cxx b/Examples/Iterators/ImageRandomConstIteratorWithIndex.cxx index f08d4d721f4..da92d71fcb9 100644 --- a/Examples/Iterators/ImageRandomConstIteratorWithIndex.cxx +++ b/Examples/Iterators/ImageRandomConstIteratorWithIndex.cxx @@ -74,7 +74,7 @@ main(int argc, char * argv[]) using ReaderType = itk::ImageFileReader; ImageType::ConstPointer inputImage; - auto reader = ReaderType::New(); + auto reader = ReaderType::New(); reader->SetFileName(argv[1]); try { diff --git a/Examples/Iterators/ImageRegionIterator.cxx b/Examples/Iterators/ImageRegionIterator.cxx index eae7267b6a1..2deaf789f27 100644 --- a/Examples/Iterators/ImageRegionIterator.cxx +++ b/Examples/Iterators/ImageRegionIterator.cxx @@ -93,7 +93,7 @@ main(int argc, char * argv[]) ImageType::RegionType inputRegion; ImageType::RegionType::IndexType inputStart; - ImageType::RegionType::SizeType size; + ImageType::RegionType::SizeType size; inputStart[0] = std::stoi(argv[3]); inputStart[1] = std::stoi(argv[4]); @@ -165,8 +165,8 @@ main(int argc, char * argv[]) auto outputImage = ImageType::New(); outputImage->SetRegions(outputRegion); const ImageType::SpacingType & spacing = inputImage->GetSpacing(); - const ImageType::PointType & inputOrigin = inputImage->GetOrigin(); - double outputOrigin[Dimension]; + const ImageType::PointType & inputOrigin = inputImage->GetOrigin(); + double outputOrigin[Dimension]; for (unsigned int i = 0; i < Dimension; ++i) { @@ -193,7 +193,7 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet ConstIteratorType inputIt(inputImage, inputRegion); - IteratorType outputIt(outputImage, outputRegion); + IteratorType outputIt(outputImage, outputRegion); inputIt.GoToBegin(); outputIt.GoToBegin(); diff --git a/Examples/Iterators/ImageSliceIteratorWithIndex.cxx b/Examples/Iterators/ImageSliceIteratorWithIndex.cxx index 8541b70bfa7..b49907c8845 100644 --- a/Examples/Iterators/ImageSliceIteratorWithIndex.cxx +++ b/Examples/Iterators/ImageSliceIteratorWithIndex.cxx @@ -193,8 +193,8 @@ main(int argc, char * argv[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - ImageType2D::RegionType region; - ImageType2D::RegionType::SizeType size; + ImageType2D::RegionType region; + ImageType2D::RegionType::SizeType size; ImageType2D::RegionType::IndexType index; const ImageType3D::RegionType requestedRegion = @@ -225,7 +225,7 @@ main(int argc, char * argv[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - SliceIteratorType inputIt(inputImage, inputImage->GetRequestedRegion()); + SliceIteratorType inputIt(inputImage, inputImage->GetRequestedRegion()); LinearIteratorType outputIt(outputImage, outputImage->GetRequestedRegion()); inputIt.SetFirstDirection(direction[1]); diff --git a/Examples/Iterators/NeighborhoodIterators3.cxx b/Examples/Iterators/NeighborhoodIterators3.cxx index 241dc332d8d..63cd53394d0 100644 --- a/Examples/Iterators/NeighborhoodIterators3.cxx +++ b/Examples/Iterators/NeighborhoodIterators3.cxx @@ -114,7 +114,7 @@ main(int argc, char ** argv) using FaceCalculatorType = itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator; - FaceCalculatorType faceCalculator; + FaceCalculatorType faceCalculator; FaceCalculatorType::FaceListType faceList; // Software Guide : EndCodeSnippet @@ -167,7 +167,7 @@ main(int argc, char ** argv) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - IteratorType out; + IteratorType out; NeighborhoodIteratorType it; for (fit = faceList.begin(); fit != faceList.end(); ++fit) diff --git a/Examples/Iterators/NeighborhoodIterators4.cxx b/Examples/Iterators/NeighborhoodIterators4.cxx index 1d178f15299..0cd189cab29 100644 --- a/Examples/Iterators/NeighborhoodIterators4.cxx +++ b/Examples/Iterators/NeighborhoodIterators4.cxx @@ -105,11 +105,11 @@ main(int argc, char ** argv) using FaceCalculatorType = itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator; - FaceCalculatorType faceCalculator; - FaceCalculatorType::FaceListType faceList; + FaceCalculatorType faceCalculator; + FaceCalculatorType::FaceListType faceList; FaceCalculatorType::FaceListType::iterator fit; - IteratorType out; + IteratorType out; NeighborhoodIteratorType it; diff --git a/Examples/Iterators/NeighborhoodIterators5.cxx b/Examples/Iterators/NeighborhoodIterators5.cxx index df0af750479..908d8725aa1 100644 --- a/Examples/Iterators/NeighborhoodIterators5.cxx +++ b/Examples/Iterators/NeighborhoodIterators5.cxx @@ -97,11 +97,11 @@ main(int argc, char ** argv) using FaceCalculatorType = itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator; - FaceCalculatorType faceCalculator; - FaceCalculatorType::FaceListType faceList; + FaceCalculatorType faceCalculator; + FaceCalculatorType::FaceListType faceList; FaceCalculatorType::FaceListType::iterator fit; - IteratorType out; + IteratorType out; NeighborhoodIteratorType it; // Software Guide: BeginLatex diff --git a/Examples/Iterators/ShapedNeighborhoodIterators1.cxx b/Examples/Iterators/ShapedNeighborhoodIterators1.cxx index 6fa85350060..8e44ba3eae4 100644 --- a/Examples/Iterators/ShapedNeighborhoodIterators1.cxx +++ b/Examples/Iterators/ShapedNeighborhoodIterators1.cxx @@ -126,8 +126,8 @@ main(int argc, char ** argv) using FaceCalculatorType = itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator; - FaceCalculatorType faceCalculator; - FaceCalculatorType::FaceListType faceList; + FaceCalculatorType faceCalculator; + FaceCalculatorType::FaceListType faceList; FaceCalculatorType::FaceListType::iterator fit; faceList = @@ -146,7 +146,7 @@ main(int argc, char ** argv) constexpr PixelType background_value = 0; constexpr PixelType foreground_value = 255; - const auto rad = static_cast(element_radius); + const auto rad = static_cast(element_radius); // Software Guide : EndCodeSnippet diff --git a/Examples/Iterators/ShapedNeighborhoodIterators2.cxx b/Examples/Iterators/ShapedNeighborhoodIterators2.cxx index 2c8a00086be..02c6a9e64bb 100644 --- a/Examples/Iterators/ShapedNeighborhoodIterators2.cxx +++ b/Examples/Iterators/ShapedNeighborhoodIterators2.cxx @@ -72,8 +72,8 @@ main(int argc, char ** argv) using FaceCalculatorType = itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator; - FaceCalculatorType faceCalculator; - FaceCalculatorType::FaceListType faceList; + FaceCalculatorType faceCalculator; + FaceCalculatorType::FaceListType faceList; FaceCalculatorType::FaceListType::iterator fit; auto radius = itk::MakeFilled( @@ -83,7 +83,7 @@ main(int argc, char ** argv) faceCalculator(reader->GetOutput(), output->GetRequestedRegion(), radius); IteratorType out; - const auto rad = static_cast(element_radius); + const auto rad = static_cast(element_radius); constexpr PixelType background_value = 0; constexpr PixelType foreground_value = 255; diff --git a/Examples/RegistrationITKv4/BSplineWarping1.cxx b/Examples/RegistrationITKv4/BSplineWarping1.cxx index bf6db1cf6fc..55224af761a 100644 --- a/Examples/RegistrationITKv4/BSplineWarping1.cxx +++ b/Examples/RegistrationITKv4/BSplineWarping1.cxx @@ -153,8 +153,8 @@ main(int argc, char * argv[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - FixedImageType::SpacingType fixedSpacing = fixedImage->GetSpacing(); - const FixedImageType::PointType fixedOrigin = fixedImage->GetOrigin(); + FixedImageType::SpacingType fixedSpacing = fixedImage->GetSpacing(); + const FixedImageType::PointType fixedOrigin = fixedImage->GetOrigin(); const FixedImageType::DirectionType fixedDirection = fixedImage->GetDirection(); @@ -210,7 +210,7 @@ main(int argc, char * argv[]) constexpr unsigned int numberOfGridNodes = 7; TransformType::PhysicalDimensionsType fixedPhysicalDimensions; - TransformType::MeshSizeType meshSize; + TransformType::MeshSizeType meshSize; for (unsigned int i = 0; i < SpaceDimension; ++i) { @@ -326,8 +326,8 @@ main(int argc, char * argv[]) fi.GoToBegin(); - TransformType::InputPointType fixedPoint; - TransformType::OutputPointType movingPoint; + TransformType::InputPointType fixedPoint; + TransformType::OutputPointType movingPoint; DisplacementFieldType::IndexType index; VectorType displacement; diff --git a/Examples/RegistrationITKv4/BSplineWarping2.cxx b/Examples/RegistrationITKv4/BSplineWarping2.cxx index d53826196b8..a66eda6f196 100644 --- a/Examples/RegistrationITKv4/BSplineWarping2.cxx +++ b/Examples/RegistrationITKv4/BSplineWarping2.cxx @@ -150,8 +150,8 @@ main(int argc, char * argv[]) resampler->SetInterpolator(interpolator); - FixedImageType::SpacingType fixedSpacing = fixedImage->GetSpacing(); - const FixedImageType::PointType fixedOrigin = fixedImage->GetOrigin(); + FixedImageType::SpacingType fixedSpacing = fixedImage->GetSpacing(); + const FixedImageType::PointType fixedOrigin = fixedImage->GetOrigin(); const FixedImageType::DirectionType fixedDirection = fixedImage->GetDirection(); @@ -208,7 +208,7 @@ main(int argc, char * argv[]) constexpr unsigned int numberOfGridNodes = 8; TransformType::PhysicalDimensionsType fixedPhysicalDimensions; - TransformType::MeshSizeType meshSize; + TransformType::MeshSizeType meshSize; for (unsigned int i = 0; i < SpaceDimension; ++i) { @@ -326,8 +326,8 @@ main(int argc, char * argv[]) fi.GoToBegin(); - TransformType::InputPointType fixedPoint; - TransformType::OutputPointType movingPoint; + TransformType::InputPointType fixedPoint; + TransformType::OutputPointType movingPoint; DisplacementFieldType::IndexType index; VectorType displacement; diff --git a/Examples/RegistrationITKv4/ChangeInformationImageFilter.cxx b/Examples/RegistrationITKv4/ChangeInformationImageFilter.cxx index b8c750b8cf6..44381f801c5 100644 --- a/Examples/RegistrationITKv4/ChangeInformationImageFilter.cxx +++ b/Examples/RegistrationITKv4/ChangeInformationImageFilter.cxx @@ -119,8 +119,8 @@ main(int argc, char * argv[]) const ImageType::ConstPointer inputImage = reader->GetOutput(); - ImageType::PointType origin = inputImage->GetOrigin(); - ImageType::SpacingType spacing = inputImage->GetSpacing(); + ImageType::PointType origin = inputImage->GetOrigin(); + ImageType::SpacingType spacing = inputImage->GetSpacing(); const ImageType::DirectionType direction = inputImage->GetDirection(); if (argc > 3) diff --git a/Examples/RegistrationITKv4/DeformableRegistration1.cxx b/Examples/RegistrationITKv4/DeformableRegistration1.cxx index 6bbf3697e74..dd51e0dc8c6 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration1.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration1.cxx @@ -126,8 +126,8 @@ main(int argc, char * argv[]) registrationFilter->ChooseMetric(0); unsigned int maxiters = 20; - float E = 100; - float p = 1; + float E = 100; + float p = 1; registrationFilter->SetElasticity(E, 0); registrationFilter->SetRho(p, 0); registrationFilter->SetGamma(1., 0); @@ -214,7 +214,7 @@ main(int argc, char * argv[]) registrationFilter->SetMovingImage(IntensityEqualizeFilter->GetOutput()); - auto writer = itk::ImageFileWriter::New(); + auto writer = itk::ImageFileWriter::New(); std::string ofn = "fixed.mha"; writer->SetFileName(ofn.c_str()); writer->SetInput(registrationFilter->GetFixedImage()); diff --git a/Examples/RegistrationITKv4/DeformableRegistration10.cxx b/Examples/RegistrationITKv4/DeformableRegistration10.cxx index 8a95ba5cb5e..c0ff20fc652 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration10.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration10.cxx @@ -175,8 +175,8 @@ main(int argc, char * argv[]) InternalPixelType>; using InterpolatorType = itk::LinearInterpolateImageFunction; - auto warper = WarperType::New(); - auto interpolator = InterpolatorType::New(); + auto warper = WarperType::New(); + auto interpolator = InterpolatorType::New(); const FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); warper->SetInput(movingImageReader->GetOutput()); diff --git a/Examples/RegistrationITKv4/DeformableRegistration11.cxx b/Examples/RegistrationITKv4/DeformableRegistration11.cxx index 7ece605a9c9..af1944ef3dc 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration11.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration11.cxx @@ -64,8 +64,8 @@ main(int argc, char * argv[]) registrationFilter->ChooseMetric(0); unsigned int maxiters = 20; - float E = 10; - float p = 1; + float E = 10; + float p = 1; registrationFilter->SetElasticity(E, 0); registrationFilter->SetRho(p, 0); registrationFilter->SetGamma(1., 0); diff --git a/Examples/RegistrationITKv4/DeformableRegistration12.cxx b/Examples/RegistrationITKv4/DeformableRegistration12.cxx index 8edb123ae24..cbfdf39a335 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration12.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration12.cxx @@ -193,8 +193,8 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet TransformType::PhysicalDimensionsType fixedPhysicalDimensions; - TransformType::MeshSizeType meshSize; - TransformType::OriginType fixedOrigin; + TransformType::MeshSizeType meshSize; + TransformType::OriginType fixedOrigin; for (unsigned int i = 0; i < SpaceDimension; ++i) { @@ -240,8 +240,8 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet const unsigned int numParameters = transform->GetNumberOfParameters(); OptimizerType::BoundSelectionType boundSelect(numParameters); - OptimizerType::BoundValueType upperBound(numParameters); - OptimizerType::BoundValueType lowerBound(numParameters); + OptimizerType::BoundValueType upperBound(numParameters); + OptimizerType::BoundValueType lowerBound(numParameters); boundSelect.Fill(0); upperBound.Fill(0.0); @@ -286,7 +286,7 @@ main(int argc, char * argv[]) // Add time and memory probes - itk::TimeProbesCollectorBase chronometer; + itk::TimeProbesCollectorBase chronometer; itk::MemoryProbesCollectorBase memorymeter; std::cout << std::endl << "Starting Registration" << std::endl; @@ -452,8 +452,8 @@ main(int argc, char * argv[]) fi.GoToBegin(); - TransformType::InputPointType fixedPoint; - TransformType::OutputPointType movingPoint; + TransformType::InputPointType fixedPoint; + TransformType::OutputPointType movingPoint; DisplacementFieldType::IndexType index; VectorType displacement; diff --git a/Examples/RegistrationITKv4/DeformableRegistration13.cxx b/Examples/RegistrationITKv4/DeformableRegistration13.cxx index a8711d5596e..8cd4a916add 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration13.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration13.cxx @@ -204,8 +204,8 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet TransformType::PhysicalDimensionsType fixedPhysicalDimensions; - TransformType::MeshSizeType meshSize; - TransformType::OriginType fixedOrigin; + TransformType::MeshSizeType meshSize; + TransformType::OriginType fixedOrigin; for (unsigned int i = 0; i < SpaceDimension; ++i) { @@ -283,7 +283,7 @@ main(int argc, char * argv[]) // Add a time probe - itk::TimeProbesCollectorBase chronometer; + itk::TimeProbesCollectorBase chronometer; itk::MemoryProbesCollectorBase memorymeter; std::cout << std::endl << "Starting Registration" << std::endl; @@ -441,8 +441,8 @@ main(int argc, char * argv[]) fi.GoToBegin(); - TransformType::InputPointType fixedPoint; - TransformType::OutputPointType movingPoint; + TransformType::InputPointType fixedPoint; + TransformType::OutputPointType movingPoint; DisplacementFieldType::IndexType index; VectorType displacement; diff --git a/Examples/RegistrationITKv4/DeformableRegistration14.cxx b/Examples/RegistrationITKv4/DeformableRegistration14.cxx index 93beaab2a73..33e29cda681 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration14.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration14.cxx @@ -179,8 +179,8 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet TransformType::PhysicalDimensionsType fixedPhysicalDimensions; - TransformType::MeshSizeType meshSize; - TransformType::OriginType fixedOrigin; + TransformType::MeshSizeType meshSize; + TransformType::OriginType fixedOrigin; for (unsigned int i = 0; i < SpaceDimension; ++i) { @@ -277,7 +277,7 @@ main(int argc, char * argv[]) } // Add time and memory probes - itk::TimeProbesCollectorBase chronometer; + itk::TimeProbesCollectorBase chronometer; itk::MemoryProbesCollectorBase memorymeter; std::cout << std::endl << "Starting Registration" << std::endl; @@ -427,8 +427,8 @@ main(int argc, char * argv[]) fi.GoToBegin(); - TransformType::InputPointType fixedPoint; - TransformType::OutputPointType movingPoint; + TransformType::InputPointType fixedPoint; + TransformType::OutputPointType movingPoint; DisplacementFieldType::IndexType index; VectorType displacement; diff --git a/Examples/RegistrationITKv4/DeformableRegistration15.cxx b/Examples/RegistrationITKv4/DeformableRegistration15.cxx index 78ff03d9af8..e8ebbbe70b6 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration15.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration15.cxx @@ -210,7 +210,7 @@ main(int argc, char * argv[]) // Add a time and memory probes collector for profiling the computation time // of every stage. - itk::TimeProbesCollectorBase chronometer; + itk::TimeProbesCollectorBase chronometer; itk::MemoryProbesCollectorBase memorymeter; @@ -414,8 +414,8 @@ main(int argc, char * argv[]) constexpr unsigned int numberOfGridNodesInOneDimensionCoarse = 5; DeformableTransformType::PhysicalDimensionsType fixedPhysicalDimensions; - DeformableTransformType::MeshSizeType meshSize; - DeformableTransformType::OriginType fixedOrigin; + DeformableTransformType::MeshSizeType meshSize; + DeformableTransformType::OriginType fixedOrigin; for (unsigned int i = 0; i < SpaceDimension; ++i) { @@ -828,9 +828,9 @@ main(int argc, char * argv[]) fi.GoToBegin(); - DeformableTransformType::InputPointType fixedPoint; + DeformableTransformType::InputPointType fixedPoint; DeformableTransformType::OutputPointType movingPoint; - DisplacementFieldType::IndexType index; + DisplacementFieldType::IndexType index; VectorType displacement; diff --git a/Examples/RegistrationITKv4/DeformableRegistration16.cxx b/Examples/RegistrationITKv4/DeformableRegistration16.cxx index 3a4fe7d7923..cff1e1588d9 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration16.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration16.cxx @@ -101,7 +101,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "itkDisplacementFieldTransform.h" unsigned int RmsCounter = 0; -double MaxRmsE[4] = { 0.8, 0.75, 0.4, 0.2 }; +double MaxRmsE[4] = { 0.8, 0.75, 0.4, 0.2 }; // // The following section of code implements a Command observer diff --git a/Examples/RegistrationITKv4/DeformableRegistration17.cxx b/Examples/RegistrationITKv4/DeformableRegistration17.cxx index dd07d2b68d9..bf433a4897e 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration17.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration17.cxx @@ -104,7 +104,7 @@ POSSIBILITY OF SUCH DAMAGE. namespace { unsigned int RmsCounter = 0; -double MaxRmsE[4] = { 0.8, 0.75, 0.4, 0.2 }; +double MaxRmsE[4] = { 0.8, 0.75, 0.4, 0.2 }; } // namespace // The following section of code implements a Command observer diff --git a/Examples/RegistrationITKv4/DeformableRegistration2.cxx b/Examples/RegistrationITKv4/DeformableRegistration2.cxx index 35a1235554f..2ca7683b20f 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration2.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration2.cxx @@ -425,7 +425,7 @@ main(int argc, char * argv[]) const VectorImage2DType::RegionType region2D = vectorImage2D->GetBufferedRegion(); VectorImage2DType::IndexType index2D = region2D.GetIndex(); - VectorImage2DType::SizeType size2D = region2D.GetSize(); + VectorImage2DType::SizeType size2D = region2D.GetSize(); using Vector3DType = itk::Vector; @@ -438,8 +438,8 @@ main(int argc, char * argv[]) auto vectorImage3D = VectorImage3DType::New(); VectorImage3DType::RegionType region3D; - VectorImage3DType::IndexType index3D; - VectorImage3DType::SizeType size3D; + VectorImage3DType::IndexType index3D; + VectorImage3DType::SizeType size3D; index3D[0] = index2D[0]; index3D[1] = index2D[1]; diff --git a/Examples/RegistrationITKv4/DeformableRegistration3.cxx b/Examples/RegistrationITKv4/DeformableRegistration3.cxx index dd38638c7da..64584eb0638 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration3.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration3.cxx @@ -316,8 +316,8 @@ main(int argc, char * argv[]) using InterpolatorType = itk::LinearInterpolateImageFunction; - auto warper = WarperType::New(); - auto interpolator = InterpolatorType::New(); + auto warper = WarperType::New(); + auto interpolator = InterpolatorType::New(); const FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); warper->SetInput(movingImageReader->GetOutput()); diff --git a/Examples/RegistrationITKv4/DeformableRegistration4.cxx b/Examples/RegistrationITKv4/DeformableRegistration4.cxx index 805b54dc1d9..74ae52c22f7 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration4.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration4.cxx @@ -276,7 +276,7 @@ main(int argc, char * argv[]) // Add time and memory probes - itk::TimeProbesCollectorBase chronometer; + itk::TimeProbesCollectorBase chronometer; itk::MemoryProbesCollectorBase memorymeter; std::cout << std::endl << "Starting Registration" << std::endl; diff --git a/Examples/RegistrationITKv4/DeformableRegistration5.cxx b/Examples/RegistrationITKv4/DeformableRegistration5.cxx index 0474001be8f..6cf0f640f47 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration5.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration5.cxx @@ -314,8 +314,8 @@ main(int argc, char * argv[]) using InterpolatorType = itk::LinearInterpolateImageFunction; - auto warper = WarperType::New(); - auto interpolator = InterpolatorType::New(); + auto warper = WarperType::New(); + auto interpolator = InterpolatorType::New(); const FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); warper->SetInput(movingImageReader->GetOutput()); @@ -427,7 +427,7 @@ main(int argc, char * argv[]) const VectorImage2DType::RegionType region2D = vectorImage2D->GetBufferedRegion(); VectorImage2DType::IndexType index2D = region2D.GetIndex(); - VectorImage2DType::SizeType size2D = region2D.GetSize(); + VectorImage2DType::SizeType size2D = region2D.GetSize(); using Vector3DType = itk::Vector; @@ -440,8 +440,8 @@ main(int argc, char * argv[]) auto vectorImage3D = VectorImage3DType::New(); VectorImage3DType::RegionType region3D; - VectorImage3DType::IndexType index3D; - VectorImage3DType::SizeType size3D; + VectorImage3DType::IndexType index3D; + VectorImage3DType::SizeType size3D; index3D[0] = index2D[0]; index3D[1] = index2D[1]; diff --git a/Examples/RegistrationITKv4/DeformableRegistration7.cxx b/Examples/RegistrationITKv4/DeformableRegistration7.cxx index d7c7a095e80..0f53fb2c8d5 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration7.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration7.cxx @@ -268,8 +268,8 @@ main(int argc, char * argv[]) const unsigned int numParameters = outputBSplineTransform->GetNumberOfParameters(); OptimizerType::BoundSelectionType boundSelect(numParameters); - OptimizerType::BoundValueType upperBound(numParameters); - OptimizerType::BoundValueType lowerBound(numParameters); + OptimizerType::BoundValueType upperBound(numParameters); + OptimizerType::BoundValueType lowerBound(numParameters); boundSelect.Fill(OptimizerType::UNBOUNDED); upperBound.Fill(0.0); diff --git a/Examples/RegistrationITKv4/DeformableRegistration8.cxx b/Examples/RegistrationITKv4/DeformableRegistration8.cxx index c7b17145200..3b965626270 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration8.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration8.cxx @@ -234,8 +234,8 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet const unsigned int numParameters = transform->GetNumberOfParameters(); OptimizerType::BoundSelectionType boundSelect(numParameters); - OptimizerType::BoundValueType upperBound(numParameters); - OptimizerType::BoundValueType lowerBound(numParameters); + OptimizerType::BoundValueType upperBound(numParameters); + OptimizerType::BoundValueType lowerBound(numParameters); boundSelect.Fill(OptimizerType::UNBOUNDED); upperBound.Fill(0.0); @@ -285,7 +285,7 @@ main(int argc, char * argv[]) // Software Guide : EndCodeSnippet // Add time and memory probes - itk::TimeProbesCollectorBase chronometer; + itk::TimeProbesCollectorBase chronometer; itk::MemoryProbesCollectorBase memorymeter; std::cout << std::endl << "Starting Registration" << std::endl; diff --git a/Examples/RegistrationITKv4/DeformableRegistration9.cxx b/Examples/RegistrationITKv4/DeformableRegistration9.cxx index b906cc6c8f6..db4a824328b 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration9.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration9.cxx @@ -166,8 +166,8 @@ main(int argc, char * argv[]) using InterpolatorType = itk::LinearInterpolateImageFunction; - auto warper = WarperType::New(); - auto interpolator = InterpolatorType::New(); + auto warper = WarperType::New(); + auto interpolator = InterpolatorType::New(); const FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); warper->SetInput(movingImageReader->GetOutput()); diff --git a/Examples/RegistrationITKv4/DisplacementFieldInitialization.cxx b/Examples/RegistrationITKv4/DisplacementFieldInitialization.cxx index e3827cfe0b9..3232096c59e 100644 --- a/Examples/RegistrationITKv4/DisplacementFieldInitialization.cxx +++ b/Examples/RegistrationITKv4/DisplacementFieldInitialization.cxx @@ -105,8 +105,8 @@ main(int argc, char * argv[]) using LandmarkContainerType = FilterType::LandmarkContainer; using LandmarkPointType = FilterType::LandmarkPointType; - auto sourceLandmarks = LandmarkContainerType::New(); - auto targetLandmarks = LandmarkContainerType::New(); + auto sourceLandmarks = LandmarkContainerType::New(); + auto targetLandmarks = LandmarkContainerType::New(); std::ifstream pointsFile; pointsFile.open(argv[1]); diff --git a/Examples/RegistrationITKv4/ImageRegistration1.cxx b/Examples/RegistrationITKv4/ImageRegistration1.cxx index 0184edc2e93..1e4885a8dc3 100644 --- a/Examples/RegistrationITKv4/ImageRegistration1.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration1.cxx @@ -564,8 +564,8 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet TransformType::ParametersType finalParameters = transform->GetParameters(); - const double TranslationAlongX = finalParameters[0]; - const double TranslationAlongY = finalParameters[1]; + const double TranslationAlongX = finalParameters[0]; + const double TranslationAlongY = finalParameters[1]; // Software Guide : EndCodeSnippet diff --git a/Examples/RegistrationITKv4/ImageRegistration12.cxx b/Examples/RegistrationITKv4/ImageRegistration12.cxx index 6215e888e74..2304cf69018 100644 --- a/Examples/RegistrationITKv4/ImageRegistration12.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration12.cxx @@ -162,7 +162,7 @@ main(int argc, char * argv[]) using OptimizerScalesType = OptimizerType::ScalesType; OptimizerScalesType optimizerScales(transform->GetNumberOfParameters()); - constexpr double translationScale = 1.0 / 1000.0; + constexpr double translationScale = 1.0 / 1000.0; optimizerScales[0] = 1.0; optimizerScales[1] = translationScale; @@ -323,7 +323,7 @@ main(int argc, char * argv[]) registration->GetOutput()->Get()->GetFixedParameters()[1]; const unsigned int numberOfIterations = optimizer->GetCurrentIteration(); - const double bestValue = optimizer->GetValue(); + const double bestValue = optimizer->GetValue(); // Print out results // diff --git a/Examples/RegistrationITKv4/ImageRegistration14.cxx b/Examples/RegistrationITKv4/ImageRegistration14.cxx index fef1f1e42ca..7cf456dda90 100644 --- a/Examples/RegistrationITKv4/ImageRegistration14.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration14.cxx @@ -219,7 +219,7 @@ main(int argc, char * argv[]) const FixedImageType::RegionType region = fixedImage->GetLargestPossibleRegion(); - FixedImageType::SizeType size = region.GetSize(); + FixedImageType::SizeType size = region.GetSize(); FixedImageType::SpacingType spacing = fixedImage->GetSpacing(); optimizerScales[0] = 1.0 / 0.1; // make angle move slowly @@ -270,9 +270,9 @@ main(int argc, char * argv[]) using ParametersType = RegistrationType::ParametersType; ParametersType finalParameters = registration->GetLastTransformParameters(); - const double finalAngle = finalParameters[0]; - const double finalTranslationX = finalParameters[1]; - const double finalTranslationY = finalParameters[2]; + const double finalAngle = finalParameters[0]; + const double finalTranslationX = finalParameters[1]; + const double finalTranslationY = finalParameters[2]; const double rotationCenterX = registration->GetOutput()->Get()->GetFixedParameters()[0]; @@ -281,7 +281,7 @@ main(int argc, char * argv[]) const unsigned int numberOfIterations = optimizer->GetCurrentIteration(); - const double bestValue = optimizer->GetValue(); + const double bestValue = optimizer->GetValue(); // Print out results const double finalAngleInDegrees = finalAngle * 180.0 / itk::Math::pi; diff --git a/Examples/RegistrationITKv4/ImageRegistration15.cxx b/Examples/RegistrationITKv4/ImageRegistration15.cxx index 37d063ca145..b20f95899ae 100644 --- a/Examples/RegistrationITKv4/ImageRegistration15.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration15.cxx @@ -201,7 +201,7 @@ main(int argc, char * argv[]) const FixedImageType::RegionType region = fixedImage->GetLargestPossibleRegion(); - FixedImageType::SizeType size = region.GetSize(); + FixedImageType::SizeType size = region.GetSize(); FixedImageType::SpacingType spacing = fixedImage->GetSpacing(); optimizerScales[0] = 1.0 / (0.1 * size[0] * spacing[0]); @@ -249,10 +249,10 @@ main(int argc, char * argv[]) } ParametersType finalParameters = registration->GetLastTransformParameters(); - const double finalTranslationX = finalParameters[0]; - const double finalTranslationY = finalParameters[1]; + const double finalTranslationX = finalParameters[0]; + const double finalTranslationY = finalParameters[1]; const unsigned int numberOfIterations = optimizer->GetCurrentIteration(); - const double bestValue = optimizer->GetValue(); + const double bestValue = optimizer->GetValue(); // Print out results std::cout << "Result = " << std::endl; diff --git a/Examples/RegistrationITKv4/ImageRegistration20.cxx b/Examples/RegistrationITKv4/ImageRegistration20.cxx index fbfb367d009..bc15cf2224c 100644 --- a/Examples/RegistrationITKv4/ImageRegistration20.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration20.cxx @@ -355,7 +355,7 @@ main(int argc, char * argv[]) registration->GetLastTransformParameters(); const unsigned int numberOfIterations = optimizer->GetCurrentIteration(); - const double bestValue = optimizer->GetValue(); + const double bestValue = optimizer->GetValue(); // Software Guide : EndCodeSnippet diff --git a/Examples/RegistrationITKv4/ImageRegistration5.cxx b/Examples/RegistrationITKv4/ImageRegistration5.cxx index 26571e15d9f..fcebe233421 100644 --- a/Examples/RegistrationITKv4/ImageRegistration5.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration5.cxx @@ -296,9 +296,9 @@ main(int argc, char * argv[]) const FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); const SpacingType fixedSpacing = fixedImage->GetSpacing(); - const OriginType fixedOrigin = fixedImage->GetOrigin(); - const RegionType fixedRegion = fixedImage->GetLargestPossibleRegion(); - const SizeType fixedSize = fixedRegion.GetSize(); + const OriginType fixedOrigin = fixedImage->GetOrigin(); + const RegionType fixedRegion = fixedImage->GetLargestPossibleRegion(); + const SizeType fixedSize = fixedRegion.GetSize(); TransformType::InputPointType centerFixed; @@ -317,9 +317,9 @@ main(int argc, char * argv[]) const MovingImageType::Pointer movingImage = movingImageReader->GetOutput(); const SpacingType movingSpacing = movingImage->GetSpacing(); - const OriginType movingOrigin = movingImage->GetOrigin(); - const RegionType movingRegion = movingImage->GetLargestPossibleRegion(); - const SizeType movingSize = movingRegion.GetSize(); + const OriginType movingOrigin = movingImage->GetOrigin(); + const RegionType movingRegion = movingImage->GetLargestPossibleRegion(); + const SizeType movingSize = movingRegion.GetSize(); TransformType::InputPointType centerMoving; diff --git a/Examples/RegistrationITKv4/ImageRegistration6.cxx b/Examples/RegistrationITKv4/ImageRegistration6.cxx index 5d9f30ee25d..36f5ec22390 100644 --- a/Examples/RegistrationITKv4/ImageRegistration6.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration6.cxx @@ -316,7 +316,7 @@ main(int argc, char * argv[]) using OptimizerScalesType = OptimizerType::ScalesType; OptimizerScalesType optimizerScales(transform->GetNumberOfParameters()); - constexpr double translationScale = 1.0 / 1000.0; + constexpr double translationScale = 1.0 / 1000.0; optimizerScales[0] = 1.0; optimizerScales[1] = translationScale; @@ -386,7 +386,7 @@ main(int argc, char * argv[]) registration->GetOutput()->Get()->GetFixedParameters()[1]; const unsigned int numberOfIterations = optimizer->GetCurrentIteration(); - const double bestValue = optimizer->GetValue(); + const double bestValue = optimizer->GetValue(); // Print out results // diff --git a/Examples/RegistrationITKv4/ImageRegistration7.cxx b/Examples/RegistrationITKv4/ImageRegistration7.cxx index 6cf8f56b572..cdf35df4cf8 100644 --- a/Examples/RegistrationITKv4/ImageRegistration7.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration7.cxx @@ -295,7 +295,7 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet using OptimizerScalesType = OptimizerType::ScalesType; OptimizerScalesType optimizerScales(transform->GetNumberOfParameters()); - constexpr double translationScale = 1.0 / 100.0; + constexpr double translationScale = 1.0 / 100.0; optimizerScales[0] = 10.0; optimizerScales[1] = 1.0; diff --git a/Examples/RegistrationITKv4/ImageRegistration8.cxx b/Examples/RegistrationITKv4/ImageRegistration8.cxx index 482ea3a0534..e8b22d847f4 100644 --- a/Examples/RegistrationITKv4/ImageRegistration8.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration8.cxx @@ -366,14 +366,14 @@ main(int argc, char * argv[]) const TransformType::ParametersType finalParameters = registration->GetOutput()->Get()->GetParameters(); - const double versorX = finalParameters[0]; - const double versorY = finalParameters[1]; - const double versorZ = finalParameters[2]; - const double finalTranslationX = finalParameters[3]; - const double finalTranslationY = finalParameters[4]; - const double finalTranslationZ = finalParameters[5]; + const double versorX = finalParameters[0]; + const double versorY = finalParameters[1]; + const double versorZ = finalParameters[2]; + const double finalTranslationX = finalParameters[3]; + const double finalTranslationY = finalParameters[4]; + const double finalTranslationZ = finalParameters[5]; const unsigned int numberOfIterations = optimizer->GetCurrentIteration(); - const double bestValue = optimizer->GetValue(); + const double bestValue = optimizer->GetValue(); // Print out results // @@ -638,7 +638,7 @@ main(int argc, char * argv[]) const FixedImageType::RegionType inputRegion = fixedImage->GetLargestPossibleRegion(); - FixedImageType::SizeType size = inputRegion.GetSize(); + FixedImageType::SizeType size = inputRegion.GetSize(); FixedImageType::IndexType start = inputRegion.GetIndex(); // Select one slice as output diff --git a/Examples/RegistrationITKv4/ImageRegistration9.cxx b/Examples/RegistrationITKv4/ImageRegistration9.cxx index 703229d0c4b..8c8c2f8b7cd 100644 --- a/Examples/RegistrationITKv4/ImageRegistration9.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration9.cxx @@ -112,7 +112,7 @@ class CommandIterationUpdate : public itk::Command p[0][1] = static_cast(optimizer->GetCurrentPosition()[1]); p[1][0] = static_cast(optimizer->GetCurrentPosition()[2]); p[1][1] = static_cast(optimizer->GetCurrentPosition()[3]); - vnl_svd svd(p); + vnl_svd svd(p); vnl_matrix r(2, 2); r = svd.U() * vnl_transpose(svd.V()); const double angle = std::asin(r[1][0]); @@ -388,7 +388,7 @@ main(int argc, char * argv[]) const double finalTranslationY = finalParameters[5]; const unsigned int numberOfIterations = optimizer->GetCurrentIteration(); - const double bestValue = optimizer->GetValue(); + const double bestValue = optimizer->GetValue(); // Software Guide : EndCodeSnippet @@ -411,7 +411,7 @@ main(int argc, char * argv[]) p[0][1] = static_cast(finalParameters[1]); p[1][0] = static_cast(finalParameters[2]); p[1][1] = static_cast(finalParameters[3]); - vnl_svd svd(p); + vnl_svd svd(p); vnl_matrix r(2, 2); r = svd.U() * vnl_transpose(svd.V()); const double angle = std::asin(r[1][0]); diff --git a/Examples/RegistrationITKv4/ImageRegistrationHistogramPlotter.cxx b/Examples/RegistrationITKv4/ImageRegistrationHistogramPlotter.cxx index 2ee2a074c0d..55dffc5c2c3 100644 --- a/Examples/RegistrationITKv4/ImageRegistrationHistogramPlotter.cxx +++ b/Examples/RegistrationITKv4/ImageRegistrationHistogramPlotter.cxx @@ -249,7 +249,7 @@ class HistogramWriter void WriteHistogramFile(unsigned int iterationNumber) { - const std::string outputFileBase = "JointHistogram"; + const std::string outputFileBase = "JointHistogram"; std::ostringstream outputFilename; outputFilename << outputFileBase << "." << std::setfill('0') << std::setw(3) << iterationNumber << "." @@ -376,9 +376,9 @@ class HistogramWriter // Software Guide : BeginCodeSnippet private: - MetricPointer m_Metric; + MetricPointer m_Metric; HistogramToImageFilterPointer m_Filter; - HistogramFileWriterPointer m_HistogramFileWriter; + HistogramFileWriterPointer m_HistogramFileWriter; // Software Guide : EndCodeSnippet std::string m_OutputFile; }; @@ -457,7 +457,7 @@ class CommandIterationUpdate : public itk::Command HistogramWriter m_JointHistogramWriter; private: - bool m_WriteHistogramsAfterEveryIteration; + bool m_WriteHistogramsAfterEveryIteration; std::string m_InitialHistogramFile; }; diff --git a/Examples/RegistrationITKv4/IterativeClosestPoint1.cxx b/Examples/RegistrationITKv4/IterativeClosestPoint1.cxx index 5aeac385753..fa84974ba1a 100644 --- a/Examples/RegistrationITKv4/IterativeClosestPoint1.cxx +++ b/Examples/RegistrationITKv4/IterativeClosestPoint1.cxx @@ -217,9 +217,9 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet constexpr unsigned long numberOfIterations = 100; - constexpr double gradientTolerance = 1e-5; // convergence criterion - constexpr double valueTolerance = 1e-5; // convergence criterion - constexpr double epsilonFunction = 1e-6; // convergence criterion + constexpr double gradientTolerance = 1e-5; // convergence criterion + constexpr double valueTolerance = 1e-5; // convergence criterion + constexpr double epsilonFunction = 1e-6; // convergence criterion optimizer->SetScales(scales); diff --git a/Examples/RegistrationITKv4/IterativeClosestPoint2.cxx b/Examples/RegistrationITKv4/IterativeClosestPoint2.cxx index 57266063f57..93af9ed358e 100644 --- a/Examples/RegistrationITKv4/IterativeClosestPoint2.cxx +++ b/Examples/RegistrationITKv4/IterativeClosestPoint2.cxx @@ -233,9 +233,9 @@ main(int argc, char * argv[]) scales[5] = 1.0 / translationScale; constexpr unsigned long numberOfIterations = 2000; - constexpr double gradientTolerance = 1e-4; // convergence criterion - constexpr double valueTolerance = 1e-4; // convergence criterion - constexpr double epsilonFunction = 1e-5; // convergence criterion + constexpr double gradientTolerance = 1e-4; // convergence criterion + constexpr double valueTolerance = 1e-4; // convergence criterion + constexpr double epsilonFunction = 1e-5; // convergence criterion optimizer->SetScales(scales); diff --git a/Examples/RegistrationITKv4/IterativeClosestPoint3.cxx b/Examples/RegistrationITKv4/IterativeClosestPoint3.cxx index 50d62a8c35b..00de48727d1 100644 --- a/Examples/RegistrationITKv4/IterativeClosestPoint3.cxx +++ b/Examples/RegistrationITKv4/IterativeClosestPoint3.cxx @@ -165,9 +165,9 @@ main(int argc, char * argv[]) scales.Fill(0.01); constexpr unsigned long numberOfIterations = 100; - constexpr double gradientTolerance = 1e-5; // convergence criterion - constexpr double valueTolerance = 1e-5; // convergence criterion - constexpr double epsilonFunction = 1e-6; // convergence criterion + constexpr double gradientTolerance = 1e-5; // convergence criterion + constexpr double valueTolerance = 1e-5; // convergence criterion + constexpr double epsilonFunction = 1e-6; // convergence criterion optimizer->SetScales(scales); optimizer->SetNumberOfIterations(numberOfIterations); diff --git a/Examples/RegistrationITKv4/ModelToImageRegistration1.cxx b/Examples/RegistrationITKv4/ModelToImageRegistration1.cxx index 1c000a35315..f3904093e50 100644 --- a/Examples/RegistrationITKv4/ModelToImageRegistration1.cxx +++ b/Examples/RegistrationITKv4/ModelToImageRegistration1.cxx @@ -353,8 +353,8 @@ class SimpleImageToSpatialObjectMetric /** Get Value and Derivatives for MultipleValuedOptimizers */ void GetValueAndDerivative(const ParametersType & parameters, - MeasureType & Value, - DerivativeType & Derivative) const override + MeasureType & Value, + DerivativeType & Derivative) const override { Value = this->GetValue(parameters); this->GetDerivative(parameters, Derivative); diff --git a/Examples/RegistrationITKv4/ModelToImageRegistration2.cxx b/Examples/RegistrationITKv4/ModelToImageRegistration2.cxx index 1a7e3fff348..13f40675e61 100644 --- a/Examples/RegistrationITKv4/ModelToImageRegistration2.cxx +++ b/Examples/RegistrationITKv4/ModelToImageRegistration2.cxx @@ -111,7 +111,7 @@ class CommandIterationUpdate : public itk::Command } OptimizerType::DerivativeType gradient = optimizer->GetGradient(); - OptimizerType::ScalesType scales = optimizer->GetScales(); + OptimizerType::ScalesType scales = optimizer->GetScales(); double magnitude2 = 0.0; @@ -200,19 +200,19 @@ main(int argc, char * argv[]) using ImageReaderType = itk::ImageFileReader; - SpatialObjectType::Pointer spatialObject; - TransformType::Pointer transform; - OptimizerType::Pointer optimizer; - IterationObserverType::Pointer iterationObserver; + SpatialObjectType::Pointer spatialObject; + TransformType::Pointer transform; + OptimizerType::Pointer optimizer; + IterationObserverType::Pointer iterationObserver; LinearInterpolatorType::Pointer linearInterpolator; - MetricType::Pointer metric; - RegistrationType::Pointer registrationMethod; - ImageReaderType::Pointer movingImageReader; - FixedPointSetType::Pointer fixedPointSet; - ImageType::ConstPointer movingImage; + MetricType::Pointer metric; + RegistrationType::Pointer registrationMethod; + ImageReaderType::Pointer movingImageReader; + FixedPointSetType::Pointer fixedPointSet; + ImageType::ConstPointer movingImage; SpatialObjectToImageFilterType::Pointer rasterizationFilter; - NarrowBandFilterType::Pointer narrowBandPointSetFilter; + NarrowBandFilterType::Pointer narrowBandPointSetFilter; metric = MetricType::New(); @@ -267,7 +267,7 @@ main(int argc, char * argv[]) ImageType::SizeType imageSize = region.GetSize(); ImageType::SpacingType spacing = movingImage->GetSpacing(); - ImageType::PointType origin; + ImageType::PointType origin; origin[0] = (boxSize[0] - imageSize[0] * spacing[0]) / 2.0; origin[1] = (boxSize[1] - imageSize[1] * spacing[1]) / 2.0; diff --git a/Examples/RegistrationITKv4/MultiResImageRegistration1.cxx b/Examples/RegistrationITKv4/MultiResImageRegistration1.cxx index 8d4fd87b165..40c32bb6156 100644 --- a/Examples/RegistrationITKv4/MultiResImageRegistration1.cxx +++ b/Examples/RegistrationITKv4/MultiResImageRegistration1.cxx @@ -338,7 +338,7 @@ main(int argc, const char * argv[]) const PixelType backgroundGrayLevel = (argc > 4) ? std::stoi(argv[4]) : 100; const std::string checkerBoardBefore = (argc > 5) ? argv[5] : ""; const std::string checkerBoardAfter = (argc > 6) ? argv[6] : ""; - const int numberOfBins = (argc > 7) ? std::stoi(argv[7]) : 0; + const int numberOfBins = (argc > 7) ? std::stoi(argv[7]) : 0; using FixedImageType = itk::Image; using MovingImageType = itk::Image; diff --git a/Examples/RegistrationITKv4/MultiStageImageRegistration1.cxx b/Examples/RegistrationITKv4/MultiStageImageRegistration1.cxx index 2b9db9b7f2c..62799f698cc 100644 --- a/Examples/RegistrationITKv4/MultiStageImageRegistration1.cxx +++ b/Examples/RegistrationITKv4/MultiStageImageRegistration1.cxx @@ -536,9 +536,9 @@ main(int argc, char * argv[]) const FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); const SpacingType fixedSpacing = fixedImage->GetSpacing(); - const OriginType fixedOrigin = fixedImage->GetOrigin(); - const RegionType fixedRegion = fixedImage->GetLargestPossibleRegion(); - const SizeType fixedSize = fixedRegion.GetSize(); + const OriginType fixedOrigin = fixedImage->GetOrigin(); + const RegionType fixedRegion = fixedImage->GetLargestPossibleRegion(); + const SizeType fixedSize = fixedRegion.GetSize(); ATransformType::InputPointType centerFixed; centerFixed[0] = fixedOrigin[0] + fixedSpacing[0] * fixedSize[0] / 2.0; diff --git a/Examples/RegistrationITKv4/ThinPlateSplineWarp.cxx b/Examples/RegistrationITKv4/ThinPlateSplineWarp.cxx index a2a5db56482..4b7816d0993 100644 --- a/Examples/RegistrationITKv4/ThinPlateSplineWarp.cxx +++ b/Examples/RegistrationITKv4/ThinPlateSplineWarp.cxx @@ -100,8 +100,8 @@ main(int argc, char * argv[]) // Define container for landmarks // Software Guide : BeginCodeSnippet - auto sourceLandMarks = PointSetType::New(); - auto targetLandMarks = PointSetType::New(); + auto sourceLandMarks = PointSetType::New(); + auto targetLandMarks = PointSetType::New(); PointType p1; PointType p2; const PointSetType::PointsContainer::Pointer sourceLandMarkContainer = @@ -142,14 +142,14 @@ main(int argc, char * argv[]) // Set the resampler params const InputImageType::ConstPointer inputImage = reader->GetOutput(); - auto resampler = ResamplerType::New(); - auto interpolator = InterpolatorType::New(); + auto resampler = ResamplerType::New(); + auto interpolator = InterpolatorType::New(); resampler->SetInterpolator(interpolator); - const InputImageType::SpacingType spacing = inputImage->GetSpacing(); - const InputImageType::PointType origin = inputImage->GetOrigin(); + const InputImageType::SpacingType spacing = inputImage->GetSpacing(); + const InputImageType::PointType origin = inputImage->GetOrigin(); const InputImageType::DirectionType direction = inputImage->GetDirection(); const InputImageType::RegionType region = inputImage->GetBufferedRegion(); - const InputImageType::SizeType size = region.GetSize(); + const InputImageType::SizeType size = region.GetSize(); // Software Guide : BeginCodeSnippet resampler->SetOutputSpacing(spacing); @@ -197,8 +197,8 @@ main(int argc, char * argv[]) using FieldIterator = itk::ImageRegionIterator; FieldIterator fi(field, region); fi.GoToBegin(); - TransformType::InputPointType point1; - TransformType::OutputPointType point2; + TransformType::InputPointType point1; + TransformType::OutputPointType point2; DisplacementFieldType::IndexType index; FieldVectorType displacement; diff --git a/Examples/Segmentation/FastMarchingImageFilter.cxx b/Examples/Segmentation/FastMarchingImageFilter.cxx index 99fa95b9505..19cc88db544 100644 --- a/Examples/Segmentation/FastMarchingImageFilter.cxx +++ b/Examples/Segmentation/FastMarchingImageFilter.cxx @@ -537,7 +537,7 @@ main(int argc, char * argv[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - NodeType node; + NodeType node; constexpr double seedValue = 0.0; node.SetValue(seedValue); diff --git a/Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx b/Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx index 744830f54d2..c9d005571f7 100644 --- a/Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx +++ b/Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx @@ -849,7 +849,7 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet constexpr double initRadius = 1.05; constexpr double grow = 1.1; - const double shrink = pow(grow, -0.25); + const double shrink = pow(grow, -0.25); optimizer->Initialize(initRadius, grow, shrink); optimizer->SetEpsilon(1.0e-6); // minimal search radius diff --git a/Examples/Segmentation/HoughTransform2DLinesImageFilter.cxx b/Examples/Segmentation/HoughTransform2DLinesImageFilter.cxx index 406bf35363f..dd4d0c8d460 100644 --- a/Examples/Segmentation/HoughTransform2DLinesImageFilter.cxx +++ b/Examples/Segmentation/HoughTransform2DLinesImageFilter.cxx @@ -253,7 +253,7 @@ main(int argc, char * argv[]) using LinePointListType = HoughTransformFilterType::LineType::LinePointListType; - LinePointListType pointsList = (*itLines)->GetPoints(); + LinePointListType pointsList = (*itLines)->GetPoints(); LinePointListType::const_iterator itPoints = pointsList.begin(); double u[2]; @@ -277,7 +277,7 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet ImageType::IndexType localIndex; - itk::Size<2> size = + itk::Size<2> size = localOutputImage->GetLargestPossibleRegion().GetSize(); const float diag = std::sqrt(static_cast(size[0] * size[0] + size[1] * size[1])); diff --git a/Examples/Segmentation/ShapeDetectionLevelSetFilter.cxx b/Examples/Segmentation/ShapeDetectionLevelSetFilter.cxx index 1d184396bc9..c2db0382d20 100644 --- a/Examples/Segmentation/ShapeDetectionLevelSetFilter.cxx +++ b/Examples/Segmentation/ShapeDetectionLevelSetFilter.cxx @@ -511,7 +511,7 @@ main(int argc, char * argv[]) const double initialDistance = std::stod(argv[5]); // Software Guide : BeginCodeSnippet - NodeType node; + NodeType node; const double seedValue = -initialDistance; node.SetValue(seedValue); diff --git a/Examples/Segmentation/VectorConfidenceConnected.cxx b/Examples/Segmentation/VectorConfidenceConnected.cxx index ad450cdbec1..44b468479ae 100644 --- a/Examples/Segmentation/VectorConfidenceConnected.cxx +++ b/Examples/Segmentation/VectorConfidenceConnected.cxx @@ -310,7 +310,7 @@ main(int argc, char * argv[]) using MeanVectorType = ConnectedFilterType::MeanVectorType; using CovarianceMatrixType = ConnectedFilterType::CovarianceMatrixType; - const MeanVectorType & mean = confidenceConnected->GetMean(); + const MeanVectorType & mean = confidenceConnected->GetMean(); const CovarianceMatrixType & covariance = confidenceConnected->GetCovariance(); diff --git a/Examples/SpatialObjects/BlobSpatialObject.cxx b/Examples/SpatialObjects/BlobSpatialObject.cxx index 2e5ba9ffec7..37cc52e3f6d 100644 --- a/Examples/SpatialObjects/BlobSpatialObject.cxx +++ b/Examples/SpatialObjects/BlobSpatialObject.cxx @@ -82,7 +82,7 @@ main(int, char *[]) for (unsigned int i = 0; i < 4; ++i) { BlobPointType p; - PointType pnt; + PointType pnt; pnt[0] = i; pnt[1] = i + 1; pnt[2] = i + 2; diff --git a/Examples/SpatialObjects/DTITubeSpatialObject.cxx b/Examples/SpatialObjects/DTITubeSpatialObject.cxx index 8eb559f349d..d562345c791 100644 --- a/Examples/SpatialObjects/DTITubeSpatialObject.cxx +++ b/Examples/SpatialObjects/DTITubeSpatialObject.cxx @@ -80,7 +80,7 @@ main(int, char *[]) for (i = 0; i < 5; ++i) { DTITubePointType p; - PointType pnt; + PointType pnt; pnt[0] = i; pnt[1] = i + 1; pnt[2] = i + 2; diff --git a/Examples/SpatialObjects/ImageMaskSpatialObject.cxx b/Examples/SpatialObjects/ImageMaskSpatialObject.cxx index ec8b8ba5c94..00888495ebb 100644 --- a/Examples/SpatialObjects/ImageMaskSpatialObject.cxx +++ b/Examples/SpatialObjects/ImageMaskSpatialObject.cxx @@ -67,10 +67,10 @@ main(int, char *[]) using ImageType = ImageMaskSpatialObject::ImageType; using Iterator = itk::ImageRegionIterator; - auto image = ImageType::New(); - constexpr ImageType::SizeType size = { { 50, 50, 50 } }; + auto image = ImageType::New(); + constexpr ImageType::SizeType size = { { 50, 50, 50 } }; constexpr ImageType::IndexType index = { { 0, 0, 0 } }; - ImageType::RegionType region; + ImageType::RegionType region; region.SetSize(size); region.SetIndex(index); @@ -78,8 +78,8 @@ main(int, char *[]) image->SetRegions(region); image->Allocate(true); // initialize buffer to zero - ImageType::RegionType insideRegion; - constexpr ImageType::SizeType insideSize = { { 30, 30, 30 } }; + ImageType::RegionType insideRegion; + constexpr ImageType::SizeType insideSize = { { 30, 30, 30 } }; constexpr ImageType::IndexType insideIndex = { { 10, 10, 10 } }; insideRegion.SetSize(insideSize); insideRegion.SetIndex(insideIndex); diff --git a/Examples/SpatialObjects/ImageSpatialObject.cxx b/Examples/SpatialObjects/ImageSpatialObject.cxx index 76c03680e38..5070ac63222 100644 --- a/Examples/SpatialObjects/ImageSpatialObject.cxx +++ b/Examples/SpatialObjects/ImageSpatialObject.cxx @@ -43,9 +43,9 @@ main(int, char *[]) // Software Guide : BeginCodeSnippet using Image = itk::Image; - auto image = Image::New(); + auto image = Image::New(); constexpr Image::SizeType size = { { 10, 10 } }; - Image::RegionType region; + Image::RegionType region; region.SetSize(size); image->SetRegions(region); image->Allocate(); @@ -60,7 +60,7 @@ main(int, char *[]) // Software Guide : BeginCodeSnippet using Iterator = itk::ImageRegionIterator; Iterator it(image, region); - short pixelValue = 0; + short pixelValue = 0; for (it.GoToBegin(); !it.IsAtEnd(); ++it, ++pixelValue) { diff --git a/Examples/SpatialObjects/LandmarkSpatialObject.cxx b/Examples/SpatialObjects/LandmarkSpatialObject.cxx index 243e86409f0..2712bdbc9bf 100644 --- a/Examples/SpatialObjects/LandmarkSpatialObject.cxx +++ b/Examples/SpatialObjects/LandmarkSpatialObject.cxx @@ -74,7 +74,7 @@ main(int, char *[]) for (unsigned int i = 0; i < 5; ++i) { LandmarkPointType p; - PointType pnt; + PointType pnt; pnt[0] = i; pnt[1] = i + 1; pnt[2] = i + 2; diff --git a/Examples/SpatialObjects/LineSpatialObject.cxx b/Examples/SpatialObjects/LineSpatialObject.cxx index d2a07363569..13337c167f0 100644 --- a/Examples/SpatialObjects/LineSpatialObject.cxx +++ b/Examples/SpatialObjects/LineSpatialObject.cxx @@ -75,7 +75,7 @@ main(int, char *[]) for (unsigned int i = 0; i < 3; ++i) { LinePointType p; - PointType pnt; + PointType pnt; pnt[0] = i; pnt[1] = i + 1; pnt[2] = i + 2; diff --git a/Examples/SpatialObjects/SpatialObjectToImageStatisticsCalculator.cxx b/Examples/SpatialObjects/SpatialObjectToImageStatisticsCalculator.cxx index 2eace034dd2..39acf396a59 100644 --- a/Examples/SpatialObjects/SpatialObjectToImageStatisticsCalculator.cxx +++ b/Examples/SpatialObjects/SpatialObjectToImageStatisticsCalculator.cxx @@ -46,7 +46,7 @@ main(int, char *[]) // Software Guide : BeginCodeSnippet using ImageType = itk::Image; using RandomImageSourceType = itk::RandomImageSource; - auto randomImageSource = RandomImageSourceType::New(); + auto randomImageSource = RandomImageSourceType::New(); ImageType::SizeValueType size[2]; size[0] = 10; size[1] = 10; diff --git a/Examples/SpatialObjects/SurfaceSpatialObject.cxx b/Examples/SpatialObjects/SurfaceSpatialObject.cxx index 3ba5df21a37..2ceef5ad88f 100644 --- a/Examples/SpatialObjects/SurfaceSpatialObject.cxx +++ b/Examples/SpatialObjects/SurfaceSpatialObject.cxx @@ -70,7 +70,7 @@ main(int, char *[]) for (unsigned int i = 0; i < 3; ++i) { SurfacePointType p; - PointType pnt; + PointType pnt; pnt[0] = i; pnt[1] = i + 1; pnt[2] = i + 2; diff --git a/Examples/SpatialObjects/TubeSpatialObject.cxx b/Examples/SpatialObjects/TubeSpatialObject.cxx index 08a50057b4e..f1c8f930d3d 100644 --- a/Examples/SpatialObjects/TubeSpatialObject.cxx +++ b/Examples/SpatialObjects/TubeSpatialObject.cxx @@ -78,7 +78,7 @@ main(int, char *[]) for (i = 0; i < 5; ++i) { TubePointType p; - PointType pnt; + PointType pnt; pnt[0] = i; pnt[1] = i + 1; pnt[2] = i + 2; diff --git a/Examples/SpatialObjects/VesselTubeSpatialObject.cxx b/Examples/SpatialObjects/VesselTubeSpatialObject.cxx index fb2bfb187f2..1eeb870a112 100644 --- a/Examples/SpatialObjects/VesselTubeSpatialObject.cxx +++ b/Examples/SpatialObjects/VesselTubeSpatialObject.cxx @@ -83,7 +83,7 @@ main(int, char *[]) for (i = 0; i < 5; ++i) { VesselTubePointType p; - PointType pnt; + PointType pnt; pnt[0] = i; pnt[1] = i + 1; pnt[2] = i + 2; diff --git a/Examples/Statistics/BayesianPluginClassifier.cxx b/Examples/Statistics/BayesianPluginClassifier.cxx index b0fdf3077f3..6547edabec6 100644 --- a/Examples/Statistics/BayesianPluginClassifier.cxx +++ b/Examples/Statistics/BayesianPluginClassifier.cxx @@ -158,9 +158,9 @@ main(int, char *[]) normalGenerator->Initialize(101); - MeasurementVectorType mv; - double mean = 100; - double standardDeviation = 30; + MeasurementVectorType mv; + double mean = 100; + double standardDeviation = 30; SampleType::InstanceIdentifier id = 0UL; for (unsigned int i = 0; i < 100; ++i) { diff --git a/Examples/Statistics/EuclideanDistanceMetric.cxx b/Examples/Statistics/EuclideanDistanceMetric.cxx index c0c1b40093b..e909a5c40ff 100644 --- a/Examples/Statistics/EuclideanDistanceMetric.cxx +++ b/Examples/Statistics/EuclideanDistanceMetric.cxx @@ -97,8 +97,8 @@ main(int, char *[]) // Software Guide : BeginCodeSnippet DistanceMetricType::OriginType originPoint(2); - MeasurementVectorType queryPointA(2); - MeasurementVectorType queryPointB(2); + MeasurementVectorType queryPointA(2); + MeasurementVectorType queryPointB(2); originPoint[0] = 0; originPoint[1] = 0; diff --git a/Examples/Statistics/ExpectationMaximizationMixtureModelEstimator.cxx b/Examples/Statistics/ExpectationMaximizationMixtureModelEstimator.cxx index 8f4e30b8515..306ef1bdfd0 100644 --- a/Examples/Statistics/ExpectationMaximizationMixtureModelEstimator.cxx +++ b/Examples/Statistics/ExpectationMaximizationMixtureModelEstimator.cxx @@ -156,8 +156,8 @@ main() normalGenerator->Initialize(101); MeasurementVectorType mv; - double mean = 100; - double standardDeviation = 30; + double mean = 100; + double standardDeviation = 30; for (unsigned int i = 0; i < 100; ++i) { mv[0] = (normalGenerator->GetVariate() * standardDeviation) + mean; diff --git a/Examples/Statistics/ImageEntropy1.cxx b/Examples/Statistics/ImageEntropy1.cxx index 4ac41ea6556..8742fbb40b6 100644 --- a/Examples/Statistics/ImageEntropy1.cxx +++ b/Examples/Statistics/ImageEntropy1.cxx @@ -194,7 +194,7 @@ main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet - HistogramType::ConstIterator itr = histogram->Begin(); + HistogramType::ConstIterator itr = histogram->Begin(); const HistogramType::ConstIterator end = histogram->End(); const double Sum = histogram->GetTotalFrequency(); diff --git a/Examples/Statistics/ImageHistogram1.cxx b/Examples/Statistics/ImageHistogram1.cxx index 88360357a56..5178fa40cd0 100644 --- a/Examples/Statistics/ImageHistogram1.cxx +++ b/Examples/Statistics/ImageHistogram1.cxx @@ -177,7 +177,7 @@ main(int argc, char * argv[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - constexpr unsigned int numberOfComponents = 1; + constexpr unsigned int numberOfComponents = 1; HistogramType::SizeType size(numberOfComponents); size.Fill(255); diff --git a/Examples/Statistics/ImageHistogram2.cxx b/Examples/Statistics/ImageHistogram2.cxx index 5cede9e4611..80ef0431614 100644 --- a/Examples/Statistics/ImageHistogram2.cxx +++ b/Examples/Statistics/ImageHistogram2.cxx @@ -193,7 +193,7 @@ main(int argc, char * argv[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - HistogramType::ConstIterator itr = histogram->Begin(); + HistogramType::ConstIterator itr = histogram->Begin(); const HistogramType::ConstIterator end = histogram->End(); unsigned int binNumber = 0; diff --git a/Examples/Statistics/ImageHistogram4.cxx b/Examples/Statistics/ImageHistogram4.cxx index 08391a5a18b..93f5997eb56 100644 --- a/Examples/Statistics/ImageHistogram4.cxx +++ b/Examples/Statistics/ImageHistogram4.cxx @@ -257,7 +257,7 @@ main(int argc, char * argv[]) std::ofstream histogramFile; histogramFile.open(argv[2]); - HistogramType::ConstIterator itr = histogram->Begin(); + HistogramType::ConstIterator itr = histogram->Begin(); const HistogramType::ConstIterator end = histogram->End(); using AbsoluteFrequencyType = HistogramType::AbsoluteFrequencyType; diff --git a/Examples/Statistics/KdTree.cxx b/Examples/Statistics/KdTree.cxx index f68c421a870..03b2ef08e7b 100644 --- a/Examples/Statistics/KdTree.cxx +++ b/Examples/Statistics/KdTree.cxx @@ -139,7 +139,7 @@ main() } unsigned int partitionDimension; - float partitionValue; + float partitionValue; root->GetParameters(partitionDimension, partitionValue); std::cout << "Dimension chosen to split the space = " << partitionDimension << std::endl; @@ -212,7 +212,7 @@ main() // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - constexpr unsigned int numberOfNeighbors = 3; + constexpr unsigned int numberOfNeighbors = 3; TreeType::InstanceIdentifierVectorType neighbors; tree->Search(queryPoint, numberOfNeighbors, neighbors); diff --git a/Examples/Statistics/KdTreeBasedKMeansClustering.cxx b/Examples/Statistics/KdTreeBasedKMeansClustering.cxx index 0705898dff7..5cdf7439b65 100644 --- a/Examples/Statistics/KdTreeBasedKMeansClustering.cxx +++ b/Examples/Statistics/KdTreeBasedKMeansClustering.cxx @@ -183,8 +183,8 @@ main() normalGenerator->Initialize(101); MeasurementVectorType mv; - double mean = 100; - double standardDeviation = 30; + double mean = 100; + double standardDeviation = 30; for (unsigned int i = 0; i < 100; ++i) { mv[0] = (normalGenerator->GetVariate() * standardDeviation) + mean; diff --git a/Examples/Statistics/MembershipSample.cxx b/Examples/Statistics/MembershipSample.cxx index 3850f4aa830..c7471946741 100644 --- a/Examples/Statistics/MembershipSample.cxx +++ b/Examples/Statistics/MembershipSample.cxx @@ -59,7 +59,7 @@ main() // Software Guide : BeginCodeSnippet using MeasurementVectorType = itk::Vector; using SampleType = itk::Statistics::ListSample; - auto sample = SampleType::New(); + auto sample = SampleType::New(); MeasurementVectorType mv; mv[0] = 1.0; diff --git a/Examples/Statistics/MembershipSampleGenerator.cxx b/Examples/Statistics/MembershipSampleGenerator.cxx index 2dbbdb5dba1..05c4f4a1fd2 100644 --- a/Examples/Statistics/MembershipSampleGenerator.cxx +++ b/Examples/Statistics/MembershipSampleGenerator.cxx @@ -63,7 +63,7 @@ main() // Software Guide : BeginCodeSnippet using MeasurementVectorType = itk::Vector; using SampleType = itk::Statistics::ListSample; - auto sample = SampleType::New(); + auto sample = SampleType::New(); MeasurementVectorType mv; mv[0] = 1.0; diff --git a/Examples/Statistics/ScalarImageMarkovRandomField1.cxx b/Examples/Statistics/ScalarImageMarkovRandomField1.cxx index 3e529767a0e..2e30ca19adc 100644 --- a/Examples/Statistics/ScalarImageMarkovRandomField1.cxx +++ b/Examples/Statistics/ScalarImageMarkovRandomField1.cxx @@ -86,7 +86,7 @@ main(int argc, char * argv[]) const char * outputImageFileName = argv[3]; const unsigned int numberOfIterations = std::stoi(argv[4]); - const double smoothingFactor = std::stod(argv[5]); + const double smoothingFactor = std::stod(argv[5]); const unsigned int numberOfClasses = std::stoi(argv[6]); constexpr unsigned int numberOfArgumentsBeforeMeans = 7; @@ -275,7 +275,7 @@ main(int argc, char * argv[]) using MembershipFunctionPointer = MembershipFunctionType::Pointer; - double meanDistance = 0; + double meanDistance = 0; MembershipFunctionType::CentroidType centroid(1); for (unsigned int i = 0; i < numberOfClasses; ++i) { diff --git a/Examples/Statistics/SelectiveSubsampleGenerator.cxx b/Examples/Statistics/SelectiveSubsampleGenerator.cxx index 6866f010b6b..13a0bb534c8 100644 --- a/Examples/Statistics/SelectiveSubsampleGenerator.cxx +++ b/Examples/Statistics/SelectiveSubsampleGenerator.cxx @@ -63,7 +63,7 @@ main() // Software Guide : BeginCodeSnippet using MeasurementVectorType = itk::Vector; using SampleType = itk::Statistics::ListSample; - auto sample = SampleType::New(); + auto sample = SampleType::New(); MeasurementVectorType mv; mv[0] = 1.0; mv[1] = 2.0; diff --git a/Examples/Statistics/Subsample.cxx b/Examples/Statistics/Subsample.cxx index 1cf0996b061..62737864a90 100644 --- a/Examples/Statistics/Subsample.cxx +++ b/Examples/Statistics/Subsample.cxx @@ -72,7 +72,7 @@ main() // Software Guide : BeginCodeSnippet using MeasurementVectorType = itk::Vector; using SampleType = itk::Statistics::ListSample; - auto sample = SampleType::New(); + auto sample = SampleType::New(); MeasurementVectorType mv; mv[0] = 1.0; mv[1] = 2.0; diff --git a/Modules/Bridge/NumPy/include/itkPyBuffer.hxx b/Modules/Bridge/NumPy/include/itkPyBuffer.hxx index 42f176d6361..09633206722 100644 --- a/Modules/Bridge/NumPy/include/itkPyBuffer.hxx +++ b/Modules/Bridge/NumPy/include/itkPyBuffer.hxx @@ -42,9 +42,9 @@ PyBuffer::_GetArrayViewFromImage(ImageType * image) void * const buffer = image->GetBufferPointer(); // Computing the length of data - const unsigned int numberOfComponents = image->GetNumberOfComponentsPerPixel(); + const unsigned int numberOfComponents = image->GetNumberOfComponentsPerPixel(); const SizeValueType numberOfPixels = image->GetBufferedRegion().GetNumberOfPixels(); - const auto len = static_cast(numberOfPixels * numberOfComponents * sizeof(ComponentType)); + const auto len = static_cast(numberOfPixels * numberOfComponents * sizeof(ComponentType)); PyBuffer_FillInfo(&pyBuffer, nullptr, buffer, len, 0, PyBUF_CONTIG); return PyMemoryView_FromBuffer(&pyBuffer); @@ -69,9 +69,9 @@ PyBuffer::_get_image_view_from_contiguous_array(PyObject * arr, PyObject &PyBuffer_Release); const Py_ssize_t bufferLength = pyBuffer.len; - void * const buffer = pyBuffer.buf; + void * const buffer = pyBuffer.buf; - PyObject * const shapeseq = PySequence_Fast(shape, "expected sequence"); + PyObject * const shapeseq = PySequence_Fast(shape, "expected sequence"); const unsigned int dimension = PySequence_Size(shape); const long numberOfComponents = PyInt_AsLong(numOfComponent); @@ -110,9 +110,9 @@ PyBuffer::_get_image_view_from_contiguous_array(PyObject * arr, PyObject using InternalPixelType = typename TImage::InternalPixelType; using ImporterType = ImportImageContainer; - auto importer = ImporterType::New(); + auto importer = ImporterType::New(); constexpr bool importImageFilterWillOwnTheBuffer = false; - auto * const data = static_cast(buffer); + auto * const data = static_cast(buffer); importer->SetImportPointer(data, numberOfPixels, importImageFilterWillOwnTheBuffer); OutputImagePointer output = TImage::New(); diff --git a/Modules/Bridge/NumPy/include/itkPyVectorContainer.hxx b/Modules/Bridge/NumPy/include/itkPyVectorContainer.hxx index cb3627521fb..94aa93f3335 100644 --- a/Modules/Bridge/NumPy/include/itkPyVectorContainer.hxx +++ b/Modules/Bridge/NumPy/include/itkPyVectorContainer.hxx @@ -60,13 +60,13 @@ PyVectorContainer::_vector_container_from_array(Py [[maybe_unused]] const std::unique_ptr bufferScopeGuard(&pyBuffer, &PyBuffer_Release); - const Py_ssize_t bufferLength = pyBuffer.len; + const Py_ssize_t bufferLength = pyBuffer.len; const void * const buffer = pyBuffer.buf; - PyObject * const shapeseq = PySequence_Fast(shape, "expected sequence"); + PyObject * const shapeseq = PySequence_Fast(shape, "expected sequence"); const unsigned int dimension = PySequence_Size(shape); - PyObject * item = PySequence_Fast_GET_ITEM(shapeseq, 0); // Only one dimension + PyObject * item = PySequence_Fast_GET_ITEM(shapeseq, 0); // Only one dimension const size_t numberOfElements = static_cast(PyInt_AsLong(item)); const size_t len = numberOfElements * sizeof(DataType); @@ -76,7 +76,7 @@ PyVectorContainer::_vector_container_from_array(Py return nullptr; } const auto * const data = static_cast(buffer); - auto output = VectorContainerType::New(); + auto output = VectorContainerType::New(); output->assign(data, data + numberOfElements); return output; diff --git a/Modules/Bridge/NumPy/include/itkPyVnl.hxx b/Modules/Bridge/NumPy/include/itkPyVnl.hxx index e61d9c1e0e2..ada9dbf3ffb 100644 --- a/Modules/Bridge/NumPy/include/itkPyVnl.hxx +++ b/Modules/Bridge/NumPy/include/itkPyVnl.hxx @@ -59,14 +59,14 @@ PyVnl::_GetVnlVectorFromArray(PyObject * arr, PyObject * const shape) [[maybe_unused]] const std::unique_ptr bufferScopeGuard(&pyBuffer, &PyBuffer_Release); - const Py_ssize_t bufferLength = pyBuffer.len; + const Py_ssize_t bufferLength = pyBuffer.len; const void * const buffer = pyBuffer.buf; - PyObject * const shapeseq = PySequence_Fast(shape, "expected sequence"); + PyObject * const shapeseq = PySequence_Fast(shape, "expected sequence"); const unsigned int dimension = PySequence_Size(shape); PyObject * const item = PySequence_Fast_GET_ITEM(shapeseq, 0); // Only one dimension - const size_t numberOfElements = static_cast(PyInt_AsLong(item)); + const size_t numberOfElements = static_cast(PyInt_AsLong(item)); const size_t len = numberOfElements * sizeof(DataType); if (bufferLength < 0 || static_cast(bufferLength) != len) @@ -117,10 +117,10 @@ PyVnl::_GetVnlMatrixFromArray(PyObject * arr, PyObject * const shape) [[maybe_unused]] const std::unique_ptr bufferScopeGuard(&pyBuffer, &PyBuffer_Release); - const Py_ssize_t bufferLength = pyBuffer.len; + const Py_ssize_t bufferLength = pyBuffer.len; const void * const buffer = pyBuffer.buf; - PyObject * const shapeseq = PySequence_Fast(shape, "expected sequence"); + PyObject * const shapeseq = PySequence_Fast(shape, "expected sequence"); const unsigned int dimension = PySequence_Size(shape); for (unsigned int i = 0; i < 2; ++i) diff --git a/Modules/Bridge/VTK/include/itkVTKImageExport.h b/Modules/Bridge/VTK/include/itkVTKImageExport.h index 1c0747e6d3b..e68954112bc 100644 --- a/Modules/Bridge/VTK/include/itkVTKImageExport.h +++ b/Modules/Bridge/VTK/include/itkVTKImageExport.h @@ -129,13 +129,13 @@ class ITK_TEMPLATE_EXPORT VTKImageExport : public VTKImageExportBase private: std::string m_ScalarTypeName{}; - int m_WholeExtent[6]{}; - int m_DataExtent[6]{}; - double m_DataSpacing[3]{}; - double m_DataOrigin[3]{}; - double m_DataDirection[9]{}; - float m_FloatDataSpacing[3]{}; - float m_FloatDataOrigin[3]{}; + int m_WholeExtent[6]{}; + int m_DataExtent[6]{}; + double m_DataSpacing[3]{}; + double m_DataOrigin[3]{}; + double m_DataDirection[9]{}; + float m_FloatDataSpacing[3]{}; + float m_FloatDataOrigin[3]{}; }; } // end namespace itk diff --git a/Modules/Bridge/VTK/include/itkVTKImageExport.hxx b/Modules/Bridge/VTK/include/itkVTKImageExport.hxx index 23df337715e..4207952f4d3 100644 --- a/Modules/Bridge/VTK/include/itkVTKImageExport.hxx +++ b/Modules/Bridge/VTK/include/itkVTKImageExport.hxx @@ -145,8 +145,8 @@ VTKImageExport::WholeExtentCallback() } const InputRegionType region = input->GetLargestPossibleRegion(); - InputSizeType size = region.GetSize(); - InputIndexType index = region.GetIndex(); + InputSizeType size = region.GetSize(); + InputIndexType index = region.GetIndex(); unsigned int i = 0; // Fill in the known portion of the extent. @@ -349,7 +349,7 @@ template void VTKImageExport::PropagateUpdateExtentCallback(int * extent) { - InputSizeType size; + InputSizeType size; InputIndexType index; for (unsigned int i = 0; i < InputImageDimension; ++i) @@ -387,8 +387,8 @@ VTKImageExport::DataExtentCallback() } const InputRegionType region = input->GetBufferedRegion(); - InputSizeType size = region.GetSize(); - InputIndexType index = region.GetIndex(); + InputSizeType size = region.GetSize(); + InputIndexType index = region.GetIndex(); unsigned int i = 0; for (; i < InputImageDimension; ++i) diff --git a/Modules/Bridge/VTK/include/itkVTKImageExportBase.h b/Modules/Bridge/VTK/include/itkVTKImageExportBase.h index 57b19095492..82878d3c3f6 100644 --- a/Modules/Bridge/VTK/include/itkVTKImageExportBase.h +++ b/Modules/Bridge/VTK/include/itkVTKImageExportBase.h @@ -91,7 +91,7 @@ class ITKVTK_EXPORT VTKImageExportBase : public ProcessObject private: DoubleCallbackType m_DoubleCallback; - FloatCallbackType m_FloatCallback; + FloatCallbackType m_FloatCallback; }; /** Get a pointer to function to set as a callback in vtkImageImport. */ diff --git a/Modules/Bridge/VTK/include/itkVTKImageImport.h b/Modules/Bridge/VTK/include/itkVTKImageImport.h index 80eddabd1a8..6b095ba0eac 100644 --- a/Modules/Bridge/VTK/include/itkVTKImageImport.h +++ b/Modules/Bridge/VTK/include/itkVTKImageImport.h @@ -185,21 +185,21 @@ class ITK_TEMPLATE_EXPORT VTKImageImport : public ImageSource GenerateOutputInformation() override; private: - void * m_CallbackUserData{ nullptr }; - UpdateInformationCallbackType m_UpdateInformationCallback{ nullptr }; - PipelineModifiedCallbackType m_PipelineModifiedCallback{ nullptr }; - WholeExtentCallbackType m_WholeExtentCallback{ nullptr }; - SpacingCallbackType m_SpacingCallback{ nullptr }; - FloatSpacingCallbackType m_FloatSpacingCallback{ nullptr }; - OriginCallbackType m_OriginCallback{ nullptr }; - FloatOriginCallbackType m_FloatOriginCallback{ nullptr }; - DirectionCallbackType m_DirectionCallback{ nullptr }; - ScalarTypeCallbackType m_ScalarTypeCallback{ nullptr }; - NumberOfComponentsCallbackType m_NumberOfComponentsCallback{ nullptr }; + void * m_CallbackUserData{ nullptr }; + UpdateInformationCallbackType m_UpdateInformationCallback{ nullptr }; + PipelineModifiedCallbackType m_PipelineModifiedCallback{ nullptr }; + WholeExtentCallbackType m_WholeExtentCallback{ nullptr }; + SpacingCallbackType m_SpacingCallback{ nullptr }; + FloatSpacingCallbackType m_FloatSpacingCallback{ nullptr }; + OriginCallbackType m_OriginCallback{ nullptr }; + FloatOriginCallbackType m_FloatOriginCallback{ nullptr }; + DirectionCallbackType m_DirectionCallback{ nullptr }; + ScalarTypeCallbackType m_ScalarTypeCallback{ nullptr }; + NumberOfComponentsCallbackType m_NumberOfComponentsCallback{ nullptr }; PropagateUpdateExtentCallbackType m_PropagateUpdateExtentCallback{ nullptr }; - UpdateDataCallbackType m_UpdateDataCallback{ nullptr }; - DataExtentCallbackType m_DataExtentCallback{ nullptr }; - BufferPointerCallbackType m_BufferPointerCallback{ nullptr }; + UpdateDataCallbackType m_UpdateDataCallback{ nullptr }; + DataExtentCallbackType m_DataExtentCallback{ nullptr }; + BufferPointerCallbackType m_BufferPointerCallback{ nullptr }; std::string m_ScalarTypeName{}; }; diff --git a/Modules/Bridge/VTK/include/itkVTKImageImport.hxx b/Modules/Bridge/VTK/include/itkVTKImageImport.hxx index f64aefc34e4..a073c27f401 100644 --- a/Modules/Bridge/VTK/include/itkVTKImageImport.hxx +++ b/Modules/Bridge/VTK/include/itkVTKImageImport.hxx @@ -113,10 +113,10 @@ VTKImageImport::PropagateRequestedRegion(DataObject * outputPtr) if (m_PropagateUpdateExtentCallback) { const OutputRegionType region = output->GetRequestedRegion(); - OutputSizeType size = region.GetSize(); - OutputIndexType index = region.GetIndex(); + OutputSizeType size = region.GetSize(); + OutputIndexType index = region.GetIndex(); - int updateExtent[6]; + int updateExtent[6]; unsigned int i = 0; for (; i < OutputImageDimension; ++i) { @@ -167,9 +167,9 @@ VTKImageImport::GenerateOutputInformation() if (m_WholeExtentCallback) { - int * extent = (m_WholeExtentCallback)(m_CallbackUserData); + int * extent = (m_WholeExtentCallback)(m_CallbackUserData); OutputIndexType index; - OutputSizeType size; + OutputSizeType size; for (unsigned int i = 0; i < OutputImageDimension; ++i) { @@ -182,7 +182,7 @@ VTKImageImport::GenerateOutputInformation() } if (m_SpacingCallback) { - double * inSpacing = (m_SpacingCallback)(m_CallbackUserData); + double * inSpacing = (m_SpacingCallback)(m_CallbackUserData); typename TOutputImage::SpacingType outSpacing; for (unsigned int i = 0; i < OutputImageDimension; ++i) { @@ -192,7 +192,7 @@ VTKImageImport::GenerateOutputInformation() } else if (m_FloatSpacingCallback) { - float * inSpacing = (m_FloatSpacingCallback)(m_CallbackUserData); + float * inSpacing = (m_FloatSpacingCallback)(m_CallbackUserData); typename TOutputImage::SpacingType outSpacing; for (unsigned int i = 0; i < OutputImageDimension; ++i) { @@ -202,7 +202,7 @@ VTKImageImport::GenerateOutputInformation() } if (m_OriginCallback) { - double * inOrigin = (m_OriginCallback)(m_CallbackUserData); + double * inOrigin = (m_OriginCallback)(m_CallbackUserData); typename TOutputImage::PointType outOrigin; for (unsigned int i = 0; i < OutputImageDimension; ++i) { @@ -212,7 +212,7 @@ VTKImageImport::GenerateOutputInformation() } else if (m_FloatOriginCallback) { - float * inOrigin = (m_FloatOriginCallback)(m_CallbackUserData); + float * inOrigin = (m_FloatOriginCallback)(m_CallbackUserData); typename TOutputImage::PointType outOrigin; for (unsigned int i = 0; i < OutputImageDimension; ++i) { @@ -222,7 +222,7 @@ VTKImageImport::GenerateOutputInformation() } if (m_DirectionCallback) { - double * inDirection = (m_DirectionCallback)(m_CallbackUserData); + double * inDirection = (m_DirectionCallback)(m_CallbackUserData); typename TOutputImage::DirectionType outDirection; for (unsigned int i = 0; i < 3; ++i) { @@ -295,9 +295,9 @@ VTKImageImport::GenerateData() // get pointer to the output const OutputImagePointer output = this->GetOutput(); - int * extent = (m_DataExtentCallback)(m_CallbackUserData); + int * extent = (m_DataExtentCallback)(m_CallbackUserData); OutputIndexType index; - OutputSizeType size; + OutputSizeType size; SizeValueType importSize = 1; for (unsigned int i = 0; i < OutputImageDimension; ++i) diff --git a/Modules/Bridge/VtkGlue/include/QuickView.h b/Modules/Bridge/VtkGlue/include/QuickView.h index 66c7efbe67b..0499146c2e9 100644 --- a/Modules/Bridge/VtkGlue/include/QuickView.h +++ b/Modules/Bridge/VtkGlue/include/QuickView.h @@ -45,7 +45,7 @@ class ITKVtkGlue_EXPORT ImageInfo } ImageType::Pointer m_Image; - std::string m_Description; + std::string m_Description; }; /** @@ -64,7 +64,7 @@ class ITKVtkGlue_EXPORT RGBImageInfo } ImageType::Pointer m_Image; - std::string m_Description; + std::string m_Description; }; /** @@ -216,17 +216,17 @@ class ITKVtkGlue_EXPORT QuickView } private: - std::vector Images; // Container for images + std::vector Images; // Container for images std::vector RGBImages; // Container for rgb images - itk::IdentifierType m_Counter; - std::string m_SnapshotPath; - std::string m_SnapshotPrefix; - std::string m_SnapshotExtension; - bool m_ShareCamera; - bool m_Snapshot; - bool m_Interpolate; - unsigned int m_NumberOfColumns; - unsigned int m_ViewPortSize; + itk::IdentifierType m_Counter; + std::string m_SnapshotPath; + std::string m_SnapshotPrefix; + std::string m_SnapshotExtension; + bool m_ShareCamera; + bool m_Snapshot; + bool m_Interpolate; + unsigned int m_NumberOfColumns; + unsigned int m_ViewPortSize; }; #endif diff --git a/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.h b/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.h index 9809a1b0633..05dbb864d93 100644 --- a/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.h +++ b/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.h @@ -110,7 +110,7 @@ class ITK_TEMPLATE_EXPORT ImageToVTKImageFilter : public ProcessObject private: ExporterFilterPointer m_Exporter{}; - vtkImageImport * m_Importer{}; + vtkImageImport * m_Importer{}; }; } // end namespace itk diff --git a/Modules/Bridge/VtkGlue/include/itkViewImage.h b/Modules/Bridge/VtkGlue/include/itkViewImage.h index be91cfb873a..fc28f790138 100644 --- a/Modules/Bridge/VtkGlue/include/itkViewImage.h +++ b/Modules/Bridge/VtkGlue/include/itkViewImage.h @@ -48,10 +48,10 @@ class ViewImage * \param windowHeight Height of the visualization window. */ static void - View(const ImageType * img, + View(const ImageType * img, const std::string & windowTitle = "itkView", - size_t windowWidth = 600, - size_t windowHeight = 600); + size_t windowWidth = 600, + size_t windowHeight = 600); }; } // namespace itk diff --git a/Modules/Bridge/VtkGlue/include/itkViewImage.hxx b/Modules/Bridge/VtkGlue/include/itkViewImage.hxx index 55ec5984d49..23f840122cb 100644 --- a/Modules/Bridge/VtkGlue/include/itkViewImage.hxx +++ b/Modules/Bridge/VtkGlue/include/itkViewImage.hxx @@ -94,8 +94,8 @@ ViewImage::View(const ImageType * img, const std::string & winTitle, siz slicePlanes[i]->On(); } // Flip camera because VTK-ITK different corner for origin. - double pos[3]; - double vup[3]; + double pos[3]; + double vup[3]; vtkCamera * cam = renderer->GetActiveCamera(); cam->GetPosition(pos); cam->GetViewUp(vup); diff --git a/Modules/Bridge/VtkGlue/src/QuickView.cxx b/Modules/Bridge/VtkGlue/src/QuickView.cxx index ee7527236f9..5ffd024da06 100644 --- a/Modules/Bridge/VtkGlue/src/QuickView.cxx +++ b/Modules/Bridge/VtkGlue/src/QuickView.cxx @@ -84,7 +84,7 @@ QuickView::AddImage(UnsignedCharImageType * image, bool F { using FlipFilterType = itk::FlipImageFilter; FlipFilterType::Pointer flipper = FlipFilterType::New(); - bool flipAxes[3] = { false, true, false }; + bool flipAxes[3] = { false, true, false }; flipper = FlipFilterType::New(); flipper->SetFlipAxes(flipAxes); flipper->SetInput(image); @@ -117,14 +117,14 @@ QuickView::AddImage(TImage * image, bool FlipVertical, std::string Description) template <> void ITKVtkGlue_EXPORT QuickView::AddImage(UnsignedCharRGBImageType * image, - bool FlipVertical, - std::string Description) + bool FlipVertical, + std::string Description) { if (FlipVertical) { using FlipFilterType = itk::FlipImageFilter; FlipFilterType::Pointer flipper = FlipFilterType::New(); - bool flipAxes[3] = { false, true, false }; + bool flipAxes[3] = { false, true, false }; flipper = FlipFilterType::New(); flipper->SetFlipAxes(flipAxes); flipper->SetInput(image); @@ -142,14 +142,14 @@ QuickView::AddImage(UnsignedCharRGBImageType * image, template <> void ITKVtkGlue_EXPORT QuickView::AddRGBImage(UnsignedCharRGBImageType * image, - bool FlipVertical, - std::string Description) + bool FlipVertical, + std::string Description) { if (FlipVertical) { using FlipFilterType = itk::FlipImageFilter; FlipFilterType::Pointer flipper = FlipFilterType::New(); - bool flipAxes[3] = { false, true, false }; + bool flipAxes[3] = { false, true, false }; flipper = FlipFilterType::New(); flipper->SetFlipAxes(flipAxes); flipper->SetInput(image); @@ -303,7 +303,7 @@ QuickView::Visualize(bool interact) // RGB Images else if (i >= this->Images.size() && i < numberOfImages) { - unsigned int j = row * numberOfColumns + col - this->Images.size(); + unsigned int j = row * numberOfColumns + col - this->Images.size(); RGBConnectorType::Pointer connector = RGBConnectorType::New(); RGBconnectors.push_back(connector); connector->SetInput(this->RGBImages[j].m_Image); @@ -375,7 +375,7 @@ QuickView::Visualize(bool interact) if (m_Snapshot) { - std::string filename; + std::string filename; std::stringstream temp; temp << m_SnapshotPath << m_SnapshotPrefix << m_Counter << "."; filename = temp.str(); diff --git a/Modules/Bridge/VtkGlue/test/QuickViewTest.cxx b/Modules/Bridge/VtkGlue/test/QuickViewTest.cxx index eca2679a3ef..8c195f87c2b 100644 --- a/Modules/Bridge/VtkGlue/test/QuickViewTest.cxx +++ b/Modules/Bridge/VtkGlue/test/QuickViewTest.cxx @@ -24,9 +24,9 @@ template void View(const char * name, T, - std::string fileName, - bool sharedCamera = false, - bool interpolate = true, + std::string fileName, + bool sharedCamera = false, + bool interpolate = true, const std::string & snapshotPath = "", const std::string & ext = "png") { @@ -71,9 +71,9 @@ template void ViewRGB(const char * name, T, - std::string fileName, - bool sharedCamera = false, - bool interpolate = true, + std::string fileName, + bool sharedCamera = false, + bool interpolate = true, const std::string & snapshotPath = "", const std::string & ext = "png") { diff --git a/Modules/Bridge/VtkGlue/test/runViewImage.cxx b/Modules/Bridge/VtkGlue/test/runViewImage.cxx index bf3dbba5e49..6140bd403c0 100644 --- a/Modules/Bridge/VtkGlue/test/runViewImage.cxx +++ b/Modules/Bridge/VtkGlue/test/runViewImage.cxx @@ -41,8 +41,8 @@ runViewImage(int argc, char * argv[]) } // Defaults std::string winTitle = "itkViewImage"; - size_t winWidth = 600; - size_t winHeight = 600; + size_t winWidth = 600; + size_t winHeight = 600; if (argc >= 3) { winTitle = argv[2]; diff --git a/Modules/Core/Common/include/VNLIterativeSparseSolverTraits.h b/Modules/Core/Common/include/VNLIterativeSparseSolverTraits.h index 3f5d3ee5037..3f7c44e844e 100644 --- a/Modules/Core/Common/include/VNLIterativeSparseSolverTraits.h +++ b/Modules/Core/Common/include/VNLIterativeSparseSolverTraits.h @@ -108,9 +108,9 @@ class VNLIterativeSparseSolverTraits const VectorType & iBx, const VectorType & iBy, const VectorType & iBz, - VectorType & oX, - VectorType & oY, - VectorType & oZ) + VectorType & oX, + VectorType & oY, + VectorType & oZ) { bool result1 = Solve(iA, iBx, 100000, oX); bool result2 = Solve(iA, iBy, 100000, oY); diff --git a/Modules/Core/Common/include/VNLSparseLUSolverTraits.h b/Modules/Core/Common/include/VNLSparseLUSolverTraits.h index 9dff05da241..3941191f4c1 100644 --- a/Modules/Core/Common/include/VNLSparseLUSolverTraits.h +++ b/Modules/Core/Common/include/VNLSparseLUSolverTraits.h @@ -106,9 +106,9 @@ class VNLSparseLUSolverTraits const VectorType & iBx, const VectorType & iBy, const VectorType & iBz, - VectorType & oX, - VectorType & oY, - VectorType & oZ) + VectorType & oX, + VectorType & oY, + VectorType & oZ) { SolverType solver(iA); Solve(solver, iBx, iBy, iBz, oX, oY, oZ); @@ -136,13 +136,13 @@ class VNLSparseLUSolverTraits /** \brief Solve the linear systems: \f$ iA \cdot oX = iBx \f$, \f$ iA \cdot oY = iBy \f$, \f$ iA \cdot oZ = iBz \f$ * factoring the internal matrix if needed */ static void - Solve(SolverType & solver, + Solve(SolverType & solver, const VectorType & iBx, const VectorType & iBy, const VectorType & iBz, - VectorType & oX, - VectorType & oY, - VectorType & oZ) + VectorType & oX, + VectorType & oY, + VectorType & oZ) { oX = solver.solve(iBx); oY = solver.solve(iBy); diff --git a/Modules/Core/Common/include/itkAnatomicalOrientation.h b/Modules/Core/Common/include/itkAnatomicalOrientation.h index cf78b6cb4d6..7358df39467 100644 --- a/Modules/Core/Common/include/itkAnatomicalOrientation.h +++ b/Modules/Core/Common/include/itkAnatomicalOrientation.h @@ -534,7 +534,7 @@ class ITKCommon_EXPORT AnatomicalOrientation friend ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, PositiveEnum value); + operator<<(std::ostream & out, PositiveEnum value); protected: /** \brief Return the direction cosine matrix for a orientation. */ @@ -563,19 +563,19 @@ class ITKCommon_EXPORT AnatomicalOrientation /** Outputs unambiguous anatomical orientation names such as "right-to-left". */ ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, typename AnatomicalOrientation::CoordinateEnum value); +operator<<(std::ostream & out, typename AnatomicalOrientation::CoordinateEnum value); /** Outputs the PositiveEnum encoding as a string such as "LPS". */ ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, typename AnatomicalOrientation::PositiveEnum value); +operator<<(std::ostream & out, typename AnatomicalOrientation::PositiveEnum value); /** Outputs the NegativeEnum encoding as a string such as "RAI" */ ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, typename AnatomicalOrientation::NegativeEnum value); +operator<<(std::ostream & out, typename AnatomicalOrientation::NegativeEnum value); ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const AnatomicalOrientation & orientation); +operator<<(std::ostream & out, const AnatomicalOrientation & orientation); } // end namespace itk diff --git a/Modules/Core/Common/include/itkAnnulusOperator.h b/Modules/Core/Common/include/itkAnnulusOperator.h index 4c1888f7ab5..b3efea8b4c4 100644 --- a/Modules/Core/Common/include/itkAnnulusOperator.h +++ b/Modules/Core/Common/include/itkAnnulusOperator.h @@ -241,13 +241,13 @@ class ITK_TEMPLATE_EXPORT AnnulusOperator : public NeighborhoodOperator::OneValue() }; - PixelType m_ExteriorValue{}; + double m_InnerRadius{ 1.0 }; + double m_Thickness{ 1.0 }; + bool m_Normalize{ false }; + bool m_BrightCenter{ false }; + PixelType m_InteriorValue{}; + PixelType m_AnnulusValue{ NumericTraits::OneValue() }; + PixelType m_ExteriorValue{}; SpacingType m_Spacing{ MakeFilled(1.0) }; }; } // namespace itk diff --git a/Modules/Core/Common/include/itkAnnulusOperator.hxx b/Modules/Core/Common/include/itkAnnulusOperator.hxx index 20ec162fb59..6148949d44a 100644 --- a/Modules/Core/Common/include/itkAnnulusOperator.hxx +++ b/Modules/Core/Common/include/itkAnnulusOperator.hxx @@ -102,15 +102,15 @@ AnnulusOperator::GenerateCoefficients() -> Coeff // Walk the neighborhood (this) and evaluate the sphere spatial // functions - double sumNotExterior = 0.0; - double sumNotExteriorSq = 0.0; + double sumNotExterior = 0.0; + double sumNotExteriorSq = 0.0; unsigned int countNotExterior = 0; const typename SizeType::SizeValueType w = this->Size(); - const auto outside = std::make_unique(w); - CoefficientVector coeffP(w); - OffsetType offset; + const auto outside = std::make_unique(w); + CoefficientVector coeffP(w); + OffsetType offset; typename SphereType::InputType point; for (unsigned int i = 0; i < w; ++i) @@ -160,7 +160,7 @@ AnnulusOperator::GenerateCoefficients() -> Coeff { // Calculate the mean and standard deviation of kernel values NOT // the exterior - auto num = static_cast(countNotExterior); + auto num = static_cast(countNotExterior); const double mean = sumNotExterior / num; const double var = (sumNotExteriorSq - (sumNotExterior * sumNotExterior / num)) / (num - 1.0); const double std = std::sqrt(var); diff --git a/Modules/Core/Common/include/itkArray2D.h b/Modules/Core/Common/include/itkArray2D.h index 91adcc9cfce..cc94396a24f 100644 --- a/Modules/Core/Common/include/itkArray2D.h +++ b/Modules/Core/Common/include/itkArray2D.h @@ -147,10 +147,10 @@ operator<<(std::ostream & os, const Array2D & arr) // declaration of specialization template <> ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & os, const Array2D & arr); +operator<<(std::ostream & os, const Array2D & arr); template <> ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & os, const Array2D & arr); +operator<<(std::ostream & os, const Array2D & arr); } // namespace itk diff --git a/Modules/Core/Common/include/itkAutoPointer.h b/Modules/Core/Common/include/itkAutoPointer.h index 181ed18e829..11e9e5bf9d5 100644 --- a/Modules/Core/Common/include/itkAutoPointer.h +++ b/Modules/Core/Common/include/itkAutoPointer.h @@ -228,7 +228,7 @@ class AutoPointer /** The pointer to the object referred to by this smart pointer. */ ObjectType * m_Pointer; - bool m_IsOwner{ false }; + bool m_IsOwner{ false }; }; template diff --git a/Modules/Core/Common/include/itkBSplineInterpolationWeightFunction.hxx b/Modules/Core/Common/include/itkBSplineInterpolationWeightFunction.hxx index 03934806ea5..0c9490057b6 100644 --- a/Modules/Core/Common/include/itkBSplineInterpolationWeightFunction.hxx +++ b/Modules/Core/Common/include/itkBSplineInterpolationWeightFunction.hxx @@ -32,7 +32,7 @@ BSplineInterpolationWeightFunction:: const ContinuousIndexType & index) const -> WeightsType { WeightsType weights; - IndexType startIndex; + IndexType startIndex; this->Evaluate(index, weights, startIndex); @@ -44,12 +44,12 @@ template ::Evaluate( const ContinuousIndexType & index, - WeightsType & weights, - IndexType & startIndex) const + WeightsType & weights, + IndexType & startIndex) const { static constexpr auto offsetToIndexTable = [] { FixedArray table{}; - auto indexIterator = ZeroBasedIndexRange(SupportSize).cbegin(); + auto indexIterator = ZeroBasedIndexRange(SupportSize).cbegin(); for (size_t i{}; i < NumberOfWeights; ++i) { diff --git a/Modules/Core/Common/include/itkBoundingBox.h b/Modules/Core/Common/include/itkBoundingBox.h index ffcffc93200..441e209c5d3 100644 --- a/Modules/Core/Common/include/itkBoundingBox.h +++ b/Modules/Core/Common/include/itkBoundingBox.h @@ -206,8 +206,8 @@ class ITK_TEMPLATE_EXPORT BoundingBox : public Object PointsContainerPointer m_CornersContainer{ PointsContainer::New() }; #endif mutable BoundsArrayType m_Bounds{}; - mutable TimeStamp m_BoundsMTime{}; // The last time the bounds - // were computed. + mutable TimeStamp m_BoundsMTime{}; // The last time the bounds + // were computed. }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkBoundingBox.hxx b/Modules/Core/Common/include/itkBoundingBox.hxx index 3ec2f1b2cba..f58baa11baa 100644 --- a/Modules/Core/Common/include/itkBoundingBox.hxx +++ b/Modules/Core/Common/include/itkBoundingBox.hxx @@ -38,7 +38,7 @@ namespace itk template void BoundingBox::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -153,7 +153,7 @@ BoundingBox::C return false; } - PointsContainerConstIterator ci = m_PointsContainer->Begin(); + PointsContainerConstIterator ci = m_PointsContainer->Begin(); Point point = ci->Value(); // point value for (unsigned int i = 0; i < PointDimension; ++i) { @@ -348,7 +348,7 @@ BoundingBox::D // Copy the corners into the clone. clone->m_CornersContainer->clear(); - PointsContainerConstIterator itr = this->m_CornersContainer->Begin(); + PointsContainerConstIterator itr = this->m_CornersContainer->Begin(); const PointsContainerConstIterator end = this->m_CornersContainer->End(); clone->m_CornersContainer->Reserve(this->m_CornersContainer->Size()); diff --git a/Modules/Core/Common/include/itkBresenhamLine.hxx b/Modules/Core/Common/include/itkBresenhamLine.hxx index b6a4c847f86..e1468902ec6 100644 --- a/Modules/Core/Common/include/itkBresenhamLine.hxx +++ b/Modules/Core/Common/include/itkBresenhamLine.hxx @@ -33,14 +33,14 @@ BresenhamLine::BuildLine(LType Direction, IdentifierType length) -> Direction.Normalize(); // we are going to start at 0 constexpr IndexType StartIndex = { { 0 } }; - IndexType LastIndex; + IndexType LastIndex; for (unsigned int i = 0; i < VDimension; ++i) { LastIndex[i] = (IndexValueType)(length * Direction[i]); } // Find the dominant direction IndexValueType maxDistance = 0; - unsigned int maxDistanceDimension = 0; + unsigned int maxDistanceDimension = 0; // Increment for the error for each step. Two times the difference between // start and end IndexType incrementError; @@ -71,7 +71,7 @@ BresenhamLine::BuildLine(LType Direction, IdentifierType length) -> auto accumulateError = MakeFilled(0); OffsetArray result(length); - auto currentImageIndex = MakeFilled(0); + auto currentImageIndex = MakeFilled(0); result[0] = currentImageIndex - StartIndex; unsigned int steps = 1; while (steps < length) @@ -108,7 +108,7 @@ BresenhamLine::BuildLine(IndexType p0, IndexType p1) -> IndexArray { itk::Point point0; itk::Point point1; - IdentifierType maxDistance = 0; + IdentifierType maxDistance = 0; for (unsigned int i = 0; i < VDimension; ++i) { point0[i] = p0[i]; diff --git a/Modules/Core/Common/include/itkBufferedImageNeighborhoodPixelAccessPolicy.h b/Modules/Core/Common/include/itkBufferedImageNeighborhoodPixelAccessPolicy.h index 55d7cdab007..cb965245350 100644 --- a/Modules/Core/Common/include/itkBufferedImageNeighborhoodPixelAccessPolicy.h +++ b/Modules/Core/Common/include/itkBufferedImageNeighborhoodPixelAccessPolicy.h @@ -78,7 +78,7 @@ class BufferedImageNeighborhoodPixelAccessPolicy final #endif , const OffsetType & offsetTable, - const IndexType & pixelIndex) noexcept + const IndexType & pixelIndex) noexcept { IndexValueType result = 0; @@ -103,10 +103,10 @@ class BufferedImageNeighborhoodPixelAccessPolicy final /** Constructor called directly by the pixel proxy of ShapedImageNeighborhoodRange. * \note The parameter `pixelIndex` is assumed to be in the buffered region. */ - BufferedImageNeighborhoodPixelAccessPolicy(const ImageSizeType & imageSize, - const OffsetType & offsetTable, + BufferedImageNeighborhoodPixelAccessPolicy(const ImageSizeType & imageSize, + const OffsetType & offsetTable, const NeighborhoodAccessorFunctorType & neighborhoodAccessor, - const IndexType & pixelIndex) noexcept + const IndexType & pixelIndex) noexcept : m_PixelIndexValue{ CalculatePixelIndexValue(imageSize, offsetTable, pixelIndex) } , m_NeighborhoodAccessor(neighborhoodAccessor) {} diff --git a/Modules/Core/Common/include/itkBuildInformation.h b/Modules/Core/Common/include/itkBuildInformation.h index acf21bc0c6b..1fdbc0dec9c 100644 --- a/Modules/Core/Common/include/itkBuildInformation.h +++ b/Modules/Core/Common/include/itkBuildInformation.h @@ -69,7 +69,7 @@ class ITKCommon_EXPORT BuildInformation final : public Object class InformationValueType { public: - const MapValueType m_Value; + const MapValueType m_Value; const MapValueDescriptionType m_Description; }; diff --git a/Modules/Core/Common/include/itkCellInterface.hxx b/Modules/Core/Common/include/itkCellInterface.hxx index 9b4c71796bc..18a87ef247d 100644 --- a/Modules/Core/Common/include/itkCellInterface.hxx +++ b/Modules/Core/Common/include/itkCellInterface.hxx @@ -49,7 +49,7 @@ CellInterface::GetPointIdsContainer() const -> PointIde { PointIdentifierContainerType res; res.SetSize(this->GetNumberOfPoints()); - int i = 0; + int i = 0; PointIdConstIterator it = this->PointIdsBegin(); PointIdConstIterator end = this->PointIdsEnd(); while (it != end) diff --git a/Modules/Core/Common/include/itkColorTable.h b/Modules/Core/Common/include/itkColorTable.h index 1c250e88959..c62efaa6e72 100644 --- a/Modules/Core/Common/include/itkColorTable.h +++ b/Modules/Core/Common/include/itkColorTable.h @@ -131,7 +131,7 @@ class ITK_TEMPLATE_EXPORT ColorTable : public Object unsigned int m_NumberOfColors{ 0 }; ColorNameVectorType m_ColorName{}; - ColorVectorType m_Color{}; + ColorVectorType m_Color{}; }; } // namespace itk diff --git a/Modules/Core/Common/include/itkColorTable.hxx b/Modules/Core/Common/include/itkColorTable.hxx index 7fd94dcc447..79aa7a010cc 100644 --- a/Modules/Core/Common/include/itkColorTable.hxx +++ b/Modules/Core/Common/include/itkColorTable.hxx @@ -88,7 +88,7 @@ ColorTable::UseDiscreteColors() // on this assignment, even if realMax was // set to NumericTraits::max(). const typename NumericTraits::RealType realMax(1.0 * scale + shift); - TComponent pixelMax(NumericTraits::max()); + TComponent pixelMax(NumericTraits::max()); // Converting from TComponent to RealType may introduce a rounding error, so do static_cast constexpr auto max_value_converted = static_cast::RealType>(NumericTraits::max()); @@ -188,7 +188,7 @@ ColorTable::UseHeatColors(unsigned int n) // // avoid overflow const typename NumericTraits::RealType realR(((i + 1) / (n / 2.0 + 1)) * scale + shift); - TComponent r(NumericTraits::max()); + TComponent r(NumericTraits::max()); if (realR < max_value_converted) { r = static_cast(realR); @@ -204,7 +204,7 @@ ColorTable::UseHeatColors(unsigned int n) for (i = 0; i < n / 2; ++i) { const typename NumericTraits::RealType rdouble(1.0 * scale + shift); - TComponent r(NumericTraits::max()); + TComponent r(NumericTraits::max()); if (rdouble < max_value_converted) { r = static_cast(rdouble); @@ -343,7 +343,7 @@ template unsigned int ColorTable::GetClosestColorTableId(TComponent r, TComponent g, TComponent b) { - double bestMatch = 0.0; + double bestMatch = 0.0; unsigned int bestMatchColor = 0; for (unsigned int i = 0; i < m_NumberOfColors; ++i) diff --git a/Modules/Core/Common/include/itkCommand.h b/Modules/Core/Common/include/itkCommand.h index 9fab6ba028d..c5aa74121f7 100644 --- a/Modules/Core/Common/include/itkCommand.h +++ b/Modules/Core/Common/include/itkCommand.h @@ -139,8 +139,8 @@ class ITK_TEMPLATE_EXPORT MemberCommand : public Command } protected: - T * m_This{ nullptr }; - TMemberFunctionPointer m_MemberFunction{ nullptr }; + T * m_This{ nullptr }; + TMemberFunctionPointer m_MemberFunction{ nullptr }; TConstMemberFunctionPointer m_ConstMemberFunction{ nullptr }; MemberCommand() = default; @@ -206,7 +206,7 @@ class ITK_TEMPLATE_EXPORT ReceptorMemberCommand : public Command } protected: - T * m_This{ nullptr }; + T * m_This{ nullptr }; TMemberFunctionPointer m_MemberFunction{ nullptr }; ReceptorMemberCommand() = default; @@ -270,7 +270,7 @@ class ITK_TEMPLATE_EXPORT SimpleMemberCommand : public Command } protected: - T * m_This{ nullptr }; + T * m_This{ nullptr }; TMemberFunctionPointer m_MemberFunction{ nullptr }; SimpleMemberCommand() = default; @@ -334,7 +334,7 @@ class ITK_TEMPLATE_EXPORT SimpleConstMemberCommand : public Command } protected: - const T * m_This{ nullptr }; + const T * m_This{ nullptr }; TMemberFunctionPointer m_MemberFunction{ nullptr }; SimpleConstMemberCommand() = default; @@ -399,9 +399,9 @@ class ITKCommon_EXPORT CStyleCommand : public Command CStyleCommand(); ~CStyleCommand() override; - void * m_ClientData{ nullptr }; - FunctionPointer m_Callback{ nullptr }; - ConstFunctionPointer m_ConstCallback{ nullptr }; + void * m_ClientData{ nullptr }; + FunctionPointer m_Callback{ nullptr }; + ConstFunctionPointer m_ConstCallback{ nullptr }; DeleteDataFunctionPointer m_ClientDataDeleteCallback{ nullptr }; }; diff --git a/Modules/Core/Common/include/itkCommonEnums.h b/Modules/Core/Common/include/itkCommonEnums.h index 0c982185a90..20c11407696 100644 --- a/Modules/Core/Common/include/itkCommonEnums.h +++ b/Modules/Core/Common/include/itkCommonEnums.h @@ -166,17 +166,17 @@ using CellGeometryType = CommonEnums::CellGeometry; #endif // Define how to print enumeration extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, IOPixelEnum value); +operator<<(std::ostream & out, IOPixelEnum value); extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, IOComponentEnum value); +operator<<(std::ostream & out, IOComponentEnum value); extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, IOFileEnum value); +operator<<(std::ostream & out, IOFileEnum value); extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, IOFileModeEnum value); +operator<<(std::ostream & out, IOFileModeEnum value); extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, IOByteOrderEnum value); +operator<<(std::ostream & out, IOByteOrderEnum value); extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, CellGeometryEnum value); +operator<<(std::ostream & out, CellGeometryEnum value); /** \class MeshEnums * \ingroup ITKCommon @@ -197,7 +197,7 @@ class MeshEnums }; }; extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, MeshEnums::MeshClassCellsAllocationMethod value); +operator<<(std::ostream & out, MeshEnums::MeshClassCellsAllocationMethod value); /** * \class OctreeEnums * \ingroup ITKCommon @@ -234,9 +234,9 @@ class OctreeEnums // Define how to print enumeration extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const OctreeEnums::Octree value); +operator<<(std::ostream & out, const OctreeEnums::Octree value); extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const OctreeEnums::LeafIdentifier value); +operator<<(std::ostream & out, const OctreeEnums::LeafIdentifier value); /** \class ObjectEnums * \ingroup ITKCommon */ @@ -254,7 +254,7 @@ class ObjectEnums }; extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const ObjectEnums::RegionEnum value); +operator<<(std::ostream & out, const ObjectEnums::RegionEnum value); /** \class ObjectFactoryEnums * \ingroup ITKCommon @@ -274,7 +274,7 @@ class ObjectFactoryEnums }; }; extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const ObjectFactoryEnums::InsertionPosition value); +operator<<(std::ostream & out, const ObjectFactoryEnums::InsertionPosition value); } // namespace itk diff --git a/Modules/Core/Common/include/itkCompensatedSummation.hxx b/Modules/Core/Common/include/itkCompensatedSummation.hxx index 66c924d55b9..52cc1bab923 100644 --- a/Modules/Core/Common/include/itkCompensatedSummation.hxx +++ b/Modules/Core/Common/include/itkCompensatedSummation.hxx @@ -43,7 +43,7 @@ void CompensatedSummationAddElement(TFloat & compensation, TFloat & sum, const TFloat & element, int = 0) { using AccumulateType = typename NumericTraits::AccumulateType; - const auto compensatedInput = static_cast(element - compensation); + const auto compensatedInput = static_cast(element - compensation); const AccumulateType tempSum = sum + compensatedInput; // Warning: watch out for the compiler optimizing this out! compensation = static_cast((tempSum - sum) - compensatedInput); diff --git a/Modules/Core/Common/include/itkConceptChecking.h b/Modules/Core/Common/include/itkConceptChecking.h index 1c2a15b745e..832b5d84048 100644 --- a/Modules/Core/Common/include/itkConceptChecking.h +++ b/Modules/Core/Common/include/itkConceptChecking.h @@ -186,7 +186,7 @@ struct CopyConstructible void constraints() { - T a(b); + T a(b); T * p = &a; const_constraints(a); @@ -196,7 +196,7 @@ struct CopyConstructible void const_constraints(const T & a) { - T c(a); + T c(a); const T * p = &a; Detail::IgnoreUnusedVariable(c); @@ -938,7 +938,7 @@ struct IsFloatingPoint constraints() { const IntegralT a = FalseT(); - const ExactT b = FalseT(); + const ExactT b = FalseT(); Detail::IgnoreUnusedVariable(a); Detail::IgnoreUnusedVariable(b); @@ -965,7 +965,7 @@ struct IsFixedPoint constraints() { IntegralT a = FalseT(); - ExactT b = TrueT(); + ExactT b = TrueT(); Detail::IgnoreUnusedVariable(a); Detail::IgnoreUnusedVariable(b); diff --git a/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.h b/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.h index 07b79d5248b..33f675b3f44 100644 --- a/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.h +++ b/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.h @@ -127,12 +127,12 @@ class ITK_TEMPLATE_EXPORT ConicShellInteriorExteriorSpatialFunction PrintSelf(std::ostream & os, Indent indent) const override; private: - InputType m_Origin{}; + InputType m_Origin{}; GradientType m_OriginGradient{}; - double m_DistanceMin{ 0.0 }; - double m_DistanceMax{ 0.0 }; - double m_Epsilon{ 0.0 }; - bool m_Polarity{ false }; + double m_DistanceMin{ 0.0 }; + double m_DistanceMax{ 0.0 }; + double m_Epsilon{ 0.0 }; + bool m_Polarity{ false }; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkConnectedImageNeighborhoodShape.h b/Modules/Core/Common/include/itkConnectedImageNeighborhoodShape.h index 8a6020df44a..baeeac1ea3b 100644 --- a/Modules/Core/Common/include/itkConnectedImageNeighborhoodShape.h +++ b/Modules/Core/Common/include/itkConnectedImageNeighborhoodShape.h @@ -101,7 +101,7 @@ class ConnectedImageNeighborhoodShape * pixel (offset zero) should be included with the offsets for this shape. */ constexpr explicit ConnectedImageNeighborhoodShape(const size_t maximumCityblockDistance, - const bool includeCenterPixel) noexcept + const bool includeCenterPixel) noexcept : m_MaximumCityblockDistance{ maximumCityblockDistance } , m_IncludeCenterPixel{ includeCenterPixel } , m_NumberOfOffsets{ CalculateNumberOfOffsets(maximumCityblockDistance, includeCenterPixel) } diff --git a/Modules/Core/Common/include/itkConstNeighborhoodIterator.h b/Modules/Core/Common/include/itkConstNeighborhoodIterator.h index a873e185b16..d564cd5cb7b 100644 --- a/Modules/Core/Common/include/itkConstNeighborhoodIterator.h +++ b/Modules/Core/Common/include/itkConstNeighborhoodIterator.h @@ -354,7 +354,7 @@ class ITK_TEMPLATE_EXPORT ConstNeighborhoodIterator { if (this->GetCenterPointer() > m_End) { - ExceptionObject e(__FILE__, __LINE__); + ExceptionObject e(__FILE__, __LINE__); std::ostringstream msg; msg << "In method IsAtEnd, CenterPointer = " << this->GetCenterPointer() << " is greater than End = " << m_End << std::endl @@ -648,7 +648,7 @@ class ITK_TEMPLATE_EXPORT ConstNeighborhoodIterator template inline ConstNeighborhoodIterator -operator+(const ConstNeighborhoodIterator & it, +operator+(const ConstNeighborhoodIterator & it, const typename ConstNeighborhoodIterator::OffsetType & ind) { ConstNeighborhoodIterator ret(it); @@ -659,14 +659,14 @@ operator+(const ConstNeighborhoodIterator & it, template inline ConstNeighborhoodIterator operator+(const typename ConstNeighborhoodIterator::OffsetType & ind, - const ConstNeighborhoodIterator & it) + const ConstNeighborhoodIterator & it) { return (it + ind); } template inline ConstNeighborhoodIterator -operator-(const ConstNeighborhoodIterator & it, +operator-(const ConstNeighborhoodIterator & it, const typename ConstNeighborhoodIterator::OffsetType & ind) { ConstNeighborhoodIterator ret(it); diff --git a/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx b/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx index be6c095a2e2..b741dec886e 100644 --- a/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx +++ b/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx @@ -48,8 +48,8 @@ ConstNeighborhoodIterator::InBounds() const template bool ConstNeighborhoodIterator::IndexInBounds(const NeighborIndexType n, - OffsetType & internalIndex, - OffsetType & offset) const + OffsetType & internalIndex, + OffsetType & offset) const { if (!m_NeedToUseBoundaryCondition) { @@ -114,7 +114,7 @@ ConstNeighborhoodIterator::IndexInBounds(const Neigh } else { - bool flag = true; + bool flag = true; const OffsetType & internalIndex = this->ComputeInternalIndex(n); // Is this pixel in bounds? for (DimensionValueType i = 0; i < Dimension; ++i) @@ -186,7 +186,7 @@ ConstNeighborhoodIterator::ComputeInternalIndex(cons -> OffsetType { OffsetType ans; - auto r = static_cast(n); + auto r = static_cast(n); for (long i = static_cast(Dimension) - 1; i >= 0; --i) { ans[i] = static_cast(r / this->GetStride(i)); @@ -200,7 +200,7 @@ auto ConstNeighborhoodIterator::GetBoundingBoxAsImageRegion() const -> RegionType { constexpr IndexValueType zero{}; - const RegionType ans(this->GetIndex(zero), this->GetSize()); + const RegionType ans(this->GetIndex(zero), this->GetSize()); return ans; } @@ -393,9 +393,9 @@ ConstNeighborhoodIterator::SetRegion(const RegionTyp // now determine whether boundary conditions are going to be needed const IndexType bStart = m_ConstImage->GetBufferedRegion().GetIndex(); - const SizeType bSize = m_ConstImage->GetBufferedRegion().GetSize(); + const SizeType bSize = m_ConstImage->GetBufferedRegion().GetSize(); const IndexType rStart = region.GetIndex(); - const SizeType rSize = region.GetSize(); + const SizeType rSize = region.GetSize(); m_NeedToUseBoundaryCondition = false; for (DimensionValueType i = 0; i < Dimension; ++i) @@ -421,8 +421,8 @@ ConstNeighborhoodIterator::SetRegion(const RegionTyp template void -ConstNeighborhoodIterator::Initialize(const SizeType & radius, - const ImageType * ptr, +ConstNeighborhoodIterator::Initialize(const SizeType & radius, + const ImageType * ptr, const RegionType & region) { m_ConstImage = ptr; @@ -621,10 +621,10 @@ template void ConstNeighborhoodIterator::SetBound(const SizeType & size) { - SizeType radius = this->GetRadius(); + SizeType radius = this->GetRadius(); const OffsetValueType * offset = m_ConstImage->GetOffsetTable(); - const IndexType imageBRStart = m_ConstImage->GetBufferedRegion().GetIndex(); - SizeType imageBRSize = m_ConstImage->GetBufferedRegion().GetSize(); + const IndexType imageBRStart = m_ConstImage->GetBufferedRegion().GetIndex(); + SizeType imageBRSize = m_ConstImage->GetBufferedRegion().GetSize(); // Set the bounds and the wrapping offsets. Inner bounds are the loop // indices where the iterator will begin to overlap the edge of the image @@ -645,11 +645,11 @@ template void ConstNeighborhoodIterator::SetPixelPointers(const IndexType & pos) { - const Iterator _end = Superclass::End(); - auto * ptr = const_cast(m_ConstImage.GetPointer()); - const SizeType size = this->GetSize(); + const Iterator _end = Superclass::End(); + auto * ptr = const_cast(m_ConstImage.GetPointer()); + const SizeType size = this->GetSize(); const OffsetValueType * OffsetTable = m_ConstImage->GetOffsetTable(); - const SizeType radius = this->GetRadius(); + const SizeType radius = this->GetRadius(); SizeType loop{}; @@ -690,8 +690,8 @@ template ConstNeighborhoodIterator & ConstNeighborhoodIterator::operator+=(const OffsetType & idx) { - const Iterator _end = this->End(); - OffsetValueType accumulator = 0; + const Iterator _end = this->End(); + OffsetValueType accumulator = 0; const OffsetValueType * stride = this->GetImagePointer()->GetOffsetTable(); // Repositioning neighborhood, previous bounds check on neighborhood @@ -727,8 +727,8 @@ template ConstNeighborhoodIterator & ConstNeighborhoodIterator::operator-=(const OffsetType & idx) { - const Iterator _end = this->End(); - OffsetValueType accumulator = 0; + const Iterator _end = this->End(); + OffsetValueType accumulator = 0; const OffsetValueType * stride = this->GetImagePointer()->GetOffsetTable(); // Repositioning neighborhood, previous bounds check on neighborhood diff --git a/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.h b/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.h index 234b93a3dd6..ee1641390e1 100644 --- a/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.h +++ b/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.h @@ -406,7 +406,7 @@ class ITK_TEMPLATE_EXPORT ConstNeighborhoodIteratorWithOnlyIndex : public Neighb template inline ConstNeighborhoodIteratorWithOnlyIndex -operator+(const ConstNeighborhoodIteratorWithOnlyIndex & it, +operator+(const ConstNeighborhoodIteratorWithOnlyIndex & it, const typename ConstNeighborhoodIteratorWithOnlyIndex::OffsetType & ind) { ConstNeighborhoodIteratorWithOnlyIndex ret = it; @@ -417,14 +417,14 @@ operator+(const ConstNeighborhoodIteratorWithOnlyIndex & template inline ConstNeighborhoodIteratorWithOnlyIndex operator+(const typename ConstNeighborhoodIteratorWithOnlyIndex::OffsetType & ind, - const ConstNeighborhoodIteratorWithOnlyIndex & it) + const ConstNeighborhoodIteratorWithOnlyIndex & it) { return (it + ind); } template inline ConstNeighborhoodIteratorWithOnlyIndex -operator-(const ConstNeighborhoodIteratorWithOnlyIndex & it, +operator-(const ConstNeighborhoodIteratorWithOnlyIndex & it, const typename ConstNeighborhoodIteratorWithOnlyIndex::OffsetType & ind) { ConstNeighborhoodIteratorWithOnlyIndex ret = it; diff --git a/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.hxx b/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.hxx index 71a2563cfb2..75dbcd4c81b 100644 --- a/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.hxx +++ b/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.hxx @@ -50,8 +50,8 @@ ConstNeighborhoodIteratorWithOnlyIndex::InBounds() const template bool ConstNeighborhoodIteratorWithOnlyIndex::IndexInBounds(const NeighborIndexType n, - OffsetType & internalIndex, - OffsetType & offset) const + OffsetType & internalIndex, + OffsetType & offset) const { if (!m_NeedToUseBoundaryCondition) { @@ -107,7 +107,7 @@ auto ConstNeighborhoodIteratorWithOnlyIndex::ComputeInternalIndex(NeighborIndexType n) const -> OffsetType { OffsetType ans; - auto r = static_cast(n); + auto r = static_cast(n); for (long i = static_cast(Dimension) - 1; i >= 0; --i) { ans[i] = static_cast(r / this->GetStride(i)); @@ -121,15 +121,15 @@ auto ConstNeighborhoodIteratorWithOnlyIndex::GetBoundingBoxAsImageRegion() const -> RegionType { constexpr IndexValueType zero{}; - const RegionType ans(this->GetIndex(zero), this->GetSize()); + const RegionType ans(this->GetIndex(zero), this->GetSize()); return ans; } template -ConstNeighborhoodIteratorWithOnlyIndex::ConstNeighborhoodIteratorWithOnlyIndex(const SizeType & radius, - const ImageType * ptr, +ConstNeighborhoodIteratorWithOnlyIndex::ConstNeighborhoodIteratorWithOnlyIndex(const SizeType & radius, + const ImageType * ptr, const RegionType & region) { this->Initialize(radius, ptr, region); @@ -168,8 +168,8 @@ ConstNeighborhoodIteratorWithOnlyIndex::GoToEnd() template void -ConstNeighborhoodIteratorWithOnlyIndex::Initialize(const SizeType & radius, - const ImageType * ptr, +ConstNeighborhoodIteratorWithOnlyIndex::Initialize(const SizeType & radius, + const ImageType * ptr, const RegionType & region) { m_ConstImage = ptr; @@ -183,9 +183,9 @@ ConstNeighborhoodIteratorWithOnlyIndex::Initialize(const SizeType & ra // now determine whether boundary conditions are going to be needed const IndexType bStart = ptr->GetBufferedRegion().GetIndex(); - const SizeType bSize = ptr->GetBufferedRegion().GetSize(); + const SizeType bSize = ptr->GetBufferedRegion().GetSize(); const IndexType rStart = region.GetIndex(); - const SizeType rSize = region.GetSize(); + const SizeType rSize = region.GetSize(); m_NeedToUseBoundaryCondition = false; for (DimensionValueType i = 0; i < Dimension; ++i) @@ -278,7 +278,7 @@ ConstNeighborhoodIteratorWithOnlyIndex::IsAtEnd() const // is at the bound for that dimension. if (this->GetIndex()[Dimension - 1] > this->m_EndIndex[Dimension - 1]) { - ExceptionObject e(__FILE__, __LINE__); + ExceptionObject e(__FILE__, __LINE__); std::ostringstream msg; msg << "In method IsAtEnd, GetIndex()[Dimension - 1] = " << GetIndex()[Dimension - 1] << " is greater than m_EndIndex[Dimension - 1] = " << this->m_EndIndex[Dimension - 1] << std::endl @@ -403,9 +403,9 @@ template void ConstNeighborhoodIteratorWithOnlyIndex::SetBound(const SizeType & size) { - SizeType radius = this->GetRadius(); + SizeType radius = this->GetRadius(); const IndexType imageBRStart = m_ConstImage->GetBufferedRegion().GetIndex(); - SizeType imageBRSize = m_ConstImage->GetBufferedRegion().GetSize(); + SizeType imageBRSize = m_ConstImage->GetBufferedRegion().GetSize(); // Set the bounds and the wrapping offsets. Inner bounds are the loop // indices where the iterator will begin to overlap the edge of the image diff --git a/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.h b/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.h index 7a2a98f7ab0..2b6ed32c3dc 100644 --- a/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.h +++ b/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.h @@ -427,7 +427,7 @@ class ITK_TEMPLATE_EXPORT ConstShapedNeighborhoodIterator : private Neighborhood void DeactivateIndex(NeighborIndexType); - bool m_CenterIsActive{ false }; + bool m_CenterIsActive{ false }; IndexListType m_ActiveIndexList{}; }; } // namespace itk diff --git a/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.hxx b/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.hxx index 96545cb1216..b4617b31f5b 100644 --- a/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.hxx +++ b/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.hxx @@ -125,7 +125,7 @@ ConstShapedNeighborhoodIterator::CreateActiveListFro << neighborhood.GetRadius() << ')'); } typename Neighborhood::ConstIterator nit; - NeighborIndexType idx = 0; + NeighborIndexType idx = 0; for (nit = neighborhood.Begin(); nit != neighborhood.End(); ++nit, ++idx) { if (*nit) @@ -200,7 +200,7 @@ template ConstShapedNeighborhoodIterator & ConstShapedNeighborhoodIterator::operator--() { - unsigned int i; + unsigned int i; IndexListConstIterator it; // Repositioning neighborhood, previous bounds check on neighborhood @@ -258,9 +258,9 @@ template ConstShapedNeighborhoodIterator & ConstShapedNeighborhoodIterator::operator+=(const OffsetType & idx) { - unsigned int i; - IndexListConstIterator it; - OffsetValueType accumulator = 0; + unsigned int i; + IndexListConstIterator it; + OffsetValueType accumulator = 0; const OffsetValueType * stride = this->GetImagePointer()->GetOffsetTable(); // Repositioning neighborhood, previous bounds check on neighborhood @@ -312,9 +312,9 @@ template ConstShapedNeighborhoodIterator & ConstShapedNeighborhoodIterator::operator-=(const OffsetType & idx) { - unsigned int i; - IndexListConstIterator it; - OffsetValueType accumulator = 0; + unsigned int i; + IndexListConstIterator it; + OffsetValueType accumulator = 0; const OffsetValueType * stride = this->GetImagePointer()->GetOffsetTable(); // Repositioning neighborhood, previous bounds check on neighborhood diff --git a/Modules/Core/Common/include/itkConstantBoundaryImageNeighborhoodPixelAccessPolicy.h b/Modules/Core/Common/include/itkConstantBoundaryImageNeighborhoodPixelAccessPolicy.h index e455ecbf35e..364a5183480 100644 --- a/Modules/Core/Common/include/itkConstantBoundaryImageNeighborhoodPixelAccessPolicy.h +++ b/Modules/Core/Common/include/itkConstantBoundaryImageNeighborhoodPixelAccessPolicy.h @@ -114,11 +114,11 @@ class ConstantBoundaryImageNeighborhoodPixelAccessPolicy final /** Constructor called directly by the pixel proxy of * ShapedImageNeighborhoodRange. */ - ConstantBoundaryImageNeighborhoodPixelAccessPolicy(const ImageSizeType & imageSize, - const OffsetType & offsetTable, + ConstantBoundaryImageNeighborhoodPixelAccessPolicy(const ImageSizeType & imageSize, + const OffsetType & offsetTable, const NeighborhoodAccessorFunctorType & neighborhoodAccessor, - const IndexType & pixelIndex, - const PixelType constant = {}) noexcept + const IndexType & pixelIndex, + const PixelType constant = {}) noexcept : m_PixelIndexValue{ IsInside(pixelIndex, imageSize) ? CalculatePixelIndexValue(offsetTable, pixelIndex) : -1 } , m_NeighborhoodAccessor(neighborhoodAccessor) , m_Constant{ constant } diff --git a/Modules/Core/Common/include/itkCorrespondenceDataStructureIterator.h b/Modules/Core/Common/include/itkCorrespondenceDataStructureIterator.h index eee7c0ea89c..85e79787172 100644 --- a/Modules/Core/Common/include/itkCorrespondenceDataStructureIterator.h +++ b/Modules/Core/Common/include/itkCorrespondenceDataStructureIterator.h @@ -102,12 +102,12 @@ class ITK_TEMPLATE_EXPORT CorrespondenceDataStructureIterator protected: /** Is the iterator at the end of its walk? */ - bool m_IsAtEnd{}; - TStructureType * m_Structure{}; - ItemType * m_CorrespondingNodePointer{}; + bool m_IsAtEnd{}; + TStructureType * m_Structure{}; + ItemType * m_CorrespondingNodePointer{}; CorrespondingListType * m_CorrespondingListPointer{}; SecondaryNodeListType * m_SecondaryListPointer{}; - NodeListType * m_NodeListPointer{}; + NodeListType * m_NodeListPointer{}; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkDataObject.h b/Modules/Core/Common/include/itkDataObject.h index 6a2504c9196..7e0029657ee 100644 --- a/Modules/Core/Common/include/itkDataObject.h +++ b/Modules/Core/Common/include/itkDataObject.h @@ -557,7 +557,7 @@ class ITK_FORCE_EXPORT_MACRO(ITKCommon) DataObject : public Object private: /** Who generated this data? */ WeakPointer m_Source{}; - DataObjectIdentifierType m_SourceOutputName{}; + DataObjectIdentifierType m_SourceOutputName{}; /** When was this data last generated? * This time stamp is an integer number and it is intended to synchronize the diff --git a/Modules/Core/Common/include/itkDefaultVectorPixelAccessorFunctor.h b/Modules/Core/Common/include/itkDefaultVectorPixelAccessorFunctor.h index ec1d73022ea..0fdd24a2c89 100644 --- a/Modules/Core/Common/include/itkDefaultVectorPixelAccessorFunctor.h +++ b/Modules/Core/Common/include/itkDefaultVectorPixelAccessorFunctor.h @@ -112,7 +112,7 @@ class DefaultVectorPixelAccessorFunctor } private: - PixelAccessorType m_PixelAccessor; // The pixel accessor + PixelAccessorType m_PixelAccessor; // The pixel accessor InternalPixelType * m_Begin{ nullptr }; // Begin of the buffer }; } // namespace itk diff --git a/Modules/Core/Common/include/itkDerivativeOperator.hxx b/Modules/Core/Common/include/itkDerivativeOperator.hxx index 1aab4f718a3..db6ee174e81 100644 --- a/Modules/Core/Common/include/itkDerivativeOperator.hxx +++ b/Modules/Core/Common/include/itkDerivativeOperator.hxx @@ -26,12 +26,12 @@ template auto DerivativeOperator::GenerateCoefficients() -> CoefficientVector { - unsigned int i; - unsigned int j; - PixelRealType previous; - PixelRealType next; + unsigned int i; + unsigned int j; + PixelRealType previous; + PixelRealType next; const unsigned int w = 2 * ((m_Order + 1) / 2) + 1; - CoefficientVector coeff(w); + CoefficientVector coeff(w); coeff[w / 2] = 1.0; for (i = 0; i < m_Order / 2; ++i) diff --git a/Modules/Core/Common/include/itkDomainThreader.h b/Modules/Core/Common/include/itkDomainThreader.h index 13b9ea0a7e4..a760b398450 100644 --- a/Modules/Core/Common/include/itkDomainThreader.h +++ b/Modules/Core/Common/include/itkDomainThreader.h @@ -179,11 +179,11 @@ class ITK_TEMPLATE_EXPORT DomainThreader : public Object * the number allocated by the threader if the object does not split * well into that number. * This value is determined at the beginning of \c Execute(). */ - ThreadIdType m_NumberOfWorkUnitsUsed{ 0 }; - ThreadIdType m_NumberOfWorkUnits{}; + ThreadIdType m_NumberOfWorkUnitsUsed{ 0 }; + ThreadIdType m_NumberOfWorkUnits{}; typename DomainPartitionerType::Pointer m_DomainPartitioner{}; - DomainType m_CompleteDomain{}; - MultiThreaderBase::Pointer m_MultiThreader{}; + DomainType m_CompleteDomain{}; + MultiThreaderBase::Pointer m_MultiThreader{}; }; } // namespace itk diff --git a/Modules/Core/Common/include/itkDomainThreader.hxx b/Modules/Core/Common/include/itkDomainThreader.hxx index cfd3e01fe50..3817b9e2130 100644 --- a/Modules/Core/Common/include/itkDomainThreader.hxx +++ b/Modules/Core/Common/include/itkDomainThreader.hxx @@ -102,14 +102,14 @@ template ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION DomainThreader::ThreaderCallback(void * arg) { - auto * info = static_cast(arg); - auto * str = static_cast(info->UserData); - DomainThreader * thisDomainThreader = str->domainThreader; + auto * info = static_cast(arg); + auto * str = static_cast(info->UserData); + DomainThreader * thisDomainThreader = str->domainThreader; const ThreadIdType workUnitID = info->WorkUnitID; const ThreadIdType workUnitCount = info->NumberOfWorkUnits; // Get the sub-domain to process for this thread. - DomainType subdomain; + DomainType subdomain; const ThreadIdType total = thisDomainThreader->GetDomainPartitioner()->PartitionDomain( workUnitID, workUnitCount, thisDomainThreader->m_CompleteDomain, subdomain); diff --git a/Modules/Core/Common/include/itkEventObject.h b/Modules/Core/Common/include/itkEventObject.h index 6a41cc67695..905e5989ed3 100644 --- a/Modules/Core/Common/include/itkEventObject.h +++ b/Modules/Core/Common/include/itkEventObject.h @@ -147,7 +147,7 @@ operator<<(std::ostream & os, const EventObject & e) : super(s) {}; \ classname::~classname() {} \ const char * classname::GetEventName() const { return #classname; } \ - bool classname::CheckEvent(const itk::EventObject * e) const \ + bool classname::CheckEvent(const itk::EventObject * e) const \ { \ return (dynamic_cast(e) != nullptr); \ } \ diff --git a/Modules/Core/Common/include/itkExceptionObject.h b/Modules/Core/Common/include/itkExceptionObject.h index 4a33ba47d7b..473046df732 100644 --- a/Modules/Core/Common/include/itkExceptionObject.h +++ b/Modules/Core/Common/include/itkExceptionObject.h @@ -60,10 +60,10 @@ class ITKCommon_EXPORT ExceptionObject : public std::exception unsigned int lineNumber = 0, const char * desc = "None", const char * loc = "Unknown"); - explicit ExceptionObject(std::string file, + explicit ExceptionObject(std::string file, unsigned int lineNumber = 0, - std::string desc = "None", - std::string loc = "Unknown"); + std::string desc = "None", + std::string loc = "Unknown"); /** Copy-constructor. */ ExceptionObject(const ExceptionObject &) noexcept = default; diff --git a/Modules/Core/Common/include/itkExtractImageFilter.h b/Modules/Core/Common/include/itkExtractImageFilter.h index 1069ce756bc..8db52aed19a 100644 --- a/Modules/Core/Common/include/itkExtractImageFilter.h +++ b/Modules/Core/Common/include/itkExtractImageFilter.h @@ -49,7 +49,7 @@ class ExtractImageFilterEnums }; /** Define how to print enumerations */ extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const ExtractImageFilterEnums::DirectionCollapseStrategy value); +operator<<(std::ostream & out, const ExtractImageFilterEnums::DirectionCollapseStrategy value); /** \class ExtractImageFilter @@ -294,7 +294,7 @@ class ITK_TEMPLATE_EXPORT ExtractImageFilter : public InPlaceImageFilter::PrintSelf(std::ostream & os, Inde template void ExtractImageFilter::CallCopyOutputRegionToInputRegion( - InputImageRegionType & destRegion, + InputImageRegionType & destRegion, const OutputImageRegionType & srcRegion) { const ExtractImageFilterRegionCopierType extractImageRegionCopier; @@ -62,8 +62,8 @@ ExtractImageFilter::SetExtractionRegion(InputImageReg "InputImageDimension must be greater than OutputImageDimension"); m_ExtractionRegion = extractRegion; - InputImageSizeType inputSize = extractRegion.GetSize(); - OutputImageSizeType outputSize{}; + InputImageSizeType inputSize = extractRegion.GetSize(); + OutputImageSizeType outputSize{}; OutputImageIndexType outputIndex{}; /** @@ -105,7 +105,7 @@ ExtractImageFilter::GenerateOutputInformation() // this filter allows the input and the output to be of different dimensions // get pointers to the input and output - const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); + const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); const typename Superclass::InputImageConstPointer inputPtr = this->GetInput(); if (!outputPtr || !inputPtr) @@ -123,13 +123,13 @@ ExtractImageFilter::GenerateOutputInformation() // This logic needs to be augmented with logic that select which // dimensions to copy - const typename InputImageType::SpacingType & inputSpacing = inputPtr->GetSpacing(); + const typename InputImageType::SpacingType & inputSpacing = inputPtr->GetSpacing(); const typename InputImageType::DirectionType & inputDirection = inputPtr->GetDirection(); - const typename InputImageType::PointType & inputOrigin = inputPtr->GetOrigin(); + const typename InputImageType::PointType & inputOrigin = inputPtr->GetOrigin(); - typename OutputImageType::SpacingType outputSpacing; + typename OutputImageType::SpacingType outputSpacing; typename OutputImageType::DirectionType outputDirection; - typename OutputImageType::PointType outputOrigin{}; + typename OutputImageType::PointType outputOrigin{}; if (static_cast(OutputImageDimension) > static_cast(InputImageDimension)) { @@ -268,7 +268,7 @@ ExtractImageFilter::DynamicThreadedGenerateData( itkDebugMacro("Actually executing"); const InputImageType * inputPtr = this->GetInput(); - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); // Define the portion of the input to walk for this thread diff --git a/Modules/Core/Common/include/itkExtractImageFilterRegionCopier.h b/Modules/Core/Common/include/itkExtractImageFilterRegionCopier.h index e2e3ccba324..e31fa57d0a5 100644 --- a/Modules/Core/Common/include/itkExtractImageFilterRegionCopier.h +++ b/Modules/Core/Common/include/itkExtractImageFilterRegionCopier.h @@ -41,8 +41,8 @@ template void ExtractImageFilterCopyRegion( const typename BinaryUnsignedIntDispatch::FirstEqualsSecondType & firstEqualsSecond, - ImageRegion & destRegion, - const ImageRegion & srcRegion, + ImageRegion & destRegion, + const ImageRegion & srcRegion, const ImageRegion &) { ImageToImageFilterDefaultCopyRegion(firstEqualsSecond, destRegion, srcRegion); @@ -55,9 +55,9 @@ template void ExtractImageFilterCopyRegion( const typename BinaryUnsignedIntDispatch::FirstLessThanSecondType & firstLessThanSecond, - ImageRegion & destRegion, - const ImageRegion & srcRegion, - const ImageRegion & itkNotUsed(totalInputExtractionRegion)) + ImageRegion & destRegion, + const ImageRegion & srcRegion, + const ImageRegion & itkNotUsed(totalInputExtractionRegion)) { ImageToImageFilterDefaultCopyRegion(firstLessThanSecond, destRegion, srcRegion); } @@ -81,7 +81,7 @@ ExtractImageFilterCopyRegion( template void ExtractImageFilterCopyRegion(const typename BinaryUnsignedIntDispatch::FirstGreaterThanSecondType &, - ImageRegion & destRegion, + ImageRegion & destRegion, const ImageRegion & srcRegion, const ImageRegion & totalInputExtractionRegion) { @@ -90,11 +90,11 @@ ExtractImageFilterCopyRegion(const typename BinaryUnsignedIntDispatch::F // With these values, lock the destRegion.Index to the corresponding index unsigned int dim; - Index destIndex; - Size destSize; + Index destIndex; + Size destSize; const Index & srcIndex = srcRegion.GetIndex(); - const Size & srcSize = srcRegion.GetSize(); - int count = 0; + const Size & srcSize = srcRegion.GetSize(); + int count = 0; for (dim = 0; dim < T1; ++dim) { // for dimensions to be removed @@ -141,7 +141,7 @@ class ITK_TEMPLATE_EXPORT ExtractImageFilterRegionCopier : public ImageRegionCop { public: virtual void - operator()(ImageRegion & destRegion, + operator()(ImageRegion & destRegion, const ImageRegion & srcRegion, const ImageRegion & totalInputExtractionRegion) const { diff --git a/Modules/Core/Common/include/itkFactoryTestLib.h b/Modules/Core/Common/include/itkFactoryTestLib.h index 5781d4cab76..cad72214538 100644 --- a/Modules/Core/Common/include/itkFactoryTestLib.h +++ b/Modules/Core/Common/include/itkFactoryTestLib.h @@ -29,7 +29,7 @@ extern "C" { ITK_ABI_EXPORT itk::ObjectFactoryBase * - itkLoad(); + itkLoad(); } #endif diff --git a/Modules/Core/Common/include/itkFloatingPointExceptions.h b/Modules/Core/Common/include/itkFloatingPointExceptions.h index fd2f0ce2564..18231819c18 100644 --- a/Modules/Core/Common/include/itkFloatingPointExceptions.h +++ b/Modules/Core/Common/include/itkFloatingPointExceptions.h @@ -41,7 +41,7 @@ class FloatingPointExceptionsEnums }; // Define how to print enumeration extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const FloatingPointExceptionsEnums::ExceptionAction value); +operator<<(std::ostream & out, const FloatingPointExceptionsEnums::ExceptionAction value); /** \class FloatingPointExceptions * \brief Allows floating point exceptions to be caught during program execution. diff --git a/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.h b/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.h index 32f66e08d9b..6c933056535 100644 --- a/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.h +++ b/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.h @@ -83,8 +83,8 @@ class ITK_TEMPLATE_EXPORT FloodFilledFunctionConditionalConstIterator : public C /** Constructor establishes an iterator to walk a particular image and a * particular region of that image. This version of the constructor uses * a list of seed pixels for the flood fill */ - FloodFilledFunctionConditionalConstIterator(const ImageType * imagePtr, - FunctionType * fnPtr, + FloodFilledFunctionConditionalConstIterator(const ImageType * imagePtr, + FunctionType * fnPtr, std::vector & startIndex); /** Constructor establishes an iterator to walk a particular image and a diff --git a/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.hxx b/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.hxx index d64a316af3b..0209ca30f27 100644 --- a/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.hxx +++ b/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.hxx @@ -25,8 +25,8 @@ namespace itk template FloodFilledFunctionConditionalConstIterator::FloodFilledFunctionConditionalConstIterator( const ImageType * imagePtr, - FunctionType * fnPtr, - IndexType startIndex) + FunctionType * fnPtr, + IndexType startIndex) { this->m_Image = imagePtr; m_Function = fnPtr; @@ -38,8 +38,8 @@ FloodFilledFunctionConditionalConstIterator::FloodFilledFunct template FloodFilledFunctionConditionalConstIterator::FloodFilledFunctionConditionalConstIterator( - const ImageType * imagePtr, - FunctionType * fnPtr, + const ImageType * imagePtr, + FunctionType * fnPtr, std::vector & startIndex) { this->m_Image = imagePtr; @@ -57,7 +57,7 @@ FloodFilledFunctionConditionalConstIterator::FloodFilledFunct template FloodFilledFunctionConditionalConstIterator::FloodFilledFunctionConditionalConstIterator( const ImageType * imagePtr, - FunctionType * fnPtr) + FunctionType * fnPtr) { this->m_Image = imagePtr; m_Function = fnPtr; diff --git a/Modules/Core/Common/include/itkFloodFilledImageFunctionConditionalConstIterator.h b/Modules/Core/Common/include/itkFloodFilledImageFunctionConditionalConstIterator.h index 68d50ab1b8c..531d2f8bd44 100644 --- a/Modules/Core/Common/include/itkFloodFilledImageFunctionConditionalConstIterator.h +++ b/Modules/Core/Common/include/itkFloodFilledImageFunctionConditionalConstIterator.h @@ -77,16 +77,16 @@ class ITK_TEMPLATE_EXPORT FloodFilledImageFunctionConditionalConstIterator * particular region of that image. This version of the constructor uses * an explicit seed pixel for the flood fill, the "startIndex" */ FloodFilledImageFunctionConditionalConstIterator(const ImageType * imagePtr, - FunctionType * fnPtr, - IndexType startIndex) + FunctionType * fnPtr, + IndexType startIndex) : Superclass(imagePtr, fnPtr, startIndex) {} /** Constructor establishes an iterator to walk a particular image and a * particular region of that image. This version of the constructor uses * an explicit list of seed pixels for the flood fill, the "startIndex" */ - FloodFilledImageFunctionConditionalConstIterator(const ImageType * imagePtr, - FunctionType * fnPtr, + FloodFilledImageFunctionConditionalConstIterator(const ImageType * imagePtr, + FunctionType * fnPtr, std::vector & startIndex) : Superclass(imagePtr, fnPtr, startIndex) {} diff --git a/Modules/Core/Common/include/itkFloodFilledImageFunctionConditionalIterator.h b/Modules/Core/Common/include/itkFloodFilledImageFunctionConditionalIterator.h index a2d1b721ec4..ee198cdb6aa 100644 --- a/Modules/Core/Common/include/itkFloodFilledImageFunctionConditionalIterator.h +++ b/Modules/Core/Common/include/itkFloodFilledImageFunctionConditionalIterator.h @@ -86,8 +86,8 @@ class FloodFilledImageFunctionConditionalIterator /** Constructor establishes an iterator to walk a particular image and a * particular region of that image. This version of the constructor uses * an explicit list of seed pixels for the flood fill, the "startIndex" */ - FloodFilledImageFunctionConditionalIterator(ImageType * imagePtr, - FunctionType * fnPtr, + FloodFilledImageFunctionConditionalIterator(ImageType * imagePtr, + FunctionType * fnPtr, std::vector & startIndex) : Superclass(imagePtr, fnPtr, startIndex) {} diff --git a/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.h b/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.h index 889ed6374e7..44390926a2d 100644 --- a/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.h +++ b/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.h @@ -71,8 +71,8 @@ class ITK_TEMPLATE_EXPORT FloodFilledSpatialFunctionConditionalConstIterator * particular region of that image. This version of the constructor uses * an explicit seed pixel for the flood fill, the "startIndex" */ FloodFilledSpatialFunctionConditionalConstIterator(const ImageType * imagePtr, - FunctionType * fnPtr, - IndexType startIndex); + FunctionType * fnPtr, + IndexType startIndex); /** Constructor establishes an iterator to walk a particular image and a * particular region of that image. This version of the constructor diff --git a/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.hxx b/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.hxx index f92b4b9a143..6daf85aa0ce 100644 --- a/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.hxx +++ b/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.hxx @@ -24,8 +24,8 @@ namespace itk template FloodFilledSpatialFunctionConditionalConstIterator:: FloodFilledSpatialFunctionConditionalConstIterator(const ImageType * imagePtr, - FunctionType * fnPtr, - IndexType startIndex) + FunctionType * fnPtr, + IndexType startIndex) : Superclass(imagePtr, fnPtr, startIndex) { // The default inclusion strategy is "center" @@ -109,10 +109,10 @@ FloodFilledSpatialFunctionConditionalConstIterator::IsPixelIn // means of determining index inclusion. // To reiterate... DO NOT use this on images higher than 16D - unsigned int counter; - unsigned int counterCopy; + unsigned int counter; + unsigned int counterCopy; const unsigned int dim = TImage::ImageDimension; - auto numReps = static_cast(std::pow(2.0, static_cast(dim))); + auto numReps = static_cast(std::pow(2.0, static_cast(dim))); IndexType tempIndex; @@ -154,11 +154,11 @@ FloodFilledSpatialFunctionConditionalConstIterator::IsPixelIn // generated indices are true // To reiterate... DO NOT use this on images higher than 16D - unsigned int counter; - unsigned int counterCopy; + unsigned int counter; + unsigned int counterCopy; const unsigned int dim = TImage::ImageDimension; - auto numReps = static_cast(std::pow(2.0, static_cast(dim))); - IndexType tempIndex; + auto numReps = static_cast(std::pow(2.0, static_cast(dim))); + IndexType tempIndex; // First we loop over the binary counter for (counter = 0; counter < numReps; ++counter) diff --git a/Modules/Core/Common/include/itkFrustumSpatialFunction.h b/Modules/Core/Common/include/itkFrustumSpatialFunction.h index a436e4d204f..25d855a41e7 100644 --- a/Modules/Core/Common/include/itkFrustumSpatialFunction.h +++ b/Modules/Core/Common/include/itkFrustumSpatialFunction.h @@ -42,7 +42,7 @@ class FrustumSpatialFunctionEnums }; }; extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const FrustumSpatialFunctionEnums::RotationPlane value); +operator<<(std::ostream & out, const FrustumSpatialFunctionEnums::RotationPlane value); /** @@ -132,12 +132,12 @@ class ITK_TEMPLATE_EXPORT FrustumSpatialFunction : public InteriorExteriorSpatia PrintSelf(std::ostream & os, Indent indent) const override; private: - InputType m_Apex{}; - double m_AngleZ{ 0.0f }; - double m_ApertureAngleX{ 0.0f }; - double m_ApertureAngleY{ 0.0f }; - double m_TopPlane{ 0.0f }; - double m_BottomPlane{ 0.0f }; + InputType m_Apex{}; + double m_AngleZ{ 0.0f }; + double m_ApertureAngleX{ 0.0f }; + double m_ApertureAngleY{ 0.0f }; + double m_TopPlane{ 0.0f }; + double m_BottomPlane{ 0.0f }; FrustumRotationPlaneType m_RotationPlane{ RotationPlaneEnum::RotateInXZPlane }; }; diff --git a/Modules/Core/Common/include/itkFrustumSpatialFunction.hxx b/Modules/Core/Common/include/itkFrustumSpatialFunction.hxx index 3fb38055e52..b3bcf2779c7 100644 --- a/Modules/Core/Common/include/itkFrustumSpatialFunction.hxx +++ b/Modules/Core/Common/include/itkFrustumSpatialFunction.hxx @@ -30,7 +30,7 @@ FrustumSpatialFunction::Evaluate(const InputType & position) static_assert(VDimension > 2, "VDimension must be greater than 2"); static_assert(PointType::PointDimension > 2, "PointDimension of TInput must be greater than 2"); - VectorType relativePosition = position - m_Apex; + VectorType relativePosition = position - m_Apex; const double distanceToApex = relativePosition.GetNorm(); // Check Top and Bottom planes. If the angle is negative, the top plane diff --git a/Modules/Core/Common/include/itkGaussianDerivativeOperator.h b/Modules/Core/Common/include/itkGaussianDerivativeOperator.h index 54fe0a314b5..1b3f51fa749 100644 --- a/Modules/Core/Common/include/itkGaussianDerivativeOperator.h +++ b/Modules/Core/Common/include/itkGaussianDerivativeOperator.h @@ -46,7 +46,7 @@ class GaussianDerivativeOperatorEnums }; // Define how to print enumeration extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, GaussianDerivativeOperatorEnums::InterpolationMode value); +operator<<(std::ostream & out, GaussianDerivativeOperatorEnums::InterpolationMode value); /** * \class GaussianDerivativeOperator @@ -171,7 +171,7 @@ class ITK_TEMPLATE_EXPORT GaussianDerivativeOperator : public NeighborhoodOperat SetMaximumError(const double maxerror) { constexpr double Min = 0.00001; - const double Max = 1.0 - Min; + const double Max = 1.0 - Min; m_MaximumError = std::clamp(maxerror, Min, Max); } diff --git a/Modules/Core/Common/include/itkGaussianDerivativeOperator.hxx b/Modules/Core/Common/include/itkGaussianDerivativeOperator.hxx index 4e9710bdf53..935bdeb2930 100644 --- a/Modules/Core/Common/include/itkGaussianDerivativeOperator.hxx +++ b/Modules/Core/Common/include/itkGaussianDerivativeOperator.hxx @@ -195,7 +195,7 @@ template double GaussianDerivativeOperator::ModifiedBesselI1(double y) { - double accumulator; + double accumulator; const double d = itk::Math::abs(y); if (d < 3.75) { @@ -245,8 +245,8 @@ GaussianDerivativeOperator::ModifiedBesselI(int else { const double toy = 2.0 / itk::Math::abs(y); - double qip = accumulator = 0.0; - double qi = 1.0; + double qip = accumulator = 0.0; + double qi = 1.0; for (int j = 2 * (n + static_cast(DIGITS * std::sqrt(static_cast(n)))); j > 0; j--) { const double qim = qip + j * toy * qi; diff --git a/Modules/Core/Common/include/itkGaussianOperator.hxx b/Modules/Core/Common/include/itkGaussianOperator.hxx index ee29df90f51..671c90efd83 100644 --- a/Modules/Core/Common/include/itkGaussianOperator.hxx +++ b/Modules/Core/Common/include/itkGaussianOperator.hxx @@ -28,7 +28,7 @@ GaussianOperator::GenerateCoefficients() -> Coef const double et = std::exp(-m_Variance); // Create the kernel coefficients as a std::vector - double sum = 0.0; + double sum = 0.0; CoefficientVector coeff; coeff.push_back(et * ModifiedBesselI0(m_Variance)); sum += coeff[0]; @@ -76,7 +76,7 @@ double GaussianOperator::ModifiedBesselI0(double y) { const double d = itk::Math::abs(y); - double accumulator; + double accumulator; if (d < 3.75) { @@ -105,7 +105,7 @@ double GaussianOperator::ModifiedBesselI1(double y) { const double d = itk::Math::abs(y); - double accumulator; + double accumulator; if (d < 3.75) { @@ -155,9 +155,9 @@ GaussianOperator::ModifiedBesselI(int n, double else { const double toy = 2.0 / itk::Math::abs(y); - double qip = 0.0; - double accumulator = 0.0; - double qi = 1.0; + double qip = 0.0; + double accumulator = 0.0; + double qi = 1.0; for (int j = 2 * (n + static_cast(std::sqrt(ACCURACY * n))); j > 0; j--) { diff --git a/Modules/Core/Common/include/itkHexahedronCell.h b/Modules/Core/Common/include/itkHexahedronCell.h index 6c5a6fa6cca..c83334fe151 100644 --- a/Modules/Core/Common/include/itkHexahedronCell.h +++ b/Modules/Core/Common/include/itkHexahedronCell.h @@ -162,10 +162,10 @@ class ITK_TEMPLATE_EXPORT HexahedronCell void InterpolationFunctions(CoordinateType pcoords[Self::CellDimension], InterpolationWeightType sf[Self::NumberOfPoints]); void - EvaluateLocation(int & itkNotUsed(subId), - PointsContainer * points, - CoordinateType pcoords[Self::CellDimension], - CoordinateType x[Self::CellDimension], + EvaluateLocation(int & itkNotUsed(subId), + PointsContainer * points, + CoordinateType pcoords[Self::CellDimension], + CoordinateType x[Self::CellDimension], InterpolationWeightType * weights); public: diff --git a/Modules/Core/Common/include/itkHexahedronCell.hxx b/Modules/Core/Common/include/itkHexahedronCell.hxx index 093fc1f96f5..e0ce4671798 100644 --- a/Modules/Core/Common/include/itkHexahedronCell.hxx +++ b/Modules/Core/Common/include/itkHexahedronCell.hxx @@ -97,9 +97,9 @@ HexahedronCell::GetNumberOfBoundaryFeatures(int dimension) const */ template bool -HexahedronCell::GetBoundaryFeature(int dimension, +HexahedronCell::GetBoundaryFeature(int dimension, CellFeatureIdentifier featureId, - CellAutoPointer & cellPointer) + CellAutoPointer & cellPointer) { switch (dimension) { @@ -164,7 +164,7 @@ template void HexahedronCell::SetPointIds(PointIdConstIterator first, PointIdConstIterator last) { - int localId = 0; + int localId = 0; PointIdConstIterator ii(first); while (ii != last) @@ -320,11 +320,11 @@ HexahedronCell::GetFace(CellFeatureIdentifier faceId, FaceAutoPo /** Evaluate the position inside the cell */ template bool -HexahedronCell::EvaluatePosition(CoordinateType * x, - PointsContainer * points, - CoordinateType * closestPoint, - CoordinateType pcoord[], - double * dist2, +HexahedronCell::EvaluatePosition(CoordinateType * x, + PointsContainer * points, + CoordinateType * closestPoint, + CoordinateType pcoord[], + double * dist2, InterpolationWeightType * weight) { // Throw an exception if trying to EvaluatePosition for anything other than @@ -335,15 +335,15 @@ HexahedronCell::EvaluatePosition(CoordinateType * x, // return false; } - static constexpr int ITK_HEX_MAX_ITERATION = 10; + static constexpr int ITK_HEX_MAX_ITERATION = 10; static constexpr double ITK_HEX_CONVERGED = 1.e-03; static constexpr double ITK_DIVERGED = 1.e6; - CoordinateType derivs[CellDimension3D * Self::NumberOfPoints]{ 0 }; + CoordinateType derivs[CellDimension3D * Self::NumberOfPoints]{ 0 }; InterpolationWeightType weights[Self::NumberOfPoints]; // set initial position for Newton's method - int subId{ 0 }; + int subId{ 0 }; CoordinateType pcoords[CellDimension3D]{ 0.5, 0.5, 0.5 }; // NOTE: Avoid compiler warning. The code below only runs if PointType::Dimension == Self::PointDimension3D @@ -533,7 +533,7 @@ HexahedronCell::EvaluatePosition(CoordinateType * x, /** Compute iso-parametric interpolation functions */ template void -HexahedronCell::InterpolationFunctions(CoordinateType pcoords[Self::CellDimension], +HexahedronCell::InterpolationFunctions(CoordinateType pcoords[Self::CellDimension], InterpolationWeightType sf[Self::NumberOfPoints]) { // Throw an exception if trying to EvaluatePosition for anything other than @@ -653,10 +653,10 @@ HexahedronCell::InterpolationDerivs(CoordinateType pcoords[Self: /** Evaluate the location inside the cell */ template void -HexahedronCell::EvaluateLocation(int & itkNotUsed(subId), - PointsContainer * points, - CoordinateType pcoords[Self::CellDimension], - CoordinateType x[Self::CellDimension], +HexahedronCell::EvaluateLocation(int & itkNotUsed(subId), + PointsContainer * points, + CoordinateType pcoords[Self::CellDimension], + CoordinateType x[Self::CellDimension], InterpolationWeightType * weights) { // Throw an exception if trying to EvaluatePosition for anything other than diff --git a/Modules/Core/Common/include/itkImageAlgorithm.h b/Modules/Core/Common/include/itkImageAlgorithm.h index 8f072948707..9d0ee792124 100644 --- a/Modules/Core/Common/include/itkImageAlgorithm.h +++ b/Modules/Core/Common/include/itkImageAlgorithm.h @@ -68,9 +68,9 @@ struct ImageAlgorithm */ template static void - Copy(const InputImageType * inImage, - OutputImageType * outImage, - const typename InputImageType::RegionType & inRegion, + Copy(const InputImageType * inImage, + OutputImageType * outImage, + const typename InputImageType::RegionType & inRegion, const typename OutputImageType::RegionType & outRegion) { ImageAlgorithm::DispatchedCopy(inImage, outImage, inRegion, outRegion); @@ -79,8 +79,8 @@ struct ImageAlgorithm /// \cond HIDE_SPECIALIZATION_DOCUMENTATION template static void - Copy(const Image * inImage, - Image * outImage, + Copy(const Image * inImage, + Image * outImage, const typename Image::RegionType & inRegion, const typename Image::RegionType & outRegion) { @@ -96,8 +96,8 @@ struct ImageAlgorithm template static void - Copy(const VectorImage * inImage, - VectorImage * outImage, + Copy(const VectorImage * inImage, + VectorImage * outImage, const typename VectorImage::RegionType & inRegion, const typename VectorImage::RegionType & outRegion) { @@ -122,15 +122,15 @@ struct ImageAlgorithm template static typename OutputImageType::RegionType EnlargeRegionOverBox(const typename InputImageType::RegionType & inputRegion, - const InputImageType * inputImage, - const OutputImageType * outputImage); + const InputImageType * inputImage, + const OutputImageType * outputImage); template static typename OutputImageType::RegionType EnlargeRegionOverBox(const typename InputImageType::RegionType & inputRegion, - const InputImageType * inputImage, - const OutputImageType * outputImage, - const TransformType * transform); + const InputImageType * inputImage, + const OutputImageType * outputImage, + const TransformType * transform); private: /** This is an optimized method which requires the input and @@ -139,20 +139,20 @@ struct ImageAlgorithm */ template static void - DispatchedCopy(const InputImageType * inImage, - OutputImageType * outImage, - const typename InputImageType::RegionType & inRegion, + DispatchedCopy(const InputImageType * inImage, + OutputImageType * outImage, + const typename InputImageType::RegionType & inRegion, const typename OutputImageType::RegionType & outRegion, - TrueType isSpecialized); + TrueType isSpecialized); /** this is the reference image iterator implementation */ template static void - DispatchedCopy(const InputImageType * inImage, - OutputImageType * outImage, - const typename InputImageType::RegionType & inRegion, + DispatchedCopy(const InputImageType * inImage, + OutputImageType * outImage, + const typename InputImageType::RegionType & inRegion, const typename OutputImageType::RegionType & outRegion, - FalseType isSpecialized = FalseType()); + FalseType isSpecialized = FalseType()); /** A utility class to get the number of internal pixels to make up diff --git a/Modules/Core/Common/include/itkImageAlgorithm.hxx b/Modules/Core/Common/include/itkImageAlgorithm.hxx index 5bf85f8564d..b1cc34dbcec 100644 --- a/Modules/Core/Common/include/itkImageAlgorithm.hxx +++ b/Modules/Core/Common/include/itkImageAlgorithm.hxx @@ -28,16 +28,16 @@ namespace itk template void -ImageAlgorithm::DispatchedCopy(const InputImageType * inImage, - OutputImageType * outImage, - const typename InputImageType::RegionType & inRegion, +ImageAlgorithm::DispatchedCopy(const InputImageType * inImage, + OutputImageType * outImage, + const typename InputImageType::RegionType & inRegion, const typename OutputImageType::RegionType & outRegion, FalseType) { if (inRegion.GetSize()[0] == outRegion.GetSize()[0]) { itk::ImageScanlineConstIterator it(inImage, inRegion); - itk::ImageScanlineIterator ot(outImage, outRegion); + itk::ImageScanlineIterator ot(outImage, outRegion); while (!it.IsAtEnd()) { @@ -54,7 +54,7 @@ ImageAlgorithm::DispatchedCopy(const InputImageType * inIm } itk::ImageRegionConstIterator it(inImage, inRegion); - itk::ImageRegionIterator ot(outImage, outRegion); + itk::ImageRegionIterator ot(outImage, outRegion); while (!it.IsAtEnd()) { @@ -66,9 +66,9 @@ ImageAlgorithm::DispatchedCopy(const InputImageType * inIm template void -ImageAlgorithm::DispatchedCopy(const InputImageType * inImage, - OutputImageType * outImage, - const typename InputImageType::RegionType & inRegion, +ImageAlgorithm::DispatchedCopy(const InputImageType * inImage, + OutputImageType * outImage, + const typename InputImageType::RegionType & inRegion, const typename OutputImageType::RegionType & outRegion, TrueType) { @@ -88,13 +88,13 @@ ImageAlgorithm::DispatchedCopy(const InputImageType * inIm } const typename InputImageType::InternalPixelType * in = inImage->GetBufferPointer(); - typename OutputImageType::InternalPixelType * out = outImage->GetBufferPointer(); + typename OutputImageType::InternalPixelType * out = outImage->GetBufferPointer(); const _RegionType & inBufferedRegion = inImage->GetBufferedRegion(); const _RegionType & outBufferedRegion = outImage->GetBufferedRegion(); // Compute the number of continuous pixel which can be copied. - size_t numberOfPixel = 1; + size_t numberOfPixel = 1; unsigned int movingDirection = 0; do { @@ -131,7 +131,7 @@ ImageAlgorithm::DispatchedCopy(const InputImageType * inIm } const typename InputImageType::InternalPixelType * inBuffer = in + inOffset * NumberOfInternalComponents; - typename OutputImageType::InternalPixelType * outBuffer = out + outOffset * NumberOfInternalComponents; + typename OutputImageType::InternalPixelType * outBuffer = out + outOffset * NumberOfInternalComponents; CopyHelper(inBuffer, inBuffer + sizeOfChunkInInternalComponents, outBuffer); @@ -170,8 +170,8 @@ ImageAlgorithm::DispatchedCopy(const InputImageType * inIm template typename OutputImageType::RegionType ImageAlgorithm::EnlargeRegionOverBox(const typename InputImageType::RegionType & inputRegion, - const InputImageType * inputImage, - const OutputImageType * outputImage) + const InputImageType * inputImage, + const OutputImageType * outputImage) { class DummyTransform { @@ -190,9 +190,9 @@ ImageAlgorithm::EnlargeRegionOverBox(const typename InputImageType::RegionType & template typename OutputImageType::RegionType ImageAlgorithm::EnlargeRegionOverBox(const typename InputImageType::RegionType & inputRegion, - const InputImageType * inputImage, - const OutputImageType * outputImage, - const TransformType * transform) + const InputImageType * inputImage, + const OutputImageType * outputImage, + const TransformType * transform) { typename OutputImageType::RegionType outputRegion; @@ -217,7 +217,7 @@ ImageAlgorithm::EnlargeRegionOverBox(const typename InputImageType::RegionType & for (unsigned int count = 0; count < numberOfInputCorners; ++count) { ContinuousInputIndexType currentInputCornerIndex{}; - unsigned int localCount = count; + unsigned int localCount = count; // For each dimension, set the current index to either // the highest or lowest index along this dimension. diff --git a/Modules/Core/Common/include/itkImageBase.h b/Modules/Core/Common/include/itkImageBase.h index c4d840da9ec..e5552c03bc4 100644 --- a/Modules/Core/Common/include/itkImageBase.h +++ b/Modules/Core/Common/include/itkImageBase.h @@ -404,7 +404,7 @@ class ITK_TEMPLATE_EXPORT ImageBase : public DataObject inline IndexType ComputeIndex(OffsetValueType offset) const { - IndexType index; + IndexType index; const IndexType & bufferedRegionIndex = this->GetBufferedRegion().GetIndex(); ImageHelper::ComputeIndex(bufferedRegionIndex, offset, m_OffsetTable, index); @@ -536,7 +536,7 @@ class ITK_TEMPLATE_EXPORT ImageBase : public DataObject * \sa Transform */ template ITK_NODISCARD("Call the overload which has the point as the only parameter and returns the index") - bool TransformPhysicalPointToContinuousIndex(const Point & point, + bool TransformPhysicalPointToContinuousIndex(const Point & point, ContinuousIndex & index) const { index = TransformPhysicalPointToContinuousIndex(point); @@ -553,7 +553,7 @@ class ITK_TEMPLATE_EXPORT ImageBase : public DataObject template void TransformContinuousIndexToPhysicalPoint(const ContinuousIndex & index, - Point & point) const + Point & point) const { for (unsigned int r = 0; r < VImageDimension; ++r) { @@ -629,7 +629,7 @@ class ITK_TEMPLATE_EXPORT ImageBase : public DataObject template void TransformLocalVectorToPhysicalVector(const FixedArray & inputGradient, - FixedArray & outputGradient) const + FixedArray & outputGradient) const { const DirectionType & direction = this->GetDirection(); @@ -678,7 +678,7 @@ class ITK_TEMPLATE_EXPORT ImageBase : public DataObject template void TransformPhysicalVectorToLocalVector(const FixedArray & inputGradient, - FixedArray & outputGradient) const + FixedArray & outputGradient) const { const DirectionType & inverseDirection = this->GetInverseDirection(); @@ -800,8 +800,8 @@ class ITK_TEMPLATE_EXPORT ImageBase : public DataObject */ bool IsSameImageGeometryAs(const ImageBase * otherImage, - double coordinateTolerance = DefaultImageCoordinateTolerance, - double directionTolerance = DefaultImageDirectionTolerance) const; + double coordinateTolerance = DefaultImageCoordinateTolerance, + double directionTolerance = DefaultImageDirectionTolerance) const; /** INTERNAL This method is used internally by filters to copy meta-data from * the output to the input. Users should not have a need to use this method. @@ -851,8 +851,8 @@ class ITK_TEMPLATE_EXPORT ImageBase : public DataObject /** Origin, spacing, and direction in physical coordinates. This variables are * protected for efficiency. They are referenced frequently by * inner loop calculations. */ - SpacingType m_Spacing{ MakeFilled(1.0) }; - PointType m_Origin{}; + SpacingType m_Spacing{ MakeFilled(1.0) }; + PointType m_Origin{}; DirectionType m_Direction{ DirectionType::GetIdentity() }; DirectionType m_InverseDirection{ DirectionType::GetIdentity() }; @@ -901,7 +901,7 @@ class ITK_TEMPLATE_EXPORT ImageBase : public DataObject IndexType FastComputeIndex(OffsetValueType offset) const { - IndexType index; + IndexType index; const IndexType & bufferedRegionIndex = Self::GetBufferedRegion().GetIndex(); ImageHelper::ComputeIndex(bufferedRegionIndex, offset, m_OffsetTable, index); return index; diff --git a/Modules/Core/Common/include/itkImageBase.hxx b/Modules/Core/Common/include/itkImageBase.hxx index 0909730472f..de5955dab2e 100644 --- a/Modules/Core/Common/include/itkImageBase.hxx +++ b/Modules/Core/Common/include/itkImageBase.hxx @@ -189,7 +189,7 @@ void ImageBase::ComputeOffsetTable() { // vxl_uint_64 num=1; - OffsetValueType num = 1; + OffsetValueType num = 1; const SizeType & bufferSize = this->GetBufferedRegion().GetSize(); // m_OffsetTable[0] = (OffsetValueType)num; @@ -396,8 +396,8 @@ ImageBase::VerifyRequestedRegion() template bool ImageBase::IsCongruentImageGeometry(const ImageBase * otherImage, - double coordinateTolerance, - double directionTolerance) const + double coordinateTolerance, + double directionTolerance) const { // check that the image occupy the same physical space, and that // each index is at the same physical location @@ -416,8 +416,8 @@ ImageBase::IsCongruentImageGeometry(const ImageBase * otherImag template bool ImageBase::IsSameImageGeometryAs(const ImageBase * otherImage, - double coordinateTolerance, - double directionTolerance) const + double coordinateTolerance, + double directionTolerance) const { return this->IsCongruentImageGeometry(otherImage, coordinateTolerance, directionTolerance) && this->GetLargestPossibleRegion() == otherImage->GetLargestPossibleRegion(); diff --git a/Modules/Core/Common/include/itkImageBoundaryCondition.h b/Modules/Core/Common/include/itkImageBoundaryCondition.h index b2957e4814f..b98840b77db 100644 --- a/Modules/Core/Common/include/itkImageBoundaryCondition.h +++ b/Modules/Core/Common/include/itkImageBoundaryCondition.h @@ -93,16 +93,16 @@ class ITK_TEMPLATE_EXPORT ImageBoundaryCondition * the nearest image border pixel, and a neighborhood of pointers to pixel * values in the image. */ virtual OutputPixelType - operator()(const OffsetType & point_index, - const OffsetType & boundary_offset, + operator()(const OffsetType & point_index, + const OffsetType & boundary_offset, const NeighborhoodType * data) const = 0; /** Computes and returns the appropriate pixel value from * neighborhood iterator data, using the functor. */ virtual OutputPixelType - operator()(const OffsetType & point_index, - const OffsetType & boundary_offset, - const NeighborhoodType * data, + operator()(const OffsetType & point_index, + const OffsetType & boundary_offset, + const NeighborhoodType * data, const NeighborhoodAccessorFunctorType & neighborhoodAccessorFunctor) const = 0; virtual ~ImageBoundaryCondition() = default; @@ -129,7 +129,7 @@ class ITK_TEMPLATE_EXPORT ImageBoundaryCondition * pixel values in the outputRequestedRegion. */ virtual RegionType - GetInputRequestedRegion(const RegionType & inputLargestPossibleRegion, + GetInputRequestedRegion(const RegionType & inputLargestPossibleRegion, [[maybe_unused]] const RegionType & itkNotUsed(outputRequestedRegion)) const { return inputLargestPossibleRegion; diff --git a/Modules/Core/Common/include/itkImageBufferRange.h b/Modules/Core/Common/include/itkImageBufferRange.h index 5c15ac9f3c6..9b236bad728 100644 --- a/Modules/Core/Common/include/itkImageBufferRange.h +++ b/Modules/Core/Common/include/itkImageBufferRange.h @@ -280,7 +280,7 @@ class ImageBufferRange final // Private constructor, used to create the begin and the end iterator of a range. // Only used by its friend class ImageBufferRange. QualifiedIterator(const OptionalAccessorFunctorType & accessorFunctor, - QualifiedInternalPixelType * const internalPixelPointer) noexcept + QualifiedInternalPixelType * const internalPixelPointer) noexcept : // Note: Use parentheses instead of curly braces to initialize data members, // to avoid AppleClang 6.0.0.6000056 compilation error, "no viable conversion..." m_OptionalAccessorFunctor(accessorFunctor) @@ -511,11 +511,11 @@ class ImageBufferRange final class IteratorInitializer final { private: - OptionalAccessorFunctorType m_OptionalAccessorFunctor; + OptionalAccessorFunctorType m_OptionalAccessorFunctor; QualifiedInternalPixelType * m_InternalPixelPointer; public: - explicit IteratorInitializer(OptionalAccessorFunctorType optionalAccessorFunctor, + explicit IteratorInitializer(OptionalAccessorFunctorType optionalAccessorFunctor, QualifiedInternalPixelType * internalPixelPointer) noexcept : m_OptionalAccessorFunctor(optionalAccessorFunctor) , m_InternalPixelPointer(internalPixelPointer) diff --git a/Modules/Core/Common/include/itkImageConstIterator.h b/Modules/Core/Common/include/itkImageConstIterator.h index c801b312f89..d7d97a66f9f 100644 --- a/Modules/Core/Common/include/itkImageConstIterator.h +++ b/Modules/Core/Common/include/itkImageConstIterator.h @@ -220,7 +220,7 @@ class ITK_TEMPLATE_EXPORT ImageConstIterator // to be same as BeginOffset so that iterator end condition is met // immediately. IndexType ind(m_Region.GetIndex()); - SizeType size(m_Region.GetSize()); + SizeType size(m_Region.GetSize()); if (m_Region.GetNumberOfPixels() == 0) { // region is empty, probably has a size of 0 along one dimension @@ -387,7 +387,7 @@ class ITK_TEMPLATE_EXPORT ImageConstIterator const InternalPixelType * m_Buffer{}; - AccessorType m_PixelAccessor{}; + AccessorType m_PixelAccessor{}; AccessorFunctorType m_PixelAccessorFunctor{}; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkImageConstIteratorWithIndex.h b/Modules/Core/Common/include/itkImageConstIteratorWithIndex.h index 6658be14de9..d51a73e9828 100644 --- a/Modules/Core/Common/include/itkImageConstIteratorWithIndex.h +++ b/Modules/Core/Common/include/itkImageConstIteratorWithIndex.h @@ -303,7 +303,7 @@ class ITK_TEMPLATE_EXPORT ImageConstIteratorWithIndex bool m_Remaining{ false }; - AccessorType m_PixelAccessor{}; + AccessorType m_PixelAccessor{}; AccessorFunctorType m_PixelAccessorFunctor{}; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkImageConstIteratorWithIndex.hxx b/Modules/Core/Common/include/itkImageConstIteratorWithIndex.hxx index 96835d60db7..21e24083294 100644 --- a/Modules/Core/Common/include/itkImageConstIteratorWithIndex.hxx +++ b/Modules/Core/Common/include/itkImageConstIteratorWithIndex.hxx @@ -171,7 +171,7 @@ ImageConstIteratorWithIndex::GoToReverseBegin() // Set the position at the end const InternalPixelType * buffer = m_Image->GetBufferPointer(); - const OffsetValueType offset = m_Image->ComputeOffset(m_PositionIndex); + const OffsetValueType offset = m_Image->ComputeOffset(m_PositionIndex); m_Position = buffer + offset; } diff --git a/Modules/Core/Common/include/itkImageDuplicator.h b/Modules/Core/Common/include/itkImageDuplicator.h index 63eeb657851..4d8c8447d50 100644 --- a/Modules/Core/Common/include/itkImageDuplicator.h +++ b/Modules/Core/Common/include/itkImageDuplicator.h @@ -122,8 +122,8 @@ class ITK_TEMPLATE_EXPORT ImageDuplicator : public Object private: ImageConstPointer m_InputImage{}; - ImagePointer m_DuplicateImage{}; - ModifiedTimeType m_InternalImageTime{}; + ImagePointer m_DuplicateImage{}; + ModifiedTimeType m_InternalImageTime{}; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkImageHelper.h b/Modules/Core/Common/include/itkImageHelper.h index f940b9c4d2d..42de7093d80 100644 --- a/Modules/Core/Common/include/itkImageHelper.h +++ b/Modules/Core/Common/include/itkImageHelper.h @@ -61,10 +61,10 @@ class ImageHelper /** ComputeIndex with recursive templates */ static inline void - ComputeIndex(const IndexType & bufferedRegionIndex, - OffsetValueType offset, + ComputeIndex(const IndexType & bufferedRegionIndex, + OffsetValueType offset, [[maybe_unused]] const OffsetValueType offsetTable[], - IndexType & index) + IndexType & index) { static_assert(VLoop <= VImageDimension); @@ -89,10 +89,10 @@ class ImageHelper // ComputeOffset // static inline void - ComputeOffset(const IndexType & bufferedRegionIndex, - const IndexType & index, + ComputeOffset(const IndexType & bufferedRegionIndex, + const IndexType & index, [[maybe_unused]] const OffsetValueType offsetTable[], - OffsetValueType & offset) + OffsetValueType & offset) { static_assert(VLoop <= VImageDimension); diff --git a/Modules/Core/Common/include/itkImageIORegion.h b/Modules/Core/Common/include/itkImageIORegion.h index 0026fa4e6c1..6dede6aa612 100644 --- a/Modules/Core/Common/include/itkImageIORegion.h +++ b/Modules/Core/Common/include/itkImageIORegion.h @@ -181,14 +181,14 @@ class ITKCommon_EXPORT ImageIORegion : public Region private: unsigned int m_ImageDimension{ 2 }; - IndexType m_Index{ IndexType(2) }; - SizeType m_Size{ SizeType(2) }; + IndexType m_Index{ IndexType(2) }; + SizeType m_Size{ SizeType(2) }; }; // Declare operator<< extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & os, const ImageIORegion & region); +operator<<(std::ostream & os, const ImageIORegion & region); /** \class ImageIORegionAdaptor @@ -208,8 +208,8 @@ class ImageIORegionAdaptor static void Convert(const ImageRegionType & inImageRegion, - ImageIORegionType & outIORegion, - const ImageIndexType & largestRegionIndex) + ImageIORegionType & outIORegion, + const ImageIndexType & largestRegionIndex) { // // The ImageRegion and ImageIORegion objects may have different dimensions. @@ -227,7 +227,7 @@ class ImageIORegionAdaptor const unsigned int minDimension = std::min(ioDimension, imageDimension); - const ImageSizeType & size = inImageRegion.GetSize(); + const ImageSizeType & size = inImageRegion.GetSize(); const ImageIndexType & index = inImageRegion.GetIndex(); for (unsigned int i = 0; i < minDimension; ++i) @@ -248,10 +248,10 @@ class ImageIORegionAdaptor static void Convert(const ImageIORegionType & inIORegion, - ImageRegionType & outImageRegion, - const ImageIndexType & largestRegionIndex) + ImageRegionType & outImageRegion, + const ImageIndexType & largestRegionIndex) { - auto size = MakeFilled(1); // initialize with default values + auto size = MakeFilled(1); // initialize with default values ImageIndexType index{}; // diff --git a/Modules/Core/Common/include/itkImageLinearConstIteratorWithIndex.h b/Modules/Core/Common/include/itkImageLinearConstIteratorWithIndex.h index 09a218f946c..4ee1aca1588 100644 --- a/Modules/Core/Common/include/itkImageLinearConstIteratorWithIndex.h +++ b/Modules/Core/Common/include/itkImageLinearConstIteratorWithIndex.h @@ -231,7 +231,7 @@ class ITK_TEMPLATE_EXPORT ImageLinearConstIteratorWithIndex : public ImageConstI private: OffsetValueType m_Jump{ 0 }; - unsigned int m_Direction{ 0 }; + unsigned int m_Direction{ 0 }; }; //---------------------------------------------------------------------- diff --git a/Modules/Core/Common/include/itkImageLinearConstIteratorWithIndex.hxx b/Modules/Core/Common/include/itkImageLinearConstIteratorWithIndex.hxx index 0a3a95f5a8c..69df6207b69 100644 --- a/Modules/Core/Common/include/itkImageLinearConstIteratorWithIndex.hxx +++ b/Modules/Core/Common/include/itkImageLinearConstIteratorWithIndex.hxx @@ -25,7 +25,7 @@ namespace itk // Constructor //---------------------------------------------------------------------- template -ImageLinearConstIteratorWithIndex::ImageLinearConstIteratorWithIndex(const ImageType * ptr, +ImageLinearConstIteratorWithIndex::ImageLinearConstIteratorWithIndex(const ImageType * ptr, const RegionType & region) : ImageConstIteratorWithIndex(ptr, region) { diff --git a/Modules/Core/Common/include/itkImageRandomConstIteratorWithIndex.h b/Modules/Core/Common/include/itkImageRandomConstIteratorWithIndex.h index 9d573b1d283..d44debb13fe 100644 --- a/Modules/Core/Common/include/itkImageRandomConstIteratorWithIndex.h +++ b/Modules/Core/Common/include/itkImageRandomConstIteratorWithIndex.h @@ -231,9 +231,9 @@ class ITK_TEMPLATE_EXPORT ImageRandomConstIteratorWithIndex : public ImageConstI using GeneratorPointer = typename Statistics::MersenneTwisterRandomVariateGenerator::Pointer; GeneratorPointer m_Generator{ Statistics::MersenneTwisterRandomVariateGenerator::New() }; - SizeValueType m_NumberOfSamplesRequested{}; - SizeValueType m_NumberOfSamplesDone{}; - SizeValueType m_NumberOfPixelsInRegion{}; + SizeValueType m_NumberOfSamplesRequested{}; + SizeValueType m_NumberOfSamplesDone{}; + SizeValueType m_NumberOfPixelsInRegion{}; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkImageRandomConstIteratorWithIndex.hxx b/Modules/Core/Common/include/itkImageRandomConstIteratorWithIndex.hxx index f339c7ba3d5..53d36a69ac8 100644 --- a/Modules/Core/Common/include/itkImageRandomConstIteratorWithIndex.hxx +++ b/Modules/Core/Common/include/itkImageRandomConstIteratorWithIndex.hxx @@ -23,7 +23,7 @@ namespace itk { template -ImageRandomConstIteratorWithIndex::ImageRandomConstIteratorWithIndex(const ImageType * ptr, +ImageRandomConstIteratorWithIndex::ImageRandomConstIteratorWithIndex(const ImageType * ptr, const RegionType & region) : ImageConstIteratorWithIndex(ptr, region) , m_NumberOfPixelsInRegion{ region.GetNumberOfPixels() } @@ -57,7 +57,7 @@ ImageRandomConstIteratorWithIndex::RandomJump() for (unsigned int dim = 0; dim < TImage::ImageDimension; ++dim) { - const SizeValueType sizeInThisDimension = regionSize[dim]; + const SizeValueType sizeInThisDimension = regionSize[dim]; const PositionValueType residual = position % sizeInThisDimension; this->m_PositionIndex[dim] = residual + this->m_BeginIndex[dim]; position -= residual; diff --git a/Modules/Core/Common/include/itkImageRandomConstIteratorWithOnlyIndex.h b/Modules/Core/Common/include/itkImageRandomConstIteratorWithOnlyIndex.h index 923abbf2b3b..126ce76a22b 100644 --- a/Modules/Core/Common/include/itkImageRandomConstIteratorWithOnlyIndex.h +++ b/Modules/Core/Common/include/itkImageRandomConstIteratorWithOnlyIndex.h @@ -233,9 +233,9 @@ class ITK_TEMPLATE_EXPORT ImageRandomConstIteratorWithOnlyIndex : public ImageCo using GeneratorPointer = typename Statistics::MersenneTwisterRandomVariateGenerator::Pointer; GeneratorPointer m_Generator{ Statistics::MersenneTwisterRandomVariateGenerator::New() }; - SizeValueType m_NumberOfSamplesRequested{}; - SizeValueType m_NumberOfSamplesDone{}; - SizeValueType m_NumberOfPixelsInRegion{}; + SizeValueType m_NumberOfSamplesRequested{}; + SizeValueType m_NumberOfSamplesDone{}; + SizeValueType m_NumberOfPixelsInRegion{}; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkImageRandomConstIteratorWithOnlyIndex.hxx b/Modules/Core/Common/include/itkImageRandomConstIteratorWithOnlyIndex.hxx index c49ac50fdc0..3f8237bc41a 100644 --- a/Modules/Core/Common/include/itkImageRandomConstIteratorWithOnlyIndex.hxx +++ b/Modules/Core/Common/include/itkImageRandomConstIteratorWithOnlyIndex.hxx @@ -23,7 +23,7 @@ namespace itk { template -ImageRandomConstIteratorWithOnlyIndex::ImageRandomConstIteratorWithOnlyIndex(const ImageType * ptr, +ImageRandomConstIteratorWithOnlyIndex::ImageRandomConstIteratorWithOnlyIndex(const ImageType * ptr, const RegionType & region) : ImageConstIteratorWithOnlyIndex(ptr, region) , m_NumberOfPixelsInRegion{ region.GetNumberOfPixels() } @@ -56,7 +56,7 @@ ImageRandomConstIteratorWithOnlyIndex::RandomJump() for (unsigned int dim = 0; dim < TImage::ImageDimension; ++dim) { - const SizeValueType sizeInThisDimension = regionSize[dim]; + const SizeValueType sizeInThisDimension = regionSize[dim]; const PositionValueType residual = position % sizeInThisDimension; this->m_PositionIndex[dim] = residual + this->m_BeginIndex[dim]; position -= residual; diff --git a/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.h b/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.h index 32c6174ee3f..b021c48996d 100644 --- a/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.h +++ b/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.h @@ -42,7 +42,7 @@ class NodeOfPermutation public: SizeValueType m_Priority; SizeValueType m_Index; - double m_Value; + double m_Value; NodeOfPermutation() { @@ -74,8 +74,8 @@ class RandomPermutation public: using GeneratorPointer = typename Statistics::MersenneTwisterRandomVariateGenerator::Pointer; NodeOfPermutation * m_Permutation; - GeneratorPointer m_Generator; - SizeValueType m_Size; + GeneratorPointer m_Generator; + SizeValueType m_Size; RandomPermutation(SizeValueType sz) { @@ -357,9 +357,9 @@ class ITK_TEMPLATE_EXPORT ImageRandomNonRepeatingConstIteratorWithIndex : public void UpdatePosition(); - SizeValueType m_NumberOfSamplesRequested{}; - SizeValueType m_NumberOfSamplesDone{}; - SizeValueType m_NumberOfPixelsInRegion{}; + SizeValueType m_NumberOfSamplesRequested{}; + SizeValueType m_NumberOfSamplesDone{}; + SizeValueType m_NumberOfPixelsInRegion{}; RandomPermutation * m_Permutation{}; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.hxx b/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.hxx index 9b0ace8e771..22fbaac62ba 100644 --- a/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.hxx +++ b/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.hxx @@ -24,7 +24,7 @@ namespace itk template ImageRandomNonRepeatingConstIteratorWithIndex::ImageRandomNonRepeatingConstIteratorWithIndex( - const ImageType * ptr, + const ImageType * ptr, const RegionType & region) : ImageConstIteratorWithIndex(ptr, region) { @@ -83,10 +83,10 @@ ImageRandomNonRepeatingConstIteratorWithIndex::SetPriorityImage(const Pr for (PositionValueType pixel = 0; pixel < m_NumberOfPixelsInRegion; ++pixel) { PositionValueType position = pixel; - IndexType positionIndex; + IndexType positionIndex; for (unsigned int dim = 0; dim < TImage::ImageDimension; ++dim) { - const SizeValueType sizeInThisDimension = this->m_Region.GetSize()[dim]; + const SizeValueType sizeInThisDimension = this->m_Region.GetSize()[dim]; const PositionValueType residual = position % sizeInThisDimension; positionIndex[dim] = residual + this->m_BeginIndex[dim]; position -= residual; @@ -107,7 +107,7 @@ ImageRandomNonRepeatingConstIteratorWithIndex::UpdatePosition() PositionValueType position = (*(this->m_Permutation))[m_NumberOfSamplesDone % m_NumberOfSamplesRequested]; for (unsigned int dim = 0; dim < TImage::ImageDimension; ++dim) { - const SizeValueType sizeInThisDimension = this->m_Region.GetSize()[dim]; + const SizeValueType sizeInThisDimension = this->m_Region.GetSize()[dim]; const PositionValueType residual = position % sizeInThisDimension; this->m_PositionIndex[dim] = residual + this->m_BeginIndex[dim]; position -= residual; diff --git a/Modules/Core/Common/include/itkImageRandomNonRepeatingIteratorWithIndex.hxx b/Modules/Core/Common/include/itkImageRandomNonRepeatingIteratorWithIndex.hxx index c7b1eb0017f..830251d3baa 100644 --- a/Modules/Core/Common/include/itkImageRandomNonRepeatingIteratorWithIndex.hxx +++ b/Modules/Core/Common/include/itkImageRandomNonRepeatingIteratorWithIndex.hxx @@ -22,7 +22,7 @@ namespace itk { template -ImageRandomNonRepeatingIteratorWithIndex::ImageRandomNonRepeatingIteratorWithIndex(ImageType * ptr, +ImageRandomNonRepeatingIteratorWithIndex::ImageRandomNonRepeatingIteratorWithIndex(ImageType * ptr, const RegionType & region) : ImageRandomNonRepeatingConstIteratorWithIndex(ptr, region) {} diff --git a/Modules/Core/Common/include/itkImageRegion.h b/Modules/Core/Common/include/itkImageRegion.h index b373c8b27b0..37f4d183b38 100644 --- a/Modules/Core/Common/include/itkImageRegion.h +++ b/Modules/Core/Common/include/itkImageRegion.h @@ -404,7 +404,7 @@ class ITK_TEMPLATE_EXPORT ImageRegion final private: IndexType m_Index = { { 0 } }; - SizeType m_Size = { { 0 } }; + SizeType m_Size = { { 0 } }; /** Friends of ImageRegion */ friend class ImageBase; diff --git a/Modules/Core/Common/include/itkImageRegion.hxx b/Modules/Core/Common/include/itkImageRegion.hxx index dcf0578a62f..31912d31d23 100644 --- a/Modules/Core/Common/include/itkImageRegion.hxx +++ b/Modules/Core/Common/include/itkImageRegion.hxx @@ -232,8 +232,8 @@ ImageRegion::Slice(const unsigned int dim) const -> SliceRegion } Index sliceIndex{}; - Size sliceSize{}; - unsigned int ii = 0; + Size sliceSize{}; + unsigned int ii = 0; for (unsigned int i = 0; i < VImageDimension; ++i) { if (i != dim) diff --git a/Modules/Core/Common/include/itkImageRegionConstIterator.hxx b/Modules/Core/Common/include/itkImageRegionConstIterator.hxx index f0903d9c578..48de02640ea 100644 --- a/Modules/Core/Common/include/itkImageRegionConstIterator.hxx +++ b/Modules/Core/Common/include/itkImageRegionConstIterator.hxx @@ -40,7 +40,7 @@ ImageRegionConstIterator::Increment() this->m_Image->ComputeIndex(static_cast(this->m_Offset)); const typename ImageIterator::IndexType & startIndex = this->m_Region.GetIndex(); - const typename ImageIterator::SizeType & size = this->m_Region.GetSize(); + const typename ImageIterator::SizeType & size = this->m_Region.GetSize(); // Increment along a row, then wrap at the end of the region row. @@ -87,7 +87,7 @@ ImageRegionConstIterator::Decrement() this->m_Image->ComputeIndex(static_cast(this->m_Offset)); const typename ImageIterator::IndexType & startIndex = this->m_Region.GetIndex(); - const typename ImageIterator::SizeType & size = this->m_Region.GetSize(); + const typename ImageIterator::SizeType & size = this->m_Region.GetSize(); // Decrement along a row, then wrap at the beginning of the region row. diff --git a/Modules/Core/Common/include/itkImageRegionExclusionConstIteratorWithIndex.hxx b/Modules/Core/Common/include/itkImageRegionExclusionConstIteratorWithIndex.hxx index eddc78c49b8..add85bc8fa9 100644 --- a/Modules/Core/Common/include/itkImageRegionExclusionConstIteratorWithIndex.hxx +++ b/Modules/Core/Common/include/itkImageRegionExclusionConstIteratorWithIndex.hxx @@ -24,7 +24,7 @@ namespace itk template ImageRegionExclusionConstIteratorWithIndex::ImageRegionExclusionConstIteratorWithIndex( - const ImageType * ptr, + const ImageType * ptr, const RegionType & region) : Superclass(ptr, region) {} diff --git a/Modules/Core/Common/include/itkImageRegionExclusionIteratorWithIndex.hxx b/Modules/Core/Common/include/itkImageRegionExclusionIteratorWithIndex.hxx index cd610dcb5b0..7882e180444 100644 --- a/Modules/Core/Common/include/itkImageRegionExclusionIteratorWithIndex.hxx +++ b/Modules/Core/Common/include/itkImageRegionExclusionIteratorWithIndex.hxx @@ -22,7 +22,7 @@ namespace itk { template -ImageRegionExclusionIteratorWithIndex::ImageRegionExclusionIteratorWithIndex(ImageType * ptr, +ImageRegionExclusionIteratorWithIndex::ImageRegionExclusionIteratorWithIndex(ImageType * ptr, const RegionType & region) : ImageRegionExclusionConstIteratorWithIndex(ptr, region) {} diff --git a/Modules/Core/Common/include/itkImageRegionRange.h b/Modules/Core/Common/include/itkImageRegionRange.h index 6a0a7a85fcf..3d4e8ea8e98 100644 --- a/Modules/Core/Common/include/itkImageRegionRange.h +++ b/Modules/Core/Common/include/itkImageRegionRange.h @@ -76,7 +76,7 @@ class ImageRegionRange final using ImageDimensionType = typename TImage::ImageDimensionType; using PixelType = typename TImage::PixelType; - static constexpr bool IsImageTypeConst = std::is_const_v; + static constexpr bool IsImageTypeConst = std::is_const_v; static constexpr ImageDimensionType ImageDimension = TImage::ImageDimension; using BufferIteratorType = typename ImageBufferRange::iterator; @@ -133,9 +133,9 @@ class ImageRegionRange final // Private constructor, used to create the begin and the end iterator of a range. // Only used by its friend class ImageRegionRange. QualifiedIterator(const QualifiedBufferIteratorType & bufferIterator, - const OffsetTableType & offsetTable, - const OffsetType & iterationOffset, - const SizeType & regionSize) noexcept + const OffsetTableType & offsetTable, + const OffsetType & iterationOffset, + const SizeType & regionSize) noexcept : m_BufferIterator(bufferIterator) , // Note: Use parentheses instead of curly braces to initialize data members, diff --git a/Modules/Core/Common/include/itkImageRegionReverseConstIterator.h b/Modules/Core/Common/include/itkImageRegionReverseConstIterator.h index 6e9390ba41e..c6c180b1d36 100644 --- a/Modules/Core/Common/include/itkImageRegionReverseConstIterator.h +++ b/Modules/Core/Common/include/itkImageRegionReverseConstIterator.h @@ -263,10 +263,10 @@ class ITK_TEMPLATE_EXPORT ImageRegionReverseConstIterator : public ImageReverseC this->m_Image->ComputeIndex(static_cast(this->m_Offset)); const typename ImageConstIterator::IndexType & startIndex = this->m_Region.GetIndex(); - const typename ImageConstIterator::SizeType & size = this->m_Region.GetSize(); + const typename ImageConstIterator::SizeType & size = this->m_Region.GetSize(); // Decrement along a row, then wrap at the beginning of the region row. - bool done; + bool done; unsigned int dim; // Check to see if we are past the first pixel in the region @@ -319,10 +319,10 @@ class ITK_TEMPLATE_EXPORT ImageRegionReverseConstIterator : public ImageReverseC this->m_Image->ComputeIndex(static_cast(this->m_Offset)); const typename ImageIterator::IndexType & startIndex = this->m_Region.GetIndex(); - const typename ImageIterator::SizeType & size = this->m_Region.GetSize(); + const typename ImageIterator::SizeType & size = this->m_Region.GetSize(); // Increment along a row, then wrap at the end of the region row. - bool done; + bool done; unsigned int dim; // Check to see if we are past the last pixel in the region diff --git a/Modules/Core/Common/include/itkImageRegionSplitterBase.h b/Modules/Core/Common/include/itkImageRegionSplitterBase.h index f28ea7bdfe6..4ead4995ee9 100644 --- a/Modules/Core/Common/include/itkImageRegionSplitterBase.h +++ b/Modules/Core/Common/include/itkImageRegionSplitterBase.h @@ -121,21 +121,21 @@ class ITKCommon_EXPORT ImageRegionSplitterBase : public Object /** Templateless method to compute the number of possible splits for * any number of dimensions. */ virtual unsigned int - GetNumberOfSplitsInternal(unsigned int dim, + GetNumberOfSplitsInternal(unsigned int dim, const IndexValueType regionIndex[], - const SizeValueType regionSize[], - unsigned int requestedNumber) const = 0; + const SizeValueType regionSize[], + unsigned int requestedNumber) const = 0; /** Templateless method to compute an actual split for any number of * dimensions. \c dim is the size of the \c regionIndex and \c * regionSize arrays. */ virtual unsigned int - GetSplitInternal(unsigned int dim, - unsigned int i, - unsigned int numberOfPieces, + GetSplitInternal(unsigned int dim, + unsigned int i, + unsigned int numberOfPieces, IndexValueType regionIndex[], - SizeValueType regionSize[]) const = 0; + SizeValueType regionSize[]) const = 0; void PrintSelf(std::ostream & os, Indent indent) const override; diff --git a/Modules/Core/Common/include/itkImageRegionSplitterDirection.h b/Modules/Core/Common/include/itkImageRegionSplitterDirection.h index 9e94f78f073..197bb978c38 100644 --- a/Modules/Core/Common/include/itkImageRegionSplitterDirection.h +++ b/Modules/Core/Common/include/itkImageRegionSplitterDirection.h @@ -61,17 +61,17 @@ class ITKCommon_EXPORT ImageRegionSplitterDirection : public ImageRegionSplitter unsigned int - GetNumberOfSplitsInternal(unsigned int dim, + GetNumberOfSplitsInternal(unsigned int dim, const IndexValueType regionIndex[], - const SizeValueType regionSize[], - unsigned int requestedNumber) const override; + const SizeValueType regionSize[], + unsigned int requestedNumber) const override; unsigned int - GetSplitInternal(unsigned int dim, - unsigned int i, - unsigned int numberOfPieces, + GetSplitInternal(unsigned int dim, + unsigned int i, + unsigned int numberOfPieces, IndexValueType regionIndex[], - SizeValueType regionSize[]) const override; + SizeValueType regionSize[]) const override; void PrintSelf(std::ostream & os, Indent indent) const override; diff --git a/Modules/Core/Common/include/itkImageRegionSplitterMultidimensional.h b/Modules/Core/Common/include/itkImageRegionSplitterMultidimensional.h index e7ed58558dc..5cd425fbab0 100644 --- a/Modules/Core/Common/include/itkImageRegionSplitterMultidimensional.h +++ b/Modules/Core/Common/include/itkImageRegionSplitterMultidimensional.h @@ -77,28 +77,28 @@ class ITKCommon_EXPORT ImageRegionSplitterMultidimensional : public ImageRegionS unsigned int - GetNumberOfSplitsInternal(unsigned int dim, + GetNumberOfSplitsInternal(unsigned int dim, const IndexValueType regionIndex[], - const SizeValueType regionSize[], - unsigned int requestedNumber) const override; + const SizeValueType regionSize[], + unsigned int requestedNumber) const override; unsigned int - GetSplitInternal(unsigned int dim, - unsigned int splitI, - unsigned int numberOfPieces, + GetSplitInternal(unsigned int dim, + unsigned int splitI, + unsigned int numberOfPieces, IndexValueType regionIndex[], - SizeValueType regionSize[]) const override; + SizeValueType regionSize[]) const override; void PrintSelf(std::ostream & os, Indent indent) const override; private: static unsigned int - ComputeSplits(unsigned int dim, - unsigned int requestedNumber, + ComputeSplits(unsigned int dim, + unsigned int requestedNumber, const IndexValueType regionIndex[], - const SizeValueType regionSize[], - unsigned int splits[]); + const SizeValueType regionSize[], + unsigned int splits[]); }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkImageRegionSplitterSlowDimension.h b/Modules/Core/Common/include/itkImageRegionSplitterSlowDimension.h index 00d4b7e27bd..13d356fc333 100644 --- a/Modules/Core/Common/include/itkImageRegionSplitterSlowDimension.h +++ b/Modules/Core/Common/include/itkImageRegionSplitterSlowDimension.h @@ -65,17 +65,17 @@ class ITKCommon_EXPORT ImageRegionSplitterSlowDimension : public ImageRegionSpli ImageRegionSplitterSlowDimension(); unsigned int - GetNumberOfSplitsInternal(unsigned int dim, + GetNumberOfSplitsInternal(unsigned int dim, const IndexValueType regionIndex[], - const SizeValueType regionSize[], - unsigned int requestedNumber) const override; + const SizeValueType regionSize[], + unsigned int requestedNumber) const override; unsigned int - GetSplitInternal(unsigned int dim, - unsigned int i, - unsigned int numberOfPieces, + GetSplitInternal(unsigned int dim, + unsigned int i, + unsigned int numberOfPieces, IndexValueType regionIndex[], - SizeValueType regionSize[]) const override; + SizeValueType regionSize[]) const override; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkImageReverseConstIterator.h b/Modules/Core/Common/include/itkImageReverseConstIterator.h index 386e0a66292..4b2f3236603 100644 --- a/Modules/Core/Common/include/itkImageReverseConstIterator.h +++ b/Modules/Core/Common/include/itkImageReverseConstIterator.h @@ -182,7 +182,7 @@ class ITK_TEMPLATE_EXPORT ImageReverseConstIterator // Compute the begin offset, the last pixel in the region IndexType ind(m_Region.GetIndex()); - SizeType size(m_Region.GetSize()); + SizeType size(m_Region.GetSize()); for (unsigned int i = 0; i < TImage::ImageDimension; ++i) { ind[i] += (size[i] - 1); @@ -217,7 +217,7 @@ class ITK_TEMPLATE_EXPORT ImageReverseConstIterator // Compute the begin offset, the last pixel in the region IndexType regInd(m_Region.GetIndex()); - SizeType regSize(m_Region.GetSize()); + SizeType regSize(m_Region.GetSize()); for (unsigned int i = 0; i < TImage::ImageDimension; ++i) { regInd[i] += (regSize[i] - 1); @@ -268,7 +268,7 @@ class ITK_TEMPLATE_EXPORT ImageReverseConstIterator // Compute the begin offset, the last pixel in the region IndexType regInd(m_Region.GetIndex()); - SizeType regSize(m_Region.GetSize()); + SizeType regSize(m_Region.GetSize()); for (unsigned int i = 0; i < TImage::ImageDimension; ++i) { regInd[i] += (regSize[i] - 1); @@ -401,7 +401,7 @@ class ITK_TEMPLATE_EXPORT ImageReverseConstIterator const InternalPixelType * m_Buffer{}; - AccessorType m_PixelAccessor{}; + AccessorType m_PixelAccessor{}; AccessorFunctorType m_PixelAccessorFunctor{}; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkImageScanlineConstIterator.hxx b/Modules/Core/Common/include/itkImageScanlineConstIterator.hxx index 15f650c4037..4a55ae3077b 100644 --- a/Modules/Core/Common/include/itkImageScanlineConstIterator.hxx +++ b/Modules/Core/Common/include/itkImageScanlineConstIterator.hxx @@ -32,7 +32,7 @@ ImageScanlineConstIterator::NextLine() IndexType ind = this->m_Image->ComputeIndex(static_cast(m_SpanEndOffset - 1)); const IndexType & startIndex = this->m_Region.GetIndex(); - const SizeType & size = this->m_Region.GetSize(); + const SizeType & size = this->m_Region.GetSize(); // Check to see if we are past the last pixel in the region // Note that ++ind[0] moves to the next pixel along the row. diff --git a/Modules/Core/Common/include/itkImageSink.h b/Modules/Core/Common/include/itkImageSink.h index ee14040534e..39da7ecf0fe 100644 --- a/Modules/Core/Common/include/itkImageSink.h +++ b/Modules/Core/Common/include/itkImageSink.h @@ -188,9 +188,9 @@ class ImageSink private: - unsigned int m_NumberOfStreamDivisions{ 1 }; + unsigned int m_NumberOfStreamDivisions{ 1 }; RegionSplitterPointer m_RegionSplitter{}; - InputImageRegionType m_CurrentInputRegion{}; + InputImageRegionType m_CurrentInputRegion{}; /** * Tolerances for checking whether input images are defined to diff --git a/Modules/Core/Common/include/itkImageSink.hxx b/Modules/Core/Common/include/itkImageSink.hxx index 0e062454195..f45034a1ba7 100644 --- a/Modules/Core/Common/include/itkImageSink.hxx +++ b/Modules/Core/Common/include/itkImageSink.hxx @@ -116,7 +116,7 @@ template unsigned int ImageSink::GetNumberOfInputRequestedRegions() { - const InputImageType * inputPtr = const_cast(this->GetInput()); + const InputImageType * inputPtr = const_cast(this->GetInput()); const InputImageRegionType inputImageRegion = inputPtr->GetLargestPossibleRegion(); return this->GetRegionSplitter()->GetNumberOfSplits(inputImageRegion, this->m_NumberOfStreamDivisions); @@ -129,7 +129,7 @@ ImageSink::GenerateNthInputRequestedRegion(unsigned int inputReques { Superclass::GenerateInputRequestedRegion(); - auto * inputPtr = const_cast(this->GetInput()); + auto * inputPtr = const_cast(this->GetInput()); InputImageRegionType inputImageRegion = inputPtr->GetLargestPossibleRegion(); @@ -171,7 +171,7 @@ ImageSink::VerifyInputInformation() const { using ImageBaseType = const ImageBase; - ImageBaseType * inputPtr1 = nullptr; + ImageBaseType * inputPtr1 = nullptr; InputDataObjectConstIterator it(this); for (; !it.IsAtEnd(); ++it) @@ -254,9 +254,9 @@ ImageSink::StreamedGenerateData(unsigned int inputRequestedRegionNu this->GetMultiThreader()->SetNumberOfWorkUnits(this->GetNumberOfWorkUnits()); // calculate the progress range for this streamed chunk - const ThreadIdType total = this->GetNumberOfInputRequestedRegions(); - const float oldProgress = static_cast(inputRequestedRegionNumber) / (total); - const float newProgress = static_cast(inputRequestedRegionNumber + 1) / (total); + const ThreadIdType total = this->GetNumberOfInputRequestedRegions(); + const float oldProgress = static_cast(inputRequestedRegionNumber) / (total); + const float newProgress = static_cast(inputRequestedRegionNumber + 1) / (total); ProgressTransformer pt(oldProgress, newProgress, this); diff --git a/Modules/Core/Common/include/itkImageSliceConstIteratorWithIndex.h b/Modules/Core/Common/include/itkImageSliceConstIteratorWithIndex.h index 325b5210e3b..ab7510914df 100644 --- a/Modules/Core/Common/include/itkImageSliceConstIteratorWithIndex.h +++ b/Modules/Core/Common/include/itkImageSliceConstIteratorWithIndex.h @@ -218,8 +218,8 @@ class ITK_TEMPLATE_EXPORT ImageSliceConstIteratorWithIndex : public ImageConstIt private: SizeValueType m_PixelJump; SizeValueType m_LineJump; - unsigned int m_Direction_A; - unsigned int m_Direction_B; + unsigned int m_Direction_A; + unsigned int m_Direction_B; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkImageSource.hxx b/Modules/Core/Common/include/itkImageSource.hxx index e0adfa55f8a..7027ceb72e2 100644 --- a/Modules/Core/Common/include/itkImageSource.hxx +++ b/Modules/Core/Common/include/itkImageSource.hxx @@ -142,8 +142,8 @@ ImageSource::GetImageRegionSplitter() const //---------------------------------------------------------------------------- template unsigned int -ImageSource::SplitRequestedRegion(unsigned int i, - unsigned int pieces, +ImageSource::SplitRequestedRegion(unsigned int i, + unsigned int pieces, OutputImageRegionType & splitRegion) { const ImageRegionSplitterBase * splitter = this->GetImageRegionSplitter(); @@ -189,9 +189,9 @@ ImageSource::ClassicMultiThread(ThreadFunctionType callbackFunctio ThreadStruct str; str.Filter = this; - const OutputImageType * outputPtr = this->GetOutput(); + const OutputImageType * outputPtr = this->GetOutput(); const ImageRegionSplitterBase * splitter = this->GetImageRegionSplitter(); - const unsigned int validThreads = + const unsigned int validThreads = splitter->GetNumberOfSplits(outputPtr->GetRequestedRegion(), this->GetNumberOfWorkUnits()); this->GetMultiThreader()->SetNumberOfWorkUnits(validThreads); @@ -269,15 +269,15 @@ ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION ImageSource::ThreaderCallback(void * arg) { using WorkUnitInfo = MultiThreaderBase::WorkUnitInfo; - auto * workUnitInfo = static_cast(arg); + auto * workUnitInfo = static_cast(arg); const ThreadIdType workUnitID = workUnitInfo->WorkUnitID; const ThreadIdType workUnitCount = workUnitInfo->NumberOfWorkUnits; - auto * str = (ThreadStruct *)(workUnitInfo->UserData); + auto * str = (ThreadStruct *)(workUnitInfo->UserData); // execute the actual method with appropriate output region // first find out how many pieces extent can be split into. typename TOutputImage::RegionType splitRegion; - const ThreadIdType total = str->Filter->SplitRequestedRegion(workUnitID, workUnitCount, splitRegion); + const ThreadIdType total = str->Filter->SplitRequestedRegion(workUnitID, workUnitCount, splitRegion); if (workUnitID < total) { diff --git a/Modules/Core/Common/include/itkImageToImageFilter.hxx b/Modules/Core/Common/include/itkImageToImageFilter.hxx index e6c6d6aeb4c..8e7f228c5cd 100644 --- a/Modules/Core/Common/include/itkImageToImageFilter.hxx +++ b/Modules/Core/Common/include/itkImageToImageFilter.hxx @@ -113,7 +113,7 @@ ImageToImageFilter::GenerateInputRequestedRegion() template void ImageToImageFilter::CallCopyOutputRegionToInputRegion( - InputImageRegionType & destRegion, + InputImageRegionType & destRegion, const OutputImageRegionType & srcRegion) { const OutputToInputRegionCopierType regionCopier; @@ -150,7 +150,7 @@ ImageToImageFilter::VerifyInputInformation() const using ImageBaseType = const ImageBase; - ImageBaseType * inputPtr1 = nullptr; + ImageBaseType * inputPtr1 = nullptr; InputDataObjectConstIterator it(this); for (; !it.IsAtEnd(); ++it) diff --git a/Modules/Core/Common/include/itkImageToImageFilterDetail.h b/Modules/Core/Common/include/itkImageToImageFilterDetail.h index 3bb6b45dcc8..62bf2733bc1 100644 --- a/Modules/Core/Common/include/itkImageToImageFilterDetail.h +++ b/Modules/Core/Common/include/itkImageToImageFilterDetail.h @@ -179,7 +179,7 @@ struct BinaryUnsignedIntDispatch : public DispatchBase template void ImageToImageFilterDefaultCopyRegion(const typename BinaryUnsignedIntDispatch::FirstEqualsSecondType &, - ImageRegion & destRegion, + ImageRegion & destRegion, const ImageRegion & srcRegion) { destRegion = srcRegion; @@ -204,17 +204,17 @@ ImageToImageFilterDefaultCopyRegion(const typename BinaryUnsignedIntDispatch void ImageToImageFilterDefaultCopyRegion(const typename BinaryUnsignedIntDispatch::FirstLessThanSecondType &, - ImageRegion & destRegion, + ImageRegion & destRegion, const ImageRegion & srcRegion) { // Source dimension is greater than the destination dimension, copy the // first part of the source into the destination unsigned int dim; - Index destIndex; - Size destSize; + Index destIndex; + Size destSize; const Index & srcIndex = srcRegion.GetIndex(); - const Size & srcSize = srcRegion.GetSize(); + const Size & srcSize = srcRegion.GetSize(); // copy what we can for (dim = 0; dim < D1; ++dim) @@ -246,17 +246,17 @@ ImageToImageFilterDefaultCopyRegion(const typename BinaryUnsignedIntDispatch void ImageToImageFilterDefaultCopyRegion(const typename BinaryUnsignedIntDispatch::FirstGreaterThanSecondType &, - ImageRegion & destRegion, + ImageRegion & destRegion, const ImageRegion & srcRegion) { // Source dimension is less than the destination dimension, copy source // into the first part of the destination and set zeros elsewhere. unsigned int dim; - Index destIndex; - Size destSize; + Index destIndex; + Size destSize; const Index & srcIndex = srcRegion.GetIndex(); - const Size & srcSize = srcRegion.GetSize(); + const Size & srcSize = srcRegion.GetSize(); // copy what we can for (dim = 0; dim < D2; ++dim) @@ -349,7 +349,7 @@ operator!=(const ImageRegionCopier & c1, const ImageRegionCopier template void ImageToImageFilterDefaultCopyInformation(const typename BinaryUnsignedIntDispatch::FirstEqualsSecondType &, - ImageBase * destImage, + ImageBase * destImage, const ImageBase * srcImage) { destImage->CopyInformation(srcImage); @@ -359,7 +359,7 @@ ImageToImageFilterDefaultCopyInformation(const typename BinaryUnsignedIntDispatc template void ImageToImageFilterDefaultCopyInformation(const typename BinaryUnsignedIntDispatch::FirstGreaterThanSecondType &, - ImageBase * destImage, + ImageBase * destImage, const ImageBase * srcImage) { using DestinationImageType = ImageBase; @@ -368,12 +368,12 @@ ImageToImageFilterDefaultCopyInformation(const typename BinaryUnsignedIntDispatc // Copy what we can from the image from spacing and origin of the input // This logic needs to be augmented with logic that select which // dimensions to copy - const typename SourceImageType::SpacingType & inputSpacing = srcImage->GetSpacing(); - const typename SourceImageType::PointType & inputOrigin = srcImage->GetOrigin(); + const typename SourceImageType::SpacingType & inputSpacing = srcImage->GetSpacing(); + const typename SourceImageType::PointType & inputOrigin = srcImage->GetOrigin(); const typename SourceImageType::DirectionType & inputDirection = srcImage->GetDirection(); - typename DestinationImageType::SpacingType destSpacing; - typename DestinationImageType::PointType destOrigin; + typename DestinationImageType::SpacingType destSpacing; + typename DestinationImageType::PointType destOrigin; typename DestinationImageType::DirectionType destDirection; // copy the input to the output and fill the rest of the diff --git a/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.hxx b/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.hxx index c9a55dd206e..e7a7a753135 100644 --- a/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.hxx +++ b/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.hxx @@ -27,7 +27,7 @@ template ::MoveDataPointer( CommonContainerType * container, - TValue * pointer) + TValue * pointer) { if (m_ParameterImage.IsNull()) { @@ -50,7 +50,7 @@ template ::SetParametersObject( CommonContainerType * container, - LightObject * object) + LightObject * object) { if (object == nullptr) { diff --git a/Modules/Core/Common/include/itkImportImageContainer.h b/Modules/Core/Common/include/itkImportImageContainer.h index 90f25ab04b8..6643b8ea44d 100644 --- a/Modules/Core/Common/include/itkImportImageContainer.h +++ b/Modules/Core/Common/include/itkImportImageContainer.h @@ -206,10 +206,10 @@ class ITK_TEMPLATE_EXPORT ImportImageContainer : public Object } private: - TElement * m_ImportPointer{}; + TElement * m_ImportPointer{}; TElementIdentifier m_Size{}; TElementIdentifier m_Capacity{}; - bool m_ContainerManageMemory{ true }; + bool m_ContainerManageMemory{ true }; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkImportImageContainer.hxx b/Modules/Core/Common/include/itkImportImageContainer.hxx index 106f0a4e8cd..3cf0ada238c 100644 --- a/Modules/Core/Common/include/itkImportImageContainer.hxx +++ b/Modules/Core/Common/include/itkImportImageContainer.hxx @@ -94,7 +94,7 @@ ImportImageContainer::Squeeze() if (m_Size < m_Capacity) { const TElementIdentifier size = m_Size; - TElement * temp = this->AllocateElements(size, false); + TElement * temp = this->AllocateElements(size, false); std::copy_n(m_ImportPointer, m_Size, temp); DeallocateManagedMemory(); @@ -137,9 +137,9 @@ ImportImageContainer::Initialize() */ template void -ImportImageContainer::SetImportPointer(TElement * ptr, +ImportImageContainer::SetImportPointer(TElement * ptr, TElementIdentifier num, - bool LetContainerManageMemory) + bool LetContainerManageMemory) { DeallocateManagedMemory(); m_ImportPointer = ptr; @@ -153,7 +153,7 @@ ImportImageContainer::SetImportPointer(TElement * template TElement * ImportImageContainer::AllocateElements(ElementIdentifier size, - bool UseValueInitialization) const + bool UseValueInitialization) const { TElement * data; diff --git a/Modules/Core/Common/include/itkImportImageFilter.h b/Modules/Core/Common/include/itkImportImageFilter.h index bd1c3135f33..6ba92320d06 100644 --- a/Modules/Core/Common/include/itkImportImageFilter.h +++ b/Modules/Core/Common/include/itkImportImageFilter.h @@ -166,13 +166,13 @@ class ITK_TEMPLATE_EXPORT ImportImageFilter : public ImageSource(1.0) }; - OriginType m_Origin{}; + RegionType m_Region{}; + SpacingType m_Spacing{ MakeFilled(1.0) }; + OriginType m_Origin{}; DirectionType m_Direction{ DirectionType::GetIdentity() }; typename ImportImageContainerType::Pointer m_ImportImageContainer{}; - SizeValueType m_Size{}; + SizeValueType m_Size{}; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkImportImageFilter.hxx b/Modules/Core/Common/include/itkImportImageFilter.hxx index 8380bf14620..e904791cebc 100644 --- a/Modules/Core/Common/include/itkImportImageFilter.hxx +++ b/Modules/Core/Common/include/itkImportImageFilter.hxx @@ -58,9 +58,9 @@ ImportImageFilter::PrintSelf(std::ostream & os, Indent */ template void -ImportImageFilter::SetImportPointer(TPixel * ptr, +ImportImageFilter::SetImportPointer(TPixel * ptr, SizeValueType num, - bool LetImageContainerManageMemory) + bool LetImageContainerManageMemory) { if (!m_ImportImageContainer || ptr != m_ImportImageContainer->GetImportPointer() || m_Size != num) { diff --git a/Modules/Core/Common/include/itkInPlaceImageFilter.hxx b/Modules/Core/Common/include/itkInPlaceImageFilter.hxx index b49ce73c2f1..cd04978e1a0 100644 --- a/Modules/Core/Common/include/itkInPlaceImageFilter.hxx +++ b/Modules/Core/Common/include/itkInPlaceImageFilter.hxx @@ -50,7 +50,7 @@ InPlaceImageFilter::InternalAllocateOutputs() // then perform a dynamic_cast to the expected InputImageType. This // may fail and that is an expected likely hood, if inputPtr is nullptr // then this filter will not run in-place. - const auto * inputPtr = dynamic_cast(this->ProcessObject::GetInput(0)); + const auto * inputPtr = dynamic_cast(this->ProcessObject::GetInput(0)); OutputImageType * outputPtr = this->GetOutput(); // if told to run in place and the types support it, diff --git a/Modules/Core/Common/include/itkIndent.h b/Modules/Core/Common/include/itkIndent.h index 277e2484ae4..4c48adc53d1 100644 --- a/Modules/Core/Common/include/itkIndent.h +++ b/Modules/Core/Common/include/itkIndent.h @@ -80,7 +80,7 @@ class ITKCommon_EXPORT Indent /** Print out the indentation. Basically output a bunch of spaces. */ friend ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & os, const Indent & ind); + operator<<(std::ostream & os, const Indent & ind); private: int m_Indent; diff --git a/Modules/Core/Common/include/itkIndexRange.h b/Modules/Core/Common/include/itkIndexRange.h index b0af309ac4a..2181764e5a2 100644 --- a/Modules/Core/Common/include/itkIndexRange.h +++ b/Modules/Core/Common/include/itkIndexRange.h @@ -277,9 +277,9 @@ class IndexRange final using MinIndexType = std::conditional_t; // Private constructor, only used by friend class IndexRange. - constexpr const_iterator(const IndexType & index, + constexpr const_iterator(const IndexType & index, const MinIndexType & minIndex, - const IndexType & maxIndex) noexcept + const IndexType & maxIndex) noexcept : // Note: Use parentheses instead of curly braces to initialize data members, // to avoid AppleClang 6.0.0.6000056 compilation error, "no viable conversion..." m_Index(index) diff --git a/Modules/Core/Common/include/itkIterationReporter.h b/Modules/Core/Common/include/itkIterationReporter.h index 79d83656b00..981fe4c6f21 100644 --- a/Modules/Core/Common/include/itkIterationReporter.h +++ b/Modules/Core/Common/include/itkIterationReporter.h @@ -78,9 +78,9 @@ class ITKCommon_EXPORT IterationReporter protected: ProcessObject * m_Filter; - ThreadIdType m_ThreadId; - unsigned long m_StepsPerUpdate; - unsigned long m_StepsBeforeUpdate; + ThreadIdType m_ThreadId; + unsigned long m_StepsPerUpdate; + unsigned long m_StepsBeforeUpdate; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkLaplacianOperator.hxx b/Modules/Core/Common/include/itkLaplacianOperator.hxx index fee8be394cf..47b73ce53c0 100644 --- a/Modules/Core/Common/include/itkLaplacianOperator.hxx +++ b/Modules/Core/Common/include/itkLaplacianOperator.hxx @@ -71,7 +71,7 @@ LaplacianOperator::GenerateCoefficients() -> Coe // Create a vector of the correct size to hold the coefficients. const unsigned int w = this->Size(); - CoefficientVector coeffP(w); + CoefficientVector coeffP(w); // Set the coefficients double sum = 0.0; diff --git a/Modules/Core/Common/include/itkLightObject.h b/Modules/Core/Common/include/itkLightObject.h index a2a70dcd47f..d5cd8e2d815 100644 --- a/Modules/Core/Common/include/itkLightObject.h +++ b/Modules/Core/Common/include/itkLightObject.h @@ -172,7 +172,7 @@ class ITKCommon_EXPORT LightObject * interesting to print out. */ ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & os, const LightObject & o); +operator<<(std::ostream & os, const LightObject & o); } // end namespace itk diff --git a/Modules/Core/Common/include/itkLightProcessObject.h b/Modules/Core/Common/include/itkLightProcessObject.h index cb4dd5969ef..44a68a890ac 100644 --- a/Modules/Core/Common/include/itkLightProcessObject.h +++ b/Modules/Core/Common/include/itkLightProcessObject.h @@ -132,7 +132,7 @@ class ITKCommon_EXPORT LightProcessObject : public Object /** * These support the progress method and aborting filter execution. */ - bool m_AbortGenerateData{}; + bool m_AbortGenerateData{}; float m_Progress{}; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkLineCell.hxx b/Modules/Core/Common/include/itkLineCell.hxx index f5026733bd9..ddb2049c040 100644 --- a/Modules/Core/Common/include/itkLineCell.hxx +++ b/Modules/Core/Common/include/itkLineCell.hxx @@ -80,9 +80,9 @@ LineCell::GetNumberOfBoundaryFeatures(int dimension) const -> Ce */ template bool -LineCell::GetBoundaryFeature(int dimension, +LineCell::GetBoundaryFeature(int dimension, CellFeatureIdentifier featureId, - CellAutoPointer & cellPointer) + CellAutoPointer & cellPointer) { VertexAutoPointer vertexPointer; if ((dimension == 0) && this->GetVertex(featureId, vertexPointer)) @@ -119,7 +119,7 @@ template void LineCell::SetPointIds(PointIdConstIterator first, PointIdConstIterator last) { - int localId = 0; + int localId = 0; PointIdConstIterator ii(first); while (ii != last) diff --git a/Modules/Core/Common/include/itkLineConstIterator.hxx b/Modules/Core/Common/include/itkLineConstIterator.hxx index 29e878d8660..d02beb5aa49 100644 --- a/Modules/Core/Common/include/itkLineConstIterator.hxx +++ b/Modules/Core/Common/include/itkLineConstIterator.hxx @@ -39,7 +39,7 @@ LineConstIterator::LineConstIterator(const ImageType * imagePtr, } IndexValueType maxDistance = 0; - unsigned int maxDistanceDimension = 0; + unsigned int maxDistanceDimension = 0; for (unsigned int i = 0; i < TImage::ImageDimension; ++i) { const IndexValueType distance = itk::Math::abs(difference[i]); diff --git a/Modules/Core/Common/include/itkLoggerBase.h b/Modules/Core/Common/include/itkLoggerBase.h index 80d35165cfb..2ef0350b4e8 100644 --- a/Modules/Core/Common/include/itkLoggerBase.h +++ b/Modules/Core/Common/include/itkLoggerBase.h @@ -63,9 +63,9 @@ class LoggerBaseEnums // Define how to print enumeration extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const LoggerBaseEnums::PriorityLevel value); +operator<<(std::ostream & out, const LoggerBaseEnums::PriorityLevel value); extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const LoggerBaseEnums::TimeStampFormat value); +operator<<(std::ostream & out, const LoggerBaseEnums::TimeStampFormat value); /** \class LoggerBase * \brief Used for logging information during a run. diff --git a/Modules/Core/Common/include/itkLoggerManager.h b/Modules/Core/Common/include/itkLoggerManager.h index 2fe1a3bc09b..a2d1e034160 100644 --- a/Modules/Core/Common/include/itkLoggerManager.h +++ b/Modules/Core/Common/include/itkLoggerManager.h @@ -64,13 +64,13 @@ class ITKCommon_EXPORT LoggerManager : public Object /** create a logger and add it into LoggerManager */ LoggerPointer - CreateLogger(const NameType & name, + CreateLogger(const NameType & name, PriorityLevelEnum level, PriorityLevelEnum levelForFlushing = LoggerBase::PriorityLevelEnum::MUSTFLUSH); /** create a thread logger and add it into LoggerManager */ ThreadLoggerPointer - CreateThreadLogger(const NameType & name, + CreateThreadLogger(const NameType & name, PriorityLevelEnum level, PriorityLevelEnum levelForFlushing = LoggerBase::PriorityLevelEnum::MUSTFLUSH); diff --git a/Modules/Core/Common/include/itkLoggerThreadWrapper.h b/Modules/Core/Common/include/itkLoggerThreadWrapper.h index 1e3ede5bfe9..4de16a64d74 100644 --- a/Modules/Core/Common/include/itkLoggerThreadWrapper.h +++ b/Modules/Core/Common/include/itkLoggerThreadWrapper.h @@ -51,7 +51,7 @@ class LoggerThreadWrapperEnums }; // Define how to print enumeration extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const LoggerThreadWrapperEnums::Operation value); +operator<<(std::ostream & out, const LoggerThreadWrapperEnums::Operation value); /** \class LoggerThreadWrapper diff --git a/Modules/Core/Common/include/itkLoggerThreadWrapper.hxx b/Modules/Core/Common/include/itkLoggerThreadWrapper.hxx index c534de7ec96..97ef3f069e5 100644 --- a/Modules/Core/Common/include/itkLoggerThreadWrapper.hxx +++ b/Modules/Core/Common/include/itkLoggerThreadWrapper.hxx @@ -43,7 +43,7 @@ typename SimpleLoggerType::PriorityLevelEnum LoggerThreadWrapper::GetPriorityLevel() const { const std::lock_guard lockGuard(m_Mutex); - const PriorityLevelEnum level = this->m_PriorityLevel; + const PriorityLevelEnum level = this->m_PriorityLevel; return level; } @@ -62,7 +62,7 @@ typename SimpleLoggerType::PriorityLevelEnum LoggerThreadWrapper::GetLevelForFlushing() const { const std::lock_guard lockGuard(m_Mutex); - const PriorityLevelEnum level = this->m_LevelForFlushing; + const PriorityLevelEnum level = this->m_LevelForFlushing; return level; } @@ -79,7 +79,7 @@ auto LoggerThreadWrapper::GetDelay() const -> DelayType { const std::lock_guard lockGuard(m_Mutex); - const DelayType delay = this->m_Delay; + const DelayType delay = this->m_Delay; return delay; } diff --git a/Modules/Core/Common/include/itkMacro.h b/Modules/Core/Common/include/itkMacro.h index d8dc4870aef..2ab894cb3f3 100644 --- a/Modules/Core/Common/include/itkMacro.h +++ b/Modules/Core/Common/include/itkMacro.h @@ -343,7 +343,7 @@ namespace itk #define itkFactorylessNewMacro(x) \ static Pointer New() \ { \ - auto * rawPtr = new x(); \ + auto * rawPtr = new x(); \ Pointer smartPtr = rawPtr; \ rawPtr->UnRegister(); \ return smartPtr; \ diff --git a/Modules/Core/Common/include/itkMath.h b/Modules/Core/Common/include/itkMath.h index a4b837206d7..465ef0af7f5 100644 --- a/Modules/Core/Common/include/itkMath.h +++ b/Modules/Core/Common/include/itkMath.h @@ -306,9 +306,9 @@ FloatAddULP(T x, typename Detail::FloatIEEE::IntType ulps) */ template inline bool -FloatAlmostEqual(T x1, - T x2, - typename Detail::FloatIEEE::IntType maxUlps = 4, +FloatAlmostEqual(T x1, + T x2, + typename Detail::FloatIEEE::IntType maxUlps = 4, typename Detail::FloatIEEE::FloatType maxAbsoluteDifference = 0.1 * itk::NumericTraits::epsilon()) { diff --git a/Modules/Core/Common/include/itkMathDetail.h b/Modules/Core/Common/include/itkMathDetail.h index 33154e5434e..eebbdff8971 100644 --- a/Modules/Core/Common/include/itkMathDetail.h +++ b/Modules/Core/Common/include/itkMathDetail.h @@ -494,8 +494,8 @@ union FloatIEEE using UIntType = typename FloatIEEETraits::UIntType; FloatType asFloat; - IntType asInt; - UIntType asUInt; + IntType asInt; + UIntType asUInt; FloatIEEE(FloatType f) : asFloat(f) diff --git a/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h b/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h index dccb891be87..3aac811aa2e 100644 --- a/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h +++ b/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h @@ -350,7 +350,7 @@ MersenneTwisterRandomVariateGenerator::Initialize(const IntegerType seed) // only MSBs of the state array. Modified 9 Jan 2002 by Makoto Matsumoto. IntegerType * s = state; IntegerType * r = state; - IntegerType i = 1; + IntegerType i = 1; *s++ = seed & 0xffffffffUL; for (i = 1; i < MersenneTwisterRandomVariateGenerator::StateVectorLength; ++i) diff --git a/Modules/Core/Common/include/itkMinimumMaximumImageCalculator.h b/Modules/Core/Common/include/itkMinimumMaximumImageCalculator.h index 3c1290a2e65..aa98661cb4f 100644 --- a/Modules/Core/Common/include/itkMinimumMaximumImageCalculator.h +++ b/Modules/Core/Common/include/itkMinimumMaximumImageCalculator.h @@ -115,15 +115,15 @@ class ITK_TEMPLATE_EXPORT MinimumMaximumImageCalculator : public Object PrintSelf(std::ostream & os, Indent indent) const override; private: - PixelType m_Minimum{ NumericTraits::max() }; - PixelType m_Maximum{ NumericTraits::NonpositiveMin() }; + PixelType m_Minimum{ NumericTraits::max() }; + PixelType m_Maximum{ NumericTraits::NonpositiveMin() }; ImageConstPointer m_Image{ TInputImage::New() }; IndexType m_IndexOfMinimum{}; IndexType m_IndexOfMaximum{}; RegionType m_Region{}; - bool m_RegionSetByUser{}; + bool m_RegionSetByUser{}; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkMultiThreaderBase.h b/Modules/Core/Common/include/itkMultiThreaderBase.h index 4af5bf37ceb..800eb22bd64 100644 --- a/Modules/Core/Common/include/itkMultiThreaderBase.h +++ b/Modules/Core/Common/include/itkMultiThreaderBase.h @@ -82,9 +82,9 @@ class MultiThreaderBaseEnums }; // Define how to print enumeration extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const MultiThreaderBaseEnums::Threader value); +operator<<(std::ostream & out, const MultiThreaderBaseEnums::Threader value); extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const MultiThreaderBaseEnums::ThreadExitCode value); +operator<<(std::ostream & out, const MultiThreaderBaseEnums::ThreadExitCode value); /** \class MultiThreaderBase * \brief A class for performing multithreaded execution @@ -251,9 +251,9 @@ INTEL_SUPPRESS_warning_1292 INTEL_PRAGMA_WARN_POP // clang-format on { - ThreadIdType ThreadID; - ThreadIdType NumberOfThreads; - void * UserData; + ThreadIdType ThreadID; + ThreadIdType NumberOfThreads; + void * UserData; ThreadFunctionType ThreadFunction; enum { @@ -277,9 +277,9 @@ ITK_GCC_PRAGMA_DIAG_POP() * (void *)arg passed into the SetSingleMethod. */ struct WorkUnitInfo { - ThreadIdType WorkUnitID; - ThreadIdType NumberOfWorkUnits; - void * UserData; + ThreadIdType WorkUnitID; + ThreadIdType NumberOfWorkUnits; + void * UserData; ThreadFunctionType ThreadFunction; using ThreadExitCodeEnum = MultiThreaderBaseEnums::ThreadExitCode; ThreadExitCodeEnum ThreadExitCode; @@ -328,10 +328,10 @@ ITK_GCC_PRAGMA_DIAG_POP() * This implementation simply delegates parallelization to the old interface * SetSingleMethod+SingleMethodExecute. This method is meant to be overloaded! */ virtual void - ParallelizeArray(SizeValueType firstIndex, - SizeValueType lastIndexPlus1, + ParallelizeArray(SizeValueType firstIndex, + SizeValueType lastIndexPlus1, ArrayThreadingFunctorType aFunc, - ProcessObject * filter); + ProcessObject * filter); /** Break up region into smaller chunks, and call the user-specified function or function object `funcP` for each * chunk, having the region of the chunk as argument. The type of such a chuck region is `ImageRegion`. @@ -363,10 +363,10 @@ ITK_GCC_PRAGMA_DIAG_POP() * and no parallelization occurs. */ template ITK_TEMPLATE_EXPORT void - ParallelizeImageRegionRestrictDirection(unsigned int restrictedDirection, + ParallelizeImageRegionRestrictDirection(unsigned int restrictedDirection, const ImageRegion & requestedRegion, - TFunction funcP, - ProcessObject * filter) + TFunction funcP, + ProcessObject * filter) { if constexpr (VDimension <= 1) // Cannot split, no parallelization { @@ -379,7 +379,7 @@ ITK_GCC_PRAGMA_DIAG_POP() constexpr unsigned int SplitDimension = VDimension - 1; Index splitIndex{}; - Size splitSize{}; + Size splitSize{}; for (unsigned int splitDimension = 0, dimension = 0; dimension < VDimension; ++dimension) { if (dimension != restrictedDirection) @@ -416,11 +416,11 @@ ITK_GCC_PRAGMA_DIAG_POP() /** Break up region into smaller chunks, and call the function with chunks as parameters. * This overload does the actual work and should be implemented by derived classes. */ virtual void - ParallelizeImageRegion(unsigned int dimension, + ParallelizeImageRegion(unsigned int dimension, const IndexValueType index[], - const SizeValueType size[], + const SizeValueType size[], ThreadingFunctorType funcP, - ProcessObject * filter); + ProcessObject * filter); protected: MultiThreaderBase(); @@ -431,9 +431,9 @@ ITK_GCC_PRAGMA_DIAG_POP() struct ArrayCallback { ArrayThreadingFunctorType functor; - const SizeValueType firstIndex; - const SizeValueType lastIndexPlus1; - ProcessObject * filter; + const SizeValueType firstIndex; + const SizeValueType lastIndexPlus1; + ProcessObject * filter; }; static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION @@ -441,11 +441,11 @@ ITK_GCC_PRAGMA_DIAG_POP() struct RegionAndCallback { - ThreadingFunctorType functor; - unsigned int dimension; + ThreadingFunctorType functor; + unsigned int dimension; const IndexValueType * index; - const SizeValueType * size; - ProcessObject * filter; + const SizeValueType * size; + ProcessObject * filter; }; static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION diff --git a/Modules/Core/Common/include/itkNeighborhood.hxx b/Modules/Core/Common/include/itkNeighborhood.hxx index 5f9b70991ee..c61e3d6b69c 100644 --- a/Modules/Core/Common/include/itkNeighborhood.hxx +++ b/Modules/Core/Common/include/itkNeighborhood.hxx @@ -90,7 +90,7 @@ std::slice Neighborhood::GetSlice(unsigned int d) const { const OffsetValueType t = this->GetStride(d); - const auto s = static_cast(this->GetSize()[d]); + const auto s = static_cast(this->GetSize()[d]); OffsetValueType n = this->Size() / 2; n -= t * s / 2; diff --git a/Modules/Core/Common/include/itkNeighborhoodAccessorFunctor.h b/Modules/Core/Common/include/itkNeighborhoodAccessorFunctor.h index e0b1ee4faf8..7fdd9bcb2fb 100644 --- a/Modules/Core/Common/include/itkNeighborhoodAccessorFunctor.h +++ b/Modules/Core/Common/include/itkNeighborhoodAccessorFunctor.h @@ -80,9 +80,9 @@ class ITK_TEMPLATE_EXPORT NeighborhoodAccessorFunctor final template inline typename ImageBoundaryConditionType::OutputPixelType - BoundaryCondition(const OffsetType & point_index, - const OffsetType & boundary_offset, - const NeighborhoodType * data, + BoundaryCondition(const OffsetType & point_index, + const OffsetType & boundary_offset, + const NeighborhoodType * data, const ImageBoundaryConditionType * boundaryCondition) const { return boundaryCondition->operator()(point_index, boundary_offset, data); diff --git a/Modules/Core/Common/include/itkNeighborhoodAlgorithm.h b/Modules/Core/Common/include/itkNeighborhoodAlgorithm.h index baa22d54b7e..359e9d9dcb4 100644 --- a/Modules/Core/Common/include/itkNeighborhoodAlgorithm.h +++ b/Modules/Core/Common/include/itkNeighborhoodAlgorithm.h @@ -109,7 +109,7 @@ struct ImageBoundaryFacesCalculator private: friend struct ImageBoundaryFacesCalculator; - RegionType m_NonBoundaryRegion; + RegionType m_NonBoundaryRegion; FaceListType m_BoundaryFaces; }; diff --git a/Modules/Core/Common/include/itkNeighborhoodAlgorithm.hxx b/Modules/Core/Common/include/itkNeighborhoodAlgorithm.hxx index 39e63b41c4a..ac624f52ea5 100644 --- a/Modules/Core/Common/include/itkNeighborhoodAlgorithm.hxx +++ b/Modules/Core/Common/include/itkNeighborhoodAlgorithm.hxx @@ -51,11 +51,11 @@ ImageBoundaryFacesCalculator::Compute(const TImage & img, RegionType reg } const IndexType bStart = bufferedRegion.GetIndex(); - const SizeType bSize = bufferedRegion.GetSize(); + const SizeType bSize = bufferedRegion.GetSize(); const IndexType rStart = regionToProcess.GetIndex(); - const SizeType rSize = regionToProcess.GetSize(); + const SizeType rSize = regionToProcess.GetSize(); - SizeType nbSize = rSize; // Non-boundary region + SizeType nbSize = rSize; // Non-boundary region IndexType nbStart = rStart; // data. IndexType vrStart = @@ -66,7 +66,7 @@ ImageBoundaryFacesCalculator::Compute(const TImage & img, RegionType reg for (unsigned int i = 0; i < ImageDimension; ++i) { IndexType fStart; // Boundary, "face" - SizeType fSize; // region data. + SizeType fSize; // region data. auto overlapLow = static_cast((rStart[i] - radius[i]) - bStart[i]); // image buffered region should be more than twice of the radius, diff --git a/Modules/Core/Common/include/itkNeighborhoodAllocator.h b/Modules/Core/Common/include/itkNeighborhoodAllocator.h index 7e7476ed628..a1fc0afda4c 100644 --- a/Modules/Core/Common/include/itkNeighborhoodAllocator.h +++ b/Modules/Core/Common/include/itkNeighborhoodAllocator.h @@ -185,7 +185,7 @@ class NeighborhoodAllocator } private: - unsigned int m_ElementCount{ 0 }; + unsigned int m_ElementCount{ 0 }; std::unique_ptr m_Data; }; diff --git a/Modules/Core/Common/include/itkNeighborhoodInnerProduct.h b/Modules/Core/Common/include/itkNeighborhoodInnerProduct.h index ce03840d54c..f89a3812433 100644 --- a/Modules/Core/Common/include/itkNeighborhoodInnerProduct.h +++ b/Modules/Core/Common/include/itkNeighborhoodInnerProduct.h @@ -66,15 +66,15 @@ class ITK_TEMPLATE_EXPORT NeighborhoodInnerProduct static OutputPixelType Compute(const ConstNeighborhoodIterator & it, - const OperatorType & op, - const unsigned int start = 0, - const unsigned int stride = 1); + const OperatorType & op, + const unsigned int start = 0, + const unsigned int stride = 1); static OutputPixelType Compute(const NeighborhoodType & N, - const OperatorType & op, - const unsigned int start = 0, - const unsigned int stride = 1); + const OperatorType & op, + const unsigned int start = 0, + const unsigned int stride = 1); /** Reference oeprator. */ OutputPixelType diff --git a/Modules/Core/Common/include/itkNeighborhoodInnerProduct.hxx b/Modules/Core/Common/include/itkNeighborhoodInnerProduct.hxx index 2db414e19df..a0b0029dbd1 100644 --- a/Modules/Core/Common/include/itkNeighborhoodInnerProduct.hxx +++ b/Modules/Core/Common/include/itkNeighborhoodInnerProduct.hxx @@ -25,8 +25,8 @@ namespace itk template auto NeighborhoodInnerProduct::Compute(const ConstNeighborhoodIterator & it, - const OperatorType & op, - const unsigned int start, + const OperatorType & op, + const unsigned int start, const unsigned int stride) -> OutputPixelType { using InputPixelType = typename TImage::PixelType; @@ -36,8 +36,8 @@ NeighborhoodInnerProduct::Compute(const ConstNe using OutputPixelValueType = typename NumericTraits::ValueType; const typename OperatorType::ConstIterator op_end = op.End(); - typename OperatorType::ConstIterator o_it = op.Begin(); - AccumulateRealType sum{}; + typename OperatorType::ConstIterator o_it = op.Begin(); + AccumulateRealType sum{}; for (unsigned int i = start; o_it < op_end; i += stride, ++o_it) { @@ -53,9 +53,9 @@ auto NeighborhoodInnerProduct::Compute( /* const ImageBoundaryCondition *,*/ const NeighborhoodType & N, - const OperatorType & op, - const unsigned int start, - const unsigned int stride) -> OutputPixelType + const OperatorType & op, + const unsigned int start, + const unsigned int stride) -> OutputPixelType { typename OperatorType::ConstIterator o_it; diff --git a/Modules/Core/Common/include/itkNeighborhoodIterator.hxx b/Modules/Core/Common/include/itkNeighborhoodIterator.hxx index befdd2266f7..038475da20c 100644 --- a/Modules/Core/Common/include/itkNeighborhoodIterator.hxx +++ b/Modules/Core/Common/include/itkNeighborhoodIterator.hxx @@ -125,7 +125,7 @@ NeighborhoodIterator::SetPixel(const unsigned int n, if (!this->m_InBounds[i]) // Part of dimension spills out of bounds { const typename OffsetType::OffsetValueType OverlapLow = this->m_InnerBoundsLow[i] - this->m_Loop[i]; - const auto OverlapHigh = + const auto OverlapHigh = static_cast(this->GetSize(i) - ((this->m_Loop[i] + 2) - this->m_InnerBoundsHigh[i])); if (temp[i] < OverlapLow || OverlapHigh < temp[i]) { diff --git a/Modules/Core/Common/include/itkNeighborhoodIteratorTestCommon.hxx b/Modules/Core/Common/include/itkNeighborhoodIteratorTestCommon.hxx index 1ea2a2947a5..02d70a19760 100644 --- a/Modules/Core/Common/include/itkNeighborhoodIteratorTestCommon.hxx +++ b/Modules/Core/Common/include/itkNeighborhoodIteratorTestCommon.hxx @@ -36,8 +36,8 @@ template void printnb(const TIteratorType & nb, bool full) { - unsigned long count = 1; - const unsigned long sz = nb.GetRadius()[0] * 2 + 1; + unsigned long count = 1; + const unsigned long sz = nb.GetRadius()[0] * 2 + 1; typename TIteratorType::ConstIterator it; if (full) { @@ -68,8 +68,8 @@ FillImage(itk::Image, VDimension> * img) using ImageType = itk::Image; const itk::Size size = img->GetRequestedRegion().GetSize(); - unsigned int i; - IndexType loop{}; + unsigned int i; + IndexType loop{}; itk::ImageRegionIterator it(img, img->GetRequestedRegion()); while (!it.IsAtEnd()) diff --git a/Modules/Core/Common/include/itkNeighborhoodOperator.hxx b/Modules/Core/Common/include/itkNeighborhoodOperator.hxx index 6805842c3e4..a66c492855e 100644 --- a/Modules/Core/Common/include/itkNeighborhoodOperator.hxx +++ b/Modules/Core/Common/include/itkNeighborhoodOperator.hxx @@ -43,7 +43,7 @@ NeighborhoodOperator::FlipAxes() for (unsigned int i = 0; i < size / 2; ++i) { const unsigned int swap_with = size - 1 - i; - const PixelType temp{ this->operator[](i) }; + const PixelType temp{ this->operator[](i) }; this->operator[](i) = this->operator[](swap_with); @@ -55,7 +55,7 @@ template void NeighborhoodOperator::CreateDirectional() { - SizeValueType k[VDimension]; + SizeValueType k[VDimension]; const CoefficientVector coefficients{ this->GenerateCoefficients() }; for (unsigned int i = 0; i < VDimension; ++i) { @@ -102,7 +102,7 @@ NeighborhoodOperator::FillCenteredDirectional(co this->InitializeToZero(); // Collect slice information - unsigned long start = 0; + unsigned long start = 0; const unsigned long stride = this->GetStride(m_Direction); const unsigned long size = this->GetSize(m_Direction); for (unsigned int i = 0; i < VDimension; ++i) @@ -117,7 +117,7 @@ NeighborhoodOperator::FillCenteredDirectional(co const int sizediff = (static_cast(size) - static_cast(coeff.size())) >> 1; // Create a slice iterator centered in the neighborhood. - std::slice temp_slice; + std::slice temp_slice; typename CoefficientVector::const_iterator it; if (sizediff >= 0) { diff --git a/Modules/Core/Common/include/itkNumberToString.h b/Modules/Core/Common/include/itkNumberToString.h index b599c0e4c67..de7b3eaec16 100644 --- a/Modules/Core/Common/include/itkNumberToString.h +++ b/Modules/Core/Common/include/itkNumberToString.h @@ -56,10 +56,10 @@ class ITK_TEMPLATE_EXPORT NumberToString // declaration of specialization template <> ITKCommon_EXPORT std::string - NumberToString::operator()(double val) const; +NumberToString::operator()(double val) const; template <> ITKCommon_EXPORT std::string - NumberToString::operator()(float val) const; +NumberToString::operator()(float val) const; template <> class NumberToString diff --git a/Modules/Core/Common/include/itkObjectFactoryBase.h b/Modules/Core/Common/include/itkObjectFactoryBase.h index f45afed5758..400ec6a59dd 100644 --- a/Modules/Core/Common/include/itkObjectFactoryBase.h +++ b/Modules/Core/Common/include/itkObjectFactoryBase.h @@ -133,7 +133,7 @@ class ITKCommon_EXPORT ObjectFactoryBase : public Object static bool RegisterFactory(ObjectFactoryBase *, InsertionPositionEnum where = InsertionPositionEnum::INSERT_AT_BACK, - size_t position = 0); + size_t position = 0); /** Remove a factory from the list of registered factories. */ static void @@ -234,10 +234,10 @@ class ITKCommon_EXPORT ObjectFactoryBase : public Object /** Register object creation information with the factory. */ void - RegisterOverride(const char * classOverride, - const char * subclass, - const char * description, - bool enableFlag, + RegisterOverride(const char * classOverride, + const char * subclass, + const char * description, + bool enableFlag, CreateObjectFunctionBase * createFunction); /** This method is provided by sub-classes of ObjectFactoryBase. @@ -281,9 +281,9 @@ class ITKCommon_EXPORT ObjectFactoryBase : public Object /** Member variables for a factory set by the base class * at load or register time */ - void * m_LibraryHandle{}; + void * m_LibraryHandle{}; unsigned long m_LibraryDate{}; - std::string m_LibraryPath{}; + std::string m_LibraryPath{}; static ObjectFactoryBasePrivate * m_PimplGlobals; }; diff --git a/Modules/Core/Common/include/itkObjectStore.h b/Modules/Core/Common/include/itkObjectStore.h index 2cd29e891a1..8cde2fdccb0 100644 --- a/Modules/Core/Common/include/itkObjectStore.h +++ b/Modules/Core/Common/include/itkObjectStore.h @@ -44,7 +44,7 @@ class ObjectStoreEnums }; }; extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const ObjectStoreEnums::GrowthStrategy value); +operator<<(std::ostream & out, const ObjectStoreEnums::GrowthStrategy value); /** \class ObjectStore * \brief A specialized memory management object for allocating and destroying @@ -190,7 +190,7 @@ class ITK_TEMPLATE_EXPORT ObjectStore : public Object delete[] Begin; } - ObjectType * Begin{}; + ObjectType * Begin{}; SizeValueType Size{ 0 }; }; diff --git a/Modules/Core/Common/include/itkOctree.h b/Modules/Core/Common/include/itkOctree.h index 6d5544fa85d..bf2fc04c2be 100644 --- a/Modules/Core/Common/include/itkOctree.h +++ b/Modules/Core/Common/include/itkOctree.h @@ -91,7 +91,7 @@ class ITKCommon_EXPORT OctreeBase : public Object * the pixel buffer. */ virtual void - BuildFromBuffer(const void * buffer, + BuildFromBuffer(const void * buffer, const unsigned int xsize, const unsigned int ysize, const unsigned int zsize) = 0; @@ -144,7 +144,7 @@ class ITK_TEMPLATE_EXPORT Octree : public OctreeBase GetImage(); void - BuildFromBuffer(const void * frombuffer, + BuildFromBuffer(const void * frombuffer, const unsigned int xsize, const unsigned int ysize, const unsigned int zsize) override; @@ -204,13 +204,13 @@ class ITK_TEMPLATE_EXPORT Octree : public OctreeBase private: OctreeNodeBranch * maskToOctree(const TPixel * Mask, - unsigned int width, - unsigned int x, - unsigned int y, - unsigned int z, - unsigned int xsize, - unsigned int ysize, - unsigned int zsize); + unsigned int width, + unsigned int x, + unsigned int y, + unsigned int z, + unsigned int xsize, + unsigned int ysize, + unsigned int zsize); OctreeEnum m_Plane{ OctreeEnum::UNKNOWN_PLANE }; // The orientation of the plane for this octree @@ -218,10 +218,10 @@ class ITK_TEMPLATE_EXPORT Octree : public OctreeBase // and large enough to contain MAX(DIMS[1,2,3]) unsigned int m_Width{ 0 }; - unsigned int m_Depth{ 0 }; // The depth of the Octree - unsigned int m_TrueDims[3]{}; // The true dimensions of the image - OctreeNodeBranch m_ColorTable[ColorTableSize]; - OctreeNode m_Tree{}; + unsigned int m_Depth{ 0 }; // The depth of the Octree + unsigned int m_TrueDims[3]{}; // The true dimensions of the image + OctreeNodeBranch m_ColorTable[ColorTableSize]; + OctreeNode m_Tree{}; MappingFunctionType m_MappingFunction{}; }; } // namespace itk diff --git a/Modules/Core/Common/include/itkOctree.hxx b/Modules/Core/Common/include/itkOctree.hxx index 3e9d5fc03f3..155a739771b 100644 --- a/Modules/Core/Common/include/itkOctree.hxx +++ b/Modules/Core/Common/include/itkOctree.hxx @@ -147,13 +147,13 @@ Octree::GetValue(const unsigned int template OctreeNodeBranch * Octree::maskToOctree(const TPixel * Mask, - unsigned int width, - unsigned int x, - unsigned int y, - unsigned int z, - unsigned int xsize, - unsigned int ysize, - unsigned int zsize) + unsigned int width, + unsigned int x, + unsigned int y, + unsigned int z, + unsigned int xsize, + unsigned int ysize, + unsigned int zsize) { if ((x >= xsize) || (y >= ysize) || (z >= zsize)) { @@ -222,14 +222,14 @@ Octree::maskToOctree(const TPixel * template void -Octree::BuildFromBuffer(const void * frombuffer, +Octree::BuildFromBuffer(const void * frombuffer, const unsigned int xsize, const unsigned int ysize, const unsigned int zsize) { const unsigned int maxSize = xsize >= ysize ? (xsize >= zsize ? xsize : zsize) : (ysize >= zsize ? ysize : zsize); - unsigned int width = 1; - unsigned int depth = 0; + unsigned int width = 1; + unsigned int depth = 0; while (width < maxSize) { @@ -241,7 +241,7 @@ Octree::BuildFromBuffer(const void m_TrueDims[0] = xsize; m_TrueDims[1] = ysize; m_TrueDims[2] = zsize; - const auto * bufcast = static_cast(frombuffer); + const auto * bufcast = static_cast(frombuffer); OctreeNodeBranch * branch = this->maskToOctree(bufcast, width, 0, 0, 0, xsize, ysize, zsize); m_Tree.SetBranch(branch); } @@ -251,9 +251,9 @@ void Octree::BuildFromImage(ImageType * fromImage) { const typename Image::RegionType & region = fromImage->GetLargestPossibleRegion(); - const SizeValueType xsize = region.GetSize(0); - const SizeValueType ysize = region.GetSize(1); - const SizeValueType zsize = region.GetSize(2); + const SizeValueType xsize = region.GetSize(0); + const SizeValueType ysize = region.GetSize(1); + const SizeValueType zsize = region.GetSize(2); this->BuildFromBuffer(static_cast(fromImage->GetBufferPointer()), xsize, ysize, zsize); } @@ -262,14 +262,14 @@ auto Octree::GetImage() -> ImageTypePointer { typename ImageType::SizeType imageSize = { { 0, 0, 0 } }; - SizeValueType sizes[3]; + SizeValueType sizes[3]; sizes[0] = m_TrueDims[0]; sizes[1] = m_TrueDims[1]; sizes[2] = m_TrueDims[2]; imageSize.SetSize(sizes); - const typename ImageType::IndexType imageIndex = { { 0, 0, 0 } }; + const typename ImageType::IndexType imageIndex = { { 0, 0, 0 } }; const typename ImageType::RegionType region(imageIndex, imageSize); - auto img = ImageType::New(); + auto img = ImageType::New(); img->SetRegions(region); img->Allocate(); typename ImageType::IndexType setIndex; diff --git a/Modules/Core/Common/include/itkOctreeNode.h b/Modules/Core/Common/include/itkOctreeNode.h index 0202f1cbb1b..b93b229a2c4 100644 --- a/Modules/Core/Common/include/itkOctreeNode.h +++ b/Modules/Core/Common/include/itkOctreeNode.h @@ -139,7 +139,7 @@ class ITKCommon_EXPORT OctreeNode * Each element holds COLOR or pointer to another octree node */ OctreeNodeBranch * m_Branch{}; - OctreeBase * m_Parent{}; + OctreeBase * m_Parent{}; }; class ITKCommon_EXPORT OctreeNodeBranch diff --git a/Modules/Core/Common/include/itkOutputWindow.h b/Modules/Core/Common/include/itkOutputWindow.h index 8afd0ed7b11..eb4e66e0328 100644 --- a/Modules/Core/Common/include/itkOutputWindow.h +++ b/Modules/Core/Common/include/itkOutputWindow.h @@ -134,8 +134,8 @@ class ITKCommon_EXPORT OutputWindow : public Object private: itkGetGlobalDeclarationMacro(OutputWindowGlobals, PimplGlobals); - std::atomic m_PromptUser{}; - std::mutex m_cerrMutex{}; + std::atomic m_PromptUser{}; + std::mutex m_cerrMutex{}; static OutputWindowGlobals * m_PimplGlobals; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkPeriodicBoundaryCondition.h b/Modules/Core/Common/include/itkPeriodicBoundaryCondition.h index 1cce746060a..cc00a74e839 100644 --- a/Modules/Core/Common/include/itkPeriodicBoundaryCondition.h +++ b/Modules/Core/Common/include/itkPeriodicBoundaryCondition.h @@ -66,16 +66,16 @@ class ITK_TEMPLATE_EXPORT PeriodicBoundaryCondition : public ImageBoundaryCondit /** Computes and returns a neighborhood of appropriate values from * neighborhood iterator data.. */ OutputPixelType - operator()(const OffsetType & point_index, - const OffsetType & boundary_offset, + operator()(const OffsetType & point_index, + const OffsetType & boundary_offset, const NeighborhoodType * data) const override; /** Computes and returns the appropriate pixel value from * neighborhood iterator data, using the functor. */ OutputPixelType - operator()(const OffsetType & point_index, - const OffsetType & boundary_offset, - const NeighborhoodType * data, + operator()(const OffsetType & point_index, + const OffsetType & boundary_offset, + const NeighborhoodType * data, const NeighborhoodAccessorFunctorType & neighborhoodAccessorFunctor) const override; /** Determines the necessary input region for the output region. diff --git a/Modules/Core/Common/include/itkPeriodicBoundaryCondition.hxx b/Modules/Core/Common/include/itkPeriodicBoundaryCondition.hxx index 67370d287c9..1b00a951c1f 100644 --- a/Modules/Core/Common/include/itkPeriodicBoundaryCondition.hxx +++ b/Modules/Core/Common/include/itkPeriodicBoundaryCondition.hxx @@ -24,16 +24,16 @@ namespace itk { template auto -PeriodicBoundaryCondition::operator()(const OffsetType & point_index, - const OffsetType & boundary_offset, +PeriodicBoundaryCondition::operator()(const OffsetType & point_index, + const OffsetType & boundary_offset, const NeighborhoodType * data) const -> OutputPixelType { // This is guaranteed to be called with an object that is using // PeriodicBoundaryCondition const auto * iterator = reinterpret_cast *>(data); typename TInputImage::PixelType * ptr; - int linear_index = 0; - unsigned int i; + int linear_index = 0; + unsigned int i; // Find the pointer of the closest boundary pixel @@ -79,17 +79,17 @@ PeriodicBoundaryCondition::operator()(const OffsetTyp template auto PeriodicBoundaryCondition::operator()( - const OffsetType & point_index, - const OffsetType & boundary_offset, - const NeighborhoodType * data, + const OffsetType & point_index, + const OffsetType & boundary_offset, + const NeighborhoodType * data, const NeighborhoodAccessorFunctorType & neighborhoodAccessorFunctor) const -> OutputPixelType { // This is guaranteed to be called with an object that is using // PeriodicBoundaryCondition const auto * iterator = reinterpret_cast *>(data); typename TInputImage::InternalPixelType * ptr; - int linear_index = 0; - unsigned int i; + int linear_index = 0; + unsigned int i; // Find the pointer of the closest boundary pixel // std::cout << "Boundary offset = " << boundary_offset << std::endl; @@ -139,13 +139,13 @@ PeriodicBoundaryCondition::GetInputRequestedRegion( const RegionType & outputRequestedRegion) const -> RegionType { IndexType imageIndex = inputLargestPossibleRegion.GetIndex(); - SizeType imageSize = inputLargestPossibleRegion.GetSize(); + SizeType imageSize = inputLargestPossibleRegion.GetSize(); IndexType outputIndex = outputRequestedRegion.GetIndex(); - SizeType outputSize = outputRequestedRegion.GetSize(); + SizeType outputSize = outputRequestedRegion.GetSize(); IndexType inputRequestedIndex; - SizeType inputRequestedSize; + SizeType inputRequestedSize; for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -184,8 +184,8 @@ PeriodicBoundaryCondition::GetPixel(const IndexType & -> OutputPixelType { const RegionType imageRegion = image->GetLargestPossibleRegion(); - IndexType imageIndex = imageRegion.GetIndex(); - SizeType imageSize = imageRegion.GetSize(); + IndexType imageIndex = imageRegion.GetIndex(); + SizeType imageSize = imageRegion.GetSize(); IndexType lookupIndex; diff --git a/Modules/Core/Common/include/itkPhasedArray3DSpecialCoordinatesImage.h b/Modules/Core/Common/include/itkPhasedArray3DSpecialCoordinatesImage.h index 97a8c970224..94c84959031 100644 --- a/Modules/Core/Common/include/itkPhasedArray3DSpecialCoordinatesImage.h +++ b/Modules/Core/Common/include/itkPhasedArray3DSpecialCoordinatesImage.h @@ -187,8 +187,8 @@ class ITK_TEMPLATE_EXPORT PhasedArray3DSpecialCoordinatesImage : public SpecialC TransformPhysicalPointToContinuousIndex(const Point & point) const { const RegionType region = this->GetLargestPossibleRegion(); - const double maxAzimuth = region.GetSize(0) - 1; - const double maxElevation = region.GetSize(1) - 1; + const double maxAzimuth = region.GetSize(0) - 1; + const double maxElevation = region.GetSize(1) - 1; // Convert Cartesian coordinates into angular coordinates TCoordinate azimuth = Math::pi_over_2; @@ -218,7 +218,7 @@ class ITK_TEMPLATE_EXPORT PhasedArray3DSpecialCoordinatesImage : public SpecialC * \sa Transform */ template ITK_NODISCARD("Call the overload which has the point as the only parameter and returns the index") - bool TransformPhysicalPointToContinuousIndex(const Point & point, + bool TransformPhysicalPointToContinuousIndex(const Point & point, ContinuousIndex & index) const { index = this->TransformPhysicalPointToContinuousIndex(point); @@ -237,8 +237,8 @@ class ITK_TEMPLATE_EXPORT PhasedArray3DSpecialCoordinatesImage : public SpecialC TransformPhysicalPointToIndex(const Point & point) const { const RegionType region = this->GetLargestPossibleRegion(); - const double maxAzimuth = region.GetSize(0) - 1; - const double maxElevation = region.GetSize(1) - 1; + const double maxAzimuth = region.GetSize(0) - 1; + const double maxElevation = region.GetSize(1) - 1; // Convert Cartesian coordinates into angular coordinates TCoordinate azimuth = Math::pi_over_2; @@ -285,11 +285,11 @@ class ITK_TEMPLATE_EXPORT PhasedArray3DSpecialCoordinatesImage : public SpecialC template void TransformContinuousIndexToPhysicalPoint(const ContinuousIndex & index, - Point & point) const + Point & point) const { const RegionType region = this->GetLargestPossibleRegion(); - const double maxAzimuth = region.GetSize(0) - 1; - const double maxElevation = region.GetSize(1) - 1; + const double maxAzimuth = region.GetSize(0) - 1; + const double maxElevation = region.GetSize(1) - 1; // Convert the index into proper angular coordinates const TCoordinate azimuth = (index[0] - (maxAzimuth / 2.0)) * m_AzimuthAngularSeparation; @@ -326,8 +326,8 @@ class ITK_TEMPLATE_EXPORT PhasedArray3DSpecialCoordinatesImage : public SpecialC TransformIndexToPhysicalPoint(const IndexType & index, Point & point) const { const RegionType region = this->GetLargestPossibleRegion(); - const double maxAzimuth = region.GetSize(0) - 1; - const double maxElevation = region.GetSize(1) - 1; + const double maxAzimuth = region.GetSize(0) - 1; + const double maxElevation = region.GetSize(1) - 1; // Convert the index into proper angular coordinates const TCoordinate azimuth = (static_cast(index[0]) - (maxAzimuth / 2.0)) * m_AzimuthAngularSeparation; diff --git a/Modules/Core/Common/include/itkPlatformMultiThreader.h b/Modules/Core/Common/include/itkPlatformMultiThreader.h index 75ee19088c0..1354d6ac95e 100644 --- a/Modules/Core/Common/include/itkPlatformMultiThreader.h +++ b/Modules/Core/Common/include/itkPlatformMultiThreader.h @@ -143,7 +143,7 @@ class ITKCommon_EXPORT PlatformMultiThreader : public MultiThreaderBase struct WorkUnitInfo : MultiThreaderBase::WorkUnitInfo { - int * ActiveFlag = nullptr; + int * ActiveFlag = nullptr; std::shared_ptr ActiveFlagLock; }; @@ -161,10 +161,10 @@ class ITKCommon_EXPORT PlatformMultiThreader : public MultiThreaderBase /** Storage of MutexFunctions and ints used to control spawned * threads and the spawned thread ids. */ - int m_SpawnedThreadActiveFlag[ITK_MAX_THREADS]{}; + int m_SpawnedThreadActiveFlag[ITK_MAX_THREADS]{}; std::shared_ptr m_SpawnedThreadActiveFlagMutex[ITK_MAX_THREADS]{}; - ThreadProcessIdType m_SpawnedThreadProcessID[ITK_MAX_THREADS]{}; - WorkUnitInfo m_SpawnedThreadInfoArray[ITK_MAX_THREADS]{}; + ThreadProcessIdType m_SpawnedThreadProcessID[ITK_MAX_THREADS]{}; + WorkUnitInfo m_SpawnedThreadInfoArray[ITK_MAX_THREADS]{}; #if !defined(ITK_LEGACY_REMOVE) /** The methods to invoke. */ diff --git a/Modules/Core/Common/include/itkPoint.h b/Modules/Core/Common/include/itkPoint.h index 3ab23f83a0d..87bc183c52f 100644 --- a/Modules/Core/Common/include/itkPoint.h +++ b/Modules/Core/Common/include/itkPoint.h @@ -278,7 +278,7 @@ class ITK_TEMPLATE_EXPORT Point : public FixedArray(pa[i]); + const auto component = static_cast(pa[i]); const RealType difference = static_cast((*this)[i]) - component; sum += difference * difference; } @@ -363,7 +363,7 @@ MakePoint(const TValue firstValue, const TVariadic... otherValues) static_assert(std::conjunction_v...>, "The other values should have the same type as the first value."); - constexpr unsigned int dimension{ 1 + sizeof...(TVariadic) }; + constexpr unsigned int dimension{ 1 + sizeof...(TVariadic) }; const std::array stdArray{ { firstValue, otherValues... } }; return Point{ stdArray }; } diff --git a/Modules/Core/Common/include/itkPoint.hxx b/Modules/Core/Common/include/itkPoint.hxx index 339d907ef3f..09de7ab15a3 100644 --- a/Modules/Core/Common/include/itkPoint.hxx +++ b/Modules/Core/Common/include/itkPoint.hxx @@ -175,8 +175,8 @@ void Point::SetToBarycentricCombination(const Self & A, const Self & B, const Self & C, - double weightForA, - double weightForB) + double weightForA, + double weightForB) { const double weightForC = 1.0 - weightForA - weightForB; @@ -217,19 +217,19 @@ Point::SetToBarycentricCombination(const Self * P, const dou template auto BarycentricCombination::Evaluate(const PointContainerPointer & points, - const WeightContainerType & weights) -> PointType + const WeightContainerType & weights) -> PointType { PointType barycentre{}; // set to null - typename TPointContainer::Iterator point = points->Begin(); + typename TPointContainer::Iterator point = points->Begin(); const typename TPointContainer::Iterator final = points->End(); - typename TPointContainer::Iterator last = final; + typename TPointContainer::Iterator last = final; --last; // move to the (N)th point double weightSum = 0.0; const unsigned int PointDimension = PointType::PointDimension; - unsigned int j = 0; + unsigned int j = 0; while (point != last) { diff --git a/Modules/Core/Common/include/itkPointSetBase.hxx b/Modules/Core/Common/include/itkPointSetBase.hxx index 43139311bc7..2099dca4ef8 100644 --- a/Modules/Core/Common/include/itkPointSetBase.hxx +++ b/Modules/Core/Common/include/itkPointSetBase.hxx @@ -198,7 +198,7 @@ PointSetBase::GetPoint(PointIdentifier ptId) const -> PointTyp /** * Ask the container if the point identifier exists. */ - PointType point; + PointType point; const bool exist = m_PointsContainer->GetElementIfIndexExists(ptId, &point); if (!exist) { diff --git a/Modules/Core/Common/include/itkPointSetToImageFilter.hxx b/Modules/Core/Common/include/itkPointSetToImageFilter.hxx index 1518f6726d0..e0b47d07d9a 100644 --- a/Modules/Core/Common/include/itkPointSetToImageFilter.hxx +++ b/Modules/Core/Common/include/itkPointSetToImageFilter.hxx @@ -113,10 +113,10 @@ PointSetToImageFilter::GenerateData() // Get the input and output pointers const InputPointSetType * InputPointSet = this->GetInput(); - const OutputImagePointer OutputImage = this->GetOutput(); + const OutputImagePointer OutputImage = this->GetOutput(); // Generate the image - double origin[InputPointSetDimension]; + double origin[InputPointSetDimension]; SizeType size; using BoundingBoxType = BoundingBox::GenerateData() OutputImage->FillBuffer(m_OutsideValue); using PointIterator = typename InputPointSetType::PointsContainer::ConstIterator; - PointIterator pointItr = InputPointSet->GetPoints()->Begin(); + PointIterator pointItr = InputPointSet->GetPoints()->Begin(); const PointIterator pointEnd = InputPointSet->GetPoints()->End(); typename OutputImageType::IndexType index; diff --git a/Modules/Core/Common/include/itkPolyLineCell.hxx b/Modules/Core/Common/include/itkPolyLineCell.hxx index e7467e294a5..605b023fee0 100644 --- a/Modules/Core/Common/include/itkPolyLineCell.hxx +++ b/Modules/Core/Common/include/itkPolyLineCell.hxx @@ -90,9 +90,9 @@ PolyLineCell::GetNumberOfBoundaryFeatures(int dimension) const - */ template bool -PolyLineCell::GetBoundaryFeature(int dimension, +PolyLineCell::GetBoundaryFeature(int dimension, CellFeatureIdentifier featureId, - CellAutoPointer & cellPointer) + CellAutoPointer & cellPointer) { VertexAutoPointer vertexPointer; if ((dimension == 0) && this->GetVertex(featureId, vertexPointer)) diff --git a/Modules/Core/Common/include/itkPolygonCell.h b/Modules/Core/Common/include/itkPolygonCell.h index 6cf649957e2..7a5f3ac6af8 100644 --- a/Modules/Core/Common/include/itkPolygonCell.h +++ b/Modules/Core/Common/include/itkPolygonCell.h @@ -153,7 +153,7 @@ class ITK_TEMPLATE_EXPORT PolygonCell : public TCellInterface ~PolygonCell() override = default; protected: - std::vector m_Edges{}; + std::vector m_Edges{}; std::vector m_PointIds{}; }; } // namespace itk diff --git a/Modules/Core/Common/include/itkPolygonCell.hxx b/Modules/Core/Common/include/itkPolygonCell.hxx index feb169d3f35..f989d94c3d3 100644 --- a/Modules/Core/Common/include/itkPolygonCell.hxx +++ b/Modules/Core/Common/include/itkPolygonCell.hxx @@ -103,9 +103,9 @@ PolygonCell::GetNumberOfBoundaryFeatures(int dimension) const -> */ template bool -PolygonCell::GetBoundaryFeature(int dimension, +PolygonCell::GetBoundaryFeature(int dimension, CellFeatureIdentifier featureId, - CellAutoPointer & cellPointer) + CellAutoPointer & cellPointer) { switch (dimension) { @@ -387,7 +387,7 @@ template bool PolygonCell::GetEdge(CellFeatureIdentifier edgeId, EdgeAutoPointer & edgePointer) { - auto * edge = new EdgeType; + auto * edge = new EdgeType; const unsigned int max_pointId = this->GetNumberOfPoints() - 1; if (edgeId < max_pointId) diff --git a/Modules/Core/Common/include/itkPoolMultiThreader.h b/Modules/Core/Common/include/itkPoolMultiThreader.h index 45852a08714..81ae3adda2b 100644 --- a/Modules/Core/Common/include/itkPoolMultiThreader.h +++ b/Modules/Core/Common/include/itkPoolMultiThreader.h @@ -77,18 +77,18 @@ class ITKCommon_EXPORT PoolMultiThreader : public MultiThreaderBase /** Parallelize an operation over an array. If filter argument is not nullptr, * this function will update its progress as each index is completed. */ void - ParallelizeArray(SizeValueType firstIndex, - SizeValueType lastIndexPlus1, + ParallelizeArray(SizeValueType firstIndex, + SizeValueType lastIndexPlus1, ArrayThreadingFunctorType aFunc, - ProcessObject * filter) override; + ProcessObject * filter) override; /** Break up region into smaller chunks, and call the function with chunks as parameters. */ void - ParallelizeImageRegion(unsigned int dimension, + ParallelizeImageRegion(unsigned int dimension, const IndexValueType index[], - const SizeValueType size[], + const SizeValueType size[], ThreadingFunctorType funcP, - ProcessObject * filter) override; + ProcessObject * filter) override; /** Set the number of threads to use. PoolMultiThreader * can only INCREASE its number of threads. */ diff --git a/Modules/Core/Common/include/itkPriorityQueueContainer.h b/Modules/Core/Common/include/itkPriorityQueueContainer.h index 700b5a3a419..33fd8ab71a1 100644 --- a/Modules/Core/Common/include/itkPriorityQueueContainer.h +++ b/Modules/Core/Common/include/itkPriorityQueueContainer.h @@ -111,8 +111,8 @@ class ITK_TEMPLATE_EXPORT MinPriorityQueueElementWrapper using ElementPriorityType = TElementPriority; using ElementIdentifierType = TElementIdentifier; - ElementType m_Element{}; - ElementPriorityType m_Priority{}; + ElementType m_Element{}; + ElementPriorityType m_Priority{}; ElementIdentifierType m_Location{ Superclass::m_ElementNotFound }; MinPriorityQueueElementWrapper() = default; diff --git a/Modules/Core/Common/include/itkPriorityQueueContainer.hxx b/Modules/Core/Common/include/itkPriorityQueueContainer.hxx index fadc47e77dd..633004fe34f 100644 --- a/Modules/Core/Common/include/itkPriorityQueueContainer.hxx +++ b/Modules/Core/Common/include/itkPriorityQueueContainer.hxx @@ -47,7 +47,7 @@ ElementWrapperPointerInterface::GetL template void ElementWrapperPointerInterface::SetLocation( - ElementWrapperPointerType & element, + ElementWrapperPointerType & element, const ElementIdentifierType & identifier) { element->SetLocation(*element, identifier); @@ -90,7 +90,7 @@ const TElementIdentifier ElementWrapperPointerInterface MinPriorityQueueElementWrapper::MinPriorityQueueElementWrapper( - ElementType element, + ElementType element, ElementPriorityType priority) : m_Element(element) , m_Priority(std::move(priority)) @@ -143,7 +143,7 @@ template ::SetLocation( MinPriorityQueueElementWrapper & element, - const ElementIdentifierType & identifier) + const ElementIdentifierType & identifier) { element.m_Location = identifier; } @@ -182,7 +182,7 @@ MinPriorityQueueElementWrapper:: // ----------------------------------------------------------------------------- template MaxPriorityQueueElementWrapper::MaxPriorityQueueElementWrapper( - ElementType element, + ElementType element, ElementPriorityType priority) : Superclass(element, priority) {} @@ -407,9 +407,9 @@ PriorityQueueContainerSize(); diff --git a/Modules/Core/Common/include/itkProcessObject.h b/Modules/Core/Common/include/itkProcessObject.h index 83a0d1564d2..3d74163fe47 100644 --- a/Modules/Core/Common/include/itkProcessObject.h +++ b/Modules/Core/Common/include/itkProcessObject.h @@ -586,7 +586,7 @@ class ITKCommon_EXPORT ProcessObject : public Object * required or indexed it will be set to nullptr. */ virtual void - RemoveInput(const DataObjectIdentifierType & key); + RemoveInput(const DataObjectIdentifierType & key); virtual void RemoveInput(DataObjectPointerArraySizeType); /** Return the main input */ @@ -973,7 +973,7 @@ class ITKCommon_EXPORT ProcessObject : public Object NameSet m_RequiredInputNames{}; /** These support the progress method and aborting filter execution. */ - bool m_AbortGenerateData{}; + bool m_AbortGenerateData{}; std::atomic m_Progress{}; @@ -982,7 +982,7 @@ class ITKCommon_EXPORT ProcessObject : public Object /** Support processing data in multiple threads. Used by subclasses * (e.g., ImageSource). */ itk::SmartPointer m_MultiThreader; - ThreadIdType m_NumberOfWorkUnits{}; + ThreadIdType m_NumberOfWorkUnits{}; bool m_ThreaderUpdateProgress{ true }; diff --git a/Modules/Core/Common/include/itkProgressReporter.h b/Modules/Core/Common/include/itkProgressReporter.h index 46901055f21..3e3886eaf19 100644 --- a/Modules/Core/Common/include/itkProgressReporter.h +++ b/Modules/Core/Common/include/itkProgressReporter.h @@ -64,11 +64,11 @@ class ITKCommon_EXPORT ProgressReporter /** Constructor sets progress to 0 because the filter is starting. */ ProgressReporter(ProcessObject * filter, - ThreadIdType threadId, - SizeValueType numberOfPixels, - SizeValueType numberOfUpdates = 100, - float initialProgress = 0.0f, - float progressWeight = 1.0f); + ThreadIdType threadId, + SizeValueType numberOfPixels, + SizeValueType numberOfUpdates = 100, + float initialProgress = 0.0f, + float progressWeight = 1.0f); /** Destructor sets progress to 1 because the filter has finished. */ ~ProgressReporter(); @@ -82,7 +82,7 @@ class ITKCommon_EXPORT ProgressReporter // all threads needs to check the abort flag if (m_Filter && m_Filter->GetAbortGenerateData()) { - std::string msg; + std::string msg; ProcessAborted e(__FILE__, __LINE__); msg += "Object " + std::string(m_Filter->GetNameOfClass()) + ": AbortGenerateDataOn"; e.SetDescription(msg); @@ -112,13 +112,13 @@ class ITKCommon_EXPORT ProgressReporter protected: ProcessObject * m_Filter; - ThreadIdType m_ThreadId; - float m_InverseNumberOfPixels; - SizeValueType m_CurrentPixel{ 0 }; - SizeValueType m_PixelsPerUpdate; - SizeValueType m_PixelsBeforeUpdate; - float m_InitialProgress; - float m_ProgressWeight; + ThreadIdType m_ThreadId; + float m_InverseNumberOfPixels; + SizeValueType m_CurrentPixel{ 0 }; + SizeValueType m_PixelsPerUpdate; + SizeValueType m_PixelsBeforeUpdate; + float m_InitialProgress; + float m_ProgressWeight; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkQuadraticEdgeCell.h b/Modules/Core/Common/include/itkQuadraticEdgeCell.h index 55cb9b48ce2..c61db60c9e6 100644 --- a/Modules/Core/Common/include/itkQuadraticEdgeCell.h +++ b/Modules/Core/Common/include/itkQuadraticEdgeCell.h @@ -111,7 +111,7 @@ class ITK_TEMPLATE_EXPORT QuadraticEdgeCell : public TCellInterface * returned the values of its ShapeFunctions */ void EvaluateShapeFunctions(const ParametricCoordArrayType & parametricCoordinates, - ShapeFunctionsArrayType & weights) const override; + ShapeFunctionsArrayType & weights) const override; protected: /** Store number of points needed for a line segment. */ diff --git a/Modules/Core/Common/include/itkQuadraticEdgeCell.hxx b/Modules/Core/Common/include/itkQuadraticEdgeCell.hxx index 39247255917..cd407725b3d 100644 --- a/Modules/Core/Common/include/itkQuadraticEdgeCell.hxx +++ b/Modules/Core/Common/include/itkQuadraticEdgeCell.hxx @@ -80,9 +80,9 @@ QuadraticEdgeCell::GetNumberOfBoundaryFeatures(int dimension) co */ template bool -QuadraticEdgeCell::GetBoundaryFeature(int dimension, +QuadraticEdgeCell::GetBoundaryFeature(int dimension, CellFeatureIdentifier featureId, - CellAutoPointer & cellPointer) + CellAutoPointer & cellPointer) { switch (dimension) { @@ -127,7 +127,7 @@ template void QuadraticEdgeCell::SetPointIds(PointIdConstIterator first, PointIdConstIterator last) { - int localId = 0; + int localId = 0; PointIdConstIterator ii(first); while (ii != last) @@ -223,7 +223,7 @@ QuadraticEdgeCell::GetVertex(CellFeatureIdentifier vertexId, Ver template void QuadraticEdgeCell::EvaluateShapeFunctions(const ParametricCoordArrayType & parametricCoordinates, - ShapeFunctionsArrayType & weights) const + ShapeFunctionsArrayType & weights) const { const CoordinateType x = parametricCoordinates[0]; // one-dimensional cell diff --git a/Modules/Core/Common/include/itkQuadraticTriangleCell.h b/Modules/Core/Common/include/itkQuadraticTriangleCell.h index a329fea6096..40d2397d3a2 100644 --- a/Modules/Core/Common/include/itkQuadraticTriangleCell.h +++ b/Modules/Core/Common/include/itkQuadraticTriangleCell.h @@ -121,7 +121,7 @@ class ITK_TEMPLATE_EXPORT QuadraticTriangleCell * returned through an itkArray). */ void EvaluateShapeFunctions(const ParametricCoordArrayType & parametricCoordinates, - ShapeFunctionsArrayType & weights) const override; + ShapeFunctionsArrayType & weights) const override; public: QuadraticTriangleCell() = default; diff --git a/Modules/Core/Common/include/itkQuadraticTriangleCell.hxx b/Modules/Core/Common/include/itkQuadraticTriangleCell.hxx index 74d96543d1e..cee32d14f68 100644 --- a/Modules/Core/Common/include/itkQuadraticTriangleCell.hxx +++ b/Modules/Core/Common/include/itkQuadraticTriangleCell.hxx @@ -82,9 +82,9 @@ QuadraticTriangleCell::GetNumberOfBoundaryFeatures(int dimension */ template bool -QuadraticTriangleCell::GetBoundaryFeature(int dimension, +QuadraticTriangleCell::GetBoundaryFeature(int dimension, CellFeatureIdentifier featureId, - CellAutoPointer & cellPointer) + CellAutoPointer & cellPointer) { switch (dimension) { @@ -139,7 +139,7 @@ template void QuadraticTriangleCell::SetPointIds(PointIdConstIterator first, PointIdConstIterator last) { - int localId = 0; + int localId = 0; PointIdConstIterator ii(first); while (ii != last) @@ -268,7 +268,7 @@ QuadraticTriangleCell::GetEdge(CellFeatureIdentifier edgeId, Edg template void QuadraticTriangleCell::EvaluateShapeFunctions(const ParametricCoordArrayType & parametricCoordinates, - ShapeFunctionsArrayType & weights) const + ShapeFunctionsArrayType & weights) const { if (parametricCoordinates.size() != 3) { diff --git a/Modules/Core/Common/include/itkQuadrilateralCell.h b/Modules/Core/Common/include/itkQuadrilateralCell.h index 625fc2d12d1..70e01fe12d7 100644 --- a/Modules/Core/Common/include/itkQuadrilateralCell.h +++ b/Modules/Core/Common/include/itkQuadrilateralCell.h @@ -117,11 +117,11 @@ class ITK_TEMPLATE_EXPORT QuadrilateralCell /** Evaluate the position inside the cell */ bool - EvaluatePosition(CoordinateType * x, + EvaluatePosition(CoordinateType * x, PointsContainer * points, - CoordinateType * closestPoint, + CoordinateType * closestPoint, CoordinateType[CellDimension], - double * dist2, + double * dist2, InterpolationWeightType * weight) override; /** Visitor interface */ @@ -139,13 +139,13 @@ class ITK_TEMPLATE_EXPORT QuadrilateralCell void InterpolationDerivs(const CoordinateType pointCoords[CellDimension], CoordinateType derivs[NumberOfDerivatives]); void - InterpolationFunctions(const CoordinateType pointCoords[CellDimension], + InterpolationFunctions(const CoordinateType pointCoords[CellDimension], InterpolationWeightType weights[NumberOfPoints]); void - EvaluateLocation(int & itkNotUsed(subId), - const PointsContainer * points, - const CoordinateType pointCoords[PointDimension], - CoordinateType x[PointDimension], + EvaluateLocation(int & itkNotUsed(subId), + const PointsContainer * points, + const CoordinateType pointCoords[PointDimension], + CoordinateType x[PointDimension], InterpolationWeightType * weights); }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkQuadrilateralCell.hxx b/Modules/Core/Common/include/itkQuadrilateralCell.hxx index a680d9f27f9..014817227d9 100644 --- a/Modules/Core/Common/include/itkQuadrilateralCell.hxx +++ b/Modules/Core/Common/include/itkQuadrilateralCell.hxx @@ -85,9 +85,9 @@ QuadrilateralCell::GetNumberOfBoundaryFeatures(int dimension) co */ template bool -QuadrilateralCell::GetBoundaryFeature(int dimension, +QuadrilateralCell::GetBoundaryFeature(int dimension, CellFeatureIdentifier featureId, - CellAutoPointer & cellPointer) + CellAutoPointer & cellPointer) { switch (dimension) { @@ -142,7 +142,7 @@ template void QuadrilateralCell::SetPointIds(PointIdConstIterator first, PointIdConstIterator last) { - int localId = 0; + int localId = 0; PointIdConstIterator ii(first); while (ii != last) @@ -268,21 +268,21 @@ QuadrilateralCell::GetEdge(CellFeatureIdentifier edgeId, EdgeAut /** Evaluate the position inside the cell */ template bool -QuadrilateralCell::EvaluatePosition(CoordinateType * x, - PointsContainer * points, - CoordinateType * closestPoint, - CoordinateType pcoord[CellDimension], - double * dist2, +QuadrilateralCell::EvaluatePosition(CoordinateType * x, + PointsContainer * points, + CoordinateType * closestPoint, + CoordinateType pcoord[CellDimension], + double * dist2, InterpolationWeightType * weight) { - static constexpr int ITK_QUAD_MAX_ITERATION = 10; + static constexpr int ITK_QUAD_MAX_ITERATION = 10; static constexpr double ITK_QUAD_CONVERGED = 1.e-03; static constexpr double ITK_DIVERGED = 1.e6; // set initial position for Newton's method int subId = 0; - double params[CellDimension] = { 0.5, 0.5 }; + double params[CellDimension] = { 0.5, 0.5 }; CoordinateType pcoords[CellDimension] = { 0.5, 0.5 }; // NOTE: Point x is here assumed to lie on the plane of Quad. Otherwise, (FIXME) @@ -293,7 +293,7 @@ QuadrilateralCell::EvaluatePosition(CoordinateType * x, // enter iteration loop InterpolationWeightType weights[NumberOfPoints]; - int converged = 0; + int converged = 0; for (int iteration = 0; !converged && (iteration < ITK_QUAD_MAX_ITERATION); ++iteration) { // calculate element interpolation functions and derivatives @@ -447,7 +447,7 @@ QuadrilateralCell::EvaluatePosition(CoordinateType * x, /** Compute iso-parametric interpolation functions */ template void -QuadrilateralCell::InterpolationFunctions(const CoordinateType pointCoords[CellDimension], +QuadrilateralCell::InterpolationFunctions(const CoordinateType pointCoords[CellDimension], InterpolationWeightType weights[NumberOfPoints]) { const double rm = 1. - pointCoords[0]; @@ -463,7 +463,7 @@ QuadrilateralCell::InterpolationFunctions(const CoordinateType template void QuadrilateralCell::InterpolationDerivs(const CoordinateType pointCoords[CellDimension], - CoordinateType derivs[NumberOfDerivatives]) + CoordinateType derivs[NumberOfDerivatives]) { const double rm = 1. - pointCoords[0]; const double sm = 1. - pointCoords[1]; @@ -483,10 +483,10 @@ QuadrilateralCell::InterpolationDerivs(const CoordinateType poin /** Evaluate the location inside the cell */ template void -QuadrilateralCell::EvaluateLocation(int & itkNotUsed(subId), - const PointsContainer * points, - const CoordinateType pointCoords[PointDimension], - CoordinateType x[PointDimension], +QuadrilateralCell::EvaluateLocation(int & itkNotUsed(subId), + const PointsContainer * points, + const CoordinateType pointCoords[PointDimension], + CoordinateType x[PointDimension], InterpolationWeightType * weights) { this->InterpolationFunctions(pointCoords, weights); diff --git a/Modules/Core/Common/include/itkRealTimeInterval.h b/Modules/Core/Common/include/itkRealTimeInterval.h index 1ff0041649c..fe49a98c3d3 100644 --- a/Modules/Core/Common/include/itkRealTimeInterval.h +++ b/Modules/Core/Common/include/itkRealTimeInterval.h @@ -106,7 +106,7 @@ class ITKCommon_EXPORT RealTimeInterval /** Default print out of a RealTimeInterval */ friend ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & os, const RealTimeInterval & v); + operator<<(std::ostream & os, const RealTimeInterval & v); private: friend class RealTimeStamp; diff --git a/Modules/Core/Common/include/itkRealTimeStamp.h b/Modules/Core/Common/include/itkRealTimeStamp.h index 2d67122e98f..d8d83827dde 100644 --- a/Modules/Core/Common/include/itkRealTimeStamp.h +++ b/Modules/Core/Common/include/itkRealTimeStamp.h @@ -101,7 +101,7 @@ class ITKCommon_EXPORT RealTimeStamp /** Default print out of a RealTimeStamp */ friend ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & os, const RealTimeStamp & v); + operator<<(std::ostream & os, const RealTimeStamp & v); private: using SecondsCounterType = uint64_t; @@ -114,7 +114,7 @@ class ITKCommon_EXPORT RealTimeStamp using MicroSecondsDifferenceType = RealTimeInterval::MicroSecondsDifferenceType; /** Number of Seconds and Microseconds since... */ - SecondsCounterType m_Seconds; + SecondsCounterType m_Seconds; MicroSecondsCounterType m_MicroSeconds; }; diff --git a/Modules/Core/Common/include/itkResourceProbe.h b/Modules/Core/Common/include/itkResourceProbe.h index c2157792ebd..7e86af01d9a 100644 --- a/Modules/Core/Common/include/itkResourceProbe.h +++ b/Modules/Core/Common/include/itkResourceProbe.h @@ -147,9 +147,9 @@ class ITK_TEMPLATE_EXPORT ResourceProbe /** Print Probe Results. */ virtual void ExpandedReport(std::ostream & os = std::cout, - bool printSystemInfo = true, - bool printReportHead = true, - bool useTabs = false); + bool printSystemInfo = true, + bool printReportHead = true, + bool useTabs = false); /** Print Probe Results. */ virtual void diff --git a/Modules/Core/Common/include/itkResourceProbe.hxx b/Modules/Core/Common/include/itkResourceProbe.hxx index 8ce6112e5ef..020954798c0 100644 --- a/Modules/Core/Common/include/itkResourceProbe.hxx +++ b/Modules/Core/Common/include/itkResourceProbe.hxx @@ -216,7 +216,7 @@ ValueType ResourceProbe::GetStandardDeviation() { using InternalComputeType = typename NumericTraits::RealType; - const auto realMean = static_cast(this->GetMean()); + const auto realMean = static_cast(this->GetMean()); std::vector diff(this->m_ProbeValueList.size()); std::transform(this->m_ProbeValueList.begin(), this->m_ProbeValueList.end(), @@ -331,9 +331,9 @@ ResourceProbe::Report(std::ostream & os, bool printSystemIn template void ResourceProbe::ExpandedReport(std::ostream & os, - bool printSystemInfo, - bool printReportHead, - bool useTabs) + bool printSystemInfo, + bool printReportHead, + bool useTabs) { if (printSystemInfo) { @@ -397,10 +397,10 @@ template template void ResourceProbe::PrintJSONvar(std::ostream & os, - const char * varName, - T varValue, - unsigned int indent, - bool comma) + const char * varName, + T varValue, + unsigned int indent, + bool comma) { const bool varIsNumber = mpl::IsNumber::Value; while (indent > 0) diff --git a/Modules/Core/Common/include/itkResourceProbesCollectorBase.h b/Modules/Core/Common/include/itkResourceProbesCollectorBase.h index 3391f91f1fd..8584c837b7a 100644 --- a/Modules/Core/Common/include/itkResourceProbesCollectorBase.h +++ b/Modules/Core/Common/include/itkResourceProbesCollectorBase.h @@ -59,26 +59,26 @@ class ITK_TEMPLATE_EXPORT ResourceProbesCollectorBase /** Report the summary of results from a specific probe */ virtual void - Report(const char * name, + Report(const char * name, std::ostream & os = std::cout, - bool printSystemInfo = true, - bool printReportHead = true, - bool useTabs = false); + bool printSystemInfo = true, + bool printReportHead = true, + bool useTabs = false); /** Expanded report of the summary of results from all probes */ virtual void ExpandedReport(std::ostream & os = std::cout, - bool printSystemInfo = true, - bool printReportHead = true, - bool useTabs = false); + bool printSystemInfo = true, + bool printReportHead = true, + bool useTabs = false); /** Expanded report of the summary of results from a specific probe */ virtual void - ExpandedReport(const char * name, + ExpandedReport(const char * name, std::ostream & os = std::cout, - bool printSystemInfo = true, - bool printReportHead = true, - bool useTabs = false); + bool printSystemInfo = true, + bool printReportHead = true, + bool useTabs = false); /** JavaScript Object Notation (JSON) expanded report the summary of results from all probes */ virtual void diff --git a/Modules/Core/Common/include/itkResourceProbesCollectorBase.hxx b/Modules/Core/Common/include/itkResourceProbesCollectorBase.hxx index fe21dd46fb6..c943e81609f 100644 --- a/Modules/Core/Common/include/itkResourceProbesCollectorBase.hxx +++ b/Modules/Core/Common/include/itkResourceProbesCollectorBase.hxx @@ -67,7 +67,7 @@ template void ResourceProbesCollectorBase::Report(std::ostream & os, bool printSystemInfo, bool printReportHead, bool useTabs) { - auto probe = this->m_Probes.begin(); + auto probe = this->m_Probes.begin(); const auto end = this->m_Probes.end(); if (probe == end) @@ -96,11 +96,11 @@ ResourceProbesCollectorBase::Report(std::ostream & os, bool printSystemI template void -ResourceProbesCollectorBase::Report(const char * name, +ResourceProbesCollectorBase::Report(const char * name, std::ostream & os, - bool printSystemInfo, - bool printReportHead, - bool useTabs) + bool printSystemInfo, + bool printReportHead, + bool useTabs) { const IdType tid = name; @@ -118,11 +118,11 @@ ResourceProbesCollectorBase::Report(const char * name, template void ResourceProbesCollectorBase::ExpandedReport(std::ostream & os, - bool printSystemInfo, - bool printReportHead, - bool useTabs) + bool printSystemInfo, + bool printReportHead, + bool useTabs) { - auto probe = this->m_Probes.begin(); + auto probe = this->m_Probes.begin(); const auto end = this->m_Probes.end(); if (probe == end) @@ -151,11 +151,11 @@ ResourceProbesCollectorBase::ExpandedReport(std::ostream & os, template void -ResourceProbesCollectorBase::ExpandedReport(const char * name, +ResourceProbesCollectorBase::ExpandedReport(const char * name, std::ostream & os, - bool printSystemInfo, - bool printReportHead, - bool useTabs) + bool printSystemInfo, + bool printReportHead, + bool useTabs) { const IdType tid = name; @@ -174,7 +174,7 @@ template void ResourceProbesCollectorBase::JSONReport(std::ostream & os, bool printSystemInfo) { - auto probe = this->m_Probes.begin(); + auto probe = this->m_Probes.begin(); const auto end = this->m_Probes.end(); if (probe == end) diff --git a/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.h b/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.h index 82814dd62ab..07e75e59a19 100644 --- a/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.h +++ b/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.h @@ -89,14 +89,14 @@ class ITK_TEMPLATE_EXPORT ShapedFloodFilledFunctionConditionalConstIterator : pu * particular region of that image. This version of the constructor uses * an explicit seed pixel for the flood fill, the "startIndex" */ ShapedFloodFilledFunctionConditionalConstIterator(const ImageType * imagePtr, - FunctionType * fnPtr, - IndexType startIndex); + FunctionType * fnPtr, + IndexType startIndex); /** Constructor establishes an iterator to walk a particular image and a * particular region of that image. This version of the constructor uses * a list of seed pixels for the flood fill */ - ShapedFloodFilledFunctionConditionalConstIterator(const ImageType * imagePtr, - FunctionType * fnPtr, + ShapedFloodFilledFunctionConditionalConstIterator(const ImageType * imagePtr, + FunctionType * fnPtr, std::vector & startIndex); /** Constructor establishes an iterator to walk a particular image and a diff --git a/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.hxx b/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.hxx index e246c6dab35..e4939924534 100644 --- a/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.hxx +++ b/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.hxx @@ -25,8 +25,8 @@ namespace itk template ShapedFloodFilledFunctionConditionalConstIterator::ShapedFloodFilledFunctionConditionalConstIterator( const ImageType * imagePtr, - FunctionType * fnPtr, - IndexType startIndex) + FunctionType * fnPtr, + IndexType startIndex) { this->m_Image = imagePtr; @@ -39,8 +39,8 @@ ShapedFloodFilledFunctionConditionalConstIterator::ShapedFloo template ShapedFloodFilledFunctionConditionalConstIterator::ShapedFloodFilledFunctionConditionalConstIterator( - const ImageType * imagePtr, - FunctionType * fnPtr, + const ImageType * imagePtr, + FunctionType * fnPtr, std::vector & startIndex) : m_Function(fnPtr) @@ -60,7 +60,7 @@ ShapedFloodFilledFunctionConditionalConstIterator::ShapedFloo template ShapedFloodFilledFunctionConditionalConstIterator::ShapedFloodFilledFunctionConditionalConstIterator( const ImageType * imagePtr, - FunctionType * fnPtr) + FunctionType * fnPtr) { this->m_Image = imagePtr; @@ -174,13 +174,13 @@ ShapedFloodFilledFunctionConditionalConstIterator::DoFloodSte // We are explicitly not calling set location since only offsets of // the neighborhood iterator are accessed. - typename NeighborhoodIteratorType::ConstIterator neighborIt = m_NeighborhoodIterator.Begin(); + typename NeighborhoodIteratorType::ConstIterator neighborIt = m_NeighborhoodIterator.Begin(); const typename NeighborhoodIteratorType::ConstIterator neighborEnd = m_NeighborhoodIterator.End(); for (; neighborIt != neighborEnd; ++neighborIt) { const OffsetType & offset = neighborIt.GetNeighborhoodOffset(); - const IndexType tempIndex = topIndex + offset; + const IndexType tempIndex = topIndex + offset; // If this is a valid index and have not been tested, // then test it. diff --git a/Modules/Core/Common/include/itkShapedFloodFilledImageFunctionConditionalConstIterator.h b/Modules/Core/Common/include/itkShapedFloodFilledImageFunctionConditionalConstIterator.h index 4c29c79f421..77892ba4179 100644 --- a/Modules/Core/Common/include/itkShapedFloodFilledImageFunctionConditionalConstIterator.h +++ b/Modules/Core/Common/include/itkShapedFloodFilledImageFunctionConditionalConstIterator.h @@ -77,16 +77,16 @@ class ITK_TEMPLATE_EXPORT ShapedFloodFilledImageFunctionConditionalConstIterator * particular region of that image. This version of the constructor uses * an explicit seed pixel for the flood fill, the "startIndex" */ ShapedFloodFilledImageFunctionConditionalConstIterator(const ImageType * imagePtr, - FunctionType * fnPtr, - IndexType startIndex) + FunctionType * fnPtr, + IndexType startIndex) : Superclass(imagePtr, fnPtr, startIndex) {} /** Constructor establishes an iterator to walk a particular image and a * particular region of that image. This version of the constructor uses * an explicit list of seed pixels for the flood fill, the "startIndex" */ - ShapedFloodFilledImageFunctionConditionalConstIterator(const ImageType * imagePtr, - FunctionType * fnPtr, + ShapedFloodFilledImageFunctionConditionalConstIterator(const ImageType * imagePtr, + FunctionType * fnPtr, std::vector & startIndex) : Superclass(imagePtr, fnPtr, startIndex) {} diff --git a/Modules/Core/Common/include/itkShapedFloodFilledImageFunctionConditionalIterator.h b/Modules/Core/Common/include/itkShapedFloodFilledImageFunctionConditionalIterator.h index 3832fac882b..b51b7744682 100644 --- a/Modules/Core/Common/include/itkShapedFloodFilledImageFunctionConditionalIterator.h +++ b/Modules/Core/Common/include/itkShapedFloodFilledImageFunctionConditionalIterator.h @@ -83,8 +83,8 @@ class ShapedFloodFilledImageFunctionConditionalIterator /** Constructor establishes an iterator to walk a particular image and a * particular region of that image. This version of the constructor uses * an explicit list of seed pixels for the flood fill, the "startIndex" */ - ShapedFloodFilledImageFunctionConditionalIterator(ImageType * imagePtr, - FunctionType * fnPtr, + ShapedFloodFilledImageFunctionConditionalIterator(ImageType * imagePtr, + FunctionType * fnPtr, std::vector & startIndex) : Superclass(imagePtr, fnPtr, startIndex) {} diff --git a/Modules/Core/Common/include/itkShapedImageNeighborhoodRange.h b/Modules/Core/Common/include/itkShapedImageNeighborhoodRange.h index ec74b895a13..e0668c1e725 100644 --- a/Modules/Core/Common/include/itkShapedImageNeighborhoodRange.h +++ b/Modules/Core/Common/include/itkShapedImageNeighborhoodRange.h @@ -185,7 +185,7 @@ class ShapedImageNeighborhoodRange final ~PixelProxy() = default; // Constructor, called directly by operator*() of the iterator class. - PixelProxy(const InternalPixelType * const imageBufferPointer, + PixelProxy(const InternalPixelType * const imageBufferPointer, const TImageNeighborhoodPixelAccessPolicy & pixelAccessPolicy) noexcept : m_ImageBufferPointer{ imageBufferPointer } , m_PixelAccessPolicy{ pixelAccessPolicy } @@ -227,7 +227,7 @@ class ShapedImageNeighborhoodRange final PixelProxy(const PixelProxy &) noexcept = default; // Constructor, called directly by operator*() of the iterator class. - PixelProxy(InternalPixelType * const imageBufferPointer, + PixelProxy(InternalPixelType * const imageBufferPointer, const TImageNeighborhoodPixelAccessPolicy & pixelAccessPolicy) noexcept : m_ImageBufferPointer{ imageBufferPointer } , m_PixelAccessPolicy{ pixelAccessPolicy } @@ -327,13 +327,13 @@ class ShapedImageNeighborhoodRange final // Private constructor, used to create the begin and the end iterator of a range. // Only used by its friend class ShapedImageNeighborhoodRange. - QualifiedIterator(QualifiedInternalPixelType * const imageBufferPointer, - const ImageSizeType & imageSize, - const OffsetType & offsetTable, + QualifiedIterator(QualifiedInternalPixelType * const imageBufferPointer, + const ImageSizeType & imageSize, + const OffsetType & offsetTable, const NeighborhoodAccessorFunctorType & neighborhoodAccessor, - const OptionalPixelAccessParameterType optionalPixelAccessParameter, - const IndexType & relativeLocation, - const OffsetType * const offset) noexcept + const OptionalPixelAccessParameterType optionalPixelAccessParameter, + const IndexType & relativeLocation, + const OffsetType * const offset) noexcept : m_ImageBufferPointer{ imageBufferPointer } , // Note: Use parentheses instead of curly braces to initialize data members, @@ -583,7 +583,7 @@ class ShapedImageNeighborhoodRange final // Just the data from itk::ImageRegion (not the virtual table) struct RegionData { - IndexType m_Index{ {} }; + IndexType m_Index{ {} }; ImageSizeType m_Size{ {} }; RegionData() noexcept = default; @@ -650,10 +650,10 @@ class ShapedImageNeighborhoodRange final * image and the specified shape offsets remain alive while the range (or one * of its iterators) is being used. */ - ShapedImageNeighborhoodRange(ImageType & image, - const IndexType & location, - const OffsetType * const shapeOffsets, - const size_t numberOfNeigborhoodPixels, + ShapedImageNeighborhoodRange(ImageType & image, + const IndexType & location, + const OffsetType * const shapeOffsets, + const size_t numberOfNeigborhoodPixels, const OptionalPixelAccessParameterType optionalPixelAccessParameter = {}) : m_ImageBufferPointer{ image.ImageType::GetBufferPointer() } , @@ -686,9 +686,9 @@ class ShapedImageNeighborhoodRange final * of its iterators) is being used. */ template - ShapedImageNeighborhoodRange(ImageType & image, - const IndexType & location, - const TContainerOfOffsets & shapeOffsets, + ShapedImageNeighborhoodRange(ImageType & image, + const IndexType & location, + const TContainerOfOffsets & shapeOffsets, const OptionalPixelAccessParameterType optionalPixelAccessParameter = {}) : ShapedImageNeighborhoodRange{ image, location, diff --git a/Modules/Core/Common/include/itkSimpleDataObjectDecorator.h b/Modules/Core/Common/include/itkSimpleDataObjectDecorator.h index 83aadf5dd05..335a8aad0e2 100644 --- a/Modules/Core/Common/include/itkSimpleDataObjectDecorator.h +++ b/Modules/Core/Common/include/itkSimpleDataObjectDecorator.h @@ -108,7 +108,7 @@ class ITK_TEMPLATE_EXPORT SimpleDataObjectDecorator : public DataObject protected: private: ComponentType m_Component{}; - bool m_Initialized{}; + bool m_Initialized{}; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkSimpleFilterWatcher.h b/Modules/Core/Common/include/itkSimpleFilterWatcher.h index 6bfbaa87d06..586493e93cc 100644 --- a/Modules/Core/Common/include/itkSimpleFilterWatcher.h +++ b/Modules/Core/Common/include/itkSimpleFilterWatcher.h @@ -285,14 +285,14 @@ class ITKCommon_EXPORT SimpleFilterWatcher } private: - TimeProbe m_TimeProbe{}; - int m_Steps{ 0 }; - int m_Iterations{ 0 }; - bool m_Quiet{ false }; - bool m_TestAbort{ false }; - std::string m_Comment{}; + TimeProbe m_TimeProbe{}; + int m_Steps{ 0 }; + int m_Iterations{ 0 }; + bool m_Quiet{ false }; + bool m_TestAbort{ false }; + std::string m_Comment{}; itk::ProcessObject::Pointer m_Process{}; - std::mutex m_ProgressOutput{}; + std::mutex m_ProgressOutput{}; using CommandType = SimpleMemberCommand; CommandType::Pointer m_StartFilterCommand{}; diff --git a/Modules/Core/Common/include/itkSingleton.h b/Modules/Core/Common/include/itkSingleton.h index 19dcf014fe4..ae58b4bfb6e 100644 --- a/Modules/Core/Common/include/itkSingleton.h +++ b/Modules/Core/Common/include/itkSingleton.h @@ -80,10 +80,10 @@ class ITKCommon_EXPORT SingletonIndex template ITK_FUTURE_DEPRECATED("Prefer calling the SetGlobalInstance(globalName, global, deleteFunc) overload (without the " "unused func parameter)!") - bool SetGlobalInstance(const char * globalName, - T * global, + bool SetGlobalInstance(const char * globalName, + T * global, std::function itkNotUsed(func), - std::function deleteFunc) + std::function deleteFunc) { this->SetGlobalInstance(globalName, global, std::move(deleteFunc)); // Just returns true for backward compatibility (legacy only). @@ -103,7 +103,7 @@ class ITKCommon_EXPORT SingletonIndex // Internal struct to store the instance pointer and the delete function object of a global object. struct GlobalObject { - void * Instance{}; + void * Instance{}; std::function DeleteFunc{}; }; @@ -125,7 +125,7 @@ class ITKCommon_EXPORT SingletonIndex * itk::Singleton::Modified() but it can be overridden with SetGlobalSingleton(). * */ std::map m_GlobalObjects; - static Self * m_Instance; + static Self * m_Instance; // static SingletonIndexPrivate * m_GlobalSingleton; }; @@ -136,7 +136,7 @@ T * Singleton(const char * globalName, std::function deleteFunc) { [[maybe_unused]] static SingletonIndex * singletonIndex = SingletonIndex::GetInstance(); - T * instance = SingletonIndex::GetInstance()->GetGlobalInstance(globalName); + T * instance = SingletonIndex::GetInstance()->GetGlobalInstance(globalName); if (instance == nullptr) { instance = new T; diff --git a/Modules/Core/Common/include/itkSmapsFileParser.h b/Modules/Core/Common/include/itkSmapsFileParser.h index af3010c977d..8b262e348ac 100644 --- a/Modules/Core/Common/include/itkSmapsFileParser.h +++ b/Modules/Core/Common/include/itkSmapsFileParser.h @@ -81,7 +81,7 @@ class ITKCommon_EXPORT SmapsRecord : public MapRecord * Private_Dirty: 0 kB */ friend ITKCommon_EXPORT std::istream & - operator>>(std::istream & in, SmapsRecord & record); + operator>>(std::istream & in, SmapsRecord & record); }; /** \class VMMapSummaryRecord @@ -98,7 +98,7 @@ class ITKCommon_EXPORT VMMapSummaryRecord : public MapRecord * MALLOC [ 18536K] */ friend ITKCommon_EXPORT std::istream & - operator>>(std::istream & in, VMMapSummaryRecord & record); + operator>>(std::istream & in, VMMapSummaryRecord & record); }; /** \class VMMapRecord @@ -115,7 +115,7 @@ class ITKCommon_EXPORT VMMapRecord : public MapRecord * __DATA 8fe51000 [ 4K] rw-/rwx SM=COW /usr/lib/dyld */ friend ITKCommon_EXPORT std::istream & - operator>>(std::istream & in, VMMapRecord & record); + operator>>(std::istream & in, VMMapRecord & record); }; /** MAP DATA **/ @@ -188,7 +188,7 @@ class ITKCommon_EXPORT SmapsData_2_6 : public MapData /** fill the smaps data */ friend ITKCommon_EXPORT std::istream & - operator>>(std::istream & smapsStream, SmapsData_2_6 & data); + operator>>(std::istream & smapsStream, SmapsData_2_6 & data); protected: bool m_HeapRecordFound{}; @@ -219,7 +219,7 @@ class ITKCommon_EXPORT VMMapData_10_2 : public MapData /** fill the smaps data */ friend ITKCommon_EXPORT std::istream & - operator>>(std::istream & stream, VMMapData_10_2 & data); + operator>>(std::istream & stream, VMMapData_10_2 & data); protected: bool m_UsingSummary{ false }; @@ -278,7 +278,7 @@ class ITK_TEMPLATE_EXPORT MapFileParser protected: std::string m_MapFilePath{}; // location of the last loaded Map file - TMapData m_MapData{}; // data of the loaded smap file + TMapData m_MapData{}; // data of the loaded smap file }; /** \class SmapsFileParser diff --git a/Modules/Core/Common/include/itkSmapsFileParser.hxx b/Modules/Core/Common/include/itkSmapsFileParser.hxx index cbf9d367046..1307446ec61 100644 --- a/Modules/Core/Common/include/itkSmapsFileParser.hxx +++ b/Modules/Core/Common/include/itkSmapsFileParser.hxx @@ -168,7 +168,7 @@ VMMapFileParser::ReadFile(const std::string & mapFileLocation) // Not optimal solution: copy the output into an std::istream object. std::stringstream vmmapFile; - char buf[256]; + char buf[256]; while (!feof(vmmapCommandOutput)) { fgets(buf, 256, vmmapCommandOutput); diff --git a/Modules/Core/Common/include/itkSobelOperator.hxx b/Modules/Core/Common/include/itkSobelOperator.hxx index 2e63ff5a6af..1cf09da95c8 100644 --- a/Modules/Core/Common/include/itkSobelOperator.hxx +++ b/Modules/Core/Common/include/itkSobelOperator.hxx @@ -82,7 +82,7 @@ template auto SobelOperator::GenerateCoefficients() -> CoefficientVector { - CoefficientVector coeff; + CoefficientVector coeff; constexpr std::size_t coeff_size = (VDimension == 2) ? 9 : 27; coeff.reserve(coeff_size); if (VDimension == 2 && this->GetDirection() == 0) diff --git a/Modules/Core/Common/include/itkSparseFieldLayer.h b/Modules/Core/Common/include/itkSparseFieldLayer.h index 90efd525e2e..7a6fbfebb19 100644 --- a/Modules/Core/Common/include/itkSparseFieldLayer.h +++ b/Modules/Core/Common/include/itkSparseFieldLayer.h @@ -322,7 +322,7 @@ class ITK_TEMPLATE_EXPORT SparseFieldLayer : public Object /** The anchor node of the list. m_HeadNode->Next is the first node in the * list. If m_HeadNode->Next == m_HeadNode, then the list is empty. */ const std::unique_ptr m_HeadNode{ std::make_unique() }; - unsigned int m_Size{}; + unsigned int m_Size{}; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkSparseFieldLayer.hxx b/Modules/Core/Common/include/itkSparseFieldLayer.hxx index 2bc75322618..5173eba9c32 100644 --- a/Modules/Core/Common/include/itkSparseFieldLayer.hxx +++ b/Modules/Core/Common/include/itkSparseFieldLayer.hxx @@ -51,7 +51,7 @@ auto SparseFieldLayer::SplitRegions(int num) const -> RegionListType { const unsigned int size = Size(); - const auto regionsize = static_cast(std::ceil(static_cast(size) / static_cast(num))); + const auto regionsize = static_cast(std::ceil(static_cast(size) / static_cast(num))); ConstIterator position = Begin(); const ConstIterator last = End(); @@ -60,7 +60,7 @@ SparseFieldLayer::SplitRegions(int num) const -> RegionListType for (int i = 0; i < num; ++i) { unsigned int j = 0; - RegionType region; + RegionType region; region.first = position; while ((j < regionsize) && (position != last)) { diff --git a/Modules/Core/Common/include/itkSpatialOrientation.h b/Modules/Core/Common/include/itkSpatialOrientation.h index 180389a47da..9cf5adf52bb 100644 --- a/Modules/Core/Common/include/itkSpatialOrientation.h +++ b/Modules/Core/Common/include/itkSpatialOrientation.h @@ -457,9 +457,9 @@ class SpatialOrientationEnums // Define how to print enumeration extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const SpatialOrientationEnums::CoordinateTerms value); +operator<<(std::ostream & out, const SpatialOrientationEnums::CoordinateTerms value); extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const SpatialOrientationEnums::CoordinateMajornessTerms value); +operator<<(std::ostream & out, const SpatialOrientationEnums::CoordinateMajornessTerms value); extern ITKCommon_EXPORT std::ostream & operator<<(std::ostream & out, const SpatialOrientationEnums::ValidCoordinateOrientations value); diff --git a/Modules/Core/Common/include/itkStdStreamStateSave.h b/Modules/Core/Common/include/itkStdStreamStateSave.h index a123879129e..10013fb69e9 100644 --- a/Modules/Core/Common/include/itkStdStreamStateSave.h +++ b/Modules/Core/Common/include/itkStdStreamStateSave.h @@ -59,7 +59,7 @@ class StdStreamStateSave private: std::ios & m_Ios; - std::ios m_State; + std::ios m_State; }; } // namespace itk diff --git a/Modules/Core/Common/include/itkStreamingImageFilter.h b/Modules/Core/Common/include/itkStreamingImageFilter.h index 2b291a1c3ad..cec0e4dde8f 100644 --- a/Modules/Core/Common/include/itkStreamingImageFilter.h +++ b/Modules/Core/Common/include/itkStreamingImageFilter.h @@ -119,7 +119,7 @@ class ITK_TEMPLATE_EXPORT StreamingImageFilter : public ImageToImageFilter::UpdateOutputData(DataObject * i /** * Allocate the output buffer. */ - OutputImageType * outputPtr = this->GetOutput(0); + OutputImageType * outputPtr = this->GetOutput(0); const OutputImageRegionType outputRegion = outputPtr->GetRequestedRegion(); outputPtr->SetBufferedRegion(outputRegion); outputPtr->Allocate(); @@ -151,7 +151,7 @@ StreamingImageFilter::UpdateOutputData(DataObject * i * minimum of what the user specified via SetNumberOfStreamDivisions() * and what the Splitter thinks is a reasonable value. */ - unsigned int numDivisions = m_NumberOfStreamDivisions; + unsigned int numDivisions = m_NumberOfStreamDivisions; const unsigned int numDivisionsFromSplitter = m_RegionSplitter->GetNumberOfSplits(outputRegion, m_NumberOfStreamDivisions); if (numDivisionsFromSplitter < numDivisions) diff --git a/Modules/Core/Common/include/itkStructHashFunction.h b/Modules/Core/Common/include/itkStructHashFunction.h index 77f1deb6d40..a31b5ae6ecd 100644 --- a/Modules/Core/Common/include/itkStructHashFunction.h +++ b/Modules/Core/Common/include/itkStructHashFunction.h @@ -54,8 +54,8 @@ template inline IdentifierType StructHashFunction::operator()(const InputType & key) const { - auto len = static_cast(sizeof(InputType)); - const auto * p = reinterpret_cast(&key); + auto len = static_cast(sizeof(InputType)); + const auto * p = reinterpret_cast(&key); IdentifierType hash = 0UL; while (len--) { diff --git a/Modules/Core/Common/include/itkSymmetricEigenAnalysis.h b/Modules/Core/Common/include/itkSymmetricEigenAnalysis.h index e2e6a4a5a8f..ed1d3242ef4 100644 --- a/Modules/Core/Common/include/itkSymmetricEigenAnalysis.h +++ b/Modules/Core/Common/include/itkSymmetricEigenAnalysis.h @@ -135,7 +135,7 @@ class SymmetricEigenAnalysisEnums }; // Define how to print enumeration extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const SymmetricEigenAnalysisEnums::EigenValueOrder value); +operator<<(std::ostream & out, const SymmetricEigenAnalysisEnums::EigenValueOrder value); using EigenValueOrderEnum = SymmetricEigenAnalysisEnums::EigenValueOrder; @@ -364,9 +364,9 @@ class ITK_TEMPLATE_EXPORT SymmetricEigenAnalysis } private: - bool m_UseEigenLibrary{ false }; - unsigned int m_Dimension{ 0 }; - unsigned int m_Order{ 0 }; + bool m_UseEigenLibrary{ false }; + unsigned int m_Dimension{ 0 }; + unsigned int m_Order{ 0 }; EigenValueOrderEnum m_OrderEigenValues{ EigenValueOrderEnum::OrderByValue }; /** Reduces a real symmetric matrix to a symmetric tridiagonal matrix using @@ -526,8 +526,8 @@ class ITK_TEMPLATE_EXPORT SymmetricEigenAnalysis /* Wrapper that call the right implementation for the type of matrix. */ unsigned int ComputeEigenValuesAndVectorsWithEigenLibrary(const TMatrix & A, - TVector & EigenValues, - TEigenMatrix & EigenVectors) const + TVector & EigenValues, + TEigenMatrix & EigenVectors) const { return ComputeEigenValuesAndVectorsWithEigenLibraryImpl(A, EigenValues, EigenVectors, true); } @@ -541,8 +541,8 @@ class ITK_TEMPLATE_EXPORT SymmetricEigenAnalysis template auto ComputeEigenValuesAndVectorsWithEigenLibraryImpl(const QMatrix & A, - TVector & EigenValues, - TEigenMatrix & EigenVectors, + TVector & EigenValues, + TEigenMatrix & EigenVectors, long) const -> decltype(1U) { using ValueType = decltype(GetMatrixValueType(true)); @@ -557,7 +557,7 @@ class ITK_TEMPLATE_EXPORT SymmetricEigenAnalysis } using EigenSolverType = Eigen::SelfAdjointEigenSolver; const EigenSolverType solver(inputMatrix); // Computes EigenValues and EigenVectors - const auto & eigenValues = solver.eigenvalues(); + const auto & eigenValues = solver.eigenvalues(); /* Column k of the returned matrix is an eigenvector corresponding to * eigenvalue number $ k $ as returned by eigenvalues(). * The eigenvectors are normalized to have (Euclidean) norm equal to one. */ @@ -607,8 +607,8 @@ class ITK_TEMPLATE_EXPORT SymmetricEigenAnalysis template auto ComputeEigenValuesAndVectorsWithEigenLibraryImpl(const QMatrix & A, - TVector & EigenValues, - TEigenMatrix & EigenVectors, + TVector & EigenValues, + TEigenMatrix & EigenVectors, bool) const -> decltype(GetPointerToMatrixData(A), 1U) { auto pointerToData = GetPointerToMatrixData(A); @@ -620,7 +620,7 @@ class ITK_TEMPLATE_EXPORT SymmetricEigenAnalysis EigenConstMatrixMap inputMatrix(pointerToData, m_Dimension, m_Dimension); using EigenSolverType = Eigen::SelfAdjointEigenSolver; EigenSolverType solver(inputMatrix); // Computes EigenValues and EigenVectors - const auto & eigenValues = solver.eigenvalues(); + const auto & eigenValues = solver.eigenvalues(); /* Column k of the returned matrix is an eigenvector corresponding to * eigenvalue number $ k $ as returned by eigenvalues(). * The eigenvectors are normalized to have (Euclidean) norm equal to one. */ @@ -684,7 +684,7 @@ class ITK_TEMPLATE_EXPORT SymmetricEigenAnalysis } using EigenSolverType = Eigen::SelfAdjointEigenSolver; const EigenSolverType solver(inputMatrix, Eigen::EigenvaluesOnly); - auto eigenValues = solver.eigenvalues(); + auto eigenValues = solver.eigenvalues(); if (m_OrderEigenValues == EigenValueOrderEnum::OrderByMagnitude) { detail::sortEigenValuesByMagnitude(eigenValues, m_Dimension); @@ -721,7 +721,7 @@ class ITK_TEMPLATE_EXPORT SymmetricEigenAnalysis EigenConstMatrixMap inputMatrix(pointerToData, m_Dimension, m_Dimension); using EigenSolverType = Eigen::SelfAdjointEigenSolver; EigenSolverType solver(inputMatrix, Eigen::EigenvaluesOnly); - auto eigenValues = solver.eigenvalues(); + auto eigenValues = solver.eigenvalues(); if (m_OrderEigenValues == EigenValueOrderEnum::OrderByMagnitude) { detail::sortEigenValuesByMagnitude(eigenValues, m_Dimension); @@ -899,8 +899,8 @@ class ITK_TEMPLATE_EXPORT SymmetricEigenAnalysisFixedDimension template auto ComputeEigenValuesAndVectorsWithEigenLibraryImpl(const QMatrix & A, - TVector & EigenValues, - TEigenMatrix & EigenVectors, + TVector & EigenValues, + TEigenMatrix & EigenVectors, bool) const -> decltype(GetPointerToMatrixData(A), 1U) { auto pointerToData = GetPointerToMatrixData(A); @@ -912,7 +912,7 @@ class ITK_TEMPLATE_EXPORT SymmetricEigenAnalysisFixedDimension EigenConstMatrixMap inputMatrix(pointerToData); using EigenSolverType = Eigen::SelfAdjointEigenSolver; EigenSolverType solver(inputMatrix); // Computes EigenValues and EigenVectors - const auto & eigenValues = solver.eigenvalues(); + const auto & eigenValues = solver.eigenvalues(); /* Column k of the returned matrix is an eigenvector corresponding to * eigenvalue number $ k $ as returned by eigenvalues(). * The eigenvectors are normalized to have (Euclidean) norm equal to one. */ @@ -956,8 +956,8 @@ class ITK_TEMPLATE_EXPORT SymmetricEigenAnalysisFixedDimension template auto ComputeEigenValuesAndVectorsWithEigenLibraryImpl(const QMatrix & A, - TVector & EigenValues, - TEigenMatrix & EigenVectors, + TVector & EigenValues, + TEigenMatrix & EigenVectors, long) const -> decltype(1U) { using ValueType = decltype(GetMatrixValueType(true)); @@ -972,7 +972,7 @@ class ITK_TEMPLATE_EXPORT SymmetricEigenAnalysisFixedDimension } using EigenSolverType = Eigen::SelfAdjointEigenSolver; const EigenSolverType solver(inputMatrix); // Computes EigenValues and EigenVectors - const auto & eigenValues = solver.eigenvalues(); + const auto & eigenValues = solver.eigenvalues(); /* Column k of the returned matrix is an eigenvector corresponding to * eigenvalue number $ k $ as returned by eigenvalues(). * The eigenvectors are normalized to have (Euclidean) norm equal to one. */ @@ -1031,7 +1031,7 @@ class ITK_TEMPLATE_EXPORT SymmetricEigenAnalysisFixedDimension } using EigenSolverType = Eigen::SelfAdjointEigenSolver; const EigenSolverType solver(inputMatrix, Eigen::EigenvaluesOnly); - auto eigenValues = solver.eigenvalues(); + auto eigenValues = solver.eigenvalues(); if (m_OrderEigenValues == EigenValueOrderEnum::OrderByMagnitude) { detail::sortEigenValuesByMagnitude(eigenValues, VDimension); @@ -1068,7 +1068,7 @@ class ITK_TEMPLATE_EXPORT SymmetricEigenAnalysisFixedDimension EigenConstMatrixMap inputMatrix(pointerToData); using EigenSolverType = Eigen::SelfAdjointEigenSolver; EigenSolverType solver(inputMatrix, Eigen::EigenvaluesOnly); - auto eigenValues = solver.eigenvalues(); + auto eigenValues = solver.eigenvalues(); if (m_OrderEigenValues == EigenValueOrderEnum::OrderByMagnitude) { detail::sortEigenValuesByMagnitude(eigenValues, VDimension); @@ -1084,7 +1084,7 @@ class ITK_TEMPLATE_EXPORT SymmetricEigenAnalysisFixedDimension template std::ostream & -operator<<(std::ostream & os, +operator<<(std::ostream & os, const SymmetricEigenAnalysisFixedDimension & s) { os << "[ClassType: SymmetricEigenAnalysisFixedDimension]" << std::endl; diff --git a/Modules/Core/Common/include/itkSymmetricEigenAnalysis.hxx b/Modules/Core/Common/include/itkSymmetricEigenAnalysis.hxx index ebba8aa3b04..ace95a7e2c8 100644 --- a/Modules/Core/Common/include/itkSymmetricEigenAnalysis.hxx +++ b/Modules/Core/Common/include/itkSymmetricEigenAnalysis.hxx @@ -40,8 +40,8 @@ SymmetricEigenAnalysis::ComputeEigenValues(const template unsigned int SymmetricEigenAnalysis::ComputeEigenValuesAndVectors(const TMatrix & A, - TVector & EigenValues, - TEigenMatrix & EigenVectors) const + TVector & EigenValues, + TEigenMatrix & EigenVectors) const { if (m_UseEigenLibrary) { @@ -90,8 +90,8 @@ template unsigned int SymmetricEigenAnalysis::ComputeEigenValuesAndVectorsLegacy( const TMatrix & A, - TVector & EigenValues, - TEigenMatrix & EigenVectors) const + TVector & EigenValues, + TEigenMatrix & EigenVectors) const { const auto workArea1 = std::make_unique(m_Dimension); const auto workArea2 = std::make_unique(m_Dimension * m_Dimension); @@ -149,8 +149,8 @@ SymmetricEigenAnalysis::ReduceToTridiagonalMatri for (int i = m_Order - 1; i >= 0; --i) { const int l = i - 1; - double h = 0.; - double scale = 0.; + double h = 0.; + double scale = 0.; // Scale row (algol tol then not needed) for (int k = 0; k <= l; ++k) @@ -177,9 +177,9 @@ SymmetricEigenAnalysis::ReduceToTridiagonalMatri } e2[i] = scale * scale * h; - double f = d[l]; + double f = d[l]; const double d__1 = std::sqrt(h); - double g = (-1.0) * itk::Math::sgn0(f) * itk::Math::abs(d__1); + double g = (-1.0) * itk::Math::sgn0(f) * itk::Math::abs(d__1); e[i] = scale * g; h -= f * g; d[l] = f - g; @@ -246,8 +246,8 @@ SymmetricEigenAnalysis::ReduceToTridiagonalMatri template void SymmetricEigenAnalysis::ReduceToTridiagonalMatrixAndGetTransformation(const double * a, - double * d, - double * e, + double * d, + double * e, double * z) const { // Local variables @@ -263,8 +263,8 @@ SymmetricEigenAnalysis::ReduceToTridiagonalMatri for (unsigned int i = m_Order - 1; i > 0; --i) { const unsigned int l = i - 1; - double h = 0.0; - double scale = 0.0; + double h = 0.0; + double scale = 0.0; // Scale row (algol tol then not needed) for (unsigned int k = 0; k <= l; ++k) @@ -291,9 +291,9 @@ SymmetricEigenAnalysis::ReduceToTridiagonalMatri h += d[k] * d[k]; } - double f = d[l]; + double f = d[l]; const double d__1 = std::sqrt(h); - double g = (-1.0) * itk::Math::sgn0(f) * itk::Math::abs(d__1); + double g = (-1.0) * itk::Math::sgn0(f) * itk::Math::abs(d__1); e[i] = scale * g; h -= f * g; d[l] = f - g; @@ -427,7 +427,7 @@ SymmetricEigenAnalysis::ComputeEigenValuesUsingQ for (unsigned int l = 0; l < m_Order; ++l) { unsigned int j = 0; - double h = itk::Math::abs(d[l]) + itk::Math::abs(e[l]); + double h = itk::Math::abs(d[l]) + itk::Math::abs(e[l]); if (tst1 < h) { tst1 = h; @@ -472,12 +472,12 @@ SymmetricEigenAnalysis::ComputeEigenValuesUsingQ f += h; // ql transformation p = d[m]; - double c = 1.; - double c2 = c; + double c = 1.; + double c2 = c; const double el1 = e[l + 1]; - double s = 0.; - double s2 = 0; - double c3 = c2; + double s = 0.; + double s2 = 0; + double c3 = c2; for (unsigned int i = m - 1; i >= l; --i) { c3 = c2; @@ -556,8 +556,8 @@ SymmetricEigenAnalysis::ComputeEigenValuesAndVec } unsigned int ierr = 0; - double c3 = 0.0; - double s2 = 0.0; + double c3 = 0.0; + double s2 = 0.0; for (unsigned int i = 1; i < m_Order; ++i) { e[i - 1] = e[i]; @@ -571,7 +571,7 @@ SymmetricEigenAnalysis::ComputeEigenValuesAndVec for (unsigned int l = 0; l < m_Order; ++l) { unsigned int j = 0; - double h = itk::Math::abs(d[l]) + itk::Math::abs(e[l]); + double h = itk::Math::abs(d[l]) + itk::Math::abs(e[l]); if (tst1 < h) { tst1 = h; @@ -579,7 +579,7 @@ SymmetricEigenAnalysis::ComputeEigenValuesAndVec // Look for small sub-diagonal element unsigned int m; - double tst2; + double tst2; for (m = l; m < m_Order - 1; ++m) { tst2 = tst1 + itk::Math::abs(e[m]); @@ -619,10 +619,10 @@ SymmetricEigenAnalysis::ComputeEigenValuesAndVec f += h; // ql transformation p = d[m]; - double c = 1.0; - double c2 = c; + double c = 1.0; + double c2 = c; const double el1 = e[l + 1]; - double s = 0.; + double s = 0.; for (unsigned int i = m - 1; i >= l; --i) { @@ -668,7 +668,7 @@ SymmetricEigenAnalysis::ComputeEigenValuesAndVec for (unsigned int i = 0; i < m_Order - 1; ++i) { unsigned int k = i; - double p = d[i]; + double p = d[i]; for (unsigned int j = i + 1; j < m_Order; ++j) { @@ -701,7 +701,7 @@ SymmetricEigenAnalysis::ComputeEigenValuesAndVec for (unsigned int i = 0; i < m_Order - 1; ++i) { unsigned int k = i; - double p = d[i]; + double p = d[i]; for (unsigned int j = i + 1; j < m_Order; ++j) { diff --git a/Modules/Core/Common/include/itkSymmetricEllipsoidInteriorExteriorSpatialFunction.hxx b/Modules/Core/Common/include/itkSymmetricEllipsoidInteriorExteriorSpatialFunction.hxx index d173669ab46..9842111c349 100644 --- a/Modules/Core/Common/include/itkSymmetricEllipsoidInteriorExteriorSpatialFunction.hxx +++ b/Modules/Core/Common/include/itkSymmetricEllipsoidInteriorExteriorSpatialFunction.hxx @@ -81,8 +81,8 @@ SymmetricEllipsoidInteriorExteriorSpatialFunction::PrintSelf template void SymmetricEllipsoidInteriorExteriorSpatialFunction::SetOrientation(VectorType orientation, - double uniqueAxis, - double symmetricAxes) + double uniqueAxis, + double symmetricAxes) { m_Orientation = orientation; // Orientation of unique axis of ellipsoid m_SymmetricAxes = symmetricAxes; // Length of symmetric axes diff --git a/Modules/Core/Common/include/itkSymmetricSecondRankTensor.hxx b/Modules/Core/Common/include/itkSymmetricSecondRankTensor.hxx index c89cbd373d0..92702e39f21 100644 --- a/Modules/Core/Common/include/itkSymmetricSecondRankTensor.hxx +++ b/Modules/Core/Common/include/itkSymmetricSecondRankTensor.hxx @@ -239,7 +239,7 @@ auto SymmetricSecondRankTensor::GetTrace() const -> AccumulateValueType { AccumulateValueType trace{}; - unsigned int k = 0; + unsigned int k = 0; for (unsigned int i = 0; i < Dimension; ++i) { @@ -277,7 +277,7 @@ SymmetricSecondRankTensor::ComputeEigenValues(EigenValuesArrayTyp */ template void -SymmetricSecondRankTensor::ComputeEigenAnalysis(EigenValuesArrayType & eigenValues, +SymmetricSecondRankTensor::ComputeEigenAnalysis(EigenValuesArrayType & eigenValues, EigenVectorsMatrixType & eigenVectors) const { const SymmetricEigenAnalysisType symmetricEigenSystem; diff --git a/Modules/Core/Common/include/itkTBBMultiThreader.h b/Modules/Core/Common/include/itkTBBMultiThreader.h index d853ef1d72c..106eb72bf3e 100644 --- a/Modules/Core/Common/include/itkTBBMultiThreader.h +++ b/Modules/Core/Common/include/itkTBBMultiThreader.h @@ -75,18 +75,18 @@ class ITKCommon_EXPORT TBBMultiThreader : public MultiThreaderBase /** Parallelize an operation over an array. If filter argument is not nullptr, * this function will update its progress as each index is completed. */ void - ParallelizeArray(SizeValueType firstIndex, - SizeValueType lastIndexPlus1, + ParallelizeArray(SizeValueType firstIndex, + SizeValueType lastIndexPlus1, ArrayThreadingFunctorType aFunc, - ProcessObject * filter) override; + ProcessObject * filter) override; /** Break up region into smaller chunks, and call the function with chunks as parameters. */ void - ParallelizeImageRegion(unsigned int dimension, + ParallelizeImageRegion(unsigned int dimension, const IndexValueType index[], - const SizeValueType size[], + const SizeValueType size[], ThreadingFunctorType funcP, - ProcessObject * filter) override; + ProcessObject * filter) override; protected: TBBMultiThreader(); diff --git a/Modules/Core/Common/include/itkTetrahedronCell.hxx b/Modules/Core/Common/include/itkTetrahedronCell.hxx index 1e9ad727346..5cc08a1b02a 100644 --- a/Modules/Core/Common/include/itkTetrahedronCell.hxx +++ b/Modules/Core/Common/include/itkTetrahedronCell.hxx @@ -65,20 +65,20 @@ TetrahedronCell::GetNumberOfBoundaryFeatures(int dimension) cons template bool -TetrahedronCell::EvaluatePosition(CoordinateType * x, - PointsContainer * points, - CoordinateType * closestPoint, - CoordinateType pcoord[], - double * minDist2, +TetrahedronCell::EvaluatePosition(CoordinateType * x, + PointsContainer * points, + CoordinateType * closestPoint, + CoordinateType pcoord[], + double * minDist2, InterpolationWeightType * weights) { unsigned int i; - double rhs[PointDimension]; - double c1[PointDimension]; - double c2[PointDimension]; - double c3[PointDimension]; - double det; - double p4; + double rhs[PointDimension]; + double c1[PointDimension]; + double c2[PointDimension]; + double c3[PointDimension]; + double det; + double p4; CoordinateType pcoords[3]; @@ -179,7 +179,7 @@ TetrahedronCell::EvaluatePosition(CoordinateType * x, } else { // could easily be sped up using parametric localization - next release - double dist2; + double dist2; CoordinateType closest[PointDimension]; CoordinateType pc[3]; @@ -209,9 +209,9 @@ TetrahedronCell::EvaluatePosition(CoordinateType * x, template bool -TetrahedronCell::GetBoundaryFeature(int dimension, +TetrahedronCell::GetBoundaryFeature(int dimension, CellFeatureIdentifier featureId, - CellAutoPointer & cellPointer) + CellAutoPointer & cellPointer) { switch (dimension) { @@ -263,7 +263,7 @@ template void TetrahedronCell::SetPointIds(PointIdConstIterator first, PointIdConstIterator last) { - int localId = 0; + int localId = 0; PointIdConstIterator ii(first); while (ii != last) diff --git a/Modules/Core/Common/include/itkThreadSupport.h b/Modules/Core/Common/include/itkThreadSupport.h index 723225efae4..e765a2ae834 100644 --- a/Modules/Core/Common/include/itkThreadSupport.h +++ b/Modules/Core/Common/include/itkThreadSupport.h @@ -86,7 +86,7 @@ struct ConditionVariableType #if defined(ITK_USE_PTHREADS) pthread_cond_t m_ConditionVariable; #elif defined(ITK_USE_WIN32_THREADS) - int m_NumberOfWaiters; // number of waiting threads + int m_NumberOfWaiters; // number of waiting threads CRITICAL_SECTION m_NumberOfWaitersLock; // Serialize access to // m_NumberOfWaiters diff --git a/Modules/Core/Common/include/itkThreadedDomainPartitioner.h b/Modules/Core/Common/include/itkThreadedDomainPartitioner.h index d586887e158..68a23693fe7 100644 --- a/Modules/Core/Common/include/itkThreadedDomainPartitioner.h +++ b/Modules/Core/Common/include/itkThreadedDomainPartitioner.h @@ -76,7 +76,7 @@ class ITK_TEMPLATE_EXPORT ThreadedDomainPartitioner : public Object PartitionDomain(const ThreadIdType threadId, const ThreadIdType requestedTotal, const DomainType & completeDomain, - DomainType & subDomain) const = 0; + DomainType & subDomain) const = 0; protected: ThreadedDomainPartitioner() = default; diff --git a/Modules/Core/Common/include/itkThreadedImageRegionPartitioner.h b/Modules/Core/Common/include/itkThreadedImageRegionPartitioner.h index e8defd9b22b..4b6ee9494ba 100644 --- a/Modules/Core/Common/include/itkThreadedImageRegionPartitioner.h +++ b/Modules/Core/Common/include/itkThreadedImageRegionPartitioner.h @@ -84,7 +84,7 @@ class ITK_TEMPLATE_EXPORT ThreadedImageRegionPartitioner : public ThreadedDomain PartitionDomain(const ThreadIdType threadId, const ThreadIdType requestedTotal, const DomainType & completeRegion, - DomainType & subRegion) const override; + DomainType & subRegion) const override; protected: ThreadedImageRegionPartitioner() = default; diff --git a/Modules/Core/Common/include/itkThreadedImageRegionPartitioner.hxx b/Modules/Core/Common/include/itkThreadedImageRegionPartitioner.hxx index d41b4700e9b..93a23d91fdc 100644 --- a/Modules/Core/Common/include/itkThreadedImageRegionPartitioner.hxx +++ b/Modules/Core/Common/include/itkThreadedImageRegionPartitioner.hxx @@ -27,7 +27,7 @@ ThreadIdType ThreadedImageRegionPartitioner::PartitionDomain(const ThreadIdType threadId, const ThreadIdType requestedTotal, const DomainType & completeRegion, - DomainType & subRegion) const + DomainType & subRegion) const { subRegion = completeRegion; const unsigned int maxNumberOfSplits = m_ImageRegionSplitter->GetSplit(threadId, requestedTotal, subRegion); diff --git a/Modules/Core/Common/include/itkThreadedIndexedContainerPartitioner.h b/Modules/Core/Common/include/itkThreadedIndexedContainerPartitioner.h index 0fce5c02de8..8acda25c4c1 100644 --- a/Modules/Core/Common/include/itkThreadedIndexedContainerPartitioner.h +++ b/Modules/Core/Common/include/itkThreadedIndexedContainerPartitioner.h @@ -82,7 +82,7 @@ class ITKCommon_EXPORT ThreadedIndexedContainerPartitioner : public ThreadedDoma PartitionDomain(const ThreadIdType threadId, const ThreadIdType requestedTotal, const DomainType & completeIndexRange, - DomainType & subIndexRange) const override; + DomainType & subIndexRange) const override; protected: ThreadedIndexedContainerPartitioner(); diff --git a/Modules/Core/Common/include/itkThreadedIteratorRangePartitioner.h b/Modules/Core/Common/include/itkThreadedIteratorRangePartitioner.h index 9224c9558f4..697cfe3043c 100644 --- a/Modules/Core/Common/include/itkThreadedIteratorRangePartitioner.h +++ b/Modules/Core/Common/include/itkThreadedIteratorRangePartitioner.h @@ -148,7 +148,7 @@ class ITK_TEMPLATE_EXPORT ThreadedIteratorRangePartitioner PartitionDomain(const ThreadIdType threadId, const ThreadIdType requestedTotal, const DomainType & completeDomain, - DomainType & subDomain) const override; + DomainType & subDomain) const override; protected: ThreadedIteratorRangePartitioner() = default; diff --git a/Modules/Core/Common/include/itkThreadedIteratorRangePartitioner.hxx b/Modules/Core/Common/include/itkThreadedIteratorRangePartitioner.hxx index 785b0c4fa48..67617fd4aeb 100644 --- a/Modules/Core/Common/include/itkThreadedIteratorRangePartitioner.hxx +++ b/Modules/Core/Common/include/itkThreadedIteratorRangePartitioner.hxx @@ -31,7 +31,7 @@ ThreadIdType ThreadedIteratorRangePartitioner::PartitionDomain(const ThreadIdType threadId, const ThreadIdType requestedTotal, const DomainType & completeDomain, - DomainType & subDomain) const + DomainType & subDomain) const { // overallIndexRange is expected to be inclusive diff --git a/Modules/Core/Common/include/itkTorusInteriorExteriorSpatialFunction.h b/Modules/Core/Common/include/itkTorusInteriorExteriorSpatialFunction.h index 85b39abc80b..d105c6a4f1c 100644 --- a/Modules/Core/Common/include/itkTorusInteriorExteriorSpatialFunction.h +++ b/Modules/Core/Common/include/itkTorusInteriorExteriorSpatialFunction.h @@ -86,8 +86,8 @@ class ITK_TEMPLATE_EXPORT TorusInteriorExteriorSpatialFunction private: InputType m_Origin{}; - double m_MajorRadius{ 3.0 }; - double m_MinorRadius{ 1.0 }; + double m_MajorRadius{ 3.0 }; + double m_MinorRadius{ 1.0 }; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkTotalProgressReporter.h b/Modules/Core/Common/include/itkTotalProgressReporter.h index 313fed0b983..68a28a799f0 100644 --- a/Modules/Core/Common/include/itkTotalProgressReporter.h +++ b/Modules/Core/Common/include/itkTotalProgressReporter.h @@ -51,9 +51,9 @@ class ITKCommon_EXPORT TotalProgressReporter * @param progressWeight - A percentage of the filters progress, this total number of pixels will contribute */ TotalProgressReporter(ProcessObject * filter, - SizeValueType totalNumberOfPixels, - SizeValueType numberOfUpdates = 100, - float progressWeight = 1.0f); + SizeValueType totalNumberOfPixels, + SizeValueType numberOfUpdates = 100, + float progressWeight = 1.0f); /** Destructor sets progress to 1 because the filter has finished. */ ~TotalProgressReporter(); @@ -67,7 +67,7 @@ class ITKCommon_EXPORT TotalProgressReporter // all threads needs to check the abort flag if (m_Filter && m_Filter->GetAbortGenerateData()) { - std::string msg; + std::string msg; ProcessAborted e(__FILE__, __LINE__); msg += "Object " + std::string(m_Filter->GetNameOfClass()) + ": AbortGenerateDataOn"; e.SetDescription(msg); @@ -123,11 +123,11 @@ class ITKCommon_EXPORT TotalProgressReporter protected: ProcessObject * m_Filter; - float m_InverseNumberOfPixels; - SizeValueType m_CurrentPixel{ 0 }; - SizeValueType m_PixelsPerUpdate; - SizeValueType m_PixelsBeforeUpdate; - float m_ProgressWeight; + float m_InverseNumberOfPixels; + SizeValueType m_CurrentPixel{ 0 }; + SizeValueType m_PixelsPerUpdate; + SizeValueType m_PixelsBeforeUpdate; + float m_ProgressWeight; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkTriangleCell.hxx b/Modules/Core/Common/include/itkTriangleCell.hxx index 47c4948d926..5dde4fd2c29 100644 --- a/Modules/Core/Common/include/itkTriangleCell.hxx +++ b/Modules/Core/Common/include/itkTriangleCell.hxx @@ -64,9 +64,9 @@ TriangleCell::GetNumberOfBoundaryFeatures(int dimension) const - template bool -TriangleCell::GetBoundaryFeature(int dimension, +TriangleCell::GetBoundaryFeature(int dimension, CellFeatureIdentifier featureId, - CellAutoPointer & cellPointer) + CellAutoPointer & cellPointer) { switch (dimension) { @@ -108,7 +108,7 @@ template void TriangleCell::SetPointIds(PointIdConstIterator first, PointIdConstIterator last) { - unsigned int localId = 0; + unsigned int localId = 0; PointIdConstIterator ii(first); while ((ii != last) && (localId < NumberOfPoints)) @@ -193,10 +193,10 @@ TriangleCell::GetEdge(CellFeatureIdentifier edgeId, EdgeAutoPoin template double -TriangleCell::DistanceToLine(PointType x, - PointType p1, - PointType p2, - double & t, +TriangleCell::DistanceToLine(PointType x, + PointType p1, + PointType p2, + double & t, CoordinateType * closestPoint) { // convert from CoordinateType * to PointType: @@ -220,10 +220,10 @@ TriangleCell::DistanceToLine(PointType x, template double -TriangleCell::DistanceToLine(PointType x, - PointType p1, - PointType p2, - double & t, +TriangleCell::DistanceToLine(PointType x, + PointType p1, + PointType p2, + double & t, PointType & closestPoint) { VectorType v21 = p2 - p1; @@ -285,9 +285,9 @@ template auto TriangleCell::ComputeBarycenter(CoordinateType * iWeights, PointsContainer * iPoints) -> PointType { - PointType p[3]; + PointType p[3]; CoordinateType sum_weights(0.); - unsigned int i(0); + unsigned int i(0); for (; i < 3; ++i) { @@ -325,7 +325,7 @@ TriangleCell::ComputeCircumCenter(PointsContainer * iPoints) -> { std::vector weights(3, 0.); - PointType p[3]; + PointType p[3]; unsigned int i; for (i = 0; i < 3; ++i) @@ -362,20 +362,20 @@ TriangleCell::ComputeCircumCenter(PointsContainer * iPoints) -> template bool -TriangleCell::EvaluatePosition(CoordinateType * x, - PointsContainer * points, - CoordinateType * closestPoint, - CoordinateType pcoord[], - double * minDist2, +TriangleCell::EvaluatePosition(CoordinateType * x, + PointsContainer * points, + CoordinateType * closestPoint, + CoordinateType pcoord[], + double * minDist2, InterpolationWeightType * weights) { - unsigned int i; - double dist2Point; - double dist2Line1; - double dist2Line2; - PointType closest; - PointType closestPoint1; - PointType closestPoint2; + unsigned int i; + double dist2Point; + double dist2Line1; + double dist2Line2; + PointType closest; + PointType closestPoint1; + PointType closestPoint2; const PointType X(x); if (!points) @@ -398,8 +398,8 @@ TriangleCell::EvaluatePosition(CoordinateType * x, // u12 is orthogonal to v32 // u32 is orthogonal to v12 const double dotproduct = v12 * v32; - VectorType u12 = v12 - v32 * (dotproduct / v32.GetSquaredNorm()); - VectorType u32 = v32 - v12 * (dotproduct / v12.GetSquaredNorm()); + VectorType u12 = v12 - v32 * (dotproduct / v32.GetSquaredNorm()); + VectorType u32 = v32 - v12 * (dotproduct / v12.GetSquaredNorm()); // Add normalizations for making {u12,u32} a vector basis orthonormal to {v12, // v32}. diff --git a/Modules/Core/Common/include/itkTriangleHelper.h b/Modules/Core/Common/include/itkTriangleHelper.h index b2995424bdd..ed1ac5311ae 100644 --- a/Modules/Core/Common/include/itkTriangleHelper.h +++ b/Modules/Core/Common/include/itkTriangleHelper.h @@ -59,11 +59,11 @@ class ITK_TEMPLATE_EXPORT TriangleHelper /** \brief Compute barycenter, with given weights*/ static PointType ComputeBarycenter(const CoordinateType & iA1, - const PointType & iP1, + const PointType & iP1, const CoordinateType & iA2, - const PointType & iP2, + const PointType & iP2, const CoordinateType & iA3, - const PointType & iP3); + const PointType & iP3); /** \brief Compute angles (iA,iB,iC)*/ static CoordinateType diff --git a/Modules/Core/Common/include/itkTriangleHelper.hxx b/Modules/Core/Common/include/itkTriangleHelper.hxx index ca008c077fb..1af7390e9f9 100644 --- a/Modules/Core/Common/include/itkTriangleHelper.hxx +++ b/Modules/Core/Common/include/itkTriangleHelper.hxx @@ -59,8 +59,8 @@ auto TriangleHelper::ComputeNormal(const PointType & iA, const PointType & iB, const PointType & iC) -> VectorType { const CrossVectorType cross; - VectorType w = cross(iB - iA, iC - iA); - const CoordinateType l2 = w.GetSquaredNorm(); + VectorType w = cross(iB - iA, iC - iA); + const CoordinateType l2 = w.GetSquaredNorm(); if (l2 != 0.0) { @@ -83,7 +83,7 @@ TriangleHelper::Cotangent(const PointType & iA, const PointType & iB, co v21 /= std::sqrt(v21_l2); } - VectorType v23 = iC - iB; + VectorType v23 = iC - iB; const CoordinateType v23_l2 = v23.GetSquaredNorm(); if (Math::NotAlmostEquals(v23_l2, CoordinateType{})) { @@ -100,14 +100,14 @@ TriangleHelper::Cotangent(const PointType & iA, const PointType & iB, co template auto TriangleHelper::ComputeBarycenter(const CoordinateType & iA1, - const PointType & iP1, + const PointType & iP1, const CoordinateType & iA2, - const PointType & iP2, + const PointType & iP2, const CoordinateType & iA3, - const PointType & iP3) -> PointType + const PointType & iP3) -> PointType { const CoordinateType total = iA1 + iA2 + iA3; - PointType oPt{}; + PointType oPt{}; if (Math::AlmostEquals(total, CoordinateType{})) { // in such case there is no barycenter; diff --git a/Modules/Core/Common/include/itkUnaryFunctorImageFilter.hxx b/Modules/Core/Common/include/itkUnaryFunctorImageFilter.hxx index e0ce10e85b8..4bba8723fea 100644 --- a/Modules/Core/Common/include/itkUnaryFunctorImageFilter.hxx +++ b/Modules/Core/Common/include/itkUnaryFunctorImageFilter.hxx @@ -48,7 +48,7 @@ UnaryFunctorImageFilter::GenerateOutputInf // this filter allows the input the output to be of different dimensions // get pointers to the input and output - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); const InputImageType * inputPtr = this->GetInput(); if (!outputPtr || !inputPtr) @@ -75,7 +75,7 @@ UnaryFunctorImageFilter::DynamicThreadedGe const OutputImageRegionType & outputRegionForThread) { const TInputImage * inputPtr = this->GetInput(); - TOutputImage * outputPtr = this->GetOutput(0); + TOutputImage * outputPtr = this->GetOutput(0); // Define the portion of the input to walk for this thread, using // the CallCopyOutputRegionToInputRegion method allows for the input @@ -87,7 +87,7 @@ UnaryFunctorImageFilter::DynamicThreadedGe TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); ImageScanlineConstIterator inputIt(inputPtr, inputRegionForThread); - ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); + ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); while (!inputIt.IsAtEnd()) { diff --git a/Modules/Core/Common/include/itkVariableLengthVector.h b/Modules/Core/Common/include/itkVariableLengthVector.h index 9568bd284d1..bf8e108d479 100644 --- a/Modules/Core/Common/include/itkVariableLengthVector.h +++ b/Modules/Core/Common/include/itkVariableLengthVector.h @@ -297,8 +297,8 @@ class ITK_TEMPLATE_EXPORT VariableLengthVector void operator()(unsigned int itkNotUsed(newSize), unsigned int itkNotUsed(oldSize), - TValue2 * itkNotUsed(oldBuffer), - TValue2 * itkNotUsed(newBuffer)) const + TValue2 * itkNotUsed(oldBuffer), + TValue2 * itkNotUsed(newBuffer)) const {} }; //@} @@ -983,7 +983,7 @@ class ITK_TEMPLATE_EXPORT VariableLengthVector private: bool m_LetArrayManageMemory{ true }; // if true, the array is responsible // for memory of data - TValue * m_Data{}; // Array to hold data + TValue * m_Data{}; // Array to hold data ElementIdentifier m_NumElements{ 0 }; }; @@ -1379,7 +1379,7 @@ std::ostream & operator<<(std::ostream & os, const VariableLengthVector & arr) { const unsigned int length = arr.Size(); - const int last = static_cast(length) - 1; + const int last = static_cast(length) - 1; os << '['; for (int i = 0; i < last; ++i) diff --git a/Modules/Core/Common/include/itkVector.h b/Modules/Core/Common/include/itkVector.h index e34a8bb9477..2aa95c67074 100644 --- a/Modules/Core/Common/include/itkVector.h +++ b/Modules/Core/Common/include/itkVector.h @@ -313,13 +313,13 @@ std::istream & operator>>(std::istream & is, Vector & vct); ITKCommon_EXPORT Vector - CrossProduct(const Vector &, const Vector &); +CrossProduct(const Vector &, const Vector &); ITKCommon_EXPORT Vector - CrossProduct(const Vector &, const Vector &); +CrossProduct(const Vector &, const Vector &); ITKCommon_EXPORT Vector - CrossProduct(const Vector &, const Vector &); +CrossProduct(const Vector &, const Vector &); template @@ -338,7 +338,7 @@ MakeVector(const TValue firstValue, const TVariadic... otherValues) static_assert(std::conjunction_v...>, "The other values should have the same type as the first value."); - constexpr unsigned int dimension{ 1 + sizeof...(TVariadic) }; + constexpr unsigned int dimension{ 1 + sizeof...(TVariadic) }; const std::array stdArray{ { firstValue, otherValues... } }; return Vector{ stdArray }; } diff --git a/Modules/Core/Common/include/itkVectorContainer.h b/Modules/Core/Common/include/itkVectorContainer.h index 9ee59857bde..9d536323f4a 100644 --- a/Modules/Core/Common/include/itkVectorContainer.h +++ b/Modules/Core/Common/include/itkVectorContainer.h @@ -273,7 +273,7 @@ class ITK_TEMPLATE_EXPORT VectorContainer } private: - size_type m_Pos{}; + size_type m_Pos{}; VectorIterator m_Iter{}; friend class ConstIterator; }; @@ -415,7 +415,7 @@ class ITK_TEMPLATE_EXPORT VectorContainer } private: - size_type m_Pos{}; + size_type m_Pos{}; VectorConstIterator m_Iter{}; friend class Iterator; }; diff --git a/Modules/Core/Common/include/itkVectorContainer.hxx b/Modules/Core/Common/include/itkVectorContainer.hxx index a8fc5962093..e73a8f0d159 100644 --- a/Modules/Core/Common/include/itkVectorContainer.hxx +++ b/Modules/Core/Common/include/itkVectorContainer.hxx @@ -89,7 +89,7 @@ VectorContainer::IndexExists(ElementIdentifier ide template bool VectorContainer::GetElementIfIndexExists(ElementIdentifier identifier, - Element * element) const + Element * element) const { if (NumericTraits::IsNonnegative(identifier) && (identifier < static_cast(this->VectorType::size()))) diff --git a/Modules/Core/Common/include/itkVectorImageNeighborhoodAccessorFunctor.h b/Modules/Core/Common/include/itkVectorImageNeighborhoodAccessorFunctor.h index 9f5cf3b51be..48ab454c0f3 100644 --- a/Modules/Core/Common/include/itkVectorImageNeighborhoodAccessorFunctor.h +++ b/Modules/Core/Common/include/itkVectorImageNeighborhoodAccessorFunctor.h @@ -105,9 +105,9 @@ class VectorImageNeighborhoodAccessorFunctor template inline typename ImageBoundaryConditionType::OutputPixelType - BoundaryCondition(const OffsetType & point_index, - const OffsetType & boundary_offset, - const NeighborhoodType * data, + BoundaryCondition(const OffsetType & point_index, + const OffsetType & boundary_offset, + const NeighborhoodType * data, const ImageBoundaryConditionType * boundaryCondition) const { return boundaryCondition->operator()(point_index, boundary_offset, data, *this); diff --git a/Modules/Core/Common/include/itkVectorNeighborhoodInnerProduct.hxx b/Modules/Core/Common/include/itkVectorNeighborhoodInnerProduct.hxx index f1ec122c510..e766e016520 100644 --- a/Modules/Core/Common/include/itkVectorNeighborhoodInnerProduct.hxx +++ b/Modules/Core/Common/include/itkVectorNeighborhoodInnerProduct.hxx @@ -22,13 +22,13 @@ namespace itk { template auto -VectorNeighborhoodInnerProduct::operator()(const std::slice & s, +VectorNeighborhoodInnerProduct::operator()(const std::slice & s, const ConstNeighborhoodIterator & it, - const OperatorType & op) const -> PixelType + const OperatorType & op) const -> PixelType { PixelType sum{}; - typename OperatorType::ConstIterator o_it = op.Begin(); + typename OperatorType::ConstIterator o_it = op.Begin(); const typename OperatorType::ConstIterator op_end = op.End(); const auto start = static_cast(s.start()); @@ -48,13 +48,13 @@ VectorNeighborhoodInnerProduct::operator()(const std::slice & template auto -VectorNeighborhoodInnerProduct::operator()(const std::slice & s, +VectorNeighborhoodInnerProduct::operator()(const std::slice & s, const NeighborhoodType & it, - const OperatorType & op) const -> PixelType + const OperatorType & op) const -> PixelType { PixelType sum{}; - typename OperatorType::ConstIterator o_it = op.Begin(); + typename OperatorType::ConstIterator o_it = op.Begin(); const typename OperatorType::ConstIterator op_end = op.End(); const auto start = static_cast(s.start()); diff --git a/Modules/Core/Common/include/itkVersor.hxx b/Modules/Core/Common/include/itkVersor.hxx index d4c0cb7c821..63256591549 100644 --- a/Modules/Core/Common/include/itkVersor.hxx +++ b/Modules/Core/Common/include/itkVersor.hxx @@ -246,7 +246,7 @@ Versor Versor::SquareRoot() const { const ValueType newScalar = std::sqrt(static_cast(1.0 + m_W)); - const double sqrtOfTwo = std::sqrt(2.0f); + const double sqrtOfTwo = std::sqrt(2.0f); const double factor = 1.0f / (newScalar * sqrtOfTwo); @@ -485,10 +485,10 @@ namespace template inline const OutputVectorType localTransformVectorMath(const InputVectorType & VectorObject, - const ValueType & inputX, - const ValueType & inputY, - const ValueType & inputZ, - const ValueType & inputW) + const ValueType & inputX, + const ValueType & inputY, + const ValueType & inputZ, + const ValueType & inputW) { const ValueType xx = inputX * inputX; const ValueType yy = inputY * inputY; diff --git a/Modules/Core/Common/include/itkVertexCell.hxx b/Modules/Core/Common/include/itkVertexCell.hxx index a6f0de99cd3..7d7b596a524 100644 --- a/Modules/Core/Common/include/itkVertexCell.hxx +++ b/Modules/Core/Common/include/itkVertexCell.hxx @@ -71,7 +71,7 @@ template void VertexCell::SetPointIds(PointIdConstIterator first, PointIdConstIterator last) { - int localId = 0; + int localId = 0; PointIdConstIterator ii(first); while (ii != last) @@ -131,11 +131,11 @@ VertexCell::GetPointId() -> PointIdentifier template bool -VertexCell::EvaluatePosition(CoordinateType * x, - PointsContainer * points, - CoordinateType * closestPoint, - CoordinateType pcoord[], - double * minDist2, +VertexCell::EvaluatePosition(CoordinateType * x, + PointsContainer * points, + CoordinateType * closestPoint, + CoordinateType pcoord[], + double * minDist2, InterpolationWeightType * weights) { PointType X = points->GetElement(m_PointIds[0]); diff --git a/Modules/Core/Common/include/itkZeroFluxNeumannBoundaryCondition.h b/Modules/Core/Common/include/itkZeroFluxNeumannBoundaryCondition.h index 6eeb4fcf926..82447a4db8d 100644 --- a/Modules/Core/Common/include/itkZeroFluxNeumannBoundaryCondition.h +++ b/Modules/Core/Common/include/itkZeroFluxNeumannBoundaryCondition.h @@ -86,16 +86,16 @@ class ITK_TEMPLATE_EXPORT ZeroFluxNeumannBoundaryCondition : public ImageBoundar /** Computes and returns a neighborhood of appropriate values from * neighborhood iterator data.. */ OutputPixelType - operator()(const OffsetType & point_index, - const OffsetType & boundary_offset, + operator()(const OffsetType & point_index, + const OffsetType & boundary_offset, const NeighborhoodType * data) const override; /** Computes and returns the appropriate pixel value from * neighborhood iterator data, using the functor. */ OutputPixelType - operator()(const OffsetType & point_index, - const OffsetType & boundary_offset, - const NeighborhoodType * data, + operator()(const OffsetType & point_index, + const OffsetType & boundary_offset, + const NeighborhoodType * data, const NeighborhoodAccessorFunctorType & neighborhoodAccessorFunctor) const override; /** Determines the necessary input region for the output region. diff --git a/Modules/Core/Common/include/itkZeroFluxNeumannBoundaryCondition.hxx b/Modules/Core/Common/include/itkZeroFluxNeumannBoundaryCondition.hxx index d5f7e7f5cc3..e627f179f22 100644 --- a/Modules/Core/Common/include/itkZeroFluxNeumannBoundaryCondition.hxx +++ b/Modules/Core/Common/include/itkZeroFluxNeumannBoundaryCondition.hxx @@ -23,8 +23,8 @@ namespace itk { template auto -ZeroFluxNeumannBoundaryCondition::operator()(const OffsetType & point_index, - const OffsetType & boundary_offset, +ZeroFluxNeumannBoundaryCondition::operator()(const OffsetType & point_index, + const OffsetType & boundary_offset, const NeighborhoodType * data) const -> OutputPixelType { @@ -63,9 +63,9 @@ ZeroFluxNeumannBoundaryCondition::operator()(const Of template auto ZeroFluxNeumannBoundaryCondition::operator()( - const OffsetType & point_index, - const OffsetType & boundary_offset, - const NeighborhoodType * data, + const OffsetType & point_index, + const OffsetType & boundary_offset, + const NeighborhoodType * data, const NeighborhoodAccessorFunctorType & neighborhoodAccessorFunctor) const -> OutputPixelType { int linear_index = 0; @@ -87,13 +87,13 @@ ZeroFluxNeumannBoundaryCondition::GetInputRequestedRe const RegionType & outputRequestedRegion) const -> RegionType { IndexType inputIndex = inputLargestPossibleRegion.GetIndex(); - SizeType inputSize = inputLargestPossibleRegion.GetSize(); + SizeType inputSize = inputLargestPossibleRegion.GetSize(); IndexType outputIndex = outputRequestedRegion.GetIndex(); - SizeType outputSize = outputRequestedRegion.GetSize(); + SizeType outputSize = outputRequestedRegion.GetSize(); IndexType requestIndex; - SizeType requestSize; + SizeType requestSize; for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -151,13 +151,13 @@ ZeroFluxNeumannBoundaryCondition::GetInputRequestedRe template auto -ZeroFluxNeumannBoundaryCondition::GetPixel(const IndexType & index, +ZeroFluxNeumannBoundaryCondition::GetPixel(const IndexType & index, const TInputImage * image) const -> OutputPixelType { const RegionType imageRegion = image->GetLargestPossibleRegion(); - IndexType imageIndex = imageRegion.GetIndex(); - SizeType imageSize = imageRegion.GetSize(); + IndexType imageIndex = imageRegion.GetIndex(); + SizeType imageSize = imageRegion.GetSize(); IndexType lookupIndex; diff --git a/Modules/Core/Common/include/itkZeroFluxNeumannImageNeighborhoodPixelAccessPolicy.h b/Modules/Core/Common/include/itkZeroFluxNeumannImageNeighborhoodPixelAccessPolicy.h index 0237e55f302..f32c2edb9b0 100644 --- a/Modules/Core/Common/include/itkZeroFluxNeumannImageNeighborhoodPixelAccessPolicy.h +++ b/Modules/Core/Common/include/itkZeroFluxNeumannImageNeighborhoodPixelAccessPolicy.h @@ -76,8 +76,8 @@ class ZeroFluxNeumannImageNeighborhoodPixelAccessPolicy final // current pixel within the image buffer. static IndexValueType CalculatePixelIndexValue(const ImageSizeType & imageSize, - const OffsetType & offsetTable, - const IndexType & pixelIndex) noexcept + const OffsetType & offsetTable, + const IndexType & pixelIndex) noexcept { IndexValueType result = 0; @@ -101,10 +101,10 @@ class ZeroFluxNeumannImageNeighborhoodPixelAccessPolicy final /** Constructor called directly by the pixel proxy of * ShapedImageNeighborhoodRange. */ - ZeroFluxNeumannImageNeighborhoodPixelAccessPolicy(const ImageSizeType & imageSize, - const OffsetType & offsetTable, + ZeroFluxNeumannImageNeighborhoodPixelAccessPolicy(const ImageSizeType & imageSize, + const OffsetType & offsetTable, const NeighborhoodAccessorFunctorType & neighborhoodAccessor, - const IndexType & pixelIndex) noexcept + const IndexType & pixelIndex) noexcept : m_PixelIndexValue{ CalculatePixelIndexValue(imageSize, offsetTable, pixelIndex) } , m_NeighborhoodAccessor(neighborhoodAccessor) {} diff --git a/Modules/Core/Common/src/itkAnatomicalOrientation.cxx b/Modules/Core/Common/src/itkAnatomicalOrientation.cxx index 79ae7d50cbc..e71de04d178 100644 --- a/Modules/Core/Common/src/itkAnatomicalOrientation.cxx +++ b/Modules/Core/Common/src/itkAnatomicalOrientation.cxx @@ -80,7 +80,7 @@ AnatomicalOrientation::CreateFromPositiveStringEncoding(std::string str) std::transform(str.begin(), str.end(), str.begin(), ::toupper); const std::map & stringToCode = GetStringToCode(); - auto iter = stringToCode.find(str); + auto iter = stringToCode.find(str); if (iter == stringToCode.end()) { return AnatomicalOrientation(PositiveEnum::INVALID); @@ -167,7 +167,7 @@ AnatomicalOrientation::GetStringToCode() { auto createStringToCode = []() -> std::map { - std::map stringToCode; + std::map stringToCode; const std::map & codeToString = GetCodeToString(); for (const auto & kv : codeToString) @@ -201,7 +201,7 @@ AnatomicalOrientation::ConvertDirectionToPositiveEnum(const DirectionType & dir) for (unsigned i = 0; i < 3; ++i) { - auto max_idx = value_to_idx.rbegin()->second; + auto max_idx = value_to_idx.rbegin()->second; const unsigned int max_c = max_idx.first; const unsigned int max_r = max_idx.second; @@ -253,7 +253,7 @@ AnatomicalOrientation::ConvertPositiveEnumToDirection(PositiveEnum orientationEn const AnatomicalOrientation o(orientationEnum); const CoordinateEnum terms[Dimension] = { o.GetPrimaryTerm(), o.GetSecondaryTerm(), o.GetTertiaryTerm() }; - DirectionType direction{}; + DirectionType direction{}; for (unsigned int i = 0; i < Dimension; ++i) { diff --git a/Modules/Core/Common/src/itkEquivalencyTable.cxx b/Modules/Core/Common/src/itkEquivalencyTable.cxx index 2b81e846cae..2cc5d35cf8f 100644 --- a/Modules/Core/Common/src/itkEquivalencyTable.cxx +++ b/Modules/Core/Common/src/itkEquivalencyTable.cxx @@ -65,7 +65,7 @@ EquivalencyTable::AddAndFlatten(unsigned long a, unsigned long b) b = temp; } - const unsigned long bFlattened = this->RecursiveLookup(b); + const unsigned long bFlattened = this->RecursiveLookup(b); const std::pair result = m_HashMap.insert(ValueType(a, bFlattened)); if (result.second == false) @@ -121,7 +121,7 @@ EquivalencyTable::RecursiveLookup(const unsigned long a) const unsigned long last_ans = a; ConstIterator it; - auto hashEnd = m_HashMap.end(); + auto hashEnd = m_HashMap.end(); while ((it = m_HashMap.find(ans)) != hashEnd) { diff --git a/Modules/Core/Common/src/itkExceptionObject.cxx b/Modules/Core/Common/src/itkExceptionObject.cxx index ac7b1f4c438..9e01f40c635 100644 --- a/Modules/Core/Common/src/itkExceptionObject.cxx +++ b/Modules/Core/Common/src/itkExceptionObject.cxx @@ -55,11 +55,11 @@ class ExceptionObject::ExceptionData // The data members should never change after construction of the // ExceptionData object, // to ensure the consistency of the exception data. - const std::string m_Location; - const std::string m_Description; - const std::string m_File; + const std::string m_Location; + const std::string m_Description; + const std::string m_File; const unsigned int m_Line; - std::string m_What; + std::string m_What; }; diff --git a/Modules/Core/Common/src/itkFloatingPointExceptions.cxx b/Modules/Core/Common/src/itkFloatingPointExceptions.cxx index 2b1405db4e5..c75ee883d37 100644 --- a/Modules/Core/Common/src/itkFloatingPointExceptions.cxx +++ b/Modules/Core/Common/src/itkFloatingPointExceptions.cxx @@ -36,7 +36,7 @@ struct ExceptionGlobals { ExceptionGlobals() = default; FloatingPointExceptions::ExceptionActionEnum m_ExceptionAction{ FloatingPointExceptions::ExceptionActionEnum::ABORT }; - bool m_Enabled{ false }; + bool m_Enabled{ false }; }; void diff --git a/Modules/Core/Common/src/itkFloatingPointExceptions_unix_signalhandler.cxx b/Modules/Core/Common/src/itkFloatingPointExceptions_unix_signalhandler.cxx index d615478d547..4e62cc40f99 100644 --- a/Modules/Core/Common/src/itkFloatingPointExceptions_unix_signalhandler.cxx +++ b/Modules/Core/Common/src/itkFloatingPointExceptions_unix_signalhandler.cxx @@ -94,7 +94,7 @@ extern "C" { std::cout << "FPE Signal Caught" << std::endl; std::cout.flush(); - int fe_code = sip->si_code; + int fe_code = sip->si_code; unsigned int excepts = fetestexcept(FE_ALL_EXCEPT); std::stringstream msg; @@ -138,7 +138,7 @@ extern "C" { #if DEFINED_INTEL unsigned short x87cr, x87sr; - unsigned int mxcsr; + unsigned int mxcsr; getx87cr(x87cr); getx87sr(x87sr); diff --git a/Modules/Core/Common/src/itkImageRegionSplitterDirection.cxx b/Modules/Core/Common/src/itkImageRegionSplitterDirection.cxx index c8f621417cb..78f86fd51f9 100644 --- a/Modules/Core/Common/src/itkImageRegionSplitterDirection.cxx +++ b/Modules/Core/Common/src/itkImageRegionSplitterDirection.cxx @@ -33,10 +33,10 @@ ImageRegionSplitterDirection::PrintSelf(std::ostream & os, Indent indent) const } unsigned int -ImageRegionSplitterDirection::GetNumberOfSplitsInternal(unsigned int dim, +ImageRegionSplitterDirection::GetNumberOfSplitsInternal(unsigned int dim, const IndexValueType itkNotUsed(regionIndex)[], - const SizeValueType regionSize[], - unsigned int requestedNumber) const + const SizeValueType regionSize[], + unsigned int requestedNumber) const { requestedNumber = std::max(1u, requestedNumber); // split on the outermost dimension available @@ -53,18 +53,18 @@ ImageRegionSplitterDirection::GetNumberOfSplitsInternal(unsigned int dim // determine the actual number of pieces that will be generated const SizeValueType range = regionSize[splitAxis]; - const auto valuesPerPiece = Math::Ceil(range / static_cast(requestedNumber)); - const unsigned int maxPieceUsed = Math::Ceil(range / static_cast(valuesPerPiece)) - 1; + const auto valuesPerPiece = Math::Ceil(range / static_cast(requestedNumber)); + const unsigned int maxPieceUsed = Math::Ceil(range / static_cast(valuesPerPiece)) - 1; return maxPieceUsed + 1; } unsigned int -ImageRegionSplitterDirection::GetSplitInternal(unsigned int dim, - unsigned int i, - unsigned int numberOfPieces, +ImageRegionSplitterDirection::GetSplitInternal(unsigned int dim, + unsigned int i, + unsigned int numberOfPieces, IndexValueType regionIndex[], - SizeValueType regionSize[]) const + SizeValueType regionSize[]) const { // split on the outermost dimension available // and avoid the current dimension @@ -80,8 +80,8 @@ ImageRegionSplitterDirection::GetSplitInternal(unsigned int dim, } // determine the actual number of pieces that will be generated - const auto range = static_cast(regionSize[splitAxis]); - const auto valuesPerPiece = Math::Ceil(range / static_cast(numberOfPieces)); + const auto range = static_cast(regionSize[splitAxis]); + const auto valuesPerPiece = Math::Ceil(range / static_cast(numberOfPieces)); const unsigned int maxPieceIdUsed = Math::Ceil(range / static_cast(valuesPerPiece)) - 1; diff --git a/Modules/Core/Common/src/itkImageRegionSplitterMultidimensional.cxx b/Modules/Core/Common/src/itkImageRegionSplitterMultidimensional.cxx index 683f0363eea..e18e221cbf4 100644 --- a/Modules/Core/Common/src/itkImageRegionSplitterMultidimensional.cxx +++ b/Modules/Core/Common/src/itkImageRegionSplitterMultidimensional.cxx @@ -33,10 +33,10 @@ ImageRegionSplitterMultidimensional::PrintSelf(std::ostream & os, Indent indent) } unsigned int -ImageRegionSplitterMultidimensional::GetNumberOfSplitsInternal(unsigned int dim, +ImageRegionSplitterMultidimensional::GetNumberOfSplitsInternal(unsigned int dim, const IndexValueType regionIndex[], - const SizeValueType regionSize[], - unsigned int requestedNumber) const + const SizeValueType regionSize[], + unsigned int requestedNumber) const { // number of splits in each dimension std::vector splits(dim); // Note: stack allocation preferred @@ -47,11 +47,11 @@ ImageRegionSplitterMultidimensional::GetNumberOfSplitsInternal(unsigned int } unsigned int -ImageRegionSplitterMultidimensional::GetSplitInternal(unsigned int dim, - unsigned int splitI, - unsigned int numberOfPieces, +ImageRegionSplitterMultidimensional::GetSplitInternal(unsigned int dim, + unsigned int splitI, + unsigned int numberOfPieces, IndexValueType regionIndex[], - SizeValueType regionSize[]) const + SizeValueType regionSize[]) const { // number of splits in each dimension std::vector splits(dim); // Note: stack allocation preferred @@ -81,7 +81,7 @@ ImageRegionSplitterMultidimensional::GetSplitInternal(unsigned int dim, for (unsigned int i = 0; i < dim; ++i) { const SizeValueType inputRegionSize = regionSize[i]; - const auto indexOffset = + const auto indexOffset = Math::Floor((splittedRegionIndex[i]) * (inputRegionSize / static_cast(splits[i]))); regionIndex[i] += indexOffset; @@ -108,15 +108,15 @@ ImageRegionSplitterMultidimensional::GetSplitInternal(unsigned int dim, * as "splits" and returns the total number of splitted regions */ unsigned int -ImageRegionSplitterMultidimensional::ComputeSplits(unsigned int dim, - unsigned int requestedNumber, +ImageRegionSplitterMultidimensional::ComputeSplits(unsigned int dim, + unsigned int requestedNumber, const IndexValueType itkNotUsed(regionIndex)[], - const SizeValueType regionSize[], - unsigned int splits[]) + const SizeValueType regionSize[], + unsigned int splits[]) { // size of each splited region std::vector splitRegionSize(dim); // Note: stack allocation preferred - unsigned int numberOfPieces = 1; + unsigned int numberOfPieces = 1; // initialize arrays for (unsigned int i = 0; i < dim; ++i) diff --git a/Modules/Core/Common/src/itkImageRegionSplitterSlowDimension.cxx b/Modules/Core/Common/src/itkImageRegionSplitterSlowDimension.cxx index 243bb163bd2..fda2650efcb 100644 --- a/Modules/Core/Common/src/itkImageRegionSplitterSlowDimension.cxx +++ b/Modules/Core/Common/src/itkImageRegionSplitterSlowDimension.cxx @@ -25,10 +25,10 @@ namespace itk ImageRegionSplitterSlowDimension::ImageRegionSplitterSlowDimension() = default; unsigned int -ImageRegionSplitterSlowDimension::GetNumberOfSplitsInternal(unsigned int dim, +ImageRegionSplitterSlowDimension::GetNumberOfSplitsInternal(unsigned int dim, const IndexValueType itkNotUsed(regionIndex)[], - const SizeValueType regionSize[], - unsigned int requestedNumber) const + const SizeValueType regionSize[], + unsigned int requestedNumber) const { requestedNumber = std::max(1u, requestedNumber); // split on the outermost dimension available @@ -44,19 +44,19 @@ ImageRegionSplitterSlowDimension::GetNumberOfSplitsInternal(unsigned int } // determine the actual number of pieces that will be generated - const double range = regionSize[splitAxis]; - const auto valuesPerPiece = Math::Ceil(range / static_cast(requestedNumber)); + const double range = regionSize[splitAxis]; + const auto valuesPerPiece = Math::Ceil(range / static_cast(requestedNumber)); const unsigned int maxPieceUsed = Math::Ceil(range / static_cast(valuesPerPiece)) - 1; return maxPieceUsed + 1; } unsigned int -ImageRegionSplitterSlowDimension::GetSplitInternal(unsigned int dim, - unsigned int i, - unsigned int numberOfPieces, +ImageRegionSplitterSlowDimension::GetSplitInternal(unsigned int dim, + unsigned int i, + unsigned int numberOfPieces, IndexValueType regionIndex[], - SizeValueType regionSize[]) const + SizeValueType regionSize[]) const { // split on the outermost dimension available unsigned int splitAxis = dim - 1; @@ -71,8 +71,8 @@ ImageRegionSplitterSlowDimension::GetSplitInternal(unsigned int dim, } // determine the actual number of pieces that will be generated - const auto range = static_cast(regionSize[splitAxis]); - const auto valuesPerPiece = Math::Ceil(range / static_cast(numberOfPieces)); + const auto range = static_cast(regionSize[splitAxis]); + const auto valuesPerPiece = Math::Ceil(range / static_cast(numberOfPieces)); const unsigned int maxPieceIdUsed = Math::Ceil(range / static_cast(valuesPerPiece)) - 1; // Split the region diff --git a/Modules/Core/Common/src/itkLightObject.cxx b/Modules/Core/Common/src/itkLightObject.cxx index 4e6677b7b3e..70c0a481d69 100644 --- a/Modules/Core/Common/src/itkLightObject.cxx +++ b/Modules/Core/Common/src/itkLightObject.cxx @@ -191,8 +191,8 @@ LightObject::PrintSelf(std::ostream & os, Indent indent) const { #ifdef GCC_USEDEMANGLE const char * mangledName = typeid(*this).name(); - int status; - char * unmangled = abi::__cxa_demangle(mangledName, nullptr, nullptr, &status); + int status; + char * unmangled = abi::__cxa_demangle(mangledName, nullptr, nullptr, &status); os << indent << "RTTI typeinfo: "; diff --git a/Modules/Core/Common/src/itkLoggerBase.cxx b/Modules/Core/Common/src/itkLoggerBase.cxx index e1090cf026c..8071cafc1be 100644 --- a/Modules/Core/Common/src/itkLoggerBase.cxx +++ b/Modules/Core/Common/src/itkLoggerBase.cxx @@ -73,7 +73,7 @@ LoggerBase::BuildFormattedEntry(PriorityLevelEnum level, const std::string & con { static const std::string levelString[] = { "(MUSTFLUSH) ", "(FATAL) ", "(CRITICAL) ", "(WARNING) ", "(INFO) ", "(DEBUG) ", "(NOTSET) " }; - std::ostringstream s; + std::ostringstream s; switch (this->m_TimeStampFormat) { diff --git a/Modules/Core/Common/src/itkMemoryUsageObserver.cxx b/Modules/Core/Common/src/itkMemoryUsageObserver.cxx index b8744c3d8ef..5b4f45ecbf6 100644 --- a/Modules/Core/Common/src/itkMemoryUsageObserver.cxx +++ b/Modules/Core/Common/src/itkMemoryUsageObserver.cxx @@ -101,7 +101,7 @@ struct UNICODE_STRING { USHORT Length; USHORT MaximumLength; - PWSTR Buffer; + PWSTR Buffer; }; struct VM_COUNTERS @@ -122,7 +122,7 @@ struct VM_COUNTERS # else SIZE_T PeakVirtualSize; SIZE_T VirtualSize; - ULONG PageFaultCount; + ULONG PageFaultCount; SIZE_T PeakWorkingSetSize; SIZE_T WorkingSetSize; SIZE_T QuotaPeakPagedPoolUsage; @@ -139,27 +139,27 @@ struct SYSTEM_THREADS LARGE_INTEGER KernelTime; LARGE_INTEGER UserTime; LARGE_INTEGER CreateTime; - ULONG WaitTime; - PVOID StartAddress; - CLIENT_ID ClientId; - KPRIORITY Priority; - KPRIORITY BasePriority; - ULONG ContextSwitchCount; - LONG State; - LONG WaitReason; + ULONG WaitTime; + PVOID StartAddress; + CLIENT_ID ClientId; + KPRIORITY Priority; + KPRIORITY BasePriority; + ULONG ContextSwitchCount; + LONG State; + LONG WaitReason; }; using PSYSTEM_THREADS = SYSTEM_THREADS *; struct SYSTEM_PROCESSES { // Information Class 5 - ULONG NextEntryDelta; - ULONG MaximumNumberOfThreads; - ULONG Reserved1[6]; - LARGE_INTEGER CreateTime; - LARGE_INTEGER UserTime; - LARGE_INTEGER KernelTime; + ULONG NextEntryDelta; + ULONG MaximumNumberOfThreads; + ULONG Reserved1[6]; + LARGE_INTEGER CreateTime; + LARGE_INTEGER UserTime; + LARGE_INTEGER KernelTime; UNICODE_STRING ProcessName; - KPRIORITY BasePriority; + KPRIORITY BasePriority; # ifdef _WIN64 ULONG pad1; ULONG ProcessId; @@ -172,8 +172,8 @@ struct SYSTEM_PROCESSES ULONG ProcessId; ULONG InheritedFromProcessId; # endif - ULONG HandleCount; - ULONG Reserved2[2]; + ULONG HandleCount; + ULONG Reserved2[2]; VM_COUNTERS VmCounters; # if defined(_WIN64) || _WIN32_WINNT >= 0x500 IO_COUNTERS IoCounters; @@ -189,7 +189,7 @@ WindowsMemoryUsageObserver::GetMemoryUsage() MemoryLoadType mem = 0; # if defined(SUPPORT_PSAPI) - DWORD pid = GetCurrentProcessId(); + DWORD pid = GetCurrentProcessId(); PROCESS_MEMORY_COUNTERS memoryCounters; HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid); @@ -220,8 +220,8 @@ WindowsMemoryUsageObserver::GetMemoryUsage() << "You should probably disable SUPPORT_TOOLHELP32"); } - DWORD pid = GetCurrentProcessId(); - ULONG n = 50; + DWORD pid = GetCurrentProcessId(); + ULONG n = 50; PSYSTEM_PROCESSES sp = new SYSTEM_PROCESSES[n]; // as we can't know how many processes are running, we loop and test a new size // every time. @@ -288,7 +288,7 @@ LinuxMemoryUsageObserver::GetMemoryUsage() // the two fields we want // unsigned long vsize; - long rss; + long rss; procstats >> pid >> comm >> state >> ppid >> pgrp >> session >> tty_nr >> tpgid >> flags >> minflt >> cminflt >> majflt >> cmajflt >> utime >> stime >> cutime >> cstime >> priority >> nice >> O >> itrealvalue >> starttime >> @@ -315,10 +315,10 @@ MacOSXMemoryUsageObserver::GetMemoryUsage() // // this method comes from // https://stackoverflow.com/questions/5839626/how-is-top-able-to-see-memory-usage - const task_t targetTask = mach_task_self(); + const task_t targetTask = mach_task_self(); struct task_basic_info ti; mach_msg_type_number_t count = TASK_BASIC_INFO_64_COUNT; - const kern_return_t kr = task_info(targetTask, TASK_BASIC_INFO_64, (task_info_t)&ti, &count); + const kern_return_t kr = task_info(targetTask, TASK_BASIC_INFO_64, (task_info_t)&ti, &count); if (kr != KERN_SUCCESS) { return 0; @@ -355,9 +355,9 @@ MemoryUsageObserverBase::MemoryLoadType SunSolarisMemoryUsageObserver::GetMemoryUsage() { MemoryLoadType mem = 0; - int pid = getpid(); + int pid = getpid(); - FILE * fp = nullptr; + FILE * fp = nullptr; std::stringstream command; command << "pmap " << pid << std::endl; @@ -367,16 +367,16 @@ SunSolarisMemoryUsageObserver::GetMemoryUsage() itkGenericExceptionMacro("Error using pmap. Can execute pmap command"); } char remaining[256]; - int pmappid = -1; + int pmappid = -1; fscanf(fp, "%d:%s", &pmappid, remaining); // the first word shall be the process ID if (pmappid != pid) { itkGenericExceptionMacro("Error using pmap. 1st line output shall be PID: name"); } - bool heapNotFound = true; - char address[64], perms[32]; - int memUsage = 0; + bool heapNotFound = true; + char address[64], perms[32]; + int memUsage = 0; std::string mapping; while (heapNotFound) { diff --git a/Modules/Core/Common/src/itkMersenneTwisterRandomVariateGenerator.cxx b/Modules/Core/Common/src/itkMersenneTwisterRandomVariateGenerator.cxx index 0a3b2b0ce9a..ac6f78e8614 100644 --- a/Modules/Core/Common/src/itkMersenneTwisterRandomVariateGenerator.cxx +++ b/Modules/Core/Common/src/itkMersenneTwisterRandomVariateGenerator.cxx @@ -34,8 +34,8 @@ struct MersenneTwisterGlobals MersenneTwisterGlobals() = default; ~MersenneTwisterGlobals() = default; - MersenneTwisterRandomVariateGenerator::Pointer m_StaticInstance{}; - std::mutex m_StaticInstanceMutex{}; + MersenneTwisterRandomVariateGenerator::Pointer m_StaticInstance{}; + std::mutex m_StaticInstanceMutex{}; std::atomic m_StaticDiffer{}; }; @@ -105,7 +105,7 @@ MersenneTwisterRandomVariateGenerator::hash(const time_t t, const clock_t c) // Based on code by Lawrence Kirby: fred at genesis dot demon dot co dot uk const auto convert = [](const auto arg) { - IntegerType h{ 0 }; + IntegerType h{ 0 }; const auto * const p = reinterpret_cast(&arg); for (size_t i = 0; i < sizeof(arg); ++i) @@ -141,7 +141,7 @@ MersenneTwisterRandomVariateGenerator::PrintSelf(std::ostream & os, Indent inden os << indent << "State vector: " << state << std::endl; os << indent; const IntegerType * s = state; - int i = StateVectorLength; + int i = StateVectorLength; for (; i--; os << *s++ << '\t') { } diff --git a/Modules/Core/Common/src/itkMetaDataDictionary.cxx b/Modules/Core/Common/src/itkMetaDataDictionary.cxx index 9787c1e1d84..62722c6ebae 100644 --- a/Modules/Core/Common/src/itkMetaDataDictionary.cxx +++ b/Modules/Core/Common/src/itkMetaDataDictionary.cxx @@ -79,7 +79,7 @@ MetaDataDictionary::Get(const std::string & key) const itkGenericExceptionMacro("Key '" << key << "' does not exist "); } const MetaDataObjectBase::Pointer entry = (*m_Dictionary)[key]; - const MetaDataObjectBase * constentry = entry.GetPointer(); + const MetaDataObjectBase * constentry = entry.GetPointer(); return constentry; } @@ -179,7 +179,7 @@ MetaDataDictionary::MakeUnique() bool MetaDataDictionary::Erase(const std::string & key) { - auto it = m_Dictionary->find(key); + auto it = m_Dictionary->find(key); const auto end = m_Dictionary->end(); if (it != end) diff --git a/Modules/Core/Common/src/itkMultiThreaderBase.cxx b/Modules/Core/Common/src/itkMultiThreaderBase.cxx index 0c960403b7d..f06696629a3 100644 --- a/Modules/Core/Common/src/itkMultiThreaderBase.cxx +++ b/Modules/Core/Common/src/itkMultiThreaderBase.cxx @@ -70,7 +70,7 @@ struct MultiThreaderBaseGlobals // only used as a fall back option. If the SetGlobalDefaultThreader // API is ever used by the developer, the developers choice is // respected over the environmental variable. - bool GlobalDefaultThreaderTypeIsInitialized{ false }; + bool GlobalDefaultThreaderTypeIsInitialized{ false }; std::mutex globalDefaultInitializerMutex; // Global value to control which threader to be used by default. First it is initialized with the default preprocessor @@ -288,7 +288,7 @@ MultiThreaderBase::GetGlobalDefaultNumberOfThreads() * environmental variable "NSLOTS" by default */ std::vector ITK_NUMBER_OF_THREADS_ENV_LIST; - std::string itkNumberOfThreadsEvnListString = ""; + std::string itkNumberOfThreadsEvnListString = ""; if (itksys::SystemTools::GetEnv("ITK_NUMBER_OF_THREADS_ENV_LIST", itkNumberOfThreadsEvnListString)) { // NOTE: We always put "ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS" at the end @@ -301,7 +301,7 @@ MultiThreaderBase::GetGlobalDefaultNumberOfThreads() } { std::stringstream numberOfThreadsEnvListStream(itkNumberOfThreadsEvnListString); - std::string item; + std::string item; while (std::getline(numberOfThreadsEnvListStream, item, ':')) { if (!item.empty()) // Do not add empty items. @@ -464,10 +464,10 @@ MultiThreaderBase::SetSingleMethodAndExecute(ThreadFunctionType func, void * dat void -MultiThreaderBase::ParallelizeArray(SizeValueType firstIndex, - SizeValueType lastIndexPlus1, +MultiThreaderBase::ParallelizeArray(SizeValueType firstIndex, + SizeValueType lastIndexPlus1, ArrayThreadingFunctorType aFunc, - ProcessObject * filter) + ProcessObject * filter) { // This implementation simply delegates parallelization to the old interface // SetSingleMethod+SingleMethodExecute. This method is meant to be overloaded! @@ -494,15 +494,15 @@ MultiThreaderBase::ParallelizeArray(SizeValueType firstIndex, ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION MultiThreaderBase::ParallelizeArrayHelper(void * arg) { - auto * workUnitInfo = static_cast(arg); + auto * workUnitInfo = static_cast(arg); const ThreadIdType workUnitID = workUnitInfo->WorkUnitID; const ThreadIdType workUnitCount = workUnitInfo->NumberOfWorkUnits; - auto * acParams = static_cast(workUnitInfo->UserData); + auto * acParams = static_cast(workUnitInfo->UserData); const SizeValueType range = acParams->lastIndexPlus1 - acParams->firstIndex; - const double fraction = static_cast(range) / workUnitCount; + const double fraction = static_cast(range) / workUnitCount; const SizeValueType first = acParams->firstIndex + fraction * workUnitID; - SizeValueType afterLast = acParams->firstIndex + fraction * (workUnitID + 1); + SizeValueType afterLast = acParams->firstIndex + fraction * (workUnitID + 1); if (workUnitID == workUnitCount - 1) // last thread { // Avoid possible problems due to floating point arithmetic @@ -523,11 +523,11 @@ MultiThreaderBase::ParallelizeArrayHelper(void * arg) void -MultiThreaderBase::ParallelizeImageRegion(unsigned int dimension, - const IndexValueType index[], - const SizeValueType size[], +MultiThreaderBase::ParallelizeImageRegion(unsigned int dimension, + const IndexValueType index[], + const SizeValueType size[], MultiThreaderBase::ThreadingFunctorType funcP, - ProcessObject * filter) + ProcessObject * filter) { // This implementation simply delegates parallelization to the old interface // SetSingleMethod+SingleMethodExecute. This method is meant to be overloaded! @@ -544,13 +544,13 @@ MultiThreaderBase::ParallelizeImageRegion(unsigned int ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION MultiThreaderBase::ParallelizeImageRegionHelper(void * arg) { - auto * workUnitInfo = static_cast(arg); + auto * workUnitInfo = static_cast(arg); const ThreadIdType workUnitID = workUnitInfo->WorkUnitID; const ThreadIdType workUnitCount = workUnitInfo->NumberOfWorkUnits; - auto * rnc = static_cast(workUnitInfo->UserData); + auto * rnc = static_cast(workUnitInfo->UserData); const ImageRegionSplitterBase * splitter = ImageSourceCommon::GetGlobalDefaultSplitter(); - ImageIORegion region(rnc->dimension); + ImageIORegion region(rnc->dimension); for (unsigned int d = 0; d < rnc->dimension; ++d) { region.SetIndex(d, rnc->index[d]); diff --git a/Modules/Core/Common/src/itkNumberToString.cxx b/Modules/Core/Common/src/itkNumberToString.cxx index f9805da2b05..e83417cd88e 100644 --- a/Modules/Core/Common/src/itkNumberToString.cxx +++ b/Modules/Core/Common/src/itkNumberToString.cxx @@ -25,16 +25,16 @@ namespace bool ConvertToShortest(const double_conversion::DoubleToStringConverter & converter, - const double val, - double_conversion::StringBuilder & builder) + const double val, + double_conversion::StringBuilder & builder) { return converter.ToShortest(val, &builder); } bool ConvertToShortest(const double_conversion::DoubleToStringConverter & converter, - const float val, - double_conversion::StringBuilder & builder) + const float val, + double_conversion::StringBuilder & builder) { // Call the converter member function that is specific for single-precision `float`. return converter.ToShortestSingle(val, &builder); diff --git a/Modules/Core/Common/src/itkObject.cxx b/Modules/Core/Common/src/itkObject.cxx index ca5e7edb926..31eab2dd28b 100644 --- a/Modules/Core/Common/src/itkObject.cxx +++ b/Modules/Core/Common/src/itkObject.cxx @@ -50,9 +50,9 @@ class ITKCommon_HIDDEN Observer , m_Event(event) , m_Tag(tag) {} - Command::Pointer m_Command; + Command::Pointer m_Command; std::unique_ptr m_Event; - unsigned long m_Tag; + unsigned long m_Tag; }; } // namespace @@ -104,7 +104,7 @@ class ITKCommon_HIDDEN Object::SubjectImplementation ~SaveRestoreListModified() { m_Subject->m_ListModified = m_Save || m_Subject->m_ListModified; } SubjectImplementation * m_Subject; - bool m_Save; + bool m_Save; }; template @@ -112,7 +112,7 @@ class ITKCommon_HIDDEN Object::SubjectImplementation InvokeEventRecursion(const EventObject & event, TObject * self, std::list::const_reverse_iterator & i); std::list m_Observers; - unsigned long m_Count; + unsigned long m_Count; }; unsigned long @@ -171,8 +171,8 @@ Object::SubjectImplementation::InvokeEvent(const EventObject & event, const Obje template void -Object::SubjectImplementation::InvokeEventRecursion(const EventObject & event, - TObject * self, +Object::SubjectImplementation::InvokeEventRecursion(const EventObject & event, + TObject * self, std::list::const_reverse_iterator & i) { // This method recursively visits the list of observers in reverse @@ -251,7 +251,7 @@ Object::SubjectImplementation::PrintObservers(std::ostream & os, Indent indent) for (const auto & observer : m_Observers) { const EventObject * e = observer.m_Event.get(); - const Command * c = observer.m_Command; + const Command * c = observer.m_Command; os << indent << e->GetEventName() << '(' << c->GetNameOfClass(); if (!c->GetObjectName().empty()) { diff --git a/Modules/Core/Common/src/itkObjectFactoryBase.cxx b/Modules/Core/Common/src/itkObjectFactoryBase.cxx index 0d014a05095..1b9b8e66a80 100644 --- a/Modules/Core/Common/src/itkObjectFactoryBase.cxx +++ b/Modules/Core/Common/src/itkObjectFactoryBase.cxx @@ -47,9 +47,9 @@ namespace */ struct OverrideInformation { - std::string m_Description; - std::string m_OverrideWithName; - bool m_EnabledFlag; + std::string m_Description; + std::string m_OverrideWithName; + bool m_EnabledFlag; itk::CreateObjectFunctionBase::Pointer m_CreateObject; }; @@ -121,17 +121,17 @@ class ObjectFactoryBase::ObjectFactoryBasePrivate : public LightObject ObjectFactoryBasePrivate() = default; - FactoryListType m_RegisteredFactories{}; - FactoryListType m_InternalFactories{}; + FactoryListType m_RegisteredFactories{}; + FactoryListType m_InternalFactories{}; std::atomic m_Initialized{ false }; - bool m_StrictVersionChecking{ false }; + bool m_StrictVersionChecking{ false }; }; auto ObjectFactoryBase::GetPimplGlobalsPointer() -> ObjectFactoryBasePrivate * { const auto deleteLambda = []() { m_PimplGlobals->UnRegister(); }; - auto * globalInstance = Singleton("ObjectFactoryBase", deleteLambda); + auto * globalInstance = Singleton("ObjectFactoryBase", deleteLambda); if (globalInstance != m_PimplGlobals) { SynchronizeObjectFactoryBase(globalInstance); @@ -260,7 +260,7 @@ ObjectFactoryBase::LoadDynamicFactories() # endif const std::string itk_autoload_env{ "ITK_AUTOLOAD_PATH" }; - std::string LoadPath; + std::string LoadPath; if (!itksys::SystemTools::GetEnv(itk_autoload_env, LoadPath)) { return; @@ -401,7 +401,7 @@ ObjectFactoryBase::LoadLibrariesInPath(const char * path) if (NameIsSharedLibrary(file)) { const std::string fullpath = CreateFullPath(path, file); - LibHandle lib = DynamicLoader::OpenLibrary(fullpath.c_str()); + LibHandle lib = DynamicLoader::OpenLibrary(fullpath.c_str()); if (lib) { /** @@ -697,10 +697,10 @@ ObjectFactoryBase::UnRegisterAllFactories() * */ void -ObjectFactoryBase::RegisterOverride(const char * classOverride, - const char * subclass, - const char * description, - bool enableFlag, +ObjectFactoryBase::RegisterOverride(const char * classOverride, + const char * subclass, + const char * description, + bool enableFlag, CreateObjectFunctionBase * createFunction) { OverrideInformation info; diff --git a/Modules/Core/Common/src/itkOutputWindow.cxx b/Modules/Core/Common/src/itkOutputWindow.cxx index d1bb319e6af..602b2b31acc 100644 --- a/Modules/Core/Common/src/itkOutputWindow.cxx +++ b/Modules/Core/Common/src/itkOutputWindow.cxx @@ -36,7 +36,7 @@ namespace itk struct OutputWindowGlobals { OutputWindow::Pointer m_Instance{ nullptr }; - std::recursive_mutex m_StaticInstanceLock; + std::recursive_mutex m_StaticInstanceLock; }; /** diff --git a/Modules/Core/Common/src/itkPlatformMultiThreader.cxx b/Modules/Core/Common/src/itkPlatformMultiThreader.cxx index b77dccb5f78..91ecb22cd6e 100644 --- a/Modules/Core/Common/src/itkPlatformMultiThreader.cxx +++ b/Modules/Core/Common/src/itkPlatformMultiThreader.cxx @@ -107,7 +107,7 @@ PlatformMultiThreader::SetMultipleMethod(ThreadIdType index, ThreadFunctionType void PlatformMultiThreader::SingleMethodExecute() { - ThreadIdType thread_loop = 0; + ThreadIdType thread_loop = 0; ThreadProcessIdType process_id[ITK_MAX_THREADS]; if (!m_SingleMethod) @@ -125,7 +125,7 @@ PlatformMultiThreader::SingleMethodExecute() // // Thanks to Hannu Helminen for suggestions on how to catch // exceptions thrown by threads. - bool exceptionOccurred = false; + bool exceptionOccurred = false; std::string exceptionDetails; try { diff --git a/Modules/Core/Common/src/itkPoolMultiThreader.cxx b/Modules/Core/Common/src/itkPoolMultiThreader.cxx index 27bd8277163..9e6bd60eb55 100644 --- a/Modules/Core/Common/src/itkPoolMultiThreader.cxx +++ b/Modules/Core/Common/src/itkPoolMultiThreader.cxx @@ -152,10 +152,10 @@ PoolMultiThreader::SingleMethodExecute() } void -PoolMultiThreader::ParallelizeArray(SizeValueType firstIndex, - SizeValueType lastIndexPlus1, +PoolMultiThreader::ParallelizeArray(SizeValueType firstIndex, + SizeValueType lastIndexPlus1, ArrayThreadingFunctorType aFunc, - ProcessObject * filter) + ProcessObject * filter) { if (!this->GetUpdateProgress()) { @@ -222,11 +222,11 @@ PoolMultiThreader::ParallelizeArray(SizeValueType firstIndex, } void -PoolMultiThreader::ParallelizeImageRegion(unsigned int dimension, +PoolMultiThreader::ParallelizeImageRegion(unsigned int dimension, const IndexValueType index[], - const SizeValueType size[], + const SizeValueType size[], ThreadingFunctorType funcP, - ProcessObject * filter) + ProcessObject * filter) { if (!this->GetUpdateProgress()) { @@ -254,11 +254,11 @@ PoolMultiThreader::ParallelizeImageRegion(unsigned int dimension, else { const ImageRegionSplitterBase * splitter = ImageSourceCommon::GetGlobalDefaultSplitter(); - const ThreadIdType splitCount = splitter->GetNumberOfSplits(region, m_NumberOfWorkUnits); - ProgressReporter reporter(filter, 0, splitCount); + const ThreadIdType splitCount = splitter->GetNumberOfSplits(region, m_NumberOfWorkUnits); + ProgressReporter reporter(filter, 0, splitCount); itkAssertOrThrowMacro(splitCount <= m_NumberOfWorkUnits, "Split count is greater than number of work units!"); ImageIORegion iRegion; - ThreadIdType total; + ThreadIdType total; for (ThreadIdType i = 1; i < splitCount; ++i) { iRegion = region; diff --git a/Modules/Core/Common/src/itkProcessObject.cxx b/Modules/Core/Common/src/itkProcessObject.cxx index 1862efece2e..e0011aacc5a 100644 --- a/Modules/Core/Common/src/itkProcessObject.cxx +++ b/Modules/Core/Common/src/itkProcessObject.cxx @@ -41,7 +41,7 @@ namespace { // local namespace for managing globals constexpr size_t ITK_GLOBAL_INDEX_NAMES_NUMBER = 10; constexpr size_t ITK_GLOBAL_INDEX_NAMES_LENGTH = 3; -constexpr char globalIndexNames[ITK_GLOBAL_INDEX_NAMES_NUMBER][ITK_GLOBAL_INDEX_NAMES_LENGTH] = { +constexpr char globalIndexNames[ITK_GLOBAL_INDEX_NAMES_NUMBER][ITK_GLOBAL_INDEX_NAMES_LENGTH] = { "_0", "_1", "_2", "_3", "_4", "_5", "_6", "_7", "_8", "_9" }; @@ -1087,7 +1087,7 @@ ProcessObject::MakeIndexFromOutputName(const DataObjectIdentifierType & name) co ProcessObject::DataObjectPointerArraySizeType ProcessObject::MakeIndexFromName(const DataObjectIdentifierType & name) const { - const DataObjectIdentifierType baseName = "_"; + const DataObjectIdentifierType baseName = "_"; const DataObjectPointerArraySizeType baseSize = baseName.size(); if (name.size() <= baseSize || name.substr(0, baseSize) != baseName) { diff --git a/Modules/Core/Common/src/itkProgressAccumulator.cxx b/Modules/Core/Common/src/itkProgressAccumulator.cxx index c7de9646938..81042fd1547 100644 --- a/Modules/Core/Common/src/itkProgressAccumulator.cxx +++ b/Modules/Core/Common/src/itkProgressAccumulator.cxx @@ -101,7 +101,7 @@ void ProgressAccumulator::ReportProgress(Object * who, const EventObject & event) { const ProgressEvent pe; - const StartEvent se; + const StartEvent se; if (typeid(event) == typeid(pe)) { diff --git a/Modules/Core/Common/src/itkProgressReporter.cxx b/Modules/Core/Common/src/itkProgressReporter.cxx index 30dc86a8e00..3577685f0c2 100644 --- a/Modules/Core/Common/src/itkProgressReporter.cxx +++ b/Modules/Core/Common/src/itkProgressReporter.cxx @@ -22,11 +22,11 @@ namespace itk { //---------------------------------------------------------------------------- ProgressReporter::ProgressReporter(ProcessObject * filter, - ThreadIdType threadId, - SizeValueType numberOfPixels, - SizeValueType numberOfUpdates, - float initialProgress, - float progressWeight) + ThreadIdType threadId, + SizeValueType numberOfPixels, + SizeValueType numberOfUpdates, + float initialProgress, + float progressWeight) : m_Filter(filter) , m_ThreadId(threadId) , m_InitialProgress(initialProgress) diff --git a/Modules/Core/Common/src/itkPyCommand.cxx b/Modules/Core/Common/src/itkPyCommand.cxx index 9bf1480dbf4..c7e6d65fd1f 100644 --- a/Modules/Core/Common/src/itkPyCommand.cxx +++ b/Modules/Core/Common/src/itkPyCommand.cxx @@ -121,7 +121,7 @@ PyCommand::PyExecute() else { const PyGILStateEnsure gil; - PyObject * result = PyObject_Call(this->m_Object, this->m_EmptyArgumentList, (PyObject *)nullptr); + PyObject * result = PyObject_Call(this->m_Object, this->m_EmptyArgumentList, (PyObject *)nullptr); if (result) { diff --git a/Modules/Core/Common/src/itkRealTimeClock.cxx b/Modules/Core/Common/src/itkRealTimeClock.cxx index 90a1fd03b22..f3f996f0939 100644 --- a/Modules/Core/Common/src/itkRealTimeClock.cxx +++ b/Modules/Core/Common/src/itkRealTimeClock.cxx @@ -54,7 +54,7 @@ RealTimeClock::RealTimeClock() m_Difference = convertToSeconds(fileTime); - FILETIME currentTime; + FILETIME currentTime; LARGE_INTEGER tick; ::GetSystemTimeAsFileTime(¤tTime); @@ -110,7 +110,7 @@ RealTimeClock::GetRealTimeStamp() const using SecondsCounterType = RealTimeStamp::SecondsCounterType; using MicroSecondsCounterType = RealTimeStamp::MicroSecondsCounterType; - SecondsCounterType iseconds = std::floor(seconds); + SecondsCounterType iseconds = std::floor(seconds); MicroSecondsCounterType useconds = std::floor((seconds - iseconds) * 1e6); RealTimeStamp value(iseconds, useconds); diff --git a/Modules/Core/Common/src/itkRealTimeInterval.cxx b/Modules/Core/Common/src/itkRealTimeInterval.cxx index 7cbdf70503c..813d9900fba 100644 --- a/Modules/Core/Common/src/itkRealTimeInterval.cxx +++ b/Modules/Core/Common/src/itkRealTimeInterval.cxx @@ -159,7 +159,7 @@ RealTimeInterval::GetTimeInDays() const RealTimeInterval RealTimeInterval::operator-(const RealTimeInterval & other) const { - SecondsDifferenceType seconds = this->m_Seconds - other.m_Seconds; + SecondsDifferenceType seconds = this->m_Seconds - other.m_Seconds; MicroSecondsDifferenceType micro_seconds = this->m_MicroSeconds - other.m_MicroSeconds; ALIGN_THE_ARROW_OF_TIME(seconds, micro_seconds); @@ -178,7 +178,7 @@ RealTimeInterval::operator-(const RealTimeInterval & other) const RealTimeInterval RealTimeInterval::operator+(const RealTimeInterval & other) const { - SecondsDifferenceType seconds = this->m_Seconds + other.m_Seconds; + SecondsDifferenceType seconds = this->m_Seconds + other.m_Seconds; MicroSecondsDifferenceType micro_seconds = this->m_MicroSeconds + other.m_MicroSeconds; ALIGN_THE_ARROW_OF_TIME(seconds, micro_seconds); @@ -197,7 +197,7 @@ RealTimeInterval::operator+(const RealTimeInterval & other) const const RealTimeInterval::Self & RealTimeInterval::operator+=(const RealTimeInterval & other) { - SecondsDifferenceType seconds = this->m_Seconds + other.m_Seconds; + SecondsDifferenceType seconds = this->m_Seconds + other.m_Seconds; MicroSecondsDifferenceType micro_seconds = this->m_MicroSeconds + other.m_MicroSeconds; ALIGN_THE_ARROW_OF_TIME(seconds, micro_seconds); @@ -214,7 +214,7 @@ RealTimeInterval::operator+=(const RealTimeInterval & other) const RealTimeInterval::Self & RealTimeInterval::operator-=(const RealTimeInterval & other) { - SecondsDifferenceType seconds = this->m_Seconds - other.m_Seconds; + SecondsDifferenceType seconds = this->m_Seconds - other.m_Seconds; MicroSecondsDifferenceType micro_seconds = this->m_MicroSeconds - other.m_MicroSeconds; ALIGN_THE_ARROW_OF_TIME(seconds, micro_seconds); diff --git a/Modules/Core/Common/src/itkRealTimeStamp.cxx b/Modules/Core/Common/src/itkRealTimeStamp.cxx index 3817b63ad62..f1c85ae0a63 100644 --- a/Modules/Core/Common/src/itkRealTimeStamp.cxx +++ b/Modules/Core/Common/src/itkRealTimeStamp.cxx @@ -165,7 +165,7 @@ RealTimeStamp::GetTimeInDays() const RealTimeInterval RealTimeStamp::operator-(const Self & other) const { - SecondsDifferenceType seconds = this->m_Seconds - other.m_Seconds; + SecondsDifferenceType seconds = this->m_Seconds - other.m_Seconds; MicroSecondsDifferenceType micro_seconds = this->m_MicroSeconds - other.m_MicroSeconds; ALIGN_THE_ARROW_OF_TIME(seconds, micro_seconds); @@ -184,7 +184,7 @@ RealTimeStamp::operator-(const Self & other) const RealTimeStamp RealTimeStamp::operator+(const RealTimeInterval & difference) const { - SecondsCounterType seconds = this->m_Seconds + difference.m_Seconds; + SecondsCounterType seconds = this->m_Seconds + difference.m_Seconds; MicroSecondsCounterType micro_seconds = this->m_MicroSeconds + difference.m_MicroSeconds; CARRY_UNITS_OVER_UNSIGNED(seconds, micro_seconds); diff --git a/Modules/Core/Common/src/itkSmapsFileParser.cxx b/Modules/Core/Common/src/itkSmapsFileParser.cxx index 261c1d8cf1d..72b161ff536 100644 --- a/Modules/Core/Common/src/itkSmapsFileParser.cxx +++ b/Modules/Core/Common/src/itkSmapsFileParser.cxx @@ -37,7 +37,7 @@ MapRecord::Reset() /* SmapsRecord implementation */ ITKCommon_EXPORT std::istream & - operator>>(std::istream & in, SmapsRecord & record) +operator>>(std::istream & in, SmapsRecord & record) { record.Reset(); @@ -90,7 +90,7 @@ ITKCommon_EXPORT std::istream & std::getline(stream, record.m_RecordName); } - std::string token; + std::string token; std::streampos lastPos = in.tellg(); // a token is defined with the following expression: "token: N kB" while (std::getline(in, token, ':').good()) @@ -122,7 +122,7 @@ ITKCommon_EXPORT std::istream & } ITKCommon_EXPORT std::istream & - operator>>(std::istream & in, VMMapSummaryRecord & record) +operator>>(std::istream & in, VMMapSummaryRecord & record) { record.Reset(); @@ -194,7 +194,7 @@ ITKCommon_EXPORT std::istream & */ ITKCommon_EXPORT std::istream & - operator>>(std::istream & in, VMMapRecord & record) +operator>>(std::istream & in, VMMapRecord & record) { record.Reset(); bool submapFound = false; @@ -341,7 +341,7 @@ struct MapRecordConditionalPlusor return first; } - std::string m_Filter; + std::string m_Filter; const char * m_Token; }; diff --git a/Modules/Core/Common/src/itkSpatialOrientationAdapter.cxx b/Modules/Core/Common/src/itkSpatialOrientationAdapter.cxx index 9e522f6835e..920a6010cef 100644 --- a/Modules/Core/Common/src/itkSpatialOrientationAdapter.cxx +++ b/Modules/Core/Common/src/itkSpatialOrientationAdapter.cxx @@ -51,7 +51,7 @@ SpatialOrientationAdapter::FromDirectionCosines(const DirectionType & Dir) for (unsigned int i = 0; i < 3; ++i) { - auto max_idx = value_to_idx.rbegin()->second; + auto max_idx = value_to_idx.rbegin()->second; const unsigned int max_c = max_idx.first; const unsigned int max_r = max_idx.second; diff --git a/Modules/Core/Common/src/itkTBBMultiThreader.cxx b/Modules/Core/Common/src/itkTBBMultiThreader.cxx index 03b844ea342..00be4b94329 100644 --- a/Modules/Core/Common/src/itkTBBMultiThreader.cxx +++ b/Modules/Core/Common/src/itkTBBMultiThreader.cxx @@ -114,10 +114,10 @@ TBBMultiThreader::PrintSelf(std::ostream & os, Indent indent) const } void -TBBMultiThreader::ParallelizeArray(SizeValueType firstIndex, - SizeValueType lastIndexPlus1, +TBBMultiThreader::ParallelizeArray(SizeValueType firstIndex, + SizeValueType lastIndexPlus1, ArrayThreadingFunctorType aFunc, - ProcessObject * filter) + ProcessObject * filter) { if (!this->GetUpdateProgress()) { @@ -127,7 +127,7 @@ TBBMultiThreader::ParallelizeArray(SizeValueType firstIndex, if (firstIndex + 1 < lastIndexPlus1) { - const unsigned int count = lastIndexPlus1 - firstIndex; + const unsigned int count = lastIndexPlus1 - firstIndex; tbb::global_control l_ParallelizeArray_tbb_global_context( tbb::global_control::max_allowed_parallelism, std::min(tbb_utility::get_default_num_threads(), m_MaximumNumberOfThreads)); @@ -237,11 +237,11 @@ struct TBBImageRegionSplitter : public itk::ImageIORegion namespace itk { void -TBBMultiThreader::ParallelizeImageRegion(unsigned int dimension, +TBBMultiThreader::ParallelizeImageRegion(unsigned int dimension, const IndexValueType index[], - const SizeValueType size[], + const SizeValueType size[], ThreadingFunctorType funcP, - ProcessObject * filter) + ProcessObject * filter) { if (!this->GetUpdateProgress()) { diff --git a/Modules/Core/Common/src/itkThreadLogger.cxx b/Modules/Core/Common/src/itkThreadLogger.cxx index 1bb0dde22fb..804c3d5ed41 100644 --- a/Modules/Core/Common/src/itkThreadLogger.cxx +++ b/Modules/Core/Common/src/itkThreadLogger.cxx @@ -50,7 +50,7 @@ Logger::PriorityLevelEnum ThreadLogger::GetPriorityLevel() const { const std::lock_guard lockGuard(m_Mutex); - const PriorityLevelEnum level = this->m_PriorityLevel; + const PriorityLevelEnum level = this->m_PriorityLevel; return level; } @@ -67,7 +67,7 @@ Logger::PriorityLevelEnum ThreadLogger::GetLevelForFlushing() const { const std::lock_guard lockGuard(m_Mutex); - const PriorityLevelEnum level = this->m_LevelForFlushing; + const PriorityLevelEnum level = this->m_LevelForFlushing; return level; } @@ -82,7 +82,7 @@ ThreadLogger::DelayType ThreadLogger::GetDelay() const { const std::lock_guard lockGuard(m_Mutex); - const DelayType delay = this->m_Delay; + const DelayType delay = this->m_Delay; return delay; } diff --git a/Modules/Core/Common/src/itkThreadPool.cxx b/Modules/Core/Common/src/itkThreadPool.cxx index 1b4dd517eb7..f6f084262bc 100644 --- a/Modules/Core/Common/src/itkThreadPool.cxx +++ b/Modules/Core/Common/src/itkThreadPool.cxx @@ -179,7 +179,7 @@ ThreadPool::PrepareForFork() void ThreadPool::ResumeFromFork() { - ThreadPool * instance = m_PimplGlobals->m_ThreadPoolInstance.GetPointer(); + ThreadPool * instance = m_PimplGlobals->m_ThreadPoolInstance.GetPointer(); const ThreadIdType threadCount = instance->m_Threads.size(); instance->m_Threads.clear(); instance->m_Stopping = false; diff --git a/Modules/Core/Common/src/itkThreadedIndexedContainerPartitioner.cxx b/Modules/Core/Common/src/itkThreadedIndexedContainerPartitioner.cxx index b50e4f558ed..c832dfb3ab8 100644 --- a/Modules/Core/Common/src/itkThreadedIndexedContainerPartitioner.cxx +++ b/Modules/Core/Common/src/itkThreadedIndexedContainerPartitioner.cxx @@ -29,13 +29,13 @@ ThreadIdType ThreadedIndexedContainerPartitioner::PartitionDomain(const ThreadIdType threadId, const ThreadIdType requestedTotal, const DomainType & completeIndexRange, - DomainType & subIndexRange) const + DomainType & subIndexRange) const { // completeIndexRange and subIndexRange are inclusive // determine the actual number of pieces that will be generated - const auto count = static_cast(completeIndexRange[1] - completeIndexRange[0] + 1); - auto valuesPerThread = Math::Ceil(count / static_cast(requestedTotal)); + const auto count = static_cast(completeIndexRange[1] - completeIndexRange[0] + 1); + auto valuesPerThread = Math::Ceil(count / static_cast(requestedTotal)); const ThreadIdType maxThreadIdUsed = Math::Ceil(count / static_cast(valuesPerThread)) - 1; // Split the index range diff --git a/Modules/Core/Common/src/itkTotalProgressReporter.cxx b/Modules/Core/Common/src/itkTotalProgressReporter.cxx index 95424afe32a..16b9d5d736a 100644 --- a/Modules/Core/Common/src/itkTotalProgressReporter.cxx +++ b/Modules/Core/Common/src/itkTotalProgressReporter.cxx @@ -22,9 +22,9 @@ namespace itk { //---------------------------------------------------------------------------- TotalProgressReporter::TotalProgressReporter(ProcessObject * filter, - SizeValueType totalNumberOfPixels, - SizeValueType numberOfUpdates, - float progressWeight) + SizeValueType totalNumberOfPixels, + SizeValueType numberOfUpdates, + float progressWeight) : m_Filter(filter) , m_ProgressWeight(progressWeight) { diff --git a/Modules/Core/Common/src/itkXMLFileOutputWindow.cxx b/Modules/Core/Common/src/itkXMLFileOutputWindow.cxx index cf24b3c3b02..471e1630150 100644 --- a/Modules/Core/Common/src/itkXMLFileOutputWindow.cxx +++ b/Modules/Core/Common/src/itkXMLFileOutputWindow.cxx @@ -74,7 +74,7 @@ XMLFileOutputWindow::DisplayXML(const char * tag, const char * text) const auto xmlText = make_unique_for_overwrite(strlen(text) * 6 + 1); const char * s = text; - char * x = xmlText.get(); + char * x = xmlText.get(); *x = '\0'; // replace all special characters diff --git a/Modules/Core/Common/test/ClientTestLibraryB.h b/Modules/Core/Common/test/ClientTestLibraryB.h index 36e792bf446..5bddc77f5c0 100644 --- a/Modules/Core/Common/test/ClientTestLibraryB.h +++ b/Modules/Core/Common/test/ClientTestLibraryB.h @@ -26,9 +26,9 @@ extern "C" { ITK_ABI_EXPORT itk::Object * - EquivalencyTable(); + EquivalencyTable(); ITK_ABI_EXPORT itk::Object * - Image(); + Image(); ITK_ABI_EXPORT int dynamic_castDownCastEquivalencyTable(const char * type, const char * instanceSource, const itk::Object * base); diff --git a/Modules/Core/Common/test/VNLSparseLUSolverTraitsTest.cxx b/Modules/Core/Common/test/VNLSparseLUSolverTraitsTest.cxx index 7a3ba7537a9..1751469956f 100644 --- a/Modules/Core/Common/test/VNLSparseLUSolverTraitsTest.cxx +++ b/Modules/Core/Common/test/VNLSparseLUSolverTraitsTest.cxx @@ -60,7 +60,7 @@ VNLSparseLUSolverTraitsTest(int, char *[]) * Build the linear system to solve */ constexpr unsigned int N = 3; - VectorType Bx = SolverTraits::InitializeVector(N); + VectorType Bx = SolverTraits::InitializeVector(N); Bx.fill(0.); Bx[0] = 2.1; @@ -150,7 +150,7 @@ VNLSparseLUSolverTraitsTest(int, char *[]) * Test 4: Check the result of A * X = Bx (reuse the decomposed matrix for multiple back-substitutions) */ { - VectorType X = SolverTraits::InitializeVector(N); + VectorType X = SolverTraits::InitializeVector(N); SolverTraits::SolverType solver(A); // First back-substitution @@ -172,8 +172,8 @@ VNLSparseLUSolverTraitsTest(int, char *[]) * Test 5: Check the result of A * X = Bx, A * Y = By (reuse the decomposed matrix for multiple back-substitutions) */ { - VectorType X = SolverTraits::InitializeVector(N); - VectorType Y = SolverTraits::InitializeVector(N); + VectorType X = SolverTraits::InitializeVector(N); + VectorType Y = SolverTraits::InitializeVector(N); SolverTraits::SolverType solver(A); // First back-substitution @@ -198,9 +198,9 @@ VNLSparseLUSolverTraitsTest(int, char *[]) * back-substitutions) */ { - VectorType X = SolverTraits::InitializeVector(N); - VectorType Y = SolverTraits::InitializeVector(N); - VectorType Z = SolverTraits::InitializeVector(N); + VectorType X = SolverTraits::InitializeVector(N); + VectorType Y = SolverTraits::InitializeVector(N); + VectorType Z = SolverTraits::InitializeVector(N); SolverTraits::SolverType solver(A); // First back-substitution diff --git a/Modules/Core/Common/test/itkAbortProcessObjectTest.cxx b/Modules/Core/Common/test/itkAbortProcessObjectTest.cxx index 253c52d01c2..503603dddad 100644 --- a/Modules/Core/Common/test/itkAbortProcessObjectTest.cxx +++ b/Modules/Core/Common/test/itkAbortProcessObjectTest.cxx @@ -65,8 +65,8 @@ itkAbortProcessObjectTest(int, char *[]) // fill in an image constexpr ShortImage::IndexType index = { { 0, 0 } }; - constexpr ShortImage::SizeType size = { { 100, 100 } }; - const ShortImage::RegionType region{ index, size }; + constexpr ShortImage::SizeType size = { { 100, 100 } }; + const ShortImage::RegionType region{ index, size }; img->SetRegions(region); img->Allocate(); @@ -86,8 +86,8 @@ itkAbortProcessObjectTest(int, char *[]) // fill in an image constexpr ShortImage::IndexType extractIndex = { { 0, 0 } }; - constexpr ShortImage::SizeType extractSize = { { 99, 99 } }; - const ShortImage::RegionType extractRegion{ extractIndex, extractSize }; + constexpr ShortImage::SizeType extractSize = { { 99, 99 } }; + const ShortImage::RegionType extractRegion{ extractIndex, extractSize }; extract->SetExtractionRegion(extractRegion); const itk::CStyleCommand::Pointer progressCmd = itk::CStyleCommand::New(); diff --git a/Modules/Core/Common/test/itkAdaptorComparisonTest.cxx b/Modules/Core/Common/test/itkAdaptorComparisonTest.cxx index fc477ef4a36..2fc4241a63e 100644 --- a/Modules/Core/Common/test/itkAdaptorComparisonTest.cxx +++ b/Modules/Core/Common/test/itkAdaptorComparisonTest.cxx @@ -171,7 +171,7 @@ itkAdaptorComparisonTest(int, char *[]) // Set up some images itk::ImageRegion<3> region; - itk::Size<3> size; + itk::Size<3> size; size[0] = 100; size[1] = 100; size[2] = 100; diff --git a/Modules/Core/Common/test/itkAggregateTypesGTest.cxx b/Modules/Core/Common/test/itkAggregateTypesGTest.cxx index 299f44e71cd..02354aeca5a 100644 --- a/Modules/Core/Common/test/itkAggregateTypesGTest.cxx +++ b/Modules/Core/Common/test/itkAggregateTypesGTest.cxx @@ -279,8 +279,8 @@ class CommonIndexOffsetMathOps //============ Test math with Aggregate Type ==================================== { - const AggregateType knownAll2sAgg{ { 2, 2, 2, 2 } }; - const AggregateType knownAll4sAgg{ { 4, 4, 4, 4 } }; + const AggregateType knownAll2sAgg{ { 2, 2, 2, 2 } }; + const AggregateType knownAll4sAgg{ { 4, 4, 4, 4 } }; const typename AggregateType::OffsetType knownOffset = { { -2, -2, -2, -2 } }; ITK_EXPECT_VECTOR_NEAR(knownAll2sAgg - knownAll4sAgg, knownOffset, 0); } @@ -290,7 +290,7 @@ class CommonIndexOffsetMathOps AggregateType known3s{ { 3, 3, 3, 3 } }; AggregateType threes{}; AggregateType known4s{ { 4, 4, 4, 4 } }; - auto p1 = itk::MakeFilled>(3.5); + auto p1 = itk::MakeFilled>(3.5); threes.CopyWithRound(p1); ITK_EXPECT_VECTOR_NEAR(threes, known4s, 0); @@ -338,8 +338,8 @@ TEST(Specialized, Index) ITK_EXPECT_VECTOR_NEAR(IndexType::GetBasisIndex(2), twoBasis, 0); ITK_EXPECT_VECTOR_NEAR(IndexType::GetBasisIndex(3), threeBasis, 0); - constexpr IndexType known3s{ { 3, 3, 3, 3 } }; - IndexType threes; + constexpr IndexType known3s{ { 3, 3, 3, 3 } }; + IndexType threes; IndexType::IndexValueType raw3s[4] = { 3, 3, 3, 3 }; threes.SetIndex(raw3s); ITK_EXPECT_VECTOR_NEAR(threes, known3s, 0); @@ -362,8 +362,8 @@ TEST(Specialized, Offset) ITK_EXPECT_VECTOR_NEAR(OffsetType::GetBasisOffset(2), twoBasis, 0); ITK_EXPECT_VECTOR_NEAR(OffsetType::GetBasisOffset(3), threeBasis, 0); - constexpr OffsetType known3s{ { 3, 3, 3, 3 } }; - OffsetType threes; + constexpr OffsetType known3s{ { 3, 3, 3, 3 } }; + OffsetType threes; constexpr OffsetType::OffsetValueType raw3s[4] = { 3, 3, 3, 3 }; threes.SetOffset(raw3s); ITK_EXPECT_VECTOR_NEAR(threes, known3s, 0); @@ -375,8 +375,8 @@ TEST(Specialized, Size) EXPECT_EQ(itk::Size<7>::GetSizeDimension(), 7); using SizeType = itk::Size<4>; - constexpr SizeType known3s{ { 3, 3, 3, 3 } }; - SizeType threes; + constexpr SizeType known3s{ { 3, 3, 3, 3 } }; + SizeType threes; constexpr SizeType::SizeValueType raw3s[4] = { 3, 3, 3, 3 }; threes.SetSize(raw3s); ITK_EXPECT_VECTOR_NEAR(threes, known3s, 0); diff --git a/Modules/Core/Common/test/itkArray2DGTest.cxx b/Modules/Core/Common/test/itkArray2DGTest.cxx index f65af118d06..587297bf6c5 100644 --- a/Modules/Core/Common/test/itkArray2DGTest.cxx +++ b/Modules/Core/Common/test/itkArray2DGTest.cxx @@ -67,7 +67,7 @@ TEST(Array2D, MoveConstruct) { const auto checkMoveConstruct = [](auto && original) { const auto * const * const originalDataArray{ original.data_array() }; - const unsigned int originalSize{ original.size() }; + const unsigned int originalSize{ original.size() }; const auto moveConstructed = std::move(original); @@ -92,7 +92,7 @@ TEST(Array2D, MoveAssign) { const auto checkMoveAssign = [](auto original) { const auto * const * const originalDataArray{ original.data_array() }; - const unsigned int originalSize{ original.size() }; + const unsigned int originalSize{ original.size() }; decltype(original) moveAssigmentTarget; moveAssigmentTarget = std::move(original); diff --git a/Modules/Core/Common/test/itkArray2DTest.cxx b/Modules/Core/Common/test/itkArray2DTest.cxx index 4b1f531a5a8..ed524635ca8 100644 --- a/Modules/Core/Common/test/itkArray2DTest.cxx +++ b/Modules/Core/Common/test/itkArray2DTest.cxx @@ -31,7 +31,7 @@ itkArray2DTest(int, char *[]) constexpr unsigned int rows = 3; constexpr unsigned int cols = 4; - ArrayType a(rows, cols); + ArrayType a(rows, cols); VnlMatrixType vm(rows, cols); for (unsigned int r = 0; r < rows; ++r) diff --git a/Modules/Core/Common/test/itkArrayTest.cxx b/Modules/Core/Common/test/itkArrayTest.cxx index 4ad5b558949..3013d525465 100644 --- a/Modules/Core/Common/test/itkArrayTest.cxx +++ b/Modules/Core/Common/test/itkArrayTest.cxx @@ -28,7 +28,7 @@ itkArrayTest(int, char *[]) using FloatArrayType = itk::Array; using DoubleArrayType = itk::Array; - const FloatArrayType fa(10); + const FloatArrayType fa(10); const DoubleArrayType da(10); /** @@ -51,8 +51,8 @@ itkArrayTest(int, char *[]) // Create an itk::Array which does not manage its own memory // constexpr unsigned int n = 7; - float buffer[n]; - FloatArrayType notMyOwnBoss; + float buffer[n]; + FloatArrayType notMyOwnBoss; notMyOwnBoss.SetSize(n); notMyOwnBoss.SetData(buffer, false); notMyOwnBoss.Fill(4.0); @@ -102,8 +102,8 @@ itkArrayTest(int, char *[]) // to a user allocated buffer where the user wants to // maintain responsibility for deleting the array. constexpr size_t testSizeForArraySetDataSameSize = 10; - FloatArrayType objectToCopy(testSizeForArraySetDataSameSize); - auto * data = new float[testSizeForArraySetDataSameSize]; + FloatArrayType objectToCopy(testSizeForArraySetDataSameSize); + auto * data = new float[testSizeForArraySetDataSameSize]; objectToCopy.SetDataSameSize(data); // This implicitly means LetArrayManageMemory=false // Make a copy of the array which is not managing its own memory. diff --git a/Modules/Core/Common/test/itkAtanRegularizedHeavisideStepFunctionTest1.cxx b/Modules/Core/Common/test/itkAtanRegularizedHeavisideStepFunctionTest1.cxx index 2ce0e8a28f4..f7d71aba1b5 100644 --- a/Modules/Core/Common/test/itkAtanRegularizedHeavisideStepFunctionTest1.cxx +++ b/Modules/Core/Common/test/itkAtanRegularizedHeavisideStepFunctionTest1.cxx @@ -55,7 +55,7 @@ itkAtanRegularizedHeavisideStepFunctionTest1(int, char *[]) for (int x = minValue; x < maxValue; ++x) { - const InputType ix = x * incValue; + const InputType ix = x * incValue; const OutputType f = functionBase0->Evaluate(ix); const OutputType df = functionBase0->EvaluateDerivative(ix); std::cout << ix << ' ' << f << ' ' << df << std::endl; diff --git a/Modules/Core/Common/test/itkBSplineInterpolationWeightFunctionTest.cxx b/Modules/Core/Common/test/itkBSplineInterpolationWeightFunctionTest.cxx index afe9f8db6c7..8941d6db95d 100644 --- a/Modules/Core/Common/test/itkBSplineInterpolationWeightFunctionTest.cxx +++ b/Modules/Core/Common/test/itkBSplineInterpolationWeightFunctionTest.cxx @@ -98,7 +98,7 @@ itkBSplineInterpolationWeightFunctionTest(int, char *[]) constexpr double tolerance = 1e-6; - bool symmetryForXBroken = false; + bool symmetryForXBroken = false; for (unsigned int nw = 0; nw < numberOfWeigts - indexDifference; ++nw) { @@ -186,7 +186,7 @@ itkBSplineInterpolationWeightFunctionTest(int, char *[]) constexpr double tolerance = 1e-6; - bool symmetryForXBroken = false; + bool symmetryForXBroken = false; for (unsigned int nw = 0; nw < numberOfWeigts - indexDifference; ++nw) { @@ -249,14 +249,14 @@ itkBSplineInterpolationWeightFunctionTest(int, char *[]) auto function = FunctionType::New(); function->Print(std::cout); - constexpr SizeType size = FunctionType::SupportSize; + constexpr SizeType size = FunctionType::SupportSize; constexpr unsigned long numberOfWeights = FunctionType::NumberOfWeights; std::cout << "Number Of Weights: " << numberOfWeights << std::endl; ContinuousIndexType position; - WeightsType weights; - IndexType startIndex; + WeightsType weights; + IndexType startIndex; position.Fill(4.15); weights = function->Evaluate(position); @@ -275,14 +275,14 @@ itkBSplineInterpolationWeightFunctionTest(int, char *[]) auto kernel = KernelType::New(); using ImageType = itk::Image; - auto image = ImageType::New(); + auto image = ImageType::New(); const ImageType::RegionType region{ startIndex, size }; image->SetRegions(region); image->AllocateInitialized(); using IteratorType = itk::ImageRegionConstIteratorWithIndex; - IteratorType iter(image, image->GetBufferedRegion()); + IteratorType iter(image, image->GetBufferedRegion()); unsigned long counter = 0; while (!iter.IsAtEnd()) diff --git a/Modules/Core/Common/test/itkBSplineKernelFunctionTest.cxx b/Modules/Core/Common/test/itkBSplineKernelFunctionTest.cxx index 257756479f6..59aa8d58620 100644 --- a/Modules/Core/Common/test/itkBSplineKernelFunctionTest.cxx +++ b/Modules/Core/Common/test/itkBSplineKernelFunctionTest.cxx @@ -99,7 +99,7 @@ itkBSplineKernelFunctionTest(int, char *[]) constexpr double xx = -0.25; constexpr double expectedValue = 0.0; - const double results = derivFunction->Evaluate(xx); + const double results = derivFunction->Evaluate(xx); constexpr double epsilon = 1e-6; if (itk::Math::abs(results - expectedValue) > epsilon) diff --git a/Modules/Core/Common/test/itkBoundaryConditionTest.cxx b/Modules/Core/Common/test/itkBoundaryConditionTest.cxx index b495d8868ff..25722738a37 100644 --- a/Modules/Core/Common/test/itkBoundaryConditionTest.cxx +++ b/Modules/Core/Common/test/itkBoundaryConditionTest.cxx @@ -130,8 +130,8 @@ itkBoundaryConditionTest(int, char *[]) imageND->Allocate(); const itk::ImageRegionIterator it2D(image2D, image2D->GetRequestedRegion()); - itk::ImageRegionIterator it3D(image3D, image3D->GetRequestedRegion()); - itk::ImageRegionIterator itND(imageND, imageND->GetRequestedRegion()); + itk::ImageRegionIterator it3D(image3D, image3D->GetRequestedRegion()); + itk::ImageRegionIterator itND(imageND, imageND->GetRequestedRegion()); println("Initializing some images"); diff --git a/Modules/Core/Common/test/itkBoundingBoxTest.cxx b/Modules/Core/Common/test/itkBoundingBoxTest.cxx index 04495189c7e..1b9aeac8054 100644 --- a/Modules/Core/Common/test/itkBoundingBoxTest.cxx +++ b/Modules/Core/Common/test/itkBoundingBoxTest.cxx @@ -139,7 +139,7 @@ itkBoundingBoxTest(int, char *[]) const CC::PointsContainerPointer Points3D = CC::PointsContainer::New(); constexpr CC::PointType::ValueType qval1[3] = { -1.0f, -1.0f, -1.0f }; - CC::PointType Q = qval1; + CC::PointType Q = qval1; Points3D->InsertElement(0, Q); CC::PointType::ValueType qval2[3] = { 1.0f, 1.0f, 1.0f }; @@ -172,8 +172,8 @@ itkBoundingBoxTest(int, char *[]) // Testing the corners std::cout << "Testing ComputeCorners() : "; - const auto corners = my3DBox->ComputeCorners(); - auto it = corners.begin(); + const auto corners = my3DBox->ComputeCorners(); + auto it = corners.begin(); unsigned int j = 0; while (it != corners.end()) { @@ -193,8 +193,8 @@ itkBoundingBoxTest(int, char *[]) // Testing the DeepCopy method { - constexpr double tolerance = 1e-10; - const CC::Pointer clone = my3DBox->DeepCopy(); + constexpr double tolerance = 1e-10; + const CC::Pointer clone = my3DBox->DeepCopy(); const CC::BoundsArrayType & originalBounds = my3DBox->GetBounds(); const CC::BoundsArrayType & clonedbounds = clone->GetBounds(); for (unsigned int i = 0; i < originalBounds.Size(); ++i) diff --git a/Modules/Core/Common/test/itkBresenhamLineTest.cxx b/Modules/Core/Common/test/itkBresenhamLineTest.cxx index e2fbdd7a95a..9719d29637a 100644 --- a/Modules/Core/Common/test/itkBresenhamLineTest.cxx +++ b/Modules/Core/Common/test/itkBresenhamLineTest.cxx @@ -30,7 +30,7 @@ itkBresenhamLineTest(int, char *[]) v[0] = 1; v[1] = 1; - itk::BresenhamLine<2> line; + itk::BresenhamLine<2> line; std::vector> offsets = line.BuildLine(v, 4); if (offsets.size() != 4) @@ -60,7 +60,7 @@ itkBresenhamLineTest(int, char *[]) p1[0] = 39; p1[1] = 39; - itk::BresenhamLine<2> line; + itk::BresenhamLine<2> line; std::vector> indices = line.BuildLine(p0, p1); if (indices.size() != 40) diff --git a/Modules/Core/Common/test/itkByteSwapTest.cxx b/Modules/Core/Common/test/itkByteSwapTest.cxx index 4408b01fa56..7cbda52a98a 100644 --- a/Modules/Core/Common/test/itkByteSwapTest.cxx +++ b/Modules/Core/Common/test/itkByteSwapTest.cxx @@ -38,7 +38,7 @@ itkByteSwapTest(int, char *[]) return EXIT_FAILURE; } - unsigned char uc = 'a'; + unsigned char uc = 'a'; constexpr unsigned char uc1 = 'a'; if constexpr (itk::ByteSwapper::SystemIsBigEndian()) { @@ -56,7 +56,7 @@ itkByteSwapTest(int, char *[]) } std::cout << "Passed unsigned char: " << uc << std::endl; - unsigned short us = 1; + unsigned short us = 1; constexpr unsigned short us1 = 1; if constexpr (itk::ByteSwapper::SystemIsBE()) { @@ -73,7 +73,7 @@ itkByteSwapTest(int, char *[]) return EXIT_FAILURE; } std::cout << "Passed unsigned short: " << us << std::endl; - unsigned int ui = 1; + unsigned int ui = 1; constexpr unsigned int ui1 = 1; if constexpr (itk::ByteSwapper::SystemIsBigEndian()) { @@ -91,7 +91,7 @@ itkByteSwapTest(int, char *[]) } std::cout << "Passed unsigned int: " << ui << std::endl; - unsigned long ul = 1; + unsigned long ul = 1; constexpr unsigned long ul1 = 1; try { @@ -117,7 +117,7 @@ itkByteSwapTest(int, char *[]) err.Print(std::cerr); } - unsigned long long ull = 1; + unsigned long long ull = 1; constexpr unsigned long long ull1 = 1; try { @@ -143,7 +143,7 @@ itkByteSwapTest(int, char *[]) err.Print(std::cerr); } - float f = 1.0; + float f = 1.0; constexpr float f1 = 1.0; try { @@ -170,7 +170,7 @@ itkByteSwapTest(int, char *[]) return EXIT_FAILURE; } - double d = 1.0; + double d = 1.0; constexpr double d1 = 1.0; try { diff --git a/Modules/Core/Common/test/itkColorTableTest.cxx b/Modules/Core/Common/test/itkColorTableTest.cxx index 1bcf2a66597..9dc1eac32ca 100644 --- a/Modules/Core/Common/test/itkColorTableTest.cxx +++ b/Modules/Core/Common/test/itkColorTableTest.cxx @@ -25,9 +25,9 @@ template int ColorTableTestExpectedConditionChecker(typename itk::ColorTable::Pointer colors, - unsigned int colorId, - itk::RGBPixel rgbPixel, - const char * name) + unsigned int colorId, + itk::RGBPixel rgbPixel, + const char * name) { if (colors->GetColor(colorId) != rgbPixel) { @@ -106,7 +106,7 @@ ColorTableTestSpecialConditionChecker(typename itk::ColorTable::Poin return EXIT_FAILURE; } - char rgb = 'r'; + char rgb = 'r'; TComponent zeroComponent(0); TComponent colorComponent = colors->GetColorComponent(numberOfColors, rgb); if (colorComponent != zeroComponent) @@ -231,7 +231,7 @@ itkColorTableTest(int argc, char * argv[]) // Exercise the SetColorMethod colors->UseRandomColors(4); const char * name = "Background"; - bool tf = colors->SetColor(0, 0, 0, 0, name); + bool tf = colors->SetColor(0, 0, 0, 0, name); if (tf != true) { std::cerr << "Test failed!" << std::endl; diff --git a/Modules/Core/Common/test/itkCommandObserverObjectTest.cxx b/Modules/Core/Common/test/itkCommandObserverObjectTest.cxx index a757476d28f..5a30ed3b52f 100644 --- a/Modules/Core/Common/test/itkCommandObserverObjectTest.cxx +++ b/Modules/Core/Common/test/itkCommandObserverObjectTest.cxx @@ -180,7 +180,7 @@ int testCommandConstObject() { - const itk::Object::Pointer o = itk::Object::New(); + const itk::Object::Pointer o = itk::Object::New(); const itk::Object::ConstPointer co = o; const itk::CStyleCommand::Pointer cmd = itk::CStyleCommand::New(); @@ -215,7 +215,7 @@ testCommandRecursiveObject() // a Command. // This is a super-mean test that is not likely to really be used. - const itk::Object::Pointer o = itk::Object::New(); + const itk::Object::Pointer o = itk::Object::New(); const itk::Object::ConstPointer co = o; unsigned long idToRemove; diff --git a/Modules/Core/Common/test/itkCompensatedSummationTest.cxx b/Modules/Core/Common/test/itkCompensatedSummationTest.cxx index 78ca051b311..59c488efdc0 100644 --- a/Modules/Core/Common/test/itkCompensatedSummationTest.cxx +++ b/Modules/Core/Common/test/itkCompensatedSummationTest.cxx @@ -43,7 +43,7 @@ itkCompensatedSummationTest(int, char *[]) FloatType vanillaSum = 0.0; using CompensatedSummationType = itk::CompensatedSummation; CompensatedSummationType floatAccumulator; - FloatType randomNumber; + FloatType randomNumber; for (itk::SizeValueType ii = 0; ii < accumSize; ++ii) { randomNumber = generator->GetVariate(); diff --git a/Modules/Core/Common/test/itkCompensatedSummationTest2.cxx b/Modules/Core/Common/test/itkCompensatedSummationTest2.cxx index cd5c01bfb42..dbe2f6f283b 100644 --- a/Modules/Core/Common/test/itkCompensatedSummationTest2.cxx +++ b/Modules/Core/Common/test/itkCompensatedSummationTest2.cxx @@ -131,15 +131,15 @@ class CompensatedSummationTest2Associate private: TestDomainThreader::Pointer m_TestDomainThreader; - std::string m_ClassDescriptor; + std::string m_ClassDescriptor; itk::CompensatedSummation m_CompensatedSumOfThreads; - double m_UncompensatedSumOfThreads; + double m_UncompensatedSumOfThreads; }; int itkCompensatedSummationTest2(int, char *[]) { - CompensatedSummationTest2Associate enclosingClass; + CompensatedSummationTest2Associate enclosingClass; const CompensatedSummationTest2Associate::TestDomainThreader::Pointer domainThreader = enclosingClass.GetDomainThreader(); diff --git a/Modules/Core/Common/test/itkConnectedImageNeighborhoodShapeGTest.cxx b/Modules/Core/Common/test/itkConnectedImageNeighborhoodShapeGTest.cxx index 2ca4311d425..a6282b265bc 100644 --- a/Modules/Core/Common/test/itkConnectedImageNeighborhoodShapeGTest.cxx +++ b/Modules/Core/Common/test/itkConnectedImageNeighborhoodShapeGTest.cxx @@ -35,9 +35,9 @@ namespace { template + size_t VMaximumCityblockDistance, + bool VIncludeCenterPixel, + size_t VExpectedNumberOfOffsets> void Assert_GetNumberOfOffsets_returns_expected_number() { @@ -55,8 +55,8 @@ Assert_GetNumberOfOffsets_returns_expected_number() template + size_t VMaximumCityblockDistance, + size_t VExpectedNumberOfOffsetsExcludingCenterPixel> void Assert_GetNumberOfOffsets_returns_expected_number() { @@ -82,7 +82,7 @@ Assert_GenerateImageNeighborhoodOffsets_returns_expected_offsets_excluding_cente { using ShapeType = itk::ConnectedImageNeighborhoodShape; - constexpr bool includeCenterPixel = false; + constexpr bool includeCenterPixel = false; const ShapeType shape{ VMaximumCityblockDistance, includeCenterPixel }; ASSERT_EQ(GenerateImageNeighborhoodOffsets(shape), expectedOffsets); @@ -96,14 +96,14 @@ Assert_The_middle_offset_is_all_zero_when_center_pixel_is_included() using ShapeType = itk::ConnectedImageNeighborhoodShape; using OffsetType = itk::Offset; - const bool includeCenterPixel = true; + const bool includeCenterPixel = true; const OffsetType allZeroOffset{ {} }; for (unsigned int maximumCityblockDistance = 0; maximumCityblockDistance < VImageDimension; ++maximumCityblockDistance) { - const ShapeType shape{ maximumCityblockDistance, includeCenterPixel }; - const size_t numberOfOffsets = shape.GetNumberOfOffsets(); + const ShapeType shape{ maximumCityblockDistance, includeCenterPixel }; + const size_t numberOfOffsets = shape.GetNumberOfOffsets(); const std::vector offsets = GenerateImageNeighborhoodOffsets(shape); ASSERT_FALSE(offsets.empty()); @@ -127,10 +127,10 @@ Assert_Offsets_are_unique_and_colexicographically_ordered() { for (const bool includeCenterPixel : { false, true }) { - const ShapeType shape{ maximumCityblockDistance, includeCenterPixel }; + const ShapeType shape{ maximumCityblockDistance, includeCenterPixel }; const std::vector offsets = GenerateImageNeighborhoodOffsets(shape); - const auto beginOfOffsets = offsets.begin(); - const auto endOfOffsets = offsets.end(); + const auto beginOfOffsets = offsets.begin(); + const auto endOfOffsets = offsets.end(); ASSERT_TRUE(std::is_sorted(beginOfOffsets, endOfOffsets, itk::Functor::CoLexicographicCompare{})); @@ -249,7 +249,7 @@ TEST(ConnectedImageNeighborhoodShape, SupportsConstShapedNeighborhoodIterator) // Create a "dummy" image. const auto image = ImageType::New(); - auto imageSize = SizeType::Filled(1); + auto imageSize = SizeType::Filled(1); image->SetRegions(imageSize); image->AllocateInitialized(); @@ -287,7 +287,7 @@ TEST(ConnectedImageNeighborhoodShape, SupportsConstShapedNeighborhoodIterator) // Define a shape that should generate the same offsets as in the // previous ActivateOffset(offset) calls. constexpr size_t cityBlockDistance = 1; - constexpr bool includeCenterPixel = false; + constexpr bool includeCenterPixel = false; shapedNeighborhoodIterator.ActivateOffsets( itk::GenerateConnectedImageNeighborhoodShapeOffsets()); diff --git a/Modules/Core/Common/test/itkConstNeighborhoodIteratorTest.cxx b/Modules/Core/Common/test/itkConstNeighborhoodIteratorTest.cxx index 41b466d00cb..a20d2ccac4a 100644 --- a/Modules/Core/Common/test/itkConstNeighborhoodIteratorTest.cxx +++ b/Modules/Core/Common/test/itkConstNeighborhoodIteratorTest.cxx @@ -50,7 +50,7 @@ GetTestImage(int d1, int d2, int d3, int d4) int itkConstNeighborhoodIteratorTest(int, char *[]) { - const TestImageType::Pointer img = GetTestImage(10, 10, 5, 3); + const TestImageType::Pointer img = GetTestImage(10, 10, 5, 3); itk::ConstNeighborhoodIterator::IndexType loc; loc[0] = 4; loc[1] = 4; @@ -61,8 +61,8 @@ itkConstNeighborhoodIteratorTest(int, char *[]) radius[0] = radius[1] = radius[2] = radius[3] = 1; itk::ConstNeighborhoodIterator::RegionType reg; - itk::ConstNeighborhoodIterator::SizeType sz; - itk::ConstNeighborhoodIterator::IndexType idx; + itk::ConstNeighborhoodIterator::SizeType sz; + itk::ConstNeighborhoodIterator::IndexType idx; idx[0] = idx[1] = idx[2] = 0; idx[3] = 1; sz[0] = sz[1] = 10; @@ -224,7 +224,7 @@ itkConstNeighborhoodIteratorTest(int, char *[]) // Test IndexInBounds // println("Testing IndexInBounds"); - constexpr int dims[4] = { 13, 11, 9, 7 }; + constexpr int dims[4] = { 13, 11, 9, 7 }; const TestImageType::Pointer iib_img = GetTestImage(dims[0], dims[1], dims[2], dims[3]); radius[0] = 4; radius[1] = 3; @@ -233,7 +233,7 @@ itkConstNeighborhoodIteratorTest(int, char *[]) println("Creating ConstNeighborhoodIterator"); using IteratorType = itk::ConstNeighborhoodIterator; - IteratorType iib_it(radius, iib_img, iib_img->GetRequestedRegion()); + IteratorType iib_it(radius, iib_img, iib_img->GetRequestedRegion()); IteratorType::OffsetType resultOffset; IteratorType::OffsetType internalIndex; diff --git a/Modules/Core/Common/test/itkConstNeighborhoodIteratorWithOnlyIndexTest.cxx b/Modules/Core/Common/test/itkConstNeighborhoodIteratorWithOnlyIndexTest.cxx index 1532af6cf4e..40b07040172 100644 --- a/Modules/Core/Common/test/itkConstNeighborhoodIteratorWithOnlyIndexTest.cxx +++ b/Modules/Core/Common/test/itkConstNeighborhoodIteratorWithOnlyIndexTest.cxx @@ -59,8 +59,8 @@ itkConstNeighborhoodIteratorWithOnlyIndexTestRun() radius[0] = radius[1] = radius[2] = radius[3] = 1; typename ConstNeighborhoodIteratorType::RegionType reg; - typename ConstNeighborhoodIteratorType::SizeType sz; - IndexType idx; + typename ConstNeighborhoodIteratorType::SizeType sz; + IndexType idx; idx[0] = idx[1] = idx[2] = 0; idx[3] = 1; sz[0] = sz[1] = 10; @@ -356,7 +356,7 @@ itkConstNeighborhoodIteratorWithOnlyIndexTestRun() // Test IndexInBounds // std::cout << "Testing IndexInBounds" << std::endl; - constexpr int dims[4] = { 13, 11, 9, 7 }; + constexpr int dims[4] = { 13, 11, 9, 7 }; const typename ImageType::Pointer iib_img = itkConstNeighborhoodIteratorWithOnlyIndexTestGetTestImage(dims[0], dims[1], dims[2], dims[3]); radius[0] = 4; @@ -366,7 +366,7 @@ itkConstNeighborhoodIteratorWithOnlyIndexTestRun() std::cout << "Creating ConstNeighborhoodIterator" << std::endl; using IteratorType = ConstNeighborhoodIteratorType; - IteratorType iib_it(radius, iib_img, iib_img->GetRequestedRegion()); + IteratorType iib_it(radius, iib_img, iib_img->GetRequestedRegion()); typename IteratorType::OffsetType resultOffset; typename IteratorType::OffsetType internalIndex; diff --git a/Modules/Core/Common/test/itkConstShapedNeighborhoodIteratorTest.cxx b/Modules/Core/Common/test/itkConstShapedNeighborhoodIteratorTest.cxx index 8621f1560cf..c9067c9623f 100644 --- a/Modules/Core/Common/test/itkConstShapedNeighborhoodIteratorTest.cxx +++ b/Modules/Core/Common/test/itkConstShapedNeighborhoodIteratorTest.cxx @@ -33,7 +33,7 @@ PrintShapedNeighborhood(const itk::ConstShapedNeighborhoodIterator::IndexType loc; loc[0] = 4; loc[1] = 4; @@ -46,8 +46,8 @@ itkConstShapedNeighborhoodIteratorTest(int, char *[]) // region over which the iterator is defined itk::ConstShapedNeighborhoodIterator::RegionType reg; - itk::ConstShapedNeighborhoodIterator::SizeType sz; - itk::ConstShapedNeighborhoodIterator::IndexType idx; + itk::ConstShapedNeighborhoodIterator::SizeType sz; + itk::ConstShapedNeighborhoodIterator::IndexType idx; idx[0] = idx[1] = idx[2] = 0; idx[3] = 1; sz[0] = sz[1] = 10; @@ -300,7 +300,7 @@ itkConstShapedNeighborhoodIteratorTest(int, char *[]) println("Testing GetActiveIndexList()"); itk::ConstShapedNeighborhoodIterator::IndexListType l = it.GetActiveIndexList(); - auto ali = l.begin(); + auto ali = l.begin(); while (ali != l.end()) { std::cout << *ali << ' '; @@ -454,7 +454,7 @@ itkConstShapedNeighborhoodIteratorTest(int, char *[]) auto neighborhoodRadius = ChangeRegionTestImageType::SizeType::Filled(1); // Use the first two offsets - std::vector> offsets; + std::vector> offsets; ChangeRegionTestImageType::OffsetType offset = { { -1, -1 } }; offsets.push_back(offset); offset[0] = 0; diff --git a/Modules/Core/Common/test/itkConstShapedNeighborhoodIteratorTest2.cxx b/Modules/Core/Common/test/itkConstShapedNeighborhoodIteratorTest2.cxx index 12d1e209095..ea7a80c52fa 100644 --- a/Modules/Core/Common/test/itkConstShapedNeighborhoodIteratorTest2.cxx +++ b/Modules/Core/Common/test/itkConstShapedNeighborhoodIteratorTest2.cxx @@ -53,7 +53,7 @@ MyDerivedCSNI::TestNewExposedProtectedMembers() int itkConstShapedNeighborhoodIteratorTest2(int, char *[]) { - const TestImageType::Pointer img = GetTestImage(10, 10, 5, 3); + const TestImageType::Pointer img = GetTestImage(10, 10, 5, 3); MyDerivedCSNI::IndexType loc; loc[0] = 4; loc[1] = 4; @@ -66,8 +66,8 @@ itkConstShapedNeighborhoodIteratorTest2(int, char *[]) // region over which the iterator is defined MyDerivedCSNI::RegionType reg; - MyDerivedCSNI::SizeType sz; - MyDerivedCSNI::IndexType idx; + MyDerivedCSNI::SizeType sz; + MyDerivedCSNI::IndexType idx; idx[0] = idx[1] = idx[2] = 0; idx[3] = 1; sz[0] = sz[1] = 10; diff --git a/Modules/Core/Common/test/itkConstantBoundaryConditionTest.cxx b/Modules/Core/Common/test/itkConstantBoundaryConditionTest.cxx index e14b90bb4d9..05d4a25c577 100644 --- a/Modules/Core/Common/test/itkConstantBoundaryConditionTest.cxx +++ b/Modules/Core/Common/test/itkConstantBoundaryConditionTest.cxx @@ -121,10 +121,10 @@ int itkConstantBoundaryConditionTest(int, char *[]) { // Test an image to cover one operator() method. - auto image = ImageType::New(); - constexpr SizeType imageSize = { { 5, 5 } }; + auto image = ImageType::New(); + constexpr SizeType imageSize = { { 5, 5 } }; constexpr IndexType imageIndex = { { 0, 0 } }; - RegionType imageRegion; + RegionType imageRegion; imageRegion.SetSize(imageSize); imageRegion.SetIndex(imageIndex); image->SetRegions(imageRegion); @@ -153,10 +153,10 @@ itkConstantBoundaryConditionTest(int, char *[]) RadiusType radius; RadiusType radiusTwo; radius[0] = radius[1] = 1; - IteratorType it(radius, image, image->GetRequestedRegion()); + IteratorType it(radius, image, image->GetRequestedRegion()); VectorIteratorType vit(radius, vectorImage, vectorImage->GetRequestedRegion()); - itk::ConstantBoundaryCondition bc; + itk::ConstantBoundaryCondition bc; itk::ConstantBoundaryCondition vbc; constexpr ImageType::PixelType constant = 3; @@ -196,7 +196,7 @@ itkConstantBoundaryConditionTest(int, char *[]) } radiusTwo[0] = radiusTwo[1] = 2; - IteratorType it2(radiusTwo, image, image->GetRequestedRegion()); + IteratorType it2(radiusTwo, image, image->GetRequestedRegion()); VectorIteratorType vit2(radiusTwo, vectorImage, vectorImage->GetRequestedRegion()); it2.OverrideBoundaryCondition(&bc); @@ -220,8 +220,8 @@ itkConstantBoundaryConditionTest(int, char *[]) // Test 1 std::cout << "GetInputRequestedRegion() Test 1" << std::endl; - IndexType requestIndex{}; - auto requestSize = SizeType::Filled(2); + IndexType requestIndex{}; + auto requestSize = SizeType::Filled(2); RegionType requestRegion; requestRegion.SetIndex(requestIndex); requestRegion.SetSize(requestSize); diff --git a/Modules/Core/Common/test/itkConstantBoundaryImageNeighborhoodPixelAccessPolicyGTest.cxx b/Modules/Core/Common/test/itkConstantBoundaryImageNeighborhoodPixelAccessPolicyGTest.cxx index 5cbad17f338..40dff0b3117 100644 --- a/Modules/Core/Common/test/itkConstantBoundaryImageNeighborhoodPixelAccessPolicyGTest.cxx +++ b/Modules/Core/Common/test/itkConstantBoundaryImageNeighborhoodPixelAccessPolicyGTest.cxx @@ -43,7 +43,7 @@ template typename TImage::Pointer CreateImage(const unsigned int sizeX, const unsigned int sizeY) { - const auto image = TImage::New(); + const auto image = TImage::New(); const typename TImage::SizeType imageSize = { { sizeX, sizeY } }; image->SetRegions(imageSize); image->Allocate(); @@ -89,8 +89,8 @@ TEST(ConstantBoundaryImageNeighborhoodPixelAccessPolicy, YieldsZeroOutsideImageB const auto image = CreateImage(sizeX, sizeY); image->FillBuffer(42); - constexpr ImageType::IndexType locationOutsideImage{ { -1, -1 } }; - constexpr itk::Size radius = { {} }; + constexpr ImageType::IndexType locationOutsideImage{ { -1, -1 } }; + constexpr itk::Size radius = { {} }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); const RangeType range{ *image, locationOutsideImage, offsets }; @@ -119,8 +119,8 @@ TEST(ConstantBoundaryImageNeighborhoodPixelAccessPolicy, YieldsSpecifiedConstant const auto image = CreateImage(sizeX, sizeY); image->FillBuffer(42); - constexpr ImageType::IndexType locationOutsideImage{ { -1, -1 } }; - constexpr itk::Size radius = { {} }; + constexpr ImageType::IndexType locationOutsideImage{ { -1, -1 } }; + constexpr itk::Size radius = { {} }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); const auto numberOfExpectedNeighbors = offsets.size(); @@ -163,8 +163,8 @@ TEST(ConstantBoundaryImageNeighborhoodPixelAccessPolicy, YieldsSameValuesAsConst }; const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); - constexpr ImageType::IndexType location{ {} }; - constexpr itk::Size radius = { { 1, 2 } }; + constexpr ImageType::IndexType location{ {} }; + constexpr itk::Size radius = { { 1, 2 } }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); diff --git a/Modules/Core/Common/test/itkCovariantVectorGeometryTest.cxx b/Modules/Core/Common/test/itkCovariantVectorGeometryTest.cxx index 243e61c9a05..efb62720222 100644 --- a/Modules/Core/Common/test/itkCovariantVectorGeometryTest.cxx +++ b/Modules/Core/Common/test/itkCovariantVectorGeometryTest.cxx @@ -117,7 +117,7 @@ itkCovariantVectorGeometryTest(int, char *[]) } // Test the const version that returns an vnl_vector - const VectorType vf(va); + const VectorType vf(va); vnl_vector vnlVector2 = vf.GetVnlVector(); { std::cout << "vnl_vector = va "; @@ -239,7 +239,7 @@ itkCovariantVectorGeometryTest(int, char *[]) { using CovariantVectorType = itk::CovariantVector; CovariantVectorType::ComponentType comp(1.0); - double x(1.0); + double x(1.0); if constexpr (sizeof(comp) != sizeof(double)) { std::cerr << "error -- CovariantVectorType::ComponentType size != sizeof(double)" << std::endl; diff --git a/Modules/Core/Common/test/itkDataObjectAndProcessObjectTest.cxx b/Modules/Core/Common/test/itkDataObjectAndProcessObjectTest.cxx index 6279998bb96..fe9770c828a 100644 --- a/Modules/Core/Common/test/itkDataObjectAndProcessObjectTest.cxx +++ b/Modules/Core/Common/test/itkDataObjectAndProcessObjectTest.cxx @@ -108,10 +108,10 @@ itkDataObjectAndProcessObjectTest(int, char *[]) itk::TestProcessObject::Pointer process = itk::TestProcessObject::New(); // some vars to test the methods - itk::TestProcessObject::NameArray names; + itk::TestProcessObject::NameArray names; itk::TestProcessObject::DataObjectPointerArray dataObjects; - itk::DataObject::Pointer dataObject; - itk::ModifiedTimeType mtime; + itk::DataObject::Pointer dataObject; + itk::ModifiedTimeType mtime; // and exercise various methods names = process->GetInputNames(); diff --git a/Modules/Core/Common/test/itkDataTypeTest.cxx b/Modules/Core/Common/test/itkDataTypeTest.cxx index c1e1843e00a..bd4696ccd03 100644 --- a/Modules/Core/Common/test/itkDataTypeTest.cxx +++ b/Modules/Core/Common/test/itkDataTypeTest.cxx @@ -22,7 +22,7 @@ int itkDataTypeTest(int, char *[]) { - int status = 0; + int status = 0; itk::Vector v; v[0] = 1; diff --git a/Modules/Core/Common/test/itkDecoratorTest.cxx b/Modules/Core/Common/test/itkDecoratorTest.cxx index 12169d4ed83..19947a8b2e4 100644 --- a/Modules/Core/Common/test/itkDecoratorTest.cxx +++ b/Modules/Core/Common/test/itkDecoratorTest.cxx @@ -49,8 +49,8 @@ itkDecoratorTest(int, char *[]) using TransformType = itk::AffineTransform; using TransformObjectType = itk::DataObjectDecorator; - auto decoratedTransform = TransformObjectType::New(); - auto transformObject = TransformType::New(); + auto decoratedTransform = TransformObjectType::New(); + auto transformObject = TransformType::New(); const TransformType * constTransformObject = transformObject; transformObject->Scale(5.0); @@ -125,7 +125,7 @@ itkDecoratorTest(int, char *[]) std::cout << vop; - VectorType * vec = vop->Get(); + VectorType * vec = vop->Get(); const VectorType * constVec = vop->Get(); std::cout << "AutoPointerDataObjectDecorator::Get: " << vec << std::endl; std::cout << "AutoPointerDataObjectDecorator::Get const: " << constVec << std::endl; diff --git a/Modules/Core/Common/test/itkEllipsoidInteriorExteriorSpatialFunctionTest.cxx b/Modules/Core/Common/test/itkEllipsoidInteriorExteriorSpatialFunctionTest.cxx index 956fe5d637a..5225aa32239 100644 --- a/Modules/Core/Common/test/itkEllipsoidInteriorExteriorSpatialFunctionTest.cxx +++ b/Modules/Core/Common/test/itkEllipsoidInteriorExteriorSpatialFunctionTest.cxx @@ -58,7 +58,7 @@ itkEllipsoidInteriorExteriorSpatialFunctionTest(int, char *[]) // (0,1,0) corresponds to the axes of length axes[0] // (1,0,0) corresponds to the axes of length axes[1] // (0,0,1) corresponds to the axes of length axes[2] - double data[] = { 0, 1, 0, 1, 0, 0, 0, 0, 1 }; + double data[] = { 0, 1, 0, 1, 0, 0, 0, 0, 1 }; const vnl_matrix orientations(data, 3, 3); // Set the orientations of the ellipsoids @@ -69,8 +69,8 @@ itkEllipsoidInteriorExteriorSpatialFunctionTest(int, char *[]) double testPosition[dimension]; // position of a pixel in the function doitkEllipsoidInteriorExteriorSpatialFunctionTest - bool functionValue; // Value of pixel at a given position - int interiorPixelCounter = 0; // Count pixels inside ellipsoid + bool functionValue; // Value of pixel at a given position + int interiorPixelCounter = 0; // Count pixels inside ellipsoid for (int x = 0; x < xExtent; ++x) { diff --git a/Modules/Core/Common/test/itkExceptionObjectGTest.cxx b/Modules/Core/Common/test/itkExceptionObjectGTest.cxx index 88173d271ae..33aa81e7ee7 100644 --- a/Modules/Core/Common/test/itkExceptionObjectGTest.cxx +++ b/Modules/Core/Common/test/itkExceptionObjectGTest.cxx @@ -48,7 +48,7 @@ TEST(ExceptionObject, TestDescriptionFromExceptionMacro) }; const std::string message = "test message"; - const TestClass testObject{}; + const TestClass testObject{}; try { diff --git a/Modules/Core/Common/test/itkExtractImage3Dto2DTest.cxx b/Modules/Core/Common/test/itkExtractImage3Dto2DTest.cxx index 6d119438966..57273f7e7d4 100644 --- a/Modules/Core/Common/test/itkExtractImage3Dto2DTest.cxx +++ b/Modules/Core/Common/test/itkExtractImage3Dto2DTest.cxx @@ -51,7 +51,7 @@ itkExtractImage3Dto2DTest(int, char *[]) auto extract = ExtractType::New(); extract->SetDirectionCollapseToIdentity(); Image3DType::RegionType extractRegion = im3d->GetLargestPossibleRegion(); - Image3DType::SizeType extractSize = extractRegion.GetSize(); + Image3DType::SizeType extractSize = extractRegion.GetSize(); extractSize[2] = 0; Image3DType::IndexType extractIndex; diff --git a/Modules/Core/Common/test/itkExtractImageTest.cxx b/Modules/Core/Common/test/itkExtractImageTest.cxx index 9cea4b747c2..607bfa92c21 100644 --- a/Modules/Core/Common/test/itkExtractImageTest.cxx +++ b/Modules/Core/Common/test/itkExtractImageTest.cxx @@ -34,7 +34,7 @@ ExtractImageInPlaceTest() using ImageType = itk::Image; using SourceType = itk::RandomImageSource; - auto source = SourceType::New(); + auto source = SourceType::New(); constexpr ImageType::SizeType size = { { 32, 32, 32 } }; source->SetSize(size); @@ -42,8 +42,8 @@ ExtractImageInPlaceTest() constexpr ImageType::IndexType extractIndex = { { 16, 16, 16 } }; - constexpr ImageType::SizeType extractSize = { { 8, 8, 8 } }; - constexpr ImageType::SizeType zeroSize = { { 0, 0, 0 } }; + constexpr ImageType::SizeType extractSize = { { 8, 8, 8 } }; + constexpr ImageType::SizeType zeroSize = { { 0, 0, 0 } }; using ExtractFilterType = itk::ExtractImageFilter; auto extract = ExtractFilterType::New(); @@ -108,8 +108,8 @@ itkExtractImageTest(int, char *[]) auto if2 = ShortImage::New(); // fill in an image - ShortImage::IndexType index = { { 0, 0 } }; - ShortImage::SizeType size = { { 8, 12 } }; + ShortImage::IndexType index = { { 0, 0 } }; + ShortImage::SizeType size = { { 8, 12 } }; const ShortImage::RegionType region{ index, size }; if2->SetLargestPossibleRegion(region); if2->SetBufferedRegion(region); @@ -140,8 +140,8 @@ itkExtractImageTest(int, char *[]) extract->SetInput(if2); // fill in an image - ShortImage::IndexType extractIndex = { { 0, 0 } }; - ShortImage::SizeType extractSize = { { 8, 12 } }; + ShortImage::IndexType extractIndex = { { 0, 0 } }; + ShortImage::SizeType extractSize = { { 8, 12 } }; ShortImage::RegionType extractRegion{ extractIndex, extractSize }; extract->SetExtractionRegion(extractRegion); extract->UpdateLargestPossibleRegion(); diff --git a/Modules/Core/Common/test/itkFilterDispatchTest.cxx b/Modules/Core/Common/test/itkFilterDispatchTest.cxx index 076c1713763..afc3095a454 100644 --- a/Modules/Core/Common/test/itkFilterDispatchTest.cxx +++ b/Modules/Core/Common/test/itkFilterDispatchTest.cxx @@ -102,7 +102,7 @@ class ExampleImageFilter : public itk::ImageToImageFilter); void Execute(Dispatch<3>); void Execute(Dispatch<0>); diff --git a/Modules/Core/Common/test/itkFiniteCylinderSpatialFunctionTest.cxx b/Modules/Core/Common/test/itkFiniteCylinderSpatialFunctionTest.cxx index ac2ff4fe11e..55d6d97e648 100644 --- a/Modules/Core/Common/test/itkFiniteCylinderSpatialFunctionTest.cxx +++ b/Modules/Core/Common/test/itkFiniteCylinderSpatialFunctionTest.cxx @@ -74,8 +74,8 @@ itkFiniteCylinderSpatialFunctionTest(int, char *[]) // pixels that are inside the cylinder. double testPosition[dimension]; // position of a pixel - bool functionValue; // Value of pixel at a given position - int interiorPixelCounter = 0; // Count pixels inside cylinder + bool functionValue; // Value of pixel at a given position + int interiorPixelCounter = 0; // Count pixels inside cylinder for (int x = 0; x < xExtent; ++x) { diff --git a/Modules/Core/Common/test/itkFixedArrayGTest.cxx b/Modules/Core/Common/test/itkFixedArrayGTest.cxx index 58dd1294d4b..ddb366a465d 100644 --- a/Modules/Core/Common/test/itkFixedArrayGTest.cxx +++ b/Modules/Core/Common/test/itkFixedArrayGTest.cxx @@ -144,10 +144,10 @@ Check_const_and_non_const_reverse_iterators_retrieve_same_values() // Assign a different value (1, 2, 3, ...) to each element. std::iota(fixedArray.begin(), fixedArray.end(), 1); - ConstIteratorType constIterator = fixedArray.crbegin(); + ConstIteratorType constIterator = fixedArray.crbegin(); NonConstIteratorType nonConstIterator = fixedArray.rbegin(); - const ConstIteratorType constEnd = fixedArray.crend(); + const ConstIteratorType constEnd = fixedArray.crend(); const NonConstIteratorType nonConstEnd = fixedArray.rend(); while ((constIterator != constEnd) && (nonConstIterator != nonConstEnd)) @@ -183,8 +183,8 @@ Check_iterators_increment_return_value() std::iota(fixedArray.begin(), fixedArray.end(), 1); - typename FixedArrayType::iterator newIterator = fixedArray.begin(); - typename FixedArrayType::Iterator oldIterator = fixedArray.Begin(); + typename FixedArrayType::iterator newIterator = fixedArray.begin(); + typename FixedArrayType::Iterator oldIterator = fixedArray.Begin(); typename FixedArrayType::reverse_iterator newReverseIterator = fixedArray.rbegin(); #if !defined(ITK_LEGACY_REMOVE) typename FixedArrayType::ReverseIterator oldReverseIterator = fixedArray.rBegin(); diff --git a/Modules/Core/Common/test/itkFixedArrayTest.cxx b/Modules/Core/Common/test/itkFixedArrayTest.cxx index 723fd0501df..f0a3fe0134a 100644 --- a/Modules/Core/Common/test/itkFixedArrayTest.cxx +++ b/Modules/Core/Common/test/itkFixedArrayTest.cxx @@ -62,7 +62,7 @@ itkFixedArrayTest(int, char *[]) int c_Array2[3] = { 0, 0, 0 }; Print_Array(c_Array2, std::cout); - int array3Init[3] = { 4, 4, 4 }; + int array3Init[3] = { 4, 4, 4 }; itk::FixedArray array3 = array3Init; Print_Array(array3, std::cout); Print_c_ArrayConst(array3.GetDataPointer(), std::cout); @@ -80,7 +80,7 @@ itkFixedArrayTest(int, char *[]) return EXIT_FAILURE; // should be equal // Test Get/Set element - constexpr unsigned int n = 20; + constexpr unsigned int n = 20; itk::FixedArray array20; for (unsigned int i = 0; i < n; ++i) { diff --git a/Modules/Core/Common/test/itkFixedArrayTest2.cxx b/Modules/Core/Common/test/itkFixedArrayTest2.cxx index 9687588a87d..24507c8d023 100644 --- a/Modules/Core/Common/test/itkFixedArrayTest2.cxx +++ b/Modules/Core/Common/test/itkFixedArrayTest2.cxx @@ -44,7 +44,7 @@ itkFixedArrayTest2(int, char *[]) // Start a simple experiment clock_t t = clock(); - double acc1 = 0.0; + double acc1 = 0.0; for (unsigned int i = 0; i < nrun; ++i) { diff --git a/Modules/Core/Common/test/itkFloatingPointExceptionsTest.cxx b/Modules/Core/Common/test/itkFloatingPointExceptionsTest.cxx index 490980b3046..759a6f04f66 100644 --- a/Modules/Core/Common/test/itkFloatingPointExceptionsTest.cxx +++ b/Modules/Core/Common/test/itkFloatingPointExceptionsTest.cxx @@ -36,7 +36,7 @@ itkFloatingPointExceptionsTest(int argc, char * argv[]) std::cout << "No test specified" << std::endl; return 1; } - int error_return(0); + int error_return(0); const double double_zero = itkFloatingPointExceptionsTest_double_zero; const double double_max = itkFloatingPointExceptionsTest_double_max; const double test1 = itkFloatingPointExceptionsTest_double_zero; diff --git a/Modules/Core/Common/test/itkFloodFillIteratorTest.cxx b/Modules/Core/Common/test/itkFloodFillIteratorTest.cxx index 3efb543e715..2525c9516ab 100644 --- a/Modules/Core/Common/test/itkFloodFillIteratorTest.cxx +++ b/Modules/Core/Common/test/itkFloodFillIteratorTest.cxx @@ -35,9 +35,9 @@ itkFloodFillIteratorTest(int, char *[]) //-----------------Create a new input image-------------------- // Image size and spacing parameters - TImageType::SizeValueType sourceImageSize[] = { 20, 20, 20 }; + TImageType::SizeValueType sourceImageSize[] = { 20, 20, 20 }; TImageType::SpacingValueType sourceImageSpacing[] = { 1.0, 1.0, 1.0 }; - TImageType::PointValueType sourceImageOrigin[] = { 0, 0, 0 }; + TImageType::PointValueType sourceImageOrigin[] = { 0, 0, 0 }; // Creates the sourceImage (but doesn't set the size or allocate memory) auto sourceImage = TImageType::New(); @@ -91,7 +91,7 @@ itkFloodFillIteratorTest(int, char *[]) std::cout << "Sphere spatial function created" << std::endl; //---------Create and initialize a spatial function iterator----------- - TImageType::IndexType seedPos; + TImageType::IndexType seedPos; constexpr TImageType::IndexValueType pos[] = { 10, 10, 10 }; seedPos.SetIndex(pos); diff --git a/Modules/Core/Common/test/itkFloodFilledSpatialFunctionTest.cxx b/Modules/Core/Common/test/itkFloodFilledSpatialFunctionTest.cxx index ffd894a8903..c9ab3d3905f 100644 --- a/Modules/Core/Common/test/itkFloodFilledSpatialFunctionTest.cxx +++ b/Modules/Core/Common/test/itkFloodFilledSpatialFunctionTest.cxx @@ -39,9 +39,9 @@ itkFloodFilledSpatialFunctionTest(int, char *[]) using PointValueType = ImageType::PointValueType; // Image size and spacing parameters - SizeValueType sourceImageSize[] = { 5, 5 }; + SizeValueType sourceImageSize[] = { 5, 5 }; SpacingValueType sourceImageSpacing[] = { 1.0, 1.0 }; - PointValueType sourceImageOrigin[] = { 0, 0 }; + PointValueType sourceImageOrigin[] = { 0, 0 }; // Creates the sourceImage (but doesn't set the size or allocate memory) auto sourceImage = ImageType::New(); @@ -91,7 +91,7 @@ itkFloodFilledSpatialFunctionTest(int, char *[]) spatialFunc->SetCenter(center); // Create and initialize a spatial function iterator - ImageType::IndexType seedPos; + ImageType::IndexType seedPos; constexpr ImageType::IndexValueType pos[] = { 2, 2 }; seedPos.SetIndex(pos); diff --git a/Modules/Core/Common/test/itkGaussianDerivativeOperatorTest.cxx b/Modules/Core/Common/test/itkGaussianDerivativeOperatorTest.cxx index b22ce3a33be..e70282de9ab 100644 --- a/Modules/Core/Common/test/itkGaussianDerivativeOperatorTest.cxx +++ b/Modules/Core/Common/test/itkGaussianDerivativeOperatorTest.cxx @@ -107,11 +107,11 @@ itkGaussianDerivativeOperatorTest(int argc, char * argv[]) if (argc == 6) { - const double variance = std::stod(argv[1]); - const double error = std::stod(argv[2]); + const double variance = std::stod(argv[1]); + const double error = std::stod(argv[2]); const unsigned int width = std::stoi(argv[3]); const unsigned int order = std::stoi(argv[4]); - const double spacing = std::stod(argv[5]); + const double spacing = std::stod(argv[5]); TestGaussianOperator(variance, error, width, order, spacing); diff --git a/Modules/Core/Common/test/itkHashTableTest.cxx b/Modules/Core/Common/test/itkHashTableTest.cxx index e373395bd17..7629ff0dd17 100644 --- a/Modules/Core/Common/test/itkHashTableTest.cxx +++ b/Modules/Core/Common/test/itkHashTableTest.cxx @@ -87,7 +87,7 @@ itkHashTableTest(int, char *[]) } Set.rehash(50); Set.insert("the horror"); - auto hsh_it = Set.begin(); + auto hsh_it = Set.begin(); const HashSetType SetCopy = Set; println("Testing std::unordered_map"); @@ -121,7 +121,7 @@ itkHashTableTest(int, char *[]) months.rehash(50); constexpr HashMapType::value_type p("psychotic break", 2); months.insert(p); - auto map_it = months.begin(); + auto map_it = months.begin(); const HashMapType MapCopy = months; IgnoreUnusedVariable(hsh_it); diff --git a/Modules/Core/Common/test/itkHeavisideStepFunctionTest1.cxx b/Modules/Core/Common/test/itkHeavisideStepFunctionTest1.cxx index 9ec3622ed31..129af440078 100644 --- a/Modules/Core/Common/test/itkHeavisideStepFunctionTest1.cxx +++ b/Modules/Core/Common/test/itkHeavisideStepFunctionTest1.cxx @@ -38,7 +38,7 @@ itkHeavisideStepFunctionTest1(int, char *[]) for (int x = minValue; x < maxValue; ++x) { - const InputType ix = x * incValue; + const InputType ix = x * incValue; const OutputType f = functionBase0->Evaluate(ix); const OutputType df = functionBase0->EvaluateDerivative(ix); std::cout << ix << ' ' << f << ' ' << df << std::endl; diff --git a/Modules/Core/Common/test/itkImageAlgorithmCopyTest2.cxx b/Modules/Core/Common/test/itkImageAlgorithmCopyTest2.cxx index bb509b7d007..0d4dcf4562a 100644 --- a/Modules/Core/Common/test/itkImageAlgorithmCopyTest2.cxx +++ b/Modules/Core/Common/test/itkImageAlgorithmCopyTest2.cxx @@ -65,7 +65,7 @@ itkImageAlgorithmCopyTest2(int, char *[]) constexpr RegionType::IndexType index{}; - auto size = RegionType::SizeType::Filled(64); + auto size = RegionType::SizeType::Filled(64); const RegionType region{ index, size }; diff --git a/Modules/Core/Common/test/itkImageBaseGTest.cxx b/Modules/Core/Common/test/itkImageBaseGTest.cxx index f64a67ee15b..6e2026c89c2 100644 --- a/Modules/Core/Common/test/itkImageBaseGTest.cxx +++ b/Modules/Core/Common/test/itkImageBaseGTest.cxx @@ -137,8 +137,8 @@ CheckInvalidSpacingExceptions() const auto imageBase = itk::ImageBase::New(); // Test exceptions - const SpacingType initialSpacing = imageBase->GetSpacing(); - const auto negativeSpacing = itk::MakeFilled(-1.0); + const SpacingType initialSpacing = imageBase->GetSpacing(); + const auto negativeSpacing = itk::MakeFilled(-1.0); constexpr SpacingType zeroSpacing{}; #if !defined(ITK_LEGACY_REMOVE) @@ -156,7 +156,7 @@ CheckInvalidSpacingExceptions() EXPECT_THROW(imageBase->SetSpacing(zeroSpacing), itk::ExceptionObject); EXPECT_EQ(imageBase->GetSpacing(), initialSpacing); - const DirectionType initialDirection = imageBase->GetDirection(); + const DirectionType initialDirection = imageBase->GetDirection(); constexpr DirectionType zeroDirection{}; EXPECT_THROW(imageBase->SetDirection(zeroDirection), itk::ExceptionObject); diff --git a/Modules/Core/Common/test/itkImageBufferRangeGTest.cxx b/Modules/Core/Common/test/itkImageBufferRangeGTest.cxx index d11d541c5d4..6308613af93 100644 --- a/Modules/Core/Common/test/itkImageBufferRangeGTest.cxx +++ b/Modules/Core/Common/test/itkImageBufferRangeGTest.cxx @@ -90,7 +90,7 @@ template typename TImage::Pointer CreateImage(const unsigned int sizeX, const unsigned int sizeY) { - const auto image = TImage::New(); + const auto image = TImage::New(); const typename TImage::SizeType imageSize = { { sizeX, sizeY } }; image->SetRegions(imageSize); image->Allocate(); @@ -129,7 +129,7 @@ SetVectorLengthIfImageIsVectorImage(itk::VectorImage & template void SetVectorLengthIfImageIsVectorImage(itk::Image & itkNotUsed(image), - const unsigned int itkNotUsed(vectorLength)) + const unsigned int itkNotUsed(vectorLength)) { // Do not set the VectorLength. The specified image is not a VectorImage. } @@ -139,7 +139,7 @@ template typename TImage::Pointer CreateSmallImage() { - const auto image = TImage::New(); + const auto image = TImage::New(); const typename TImage::SizeType imageSize{}; image->SetRegions(imageSize); SetVectorLengthIfImageIsVectorImage(*image, 1); @@ -154,7 +154,7 @@ ExpectRangeIsNotEmptyForNonEmptyImage() { // First create a non-empty image: const auto image = TImage::New(); - auto imageSize = TImage::SizeType::Filled(1); + auto imageSize = TImage::SizeType::Filled(1); image->SetRegions(imageSize); SetVectorLengthIfImageIsVectorImage(*image, 1); image->Allocate(); @@ -178,7 +178,7 @@ ExpectMakeImageBufferRangeReturnsCorrectRangeForNonEmptyImage() { // First create a non-empty image: const auto image = TImage::New(); - auto imageSize = TImage::SizeType::Filled(1); + auto imageSize = TImage::SizeType::Filled(1); image->SetRegions(imageSize); SetVectorLengthIfImageIsVectorImage(*image, 1); image->Allocate(); @@ -197,7 +197,7 @@ template void ExpectCopyConstructedRangeHasSameIteratorsAsOriginal() { - const auto image = CreateSmallImage(); + const auto image = CreateSmallImage(); const ImageBufferRange originalRange{ *image }; RangeGTestUtilities::ExpectCopyConstructedRangeHasSameIteratorsAsOriginal(originalRange); @@ -208,7 +208,7 @@ template void ExpectCopyAssignedRangeHasSameIteratorsAsOriginal() { - const auto image = CreateSmallImage(); + const auto image = CreateSmallImage(); const ImageBufferRange originalRange{ *image }; RangeGTestUtilities::ExpectCopyAssignedRangeHasSameIteratorsAsOriginal(originalRange); @@ -248,8 +248,8 @@ TEST(ImageBufferRange, EquivalentBeginOrEndIteratorsCompareEqual) const ImageBufferRange range{ *image }; - const ImageBufferRange::iterator begin = range.begin(); - const ImageBufferRange::iterator end = range.end(); + const ImageBufferRange::iterator begin = range.begin(); + const ImageBufferRange::iterator end = range.end(); const ImageBufferRange::const_iterator cbegin = range.cbegin(); const ImageBufferRange::const_iterator cend = range.cend(); @@ -295,7 +295,7 @@ TEST(ImageBufferRange, IteratorConvertsToConstIterator) const ImageBufferRange range{ *image }; - const ImageBufferRange::iterator begin = range.begin(); + const ImageBufferRange::iterator begin = range.begin(); const ImageBufferRange::const_iterator const_begin_from_begin = begin; EXPECT_EQ(const_begin_from_begin, begin); @@ -344,9 +344,9 @@ TEST(ImageBufferRange, IteratorsCanBePassedToStdReverseCopy) constexpr unsigned int numberOfPixels = sizeX * sizeY; const std::vector stdVector(range.begin(), range.end()); - std::vector reversedStdVector1(numberOfPixels); - std::vector reversedStdVector2(numberOfPixels); - std::vector reversedStdVector3(numberOfPixels); + std::vector reversedStdVector1(numberOfPixels); + std::vector reversedStdVector2(numberOfPixels); + std::vector reversedStdVector3(numberOfPixels); // Checks bidirectionality of the ImageBufferRange iterators! std::reverse_copy(stdVector.cbegin(), stdVector.cend(), reversedStdVector1.begin()); @@ -483,11 +483,11 @@ TEST(ImageBufferRange, IteratorReferenceActsLikeARealReference) const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); using RangeType = ImageBufferRange; - const RangeType range{ *image }; + const RangeType range{ *image }; RangeType::iterator it = range.begin(); - std::iterator_traits::reference reference1 = *it; - std::iterator_traits::reference reference2 = *(++it); + std::iterator_traits::reference reference1 = *it; + std::iterator_traits::reference reference2 = *(++it); std::iterator_traits::reference reference3 = *(++it); EXPECT_EQ(reference1, 1); EXPECT_EQ(reference2, 2); @@ -531,7 +531,7 @@ TEST(ImageBufferRange, SupportsVectorImage) sizeY = 2, sizeZ = 2 }; - const auto image = ImageType::New(); + const auto image = ImageType::New(); constexpr typename ImageType::SizeType imageSize = { { sizeX, sizeY, sizeZ } }; image->SetRegions(imageSize); image->SetVectorLength(vectorLength); @@ -553,7 +553,7 @@ TEST(ImageBufferRange, SupportsVectorImage) image->SetPixel({ {} }, otherPixelValue); RangeType::const_iterator it = range.begin(); - const PixelType firstPixelValueFromRange = *it; + const PixelType firstPixelValueFromRange = *it; EXPECT_EQ(firstPixelValueFromRange, otherPixelValue); ++it; const PixelType secondPixelValueFromRange = *it; @@ -656,8 +656,8 @@ TEST(ImageBufferRange, IteratorsSupportRandomAccess) X b = range.end(); const X initialIterator = range.begin(); - X mutableIterator = initialIterator; - X & r = mutableIterator; + X mutableIterator = initialIterator; + X & r = mutableIterator; using difference_type = std::iterator_traits::difference_type; using reference = std::iterator_traits::reference; @@ -800,16 +800,16 @@ TEST(ImageBufferRange, ProvidesReverseIterators) constexpr unsigned int numberOfPixels = sizeX * sizeY; const std::vector stdVector(range.begin(), range.end()); - std::vector reversedStdVector1(numberOfPixels); - std::vector reversedStdVector2(numberOfPixels); - std::vector reversedStdVector3(numberOfPixels); + std::vector reversedStdVector1(numberOfPixels); + std::vector reversedStdVector2(numberOfPixels); + std::vector reversedStdVector3(numberOfPixels); std::reverse_copy(stdVector.cbegin(), stdVector.cend(), reversedStdVector1.begin()); const RangeType::const_reverse_iterator crbegin = range.crbegin(); const RangeType::const_reverse_iterator crend = range.crend(); - const RangeType::reverse_iterator rbegin = range.rbegin(); - const RangeType::reverse_iterator rend = range.rend(); + const RangeType::reverse_iterator rbegin = range.rbegin(); + const RangeType::reverse_iterator rend = range.rend(); EXPECT_EQ(crbegin, rbegin); EXPECT_EQ(crend, rend); diff --git a/Modules/Core/Common/test/itkImageComputeOffsetAndIndexTest.cxx b/Modules/Core/Common/test/itkImageComputeOffsetAndIndexTest.cxx index dfce9b0aa3d..35485e8e91c 100644 --- a/Modules/Core/Common/test/itkImageComputeOffsetAndIndexTest.cxx +++ b/Modules/Core/Common/test/itkImageComputeOffsetAndIndexTest.cxx @@ -40,8 +40,8 @@ template void ComputeFastIndex(TImage * image, unsigned int count, unsigned int repeat) { - typename TImage::IndexType index{}; - const typename TImage::IndexType & bufferedRegionIndex = image->GetBufferedRegion().GetIndex(); + typename TImage::IndexType index{}; + const typename TImage::IndexType & bufferedRegionIndex = image->GetBufferedRegion().GetIndex(); const typename TImage::OffsetValueType * offsetTable = image->GetOffsetTable(); for (unsigned int j = 0; j < repeat; ++j) @@ -110,99 +110,99 @@ itkImageComputeOffsetAndIndexTest(int, char *[]) itk::TimeProbesCollectorBase collector; -#define TRY_FAST_INDEX(dim) \ - { \ - using PixelType = char; \ - using ImageType = itk::Image; \ - auto myImage = ImageType::New(); \ - const auto size = ImageType::SizeType::Filled(50); \ - constexpr ImageType::IndexType index{}; \ - const ImageType::RegionType region{ index, size }; \ - myImage->SetRegions(region); \ - myImage->Allocate(); \ - collector.Start("ComputeIndexFast " #dim "D"); \ - unsigned int totalSize = 1; \ - for (unsigned int i = 0; i < dim; ++i) \ - totalSize *= size[i]; \ - unsigned int repeat = 1000; \ - if (dim > 2) \ - repeat = 100; \ - if (dim > 3) \ - repeat = 10; \ - if (dim > 4) \ - repeat = 1; \ - ComputeFastIndex(myImage, totalSize, repeat); \ - collector.Stop("ComputeIndexFast " #dim "D"); \ - } \ +#define TRY_FAST_INDEX(dim) \ + { \ + using PixelType = char; \ + using ImageType = itk::Image; \ + auto myImage = ImageType::New(); \ + const auto size = ImageType::SizeType::Filled(50); \ + constexpr ImageType::IndexType index{}; \ + const ImageType::RegionType region{ index, size }; \ + myImage->SetRegions(region); \ + myImage->Allocate(); \ + collector.Start("ComputeIndexFast " #dim "D"); \ + unsigned int totalSize = 1; \ + for (unsigned int i = 0; i < dim; ++i) \ + totalSize *= size[i]; \ + unsigned int repeat = 1000; \ + if (dim > 2) \ + repeat = 100; \ + if (dim > 3) \ + repeat = 10; \ + if (dim > 4) \ + repeat = 1; \ + ComputeFastIndex(myImage, totalSize, repeat); \ + collector.Stop("ComputeIndexFast " #dim "D"); \ + } \ ITK_MACROEND_NOOP_STATEMENT -#define TRY_INDEX(dim) \ - { \ - using PixelType = char; \ - using ImageType = itk::Image; \ - auto myImage = ImageType::New(); \ - const auto size = ImageType::SizeType::Filled(50); \ - constexpr ImageType::IndexType index{}; \ - const ImageType::RegionType region{ index, size }; \ - myImage->SetRegions(region); \ - myImage->Allocate(); \ - collector.Start("ComputeIndex " #dim "D"); \ - unsigned int totalSize = 1; \ - for (unsigned int i = 0; i < dim; ++i) \ - totalSize *= size[i]; \ - unsigned int repeat = 1000; \ - if (dim > 2) \ - repeat = 100; \ - if (dim > 3) \ - repeat = 10; \ - if (dim > 4) \ - repeat = 1; \ - ComputeIndex(myImage, totalSize, repeat); \ - collector.Stop("ComputeIndex " #dim "D"); \ - } \ +#define TRY_INDEX(dim) \ + { \ + using PixelType = char; \ + using ImageType = itk::Image; \ + auto myImage = ImageType::New(); \ + const auto size = ImageType::SizeType::Filled(50); \ + constexpr ImageType::IndexType index{}; \ + const ImageType::RegionType region{ index, size }; \ + myImage->SetRegions(region); \ + myImage->Allocate(); \ + collector.Start("ComputeIndex " #dim "D"); \ + unsigned int totalSize = 1; \ + for (unsigned int i = 0; i < dim; ++i) \ + totalSize *= size[i]; \ + unsigned int repeat = 1000; \ + if (dim > 2) \ + repeat = 100; \ + if (dim > 3) \ + repeat = 10; \ + if (dim > 4) \ + repeat = 1; \ + ComputeIndex(myImage, totalSize, repeat); \ + collector.Stop("ComputeIndex " #dim "D"); \ + } \ ITK_MACROEND_NOOP_STATEMENT -#define TRY_FAST_OFFSET(dim) \ - { \ - using PixelType = char; \ - using ImageType = itk::Image; \ - auto myImage = ImageType::New(); \ - const auto size = ImageType::SizeType::Filled(50); \ - constexpr ImageType::IndexType index{}; \ - const ImageType::RegionType region{ index, size }; \ - myImage->SetRegions(region); \ - myImage->Allocate(); \ - collector.Start("ComputeOffsetFast " #dim "D"); \ - unsigned int repeat = 1; \ - if (dim < 4) \ - repeat = 100; \ - unsigned int totalSize = 1; \ - for (unsigned int i = 0; i < dim; ++i) \ - totalSize *= size[i]; \ - ComputeFastOffset(myImage, size[0], totalSize * repeat); \ - collector.Stop("ComputeOffsetFast " #dim "D"); \ - } \ +#define TRY_FAST_OFFSET(dim) \ + { \ + using PixelType = char; \ + using ImageType = itk::Image; \ + auto myImage = ImageType::New(); \ + const auto size = ImageType::SizeType::Filled(50); \ + constexpr ImageType::IndexType index{}; \ + const ImageType::RegionType region{ index, size }; \ + myImage->SetRegions(region); \ + myImage->Allocate(); \ + collector.Start("ComputeOffsetFast " #dim "D"); \ + unsigned int repeat = 1; \ + if (dim < 4) \ + repeat = 100; \ + unsigned int totalSize = 1; \ + for (unsigned int i = 0; i < dim; ++i) \ + totalSize *= size[i]; \ + ComputeFastOffset(myImage, size[0], totalSize * repeat); \ + collector.Stop("ComputeOffsetFast " #dim "D"); \ + } \ ITK_MACROEND_NOOP_STATEMENT -#define TRY_OFFSET(dim) \ - { \ - using PixelType = char; \ - using ImageType = itk::Image; \ - auto myImage = ImageType::New(); \ - const auto size = ImageType::SizeType::Filled(50); \ - constexpr ImageType::IndexType index{}; \ - const ImageType::RegionType region{ index, size }; \ - myImage->SetRegions(region); \ - myImage->Allocate(); \ - collector.Start("ComputeOffset " #dim "D"); \ - unsigned int repeat = 1; \ - if (dim < 4) \ - repeat = 100; \ - unsigned int totalSize = 1; \ - for (unsigned int i = 0; i < dim; ++i) \ - totalSize *= size[i]; \ - ComputeOffset(myImage, size[0], totalSize * repeat); \ - collector.Stop("ComputeOffset " #dim "D"); \ - } \ +#define TRY_OFFSET(dim) \ + { \ + using PixelType = char; \ + using ImageType = itk::Image; \ + auto myImage = ImageType::New(); \ + const auto size = ImageType::SizeType::Filled(50); \ + constexpr ImageType::IndexType index{}; \ + const ImageType::RegionType region{ index, size }; \ + myImage->SetRegions(region); \ + myImage->Allocate(); \ + collector.Start("ComputeOffset " #dim "D"); \ + unsigned int repeat = 1; \ + if (dim < 4) \ + repeat = 100; \ + unsigned int totalSize = 1; \ + for (unsigned int i = 0; i < dim; ++i) \ + totalSize *= size[i]; \ + ComputeOffset(myImage, size[0], totalSize * repeat); \ + collector.Stop("ComputeOffset " #dim "D"); \ + } \ ITK_MACROEND_NOOP_STATEMENT TRY_INDEX(1); diff --git a/Modules/Core/Common/test/itkImageDuplicatorTest.cxx b/Modules/Core/Common/test/itkImageDuplicatorTest.cxx index 643eddef33d..e9382bbf31c 100644 --- a/Modules/Core/Common/test/itkImageDuplicatorTest.cxx +++ b/Modules/Core/Common/test/itkImageDuplicatorTest.cxx @@ -29,7 +29,7 @@ itkImageDuplicatorTest(int, char *[]) { using ImageType = itk::Image; ImageType::RegionType region; - ImageType::SizeType size; + ImageType::SizeType size; size[0] = 10; size[1] = 20; size[2] = 30; @@ -251,7 +251,7 @@ itkImageDuplicatorTest(int, char *[]) using PixelType = float; using VectorImageType = itk::VectorImage; - auto vectorImage = VectorImageType::New(); + auto vectorImage = VectorImageType::New(); itk::VariableLengthVector f(VectorLength); for (unsigned int i = 0; i < VectorLength; ++i) { diff --git a/Modules/Core/Common/test/itkImageDuplicatorTest2.cxx b/Modules/Core/Common/test/itkImageDuplicatorTest2.cxx index 5217028e53e..51490bcea9b 100644 --- a/Modules/Core/Common/test/itkImageDuplicatorTest2.cxx +++ b/Modules/Core/Common/test/itkImageDuplicatorTest2.cxx @@ -48,7 +48,7 @@ itkImageDuplicatorTest2(int argc, char * argv[]) const auto inImage = itk::ReadImage(argv[1]); const ImageType::RegionType lpr = inImage->GetLargestPossibleRegion(); - ImageType::RegionType region = lpr; + ImageType::RegionType region = lpr; for (unsigned int d = 0; d < Dimension; ++d) { const itk::IndexValueType size = region.GetSize(d); diff --git a/Modules/Core/Common/test/itkImageGTest.cxx b/Modules/Core/Common/test/itkImageGTest.cxx index 4f0cd44d1f3..c548002feb0 100644 --- a/Modules/Core/Common/test/itkImageGTest.cxx +++ b/Modules/Core/Common/test/itkImageGTest.cxx @@ -194,7 +194,7 @@ TEST(Image, UnequalWhenPixelValuesDiffer) TEST(Image, FillBufferOfNonEqualityComparableType) { constexpr auto ImageDimagion = 2U; - const auto image = itk::Image::New(); + const auto image = itk::Image::New(); image->SetRegions(itk::Size::Filled(1)); image->Allocate(); diff --git a/Modules/Core/Common/test/itkImageIORegionGTest.cxx b/Modules/Core/Common/test/itkImageIORegionGTest.cxx index 9b2b9ab97ea..57198504a30 100644 --- a/Modules/Core/Common/test/itkImageIORegionGTest.cxx +++ b/Modules/Core/Common/test/itkImageIORegionGTest.cxx @@ -57,7 +57,7 @@ Expect_CopyAndMoveConstructible(const T & value) const auto copiedValue = value; EXPECT_EQ(copiedValue, value); - auto nonConstValue = value; + auto nonConstValue = value; const auto movedValue = std::move(nonConstValue); EXPECT_EQ(movedValue, value); } @@ -142,9 +142,9 @@ Expect_Assignable(const T & value1, const T & value2) void SetRandomIndexAndSize(itk::ImageIORegion & region) { - std::mt19937 randomNumberEngine; + std::mt19937 randomNumberEngine; std::uniform_int_distribution indexDistribution(std::numeric_limits::min()); - std::uniform_int_distribution sizeDistribution(std::numeric_limits::min()); + std::uniform_int_distribution sizeDistribution(std::numeric_limits::min()); const unsigned int imageDimension{ region.GetImageDimension() }; diff --git a/Modules/Core/Common/test/itkImageIteratorTest.cxx b/Modules/Core/Common/test/itkImageIteratorTest.cxx index 4a8412a28f1..a278cb079d5 100644 --- a/Modules/Core/Common/test/itkImageIteratorTest.cxx +++ b/Modules/Core/Common/test/itkImageIteratorTest.cxx @@ -92,7 +92,7 @@ itkImageIteratorTest(int, char *[]) using VectorImageIterator = itk::ImageIterator; using VectorImageConstIterator = itk::ImageConstIterator; - VectorImageIterator itr1(o3, region); + VectorImageIterator itr1(o3, region); const VectorImageConstIterator itr2(o3, region); // Exercise copy constructor diff --git a/Modules/Core/Common/test/itkImageIteratorWithIndexTest.cxx b/Modules/Core/Common/test/itkImageIteratorWithIndexTest.cxx index 87011877286..068957d6038 100644 --- a/Modules/Core/Common/test/itkImageIteratorWithIndexTest.cxx +++ b/Modules/Core/Common/test/itkImageIteratorWithIndexTest.cxx @@ -55,7 +55,7 @@ class itkImageIteratorWithIndexTestIteratorTester bool TestIterator() { - IteratorType it(m_Image, m_Image->GetBufferedRegion()); + IteratorType it(m_Image, m_Image->GetBufferedRegion()); itk::SizeValueType i = 0; it.GoToBegin(); while (!it.IsAtEnd()) @@ -82,7 +82,7 @@ class itkImageIteratorWithIndexTestIteratorTester bool TestConstIterator() { - ConstIteratorType it(m_Image, m_Image->GetBufferedRegion()); + ConstIteratorType it(m_Image, m_Image->GetBufferedRegion()); itk::SizeValueType i = 0; it.GoToBegin(); while (!it.IsAtEnd()) @@ -107,7 +107,7 @@ class itkImageIteratorWithIndexTestIteratorTester bool TestReverseIteration() { - ConstIteratorType it(m_Image, m_Image->GetBufferedRegion()); + ConstIteratorType it(m_Image, m_Image->GetBufferedRegion()); itk::SizeValueType i = 0; it.GoToReverseBegin(); while (!it.IsAtReverseEnd()) @@ -264,7 +264,7 @@ itkImageIteratorWithIndexTest(int, char *[]) std::cout << "Testing with Image< itk::Vector, 3 > " << std::endl; using VC = itk::Vector; - auto vc = itk::MakeFilled(127); + auto vc = itk::MakeFilled(127); itkImageIteratorWithIndexTestIteratorTester TesterVC(vc); if (TesterVC.TestIterator() == false) { @@ -281,7 +281,7 @@ itkImageIteratorWithIndexTest(int, char *[]) std::cout << "Testing with Image< itk::Vector, 3 > " << std::endl; using VUC = itk::Vector; - auto vuc = itk::MakeFilled(10); + auto vuc = itk::MakeFilled(10); itkImageIteratorWithIndexTestIteratorTester TesterVUC(vuc); if (TesterVUC.TestIterator() == false) { @@ -298,7 +298,7 @@ itkImageIteratorWithIndexTest(int, char *[]) std::cout << "Testing with Image< itk::Vector, 3 > " << std::endl; using VS = itk::Vector; - auto vs = itk::MakeFilled(10); + auto vs = itk::MakeFilled(10); itkImageIteratorWithIndexTestIteratorTester TesterVS(vs); if (TesterVS.TestIterator() == false) { @@ -315,7 +315,7 @@ itkImageIteratorWithIndexTest(int, char *[]) std::cout << "Testing with Image< itk::Vector, 3 > " << std::endl; using VUS = itk::Vector; - auto vus = itk::MakeFilled(10); + auto vus = itk::MakeFilled(10); itkImageIteratorWithIndexTestIteratorTester TesterVUS(vus); if (TesterVUS.TestIterator() == false) { @@ -332,7 +332,7 @@ itkImageIteratorWithIndexTest(int, char *[]) std::cout << "Testing with Image< itk::Vector, 3 > " << std::endl; using VI = itk::Vector; - auto vi = itk::MakeFilled(10); + auto vi = itk::MakeFilled(10); itkImageIteratorWithIndexTestIteratorTester TesterVI(vi); if (TesterVI.TestIterator() == false) { @@ -349,7 +349,7 @@ itkImageIteratorWithIndexTest(int, char *[]) std::cout << "Testing with Image< itk::Vector, 3 > " << std::endl; using VUI = itk::Vector; - auto vui = itk::MakeFilled(10); + auto vui = itk::MakeFilled(10); itkImageIteratorWithIndexTestIteratorTester TesterVUI(vui); if (TesterVUI.TestIterator() == false) { @@ -366,7 +366,7 @@ itkImageIteratorWithIndexTest(int, char *[]) std::cout << "Testing with Image< itk::Vector, 3 > " << std::endl; using VF = itk::Vector; - auto vf = itk::MakeFilled(10); + auto vf = itk::MakeFilled(10); itkImageIteratorWithIndexTestIteratorTester TesterVF(vf); if (TesterVF.TestIterator() == false) { @@ -383,7 +383,7 @@ itkImageIteratorWithIndexTest(int, char *[]) std::cout << "Testing with Image< itk::Vector, 3 > " << std::endl; using VD = itk::Vector; - auto vd = itk::MakeFilled(10); + auto vd = itk::MakeFilled(10); itkImageIteratorWithIndexTestIteratorTester TesterVD(vd); if (TesterVD.TestIterator() == false) { diff --git a/Modules/Core/Common/test/itkImageLinearIteratorTest.cxx b/Modules/Core/Common/test/itkImageLinearIteratorTest.cxx index 7566718f48e..3e4c5bfa28c 100644 --- a/Modules/Core/Common/test/itkImageLinearIteratorTest.cxx +++ b/Modules/Core/Common/test/itkImageLinearIteratorTest.cxx @@ -32,7 +32,7 @@ itkImageLinearIteratorTest(int, char *[]) using ImageType = itk::Image; - auto myImage = ImageType::New(); + auto myImage = ImageType::New(); const ImageType::ConstPointer myConstImage = myImage; ImageType::SizeType size0; diff --git a/Modules/Core/Common/test/itkImageNeighborhoodOffsetsGTest.cxx b/Modules/Core/Common/test/itkImageNeighborhoodOffsetsGTest.cxx index 8a40e104047..5b348e15eed 100644 --- a/Modules/Core/Common/test/itkImageNeighborhoodOffsetsGTest.cxx +++ b/Modules/Core/Common/test/itkImageNeighborhoodOffsetsGTest.cxx @@ -58,9 +58,9 @@ class EmptyImageNeighborhoodShape TEST(ImageNeighborhoodOffsets, GenerateImageNeighborhoodOffsetsReturnsEmptyVectorForEmptyShape) { - constexpr unsigned int ImageDimension = 2; + constexpr unsigned int ImageDimension = 2; constexpr EmptyImageNeighborhoodShape shape = {}; - const std::vector> offsets = itk::GenerateImageNeighborhoodOffsets(shape); + const std::vector> offsets = itk::GenerateImageNeighborhoodOffsets(shape); EXPECT_EQ(offsets, std::vector>()); } @@ -68,7 +68,7 @@ TEST(ImageNeighborhoodOffsets, GenerateImageNeighborhoodOffsetsReturnsEmptyVecto TEST(ImageNeighborhoodOffsets, GenerateRectangularImageNeighborhoodOffsetsReturnsOneOffsetForDefaultRadius) { - constexpr itk::Size<> radius = { {} }; + constexpr itk::Size<> radius = { {} }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); EXPECT_EQ(offsets, std::vector>(1)); @@ -77,7 +77,7 @@ TEST(ImageNeighborhoodOffsets, GenerateRectangularImageNeighborhoodOffsetsReturn TEST(ImageNeighborhoodOffsets, GenerateRectangularImageNeighborhoodOffsetsForSmallestHorizontalNeigborhood) { - constexpr itk::Size<> radius = { { 1, 0 } }; + constexpr itk::Size<> radius = { { 1, 0 } }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); EXPECT_EQ(offsets, (std::vector>{ { { -1, 0 } }, { { 0, 0 } }, { { 1, 0 } } })); @@ -86,7 +86,7 @@ TEST(ImageNeighborhoodOffsets, GenerateRectangularImageNeighborhoodOffsetsForSma TEST(ImageNeighborhoodOffsets, GenerateRectangularImageNeighborhoodOffsetsForSmallestVerticalNeigborhood) { - constexpr itk::Size<> radius = { { 0, 1 } }; + constexpr itk::Size<> radius = { { 0, 1 } }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); EXPECT_EQ(offsets, (std::vector>{ { { 0, -1 } }, { { 0, 0 } }, { { 0, 1 } } })); diff --git a/Modules/Core/Common/test/itkImageRandomConstIteratorWithIndexGTest.cxx b/Modules/Core/Common/test/itkImageRandomConstIteratorWithIndexGTest.cxx index 97771243983..3982499fafc 100644 --- a/Modules/Core/Common/test/itkImageRandomConstIteratorWithIndexGTest.cxx +++ b/Modules/Core/Common/test/itkImageRandomConstIteratorWithIndexGTest.cxx @@ -36,7 +36,7 @@ TEST(ImageRandomConstIteratorWithIndex, IsDeterministicWhenGlobalRandomSeedsAreR using ImageType = itk::Image; // Create just a small test image, but still having enough pixels for the iterator to pick different samples from. - const auto image = ImageType::New(); + const auto image = ImageType::New(); const itk::ImageRegion imageRegion(ImageType::SizeType::Filled(3)); image->SetRegions(imageRegion); image->Allocate(); diff --git a/Modules/Core/Common/test/itkImageRandomConstIteratorWithOnlyIndexTest.cxx b/Modules/Core/Common/test/itkImageRandomConstIteratorWithOnlyIndexTest.cxx index 9c0d16b0c65..7d568ca44fa 100644 --- a/Modules/Core/Common/test/itkImageRandomConstIteratorWithOnlyIndexTest.cxx +++ b/Modules/Core/Common/test/itkImageRandomConstIteratorWithOnlyIndexTest.cxx @@ -32,7 +32,7 @@ itkImageRandomConstIteratorWithOnlyIndexTest(int, char *[]) using ImageType = itk::Image; - auto myImage = ImageType::New(); + auto myImage = ImageType::New(); const ImageType::ConstPointer myConstImage = myImage; ImageType::SizeType size0; diff --git a/Modules/Core/Common/test/itkImageRandomIteratorTest.cxx b/Modules/Core/Common/test/itkImageRandomIteratorTest.cxx index 38637d987fc..6b3724d96a2 100644 --- a/Modules/Core/Common/test/itkImageRandomIteratorTest.cxx +++ b/Modules/Core/Common/test/itkImageRandomIteratorTest.cxx @@ -32,7 +32,7 @@ itkImageRandomIteratorTest(int, char *[]) using ImageType = itk::Image; - auto myImage = ImageType::New(); + auto myImage = ImageType::New(); const ImageType::ConstPointer myConstImage = myImage; ImageType::SizeType size0; diff --git a/Modules/Core/Common/test/itkImageRandomNonRepeatingIteratorWithIndexTest.cxx b/Modules/Core/Common/test/itkImageRandomNonRepeatingIteratorWithIndexTest.cxx index 490d7a0f4b6..712e59bb79f 100644 --- a/Modules/Core/Common/test/itkImageRandomNonRepeatingIteratorWithIndexTest.cxx +++ b/Modules/Core/Common/test/itkImageRandomNonRepeatingIteratorWithIndexTest.cxx @@ -40,25 +40,25 @@ itkImageRandomNonRepeatingIteratorWithIndexTest(int, char *[]) using RandomConstIteratorType = itk::ImageRandomNonRepeatingConstIteratorWithIndex; std::cout << "Creating images" << std::endl; - auto myImage = ImageType::New(); + auto myImage = ImageType::New(); const ImageType::ConstPointer myConstImage = myImage; - ImageType::SizeType size0; + ImageType::SizeType size0; size0[0] = 50; size0[1] = 50; size0[2] = 50; - constexpr unsigned long numberOfSamples = 10; + constexpr unsigned long numberOfSamples = 10; constexpr ImageType::IndexType start0{}; - const ImageType::RegionType region0{ start0, size0 }; + const ImageType::RegionType region0{ start0, size0 }; myImage->SetRegions(region0); myImage->Allocate(); // Make the priority image - auto priorityImage = PriorityImageType::New(); + auto priorityImage = PriorityImageType::New(); PriorityImageType::SizeType prioritySize; prioritySize[0] = 50; prioritySize[1] = 50; prioritySize[2] = 50; constexpr PriorityImageType::IndexType priorityStart{}; - const PriorityImageType::RegionType priorityRegion{ priorityStart, prioritySize }; + const PriorityImageType::RegionType priorityRegion{ priorityStart, prioritySize }; priorityImage->SetRegions(priorityRegion); priorityImage->Allocate(); // we will make most of this image ones, with a small region of @@ -81,7 +81,7 @@ itkImageRandomNonRepeatingIteratorWithIndexTest(int, char *[]) subsize[1] = 4; subsize[2] = 5; const PriorityImageType::RegionType subregion{ substart, subsize }; - PriorityIteratorType subit(priorityImage, subregion); + PriorityIteratorType subit(priorityImage, subregion); subit.GoToBegin(); while (!subit.IsAtEnd()) { @@ -234,7 +234,7 @@ itkImageRandomNonRepeatingIteratorWithIndexTest(int, char *[]) size[1] = 12; size[2] = 13; const ImageType::RegionType region{ start, size }; - RandomIteratorType cbot(myImage, region); + RandomIteratorType cbot(myImage, region); cbot.SetNumberOfSamples(numberOfSamples); // 0=x, 1=y, 2=z cbot.GoToBegin(); while (!cbot.IsAtEnd()) @@ -271,7 +271,7 @@ itkImageRandomNonRepeatingIteratorWithIndexTest(int, char *[]) size[1] = 12; size[2] = 13; const ImageType::RegionType region{ start, size }; - RandomConstIteratorType cbot(myImage, region); + RandomConstIteratorType cbot(myImage, region); cbot.SetNumberOfSamples(numberOfSamples); cbot.GoToBegin(); while (!cbot.IsAtEnd()) diff --git a/Modules/Core/Common/test/itkImageRandomNonRepeatingIteratorWithIndexTest2.cxx b/Modules/Core/Common/test/itkImageRandomNonRepeatingIteratorWithIndexTest2.cxx index 204776871a9..596cc69c053 100644 --- a/Modules/Core/Common/test/itkImageRandomNonRepeatingIteratorWithIndexTest2.cxx +++ b/Modules/Core/Common/test/itkImageRandomNonRepeatingIteratorWithIndexTest2.cxx @@ -34,17 +34,17 @@ itkImageRandomNonRepeatingIteratorWithIndexTest2(int, char *[]) using ImageType = itk::Image; using RandomConstIteratorType = itk::ImageRandomNonRepeatingConstIteratorWithIndex; - constexpr unsigned long N = 10; - constexpr int Seed = 42; - auto size = ImageType::SizeType::Filled(N); + constexpr unsigned long N = 10; + constexpr int Seed = 42; + auto size = ImageType::SizeType::Filled(N); constexpr ImageType::IndexType start{}; - const ImageType::RegionType region{ start, size }; - auto myImage = ImageType::New(); + const ImageType::RegionType region{ start, size }; + auto myImage = ImageType::New(); myImage->SetRegions(region); myImage->Allocate(); using WalkType = std::vector; using WalkIteratorType = WalkType::iterator; - WalkType firstWalk(N); + WalkType firstWalk(N); RandomConstIteratorType firstIt(myImage, region); firstIt.ReinitializeSeed(Seed); firstIt.SetNumberOfSamples(region.GetNumberOfPixels()); @@ -52,7 +52,7 @@ itkImageRandomNonRepeatingIteratorWithIndexTest2(int, char *[]) { firstWalk.push_back(firstIt.GetIndex()); } - WalkType secondWalk(N); + WalkType secondWalk(N); RandomConstIteratorType secondIt(myImage, region); secondIt.ReinitializeSeed(Seed); secondIt.SetNumberOfSamples(region.GetNumberOfPixels()); diff --git a/Modules/Core/Common/test/itkImageRegionExclusionIteratorWithIndexTest.cxx b/Modules/Core/Common/test/itkImageRegionExclusionIteratorWithIndexTest.cxx index 62aaef6dce0..ee6c490724e 100644 --- a/Modules/Core/Common/test/itkImageRegionExclusionIteratorWithIndexTest.cxx +++ b/Modules/Core/Common/test/itkImageRegionExclusionIteratorWithIndexTest.cxx @@ -97,7 +97,7 @@ RunTest(const TRegion & region, const TRegion & exclusionRegion) ev.SetExclusionRegion(exclusionRegion); ei.SetExclusionRegion(exclusionRegion); - unsigned int numberOfPixelsVisited = 0; + unsigned int numberOfPixelsVisited = 0; const unsigned int pixelsToVisit = region.GetNumberOfPixels() - croppedExclusionRegion.GetNumberOfPixels(); ev.GoToBegin(); @@ -258,8 +258,8 @@ itkImageRegionExclusionIteratorWithIndexTest(int, char *[]) using RegionType = itk::ImageRegion; constexpr IndexType regionStart{}; - auto regionSize = itk::MakeFilled(7); - const RegionType region{ regionStart, regionSize }; + auto regionSize = itk::MakeFilled(7); + const RegionType region{ regionStart, regionSize }; constexpr SizeType::SizeValueType size[2] = { 4, 7 }; @@ -291,8 +291,8 @@ itkImageRegionExclusionIteratorWithIndexTest(int, char *[]) } // Test exclusion region completely outside the region. - auto exclusionStart = IndexType::Filled(-3); - auto exclusionSize = SizeType::Filled(2); + auto exclusionStart = IndexType::Filled(-3); + auto exclusionSize = SizeType::Filled(2); const RegionType exclusionRegion(exclusionStart, exclusionSize); if (!RunTest(region, exclusionRegion)) diff --git a/Modules/Core/Common/test/itkImageRegionGTest.cxx b/Modules/Core/Common/test/itkImageRegionGTest.cxx index df937066ba9..29846c2cec4 100644 --- a/Modules/Core/Common/test/itkImageRegionGTest.cxx +++ b/Modules/Core/Common/test/itkImageRegionGTest.cxx @@ -183,7 +183,7 @@ TEST(ImageRegion, CropDoesNotChangeRegionToBeCroppedWhenCropRegionIsEqual) for (const itk::SizeValueType sizeValue : { 1, 2 }) { const RegionType region{ IndexType::Filled(indexValue), SizeType::Filled(sizeValue) }; - auto regionToBeCropped = region; + auto regionToBeCropped = region; EXPECT_TRUE(regionToBeCropped.Crop(region)); EXPECT_EQ(regionToBeCropped, region); } diff --git a/Modules/Core/Common/test/itkImageRegionIteratorGTest.cxx b/Modules/Core/Common/test/itkImageRegionIteratorGTest.cxx index e11e47e622f..193abd50a06 100644 --- a/Modules/Core/Common/test/itkImageRegionIteratorGTest.cxx +++ b/Modules/Core/Common/test/itkImageRegionIteratorGTest.cxx @@ -83,7 +83,7 @@ CheckConstructedAtBegin() const RegionType imageRegion(IndexType::Filled(indexValue), SizeType::Filled(sizeValue)); const TIterator iterator(image, imageRegion); - TIterator iteratorThatGoesToBegin = iterator; + TIterator iteratorThatGoesToBegin = iterator; iteratorThatGoesToBegin.GoToBegin(); EXPECT_EQ(iterator, iteratorThatGoesToBegin); diff --git a/Modules/Core/Common/test/itkImageRegionRangeGTest.cxx b/Modules/Core/Common/test/itkImageRegionRangeGTest.cxx index 90a7b70b751..8f624f0bdb2 100644 --- a/Modules/Core/Common/test/itkImageRegionRangeGTest.cxx +++ b/Modules/Core/Common/test/itkImageRegionRangeGTest.cxx @@ -94,7 +94,7 @@ template typename TImage::Pointer CreateImage(const unsigned int sizeX, const unsigned int sizeY) { - const auto image = TImage::New(); + const auto image = TImage::New(); const typename TImage::SizeType imageSize = { { sizeX, sizeY } }; image->SetRegions(imageSize); image->Allocate(); @@ -108,7 +108,7 @@ typename TImage::Pointer CreateImageFilledWithSequenceOfNaturalNumbers(const unsigned int sizeX, const unsigned int sizeY) { using PixelType = typename TImage::PixelType; - const auto image = CreateImage(sizeX, sizeY); + const auto image = CreateImage(sizeX, sizeY); const itk::ImageBufferRange imageBufferRange{ *image }; std::iota(imageBufferRange.begin(), imageBufferRange.end(), PixelType{ 1 }); return image; @@ -126,7 +126,7 @@ SetVectorLengthIfImageIsVectorImage(itk::VectorImage & template void SetVectorLengthIfImageIsVectorImage(itk::Image & itkNotUsed(image), - const unsigned int itkNotUsed(vectorLength)) + const unsigned int itkNotUsed(vectorLength)) { // Do not set the VectorLength. The specified image is not a VectorImage. } @@ -156,7 +156,7 @@ ExpectRangeIsNotEmptyForNonEmptyImage() { // First create a non-empty image: const auto image = TImage::New(); - auto imageSize = TImage::SizeType::Filled(1); + auto imageSize = TImage::SizeType::Filled(1); image->SetRegions(imageSize); SetVectorLengthIfImageIsVectorImage(*image, 1); image->Allocate(); @@ -168,13 +168,13 @@ ExpectRangeIsNotEmptyForNonEmptyImage() template void Expect_ImageRegionRange_iterates_forward_over_same_pixels_as_ImageRegionIterator( - TImage & image, + TImage & image, const itk::ImageRegion & iterationRegion) { using PixelType = typename TImage::PixelType; itk::ImageRegionIterator imageRegionIterator{ &image, iterationRegion }; - const ImageRegionRange range{ image, iterationRegion }; + const ImageRegionRange range{ image, iterationRegion }; ASSERT_TRUE(imageRegionIterator.IsAtBegin()); @@ -190,11 +190,11 @@ Expect_ImageRegionRange_iterates_forward_over_same_pixels_as_ImageRegionIterator template void Expect_ImageRegionRange_iterates_backward_over_same_pixels_as_ImageRegionIterator( - TImage & image, + TImage & image, const itk::ImageRegion & iterationRegion) { itk::ImageRegionIterator imageRegionIterator{ &image, iterationRegion }; - const ImageRegionRange range{ image, iterationRegion }; + const ImageRegionRange range{ image, iterationRegion }; auto rangeIterator = range.cend(); imageRegionIterator.GoToEnd(); @@ -215,7 +215,7 @@ Expect_ImageRegionRange_iterates_backward_over_same_pixels_as_ImageRegionIterato template void Check_Range_constructor_throws_ExceptionObject_when_iteration_region_is_outside_of_buffered_region( - TImage & image, + TImage & image, const typename TImage::RegionType & region) { try @@ -248,8 +248,8 @@ TEST(ImageRegionRange, EquivalentBeginOrEndIteratorsCompareEqual) const RangeType range{ *image }; - const RangeType::iterator begin = range.begin(); - const RangeType::iterator end = range.end(); + const RangeType::iterator begin = range.begin(); + const RangeType::iterator end = range.end(); const RangeType::const_iterator cbegin = range.cbegin(); const RangeType::const_iterator cend = range.cend(); @@ -277,8 +277,8 @@ TEST(ImageRegionRange, BeginAndEndOfNonEmptyImageRegionAreNotEqual) { using ImageType = itk::Image; - constexpr auto ImageDimension = ImageType::ImageDimension; - const auto image = CreateImage(2, 3); + constexpr auto ImageDimension = ImageType::ImageDimension; + const auto image = CreateImage(2, 3); const itk::ImageRegion region{ itk::Size::Filled(2) }; const ImageRegionRange range{ *image, region }; @@ -294,13 +294,13 @@ TEST(ImageRegionRange, IteratorConvertsToConstIterator) using ImageType = itk::Image; using RangeType = ImageRegionRange; - constexpr auto ImageDimension = ImageType::ImageDimension; - const auto image = CreateImage(2, 3); + constexpr auto ImageDimension = ImageType::ImageDimension; + const auto image = CreateImage(2, 3); const itk::ImageRegion region{ itk::Size::Filled(2) }; const RangeType range{ *image, region }; - const RangeType::iterator begin = range.begin(); + const RangeType::iterator begin = range.begin(); const RangeType::const_iterator const_begin_from_begin = begin; EXPECT_EQ(const_begin_from_begin, begin); @@ -321,7 +321,7 @@ TEST(ImageRegionRange, IteratorsCanBePassedToStdVectorConstructor) sizeX = 9, sizeY = 11 }; - const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); + const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); const itk::ImageRegion region{ itk::Size::Filled(2) }; const ImageRegionRange range{ *image, region }; @@ -345,7 +345,7 @@ TEST(ImageRegionRange, IteratorsCanBePassedToStdReverseCopy) sizeX = 9, sizeY = 11 }; - const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); + const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); const itk::ImageRegion region{ itk::Size::Filled(2) }; const ImageRegionRange range{ *image, region }; @@ -353,9 +353,9 @@ TEST(ImageRegionRange, IteratorsCanBePassedToStdReverseCopy) constexpr unsigned int numberOfPixels = sizeX * sizeY; const std::vector stdVector(range.begin(), range.end()); - std::vector reversedStdVector1(numberOfPixels); - std::vector reversedStdVector2(numberOfPixels); - std::vector reversedStdVector3(numberOfPixels); + std::vector reversedStdVector1(numberOfPixels); + std::vector reversedStdVector2(numberOfPixels); + std::vector reversedStdVector3(numberOfPixels); // Checks bidirectionality of the ImageRegionRange iterators! std::reverse_copy(stdVector.cbegin(), stdVector.cend(), reversedStdVector1.begin()); @@ -385,7 +385,7 @@ TEST(ImageRegionRange, IteratorsCanBePassedToStdInnerProduct) sizeX = 2, sizeY = 2 }; - const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); + const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); const itk::ImageRegion region{ itk::Size::Filled(2) }; const ImageRegionRange range{ *image, region }; @@ -408,7 +408,7 @@ TEST(ImageRegionRange, IteratorsCanBePassedToStdForEach) sizeX = 9, sizeY = 11 }; - const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); + const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); const itk::ImageRegion region{ itk::Size::Filled(2) }; const ImageRegionRange range{ *image, region }; @@ -431,7 +431,7 @@ TEST(ImageRegionRange, CanBeUsedAsExpressionOfRangeBasedForLoop) sizeX = 2, sizeY = 3 }; - const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); + const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); const itk::ImageRegion region{ itk::Size::Filled(2) }; RangeType range{ *image, region }; @@ -466,7 +466,7 @@ TEST(ImageRegionRange, SupportsVectorImage) sizeY = 2, sizeZ = 2 }; - const auto image = ImageType::New(); + const auto image = ImageType::New(); constexpr typename ImageType::SizeType imageSize = { { sizeX, sizeY, sizeZ } }; image->SetRegions(imageSize); image->SetVectorLength(vectorLength); @@ -489,7 +489,7 @@ TEST(ImageRegionRange, SupportsVectorImage) image->SetPixel({ {} }, otherPixelValue); RangeType::const_iterator it = range.begin(); - const PixelType firstPixelValueFromRange = *it; + const PixelType firstPixelValueFromRange = *it; EXPECT_EQ(firstPixelValueFromRange, otherPixelValue); ++it; const PixelType secondPixelValueFromRange = *it; @@ -514,7 +514,7 @@ TEST(ImageRegionRange, ProvidesReverseIterators) sizeX = 9, sizeY = 11 }; - const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); + const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); const itk::ImageRegion region{ itk::Size::Filled(2) }; const RangeType range{ *image, region }; @@ -522,16 +522,16 @@ TEST(ImageRegionRange, ProvidesReverseIterators) constexpr unsigned int numberOfPixels = sizeX * sizeY; const std::vector stdVector(range.begin(), range.end()); - std::vector reversedStdVector1(numberOfPixels); - std::vector reversedStdVector2(numberOfPixels); - std::vector reversedStdVector3(numberOfPixels); + std::vector reversedStdVector1(numberOfPixels); + std::vector reversedStdVector2(numberOfPixels); + std::vector reversedStdVector3(numberOfPixels); std::reverse_copy(stdVector.cbegin(), stdVector.cend(), reversedStdVector1.begin()); const RangeType::const_reverse_iterator crbegin = range.crbegin(); const RangeType::const_reverse_iterator crend = range.crend(); - const RangeType::reverse_iterator rbegin = range.rbegin(); - const RangeType::reverse_iterator rend = range.rend(); + const RangeType::reverse_iterator rbegin = range.rbegin(); + const RangeType::reverse_iterator rend = range.rend(); EXPECT_EQ(crbegin, rbegin); EXPECT_EQ(crend, rend); @@ -630,7 +630,7 @@ TEST(ImageRegionRange, ThrowsInReleaseWhenIterationRegionIsOutsideBufferedRegion const auto image = ImageType::New(); constexpr IndexType imageIndex{ { -1, -2 } }; - constexpr SizeType imageSize{ { 3, 4 } }; + constexpr SizeType imageSize{ { 3, 4 } }; image->SetRegions(RegionType{ imageIndex, imageSize }); image->AllocateInitialized(); diff --git a/Modules/Core/Common/test/itkImageTest.cxx b/Modules/Core/Common/test/itkImageTest.cxx index cf23ec48dc0..e77260342b5 100644 --- a/Modules/Core/Common/test/itkImageTest.cxx +++ b/Modules/Core/Common/test/itkImageTest.cxx @@ -47,7 +47,7 @@ int itkImageTest(int, char *[]) { using Image = itk::Image; - auto image = Image::New(); + auto image = Image::New(); const Image::ConstPointer myconstptr = image; image->DebugOn(); const char * const knownStringName = "My First Image For Testing."; @@ -82,7 +82,7 @@ itkImageTest(int, char *[]) // test inverse direction std::cout << "Test inverse direction." << std::endl; Image::DirectionType product = direction * image->GetInverseDirection(); - constexpr double eps = 1e-06; + constexpr double eps = 1e-06; if (itk::Math::abs(product[0][0] - 1.0) > eps || itk::Math::abs(product[1][1] - 1.0) > eps || itk::Math::abs(product[0][1]) > eps || itk::Math::abs(product[1][0]) > eps) { @@ -119,31 +119,31 @@ itkImageTest(int, char *[]) image->SetDirection(direction); constexpr Image::IndexType index{}; - constexpr auto size = Image::SizeType::Filled(4); - const Image::RegionType region{ index, size }; + constexpr auto size = Image::SizeType::Filled(4); + const Image::RegionType region{ index, size }; image->SetRegions(region); - auto imageRef = Image::New(); - constexpr auto spacingRef = itk::MakeFilled(2); + auto imageRef = Image::New(); + constexpr auto spacingRef = itk::MakeFilled(2); constexpr Image::PointType originRef{}; - Image::DirectionType directionRef; + Image::DirectionType directionRef; directionRef.SetIdentity(); imageRef->SetSpacing(spacingRef); imageRef->SetOrigin(originRef); imageRef->SetDirection(directionRef); constexpr Image::IndexType indexRef{}; - constexpr auto sizeRef = itk::MakeFilled(5); - const Image::RegionType regionRef{ indexRef, sizeRef }; + constexpr auto sizeRef = itk::MakeFilled(5); + const Image::RegionType regionRef{ indexRef, sizeRef }; imageRef->SetRegions(regionRef); using TransformType = itk::Transform; - const Image::RegionType boxRegion = itk::ImageAlgorithm::EnlargeRegionOverBox(image->GetLargestPossibleRegion(), + const Image::RegionType boxRegion = itk::ImageAlgorithm::EnlargeRegionOverBox(image->GetLargestPossibleRegion(), image.GetPointer(), imageRef.GetPointer(), static_cast(nullptr)); constexpr Image::IndexType correctIndex{}; - constexpr auto correctSize = Image::SizeType::Filled(3); + constexpr auto correctSize = Image::SizeType::Filled(3); if (!(boxRegion.GetIndex() == correctIndex) || !(boxRegion.GetSize() == correctSize)) { std::cerr << "EnlargeRegionOverBox test failed: " @@ -160,7 +160,7 @@ itkImageTest(int, char *[]) constexpr Image3D::IndexType indexCuboid{}; - Image3D::SizeType sizeCuboid; + Image3D::SizeType sizeCuboid; sizeCuboid[0] = 1; sizeCuboid[1] = 2; sizeCuboid[2] = 3; @@ -175,7 +175,7 @@ itkImageTest(int, char *[]) delete projectionTransform; constexpr Image::IndexType correctRectangleIndex{}; - Image::SizeType correctRectangleSize; + Image::SizeType correctRectangleSize; correctRectangleSize[0] = 1; correctRectangleSize[1] = 2; if (!(rectangleRegion.GetIndex() == correctRectangleIndex) || !(rectangleRegion.GetSize() == correctRectangleSize)) diff --git a/Modules/Core/Common/test/itkImageTransformTest.cxx b/Modules/Core/Common/test/itkImageTransformTest.cxx index 8ebd798dc88..06cf6dff8e4 100644 --- a/Modules/Core/Common/test/itkImageTransformTest.cxx +++ b/Modules/Core/Common/test/itkImageTransformTest.cxx @@ -44,7 +44,7 @@ TestTransform() using SizeType = typename RegionType::SizeType; typename ImageType::PointType point; - RegionType region; + RegionType region; auto size = SizeType::Filled(10); region.SetSize(size); diff --git a/Modules/Core/Common/test/itkImageVectorOptimizerParametersHelperTest.cxx b/Modules/Core/Common/test/itkImageVectorOptimizerParametersHelperTest.cxx index 90d2bd36358..af334c5da48 100644 --- a/Modules/Core/Common/test/itkImageVectorOptimizerParametersHelperTest.cxx +++ b/Modules/Core/Common/test/itkImageVectorOptimizerParametersHelperTest.cxx @@ -54,7 +54,7 @@ testMemoryAccess(OptimizerParametersType & params, ImageVectorPointer imageOfVec // The image index returns a N-dim vector, so have to check each // element against the values returned by parameter object. const itk::OffsetValueType offset = (x + y * dimLength) * VectorDimension; - VectorPixelType vectorpixel = imageOfVectors->GetPixel(index); + VectorPixelType vectorpixel = imageOfVectors->GetPixel(index); for (itk::SizeValueType ind = 0; ind < VectorDimension; ++ind) { const ValueType paramsValue = params[offset + ind]; @@ -82,7 +82,7 @@ itkImageVectorOptimizerParametersHelperTest(int, char *[]) constexpr IndexType start{}; - SizeType size; + SizeType size; constexpr int dimLength = 3; size.Fill(dimLength); @@ -92,7 +92,7 @@ itkImageVectorOptimizerParametersHelperTest(int, char *[]) imageOfVectors->SetRegions(region); imageOfVectors->Allocate(); - ValueType vectorinitvalues[VectorDimension] = { 0.0, 0.1, 0.2, 0.3 }; + ValueType vectorinitvalues[VectorDimension] = { 0.0, 0.1, 0.2, 0.3 }; const VectorPixelType vectorvalues(vectorinitvalues); // @@ -122,7 +122,7 @@ itkImageVectorOptimizerParametersHelperTest(int, char *[]) // Create a parameter object and assign the ImageVector helper. OptimizerParametersType params; - auto * imageVectorParamsHelper = new ImageVectorOptimizerParametersHelperType; + auto * imageVectorParamsHelper = new ImageVectorOptimizerParametersHelperType; // Assign the helper to the parameter object. // OptimizerParameters object will manage the helper once its been set. params.SetHelper(imageVectorParamsHelper); diff --git a/Modules/Core/Common/test/itkImportImageTest.cxx b/Modules/Core/Common/test/itkImportImageTest.cxx index 900e12d7fcc..5ff6595b91e 100644 --- a/Modules/Core/Common/test/itkImportImageTest.cxx +++ b/Modules/Core/Common/test/itkImportImageTest.cxx @@ -43,10 +43,10 @@ itkImportImageTest(int, char *[]) ITK_EXERCISE_BASIC_OBJECT_METHODS(basicImport, ImportImageFilter, ImageSource); - ShortImage::Pointer image; - itk::ImageRegion region; + ShortImage::Pointer image; + itk::ImageRegion region; constexpr itk::ImageRegion::IndexType index = { { 0, 0 } }; - constexpr itk::ImageRegion::SizeType size = { { 8, 12 } }; + constexpr itk::ImageRegion::SizeType size = { { 8, 12 } }; region.SetIndex(index); region.SetSize(size); // local scope to make sure that imported data is not deleted with ImportImageFilter diff --git a/Modules/Core/Common/test/itkIndexRangeGTest.cxx b/Modules/Core/Common/test/itkIndexRangeGTest.cxx index 2abff56c774..6922f215262 100644 --- a/Modules/Core/Common/test/itkIndexRangeGTest.cxx +++ b/Modules/Core/Common/test/itkIndexRangeGTest.cxx @@ -98,7 +98,7 @@ ExpectRangeIsEmptyWhenRegionSizeIsZero() static_assert(ImageRegionIndexRange{ zeroSize }.empty()); // Now do the test for an arbitrary (random) region index: - const itk::Index randomRegionIndex = GenerateRandomIndex(); + const itk::Index randomRegionIndex = GenerateRandomIndex(); const itk::ImageRegion zeroSizedImageRegion{ randomRegionIndex, zeroSize }; EXPECT_TRUE(ImageRegionIndexRange{ zeroSizedImageRegion }.empty()); @@ -145,8 +145,8 @@ TEST(IndexRange, EquivalentBeginOrEndIteratorsCompareEqual) static constexpr RangeType range(RangeType::SizeType{ { 1, 2 } }); - static constexpr RangeType::iterator begin = range.begin(); - static constexpr RangeType::iterator end = range.end(); + static constexpr RangeType::iterator begin = range.begin(); + static constexpr RangeType::iterator end = range.end(); static constexpr RangeType::const_iterator cbegin = range.cbegin(); static constexpr RangeType::const_iterator cend = range.cend(); @@ -210,9 +210,9 @@ TEST(IndexRange, IteratorsCanBePassedToStdReverseCopy) static constexpr unsigned int numberOfIndices = range.size(); const std::vector stdVector(range.begin(), range.end()); - std::vector reversedStdVector1(numberOfIndices); - std::vector reversedStdVector2(numberOfIndices); - std::vector reversedStdVector3(numberOfIndices); + std::vector reversedStdVector1(numberOfIndices); + std::vector reversedStdVector2(numberOfIndices); + std::vector reversedStdVector3(numberOfIndices); // Checks bidirectionality of the range iterators. std::reverse_copy(stdVector.cbegin(), stdVector.cend(), reversedStdVector1.begin()); @@ -265,21 +265,21 @@ TEST(IndexRange, SupportsImageRegion) using IndexType = ImageRegionIndexRangeType::IndexType; using RegionType = itk::ImageRegion; - static constexpr RegionType::SizeType size = { { 2, 3 } }; + static constexpr RegionType::SizeType size = { { 2, 3 } }; static constexpr RegionType::IndexType regionIndex = { { 4, 5 } }; - const RegionType imageRegion{ regionIndex, size }; + const RegionType imageRegion{ regionIndex, size }; // Default index range, beginning at [0, 0]. static constexpr ZeroBasedIndexRange indexRange(size); - static constexpr auto beginOfIndexRange = indexRange.cbegin(); - static constexpr auto endOfIndexRange = indexRange.cend(); + static constexpr auto beginOfIndexRange = indexRange.cbegin(); + static constexpr auto endOfIndexRange = indexRange.cend(); const ImageRegionIndexRangeType imageRegionIndexRange(imageRegion); EXPECT_EQ(imageRegionIndexRange.size(), indexRange.size()); const auto offset = regionIndex - IndexType(); - auto indexIterator = beginOfIndexRange; + auto indexIterator = beginOfIndexRange; for (auto && imageRegionIndex : imageRegionIndexRange) { diff --git a/Modules/Core/Common/test/itkIteratorTests.cxx b/Modules/Core/Common/test/itkIteratorTests.cxx index 8d80f56b5f6..63bdeebff70 100644 --- a/Modules/Core/Common/test/itkIteratorTests.cxx +++ b/Modules/Core/Common/test/itkIteratorTests.cxx @@ -62,11 +62,11 @@ itkIteratorTests(int, char *[]) bool passed = true; // memset - clock_t start = clock(); + clock_t start = clock(); unsigned short * ptr = o3->GetBufferPointer(); memset(ptr, 0, num * sizeof(unsigned short)); clock_t end = clock(); - double elapsedTime = (end - start) / static_cast(CLOCKS_PER_SEC); + double elapsedTime = (end - start) / static_cast(CLOCKS_PER_SEC); std::cout << "Raw pointer using memset" << std::endl; std::cout << "\tTime = " << elapsedTime << std::endl; diff --git a/Modules/Core/Common/test/itkLightObjectTest.cxx b/Modules/Core/Common/test/itkLightObjectTest.cxx index 6dc19305dbb..ddea7a28dea 100644 --- a/Modules/Core/Common/test/itkLightObjectTest.cxx +++ b/Modules/Core/Common/test/itkLightObjectTest.cxx @@ -44,7 +44,7 @@ itkLightObjectTest(int, char *[]) { // initialize scope for a SmartPointer const ObjectType::Pointer secondreference = light; - const int counts2 = light->GetReferenceCount(); + const int counts2 = light->GetReferenceCount(); if (counts2 != counts1 + 1) { std::cerr << "Problem in Reference counting increment" << std::endl; diff --git a/Modules/Core/Common/test/itkLoggerThreadWrapperTest.cxx b/Modules/Core/Common/test/itkLoggerThreadWrapperTest.cxx index cad346380b7..2a195ba7cf1 100644 --- a/Modules/Core/Common/test/itkLoggerThreadWrapperTest.cxx +++ b/Modules/Core/Common/test/itkLoggerThreadWrapperTest.cxx @@ -105,7 +105,7 @@ ThreadedGenerateLogMessages2(void * arg) if (workUnitInfo) { const unsigned int workUnitID = workUnitInfo->WorkUnitID; - std::string threadPrefix; + std::string threadPrefix; { std::ostringstream msg; msg << " "; @@ -228,7 +228,7 @@ itkLoggerThreadWrapperTest(int argc, char * argv[]) std::cout << " Flushing by the ThreadLogger is synchronized." << std::endl; std::cout << "Beginning multi-threaded portion of test." << std::endl; - ThreadDataVec threadData = create_threaded_data2(numthreads, logger); + ThreadDataVec threadData = create_threaded_data2(numthreads, logger); const itk::MultiThreaderBase::Pointer threader = itk::MultiThreaderBase::New(); itk::MultiThreaderBase::SetGlobalMaximumNumberOfThreads(numthreads + 10); threader->SetNumberOfWorkUnits(numthreads); diff --git a/Modules/Core/Common/test/itkMapContainerTest.cxx b/Modules/Core/Common/test/itkMapContainerTest.cxx index 8d4b9344778..909ed6a5f5d 100644 --- a/Modules/Core/Common/test/itkMapContainerTest.cxx +++ b/Modules/Core/Common/test/itkMapContainerTest.cxx @@ -45,7 +45,7 @@ itkMapContainerTest(int, char *[]) displacement[1] = 5; displacement[2] = 9; - auto pointA = itk::MakeFilled(0.0); + auto pointA = itk::MakeFilled(0.0); const PointType pointB = pointA + displacement; const PointType pointC = pointB + displacement; const PointType pointD = pointC + displacement; @@ -58,9 +58,9 @@ itkMapContainerTest(int, char *[]) // Iterator { const ContainerType::Iterator p_null; - ContainerType::Iterator p = container->Begin(); - ContainerType::Iterator p_copy(p); - ContainerType::Iterator p_assign = p; + ContainerType::Iterator p = container->Begin(); + ContainerType::Iterator p_copy(p); + ContainerType::Iterator p_assign = p; while (p != container->End()) { @@ -76,9 +76,9 @@ itkMapContainerTest(int, char *[]) // ConstIterator { const ContainerType::ConstIterator p_null; - ContainerType::ConstIterator p = container->Begin(); - ContainerType::ConstIterator p_copy(p); - ContainerType::ConstIterator p_assign = p; + ContainerType::ConstIterator p = container->Begin(); + ContainerType::ConstIterator p_copy(p); + ContainerType::ConstIterator p_assign = p; while (p != container->End()) { diff --git a/Modules/Core/Common/test/itkMathRoundProfileTest1.cxx b/Modules/Core/Common/test/itkMathRoundProfileTest1.cxx index 1775271d617..1c802953a9a 100644 --- a/Modules/Core/Common/test/itkMathRoundProfileTest1.cxx +++ b/Modules/Core/Common/test/itkMathRoundProfileTest1.cxx @@ -55,7 +55,7 @@ itkMathRoundProfileTest1(int, char *[]) using ArrayType = std::vector; using IntArrayType = std::vector; - ArrayType input; + ArrayType input; IntArrayType output1; IntArrayType output2; IntArrayType output3; @@ -191,7 +191,7 @@ itkMathRoundProfileTest1(int, char *[]) // // Now test the correctness of the output // - auto inpItr = input.begin(); + auto inpItr = input.begin(); const auto inputEnd = input.end(); auto outItr1 = output1.begin(); diff --git a/Modules/Core/Common/test/itkMathTest.cxx b/Modules/Core/Common/test/itkMathTest.cxx index ddee7b89905..cf672f6ec73 100644 --- a/Modules/Core/Common/test/itkMathTest.cxx +++ b/Modules/Core/Common/test/itkMathTest.cxx @@ -168,7 +168,7 @@ main(int, char *[]) std::cout << "Testing itk::Math::FloatAlmostEqual" << std::endl; union FloatRepresentationF { - float asFloat; + float asFloat; itk::int32_t asInt; }; @@ -411,7 +411,7 @@ main(int, char *[]) union FloatRepresentationD { - double asFloat; + double asFloat; itk::int64_t asInt; }; @@ -588,10 +588,10 @@ main(int, char *[]) { // Test various equals operations. //========================= constexpr signed char sc = -1; - constexpr auto uc = static_cast(-1); + constexpr auto uc = static_cast(-1); testPassStatus = (TestIntegersAreSame(sc, uc) == EXIT_SUCCESS) ? testPassStatus : EXIT_FAILURE; //========================= - constexpr int si = -1; + constexpr int si = -1; constexpr auto ul = static_cast(-1); testPassStatus = (TestIntegersAreSame(si, ul) == EXIT_SUCCESS) ? testPassStatus : EXIT_FAILURE; //========================= @@ -602,7 +602,7 @@ main(int, char *[]) testPassStatus = (TestIntegersAreSame(si, ust) == EXIT_SUCCESS) ? testPassStatus : EXIT_FAILURE; //========================= - constexpr float f = -1.0f; + constexpr float f = -1.0f; constexpr double d = 1.01; // Test AlmostEquals() @@ -659,7 +659,7 @@ main(int, char *[]) // Test AlmostEquals complex comparisons constexpr std::complex z1Double(1.1, 2.1); - constexpr std::complex z1Float(1.1f, 2.1f); + constexpr std::complex z1Float(1.1f, 2.1f); // Test AlmostEquals with complex numbers of the same value and different types std::cout << "Testing COMPLEX vs COMPLEX, DOUBLE vs FLOAT, SAME values " << std::endl; @@ -676,7 +676,7 @@ main(int, char *[]) #if !defined(ITK_LEGACY_REMOVE) constexpr std::complex z2Double(1.0, 3.0); - constexpr std::complex z2Int(1, 3); + constexpr std::complex z2Int(1, 3); std::cout << "Testing COMPLEX vs COMPLEX, DOUBLE vs INT, SAME values " << std::endl; if (itk::Math::AlmostEquals(z2Double, z2Int) == false) @@ -711,8 +711,8 @@ main(int, char *[]) // Test comparison between complex and real number with the same value constexpr std::complex z3Double(0.123, 0); - constexpr float r3Float = 0.123; - constexpr double r3Double = 0.123; + constexpr float r3Float = 0.123; + constexpr double r3Double = 0.123; std::cout << "Testing COMPLEX vs REAL, DOUBLE vs DOUBLE, SAME values " << std::endl; if (itk::Math::NotAlmostEquals(z3Double, r3Double)) @@ -740,7 +740,7 @@ main(int, char *[]) // Test comparison between complex and real numbers with very close values constexpr std::complex z4Float(0.123, 0); - FloatRepresentationF r4FloatAlmost; + FloatRepresentationF r4FloatAlmost; r4FloatAlmost.asFloat = z4Float.real(); r4FloatAlmost.asInt += 1; diff --git a/Modules/Core/Common/test/itkMatrixGTest.cxx b/Modules/Core/Common/test/itkMatrixGTest.cxx index 50e693a23b0..7985b8980f8 100644 --- a/Modules/Core/Common/test/itkMatrixGTest.cxx +++ b/Modules/Core/Common/test/itkMatrixGTest.cxx @@ -71,10 +71,10 @@ Expect_Matrix_is_constructible_from_raw_array_of_arrays() { using ValueType = typename TMatrix::ValueType; - constexpr auto numberOfRows = TMatrix::RowDimensions; - constexpr auto numberOfColumns = TMatrix::ColumnDimensions; - constexpr auto numberOfElements = numberOfRows * numberOfColumns; - ValueType rawArray[numberOfRows][numberOfColumns]; + constexpr auto numberOfRows = TMatrix::RowDimensions; + constexpr auto numberOfColumns = TMatrix::ColumnDimensions; + constexpr auto numberOfElements = numberOfRows * numberOfColumns; + ValueType rawArray[numberOfRows][numberOfColumns]; ValueType * const beginOfRawArray = rawArray[0]; // Just ensure that each element of the raw array has a different value. diff --git a/Modules/Core/Common/test/itkMatrixTest.cxx b/Modules/Core/Common/test/itkMatrixTest.cxx index 1ffa9425fbc..d1bc1f35d4e 100644 --- a/Modules/Core/Common/test/itkMatrixTest.cxx +++ b/Modules/Core/Common/test/itkMatrixTest.cxx @@ -47,7 +47,7 @@ itkMatrixTest(int, char *[]) std::cout << resultVector[2] << std::endl; constexpr PointType::ValueType p1Init[3] = { 3, 4, 5 }; - const PointType p1 = p1Init; + const PointType p1 = p1Init; PointType resultPoint = matrix * p1; std::cout << resultPoint[0] << ", "; @@ -55,7 +55,7 @@ itkMatrixTest(int, char *[]) std::cout << resultPoint[2] << std::endl; CovariantVectorType::ValueType cv1Init[3] = { 3, 4, 5 }; - const CovariantVectorType cv1 = cv1Init; + const CovariantVectorType cv1 = cv1Init; CovariantVectorType resultCovariantVector = matrix * cv1; std::cout << resultCovariantVector[0] << ", "; diff --git a/Modules/Core/Common/test/itkMemoryProbesCollecterBaseTest.cxx b/Modules/Core/Common/test/itkMemoryProbesCollecterBaseTest.cxx index c468568d61c..0abf8c42b69 100644 --- a/Modules/Core/Common/test/itkMemoryProbesCollecterBaseTest.cxx +++ b/Modules/Core/Common/test/itkMemoryProbesCollecterBaseTest.cxx @@ -39,7 +39,7 @@ itkMemoryProbesCollecterBaseTest(int, char *[]) constexpr size_t bufsize = 256L * 1024L * 1024L; // 256 MiB itk::MemoryProbesCollectorBase mcollecter; - itk::MemoryProbe probe; + itk::MemoryProbe probe; mcollecter.Start("Update"); Sleep(5000); mcollecter.Stop("Update"); diff --git a/Modules/Core/Common/test/itkMersenneTwisterRandomVariateGeneratorGTest.cxx b/Modules/Core/Common/test/itkMersenneTwisterRandomVariateGeneratorGTest.cxx index 6ccd5024326..670d09048f5 100644 --- a/Modules/Core/Common/test/itkMersenneTwisterRandomVariateGeneratorGTest.cxx +++ b/Modules/Core/Common/test/itkMersenneTwisterRandomVariateGeneratorGTest.cxx @@ -53,7 +53,7 @@ TEST(MersenneTwisterRandomVariateGenerator, GetIntegerVariateConformsWithStdMt19 // as std::mt19937, when std::mt19937 uses the same seed as the ITK generator. TEST(MersenneTwisterRandomVariateGenerator, GetIntegerVariateReturnsSameAsStdMt19937) { - const auto generator = MersenneTwisterRandomVariateGenerator::New(); + const auto generator = MersenneTwisterRandomVariateGenerator::New(); std::mt19937 stdMt19937{ generator->GetSeed() }; // Just repeat a few times, assuming that that should be enough. diff --git a/Modules/Core/Common/test/itkMersenneTwisterRandomVariateGeneratorTest.cxx b/Modules/Core/Common/test/itkMersenneTwisterRandomVariateGeneratorTest.cxx index ac0dd772962..7b9c78b797a 100644 --- a/Modules/Core/Common/test/itkMersenneTwisterRandomVariateGeneratorTest.cxx +++ b/Modules/Core/Common/test/itkMersenneTwisterRandomVariateGeneratorTest.cxx @@ -82,8 +82,8 @@ itkMersenneTwisterRandomVariateGeneratorTest(int, char *[]) // Do we get roughly zero mean and unit variance? // NB: requires a large number of iterations to have variance converge... - double sum = 0.0; - double sum2 = 0.0; + double sum = 0.0; + double sum2 = 0.0; constexpr int count = 500000; for (int i = 0; i < count; ++i) { diff --git a/Modules/Core/Common/test/itkMetaDataDictionaryGTest.cxx b/Modules/Core/Common/test/itkMetaDataDictionaryGTest.cxx index b8c20501397..b12aa47f1a7 100644 --- a/Modules/Core/Common/test/itkMetaDataDictionaryGTest.cxx +++ b/Modules/Core/Common/test/itkMetaDataDictionaryGTest.cxx @@ -181,7 +181,7 @@ TEST(MetaDataDictionary, CopyOnWrite) { { - itk::MetaDataDictionary dic = createMetaDataDictionary(); + itk::MetaDataDictionary dic = createMetaDataDictionary(); const itk::MetaDataDictionary dic_copy = dic; // The use_count is not exposed in the interface, but it is in the @@ -199,7 +199,7 @@ TEST(MetaDataDictionary, CopyOnWrite) } { - itk::MetaDataDictionary dic = createMetaDataDictionary(); + itk::MetaDataDictionary dic = createMetaDataDictionary(); const itk::MetaDataDictionary dic_copy = dic; dic.Set("two", createMetaDataObject(22.0f)); @@ -212,7 +212,7 @@ TEST(MetaDataDictionary, CopyOnWrite) } { - itk::MetaDataDictionary dic = createMetaDataDictionary(); + itk::MetaDataDictionary dic = createMetaDataDictionary(); const itk::MetaDataDictionary dic_copy = dic; dic.Set("three", createMetaDataObject(3.0f)); @@ -224,7 +224,7 @@ TEST(MetaDataDictionary, CopyOnWrite) } { - itk::MetaDataDictionary dic = createMetaDataDictionary(); + itk::MetaDataDictionary dic = createMetaDataDictionary(); const itk::MetaDataDictionary dic_copy = dic; dic.Erase("two"); @@ -234,7 +234,7 @@ TEST(MetaDataDictionary, CopyOnWrite) } { - itk::MetaDataDictionary dic = createMetaDataDictionary(); + itk::MetaDataDictionary dic = createMetaDataDictionary(); const itk::MetaDataDictionary dic_copy = dic; dic.Clear(); @@ -345,7 +345,7 @@ TEST(MetaDataDictionary, SupportsCStyleArrays) // Check a two-dimensional array. constexpr size_t numberOfRows{ 3 }; constexpr size_t numberOfColumns{ 4 }; - int twoDimensionalArray[numberOfRows][numberOfColumns]; + int twoDimensionalArray[numberOfRows][numberOfColumns]; // Just ensure that each element of the two-dimentional array has a different value. int * const beginOfData = &(twoDimensionalArray[0][0]); diff --git a/Modules/Core/Common/test/itkMetaDataDictionaryTest.cxx b/Modules/Core/Common/test/itkMetaDataDictionaryTest.cxx index b98230b0630..8d611fe90f7 100644 --- a/Modules/Core/Common/test/itkMetaDataDictionaryTest.cxx +++ b/Modules/Core/Common/test/itkMetaDataDictionaryTest.cxx @@ -29,7 +29,7 @@ itkMetaDataDictionaryTest(int, char *[]) //-------Floats itk::EncapsulateMetaData(MyDictionary, "ASimpleFloatInitalized", static_cast(1.234560F)); { - float tempfloat = 0.0; + float tempfloat = 0.0; const bool IsValidReturn = itk::ExposeMetaData(MyDictionary, "ASimpleFloatInitalized", tempfloat); if (IsValidReturn) { @@ -101,8 +101,8 @@ itkMetaDataDictionaryTest(int, char *[]) try { const itk::MetaDataDictionary & MyConstDictionary = MyDictionary; - auto itr = MyConstDictionary.Begin(); - auto end = MyConstDictionary.End(); + auto itr = MyConstDictionary.Begin(); + auto end = MyConstDictionary.End(); while (itr != end) { diff --git a/Modules/Core/Common/test/itkMinimumMaximumImageCalculatorTest.cxx b/Modules/Core/Common/test/itkMinimumMaximumImageCalculatorTest.cxx index c576727437c..ffc56502e7f 100644 --- a/Modules/Core/Common/test/itkMinimumMaximumImageCalculatorTest.cxx +++ b/Modules/Core/Common/test/itkMinimumMaximumImageCalculatorTest.cxx @@ -31,13 +31,13 @@ itkMinimumMaximumImageCalculatorTest(int, char *[]) /* Define the image size and physical coordinates */ constexpr SizeType size = { { 20, 20, 20 } }; - constexpr double origin[3] = { 0.0, 0.0, 0.0 }; - constexpr double spacing[3] = { 1, 1, 1 }; + constexpr double origin[3] = { 0.0, 0.0, 0.0 }; + constexpr double spacing[3] = { 1, 1, 1 }; std::cout << "Testing Minimum and Maximum Image Calulator:\n"; // Allocate a simple test image - auto image = ImageType::New(); + auto image = ImageType::New(); ImageType::RegionType region; region.SetSize(size); image->SetRegions(region); @@ -97,8 +97,8 @@ itkMinimumMaximumImageCalculatorTest(int, char *[]) ITK_TEST_SET_GET_VALUE(maxIntensityValueIndex, calculator->GetIndexOfMaximum()); // Set the region over which perform the computations - constexpr itk::Size<3> regionSize = { { 4, 4, 4 } }; - constexpr itk::Index<3> idx = { { 0, 0, 0 } }; + constexpr itk::Size<3> regionSize = { { 4, 4, 4 } }; + constexpr itk::Index<3> idx = { { 0, 0, 0 } }; const MinMaxCalculatorType::RegionType computationRegion{ idx, regionSize }; calculator->SetRegion(computationRegion); diff --git a/Modules/Core/Common/test/itkModifiedTimeTest.cxx b/Modules/Core/Common/test/itkModifiedTimeTest.cxx index 4cf28431135..7fafabdc33e 100644 --- a/Modules/Core/Common/test/itkModifiedTimeTest.cxx +++ b/Modules/Core/Common/test/itkModifiedTimeTest.cxx @@ -26,7 +26,7 @@ itkModifiedTimeTest(int, char *[]) using PointsContainer = itk::VectorContainer; using BoundingBox = itk::BoundingBox; - auto pc = PointsContainer::New(); + auto pc = PointsContainer::New(); constexpr Point p{}; pc->InsertElement(0, p); constexpr Point q{}; diff --git a/Modules/Core/Common/test/itkMultiThreaderParallelizeArrayTest.cxx b/Modules/Core/Common/test/itkMultiThreaderParallelizeArrayTest.cxx index 7bbee118a73..68a98a5b67c 100644 --- a/Modules/Core/Common/test/itkMultiThreaderParallelizeArrayTest.cxx +++ b/Modules/Core/Common/test/itkMultiThreaderParallelizeArrayTest.cxx @@ -63,7 +63,7 @@ itkMultiThreaderParallelizeArrayTest(int argc, char * argv[]) mt->SetNumberOfWorkUnits(workUnitCount); } - constexpr unsigned int size = 1029; + constexpr unsigned int size = 1029; std::vector vec(size); using SomeProcessObject = itk::AbsImageFilter, itk::Image>; diff --git a/Modules/Core/Common/test/itkMultipleLogOutputTest.cxx b/Modules/Core/Common/test/itkMultipleLogOutputTest.cxx index e4adf2a0740..ae6e306059d 100644 --- a/Modules/Core/Common/test/itkMultipleLogOutputTest.cxx +++ b/Modules/Core/Common/test/itkMultipleLogOutputTest.cxx @@ -38,7 +38,7 @@ itkMultipleLogOutputTest(int argc, char * argv[]) // Create an ITK StdStreamLogOutput const itk::StdStreamLogOutput::Pointer coutput = itk::StdStreamLogOutput::New(); const itk::StdStreamLogOutput::Pointer foutput = itk::StdStreamLogOutput::New(); - const itk::MultipleLogOutput::Pointer output = itk::MultipleLogOutput::New(); + const itk::MultipleLogOutput::Pointer output = itk::MultipleLogOutput::New(); std::cout << "Testing itk::MultipleLogOutput" << std::endl; coutput->SetStream(std::cout); diff --git a/Modules/Core/Common/test/itkMultithreadingTest.cxx b/Modules/Core/Common/test/itkMultithreadingTest.cxx index 28d5fa86690..32ca3abc74a 100644 --- a/Modules/Core/Common/test/itkMultithreadingTest.cxx +++ b/Modules/Core/Common/test/itkMultithreadingTest.cxx @@ -24,7 +24,7 @@ namespace { std::shared_ptr sharedMutex; -bool debugPrint = false; +bool debugPrint = false; } // namespace ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION @@ -43,8 +43,8 @@ execute(void * ptr) sharedMutex->unlock(); constexpr int n = 10; - const int m = *data; - double sum = 1.0; + const int m = *data; + double sum = 1.0; for (int j = 0; j < m; ++j) { @@ -82,9 +82,9 @@ itkMultithreadingTest(int argc, char * argv[]) { return EXIT_FAILURE; } - const itk::TimeProbe timeProbe; + const itk::TimeProbe timeProbe; const itk::TimeProbe::TimeStampType startTime = timeProbe.GetInstantValue(); - int data = 123; + int data = 123; for (int i = 0; i < count; ++i) { threader->SetSingleMethod(&execute, &data); diff --git a/Modules/Core/Common/test/itkNeighborhoodAlgorithmTest.cxx b/Modules/Core/Common/test/itkNeighborhoodAlgorithmTest.cxx index 44e7a80a9e2..ea98c8cd735 100644 --- a/Modules/Core/Common/test/itkNeighborhoodAlgorithmTest.cxx +++ b/Modules/Core/Common/test/itkNeighborhoodAlgorithmTest.cxx @@ -22,14 +22,14 @@ template bool -ImageBoundaryFaceCalculatorTest(TImage * image, - typename TImage::RegionType & region, +ImageBoundaryFaceCalculatorTest(TImage * image, + typename TImage::RegionType & region, const typename TImage::SizeType & radius) { using FaceCalculatorType = itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator; using FaceListType = typename FaceCalculatorType::FaceListType; FaceCalculatorType faceCalculator; - FaceListType faceList; + FaceListType faceList; faceList = faceCalculator(image, region, radius); for (auto fit = faceList.begin(); fit != faceList.end(); ++fit) diff --git a/Modules/Core/Common/test/itkNeighborhoodIteratorTest.cxx b/Modules/Core/Common/test/itkNeighborhoodIteratorTest.cxx index d4214af0865..16159f4fe68 100644 --- a/Modules/Core/Common/test/itkNeighborhoodIteratorTest.cxx +++ b/Modules/Core/Common/test/itkNeighborhoodIteratorTest.cxx @@ -22,7 +22,7 @@ int itkNeighborhoodIteratorTest(int, char *[]) { - const TestImageType::Pointer img = GetTestImage(10, 10, 5, 3); + const TestImageType::Pointer img = GetTestImage(10, 10, 5, 3); itk::NeighborhoodIterator::IndexType loc; loc[0] = 4; loc[1] = 4; diff --git a/Modules/Core/Common/test/itkNeighborhoodTest.cxx b/Modules/Core/Common/test/itkNeighborhoodTest.cxx index 00c720e2aa9..f496a48778c 100644 --- a/Modules/Core/Common/test/itkNeighborhoodTest.cxx +++ b/Modules/Core/Common/test/itkNeighborhoodTest.cxx @@ -72,7 +72,7 @@ itkNeighborhoodTest(int, char *[]) println("TESTING WITH DEFAULT ALLOCATOR"); itk::Neighborhood q; - itk::Size<2> rad; + itk::Size<2> rad; rad[0] = 3; rad[1] = 2; q.SetRadius(rad); diff --git a/Modules/Core/Common/test/itkNumberToStringGTest.cxx b/Modules/Core/Common/test/itkNumberToStringGTest.cxx index e1bd5e139df..55a0f7cad44 100644 --- a/Modules/Core/Common/test/itkNumberToStringGTest.cxx +++ b/Modules/Core/Common/test/itkNumberToStringGTest.cxx @@ -51,7 +51,7 @@ Test_non_finite_special_floating_point_values() { using NumericLimitsType = std::numeric_limits; const itk::NumberToString numberToString{}; - const auto message = std::string("Floating point type: ") + floatingPointTypeName; + const auto message = std::string("Floating point type: ") + floatingPointTypeName; EXPECT_EQ(numberToString(NumericLimitsType::quiet_NaN()), "NaN") << message; EXPECT_EQ(numberToString(NumericLimitsType::infinity()), "Infinity") << message; @@ -65,7 +65,7 @@ Test_round_trip_of_finite_numeric_limits() { using NumericLimitsType = std::numeric_limits; const itk::NumberToString numberToString{}; - const auto message = std::string("Floating point type: ") + floatingPointTypeName; + const auto message = std::string("Floating point type: ") + floatingPointTypeName; for (const TValue expectedValue : { NumericLimitsType::lowest(), NumericLimitsType::epsilon(), @@ -89,7 +89,7 @@ void Test_decimal_notation_supports_up_to_twentyone_digits() { const itk::NumberToString numberToString{}; - const auto message = std::string("Floating point type: ") + floatingPointTypeName; + const auto message = std::string("Floating point type: ") + floatingPointTypeName; for (int8_t exponent{ 20 }; exponent > 0; --exponent) { diff --git a/Modules/Core/Common/test/itkNumericTraitsTest.cxx b/Modules/Core/Common/test/itkNumericTraitsTest.cxx index 38a3fc73767..cd40faff240 100644 --- a/Modules/Core/Common/test/itkNumericTraitsTest.cxx +++ b/Modules/Core/Common/test/itkNumericTraitsTest.cxx @@ -92,8 +92,8 @@ CheckVariableLengthArrayTraits(const T & t) std::string name; #ifdef GCC_USEDEMANGLE const char * mangledName = typeid(t).name(); - int status; - char * unmangled = abi::__cxa_demangle(mangledName, nullptr, nullptr, &status); + int status; + char * unmangled = abi::__cxa_demangle(mangledName, nullptr, nullptr, &status); name = unmangled; free(unmangled); #else @@ -138,8 +138,8 @@ CheckFixedArrayTraits(const T & t) std::string name; #ifdef GCC_USEDEMANGLE const char * mangledName = typeid(t).name(); - int status; - char * unmangled = abi::__cxa_demangle(mangledName, nullptr, nullptr, &status); + int status; + char * unmangled = abi::__cxa_demangle(mangledName, nullptr, nullptr, &status); name = unmangled; free(unmangled); #else @@ -816,7 +816,7 @@ itkNumericTraitsTest(int, char *[]) CheckFixedArrayTraits(itk::Point()); using PointType = itk::Point; - auto pointPixel = PointType(); + auto pointPixel = PointType(); unsigned int pointSize = itk::NumericTraits::GetLength(pointPixel) + 1; ITK_TRY_EXPECT_EXCEPTION(itk::NumericTraits::SetLength(pointPixel, pointSize)); @@ -849,7 +849,7 @@ itkNumericTraitsTest(int, char *[]) CheckFixedArrayTraits(itk::RGBPixel()); using RGBPixelType = itk::RGBPixel; - auto rgbPixel = RGBPixelType(); + auto rgbPixel = RGBPixelType(); unsigned int rgbPixelSize = itk::NumericTraits::GetLength(rgbPixel) + 1; ITK_TRY_EXPECT_EXCEPTION(itk::NumericTraits::SetLength(rgbPixel, rgbPixelSize)); @@ -882,7 +882,7 @@ itkNumericTraitsTest(int, char *[]) CheckFixedArrayTraits(itk::RGBAPixel()); using RGBAPixelType = itk::RGBAPixel; - auto rgbaPixel = RGBAPixelType(); + auto rgbaPixel = RGBAPixelType(); unsigned int rgbaPixelSize = itk::NumericTraits::GetLength(rgbaPixel) + 1; ITK_TRY_EXPECT_EXCEPTION(itk::NumericTraits::SetLength(rgbaPixel, rgbaPixelSize)); diff --git a/Modules/Core/Common/test/itkNumericsTest.cxx b/Modules/Core/Common/test/itkNumericsTest.cxx index 0577c4e93c7..251097911f3 100644 --- a/Modules/Core/Common/test/itkNumericsTest.cxx +++ b/Modules/Core/Common/test/itkNumericsTest.cxx @@ -53,10 +53,10 @@ solve_with_warning(const vnl_matrix & M, const vnl_matrix & B) int test_svd() { - double data[] = { 1, 1, 1, 1, 2, 3, 1, 3, 6 }; - vnl_matrix M(data, 3, 3); + double data[] = { 1, 1, 1, 1, 2, 3, 1, 3, 6 }; + vnl_matrix M(data, 3, 3); const vnl_matrix B(3, 1, 7.0); // column vector [7 7 7]^T - vnl_matrix result = solve_with_warning(M, B); + vnl_matrix result = solve_with_warning(M, B); std::cout << "Original svd problem solution" << std::endl; print_vnl_matrix(result); M(2, 2) = 5; @@ -70,7 +70,7 @@ int itkNumericsTest(int, char *[]) { test_svd(); - double data[] = { 1, 1, 1, 1, 2, 3, 1, 3, 6 }; + double data[] = { 1, 1, 1, 1, 2, 3, 1, 3, 6 }; vnl_matrix mat(data, 3, 3); std::cout << std::endl << "A matrix" << std::endl; for (unsigned int r = 0; r < mat.rows(); ++r) diff --git a/Modules/Core/Common/test/itkObjectFactoryOnlyNewTest.cxx b/Modules/Core/Common/test/itkObjectFactoryOnlyNewTest.cxx index 6271e9c1a61..21e12484290 100644 --- a/Modules/Core/Common/test/itkObjectFactoryOnlyNewTest.cxx +++ b/Modules/Core/Common/test/itkObjectFactoryOnlyNewTest.cxx @@ -160,10 +160,10 @@ itkObjectFactoryOnlyNewTest(int, char *[]) std::list overrides = oneFactory->GetClassOverrideNames(); std::list names = oneFactory->GetClassOverrideWithNames(); std::list descriptions = oneFactory->GetClassOverrideDescriptions(); - std::list enableflags = oneFactory->GetEnableFlags(); - auto n = names.begin(); - auto d = descriptions.begin(); - auto e = enableflags.begin(); + std::list enableflags = oneFactory->GetEnableFlags(); + auto n = names.begin(); + auto d = descriptions.begin(); + auto e = enableflags.begin(); for (auto o = overrides.begin(); o != overrides.end(); ++o, ++n, ++d, ++e) { std::cout << " Override " << *o << " with " << *n << std::endl diff --git a/Modules/Core/Common/test/itkObjectFactoryTest.cxx b/Modules/Core/Common/test/itkObjectFactoryTest.cxx index 8f06e30631d..60151bcf20d 100644 --- a/Modules/Core/Common/test/itkObjectFactoryTest.cxx +++ b/Modules/Core/Common/test/itkObjectFactoryTest.cxx @@ -161,10 +161,10 @@ itkObjectFactoryTest(int, char *[]) std::list overrides = oneFactory->GetClassOverrideNames(); std::list names = oneFactory->GetClassOverrideWithNames(); std::list descriptions = oneFactory->GetClassOverrideDescriptions(); - std::list enableflags = oneFactory->GetEnableFlags(); - auto n = names.begin(); - auto d = descriptions.begin(); - auto e = enableflags.begin(); + std::list enableflags = oneFactory->GetEnableFlags(); + auto n = names.begin(); + auto d = descriptions.begin(); + auto e = enableflags.begin(); for (auto o = overrides.begin(); o != overrides.end(); ++o, ++n, ++d, ++e) { std::cout << " Override " << *o << " with " << *n << std::endl diff --git a/Modules/Core/Common/test/itkObjectFactoryTest2.cxx b/Modules/Core/Common/test/itkObjectFactoryTest2.cxx index 25d602086d9..c4050dba4f0 100644 --- a/Modules/Core/Common/test/itkObjectFactoryTest2.cxx +++ b/Modules/Core/Common/test/itkObjectFactoryTest2.cxx @@ -145,10 +145,10 @@ itkObjectFactoryTest2(int argc, char * argv[]) std::list overrides = factory->GetClassOverrideNames(); std::list names = factory->GetClassOverrideWithNames(); std::list descriptions = factory->GetClassOverrideDescriptions(); - std::list enableflags = factory->GetEnableFlags(); - auto n = names.begin(); - auto d = descriptions.begin(); - auto e = enableflags.begin(); + std::list enableflags = factory->GetEnableFlags(); + auto n = names.begin(); + auto d = descriptions.begin(); + auto e = enableflags.begin(); for (auto o = overrides.begin(); o != overrides.end(); ++o, ++n, ++d, ++e) { std::cout << " Override " << *o << " with " << *n << std::endl @@ -179,7 +179,7 @@ itkObjectFactoryTest2(int argc, char * argv[]) MakeImage(10, static_cast(0)); MakeImage(10, static_cast(0)); } - const itk::RGBPixel rgbUC{}; + const itk::RGBPixel rgbUC{}; const itk::RGBPixel rgbUS{}; MakeImage(10, rgbUC); MakeImage(10, rgbUS); diff --git a/Modules/Core/Common/test/itkObjectStoreTest.cxx b/Modules/Core/Common/test/itkObjectStoreTest.cxx index 669db097a43..e2e3b4e0e0b 100644 --- a/Modules/Core/Common/test/itkObjectStoreTest.cxx +++ b/Modules/Core/Common/test/itkObjectStoreTest.cxx @@ -23,7 +23,7 @@ struct TestObject { float vector[3]; - int counter; + int counter; }; int diff --git a/Modules/Core/Common/test/itkOctreeTest.cxx b/Modules/Core/Common/test/itkOctreeTest.cxx index 9c82e87d762..79d26aac88b 100644 --- a/Modules/Core/Common/test/itkOctreeTest.cxx +++ b/Modules/Core/Common/test/itkOctreeTest.cxx @@ -40,10 +40,10 @@ int itkOctreeTest(int, char *[]) { using ImageType = itk::Image; - constexpr ImageType::SizeType imageSize = { { 4, 4, 4 } }; + constexpr ImageType::SizeType imageSize = { { 4, 4, 4 } }; constexpr ImageType::IndexType imageIndex = { { 0, 0, 0 } }; - const ImageType::RegionType region{ imageIndex, imageSize }; - auto img = ImageType::New(); + const ImageType::RegionType region{ imageIndex, imageSize }; + auto img = ImageType::New(); img->SetRegions(region); img->Allocate(); srand(static_cast(time(nullptr))); @@ -80,7 +80,7 @@ itkOctreeTest(int, char *[]) octree->BuildFromImage(img); - const ImageType::Pointer output = octree->GetImage(); + const ImageType::Pointer output = octree->GetImage(); itk::ImageRegionIterator ri2(output, region); ri.GoToBegin(); IdentityMap id; diff --git a/Modules/Core/Common/test/itkOptimizerParametersTest.cxx b/Modules/Core/Common/test/itkOptimizerParametersTest.cxx index 6dd1c156381..2268e753e56 100644 --- a/Modules/Core/Common/test/itkOptimizerParametersTest.cxx +++ b/Modules/Core/Common/test/itkOptimizerParametersTest.cxx @@ -35,7 +35,7 @@ runTestByType() /* Test different ctors */ // Construct by size - constexpr itk::SizeValueType dim = 20; + constexpr itk::SizeValueType dim = 20; const itk::OptimizerParameters paramsSize(dim); if (paramsSize.GetSize() != dim) { diff --git a/Modules/Core/Common/test/itkPeriodicBoundaryConditionTest.cxx b/Modules/Core/Common/test/itkPeriodicBoundaryConditionTest.cxx index 56834b4e13d..afb0604551e 100644 --- a/Modules/Core/Common/test/itkPeriodicBoundaryConditionTest.cxx +++ b/Modules/Core/Common/test/itkPeriodicBoundaryConditionTest.cxx @@ -124,9 +124,9 @@ itkPeriodicBoundaryConditionTest(int, char *[]) // Test an image to cover one operator() method. auto image = ImageType::New(); - constexpr SizeType imageSize = { { 5, 5 } }; + constexpr SizeType imageSize = { { 5, 5 } }; constexpr IndexType imageIndex = { { 0, 0 } }; - const RegionType imageRegion(imageIndex, imageSize); + const RegionType imageRegion(imageIndex, imageSize); image->SetRegions(imageRegion); image->Allocate(); @@ -159,7 +159,7 @@ itkPeriodicBoundaryConditionTest(int, char *[]) it.OverrideBoundaryCondition(&bc); itk::PeriodicBoundaryCondition vbc; - VectorIteratorType vit(radius, vectorImage, vectorImage->GetRequestedRegion()); + VectorIteratorType vit(radius, vectorImage, vectorImage->GetRequestedRegion()); vit.OverrideBoundaryCondition(&vbc); pos[0] = pos[1] = 0; @@ -176,7 +176,7 @@ itkPeriodicBoundaryConditionTest(int, char *[]) } RadiusType radiusTwo; radiusTwo[0] = radiusTwo[1] = 2; - IteratorType it2(radiusTwo, image, image->GetRequestedRegion()); + IteratorType it2(radiusTwo, image, image->GetRequestedRegion()); VectorIteratorType vit2(radiusTwo, vectorImage, vectorImage->GetRequestedRegion()); it2.OverrideBoundaryCondition(&bc); @@ -199,8 +199,8 @@ itkPeriodicBoundaryConditionTest(int, char *[]) // Now test the input region calculation // Test 1 std::cout << "GetInputRequestedRegion() Test 1" << std::endl; - auto requestIndex = itk::MakeFilled(0); - auto requestSize = itk::MakeFilled(2); + auto requestIndex = itk::MakeFilled(0); + auto requestSize = itk::MakeFilled(2); RegionType requestRegion(requestIndex, requestSize); @@ -277,8 +277,8 @@ itkPeriodicBoundaryConditionTest(int, char *[]) // Check when ConstNeighborhoodIterator is templated over the // PeriodicBoundaryCondition - auto testImage = ImageType::New(); - ImageType::SizeType testSize = { { 64, 64 } }; + auto testImage = ImageType::New(); + ImageType::SizeType testSize = { { 64, 64 } }; const ImageType::RegionType testRegion(testSize); testImage->SetRegions(testRegion); testImage->Allocate(); @@ -286,7 +286,7 @@ itkPeriodicBoundaryConditionTest(int, char *[]) using BoundaryConditionType = itk::PeriodicBoundaryCondition; using IterType = itk::ConstNeighborhoodIterator; - IterType testIter(radius, testImage, testRegion); + IterType testIter(radius, testImage, testRegion); BoundaryConditionType boundaryCondition; testIter.OverrideBoundaryCondition(&boundaryCondition); std::vector back; diff --git a/Modules/Core/Common/test/itkPhasedArray3DSpecialCoordinatesImageTest.cxx b/Modules/Core/Common/test/itkPhasedArray3DSpecialCoordinatesImageTest.cxx index efa0f8a7bff..eea0b635778 100644 --- a/Modules/Core/Common/test/itkPhasedArray3DSpecialCoordinatesImageTest.cxx +++ b/Modules/Core/Common/test/itkPhasedArray3DSpecialCoordinatesImageTest.cxx @@ -35,7 +35,7 @@ itkPhasedArray3DSpecialCoordinatesImageTest(int, char *[]) auto image = Image::New(); // image->DebugOn(); // image->GetSource(); - auto size = SizeType::Filled(5); // 5x5x5 sampling of data + auto size = SizeType::Filled(5); // 5x5x5 sampling of data RegionType region; region.SetSize(size); image->SetRegions(region); @@ -60,12 +60,12 @@ itkPhasedArray3DSpecialCoordinatesImageTest(int, char *[]) auto point = itk::MakeFilled(0.05); point[2] = 3.1; - IndexType index; + IndexType index; const bool isIndexInside = image->TransformPhysicalPointToIndex(point, index); std::cout << "Point " << point << " -> Index " << index << (isIndexInside ? " inside" : " outside") << std::endl; ContinuousIndexType continuousIndex; - const bool isContinuousIndexInside = image->TransformPhysicalPointToContinuousIndex(point, continuousIndex); + const bool isContinuousIndexInside = image->TransformPhysicalPointToContinuousIndex(point, continuousIndex); std::cout << "Point " << point << " -> Continuous Index " << continuousIndex << (isContinuousIndexInside ? " inside" : " outside") << std::endl; diff --git a/Modules/Core/Common/test/itkPointGeometryTest.cxx b/Modules/Core/Common/test/itkPointGeometryTest.cxx index a6887722cea..9dedd819139 100644 --- a/Modules/Core/Common/test/itkPointGeometryTest.cxx +++ b/Modules/Core/Common/test/itkPointGeometryTest.cxx @@ -149,11 +149,11 @@ itkPointGeometryTest(int, char *[]) // Test the MeanPoint { - PointType midpoint; + PointType midpoint; constexpr PointType::ValueType aInit[3] = { 2.0, 4.0, 7.0 }; constexpr PointType::ValueType bInit[3] = { 6.0, 2.0, 9.0 }; - PointType A = aInit; - PointType B = bInit; + PointType A = aInit; + PointType B = bInit; midpoint.SetToMidPoint(A, B); std::cout << "Test for MidPoint " << std::endl; std::cout << "PA = " << A << std::endl; @@ -173,13 +173,13 @@ itkPointGeometryTest(int, char *[]) // Test the Barycentric combination { - constexpr double tolerance = 1e-10; - PointType combination; + constexpr double tolerance = 1e-10; + PointType combination; constexpr PointType::ValueType aInit[3] = { 2.0, 4.0, 7.0 }; constexpr PointType::ValueType bInit[3] = { 6.0, 2.0, 9.0 }; - PointType A = aInit; - PointType B = bInit; - constexpr double alpha = 0.5; + PointType A = aInit; + PointType B = bInit; + constexpr double alpha = 0.5; combination.SetToBarycentricCombination(A, B, alpha); std::cout << "Test for Barycentric combination" << std::endl; std::cout << "PA = " << A << std::endl; @@ -200,16 +200,16 @@ itkPointGeometryTest(int, char *[]) // Test the Barycentric combination { - constexpr double tolerance = 1e-10; - PointType combination; + constexpr double tolerance = 1e-10; + PointType combination; constexpr PointType::ValueType aInit[3] = { 12.0, 0.0, 0.0 }; constexpr PointType::ValueType bInit[3] = { 0.0, 0.0, 12.0 }; constexpr PointType::ValueType cInit[3] = { 0.0, 12.0, 0.0 }; - PointType A = aInit; - PointType B = bInit; - PointType C = cInit; - constexpr double alpha = 1.0 / 3.0; - constexpr double beta = 1.0 / 3.0; + PointType A = aInit; + PointType B = bInit; + PointType C = cInit; + constexpr double alpha = 1.0 / 3.0; + constexpr double beta = 1.0 / 3.0; combination.SetToBarycentricCombination(A, B, C, alpha, beta); std::cout << "Test for Barycentric combination" << std::endl; std::cout << "PA = " << A << std::endl; @@ -232,15 +232,15 @@ itkPointGeometryTest(int, char *[]) // Test the Barycentric combination for an array { - constexpr double tolerance = 1e-10; - PointType combination; + constexpr double tolerance = 1e-10; + PointType combination; constexpr unsigned int NP = 3; - PointType A[NP]; - double w[NP - 1]; - constexpr double K = 12.0; - PointType::ValueType aInit0[3] = { K, 0.0, 0.0 }; - PointType::ValueType aInit1[3] = { 0.0, K, 0.0 }; - PointType::ValueType aInit2[3] = { 0.0, 0.0, K }; + PointType A[NP]; + double w[NP - 1]; + constexpr double K = 12.0; + PointType::ValueType aInit0[3] = { K, 0.0, 0.0 }; + PointType::ValueType aInit1[3] = { 0.0, K, 0.0 }; + PointType::ValueType aInit2[3] = { 0.0, 0.0, K }; A[0] = aInit0; A[1] = aInit1; A[2] = aInit2; @@ -262,7 +262,7 @@ itkPointGeometryTest(int, char *[]) // Test the Barycentric combination for an VectorContainer of Points { - constexpr double tolerance = 1e-10; + constexpr double tolerance = 1e-10; constexpr unsigned int NP = 3; using VectorOfPoints = itk::VectorContainer; auto points = VectorOfPoints::New(); @@ -270,9 +270,9 @@ itkPointGeometryTest(int, char *[]) constexpr double K = 12.0; VectorOfPoints::Iterator point = points->Begin(); - PointType::ValueType vInit0[3] = { K, 0.0, 0.0 }; - PointType::ValueType vInit1[3] = { 0.0, K, 0.0 }; - PointType::ValueType vInit2[3] = { 0.0, 0.0, K }; + PointType::ValueType vInit0[3] = { K, 0.0, 0.0 }; + PointType::ValueType vInit1[3] = { 0.0, K, 0.0 }; + PointType::ValueType vInit2[3] = { 0.0, 0.0, K }; point->Value() = vInit0; point++; point->Value() = vInit1; diff --git a/Modules/Core/Common/test/itkPointSetGTest.cxx b/Modules/Core/Common/test/itkPointSetGTest.cxx index d166f25e277..2ff644b847f 100644 --- a/Modules/Core/Common/test/itkPointSetGTest.cxx +++ b/Modules/Core/Common/test/itkPointSetGTest.cxx @@ -64,7 +64,7 @@ TestSetPointsByCoordinates(TPointSet & pointSet) ASSERT_EQ(points->size(), numberOfPoints); const typename PointsContainerType::STLContainerType & stlContainer = points->CastToSTLConstContainer(); - auto coordinateIterator = coordinates.cbegin(); + auto coordinateIterator = coordinates.cbegin(); for (PointIdentifier pointIdentifier{}; pointIdentifier < numberOfPoints; ++pointIdentifier) { diff --git a/Modules/Core/Common/test/itkPointSetToImageFilterTest1.cxx b/Modules/Core/Common/test/itkPointSetToImageFilterTest1.cxx index cf4d2b07e57..651d5b8a5b4 100644 --- a/Modules/Core/Common/test/itkPointSetToImageFilterTest1.cxx +++ b/Modules/Core/Common/test/itkPointSetToImageFilterTest1.cxx @@ -49,7 +49,7 @@ itkPointSetToImageFilterTest1(int argc, char * argv[]) auto pointSet = PointSetType::New(); // Create a point set describing a circle - const float radius = 100.0; + const float radius = 100.0; unsigned int count = 0; for (float theta = 0; theta < 2.0 * itk::Math::pi; theta += 0.1) { diff --git a/Modules/Core/Common/test/itkPriorityQueueTest.cxx b/Modules/Core/Common/test/itkPriorityQueueTest.cxx index b499779e99e..af46b35efde 100644 --- a/Modules/Core/Common/test/itkPriorityQueueTest.cxx +++ b/Modules/Core/Common/test/itkPriorityQueueTest.cxx @@ -50,7 +50,7 @@ itkPriorityQueueTest(int, char *[]) sequence.push_back(1.); sequence.push_back(-1.); - auto it = sequence.begin(); + auto it = sequence.begin(); size_t i = 0; for (; it != sequence.end(); ++it, ++i) { diff --git a/Modules/Core/Common/test/itkRGBPixelTest.cxx b/Modules/Core/Common/test/itkRGBPixelTest.cxx index 97823cdafd8..48580f451cd 100644 --- a/Modules/Core/Common/test/itkRGBPixelTest.cxx +++ b/Modules/Core/Common/test/itkRGBPixelTest.cxx @@ -25,10 +25,10 @@ itkRGBPixelTest(int, char *[]) { // Test it all - float val[3] = { 1, 0, .5 }; - itk::RGBPixel pixel(val); - unsigned char pixelInit0[3] = { 255, 255, 255 }; - unsigned char pixelInit1[3] = { 255, 255, 244 }; + float val[3] = { 1, 0, .5 }; + itk::RGBPixel pixel(val); + unsigned char pixelInit0[3] = { 255, 255, 255 }; + unsigned char pixelInit1[3] = { 255, 255, 244 }; itk::RGBPixel pixelArray[2]; pixelArray[0] = pixelInit0; pixelArray[1] = pixelInit1; @@ -121,8 +121,8 @@ itkRGBPixelTest(int, char *[]) rgbl[1] = 150; rgbl[2] = 120; - const float luminance = rgbl.GetLuminance(); - const float realLuminance = rgbl[0] * 0.30 + rgbl[1] * 0.59 + rgbl[2] * 0.11; + const float luminance = rgbl.GetLuminance(); + const float realLuminance = rgbl[0] * 0.30 + rgbl[1] * 0.59 + rgbl[2] * 0.11; constexpr float tolerance = 1e-4; if (itk::Math::abs(luminance - realLuminance) > tolerance) diff --git a/Modules/Core/Common/test/itkRangeGTestUtilities.h b/Modules/Core/Common/test/itkRangeGTestUtilities.h index cbcba57c711..3f6ad2925e0 100644 --- a/Modules/Core/Common/test/itkRangeGTestUtilities.h +++ b/Modules/Core/Common/test/itkRangeGTestUtilities.h @@ -85,7 +85,7 @@ class RangeGTestUtilities ExpectMoveConstructedRangeHasSameIteratorsAsOriginalBeforeMove(TRange && originalRange) { const TRange originalRangeBeforeMove = originalRange; - TRange moveConstructedRange(std::move(originalRange)); + TRange moveConstructedRange(std::move(originalRange)); ExpectRangesHaveEqualBeginAndEnd(moveConstructedRange, originalRangeBeforeMove); } diff --git a/Modules/Core/Common/test/itkRealTimeClockTest.cxx b/Modules/Core/Common/test/itkRealTimeClockTest.cxx index 03044741ce5..7702afaa7c1 100644 --- a/Modules/Core/Common/test/itkRealTimeClockTest.cxx +++ b/Modules/Core/Common/test/itkRealTimeClockTest.cxx @@ -74,7 +74,7 @@ itkRealTimeClockTest(int, char *[]) { realStamp1 = realStamp2; realStamp2 = clock->GetRealTimeStamp(); - const itk::RealTimeInterval difference = realStamp2 - realStamp1; + const itk::RealTimeInterval difference = realStamp2 - realStamp1; const itk::RealTimeStamp::TimeRepresentationType seconds1 = realStamp1.GetTimeInSeconds(); const itk::RealTimeStamp::TimeRepresentationType seconds2 = realStamp2.GetTimeInSeconds(); const itk::RealTimeStamp::TimeRepresentationType secondsD = difference.GetTimeInSeconds(); diff --git a/Modules/Core/Common/test/itkRealTimeIntervalTest.cxx b/Modules/Core/Common/test/itkRealTimeIntervalTest.cxx index 4b8335946be..eaa9fc8bc4a 100644 --- a/Modules/Core/Common/test/itkRealTimeIntervalTest.cxx +++ b/Modules/Core/Common/test/itkRealTimeIntervalTest.cxx @@ -55,7 +55,7 @@ itkRealTimeIntervalTest(int, char *[]) const double timeInMicroSeconds = interval0.GetTimeInMicroSeconds(); const double timeInMilliSeconds = interval0.GetTimeInMilliSeconds(); - double timeInSeconds = interval0.GetTimeInSeconds(); + double timeInSeconds = interval0.GetTimeInSeconds(); const double timeInMinutes = interval0.GetTimeInMinutes(); const double timeInHours = interval0.GetTimeInHours(); const double timeInDays = interval0.GetTimeInDays(); @@ -68,7 +68,7 @@ itkRealTimeIntervalTest(int, char *[]) CHECK_FOR_VALUE(timeInDays, 0.0); const itk::RealTimeInterval interval1; - itk::RealTimeInterval intervalX = interval0; + itk::RealTimeInterval intervalX = interval0; const itk::RealTimeInterval oneSecond(1, 0); for (unsigned int i = 0; i < 1000000L; ++i) diff --git a/Modules/Core/Common/test/itkRealTimeStampTest.cxx b/Modules/Core/Common/test/itkRealTimeStampTest.cxx index 685fab890ef..cf302538bdc 100644 --- a/Modules/Core/Common/test/itkRealTimeStampTest.cxx +++ b/Modules/Core/Common/test/itkRealTimeStampTest.cxx @@ -54,7 +54,7 @@ itkRealTimeStampTest(int, char *[]) const double timeInMicroSeconds = stamp0.GetTimeInMicroSeconds(); const double timeInMilliSeconds = stamp0.GetTimeInMilliSeconds(); - double timeInSeconds = stamp0.GetTimeInSeconds(); + double timeInSeconds = stamp0.GetTimeInSeconds(); const double timeInHours = stamp0.GetTimeInHours(); const double timeInDays = stamp0.GetTimeInDays(); @@ -65,7 +65,7 @@ itkRealTimeStampTest(int, char *[]) CHECK_FOR_VALUE(timeInDays, 0.0); const itk::RealTimeStamp stamp1; - itk::RealTimeStamp stamp2 = stamp0; + itk::RealTimeStamp stamp2 = stamp0; const itk::RealTimeInterval minusOneSecond(-1, 0); ITK_TRY_EXPECT_EXCEPTION(stamp2 += minusOneSecond); diff --git a/Modules/Core/Common/test/itkSTLContainerAdaptorTest.cxx b/Modules/Core/Common/test/itkSTLContainerAdaptorTest.cxx index 6c4ff1f9e09..66d9828132a 100644 --- a/Modules/Core/Common/test/itkSTLContainerAdaptorTest.cxx +++ b/Modules/Core/Common/test/itkSTLContainerAdaptorTest.cxx @@ -60,7 +60,7 @@ itkSTLContainerAdaptorTest(int, char *[]) vectorContainer->Print(std::cout); { // define a local scope - AdaptorType adaptor(vectorContainer); + AdaptorType adaptor(vectorContainer); TargetType & targetRef = adaptor.GetSTLContainerRef(); std::cout << "Testing assignment... "; @@ -68,7 +68,7 @@ itkSTLContainerAdaptorTest(int, char *[]) targetRef.reserve(vectorSource.size()); targetRef.assign(vectorSource.begin(), vectorSource.end()); - auto it = vectorSource.begin(); + auto it = vectorSource.begin(); VectorContainerType::ConstIterator cIter = vectorContainer->Begin(); while (it != vectorSource.end() && cIter != vectorContainer->End()) { @@ -108,7 +108,7 @@ itkSTLContainerAdaptorTest(int, char *[]) { // define a local scope - ConstAdaptorType constAdaptor(vectorContainer); + ConstAdaptorType constAdaptor(vectorContainer); ConstTargetType & constTargetRef = constAdaptor.GetSTLConstContainerRef(); STLVectorType destination; @@ -116,7 +116,7 @@ itkSTLContainerAdaptorTest(int, char *[]) std::cout << "Testing reading assignment... "; destination.assign(constTargetRef.begin(), constTargetRef.end()); - auto it = destination.begin(); + auto it = destination.begin(); VectorContainerType::ConstIterator cIter = vectorContainer->Begin(); while (it != destination.end() && cIter != vectorContainer->End()) { @@ -183,7 +183,7 @@ itkSTLContainerAdaptorTest(int, char *[]) mapContainer->Print(std::cout); { // define a local scope - AdaptorType adaptor(mapContainer); + AdaptorType adaptor(mapContainer); TargetType & targetRef = adaptor.GetSTLContainerRef(); std::cout << "Testing assignment... "; @@ -193,7 +193,7 @@ itkSTLContainerAdaptorTest(int, char *[]) targetRef[i] = mapSource[i]; } - auto it = mapSource.begin(); + auto it = mapSource.begin(); MapContainerType::ConstIterator cIter = mapContainer->Begin(); while (it != mapSource.end() && cIter != mapContainer->End()) { @@ -233,7 +233,7 @@ itkSTLContainerAdaptorTest(int, char *[]) { // define a local scope - ConstAdaptorType constAdaptor(mapContainer); + ConstAdaptorType constAdaptor(mapContainer); ConstTargetType & constTargetRef = constAdaptor.GetSTLConstContainerRef(); STLMapType destination; @@ -244,7 +244,7 @@ itkSTLContainerAdaptorTest(int, char *[]) destination[i] = constTargetRef.find(i)->second; } - auto it = destination.begin(); + auto it = destination.begin(); MapContainerType::ConstIterator cIter = mapContainer->Begin(); while (it != destination.end() && cIter != mapContainer->End()) { diff --git a/Modules/Core/Common/test/itkSTLThreadTest.cxx b/Modules/Core/Common/test/itkSTLThreadTest.cxx index ffed6b31092..7a84a13c8b5 100644 --- a/Modules/Core/Common/test/itkSTLThreadTest.cxx +++ b/Modules/Core/Common/test/itkSTLThreadTest.cxx @@ -22,8 +22,8 @@ namespace itkSTLThreadTestImpl { -static int done = 0; -static int numberOfIterations = 10; +static int done = 0; +static int numberOfIterations = 10; static std::mutex threadMutex; static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION @@ -128,9 +128,9 @@ static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION Runner(void * infoIn) { // Get the work unit id and result pointer and run the method for this work unit. - auto * info = static_cast(infoIn); + auto * info = static_cast(infoIn); const itk::ThreadIdType tnum = info->WorkUnitID; - auto * results = static_cast(info->UserData); + auto * results = static_cast(info->UserData); if (results) { results[tnum] = itkSTLThreadTestImpl::Thread(tnum); diff --git a/Modules/Core/Common/test/itkShapedImageNeighborhoodRangeGTest.cxx b/Modules/Core/Common/test/itkShapedImageNeighborhoodRangeGTest.cxx index 5616e542d29..a25d9eb81b6 100644 --- a/Modules/Core/Common/test/itkShapedImageNeighborhoodRangeGTest.cxx +++ b/Modules/Core/Common/test/itkShapedImageNeighborhoodRangeGTest.cxx @@ -51,7 +51,7 @@ template typename TImage::Pointer CreateImage(const unsigned int sizeX, const unsigned int sizeY) { - const auto image = TImage::New(); + const auto image = TImage::New(); const typename TImage::SizeType imageSize = { { sizeX, sizeY } }; image->SetRegions(imageSize); image->Allocate(); @@ -110,7 +110,7 @@ SetVectorLengthIfImageIsVectorImage(itk::VectorImage & template void SetVectorLengthIfImageIsVectorImage(itk::Image & itkNotUsed(image), - const unsigned int itkNotUsed(vectorLength)) + const unsigned int itkNotUsed(vectorLength)) { // Do not set the VectorLength. The specified image is not a VectorImage. } @@ -120,7 +120,7 @@ template typename TImage::Pointer CreateSmallImage() { - const auto image = TImage::New(); + const auto image = TImage::New(); const typename TImage::SizeType imageSize{}; image->SetRegions(imageSize); SetVectorLengthIfImageIsVectorImage(*image, 1); @@ -134,7 +134,7 @@ void ExpectRangeIsEmptyForAnEmptyContainerOfShapeOffsets() { const auto image = TImage::New(); - auto imageSize = TImage::SizeType::Filled(1); + auto imageSize = TImage::SizeType::Filled(1); image->SetRegions(imageSize); SetVectorLengthIfImageIsVectorImage(*image, 1); image->Allocate(); @@ -144,7 +144,7 @@ ExpectRangeIsEmptyForAnEmptyContainerOfShapeOffsets() using OffsetType = typename TImage::OffsetType; const std::array emptyArrayOfOffsets{ {} }; - const std::vector emptyVectorOfOffsets{}; + const std::vector emptyVectorOfOffsets{}; EXPECT_TRUE((ShapedImageNeighborhoodRange{ *image, location, emptyArrayOfOffsets }.empty())); EXPECT_TRUE((ShapedImageNeighborhoodRange{ *image, location, emptyVectorOfOffsets }.empty())); @@ -157,13 +157,13 @@ ExpectRangeIsNotEmptyForNonEmptyImageAndShapeOffsetContainer() { // First create a non-empty image: const auto image = TImage::New(); - auto imageSize = TImage::SizeType::Filled(1); + auto imageSize = TImage::SizeType::Filled(1); image->SetRegions(imageSize); SetVectorLengthIfImageIsVectorImage(*image, 1); image->Allocate(); // Then create a non-empty vector of shape offsets: - const itk::Size radius{ { 1 } }; + const itk::Size radius{ { 1 } }; const std::vector> shapeOffsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); @@ -180,11 +180,11 @@ template void ExpectCopyConstructedRangeHasSameIteratorsAsOriginal() { - const auto image = CreateSmallImage(); - const itk::Size radius{ { 1 } }; + const auto image = CreateSmallImage(); + const itk::Size radius{ { 1 } }; const std::vector> shapeOffsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); - const typename TImage::IndexType location{ {} }; + const typename TImage::IndexType location{ {} }; const ShapedImageNeighborhoodRange originalRange{ *image, location, shapeOffsets }; RangeGTestUtilities::ExpectCopyConstructedRangeHasSameIteratorsAsOriginal(originalRange); @@ -195,11 +195,11 @@ template void ExpectCopyAssignedRangeHasSameIteratorsAsOriginal() { - const auto image = CreateSmallImage(); - const itk::Size radius{ { 1 } }; + const auto image = CreateSmallImage(); + const itk::Size radius{ { 1 } }; const std::vector> shapeOffsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); - const typename TImage::IndexType location{ {} }; + const typename TImage::IndexType location{ {} }; const ShapedImageNeighborhoodRange originalRange{ *image, location, shapeOffsets }; RangeGTestUtilities::ExpectCopyAssignedRangeHasSameIteratorsAsOriginal(originalRange); @@ -210,8 +210,8 @@ template void ExpectMoveConstructedRangeHasSameIteratorsAsOriginalBeforeMove() { - const auto image = CreateSmallImage(); - const itk::Size radius{ { 1 } }; + const auto image = CreateSmallImage(); + const itk::Size radius{ { 1 } }; const std::vector> shapeOffsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); const typename TImage::IndexType location{ {} }; @@ -225,8 +225,8 @@ template void ExpectMoveAssignedRangeHasSameIteratorsAsOriginalBeforeMove() { - const auto image = CreateSmallImage(); - const itk::Size radius{ { 1 } }; + const auto image = CreateSmallImage(); + const itk::Size radius{ { 1 } }; const std::vector> shapeOffsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); const typename TImage::IndexType location{ {} }; @@ -246,14 +246,14 @@ TEST(ShapedImageNeighborhoodRange, EquivalentBeginOrEndIteratorsCompareEqual) const auto image = CreateImage(2, 3); - constexpr itk::Size radius{ {} }; - constexpr ImageType::IndexType location{ {} }; + constexpr itk::Size radius{ {} }; + constexpr ImageType::IndexType location{ {} }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); const itk::ShapedImageNeighborhoodRange range{ *image, location, offsets }; - const itk::ShapedImageNeighborhoodRange::iterator begin = range.begin(); - const itk::ShapedImageNeighborhoodRange::iterator end = range.end(); + const itk::ShapedImageNeighborhoodRange::iterator begin = range.begin(); + const itk::ShapedImageNeighborhoodRange::iterator end = range.end(); const itk::ShapedImageNeighborhoodRange::const_iterator cbegin = range.cbegin(); const itk::ShapedImageNeighborhoodRange::const_iterator cend = range.cend(); @@ -284,8 +284,8 @@ TEST(ShapedImageNeighborhoodRange, BeginAndEndDoNotCompareEqual) const auto image = CreateImage(2, 3); // Note that even with a radius of zero, the neighborhood still has 1 pixel. - constexpr itk::Size radius{ {} }; - constexpr ImageType::IndexType location{ {} }; + constexpr itk::Size radius{ {} }; + constexpr ImageType::IndexType location{ {} }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); const itk::ShapedImageNeighborhoodRange range{ *image, location, offsets }; @@ -302,13 +302,13 @@ TEST(ShapedImageNeighborhoodRange, IteratorConvertsToConstIterator) const auto image = CreateImage(2, 3); - constexpr itk::Size radius{ {} }; - constexpr ImageType::IndexType location{ {} }; + constexpr itk::Size radius{ {} }; + constexpr ImageType::IndexType location{ {} }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); const itk::ShapedImageNeighborhoodRange range{ *image, location, offsets }; - const itk::ShapedImageNeighborhoodRange::iterator begin = range.begin(); + const itk::ShapedImageNeighborhoodRange::iterator begin = range.begin(); const itk::ShapedImageNeighborhoodRange::const_iterator const_begin_from_begin = begin; EXPECT_EQ(const_begin_from_begin, begin); @@ -330,8 +330,8 @@ TEST(ShapedImageNeighborhoodRange, IteratorsCanBePassedToStdVectorConstructor) }; const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); - constexpr ImageType::IndexType location{ {} }; - constexpr itk::Size radius = { { 0, 1 } }; + constexpr ImageType::IndexType location{ {} }; + constexpr itk::Size radius = { { 0, 1 } }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); const itk::ShapedImageNeighborhoodRange range{ *image, location, offsets }; @@ -356,8 +356,8 @@ TEST(ShapedImageNeighborhoodRange, IteratorsCanBePassedToStdReverseCopy) }; const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); - constexpr ImageType::IndexType location{ {} }; - constexpr itk::Size radius = { { 0, 1 } }; + constexpr ImageType::IndexType location{ {} }; + constexpr itk::Size radius = { { 0, 1 } }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); const itk::ShapedImageNeighborhoodRange range{ *image, location, offsets }; @@ -401,8 +401,8 @@ TEST(ShapedImageNeighborhoodRange, IteratorsCanBePassedToStdInnerProduct) }; const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); - constexpr ImageType::IndexType location{ {} }; - constexpr itk::Size radius = { { 0, 1 } }; + constexpr ImageType::IndexType location{ {} }; + constexpr itk::Size radius = { { 0, 1 } }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); const itk::ShapedImageNeighborhoodRange range{ *image, location, offsets }; @@ -426,8 +426,8 @@ TEST(ShapedImageNeighborhoodRange, IteratorsCanBePassedToStdForEach) }; const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); - constexpr ImageType::IndexType location{ {} }; - constexpr itk::Size radius = { { 0, 1 } }; + constexpr ImageType::IndexType location{ {} }; + constexpr itk::Size radius = { { 0, 1 } }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); const itk::ShapedImageNeighborhoodRange range{ *image, location, offsets }; @@ -451,11 +451,11 @@ TEST(ShapedImageNeighborhoodRange, CanBeUsedAsExpressionOfRangeBasedForLoop) }; const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); - constexpr ImageType::IndexType location{ {} }; - constexpr itk::Size radius = { { 0, 1 } }; + constexpr ImageType::IndexType location{ {} }; + constexpr itk::Size radius = { { 0, 1 } }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); - const RangeType range{ *image, location, offsets }; + const RangeType range{ *image, location, offsets }; constexpr PixelType reference_value = 42; for (const PixelType pixel : range) @@ -496,8 +496,8 @@ TEST(ShapedImageNeighborhoodRange, DistanceBetweenIteratorsCanBeObtainedBySubtra }; const auto image = CreateImage(sizeX, sizeY); - constexpr ImageType::IndexType location{ {} }; - constexpr itk::Size radius = { { 2, 3 } }; + constexpr ImageType::IndexType location{ {} }; + constexpr itk::Size radius = { { 2, 3 } }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); const itk::ShapedImageNeighborhoodRange range{ *image, location, offsets }; @@ -531,9 +531,9 @@ TEST(ShapedImageNeighborhoodRange, IteratorRetrievesSamePixelValuesAsConstNeighb }; const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); - constexpr ImageType::IndexType initialLocation{ {} }; - constexpr ImageType::IndexType testLocations[] = { { {} }, { { 0, 1 } }, { { 1, 0 } } }; - constexpr itk::Size radius = { { 2, 3 } }; + constexpr ImageType::IndexType initialLocation{ {} }; + constexpr ImageType::IndexType testLocations[] = { { {} }, { { 0, 1 } }, { { 1, 0 } } }; + constexpr itk::Size radius = { { 2, 3 } }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); itk::ShapedImageNeighborhoodRange range{ *image, initialLocation, offsets }; @@ -569,15 +569,15 @@ TEST(ShapedImageNeighborhoodRange, IteratorReferenceActsLikeARealReference) const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); using RangeType = itk::ShapedImageNeighborhoodRange; - constexpr ImageType::IndexType location = { { 1, 0 } }; - constexpr itk::Size radius = { { 1, 0 } }; + constexpr ImageType::IndexType location = { { 1, 0 } }; + constexpr itk::Size radius = { { 1, 0 } }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); - const RangeType range{ *image, location, offsets }; + const RangeType range{ *image, location, offsets }; RangeType::iterator it = range.begin(); - RangeType::iterator::reference reference1 = *it; - RangeType::iterator::reference reference2 = *(++it); + RangeType::iterator::reference reference1 = *it; + RangeType::iterator::reference reference2 = *(++it); const RangeType::const_iterator::reference reference3 = *(++it); EXPECT_EQ(reference1, 1); EXPECT_EQ(reference2, 2); @@ -621,7 +621,7 @@ TEST(ShapedImageNeighborhoodRange, SupportsVectorImage) sizeY = 11, sizeZ = 3 }; - const auto image = ImageType::New(); + const auto image = ImageType::New(); constexpr typename ImageType::SizeType imageSize = { { sizeX, sizeY, sizeZ } }; image->SetRegions(imageSize); image->SetVectorLength(vectorLength); @@ -630,8 +630,8 @@ TEST(ShapedImageNeighborhoodRange, SupportsVectorImage) fillPixelValue.Fill(42); image->FillBuffer(fillPixelValue); - constexpr ImageType::IndexType location = { { 0, 1 } }; - constexpr itk::Size radius = { { 0, 1 } }; + constexpr ImageType::IndexType location = { { 0, 1 } }; + constexpr itk::Size radius = { { 0, 1 } }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); @@ -648,7 +648,7 @@ TEST(ShapedImageNeighborhoodRange, SupportsVectorImage) image->SetPixel({ {} }, otherPixelValue); RangeType::const_iterator it = range.begin(); - const PixelType firstPixelValueFromRange = *it; + const PixelType firstPixelValueFromRange = *it; EXPECT_EQ(firstPixelValueFromRange, otherPixelValue); ++it; const PixelType secondPixelValueFromRange = *it; @@ -667,8 +667,8 @@ TEST(ShapedImageNeighborhoodRange, IteratorsCanBePassedToStdSort) }; const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); - constexpr ImageType::IndexType location{ { 1, 1 } }; - constexpr itk::Size radius = { { 1, 1 } }; + constexpr ImageType::IndexType location{ { 1, 1 } }; + constexpr itk::Size radius = { { 1, 1 } }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); const itk::ShapedImageNeighborhoodRange range{ *image, location, offsets }; @@ -702,8 +702,8 @@ TEST(ShapedImageNeighborhoodRange, IteratorsCanBePassedToStdNthElement) }; const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); - constexpr ImageType::IndexType location{ { 1, 1 } }; - constexpr itk::Size radius = { { 1, 1 } }; + constexpr ImageType::IndexType location{ { 1, 1 } }; + constexpr itk::Size radius = { { 1, 1 } }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); const itk::ShapedImageNeighborhoodRange range{ *image, location, offsets }; @@ -745,8 +745,8 @@ TEST(ShapedImageNeighborhoodRange, IteratorsSupportRandomAccess) }; const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); - constexpr ImageType::IndexType location{ { 1, 1 } }; - constexpr itk::Size radius = { { 1, 1 } }; + constexpr ImageType::IndexType location{ { 1, 1 } }; + constexpr itk::Size radius = { { 1, 1 } }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); const RangeType range{ *image, location, offsets }; @@ -762,8 +762,8 @@ TEST(ShapedImageNeighborhoodRange, IteratorsSupportRandomAccess) const X b = range.end(); const X initialIterator = range.begin(); - X mutableIterator = initialIterator; - X & r = mutableIterator; + X mutableIterator = initialIterator; + X & r = mutableIterator; using difference_type = X::difference_type; using reference = X::reference; @@ -876,8 +876,8 @@ TEST(ShapedImageNeighborhoodRange, SupportsSubscript) }; const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); - constexpr ImageType::IndexType location{ { 1, 1 } }; - constexpr itk::Size radius = { { 1, 1 } }; + constexpr ImageType::IndexType location{ { 1, 1 } }; + constexpr itk::Size radius = { { 1, 1 } }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); const RangeType range{ *image, location, offsets }; @@ -907,8 +907,8 @@ TEST(ShapedImageNeighborhoodRange, ProvidesReverseIterators) }; const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(sizeX, sizeY); - constexpr ImageType::IndexType location{ {} }; - constexpr itk::Size radius = { { 0, 1 } }; + constexpr ImageType::IndexType location{ {} }; + constexpr itk::Size radius = { { 0, 1 } }; const std::vector> offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); const RangeType range{ *image, location, offsets }; @@ -927,8 +927,8 @@ TEST(ShapedImageNeighborhoodRange, ProvidesReverseIterators) const RangeType::const_reverse_iterator crbegin = range.crbegin(); const RangeType::const_reverse_iterator crend = range.crend(); - const RangeType::reverse_iterator rbegin = range.rbegin(); - const RangeType::reverse_iterator rend = range.rend(); + const RangeType::reverse_iterator rbegin = range.rbegin(); + const RangeType::reverse_iterator rend = range.rend(); EXPECT_EQ(crbegin, rbegin); EXPECT_EQ(crend, rend); @@ -953,7 +953,7 @@ TEST(ShapedImageNeighborhoodRange, ConstructorSupportsRValueShapeOffsets) using RangeType = itk::ShapedImageNeighborhoodRange; using OffsetType = ImageType::OffsetType; - const auto image = CreateImage(1, 2); + const auto image = CreateImage(1, 2); constexpr ImageType::IndexType location{ { 1, 1 } }; // Note that the expression 'std::vector{1}' is an rvalue. @@ -970,7 +970,7 @@ TEST(ShapedImageNeighborhoodRange, ConstructorSupportsCArrayOfShapeOffsets) using RangeType = itk::ShapedImageNeighborhoodRange; using OffsetType = ImageType::OffsetType; - const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(1, 2); + const auto image = CreateImageFilledWithSequenceOfNaturalNumbers(1, 2); constexpr ImageType::IndexType location{ { 1, 1 } }; // A rather arbitrary shape, specified by a C-array of offsets. @@ -1001,11 +1001,11 @@ TEST(ShapedImageNeighborhoodRange, SupportsArbitraryBufferedRegionIndex) // A minimal radius, and trivial shape offsets (n = 1), just for the test. constexpr itk::Size radius = { { 0 } }; - const auto offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); + const auto offsets = itk::GenerateRectangularImageNeighborhoodOffsets(radius); constexpr ImageType::IndexType zeroIndex{ { 0 } }; constexpr ImageType::IndexType arbitraryIndex{ { 10, -1 } }; - constexpr ImageType::SizeType imageSize{ { 2, 3 } }; + constexpr ImageType::SizeType imageSize{ { 2, 3 } }; const ImageType::RegionType bufferedRegion{ arbitraryIndex, imageSize }; @@ -1015,7 +1015,7 @@ TEST(ShapedImageNeighborhoodRange, SupportsArbitraryBufferedRegionIndex) // Set a 'magic value' at the begin of the buffered region. constexpr ImageType::PixelType magicPixelValue = 42; - ImageType::PixelType * const bufferPointer = image->GetBufferPointer(); + ImageType::PixelType * const bufferPointer = image->GetBufferPointer(); *bufferPointer = magicPixelValue; RangeType range{ *image, zeroIndex, offsets }; diff --git a/Modules/Core/Common/test/itkShapedNeighborhoodIteratorTest.cxx b/Modules/Core/Common/test/itkShapedNeighborhoodIteratorTest.cxx index 23ccc1b8a5c..093cfb6ca7b 100644 --- a/Modules/Core/Common/test/itkShapedNeighborhoodIteratorTest.cxx +++ b/Modules/Core/Common/test/itkShapedNeighborhoodIteratorTest.cxx @@ -24,7 +24,7 @@ int itkShapedNeighborhoodIteratorTest(int, char *[]) { - const TestImageType::Pointer img = GetTestImage(10, 10, 5, 3); + const TestImageType::Pointer img = GetTestImage(10, 10, 5, 3); itk::ShapedNeighborhoodIterator::IndexType loc; loc[0] = 4; loc[1] = 4; @@ -37,8 +37,8 @@ itkShapedNeighborhoodIteratorTest(int, char *[]) // region over which the iterator is defined itk::ShapedNeighborhoodIterator::RegionType reg; - itk::ShapedNeighborhoodIterator::SizeType sz; - itk::ShapedNeighborhoodIterator::IndexType idx; + itk::ShapedNeighborhoodIterator::SizeType sz; + itk::ShapedNeighborhoodIterator::IndexType idx; idx[0] = idx[1] = idx[2] = 0; idx[3] = 1; sz[0] = sz[1] = 10; @@ -194,8 +194,8 @@ itkShapedNeighborhoodIteratorTest(int, char *[]) println("Testing interoperability with FlatStructuringElement"); using StructuringElementType = itk::FlatStructuringElement<4>; - constexpr StructuringElementType::RadiusType radius2 = StructuringElementType::RadiusType::Filled(2); - const StructuringElementType kernel = StructuringElementType::Cross(radius2); + constexpr StructuringElementType::RadiusType radius2 = StructuringElementType::RadiusType::Filled(2); + const StructuringElementType kernel = StructuringElementType::Cross(radius2); itk::ShapedNeighborhoodIterator iterator(radius2, img, img->GetBufferedRegion()); iterator.CreateActiveListFromNeighborhood(kernel); iterator.SetLocation(loc); diff --git a/Modules/Core/Common/test/itkSimpleFilterWatcherTest.cxx b/Modules/Core/Common/test/itkSimpleFilterWatcherTest.cxx index f27da3fd7a9..4726c6fd4f0 100644 --- a/Modules/Core/Common/test/itkSimpleFilterWatcherTest.cxx +++ b/Modules/Core/Common/test/itkSimpleFilterWatcherTest.cxx @@ -90,7 +90,7 @@ itkSimpleFilterWatcherTest(int, char *[]) using WatcherType = itk::SimpleFilterWatcher; using ImageType = itk::Image; using FilterType = itk::TanHelperImageFilter; - auto filter = FilterType::New(); + auto filter = FilterType::New(); const char * comment = "comment"; // Test constructor that takes a ProcessObject. diff --git a/Modules/Core/Common/test/itkSinRegularizedHeavisideStepFunctionTest1.cxx b/Modules/Core/Common/test/itkSinRegularizedHeavisideStepFunctionTest1.cxx index 9650c9a0fd7..2f094a837c9 100644 --- a/Modules/Core/Common/test/itkSinRegularizedHeavisideStepFunctionTest1.cxx +++ b/Modules/Core/Common/test/itkSinRegularizedHeavisideStepFunctionTest1.cxx @@ -55,7 +55,7 @@ itkSinRegularizedHeavisideStepFunctionTest1(int, char *[]) for (int x = minValue; x < maxValue; ++x) { - const InputType ix = x * incValue; + const InputType ix = x * incValue; const OutputType f = functionBase0->Evaluate(ix); const OutputType df = functionBase0->EvaluateDerivative(ix); std::cout << ix << ' ' << f << ' ' << df << std::endl; diff --git a/Modules/Core/Common/test/itkSizeGTest.cxx b/Modules/Core/Common/test/itkSizeGTest.cxx index d6ba8a66b2c..f724e9dda22 100644 --- a/Modules/Core/Common/test/itkSizeGTest.cxx +++ b/Modules/Core/Common/test/itkSizeGTest.cxx @@ -156,7 +156,7 @@ TEST(Size, CalculateProductOfElements) // Check at compile-time: constexpr itk::SizeValueType sizeValue{ 3 }; - constexpr auto size = itk::Size::Filled(sizeValue); + constexpr auto size = itk::Size::Filled(sizeValue); static_assert(size.CalculateProductOfElements() == itk::Math::UnsignedPower(sizeValue, dimensionConstant)); }; diff --git a/Modules/Core/Common/test/itkSliceIteratorTest.cxx b/Modules/Core/Common/test/itkSliceIteratorTest.cxx index a5cc6057c73..cb7255c2881 100644 --- a/Modules/Core/Common/test/itkSliceIteratorTest.cxx +++ b/Modules/Core/Common/test/itkSliceIteratorTest.cxx @@ -26,7 +26,7 @@ void FillRegionSequential(itk::SmartPointer> I) { itk::Size Index; - unsigned long Location[VDimension]; + unsigned long Location[VDimension]; itk::ImageRegionIterator> data(I, I->GetRequestedRegion()); @@ -42,7 +42,7 @@ FillRegionSequential(itk::SmartPointer> I) for (unsigned int i = 0; i < ArrayLength; ++i, ++data) { - TPixelType value = 0; + TPixelType value = 0; unsigned int mult = 1; for (unsigned int iDim = 0; iDim < VDimension; ++iDim, mult *= 10) { @@ -51,7 +51,7 @@ FillRegionSequential(itk::SmartPointer> I) data.Set(value); unsigned int iDim = VDimension - 1; - bool done = false; + bool done = false; while (!done) { ++Location[iDim]; @@ -101,7 +101,7 @@ PrintRegion(itk::SmartPointer> I) std::cout << iter.Get() << ' '; unsigned int iDim = VDimension - 1; - bool done = false; + bool done = false; while (!done) { ++Location[iDim]; @@ -147,18 +147,18 @@ itkSliceIteratorTest(int, char *[]) try { itk::ImageRegion<2> reg; - itk::Size<2> hoodRadius; - itk::Size<2> imgSize; - itk::Index<2> zeroIndex; + itk::Size<2> hoodRadius; + itk::Size<2> imgSize; + itk::Index<2> zeroIndex; zeroIndex[0] = zeroIndex[1] = 0; imgSize[0] = imgSize[1] = 20; hoodRadius[0] = hoodRadius[1] = 2; reg.SetIndex(zeroIndex); reg.SetSize(imgSize); - const std::slice hslice(10, 5, 1); // slice through the horizontal center - const std::slice vslice(2, 5, 5); // slice through the vertical center - itk::Neighborhood temp; + const std::slice hslice(10, 5, 1); // slice through the horizontal center + const std::slice vslice(2, 5, 5); // slice through the vertical center + itk::Neighborhood temp; const itk::SliceIterator> hnsi(&temp, hslice); const itk::SliceIterator> vnsi(&temp, vslice); const itk::ConstSliceIterator> hnsi2(&temp, hslice); diff --git a/Modules/Core/Common/test/itkSmartPointerGTest.cxx b/Modules/Core/Common/test/itkSmartPointerGTest.cxx index 9f7c8ab9f73..7b3f5462c82 100644 --- a/Modules/Core/Common/test/itkSmartPointerGTest.cxx +++ b/Modules/Core/Common/test/itkSmartPointerGTest.cxx @@ -151,8 +151,8 @@ TEST(SmartPointer, EmptyAndNull) // EXPECT_TRUE( 0 == ptr ); // Exercise pointer assignment - auto p1 = Derived2::New(); - const Derived2::Pointer p2 = p1; + auto p1 = Derived2::New(); + const Derived2::Pointer p2 = p1; const Derived2::ConstPointer cp1 = p1; const Derived2::ConstPointer cp2(p1); const Derived2::ConstPointer cp3{ p1 }; @@ -179,7 +179,7 @@ TEST(SmartPointer, Converting) EXPECT_TRUE(cd1ptr.GetPointer() == d1ptr.GetPointer()); EXPECT_TRUE(cd1ptr == d1ptr); - BasePointer ptr(d1ptr); + BasePointer ptr(d1ptr); const ConstBasePointer cptr1(d1ptr); const ConstBasePointer cptr2(cd1ptr); diff --git a/Modules/Core/Common/test/itkSobelOperatorImageConvolutionTest.cxx b/Modules/Core/Common/test/itkSobelOperatorImageConvolutionTest.cxx index 119048cb4ec..792da35aaa5 100644 --- a/Modules/Core/Common/test/itkSobelOperatorImageConvolutionTest.cxx +++ b/Modules/Core/Common/test/itkSobelOperatorImageConvolutionTest.cxx @@ -32,8 +32,8 @@ MakeOnes3x3Image() { typename ImageType::Pointer onesImage = ImageType::New(); { - const typename ImageType::SizeType smallest_size{ { 3, 3 } }; - const typename ImageType::IndexType start_index{ { 0, 0 } }; + const typename ImageType::SizeType smallest_size{ { 3, 3 } }; + const typename ImageType::IndexType start_index{ { 0, 0 } }; const typename ImageType::RegionType my_region(start_index, smallest_size); onesImage->SetRegions(my_region); } @@ -67,7 +67,7 @@ DoConvolution(typename ImageType::Pointer inputImage, unsigned long int directio outputImage->SetRegions(inputImage->GetRequestedRegion()); outputImage->AllocateInitialized(); - IteratorType out(outputImage, inputImage->GetRequestedRegion()); + IteratorType out(outputImage, inputImage->GetRequestedRegion()); const itk::NeighborhoodInnerProduct innerProduct; for (it.GoToBegin(), out.GoToBegin(); !it.IsAtEnd(); ++it, ++out) { @@ -108,7 +108,7 @@ itkSobelOperatorImageConvolutionTest(int argc, char * argv[]) return EXIT_FAILURE; } const auto direction = std::stoul(argv[2]); - int return_status = EXIT_SUCCESS; + int return_status = EXIT_SUCCESS; constexpr unsigned int Dimension = 2; /* Sanity Checking For Sobel Operator */ diff --git a/Modules/Core/Common/test/itkSparseFieldLayerTest.cxx b/Modules/Core/Common/test/itkSparseFieldLayerTest.cxx index 6cc938a0625..5f404302781 100644 --- a/Modules/Core/Common/test/itkSparseFieldLayerTest.cxx +++ b/Modules/Core/Common/test/itkSparseFieldLayerTest.cxx @@ -23,8 +23,8 @@ struct node_type { unsigned int value; - node_type * Next; - node_type * Previous; + node_type * Next; + node_type * Previous; }; @@ -63,7 +63,7 @@ itkSparseFieldLayerTest(int, char *[]) { itk::SparseFieldLayer::ConstIterator cit = layer->Begin(); - unsigned int i = 3999; + unsigned int i = 3999; while (cit != layer->End()) { if (cit->value != i || cit->value != i) diff --git a/Modules/Core/Common/test/itkSparseImageTest.cxx b/Modules/Core/Common/test/itkSparseImageTest.cxx index 595e7d68289..6b77c03cf90 100644 --- a/Modules/Core/Common/test/itkSparseImageTest.cxx +++ b/Modules/Core/Common/test/itkSparseImageTest.cxx @@ -30,8 +30,8 @@ class NodeClass public: using ImageType = TImageType; using IndexType = typename ImageType::IndexType; - int m_Value; - IndexType m_Index; + int m_Value; + IndexType m_Index; NodeClass * Next; NodeClass * Previous; }; @@ -46,9 +46,9 @@ itkSparseImageTest(int, char *[]) using SparseImageType = itk::SparseImage; using ImageType = SparseImageType::Superclass; - auto im = SparseImageType::New(); - ImageType::RegionType r; - constexpr ImageType::SizeType sz = { { 24, 24 } }; + auto im = SparseImageType::New(); + ImageType::RegionType r; + constexpr ImageType::SizeType sz = { { 24, 24 } }; constexpr ImageType::IndexType idx = { { 0, 0 } }; r.SetSize(sz); r.SetIndex(idx); @@ -57,7 +57,7 @@ itkSparseImageTest(int, char *[]) im->Allocate(); - int cnt = 0; + int cnt = 0; ImageType::IndexType index; for (index[0] = 0; index[0] < 24; ++index[0]) for (index[1] = 0; index[1] < 24; ++index[1]) diff --git a/Modules/Core/Common/test/itkSpatialOrientationAdaptorGTest.cxx b/Modules/Core/Common/test/itkSpatialOrientationAdaptorGTest.cxx index fa6c5629e3d..bf383b12a6e 100644 --- a/Modules/Core/Common/test/itkSpatialOrientationAdaptorGTest.cxx +++ b/Modules/Core/Common/test/itkSpatialOrientationAdaptorGTest.cxx @@ -37,7 +37,7 @@ TEST(SpatialOrientationAdaptor, test1) constexpr itk::SpacePrecisionType data[] = { 0.5986634407395047, 0.22716302314740483, -0.768113953548866, 0.5627936241740271, 0.563067040943212, 0.6051601804419384, 0.5699696670095713, -0.794576911518317, 0.20924175102261847 }; - const DirectionType d2{ DirectionType::InternalMatrixType{ data } }; + const DirectionType d2{ DirectionType::InternalMatrixType{ data } }; EXPECT_EQ(itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_ASL, adapter.FromDirectionCosines(d2)); } diff --git a/Modules/Core/Common/test/itkStdStreamStateSaveTest.cxx b/Modules/Core/Common/test/itkStdStreamStateSaveTest.cxx index 787553a2e5e..ea70da80a0e 100644 --- a/Modules/Core/Common/test/itkStdStreamStateSaveTest.cxx +++ b/Modules/Core/Common/test/itkStdStreamStateSaveTest.cxx @@ -29,9 +29,9 @@ itkStdStreamStateSaveTest(int, char *[]) std::cout.fill(' '); // Get the state for each format state variable for std::cout - const std::streamsize defaultPrecision = std::cout.precision(); - const std::streamsize defaultWidth = std::cout.width(); - const char defaultFill = std::cout.fill(); + const std::streamsize defaultPrecision = std::cout.precision(); + const std::streamsize defaultWidth = std::cout.width(); + const char defaultFill = std::cout.fill(); const std::ios_base::fmtflags defaultFlags = std::cout.flags(); { diff --git a/Modules/Core/Common/test/itkStreamingImageFilterTest.cxx b/Modules/Core/Common/test/itkStreamingImageFilterTest.cxx index e5b0c2e3ce9..df07c81632d 100644 --- a/Modules/Core/Common/test/itkStreamingImageFilterTest.cxx +++ b/Modules/Core/Common/test/itkStreamingImageFilterTest.cxx @@ -35,8 +35,8 @@ itkStreamingImageFilterTest(int, char *[]) // fill in an image constexpr ShortImage::IndexType index = { { 0, 0 } }; - constexpr ShortImage::SizeType size = { { 80, 122 } }; - const ShortImage::RegionType region{ index, size }; + constexpr ShortImage::SizeType size = { { 80, 122 } }; + const ShortImage::RegionType region{ index, size }; if2->SetLargestPossibleRegion(region); if2->SetBufferedRegion(region); if2->Allocate(); diff --git a/Modules/Core/Common/test/itkStreamingImageFilterTest2.cxx b/Modules/Core/Common/test/itkStreamingImageFilterTest2.cxx index c69026dd734..566eab4dfba 100644 --- a/Modules/Core/Common/test/itkStreamingImageFilterTest2.cxx +++ b/Modules/Core/Common/test/itkStreamingImageFilterTest2.cxx @@ -28,7 +28,7 @@ int itkStreamingImageFilterTest2(int, char *[]) { - constexpr unsigned int numberOfStreamDivisions = 25; + constexpr unsigned int numberOfStreamDivisions = 25; const itk::XMLFileOutputWindow::Pointer logger = itk::XMLFileOutputWindow::New(); logger->SetInstance(logger); @@ -40,8 +40,8 @@ itkStreamingImageFilterTest2(int, char *[]) // fill in an image constexpr ShortImage::IndexType index = { { 0, 0 } }; - constexpr ShortImage::SizeType size = { { 42, 64 } }; - const ShortImage::RegionType region{ index, size }; + constexpr ShortImage::SizeType size = { { 42, 64 } }; + const ShortImage::RegionType region{ index, size }; if2->SetLargestPossibleRegion(region); if2->SetBufferedRegion(region); if2->Allocate(); diff --git a/Modules/Core/Common/test/itkStreamingImageFilterTest3.cxx b/Modules/Core/Common/test/itkStreamingImageFilterTest3.cxx index 5ea99b3d025..6bd917fdf89 100644 --- a/Modules/Core/Common/test/itkStreamingImageFilterTest3.cxx +++ b/Modules/Core/Common/test/itkStreamingImageFilterTest3.cxx @@ -37,8 +37,8 @@ itkStreamingImageFilterTest3(int argc, char * argv[]) return EXIT_FAILURE; } - const std::string inputFilename = argv[1]; - const std::string outputFilename = argv[2]; + const std::string inputFilename = argv[1]; + const std::string outputFilename = argv[2]; const unsigned int numberOfStreamDivisions = std::stoi(argv[3]); using PixelType = unsigned char; diff --git a/Modules/Core/Common/test/itkSymmetricEigenAnalysisTest.cxx b/Modules/Core/Common/test/itkSymmetricEigenAnalysisTest.cxx index 0f1a264d5cf..ae826a39a1c 100644 --- a/Modules/Core/Common/test/itkSymmetricEigenAnalysisTest.cxx +++ b/Modules/Core/Common/test/itkSymmetricEigenAnalysisTest.cxx @@ -82,9 +82,9 @@ itkSymmetricEigenAnalysisTest(int argc, char * argv[]) -2.4446, 3.6702, -0.2282, -1.6045, 3.9419, 2.5821, 20.2380, -0.2282, 28.6779, 3.9419, 2.5821, 44.0636, }; - const InputMatrixType S(Sdata, 6, 6); - EigenValuesArrayType eigenvalues; - EigenVectorMatrixType eigenvectors; + const InputMatrixType S(Sdata, 6, 6); + EigenValuesArrayType eigenvalues; + EigenVectorMatrixType eigenvectors; SymmetricEigenAnalysisType symmetricEigenSystem(6); for (unsigned int useEigenLibrary = testUseEigenLibraryIndices[0]; useEigenLibrary < testUseEigenLibraryIndices[1]; ++useEigenLibrary) @@ -146,8 +146,8 @@ itkSymmetricEigenAnalysisTest(int argc, char * argv[]) } } - EigenValuesArrayType eigenvalues; - EigenVectorMatrixType eigenvectors; + EigenValuesArrayType eigenvalues; + EigenVectorMatrixType eigenvectors; SymmetricEigenAnalysisType symmetricEigenSystem(6); for (unsigned int useEigenLibrary = testUseEigenLibraryIndices[0]; useEigenLibrary < testUseEigenLibraryIndices[1]; ++useEigenLibrary) @@ -209,8 +209,8 @@ itkSymmetricEigenAnalysisTest(int argc, char * argv[]) } } - EigenValuesArrayType eigenvalues; - EigenVectorMatrixType eigenvectors; + EigenValuesArrayType eigenvalues; + EigenVectorMatrixType eigenvectors; constexpr SymmetricEigenAnalysisType symmetricEigenSystem; std::cout << "UseEigenLibrary with FixedDimension " << std::endl; symmetricEigenSystem.ComputeEigenValuesAndVectors(S, eigenvalues, eigenvectors); @@ -267,8 +267,8 @@ itkSymmetricEigenAnalysisTest(int argc, char * argv[]) } } - EigenValuesArrayType eigenvalues; - EigenVectorMatrixType eigenvectors; + EigenValuesArrayType eigenvalues; + EigenVectorMatrixType eigenvectors; SymmetricEigenAnalysisType symmetricEigenSystem(6); for (unsigned int useEigenLibrary = testUseEigenLibraryIndices[0]; useEigenLibrary < testUseEigenLibraryIndices[1]; ++useEigenLibrary) @@ -327,8 +327,8 @@ itkSymmetricEigenAnalysisTest(int argc, char * argv[]) } } - EigenValuesArrayType eigenvalues; - EigenVectorMatrixType eigenvectors; + EigenValuesArrayType eigenvalues; + EigenVectorMatrixType eigenvectors; SymmetricEigenAnalysisType symmetricEigenSystem(3); for (unsigned int useEigenLibrary = testUseEigenLibraryIndices[0]; useEigenLibrary < testUseEigenLibraryIndices[1]; ++useEigenLibrary) @@ -388,8 +388,8 @@ itkSymmetricEigenAnalysisTest(int argc, char * argv[]) } } - EigenValuesArrayType eigenvalues; - EigenVectorMatrixType eigenvectors; + EigenValuesArrayType eigenvalues; + EigenVectorMatrixType eigenvectors; SymmetricEigenAnalysisType symmetricEigenSystem(3); for (unsigned int useEigenLibrary = testUseEigenLibraryIndices[0]; useEigenLibrary < testUseEigenLibraryIndices[1]; ++useEigenLibrary) diff --git a/Modules/Core/Common/test/itkSymmetricEllipsoidInteriorExteriorSpatialFunctionTest.cxx b/Modules/Core/Common/test/itkSymmetricEllipsoidInteriorExteriorSpatialFunctionTest.cxx index 00cdc1c1747..909031bdfb4 100644 --- a/Modules/Core/Common/test/itkSymmetricEllipsoidInteriorExteriorSpatialFunctionTest.cxx +++ b/Modules/Core/Common/test/itkSymmetricEllipsoidInteriorExteriorSpatialFunctionTest.cxx @@ -65,8 +65,8 @@ itkSymmetricEllipsoidInteriorExteriorSpatialFunctionTest(int, char *[]) double testPosition[dimension]; // position of a pixel in the function // doitkSymmetricEllipsoidInteriorExteriorSpatialFunctionTest - bool functionValue; // Value of pixel at a given position - int interiorPixelCounter = 0; // Count pixels inside ellipsoid + bool functionValue; // Value of pixel at a given position + int interiorPixelCounter = 0; // Count pixels inside ellipsoid for (int x = 0; x < xExtent; ++x) { diff --git a/Modules/Core/Common/test/itkSymmetricSecondRankTensorTest.cxx b/Modules/Core/Common/test/itkSymmetricSecondRankTensorTest.cxx index 8fa5e1441bc..630014f60d2 100644 --- a/Modules/Core/Common/test/itkSymmetricSecondRankTensorTest.cxx +++ b/Modules/Core/Common/test/itkSymmetricSecondRankTensorTest.cxx @@ -142,8 +142,8 @@ itkSymmetricSecondRankTensorTest(int, char *[]) auto dti = ImageType::New(); - ImageType::SizeType size; - ImageType::IndexType start; + ImageType::SizeType size; + ImageType::IndexType start; ImageType::RegionType region; size[0] = 128; @@ -219,8 +219,8 @@ itkSymmetricSecondRankTensorTest(int, char *[]) std::cout << "SymmetricTensor = " << std::endl; std::cout << tensor3D << std::endl; - Double3DTensorType::EigenValuesArrayType eigenValues; - Double3DTensorType::EigenValuesArrayType eigenValues2; + Double3DTensorType::EigenValuesArrayType eigenValues; + Double3DTensorType::EigenValuesArrayType eigenValues2; Double3DTensorType::EigenVectorsMatrixType eigenVectors; tensor3D.ComputeEigenAnalysis(eigenValues, eigenVectors); @@ -426,7 +426,7 @@ itkSymmetricSecondRankTensorTest(int, char *[]) tensor3D(2, 1) = 0.0; // overrides (1,2) tensor3D(2, 2) = 29.0; - auto matrix3D = itk::MakeFilled(1.0); + auto matrix3D = itk::MakeFilled(1.0); std::vector ans; ans.push_back(26); ans.push_back(23); diff --git a/Modules/Core/Common/test/itkThreadLoggerTest.cxx b/Modules/Core/Common/test/itkThreadLoggerTest.cxx index 5fe4ab6c92d..a58f68975e3 100644 --- a/Modules/Core/Common/test/itkThreadLoggerTest.cxx +++ b/Modules/Core/Common/test/itkThreadLoggerTest.cxx @@ -36,7 +36,7 @@ ThreadedGenerateLogMessages(void * arg) if (workUnitInfo) { const unsigned int workUnitID = workUnitInfo->WorkUnitID; - std::string threadPrefix; + std::string threadPrefix; { std::ostringstream msg; msg << " "; @@ -156,7 +156,7 @@ itkThreadLoggerTest(int argc, char * argv[]) std::cout << " Flushing by the ThreadLogger is synchronized." << std::endl; std::cout << "Beginning multi-threaded portion of test." << std::endl; - ThreadDataVec threadData = create_threaded_data(numWorkUnits, logger); + ThreadDataVec threadData = create_threaded_data(numWorkUnits, logger); const itk::MultiThreaderBase::Pointer threader = itk::MultiThreaderBase::New(); itk::MultiThreaderBase::SetGlobalMaximumNumberOfThreads(numWorkUnits + 10); threader->SetNumberOfWorkUnits(numWorkUnits); diff --git a/Modules/Core/Common/test/itkThreadedImageRegionPartitionerTest.cxx b/Modules/Core/Common/test/itkThreadedImageRegionPartitionerTest.cxx index 4ca65e51c22..24a1849e4a3 100644 --- a/Modules/Core/Common/test/itkThreadedImageRegionPartitionerTest.cxx +++ b/Modules/Core/Common/test/itkThreadedImageRegionPartitionerTest.cxx @@ -46,7 +46,7 @@ itkThreadedImageRegionPartitionerTest(int, char *[]) const ImageRegionType completeRegion{ index, size }; // Define the expected results - ImageRegionType expectedRegion; + ImageRegionType expectedRegion; std::vector expectedSubRegions; size[1] = 25; expectedRegion.SetIndex(index); @@ -68,7 +68,7 @@ itkThreadedImageRegionPartitionerTest(int, char *[]) expectedSubRegions.push_back(expectedRegion); constexpr itk::ThreadIdType totalThreads = 4; - ImageRegionType subRegion; + ImageRegionType subRegion; for (itk::ThreadIdType i = 0; i < totalThreads; ++i) { threadedImageRegionPartitioner->PartitionDomain(i, totalThreads, completeRegion, subRegion); diff --git a/Modules/Core/Common/test/itkThreadedIndexedContainerPartitionerTest.cxx b/Modules/Core/Common/test/itkThreadedIndexedContainerPartitionerTest.cxx index 6419d9016c2..ee9ff4408b9 100644 --- a/Modules/Core/Common/test/itkThreadedIndexedContainerPartitionerTest.cxx +++ b/Modules/Core/Common/test/itkThreadedIndexedContainerPartitionerTest.cxx @@ -110,7 +110,7 @@ class DomainThreaderAssociate int ThreadedIndexedContainerPartitionerRunTest(DomainThreaderAssociate & enclosingClass, - itk::ThreadIdType numberOfThreads, + itk::ThreadIdType numberOfThreads, const DomainThreaderAssociate::TestDomainThreader::DomainType & fullRange) { std::cout << "Testing with " << numberOfThreads << " threads and complete domain " << fullRange << " ..." @@ -148,7 +148,7 @@ ThreadedIndexedContainerPartitionerRunTest(DomainThreaderAssociate & enclosingCl /* Check the results. */ using DomainType = DomainThreaderAssociate::TestDomainThreader::DomainType; - DomainType::IndexValueType previousEndIndex = -1; + DomainType::IndexValueType previousEndIndex = -1; const std::vector domainInThreadedExecution = domainThreader->GetDomainInThreadedExecution(); for (itk::ThreadIdType i = 0; i < domainThreader->GetNumberOfWorkUnitsUsed(); ++i) { @@ -192,7 +192,7 @@ ThreadedIndexedContainerPartitionerRunTest(DomainThreaderAssociate & enclosingCl int itkThreadedIndexedContainerPartitionerTest(int, char *[]) { - DomainThreaderAssociate enclosingClass; + DomainThreaderAssociate enclosingClass; const DomainThreaderAssociate::TestDomainThreader::ConstPointer domainThreader = enclosingClass.GetDomainThreader(); /* Check # of threads */ diff --git a/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest.cxx b/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest.cxx index af708a791e3..cbf0a945bfc 100644 --- a/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest.cxx +++ b/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest.cxx @@ -123,8 +123,8 @@ class IteratorRangeDomainThreaderAssociate int ThreadedIteratorRangePartitionerRunTest( - IteratorRangeDomainThreaderAssociate & enclosingClass, - itk::ThreadIdType numberOfThreads, + IteratorRangeDomainThreaderAssociate & enclosingClass, + itk::ThreadIdType numberOfThreads, const IteratorRangeDomainThreaderAssociate::TestDomainThreader::DomainType & fullDomain) { std::cout << "Testing with " << numberOfThreads << " threads." << std::endl; @@ -208,8 +208,8 @@ ThreadedIteratorRangePartitionerRunTest( // Helper function. void -getIteratorFromIndex(const unsigned int index, - const IteratorRangeDomainThreaderAssociate::DomainContainerType & container, +getIteratorFromIndex(const unsigned int index, + const IteratorRangeDomainThreaderAssociate::DomainContainerType & container, IteratorRangeDomainThreaderAssociate::DomainContainerType::const_iterator & it) { it = container.begin(); @@ -220,9 +220,9 @@ getIteratorFromIndex(const unsigned int } void -setStartEnd(const unsigned int start, - const unsigned int end, - const IteratorRangeDomainThreaderAssociate::DomainContainerType & container, +setStartEnd(const unsigned int start, + const unsigned int end, + const IteratorRangeDomainThreaderAssociate::DomainContainerType & container, IteratorRangeDomainThreaderAssociate::TestDomainThreader::DomainType & fullDomain) { std::cout << std::endl << "From starting iterator index = " << start << " ending iterator index " << end << std::endl; @@ -239,7 +239,7 @@ setStartEnd(const unsigned int int itkThreadedIteratorRangePartitionerTest(int, char *[]) { - IteratorRangeDomainThreaderAssociate enclosingClass; + IteratorRangeDomainThreaderAssociate enclosingClass; const IteratorRangeDomainThreaderAssociate::TestDomainThreader::ConstPointer domainThreader = enclosingClass.GetDomainThreader(); diff --git a/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest2.cxx b/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest2.cxx index 699afd4ff49..df1e7bcd59c 100644 --- a/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest2.cxx +++ b/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest2.cxx @@ -126,8 +126,8 @@ class IteratorRangeDomainThreaderAssociate int ThreadedIteratorRangePartitionerRunTest( - IteratorRangeDomainThreaderAssociate & enclosingClass, - itk::ThreadIdType numberOfThreads, + IteratorRangeDomainThreaderAssociate & enclosingClass, + itk::ThreadIdType numberOfThreads, const IteratorRangeDomainThreaderAssociate::TestDomainThreader::DomainType & fullDomain) { std::cout << "Testing with " << numberOfThreads << " threads." << std::endl; @@ -165,7 +165,7 @@ ThreadedIteratorRangePartitionerRunTest( /* Check the results. */ using BorderValuesType = TestDomainThreaderType::BorderValuesType; - int previousEndIndex = -1; + int previousEndIndex = -1; const TestDomainThreaderType::DomainBorderValuesInThreadedExecutionType domainInThreadedExecution = domainThreader->GetDomainInThreadedExecution(); for (itk::ThreadIdType i = 0; i < domainThreader->GetNumberOfWorkUnitsUsed(); ++i) @@ -214,8 +214,8 @@ ThreadedIteratorRangePartitionerRunTest( // Helper function. void -getIteratorFromIndex(const unsigned int index, - IteratorRangeDomainThreaderAssociate::DomainContainerPointer container, +getIteratorFromIndex(const unsigned int index, + IteratorRangeDomainThreaderAssociate::DomainContainerPointer container, IteratorRangeDomainThreaderAssociate::DomainContainerType::ConstIterator & it) { it = container->Begin(); @@ -226,9 +226,9 @@ getIteratorFromIndex(const unsigned int } void -setStartEnd(const unsigned int start, - const unsigned int end, - IteratorRangeDomainThreaderAssociate::DomainContainerPointer container, +setStartEnd(const unsigned int start, + const unsigned int end, + IteratorRangeDomainThreaderAssociate::DomainContainerPointer container, IteratorRangeDomainThreaderAssociate::TestDomainThreader::DomainType & fullDomain) { std::cout << std::endl << "From starting iterator index = " << start << " ending iterator index " << end << std::endl; @@ -245,7 +245,7 @@ setStartEnd(const unsigned int int itkThreadedIteratorRangePartitionerTest2(int, char *[]) { - IteratorRangeDomainThreaderAssociate enclosingClass; + IteratorRangeDomainThreaderAssociate enclosingClass; const IteratorRangeDomainThreaderAssociate::TestDomainThreader::ConstPointer domainThreader = enclosingClass.GetDomainThreader(); diff --git a/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest3.cxx b/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest3.cxx index 4a871be2fec..ebd45d5b9ad 100644 --- a/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest3.cxx +++ b/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest3.cxx @@ -126,8 +126,8 @@ class IteratorRangeDomainThreaderAssociate int ThreadedIteratorRangePartitionerRunTest( - IteratorRangeDomainThreaderAssociate & enclosingClass, - itk::ThreadIdType numberOfThreads, + IteratorRangeDomainThreaderAssociate & enclosingClass, + itk::ThreadIdType numberOfThreads, const IteratorRangeDomainThreaderAssociate::TestDomainThreader::DomainType & fullDomain) { std::cout << "Testing with " << numberOfThreads << " threads." << std::endl; @@ -165,7 +165,7 @@ ThreadedIteratorRangePartitionerRunTest( /* Check the results. */ using BorderValuesType = TestDomainThreaderType::BorderValuesType; - int previousEndIndex = -1; + int previousEndIndex = -1; const TestDomainThreaderType::DomainBorderValuesInThreadedExecutionType domainInThreadedExecution = domainThreader->GetDomainInThreadedExecution(); for (itk::ThreadIdType i = 0; i < domainThreader->GetNumberOfWorkUnitsUsed(); ++i) @@ -214,8 +214,8 @@ ThreadedIteratorRangePartitionerRunTest( // Helper function. void -getIteratorFromIndex(const unsigned int index, - IteratorRangeDomainThreaderAssociate::DomainContainerPointer container, +getIteratorFromIndex(const unsigned int index, + IteratorRangeDomainThreaderAssociate::DomainContainerPointer container, IteratorRangeDomainThreaderAssociate::DomainContainerType::ConstIterator & it) { it = container->Begin(); @@ -226,9 +226,9 @@ getIteratorFromIndex(const unsigned int } void -setStartEnd(const unsigned int start, - const unsigned int end, - IteratorRangeDomainThreaderAssociate::DomainContainerPointer container, +setStartEnd(const unsigned int start, + const unsigned int end, + IteratorRangeDomainThreaderAssociate::DomainContainerPointer container, IteratorRangeDomainThreaderAssociate::TestDomainThreader::DomainType & fullDomain) { std::cout << std::endl << "From starting iterator index = " << start << " ending iterator index " << end << std::endl; @@ -245,7 +245,7 @@ setStartEnd(const unsigned int int itkThreadedIteratorRangePartitionerTest3(int, char *[]) { - IteratorRangeDomainThreaderAssociate enclosingClass; + IteratorRangeDomainThreaderAssociate enclosingClass; const IteratorRangeDomainThreaderAssociate::TestDomainThreader::ConstPointer domainThreader = enclosingClass.GetDomainThreader(); diff --git a/Modules/Core/Common/test/itkTimeProbesTest.cxx b/Modules/Core/Common/test/itkTimeProbesTest.cxx index 768f10f17f1..09d74375ddc 100644 --- a/Modules/Core/Common/test/itkTimeProbesTest.cxx +++ b/Modules/Core/Common/test/itkTimeProbesTest.cxx @@ -130,7 +130,7 @@ itkTimeProbesTest(int, char *[]) using Region3DType = itk::ImageRegion<3>; using Size3DType = Region3DType::SizeType; - Region3DType region3D; + Region3DType region3D; constexpr Size3DType size3D = { { 1000, 1000, 1000 } }; region3D.SetSize(size3D); diff --git a/Modules/Core/Common/test/itkTimeStampTest.cxx b/Modules/Core/Common/test/itkTimeStampTest.cxx index ed0c8634cdd..3b69bfc1925 100644 --- a/Modules/Core/Common/test/itkTimeStampTest.cxx +++ b/Modules/Core/Common/test/itkTimeStampTest.cxx @@ -34,7 +34,7 @@ static_assert(std::is_trivially_destructible_v, "Check TimeStamp struct TimeStampTestHelper { std::vector timestamps; - std::vector counters; + std::vector counters; }; ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION diff --git a/Modules/Core/Common/test/itkVNLRoundProfileTest1.cxx b/Modules/Core/Common/test/itkVNLRoundProfileTest1.cxx index f17f16480f6..65af635f609 100644 --- a/Modules/Core/Common/test/itkVNLRoundProfileTest1.cxx +++ b/Modules/Core/Common/test/itkVNLRoundProfileTest1.cxx @@ -198,7 +198,7 @@ itkVNLRoundProfileTest1(int, char *[]) // // Now test the correctness of the output // - auto inpItr = input.begin(); + auto inpItr = input.begin(); const auto inputEnd = input.end(); auto outItr1 = output1.begin(); diff --git a/Modules/Core/Common/test/itkVariableLengthVectorTest.cxx b/Modules/Core/Common/test/itkVariableLengthVectorTest.cxx index bba1808a8c0..c6b2ab48065 100644 --- a/Modules/Core/Common/test/itkVariableLengthVectorTest.cxx +++ b/Modules/Core/Common/test/itkVariableLengthVectorTest.cxx @@ -398,7 +398,7 @@ itkVariableLengthVectorTest(int, char *[]) { // Testing empty vectors - FloatVariableLengthVectorType v1{}; + FloatVariableLengthVectorType v1{}; const FloatVariableLengthVectorType v2 = v1; v1 = v2; diff --git a/Modules/Core/Common/test/itkVectorContainerGTest.cxx b/Modules/Core/Common/test/itkVectorContainerGTest.cxx index 14599d35351..3a0c967d34b 100644 --- a/Modules/Core/Common/test/itkVectorContainerGTest.cxx +++ b/Modules/Core/Common/test/itkVectorContainerGTest.cxx @@ -110,7 +110,7 @@ TEST(VectorContainer, Make) const auto checkMove = [](auto stdVector) { const auto * const originalData = stdVector.data(); - const auto vectorContainer = itk::MakeVectorContainer(std::move(stdVector)); + const auto vectorContainer = itk::MakeVectorContainer(std::move(stdVector)); // After the "move", the vectorContainer should hold the original data pointer. ASSERT_NE(vectorContainer, nullptr); diff --git a/Modules/Core/Common/test/itkVectorGeometryTest.cxx b/Modules/Core/Common/test/itkVectorGeometryTest.cxx index b3820457865..4dd4c9cee7d 100644 --- a/Modules/Core/Common/test/itkVectorGeometryTest.cxx +++ b/Modules/Core/Common/test/itkVectorGeometryTest.cxx @@ -128,7 +128,7 @@ itkVectorGeometryTest(int, char *[]) } // Test the const version that returns an vnl_vector - const VectorType vf(va); + const VectorType vf(va); vnl_vector vnlVector2 = vf.GetVnlVector(); { std::cout << "vnl_vector = va "; diff --git a/Modules/Core/Common/test/itkVectorMultiplyTest.cxx b/Modules/Core/Common/test/itkVectorMultiplyTest.cxx index af28af7cfb5..bb9e065b46d 100644 --- a/Modules/Core/Common/test/itkVectorMultiplyTest.cxx +++ b/Modules/Core/Common/test/itkVectorMultiplyTest.cxx @@ -28,7 +28,7 @@ itkVectorMultiplyTest(int, char *[]) size[0] = size[1] = size[2] = 2; VecImageType::Pointer images[2]; - auto mult = MultFilterType::New(); + auto mult = MultFilterType::New(); for (unsigned int i = 0; i < 2; ++i) { images[i] = VecImageType::New(); diff --git a/Modules/Core/Common/test/itkVectorTest.cxx b/Modules/Core/Common/test/itkVectorTest.cxx index cb0c3674212..d3525393cac 100644 --- a/Modules/Core/Common/test/itkVectorTest.cxx +++ b/Modules/Core/Common/test/itkVectorTest.cxx @@ -36,7 +36,7 @@ itkVectorTest(int, char *[]) using RealVector = itk::Vector; constexpr int i = 4; - Real f = 2.1; + Real f = 2.1; auto s = itk::MakeFilled(3.0); if (different(s[0], 3.0) || different(s[1], 3.0)) diff --git a/Modules/Core/Common/test/itkVersorTest.cxx b/Modules/Core/Common/test/itkVersorTest.cxx index 3190363eb39..28ac7469a9a 100644 --- a/Modules/Core/Common/test/itkVersorTest.cxx +++ b/Modules/Core/Common/test/itkVersorTest.cxx @@ -121,7 +121,7 @@ RotationMatrixToVersorTest() gamma += small_degree_steps) { const itk::Matrix MR = TestCreateRotationMatrixFromAngles(alpha, beta, gamma); - const itk::Versor VR = TestCreateRotationVersorFromAngles(alpha, beta, gamma); + const itk::Versor VR = TestCreateRotationVersorFromAngles(alpha, beta, gamma); itk::Point testPoint; testPoint[0] = -1020.27; @@ -131,8 +131,8 @@ RotationMatrixToVersorTest() itk::Versor VFROMMR; VFROMMR.Set(MR); const itk::Matrix VRMatrix = VR.GetMatrix(); - const itk::Point newMRtestPoint = (MR)*testPoint; - const itk::Point newVRtestPoint = (VRMatrix)*testPoint; + const itk::Point newMRtestPoint = (MR)*testPoint; + const itk::Point newVRtestPoint = (VRMatrix)*testPoint; const itk::Point newVRFROMMRPoint = (VFROMMR.GetMatrix()) * testPoint; const itk::Point newVRFROMMRTransformPoint = VFROMMR.Transform(testPoint); @@ -378,7 +378,7 @@ itkVersorTest(int, char *[]) qa.Set(xa, angle); VectorType::ValueType xbInit[3] = { 3.0, 7.0, 9.0 }; - VectorType xb = xbInit; + VectorType xb = xbInit; VectorType xc = qa.Transform(xb); @@ -413,7 +413,7 @@ itkVersorTest(int, char *[]) qa.Set(xa, angle); constexpr PointType::ValueType xbInit[3] = { 3.0, 7.0, 9.0 }; - PointType xb = xbInit; + PointType xb = xbInit; PointType xc = qa.Transform(xb); @@ -449,7 +449,7 @@ itkVersorTest(int, char *[]) qa.Set(xa, angle); CovariantVectorType::ValueType xbInit[3] = { 3.0, 7.0, 9.0 }; - CovariantVectorType xb = xbInit; + CovariantVectorType xb = xbInit; CovariantVectorType xc = qa.Transform(xb); @@ -514,7 +514,7 @@ itkVersorTest(int, char *[]) // First, create a known versor VectorType::ValueType x1Init[3] = { 2.5f, 1.5f, 3.5f }; - const VectorType x1 = x1Init; + const VectorType x1 = x1Init; const ValueType angle1 = std::atan(1.0) / 3.0; // 15 degrees in radians @@ -523,10 +523,10 @@ itkVersorTest(int, char *[]) // Get the components and scale them constexpr ValueType scale = 5.5; - ValueType x = v1.GetX() * scale; - ValueType y = v1.GetY() * scale; - ValueType z = v1.GetZ() * scale; - ValueType w = v1.GetW() * scale; + ValueType x = v1.GetX() * scale; + ValueType y = v1.GetY() * scale; + ValueType z = v1.GetZ() * scale; + ValueType w = v1.GetW() * scale; VersorType v2; v2.Set(x, y, z, w); @@ -587,12 +587,12 @@ itkVersorTest(int, char *[]) std::cout << "Test for Reciprocal and Conjugate Operations..."; VectorType::ValueType x1Init[3] = { 2.5f, 1.5f, 0.5f }; - VectorType x1 = x1Init; + VectorType x1 = x1Init; const ValueType angle1 = std::atan(1.0) / 3.0; // 15 degrees in radians VectorType::ValueType x2Init[3] = { 1.5f, 0.5f, 0.5f }; - VectorType x2 = x2Init; + VectorType x2 = x2Init; const ValueType angle2 = std::atan(1.0) / 1.0; // 45 degrees in radians @@ -602,7 +602,7 @@ itkVersorTest(int, char *[]) v2.Set(x2, angle2); const VersorType v2r = v2.GetReciprocal(); - VersorType unit = v2 * v2r; + VersorType unit = v2 * v2r; if (itk::Math::abs(unit.GetX()) > epsilon || itk::Math::abs(unit.GetY()) > epsilon || itk::Math::abs(unit.GetZ()) > epsilon || itk::Math::abs(unit.GetW() - 1.0) > epsilon) diff --git a/Modules/Core/Common/test/itkWeakPointerGTest.cxx b/Modules/Core/Common/test/itkWeakPointerGTest.cxx index 92ad3ad3c42..20806a618dc 100644 --- a/Modules/Core/Common/test/itkWeakPointerGTest.cxx +++ b/Modules/Core/Common/test/itkWeakPointerGTest.cxx @@ -56,7 +56,7 @@ TEST(WeakPointer, CheckNull) ASSERT_TRUE(nullPtr.IsNull()); const itk::LightObject::Pointer lightObject = itk::LightObject::New(); - const WeakPointerType ptr = lightObject.GetPointer(); + const WeakPointerType ptr = lightObject.GetPointer(); ASSERT_TRUE(ptr.IsNotNull()); } @@ -67,7 +67,7 @@ TEST(WeakPointer, CheckSerialization) std::cout << nullPtr << std::endl; const itk::LightObject::Pointer lightObject = itk::LightObject::New(); - const WeakPointerType ptr = lightObject.GetPointer(); + const WeakPointerType ptr = lightObject.GetPointer(); std::cout << ptr << std::endl; } diff --git a/Modules/Core/Common/test/itkXMLFileOutputWindowTest.cxx b/Modules/Core/Common/test/itkXMLFileOutputWindowTest.cxx index 4590a68dbad..e2c97006dd3 100644 --- a/Modules/Core/Common/test/itkXMLFileOutputWindowTest.cxx +++ b/Modules/Core/Common/test/itkXMLFileOutputWindowTest.cxx @@ -93,9 +93,9 @@ DoTestXMLFileOutputWindow(std::string currentLoggerFilename, const unsigned int logger->DisplayTag(tag); // Check the number of lines written - unsigned int numLinesRead = 0; + unsigned int numLinesRead = 0; std::ifstream in(logger->GetFileName()); - std::string line; + std::string line; while (std::getline(in, line)) { ++numLinesRead; @@ -121,8 +121,8 @@ itkXMLFileOutputWindowTest(int argc, char * argv[]) // First test with no filename given, to test autogenerating the filename constexpr unsigned int numLinesExpected = 7; - bool status = DoTestXMLFileOutputWindow("", numLinesExpected); - const std::string test1Message{ status ? "TEST ONE PASSED" : "TEST ONE FAILED" }; + bool status = DoTestXMLFileOutputWindow("", numLinesExpected); + const std::string test1Message{ status ? "TEST ONE PASSED" : "TEST ONE FAILED" }; std::cout << test1Message << "\n\n" << std::endl; // Second test writing a new file with filename given std::remove(argv[1]); diff --git a/Modules/Core/Common/test/itkZeroFluxBoundaryConditionTest.cxx b/Modules/Core/Common/test/itkZeroFluxBoundaryConditionTest.cxx index fd9e0960674..83586ae8009 100644 --- a/Modules/Core/Common/test/itkZeroFluxBoundaryConditionTest.cxx +++ b/Modules/Core/Common/test/itkZeroFluxBoundaryConditionTest.cxx @@ -124,9 +124,9 @@ itkZeroFluxBoundaryConditionTest(int, char *[]) // Test an image to cover one operator() method. auto image = ImageType::New(); - constexpr SizeType imageSize = { { 5, 5 } }; + constexpr SizeType imageSize = { { 5, 5 } }; constexpr IndexType imageIndex = { { 0, 0 } }; - const RegionType imageRegion{ imageIndex, imageSize }; + const RegionType imageRegion{ imageIndex, imageSize }; image->SetRegions(imageRegion); image->Allocate(); @@ -152,10 +152,10 @@ itkZeroFluxBoundaryConditionTest(int, char *[]) RadiusType radius; radius[0] = radius[1] = 1; - IteratorType it(radius, image, image->GetRequestedRegion()); + IteratorType it(radius, image, image->GetRequestedRegion()); VectorIteratorType vit(radius, vectorImage, vectorImage->GetRequestedRegion()); - itk::ZeroFluxNeumannBoundaryCondition bc; + itk::ZeroFluxNeumannBoundaryCondition bc; itk::ZeroFluxNeumannBoundaryCondition vbc; it.OverrideBoundaryCondition(&bc); @@ -177,7 +177,7 @@ itkZeroFluxBoundaryConditionTest(int, char *[]) RadiusType radiusTwo; radiusTwo[0] = radiusTwo[1] = 2; - IteratorType it2(radiusTwo, image, image->GetRequestedRegion()); + IteratorType it2(radiusTwo, image, image->GetRequestedRegion()); VectorIteratorType vit2(radiusTwo, vectorImage, vectorImage->GetRequestedRegion()); it2.OverrideBoundaryCondition(&bc); @@ -200,8 +200,8 @@ itkZeroFluxBoundaryConditionTest(int, char *[]) // Now test the input region calculation // Test 1 std::cout << "GetInputRequestedRegion() Test 1" << std::endl; - IndexType requestIndex{}; - auto requestSize = itk::MakeFilled(2); + IndexType requestIndex{}; + auto requestSize = itk::MakeFilled(2); RegionType requestRegion{ requestIndex, requestSize }; RegionType expectedRegion = requestRegion; diff --git a/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.h b/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.h index cb813a5777e..4c1ea924d1b 100644 --- a/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.h +++ b/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.h @@ -171,8 +171,8 @@ class ITK_TEMPLATE_EXPORT DenseFiniteDifferenceImageFilter struct DenseFDThreadStruct { DenseFiniteDifferenceImageFilter * Filter; - TimeStepType TimeStep; - std::vector TimeStepList; + TimeStepType TimeStep; + std::vector TimeStepList; BooleanStdVectorType ValidTimeStepList; }; diff --git a/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx b/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx index 59d7410a238..61b35604b43 100644 --- a/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx +++ b/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx @@ -32,7 +32,7 @@ void DenseFiniteDifferenceImageFilter::CopyInputToOutput() { const typename TInputImage::ConstPointer input = this->GetInput(); - const typename TOutputImage::Pointer output = this->GetOutput(); + const typename TOutputImage::Pointer output = this->GetOutput(); if (!input || !output) { @@ -48,7 +48,7 @@ DenseFiniteDifferenceImageFilter::CopyInputToOutput() } ImageRegionConstIterator in(input, output->GetRequestedRegion()); - ImageRegionIterator out(output, output->GetRequestedRegion()); + ImageRegionIterator out(output, output->GetRequestedRegion()); while (!out.IsAtEnd()) { @@ -106,7 +106,7 @@ DenseFiniteDifferenceImageFilter::ApplyUpdateThreader // Execute the actual method with appropriate output region // first find out how many pieces extent can be split into. // Using the SplitRequestedRegion method from itk::ImageSource. - ThreadRegionType splitRegion; + ThreadRegionType splitRegion; const ThreadIdType total = str->Filter->SplitRequestedRegion(workUnitID, workUnitCount, splitRegion); if (workUnitID < total) @@ -184,12 +184,12 @@ DenseFiniteDifferenceImageFilter::CalculateChangeThre template void DenseFiniteDifferenceImageFilter::ThreadedApplyUpdate( - const TimeStepType & dt, + const TimeStepType & dt, const ThreadRegionType & regionToProcess, ThreadIdType) { ImageRegionIterator u(m_UpdateBuffer, regionToProcess); - ImageRegionIterator o(this->GetOutput(), regionToProcess); + ImageRegionIterator o(this->GetOutput(), regionToProcess); while (!u.IsAtEnd()) { @@ -235,12 +235,12 @@ DenseFiniteDifferenceImageFilter::ThreadedCalculateCh FaceCalculatorType faceCalculator; FaceListType faceList = faceCalculator(output, regionToProcess, radius); - auto fIt = faceList.begin(); - auto fEnd = faceList.end(); + auto fIt = faceList.begin(); + auto fEnd = faceList.end(); // Process the non-boundary region. NeighborhoodIteratorType nD(radius, output, *fIt); - UpdateIteratorType nU(m_UpdateBuffer, *fIt); + UpdateIteratorType nU(m_UpdateBuffer, *fIt); nD.GoToBegin(); while (!nD.IsAtEnd()) { @@ -253,7 +253,7 @@ DenseFiniteDifferenceImageFilter::ThreadedCalculateCh for (++fIt; fIt != fEnd; ++fIt) { NeighborhoodIteratorType bD(radius, output, *fIt); - UpdateIteratorType bU(m_UpdateBuffer, *fIt); + UpdateIteratorType bU(m_UpdateBuffer, *fIt); bD.GoToBegin(); while (!bD.IsAtEnd()) diff --git a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.h b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.h index ddc80780219..c52ffa2d741 100644 --- a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.h +++ b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.h @@ -135,8 +135,8 @@ class ITK_TEMPLATE_EXPORT FiniteDifferenceFunction : public LightObject * \sa ComputeGlobalTimeStep */ virtual PixelType ComputeUpdate(const NeighborhoodType & neighborhood, - void * globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0)) = 0; + void * globalData, + const FloatOffsetType & offset = FloatOffsetType(0.0)) = 0; /** Sets the radius of the neighborhood this FiniteDifferenceFunction @@ -199,7 +199,7 @@ class ITK_TEMPLATE_EXPORT FiniteDifferenceFunction : public LightObject void PrintSelf(std::ostream & os, Indent indent) const override; - RadiusType m_Radius{}; + RadiusType m_Radius{}; PixelRealType m_ScaleCoefficients[ImageDimension]{}; }; } // end namespace itk diff --git a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.hxx b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.hxx index a67099755fe..206230f7f70 100644 --- a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.hxx +++ b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.hxx @@ -165,11 +165,11 @@ FiniteDifferenceImageFilter::GenerateInputRequestedRe template auto FiniteDifferenceImageFilter::ResolveTimeStep(const std::vector & timeStepList, - const BooleanStdVectorType & valid) const + const BooleanStdVectorType & valid) const -> TimeStepType { TimeStepType oMin{}; - bool flag = false; + bool flag = false; // grab first valid value auto t_it = timeStepList.begin(); diff --git a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.h b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.h index 72a64df7380..dd7d6b67072 100644 --- a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.h +++ b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.h @@ -196,9 +196,9 @@ class ITK_TEMPLATE_EXPORT FiniteDifferenceSparseImageFilter struct FDThreadStruct { FiniteDifferenceSparseImageFilter * Filter; - TimeStepType TimeStep; - std::vector TimeStepList; - BooleanStdVectorType ValidTimeStepList; + TimeStepType TimeStep; + std::vector TimeStepList; + BooleanStdVectorType ValidTimeStepList; }; private: diff --git a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.hxx b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.hxx index fc15ce1e4b9..4e2c769267e 100644 --- a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.hxx +++ b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.hxx @@ -31,7 +31,7 @@ FiniteDifferenceSparseImageFilter::Fini template void FiniteDifferenceSparseImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); os << indent << "PrecomputeFlag: " << m_PrecomputeFlag << std::endl; @@ -61,8 +61,8 @@ FiniteDifferenceSparseImageFilter::Init template ThreadIdType FiniteDifferenceSparseImageFilter::GetSplitRegion( - ThreadIdType i, - ThreadIdType num, + ThreadIdType i, + ThreadIdType num, ThreadRegionType & splitRegion) { splitRegion.first = m_RegionList[i].first; @@ -91,13 +91,13 @@ FiniteDifferenceSparseImageFilter::Appl { const ThreadIdType workUnitID = ((MultiThreaderBase::WorkUnitInfo *)(arg))->WorkUnitID; const ThreadIdType workUnitCount = ((MultiThreaderBase::WorkUnitInfo *)(arg))->NumberOfWorkUnits; - auto * str = (FDThreadStruct *)(((MultiThreaderBase::WorkUnitInfo *)(arg))->UserData); + auto * str = (FDThreadStruct *)(((MultiThreaderBase::WorkUnitInfo *)(arg))->UserData); // Execute the actual method with appropriate output region // first find out how many pieces extent can be split into. // Use GetSplitRegion to access partition previously computed by // the SplitRegions function in the SparseFieldLayer class. - ThreadRegionType splitRegion; + ThreadRegionType splitRegion; const ThreadIdType total = str->Filter->GetSplitRegion(workUnitID, workUnitCount, splitRegion); if (workUnitID < total) @@ -111,7 +111,7 @@ FiniteDifferenceSparseImageFilter::Appl template void FiniteDifferenceSparseImageFilter::ThreadedApplyUpdate( - const TimeStepType & dt, + const TimeStepType & dt, const ThreadRegionType & regionToProcess, ThreadIdType) { @@ -187,7 +187,7 @@ FiniteDifferenceSparseImageFilter::Calc // first find out how many pieces extent can be split into. // Use GetSplitRegion to access partition previously computed by // the SplitRegions function in the SparseFieldLayer class. - ThreadRegionType splitRegion; + ThreadRegionType splitRegion; const ThreadIdType total = str->Filter->GetSplitRegion(workUnitID, workUnitCount, splitRegion); if (workUnitID < total) @@ -213,7 +213,7 @@ FiniteDifferenceSparseImageFilter::Prec // first find out how many pieces extent can be split into. // Use GetSplitRegion to access partition previously computed by // the SplitRegions function in the SparseFieldLayer class. - ThreadRegionType splitRegion; + ThreadRegionType splitRegion; const ThreadIdType total = str->Filter->GetSplitRegion(workUnitID, workUnitCount, splitRegion); if (workUnitID < total) diff --git a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFunction.h b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFunction.h index 878df350517..029a42d4d6c 100644 --- a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFunction.h +++ b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFunction.h @@ -91,8 +91,8 @@ class ITK_TEMPLATE_EXPORT FiniteDifferenceSparseImageFunction : public FiniteDif /** The update called from the FiniteDifferenceSparseImageFilter. This function replaces the ComputeUpdate function. */ virtual NodeDataType - ComputeSparseUpdate(NeighborhoodType & neighborhood, - void * globalData, + ComputeSparseUpdate(NeighborhoodType & neighborhood, + void * globalData, const FloatOffsetType & offset = FloatOffsetType(0.0)) const = 0; /** This function provides support for a 2 step update computation that diff --git a/Modules/Core/GPUCommon/include/itkGPUContextManager.h b/Modules/Core/GPUCommon/include/itkGPUContextManager.h index a547c8d2856..1968ab383f2 100644 --- a/Modules/Core/GPUCommon/include/itkGPUContextManager.h +++ b/Modules/Core/GPUCommon/include/itkGPUContextManager.h @@ -62,9 +62,9 @@ class GPUContextManager : public LightObject GPUContextManager(); ~GPUContextManager() override; - cl_platform_id m_Platform{}; - cl_context m_Context{}; - cl_device_id * m_Devices{}; + cl_platform_id m_Platform{}; + cl_context m_Context{}; + cl_device_id * m_Devices{}; cl_command_queue * m_CommandQueue{}; // one queue per device cl_uint m_NumberOfDevices, m_NumberOfPlatforms{}; diff --git a/Modules/Core/GPUCommon/include/itkGPUImageDataManager.h b/Modules/Core/GPUCommon/include/itkGPUImageDataManager.h index 3b8e29fe291..346c172b90e 100644 --- a/Modules/Core/GPUCommon/include/itkGPUImageDataManager.h +++ b/Modules/Core/GPUCommon/include/itkGPUImageDataManager.h @@ -88,8 +88,8 @@ class ITK_TEMPLATE_EXPORT GPUImageDataManager : public GPUDataManager private: WeakPointer m_Image{}; // WeakPointer has to be used here // to avoid SmartPointer loop - int m_BufferedRegionIndex[ImageType::ImageDimension]{}; - int m_BufferedRegionSize[ImageType::ImageDimension]{}; + int m_BufferedRegionIndex[ImageType::ImageDimension]{}; + int m_BufferedRegionSize[ImageType::ImageDimension]{}; typename GPUDataManager::Pointer m_GPUBufferedRegionIndex{}; typename GPUDataManager::Pointer m_GPUBufferedRegionSize{}; }; diff --git a/Modules/Core/GPUCommon/include/itkGPUImageDataManager.hxx b/Modules/Core/GPUCommon/include/itkGPUImageDataManager.hxx index 6d7984088e6..bb03f37a359 100644 --- a/Modules/Core/GPUCommon/include/itkGPUImageDataManager.hxx +++ b/Modules/Core/GPUCommon/include/itkGPUImageDataManager.hxx @@ -33,8 +33,8 @@ GPUImageDataManager::SetImagePointer(ImageType * img) using SizeType = typename ImageType::SizeType; RegionType region = m_Image->GetBufferedRegion(); - IndexType index = region.GetIndex(); - SizeType size = region.GetSize(); + IndexType index = region.GetIndex(); + SizeType size = region.GetSize(); for (unsigned int d = 0; d < ImageDimension; ++d) { @@ -66,7 +66,7 @@ GPUImageDataManager::MakeCPUBufferUpToDate() const std::lock_guard lockGuard(m_Mutex); ModifiedTimeType gpu_time = this->GetMTime(); - TimeStamp cpu_time_stamp = m_Image->GetTimeStamp(); + TimeStamp cpu_time_stamp = m_Image->GetTimeStamp(); ModifiedTimeType cpu_time = cpu_time_stamp.GetMTime(); /* Why we check dirty flag and time stamp together? @@ -108,7 +108,7 @@ GPUImageDataManager::MakeGPUBufferUpToDate() const std::lock_guard lockGuard(m_Mutex); ModifiedTimeType gpu_time = this->GetMTime(); - TimeStamp cpu_time_stamp = m_Image->GetTimeStamp(); + TimeStamp cpu_time_stamp = m_Image->GetTimeStamp(); ModifiedTimeType cpu_time = m_Image->GetMTime(); /* Why we check dirty flag and time stamp together? diff --git a/Modules/Core/GPUCommon/include/itkGPUImageToImageFilter.hxx b/Modules/Core/GPUCommon/include/itkGPUImageToImageFilter.hxx index df57643c801..ce5a0ac162c 100644 --- a/Modules/Core/GPUCommon/include/itkGPUImageToImageFilter.hxx +++ b/Modules/Core/GPUCommon/include/itkGPUImageToImageFilter.hxx @@ -87,7 +87,7 @@ GPUImageToImageFilter::GraftOutpu template void GPUImageToImageFilter::GraftOutput( - const DataObjectIdentifierType & key, + const DataObjectIdentifierType & key, typename itk::GPUTraits::Type * output) { using GPUOutputImage = typename itk::GPUTraits::Type; diff --git a/Modules/Core/GPUCommon/include/itkGPUKernelManager.h b/Modules/Core/GPUCommon/include/itkGPUKernelManager.h index 1483e47dbfa..b22312ebaf4 100644 --- a/Modules/Core/GPUCommon/include/itkGPUKernelManager.h +++ b/Modules/Core/GPUCommon/include/itkGPUKernelManager.h @@ -48,7 +48,7 @@ class GPUKernelManager : public LightObject struct KernelArgumentList { - bool m_IsReady; + bool m_IsReady; GPUDataManager::Pointer m_GPUDataManager; }; @@ -165,14 +165,14 @@ class GPUKernelManager : public LightObject LaunchKernel1D(int kernelIdx, size_t globalWorkSize, size_t localWorkSize); bool - LaunchKernel2D(int kernelIdx, + LaunchKernel2D(int kernelIdx, size_t globalWorkSizeX, size_t globalWorkSizeY, size_t localWorkSizeX, size_t localWorkSizeY); bool - LaunchKernel3D(int kernelIdx, + LaunchKernel3D(int kernelIdx, size_t globalWorkSizeX, size_t globalWorkSizeY, size_t globalWorkSizeZ, @@ -200,9 +200,9 @@ class GPUKernelManager : public LightObject cl_program m_Program{}; GPUContextManager * m_Manager{}; - int m_CommandQueueId{}; + int m_CommandQueueId{}; - std::vector m_KernelContainer{}; + std::vector m_KernelContainer{}; std::vector> m_KernelArgumentReady{}; template diff --git a/Modules/Core/GPUCommon/include/itkGPUReduction.h b/Modules/Core/GPUCommon/include/itkGPUReduction.h index cf61add0466..d4681f83a28 100644 --- a/Modules/Core/GPUCommon/include/itkGPUReduction.h +++ b/Modules/Core/GPUCommon/include/itkGPUReduction.h @@ -87,15 +87,15 @@ class ITK_TEMPLATE_EXPORT GPUReduction : public Object CPUGenerateData(TElement * data, int size); TElement - GPUReduce(cl_int n, - int numThreads, - int numBlocks, - int maxThreads, - int maxBlocks, - int whichKernel, - bool cpuFinalReduction, - int cpuFinalThreshold, - double * dTotalTime, + GPUReduce(cl_int n, + int numThreads, + int numBlocks, + int maxThreads, + int maxBlocks, + int whichKernel, + bool cpuFinalReduction, + int cpuFinalThreshold, + double * dTotalTime, GPUDataPointer idata, GPUDataPointer odata); @@ -107,14 +107,14 @@ class ITK_TEMPLATE_EXPORT GPUReduction : public Object /** GPU kernel manager for GPUFiniteDifferenceFunction class */ GPUKernelManager::Pointer m_GPUKernelManager{}; - GPUDataPointer m_GPUDataManager{}; + GPUDataPointer m_GPUDataManager{}; /* GPU kernel handle for GPUComputeUpdate */ int m_ReduceGPUKernelHandle{}; int m_TestGPUKernelHandle{}; unsigned int m_Size{}; - bool m_SmallBlock{}; + bool m_SmallBlock{}; TElement m_GPUResult, m_CPUResult{}; }; diff --git a/Modules/Core/GPUCommon/include/itkGPUReduction.hxx b/Modules/Core/GPUCommon/include/itkGPUReduction.hxx index f8b4ee5d6fc..0a103592dcf 100644 --- a/Modules/Core/GPUCommon/include/itkGPUReduction.hxx +++ b/Modules/Core/GPUCommon/include/itkGPUReduction.hxx @@ -85,10 +85,10 @@ GPUReduction::isPow2(unsigned int x) template void -GPUReduction::GetNumBlocksAndThreads(int whichKernel, - int n, - int maxBlocks, - int maxThreads, +GPUReduction::GetNumBlocksAndThreads(int whichKernel, + int n, + int maxBlocks, + int maxThreads, int & blocks, int & threads) { @@ -188,7 +188,7 @@ GPUReduction::RandomTest() this->InitializeKernel(size); unsigned int bytes = size * sizeof(TElement); - auto * h_idata = (TElement *)malloc(bytes); + auto * h_idata = (TElement *)malloc(bytes); for (int i = 0; i < size; ++i) { @@ -244,10 +244,10 @@ GPUReduction::GPUGenerateData() // number of threads per block int maxThreads = m_SmallBlock ? 64 : 128; - int whichKernel = 6; - int maxBlocks = 64; + int whichKernel = 6; + int maxBlocks = 64; bool cpuFinalReduction = true; - int cpuFinalThreshold = 1; + int cpuFinalThreshold = 1; int numBlocks = 0; int numThreads = 0; @@ -291,15 +291,15 @@ GPUReduction::GPUGenerateData() template TElement -GPUReduction::GPUReduce(cl_int n, - int numThreads, - int numBlocks, - int itkNotUsed(maxThreads), - int itkNotUsed(maxBlocks), - int itkNotUsed(whichKernel), - bool itkNotUsed(cpuFinalReduction), - int itkNotUsed(cpuFinalThreshold), - double * itkNotUsed(dTotalTime), +GPUReduction::GPUReduce(cl_int n, + int numThreads, + int numBlocks, + int itkNotUsed(maxThreads), + int itkNotUsed(maxBlocks), + int itkNotUsed(whichKernel), + bool itkNotUsed(cpuFinalReduction), + int itkNotUsed(cpuFinalThreshold), + double * itkNotUsed(dTotalTime), GPUDataPointer idata, GPUDataPointer odata) { diff --git a/Modules/Core/GPUCommon/include/itkGPUUnaryFunctorImageFilter.hxx b/Modules/Core/GPUCommon/include/itkGPUUnaryFunctorImageFilter.hxx index be3a4b53c74..bd0b715913a 100644 --- a/Modules/Core/GPUCommon/include/itkGPUUnaryFunctorImageFilter.hxx +++ b/Modules/Core/GPUCommon/include/itkGPUUnaryFunctorImageFilter.hxx @@ -37,7 +37,7 @@ GPUUnaryFunctorImageFilter::Type; using GPUOutputImage = typename itk::GPUTraits::Type; - typename GPUInputImage::Pointer inPtr = dynamic_cast(this->ProcessObject::GetInput(0)); + typename GPUInputImage::Pointer inPtr = dynamic_cast(this->ProcessObject::GetInput(0)); typename GPUOutputImage::Pointer otPtr = dynamic_cast(this->ProcessObject::GetOutput(0)); typename GPUOutputImage::SizeType outSize = otPtr->GetLargestPossibleRegion().GetSize(); diff --git a/Modules/Core/GPUCommon/src/itkGPUKernelManager.cxx b/Modules/Core/GPUCommon/src/itkGPUKernelManager.cxx index 2e0e6d837f3..a49a163e5b3 100644 --- a/Modules/Core/GPUCommon/src/itkGPUKernelManager.cxx +++ b/Modules/Core/GPUCommon/src/itkGPUKernelManager.cxx @@ -494,7 +494,7 @@ GPUKernelManager::LaunchKernel1D(int kernelIdx, size_t globalWorkSize, size_t it } bool -GPUKernelManager::LaunchKernel2D(int kernelIdx, +GPUKernelManager::LaunchKernel2D(int kernelIdx, size_t globalWorkSizeX, size_t globalWorkSizeY, size_t itkNotUsed(localWorkSizeX), @@ -545,7 +545,7 @@ GPUKernelManager::LaunchKernel2D(int kernelIdx, } bool -GPUKernelManager::LaunchKernel3D(int kernelIdx, +GPUKernelManager::LaunchKernel3D(int kernelIdx, size_t globalWorkSizeX, size_t globalWorkSizeY, size_t globalWorkSizeZ, diff --git a/Modules/Core/GPUCommon/src/itkOpenCLUtil.cxx b/Modules/Core/GPUCommon/src/itkOpenCLUtil.cxx index 79039806872..19dd3826947 100644 --- a/Modules/Core/GPUCommon/src/itkOpenCLUtil.cxx +++ b/Modules/Core/GPUCommon/src/itkOpenCLUtil.cxx @@ -51,7 +51,7 @@ cl_device_id * OpenCLGetAvailableDevices(cl_platform_id platform, cl_device_type devType, cl_uint * numAvailableDevices) { cl_device_id * availableDevices = nullptr; - cl_uint totalNumDevices; + cl_uint totalNumDevices; // get total # of devices cl_int errid = clGetDeviceIDs(platform, devType, 0, nullptr, &totalNumDevices); @@ -100,7 +100,7 @@ OpenCLGetAvailableDevices(cl_platform_id platform, cl_device_type devType, cl_ui cl_device_id OpenCLGetMaxFlopsDev(cl_context cxGPUContext) { - size_t szParmDataBytes; + size_t szParmDataBytes; cl_device_id * cdDevices; // get the list of GPU devices associated with context @@ -195,11 +195,11 @@ OpenCLPrintDeviceInfo(cl_device_id device, bool verbose) cl_platform_id OpenCLSelectPlatform(const char * name) { - char chBuffer[1024]; - cl_uint num_platforms; + char chBuffer[1024]; + cl_uint num_platforms; cl_platform_id * clPlatformIDs; - cl_int ciErrNum; - cl_platform_id clSelectedPlatformID = nullptr; + cl_int ciErrNum; + cl_platform_id clSelectedPlatformID = nullptr; // Get OpenCL platform count ciErrNum = clGetPlatformIDs(0, nullptr, &num_platforms); @@ -334,8 +334,8 @@ OpenCLCheckError(cl_int error, const char * filename, int lineno, const char * l "CL_INVALID_GLOBAL_WORK_SIZE", }; // print error message - constexpr int errorCount = std::size(errorString); - const int index = -error; + constexpr int errorCount = std::size(errorString); + const int index = -error; std::ostringstream errorMsg; if (index >= 0 && index < errorCount) @@ -365,7 +365,7 @@ IsGPUAvailable() cl_device_type devType = CL_DEVICE_TYPE_GPU; // Get the devices - cl_uint numDevices; + cl_uint numDevices; cl_device_id * device_id = OpenCLGetAvailableDevices(platformId, devType, &numDevices); free(device_id); @@ -439,8 +439,8 @@ GetTypename(const std::type_info & intype) bool GetValidTypename(const std::type_info & intype, const std::vector & validtypes, std::string & retTypeName) { - std::string typestr = GetTypename(intype); - bool isValid = false; + std::string typestr = GetTypename(intype); + bool isValid = false; std::vector::const_iterator validPos = std::find(validtypes.begin(), validtypes.end(), typestr); if (validPos != validtypes.end()) { diff --git a/Modules/Core/GPUCommon/test/itkGPUImageTest.cxx b/Modules/Core/GPUCommon/test/itkGPUImageTest.cxx index a746eb5d472..fe8a571a595 100644 --- a/Modules/Core/GPUCommon/test/itkGPUImageTest.cxx +++ b/Modules/Core/GPUCommon/test/itkGPUImageTest.cxx @@ -153,7 +153,7 @@ itkGPUImageTest(int argc, char * argv[]) // Change Command Queue if more than one GPU device exists // otherwise, use same command queue // - unsigned int queueID = 0; + unsigned int queueID = 0; itk::GPUContextManager * contextManager = itk::GPUContextManager::GetInstance(); if (contextManager->GetNumberOfCommandQueues() >= 2) { diff --git a/Modules/Core/GPUCommon/test/itkGPUReductionTest.cxx b/Modules/Core/GPUCommon/test/itkGPUReductionTest.cxx index 55aa6107997..9e11518c4b7 100644 --- a/Modules/Core/GPUCommon/test/itkGPUReductionTest.cxx +++ b/Modules/Core/GPUCommon/test/itkGPUReductionTest.cxx @@ -44,7 +44,7 @@ itkGPUReductionTest(int argc, char * argv[]) itk::GPUReduction::Pointer summer = itk::GPUReduction::New(); summer->InitializeKernel(numPixels); unsigned int bytes = numPixels * sizeof(ElementType); - auto * h_idata = (ElementType *)malloc(bytes); + auto * h_idata = (ElementType *)malloc(bytes); for (int ii = 0; ii < numPixels; ++ii) { diff --git a/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.hxx b/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.hxx index 5a70d0bcb58..3eeb605f8a5 100644 --- a/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.hxx +++ b/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.hxx @@ -155,7 +155,7 @@ GPUDenseFiniteDifferenceImageFilterGetOutput(); TimeStepType timeStep; - void * globalData; + void * globalData; auto * df = dynamic_cast *>(this->GetDifferenceFunction().GetPointer()); diff --git a/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceFilterEnum.h b/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceFilterEnum.h index 73c2393733c..80e50f6b4f8 100644 --- a/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceFilterEnum.h +++ b/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceFilterEnum.h @@ -35,7 +35,7 @@ enum class GPUFiniteDifferenceFilterEnum : uint8_t }; /** Define how to print enumeration values */ extern ITKGPUFiniteDifference_EXPORT std::ostream & - operator<<(std::ostream & out, const GPUFiniteDifferenceFilterEnum value); +operator<<(std::ostream & out, const GPUFiniteDifferenceFilterEnum value); } // end namespace itk #endif diff --git a/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceFunction.h b/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceFunction.h index e83decaa4c1..8a9f813f387 100644 --- a/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceFunction.h +++ b/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceFunction.h @@ -88,8 +88,8 @@ class ITK_TEMPLATE_EXPORT GPUFiniteDifferenceFunction : public FiniteDifferenceF /** Empty implementation - this will not be used by GPU filters */ PixelType ComputeUpdate(const NeighborhoodType & itkNotUsed(neighborhood), - void * itkNotUsed(globalData), - const FloatOffsetType & itkNotUsed(offset) = FloatOffsetType(0.0)) override + void * itkNotUsed(globalData), + const FloatOffsetType & itkNotUsed(offset) = FloatOffsetType(0.0)) override { PixelType pix{}; return pix; diff --git a/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceImageFilter.hxx b/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceImageFilter.hxx index 9ba2e5551af..3f94804d54c 100644 --- a/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceImageFilter.hxx +++ b/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceImageFilter.hxx @@ -182,10 +182,10 @@ template ::ResolveTimeStep( const std::vector & timeStepList, - const BooleanStdVectorType & valid) const -> TimeStepType + const BooleanStdVectorType & valid) const -> TimeStepType { TimeStepType oMin{}; - bool flag = false; + bool flag = false; auto t_it = timeStepList.begin(); auto t_end = timeStepList.end(); @@ -290,7 +290,7 @@ GPUFiniteDifferenceImageFilter::I template void GPUFiniteDifferenceImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { GPUSuperclass::PrintSelf(os, indent); diff --git a/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h index 31ef3b9f1d0..c3522be7579 100644 --- a/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h @@ -405,7 +405,7 @@ class ITK_TEMPLATE_EXPORT ImageAdaptor : public ImageBase ITK_NODISCARD("Call the overload which has the point as the only parameter and returns the index") - bool TransformPhysicalPointToContinuousIndex(const Point & point, + bool TransformPhysicalPointToContinuousIndex(const Point & point, ContinuousIndex & index) const { return m_Image->TransformPhysicalPointToContinuousIndex(point, index); @@ -441,7 +441,7 @@ class ITK_TEMPLATE_EXPORT ImageAdaptor : public ImageBase void TransformContinuousIndexToPhysicalPoint(const ContinuousIndex & index, - Point & point) const + Point & point) const { m_Image->TransformContinuousIndexToPhysicalPoint(index, point); } @@ -477,7 +477,7 @@ class ITK_TEMPLATE_EXPORT ImageAdaptor : public ImageBase void TransformLocalVectorToPhysicalVector(const FixedArray & inputGradient, - FixedArray & outputGradient) const + FixedArray & outputGradient) const { m_Image->TransformLocalVectorToPhysicalVector(inputGradient, outputGradient); } @@ -494,7 +494,7 @@ class ITK_TEMPLATE_EXPORT ImageAdaptor : public ImageBase void TransformPhysicalVectorToLocalVector(const FixedArray & inputGradient, - FixedArray & outputGradient) const + FixedArray & outputGradient) const { m_Image->TransformPhysicalVectorToLocalVector(inputGradient, outputGradient); } diff --git a/Modules/Core/ImageAdaptors/test/itkComplexConjugateImageAdaptorTest.cxx b/Modules/Core/ImageAdaptors/test/itkComplexConjugateImageAdaptorTest.cxx index 9f1da4db14b..4a705c6aea2 100644 --- a/Modules/Core/ImageAdaptors/test/itkComplexConjugateImageAdaptorTest.cxx +++ b/Modules/Core/ImageAdaptors/test/itkComplexConjugateImageAdaptorTest.cxx @@ -28,7 +28,7 @@ int itkComplexConjugateImageAdaptorTest(int, char *[]) { // Create a test image. - auto image = ImageType::New(); + auto image = ImageType::New(); constexpr ImageType::SizeType size = { { 10, 10 } }; image->SetRegions(size); image->Allocate(); @@ -39,7 +39,7 @@ itkComplexConjugateImageAdaptorTest(int, char *[]) itk::ImageRegionIterator iter(image, region); for (iter.GoToBegin(); !iter.IsAtEnd(); ++iter) { - auto randMax = static_cast(RAND_MAX); + auto randMax = static_cast(RAND_MAX); const PixelType pixel(static_cast(rand()) / randMax, static_cast(rand()) / randMax); iter.Set(pixel); } @@ -51,7 +51,7 @@ itkComplexConjugateImageAdaptorTest(int, char *[]) adaptor->SetImage(image); // Iterate over the pixels and check the functioning of the adaptor. - itk::ImageRegionIterator iterA(image, region); + itk::ImageRegionIterator iterA(image, region); itk::ImageRegionIterator iterB(adaptor, region); for (iterA.GoToBegin(), iterB.GoToBegin(); !iterA.IsAtEnd(); ++iterA, ++iterB) diff --git a/Modules/Core/ImageAdaptors/test/itkImageAdaptorGTest.cxx b/Modules/Core/ImageAdaptors/test/itkImageAdaptorGTest.cxx index a7114aafe1c..acd901e0d00 100644 --- a/Modules/Core/ImageAdaptors/test/itkImageAdaptorGTest.cxx +++ b/Modules/Core/ImageAdaptors/test/itkImageAdaptorGTest.cxx @@ -63,8 +63,8 @@ Expect_same_type_and_equal_value(T1 && value1, T2 && value2) template void Expect_TransformPhysicalPoint_member_functions_return_the_same_for_ImageAdapter_as_for_image( - const itk::ImageAdaptor & imageAdaptor, - const TImage & image, + const itk::ImageAdaptor & imageAdaptor, + const TImage & image, const itk::Point & point) { Expect_same_type_and_equal_value(imageAdaptor.TransformPhysicalPointToIndex(point), @@ -79,8 +79,8 @@ Expect_TransformPhysicalPoint_member_functions_return_the_same_for_ImageAdapter_ template void Expect_TransformContinuousIndexToPhysicalPoint_returns_the_same_for_ImageAdapter_as_for_image( - const itk::ImageAdaptor & imageAdaptor, - const TImage & image, + const itk::ImageAdaptor & imageAdaptor, + const TImage & image, const itk::ContinuousIndex & continuousIndex) { Expect_same_type_and_equal_value( @@ -96,8 +96,8 @@ template void Expect_TransformIndexToPhysicalPoint_returns_the_same_for_ImageAdapter_as_for_image( const itk::ImageAdaptor & imageAdaptor, - const TImage & image, - const itk::Index & index) + const TImage & image, + const itk::Index & index) { Expect_same_type_and_equal_value(imageAdaptor.template TransformIndexToPhysicalPoint(index), image.template TransformIndexToPhysicalPoint(index)); @@ -110,8 +110,8 @@ template void Expect_TransformLocalVectorToPhysicalVector_returns_the_same_for_ImageAdapter_as_for_image( const itk::ImageAdaptor & imageAdaptor, - const TImage & image, - const TVector & localVector) + const TImage & image, + const TVector & localVector) { Expect_same_type_and_equal_value(imageAdaptor.TransformLocalVectorToPhysicalVector(localVector), image.TransformLocalVectorToPhysicalVector(localVector)); diff --git a/Modules/Core/ImageAdaptors/test/itkImageAdaptorTest.cxx b/Modules/Core/ImageAdaptors/test/itkImageAdaptorTest.cxx index 73db9ae359b..8b232494019 100644 --- a/Modules/Core/ImageAdaptors/test/itkImageAdaptorTest.cxx +++ b/Modules/Core/ImageAdaptors/test/itkImageAdaptorTest.cxx @@ -77,7 +77,7 @@ itkImageAdaptorTest(int, char *[]) // Value to initialize the pixels myImageType::PixelType::ComponentType colorInit[3] = { 1.0f, 0.5f, 0.5f }; - const myImageType::PixelType color = colorInit; + const myImageType::PixelType color = colorInit; // Initializing all the pixel in the image it1.GoToBegin(); diff --git a/Modules/Core/ImageAdaptors/test/itkNthElementPixelAccessorTest.cxx b/Modules/Core/ImageAdaptors/test/itkNthElementPixelAccessorTest.cxx index b14a7b2f9f0..0972f87240b 100644 --- a/Modules/Core/ImageAdaptors/test/itkNthElementPixelAccessorTest.cxx +++ b/Modules/Core/ImageAdaptors/test/itkNthElementPixelAccessorTest.cxx @@ -74,7 +74,7 @@ itkNthElementPixelAccessorTest(int, char *[]) // Value to initialize the pixels myImageType::PixelType::ComponentType colorInit[3] = { 1.0f, 0.5f, 0.5f }; - const myImageType::PixelType color = colorInit; + const myImageType::PixelType color = colorInit; // Initializing all the pixel in the image it1.GoToBegin(); diff --git a/Modules/Core/ImageAdaptors/test/itkVectorImageTest.cxx b/Modules/Core/ImageAdaptors/test/itkVectorImageTest.cxx index 84b6e695dcf..cc7e06758eb 100644 --- a/Modules/Core/ImageAdaptors/test/itkVectorImageTest.cxx +++ b/Modules/Core/ImageAdaptors/test/itkVectorImageTest.cxx @@ -41,10 +41,10 @@ template bool -testVectorImageAdaptor(typename TAdaptor::Pointer & vectorImageAdaptor, - const typename itk::VectorImage::Pointer & vectorImage, +testVectorImageAdaptor(typename TAdaptor::Pointer & vectorImageAdaptor, + const typename itk::VectorImage::Pointer & vectorImage, const typename itk::VectorImage::RegionType & region, - const unsigned int componentToExtract) + const unsigned int componentToExtract) { std::cout << "---------------------------------------------------------------" << std::endl; std::cout << "Testing " << typeid(TAdaptor).name(); @@ -84,10 +84,10 @@ testVectorImageAdaptor(typename TAdaptor::Pointer & { using CovariantVectorType = itk::CovariantVector; const CovariantVectorType input{ 0.0 }; - CovariantVectorType output1; + CovariantVectorType output1; vectorImageAdaptor->TransformLocalVectorToPhysicalVector(input, output1); const CovariantVectorType output2 = vectorImageAdaptor->TransformLocalVectorToPhysicalVector(input); - constexpr double diff_tolerance = 1e-13; + constexpr double diff_tolerance = 1e-13; if ((input - output1).GetSquaredNorm() > diff_tolerance || (input - output2).GetSquaredNorm() > diff_tolerance) { std::cerr << "[FAILED] "; @@ -99,10 +99,10 @@ testVectorImageAdaptor(typename TAdaptor::Pointer & { using CovariantVectorType = itk::CovariantVector; const CovariantVectorType input{ 0.0 }; - CovariantVectorType output1; + CovariantVectorType output1; vectorImageAdaptor->TransformPhysicalVectorToLocalVector(input, output1); const CovariantVectorType output2 = vectorImageAdaptor->TransformPhysicalVectorToLocalVector(input); - constexpr double diff_tolerance = 1e-13; + constexpr double diff_tolerance = 1e-13; if ((input - output1).GetSquaredNorm() > diff_tolerance || (input - output2).GetSquaredNorm() > diff_tolerance) { std::cerr << "[FAILED] "; @@ -156,9 +156,9 @@ testVectorImageBasicMethods() std::cout << "Testing Get/SetPixel methods." << std::endl; - auto image = VectorImageType::New(); + auto image = VectorImageType::New(); const typename VectorImageType::SizeType size = { { 11, 9, 7 } }; - typename VectorImageType::RegionType region; + typename VectorImageType::RegionType region; region.SetSize(size); image->SetRegions(region); image->SetNumberOfComponentsPerPixel(VectorLength); @@ -293,10 +293,10 @@ itkVectorImageTest(int, char * argv[]) itk::TimeProbe clock; clock.Start(); - auto image = VariableLengthVectorImageType::New(); + auto image = VariableLengthVectorImageType::New(); VariableLengthVectorImageType::IndexType start; - InternalPixelType f(VectorLength); - VariableLengthVectorImageType::SizeType size; + InternalPixelType f(VectorLength); + VariableLengthVectorImageType::SizeType size; for (unsigned int i = 0; i < VectorLength; ++i) { f[i] = i; @@ -337,10 +337,10 @@ itkVectorImageTest(int, char * argv[]) using InternalPixelType = itk::FixedArray; - auto image = FixedArrayImageType::New(); + auto image = FixedArrayImageType::New(); FixedArrayImageType::IndexType start; - InternalPixelType f; - FixedArrayImageType::SizeType size; + InternalPixelType f; + FixedArrayImageType::SizeType size; for (unsigned int i = 0; i < VectorLength; ++i) { f[i] = i; @@ -394,10 +394,10 @@ itkVectorImageTest(int, char * argv[]) itk::TimeProbe clock; clock.Start(); - auto vectorImage = VectorImageType::New(); - VectorImageType::IndexType start; + auto vectorImage = VectorImageType::New(); + VectorImageType::IndexType start; itk::VariableLengthVector f(VectorLength); - VectorImageType::SizeType size; + VectorImageType::SizeType size; for (unsigned int i = 0; i < VectorLength; ++i) { f[i] = i; @@ -463,8 +463,8 @@ itkVectorImageTest(int, char * argv[]) // Test with Region and Linear iterators... { // Create a small image - auto vectorImage = VectorImageType::New(); - VectorImageType::IndexType start; + auto vectorImage = VectorImageType::New(); + VectorImageType::IndexType start; itk::VariableLengthVector f(VectorLength); itk::VariableLengthVector ZeroPixel(VectorLength); ZeroPixel.Fill(PixelType{}); @@ -503,7 +503,7 @@ itkVectorImageTest(int, char * argv[]) using ConstIteratorType = itk::ImageRegionConstIterator; ConstIteratorType cit(vectorImage, vectorImage->GetBufferedRegion()); - unsigned long ctr = 0; + unsigned long ctr = 0; cit.GoToBegin(); midCtr /= 2; while (!cit.IsAtEnd()) @@ -558,7 +558,7 @@ itkVectorImageTest(int, char * argv[]) lcit.NextLine(); } - auto idx = VectorImageType::IndexType::Filled(1); + auto idx = VectorImageType::IndexType::Filled(1); LinearIteratorType lit(vectorImage, vectorImage->GetBufferedRegion()); lit.SetIndex(idx); lit.Set(f); @@ -583,10 +583,10 @@ itkVectorImageTest(int, char * argv[]) // Create an image using itk::Vector using VectorPixelType = itk::Vector; using VectorImageType = itk::Image, Dimension>; - auto image = VectorImageType::New(); + auto image = VectorImageType::New(); constexpr VectorImageType::IndexType start{}; - auto size = VectorImageType::SizeType::Filled(5); - const VectorImageType::RegionType region(start, size); + auto size = VectorImageType::SizeType::Filled(5); + const VectorImageType::RegionType region(start, size); image->SetRegions(region); image->Allocate(); @@ -710,8 +710,8 @@ itkVectorImageTest(int, char * argv[]) auto radius = itk::MakeFilled(1); ConstNeighborhoodIteratorType::RegionType region = vectorImage->GetBufferedRegion(); - auto size = ConstNeighborhoodIteratorType::SizeType::Filled(4); - auto index = ConstNeighborhoodIteratorType::IndexType::Filled(1); + auto size = ConstNeighborhoodIteratorType::SizeType::Filled(4); + auto index = ConstNeighborhoodIteratorType::IndexType::Filled(1); region.SetIndex(index); region.SetSize(size); @@ -784,7 +784,7 @@ itkVectorImageTest(int, char * argv[]) auto offset = itk::MakeFilled(1); cNit -= offset; const itk::VariableLengthVector pixel = cNit.GetCenterPixel(); - itk::VariableLengthVector correctAnswer(VectorLength); + itk::VariableLengthVector correctAnswer(VectorLength); correctAnswer.Fill(3); if (pixel != correctAnswer) { @@ -915,7 +915,7 @@ itkVectorImageTest(int, char * argv[]) cSnit.ActivateOffset(offset1); ConstShapedNeighborhoodIteratorType::IndexListType l = cSnit.GetActiveIndexList(); - auto ali = l.begin(); + auto ali = l.begin(); while (ali != l.end()) { std::cout << *ali << ' '; diff --git a/Modules/Core/ImageAdaptors/test/itkVectorImageToImageAdaptorTest.cxx b/Modules/Core/ImageAdaptors/test/itkVectorImageToImageAdaptorTest.cxx index bd485aaa369..2c0b1a897fd 100644 --- a/Modules/Core/ImageAdaptors/test/itkVectorImageToImageAdaptorTest.cxx +++ b/Modules/Core/ImageAdaptors/test/itkVectorImageToImageAdaptorTest.cxx @@ -40,10 +40,10 @@ itkVectorImageToImageAdaptorTest(int, char *[]) using VectorImageToImageAdaptorType = itk::VectorImageToImageAdaptor; // initialize a vector image - auto vectorImage = VectorImageType::New(); - VectorImageType::IndexType start; + auto vectorImage = VectorImageType::New(); + VectorImageType::IndexType start; itk::VariableLengthVector f(VectorLength); - VectorImageType::SizeType size; + VectorImageType::SizeType size; for (unsigned int i = 0; i < VectorLength; ++i) { f[i] = PixelType(i); diff --git a/Modules/Core/ImageFunction/include/itkBSplineDecompositionImageFilter.hxx b/Modules/Core/ImageFunction/include/itkBSplineDecompositionImageFilter.hxx index 2431b1cf2c7..2277c791c58 100644 --- a/Modules/Core/ImageFunction/include/itkBSplineDecompositionImageFilter.hxx +++ b/Modules/Core/ImageFunction/include/itkBSplineDecompositionImageFilter.hxx @@ -181,7 +181,7 @@ BSplineDecompositionImageFilter::SetInitialCausalCoef // Yhis initialization corresponds to mirror boundaries typename TInputImage::SizeValueType horizon = m_DataLength[m_IteratorDirection]; - double zn = z; + double zn = z; if (m_Tolerance > 0.0) { horizon = (typename TInputImage::SizeValueType)std::ceil(std::log(m_Tolerance) / std::log(itk::Math::abs(z))); @@ -201,8 +201,8 @@ BSplineDecompositionImageFilter::SetInitialCausalCoef { // Full loop const double iz = 1.0 / z; - double z2n = std::pow(z, static_cast(m_DataLength[m_IteratorDirection] - 1L)); - CoeffType sum = m_Scratch[0] + z2n * m_Scratch[m_DataLength[m_IteratorDirection] - 1L]; + double z2n = std::pow(z, static_cast(m_DataLength[m_IteratorDirection] - 1L)); + CoeffType sum = m_Scratch[0] + z2n * m_Scratch[m_DataLength[m_IteratorDirection] - 1L]; z2n *= z2n * iz; for (unsigned int n = 1; n <= (m_DataLength[m_IteratorDirection] - 2); ++n) { @@ -273,7 +273,7 @@ void BSplineDecompositionImageFilter::CopyImageToImage() { const TInputImage * const inputImage = this->GetInput(); - TOutputImage * const outputImage = this->GetOutput(); + TOutputImage * const outputImage = this->GetOutput(); ImageAlgorithm::Copy(inputImage, outputImage, inputImage->GetBufferedRegion(), outputImage->GetBufferedRegion()); } diff --git a/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.h index da26fb447bf..28f3c2792a7 100644 --- a/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.h @@ -162,7 +162,7 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolateImageFunction : public InterpolateIm { // Don't know thread information, make evaluateIndex, weights on the stack. // Slower, but safer. - vnl_matrix evaluateIndex(ImageDimension, (m_SplineOrder + 1)); + vnl_matrix evaluateIndex(ImageDimension, (m_SplineOrder + 1)); vnl_matrix weights(ImageDimension, (m_SplineOrder + 1)); // Pass evaluateIndex, weights by reference. They're only good as long @@ -202,7 +202,7 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolateImageFunction : public InterpolateIm // weightsDerivative // on the stack. // Slower, but safer. - vnl_matrix evaluateIndex(ImageDimension, (m_SplineOrder + 1)); + vnl_matrix evaluateIndex(ImageDimension, (m_SplineOrder + 1)); vnl_matrix weights(ImageDimension, (m_SplineOrder + 1)); vnl_matrix weightsDerivative(ImageDimension, (m_SplineOrder + 1)); @@ -230,10 +230,10 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolateImageFunction : public InterpolateIm } void - EvaluateValueAndDerivative(const PointType & point, - OutputType & value, + EvaluateValueAndDerivative(const PointType & point, + OutputType & value, CovariantVectorType & deriv, - ThreadIdType threadId) const + ThreadIdType threadId) const { const ContinuousIndexType index = this->GetInputImage()->template TransformPhysicalPointToContinuousIndex(point); @@ -242,14 +242,14 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolateImageFunction : public InterpolateIm void EvaluateValueAndDerivativeAtContinuousIndex(const ContinuousIndexType & x, - OutputType & value, - CovariantVectorType & deriv) const + OutputType & value, + CovariantVectorType & deriv) const { // Don't know thread information, make evaluateIndex, weights, // weightsDerivative // on the stack. // Slower, but safer. - vnl_matrix evaluateIndex(ImageDimension, (m_SplineOrder + 1)); + vnl_matrix evaluateIndex(ImageDimension, (m_SplineOrder + 1)); vnl_matrix weights(ImageDimension, (m_SplineOrder + 1)); vnl_matrix weightsDerivative(ImageDimension, (m_SplineOrder + 1)); @@ -262,9 +262,9 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolateImageFunction : public InterpolateIm void EvaluateValueAndDerivativeAtContinuousIndex(const ContinuousIndexType & x, - OutputType & value, - CovariantVectorType & derivativeValue, - ThreadIdType threadId) const + OutputType & value, + CovariantVectorType & derivativeValue, + ThreadIdType threadId) const { this->EvaluateValueAndDerivativeAtContinuousIndexInternal(x, value, @@ -331,22 +331,22 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolateImageFunction : public InterpolateIm */ virtual OutputType EvaluateAtContinuousIndexInternal(const ContinuousIndexType & x, - vnl_matrix & evaluateIndex, - vnl_matrix & weights) const; + vnl_matrix & evaluateIndex, + vnl_matrix & weights) const; virtual void EvaluateValueAndDerivativeAtContinuousIndexInternal(const ContinuousIndexType & x, - OutputType & value, - CovariantVectorType & derivativeValue, - vnl_matrix & evaluateIndex, - vnl_matrix & weights, - vnl_matrix & weightsDerivative) const; + OutputType & value, + CovariantVectorType & derivativeValue, + vnl_matrix & evaluateIndex, + vnl_matrix & weights, + vnl_matrix & weightsDerivative) const; virtual CovariantVectorType EvaluateDerivativeAtContinuousIndexInternal(const ContinuousIndexType & x, - vnl_matrix & evaluateIndex, - vnl_matrix & weights, - vnl_matrix & weightsDerivative) const; + vnl_matrix & evaluateIndex, + vnl_matrix & weights, + vnl_matrix & weightsDerivative) const; BSplineInterpolateImageFunction(); ~BSplineInterpolateImageFunction() override = default; @@ -368,16 +368,16 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolateImageFunction : public InterpolateIm /** Determines the weights for interpolation of the value x */ void SetInterpolationWeights(const ContinuousIndexType & x, - const vnl_matrix & EvaluateIndex, - vnl_matrix & weights, - unsigned int splineOrder) const; + const vnl_matrix & EvaluateIndex, + vnl_matrix & weights, + unsigned int splineOrder) const; /** Determines the weights for the derivative portion of the value x */ void SetDerivativeWeights(const ContinuousIndexType & x, - const vnl_matrix & EvaluateIndex, - vnl_matrix & weights, - unsigned int splineOrder) const; + const vnl_matrix & EvaluateIndex, + vnl_matrix & weights, + unsigned int splineOrder) const; /** Precomputation for converting the 1D index of the interpolation * neighborhood to an N-dimensional index. */ @@ -386,9 +386,9 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolateImageFunction : public InterpolateIm /** Determines the indices to use give the splines region of support */ void - DetermineRegionOfSupport(vnl_matrix & evaluateIndex, + DetermineRegionOfSupport(vnl_matrix & evaluateIndex, const ContinuousIndexType & x, - unsigned int splineOrder) const; + unsigned int splineOrder) const; /** Set the indices in evaluateIndex at the boundaries based on mirror * boundary conditions. */ @@ -413,8 +413,8 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolateImageFunction : public InterpolateIm // derivatives. bool m_UseImageDirection{ true }; - ThreadIdType m_NumberOfWorkUnits{}; - std::unique_ptr[]> m_ThreadedEvaluateIndex; + ThreadIdType m_NumberOfWorkUnits{}; + std::unique_ptr[]> m_ThreadedEvaluateIndex; std::unique_ptr[]> m_ThreadedWeights; std::unique_ptr[]> m_ThreadedWeightsDerivative; }; diff --git a/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.hxx b/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.hxx index 59277ee1715..c6175d285f1 100644 --- a/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.hxx @@ -56,7 +56,7 @@ BSplineInterpolateImageFunction::BSpl template void BSplineInterpolateImageFunction::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { using namespace print_helper; @@ -168,9 +168,9 @@ template void BSplineInterpolateImageFunction::SetInterpolationWeights( const ContinuousIndexType & x, - const vnl_matrix & EvaluateIndex, - vnl_matrix & weights, - unsigned int splineOrder) const + const vnl_matrix & EvaluateIndex, + vnl_matrix & weights, + unsigned int splineOrder) const { // For speed improvements we could make each case a separate function and use // function pointers to reference the correct weight order. @@ -279,9 +279,9 @@ template void BSplineInterpolateImageFunction::SetDerivativeWeights( const ContinuousIndexType & x, - const vnl_matrix & EvaluateIndex, - vnl_matrix & weights, - unsigned int splineOrder) const + const vnl_matrix & EvaluateIndex, + vnl_matrix & weights, + unsigned int splineOrder) const { // For speed improvements we could make each case a separate function and use // function pointers to reference the correct weight order. @@ -368,7 +368,7 @@ BSplineInterpolateImageFunction::SetD const double w = x[n] + .5 - static_cast(EvaluateIndex[n][3]); const double t2 = w * w; const double t = (1.0 / 6.0) * t2; - double w1 = 0.5 - w; + double w1 = 0.5 - w; w1 *= w1; w1 *= (1.0 / 24.0) * w1; const double t0 = w * (t - 11.0 / 24.0); @@ -421,7 +421,7 @@ BSplineInterpolateImageFunction::Gene m_PointsToIndex.resize(m_MaxNumberInterpolationPoints); for (unsigned int p = 0; p < m_MaxNumberInterpolationPoints; ++p) { - int pp = p; + int pp = p; unsigned long indexFactor[ImageDimension]; indexFactor[0] = 1; for (int j = 1; j < static_cast(ImageDimension); ++j) @@ -439,9 +439,9 @@ BSplineInterpolateImageFunction::Gene template void BSplineInterpolateImageFunction::DetermineRegionOfSupport( - vnl_matrix & evaluateIndex, + vnl_matrix & evaluateIndex, const ContinuousIndexType & x, - unsigned int splineOrder) const + unsigned int splineOrder) const { const float halfOffset = splineOrder & 1 ? 0.0 : 0.5; for (unsigned int n = 0; n < ImageDimension; ++n) @@ -458,7 +458,7 @@ template void BSplineInterpolateImageFunction::ApplyMirrorBoundaryConditions( vnl_matrix & evaluateIndex, - unsigned int splineOrder) const + unsigned int splineOrder) const { const IndexType startIndex = this->GetStartIndex(); const IndexType endIndex = this->GetEndIndex(); @@ -495,8 +495,8 @@ template auto BSplineInterpolateImageFunction::EvaluateAtContinuousIndexInternal( const ContinuousIndexType & x, - vnl_matrix & evaluateIndex, - vnl_matrix & weights) const -> OutputType + vnl_matrix & evaluateIndex, + vnl_matrix & weights) const -> OutputType { // compute the interpolation indexes this->DetermineRegionOfSupport((evaluateIndex), x, m_SplineOrder); @@ -508,7 +508,7 @@ BSplineInterpolateImageFunction::Eval this->ApplyMirrorBoundaryConditions((evaluateIndex), m_SplineOrder); // perform interpolation - double interpolated = 0.0; + double interpolated = 0.0; IndexType coefficientIndex; // Step through each point in the n-dimensional interpolation cube. for (unsigned int p = 0; p < m_MaxNumberInterpolationPoints; ++p) @@ -530,11 +530,11 @@ template void BSplineInterpolateImageFunction:: EvaluateValueAndDerivativeAtContinuousIndexInternal(const ContinuousIndexType & x, - OutputType & value, - CovariantVectorType & derivativeValue, - vnl_matrix & evaluateIndex, - vnl_matrix & weights, - vnl_matrix & weightsDerivative) const + OutputType & value, + CovariantVectorType & derivativeValue, + vnl_matrix & evaluateIndex, + vnl_matrix & weights, + vnl_matrix & weightsDerivative) const { this->DetermineRegionOfSupport((evaluateIndex), x, m_SplineOrder); @@ -603,9 +603,9 @@ template auto BSplineInterpolateImageFunction::EvaluateDerivativeAtContinuousIndexInternal( const ContinuousIndexType & x, - vnl_matrix & evaluateIndex, - vnl_matrix & weights, - vnl_matrix & weightsDerivative) const -> CovariantVectorType + vnl_matrix & evaluateIndex, + vnl_matrix & weights, + vnl_matrix & weightsDerivative) const -> CovariantVectorType { this->DetermineRegionOfSupport((evaluateIndex), x, m_SplineOrder); @@ -616,7 +616,7 @@ BSplineInterpolateImageFunction::Eval // Modify EvaluateIndex at the boundaries using mirror boundary conditions this->ApplyMirrorBoundaryConditions((evaluateIndex), m_SplineOrder); - const InputImageType * inputImage = this->GetInputImage(); + const InputImageType * inputImage = this->GetInputImage(); const typename InputImageType::SpacingType & spacing = inputImage->GetSpacing(); // Calculate derivative diff --git a/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.h b/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.h index 8f312f59d12..b330d6507ea 100644 --- a/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.h @@ -221,28 +221,28 @@ class ITK_TEMPLATE_EXPORT CentralDifferenceImageFunction : public ImageFunction< template inline void EvaluateAtIndexSpecialized(const IndexType & index, - OutputType & orientedDerivative, + OutputType & orientedDerivative, OutputTypeSpecializationStructType) const; /** Specialized version of EvaluateAtIndex() method to handle vector pixel types.*/ template inline void EvaluateAtIndexSpecialized(const IndexType & index, - OutputType & derivative, + OutputType & derivative, OutputTypeSpecializationStructType) const; /** Specialized version of EvaluateAtContinuousIndex() method to handle scalar pixel types.*/ template inline void EvaluateAtContinuousIndexSpecialized(const ContinuousIndexType & cindex, - OutputType & orientedDerivative, + OutputType & orientedDerivative, OutputTypeSpecializationStructType) const; /** Specialized version of EvaluateAtContinuousIndex() method to handle vector pixel types.*/ template inline void EvaluateAtContinuousIndexSpecialized(const ContinuousIndexType & cindex, - OutputType & derivative, + OutputType & derivative, OutputTypeSpecializationStructType) const; /** Specialized version of Evaluate() method to handle scalar pixel types.*/ @@ -250,7 +250,7 @@ class ITK_TEMPLATE_EXPORT CentralDifferenceImageFunction : public ImageFunction< template void EvaluateSpecialized(const PointType & point, - OutputType & orientedDerivative, + OutputType & orientedDerivative, OutputTypeSpecializationStructType) const; /** Specialized version of Evaluate() method to handle vector pixel types.*/ diff --git a/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.hxx b/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.hxx index 567e8b75436..802a4d6f585 100644 --- a/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.hxx @@ -107,7 +107,7 @@ template void CentralDifferenceImageFunction::EvaluateAtIndexSpecialized( const IndexType & index, - OutputType & orientedDerivative, + OutputType & orientedDerivative, OutputTypeSpecializationStructType) const { OutputType derivative; @@ -118,7 +118,7 @@ CentralDifferenceImageFunction::EvaluateA const typename InputImageType::RegionType & region = inputImage->GetBufferedRegion(); - const typename InputImageType::SizeType & size = region.GetSize(); + const typename InputImageType::SizeType & size = region.GetSize(); const typename InputImageType::IndexType & start = region.GetIndex(); const unsigned int MaxDims = Self::ImageDimension; @@ -160,23 +160,23 @@ template void CentralDifferenceImageFunction::EvaluateAtIndexSpecialized( const IndexType & index, - OutputType & derivative, + OutputType & derivative, OutputTypeSpecializationStructType) const { const InputImageType * inputImage = this->GetInputImage(); - const unsigned int numberComponents = this->GetInputImage()->GetNumberOfComponentsPerPixel(); + const unsigned int numberComponents = this->GetInputImage()->GetNumberOfComponentsPerPixel(); IndexType neighIndex = index; const typename InputImageType::RegionType & region = inputImage->GetBufferedRegion(); - const typename InputImageType::SizeType & size = region.GetSize(); - const typename InputImageType::IndexType & start = region.GetIndex(); + const typename InputImageType::SizeType & size = region.GetSize(); + const typename InputImageType::IndexType & start = region.GetIndex(); using PixelType = typename InputImageType::PixelType; - const PixelType * neighPixels[Self::ImageDimension][2]; - const PixelType zeroPixel{}; + const PixelType * neighPixels[Self::ImageDimension][2]; + const PixelType zeroPixel{}; const unsigned int MaxDims = Self::ImageDimension; - bool dimOutOfBounds[Self::ImageDimension]; + bool dimOutOfBounds[Self::ImageDimension]; for (unsigned int dim = 0; dim < MaxDims; ++dim) { @@ -257,7 +257,7 @@ template void CentralDifferenceImageFunction::EvaluateSpecialized( const PointType & point, - OutputType & orientedDerivative, + OutputType & orientedDerivative, OutputTypeSpecializationStructType) const { using PointValueType = typename PointType::ValueType; @@ -323,13 +323,13 @@ template void CentralDifferenceImageFunction::EvaluateSpecialized( const PointType & point, - OutputType & derivative, + OutputType & derivative, OutputTypeSpecializationStructType) const { using PointValueType = typename PointType::ValueType; const InputImageType * inputImage = this->GetInputImage(); - const unsigned int numberComponents = inputImage->GetNumberOfComponentsPerPixel(); + const unsigned int numberComponents = inputImage->GetNumberOfComponentsPerPixel(); PointType neighPoint1 = point; PointType neighPoint2 = point; @@ -337,11 +337,11 @@ CentralDifferenceImageFunction::EvaluateS const SpacingType & spacing = inputImage->GetSpacing(); using PixelType = typename InputImageType::PixelType; - PixelType neighPixels[Self::ImageDimension][2]; - bool dimOutOfBounds[Self::ImageDimension]; + PixelType neighPixels[Self::ImageDimension][2]; + bool dimOutOfBounds[Self::ImageDimension]; const unsigned int MaxDims = Self::ImageDimension; - PointValueType delta[Self::ImageDimension]; - const PixelType zeroPixel{}; + PointValueType delta[Self::ImageDimension]; + const PixelType zeroPixel{}; ScalarDerivativeType componentDerivativeOut; ScalarDerivativeType componentDerivative{}; @@ -447,7 +447,7 @@ template void CentralDifferenceImageFunction::EvaluateAtContinuousIndexSpecialized( const ContinuousIndexType & cindex, - OutputType & orientedDerivative, + OutputType & orientedDerivative, OutputTypeSpecializationStructType) const { using DerivativeValueType = typename OutputType::ValueType; @@ -461,7 +461,7 @@ CentralDifferenceImageFunction::EvaluateA const typename InputImageType::RegionType & region = inputImage->GetBufferedRegion(); - const typename InputImageType::SizeType & size = region.GetSize(); + const typename InputImageType::SizeType & size = region.GetSize(); const typename InputImageType::IndexType & start = region.GetIndex(); const unsigned int MaxDims = Self::ImageDimension; @@ -501,26 +501,26 @@ template void CentralDifferenceImageFunction::EvaluateAtContinuousIndexSpecialized( const ContinuousIndexType & cindex, - OutputType & derivative, + OutputType & derivative, OutputTypeSpecializationStructType) const { using DerivativeValueType = typename OutputType::ValueType; using ContinuousIndexValueType = typename ContinuousIndexType::ValueType; const InputImageType * inputImage = this->GetInputImage(); - const unsigned int numberComponents = inputImage->GetNumberOfComponentsPerPixel(); + const unsigned int numberComponents = inputImage->GetNumberOfComponentsPerPixel(); - ContinuousIndexType neighIndex = cindex; + ContinuousIndexType neighIndex = cindex; const typename InputImageType::RegionType & region = inputImage->GetBufferedRegion(); - const typename InputImageType::SizeType & size = region.GetSize(); + const typename InputImageType::SizeType & size = region.GetSize(); const typename InputImageType::IndexType & start = region.GetIndex(); using PixelType = typename InputImageType::PixelType; - PixelType neighPixels[Self::ImageDimension][2]; - bool dimOutOfBounds[Self::ImageDimension]; + PixelType neighPixels[Self::ImageDimension][2]; + bool dimOutOfBounds[Self::ImageDimension]; const unsigned int MaxDims = Self::ImageDimension; - const PixelType zeroPixel{}; + const PixelType zeroPixel{}; for (unsigned int dim = 0; dim < MaxDims; ++dim) { diff --git a/Modules/Core/ImageFunction/include/itkCovarianceImageFunction.hxx b/Modules/Core/ImageFunction/include/itkCovarianceImageFunction.hxx index 8b5abba8f53..9fc98c5e136 100644 --- a/Modules/Core/ImageFunction/include/itkCovarianceImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkCovarianceImageFunction.hxx @@ -45,7 +45,7 @@ CovarianceImageFunction::EvaluateAtIndex(const IndexTy } const unsigned int VectorDimension = this->GetInputImage()->GetNumberOfComponentsPerPixel(); - RealType covariance(VectorDimension, VectorDimension); + RealType covariance(VectorDimension, VectorDimension); if (!this->IsInsideBuffer(index)) { diff --git a/Modules/Core/ImageFunction/include/itkGaussianBlurImageFunction.h b/Modules/Core/ImageFunction/include/itkGaussianBlurImageFunction.h index 884a1bfcaa6..c54afee266b 100644 --- a/Modules/Core/ImageFunction/include/itkGaussianBlurImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkGaussianBlurImageFunction.h @@ -176,17 +176,17 @@ class ITK_TEMPLATE_EXPORT GaussianBlurImageFunction : public ImageFunction::EvaluateAtIndex(const IndexType /** Evaluate the function at the specified point */ template TOutput -GaussianBlurImageFunction::EvaluateAtIndex(const IndexType & index, +GaussianBlurImageFunction::EvaluateAtIndex(const IndexType & index, const OperatorArrayType & operatorArray) const { const InputImageType * inputImage = this->GetInputImage(); @@ -254,7 +254,7 @@ GaussianBlurImageFunction::EvaluateAtIndex(const IndexType // Define the region of the iterator typename InternalImageType::RegionType region; - typename InternalImageType::SizeType size = m_InternalImage->GetBufferedRegion().GetSize(); + typename InternalImageType::SizeType size = m_InternalImage->GetBufferedRegion().GetSize(); size[0] = 1; region.SetSize(size); @@ -283,7 +283,7 @@ GaussianBlurImageFunction::EvaluateAtIndex(const IndexType regionS.Crop(inputImage->GetBufferedRegion()); itk::ImageLinearConstIteratorWithIndex it(inputImage, regionS); - itk::ImageLinearIteratorWithIndex itN(m_InternalImage, regionN); + itk::ImageLinearIteratorWithIndex itN(m_InternalImage, regionN); it.SetDirection(1); itN.SetDirection(1); it.GoToBeginOfLine(); @@ -361,8 +361,8 @@ GaussianBlurImageFunction::RecomputeContinuousGaussianKern s[0] = m_Sigma[direction]; m_GaussianFunction->SetSigma(s); - unsigned int i = 0; - float sum = 0; + unsigned int i = 0; + float sum = 0; typename NeighborhoodType::Iterator it = gaussianNeighborhood.Begin(); while (it != gaussianNeighborhood.End()) { diff --git a/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.hxx b/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.hxx index 3747bd9aaf1..7a62083ecb4 100644 --- a/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.hxx @@ -157,9 +157,9 @@ GaussianDerivativeImageFunction::RecomputeGaussianKernel() for (unsigned int direction = 0; direction < Self::ImageDimension; ++direction) { // Set the derivative of the Gaussian first - OperatorNeighborhoodType dogNeighborhood; + OperatorNeighborhoodType dogNeighborhood; typename GaussianDerivativeSpatialFunctionType::InputType pt; - typename NeighborhoodType::SizeType size{}; + typename NeighborhoodType::SizeType size{}; size[direction] = static_cast(m_Sigma[direction] * m_Extent[direction]); dogNeighborhood.SetRadius(size); m_ImageNeighborhoodOffsets[direction] = GenerateRectangularImageNeighborhoodOffsets(size); diff --git a/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.h index 4ae8da387ca..5b4d6b77880 100644 --- a/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.h @@ -171,12 +171,12 @@ class ITK_TEMPLATE_EXPORT GaussianInterpolateImageFunction : public InterpolateI ComputeInterpolationRegion(const ContinuousIndexType &) const; virtual void - ComputeErrorFunctionArray(const RegionType & region, - unsigned int dimension, - RealType cindex, + ComputeErrorFunctionArray(const RegionType & region, + unsigned int dimension, + RealType cindex, vnl_vector & erfArray, vnl_vector & gerfArray, - bool evaluateGradient = false) const; + bool evaluateGradient = false) const; /** Set/Get the bounding box starting point. */ itkSetMacro(BoundingBoxStart, ArrayType); @@ -197,7 +197,7 @@ class ITK_TEMPLATE_EXPORT GaussianInterpolateImageFunction : public InterpolateI EvaluateAtContinuousIndex(const ContinuousIndexType &, OutputType *) const; ArrayType m_Sigma{}; - RealType m_Alpha{}; + RealType m_Alpha{}; ArrayType m_BoundingBoxStart{}; ArrayType m_BoundingBoxEnd{}; diff --git a/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.hxx b/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.hxx index 39a3331416c..e3917fdc0eb 100644 --- a/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.hxx @@ -57,9 +57,9 @@ GaussianInterpolateImageFunction::ComputeBoundingBox() } const typename InputImageType::ConstPointer input = this->GetInputImage(); - typename InputImageType::SpacingType spacing = input->GetSpacing(); - typename InputImageType::IndexType index = input->GetLargestPossibleRegion().GetIndex(); - typename InputImageType::SizeType size = input->GetLargestPossibleRegion().GetSize(); + typename InputImageType::SpacingType spacing = input->GetSpacing(); + typename InputImageType::IndexType index = input->GetLargestPossibleRegion().GetIndex(); + typename InputImageType::SizeType size = input->GetLargestPossibleRegion().GetSize(); for (unsigned int d = 0; d < ImageDimension; ++d) { @@ -79,10 +79,10 @@ GaussianInterpolateImageFunction::ComputeInterpolation RegionType region = this->GetInputImage()->GetBufferedRegion(); for (unsigned int d = 0; d < ImageDimension; ++d) { - TCoordinate cBegin = cindex[d] + 0.5 - this->m_CutOffDistance[d]; + TCoordinate cBegin = cindex[d] + 0.5 - this->m_CutOffDistance[d]; const IndexValueType begin = std::max(region.GetIndex()[d], static_cast(std::floor(cBegin))); - TCoordinate cEnd = cindex[d] + 0.5 + this->m_CutOffDistance[d]; - const SizeValueType end = + TCoordinate cEnd = cindex[d] + 0.5 + this->m_CutOffDistance[d]; + const SizeValueType end = std::min(region.GetIndex()[d] + region.GetSize()[d], static_cast(std::ceil(cEnd))); region.SetIndex(d, begin); region.SetSize(d, end - begin); @@ -107,8 +107,8 @@ GaussianInterpolateImageFunction::EvaluateAtContinuousI this->ComputeErrorFunctionArray(region, d, cindex[d], erfArray[d], gerfArray[d], grad != nullptr); } - RealType sum_me = 0.0; - RealType sum_m = 0.0; + RealType sum_me = 0.0; + RealType sum_m = 0.0; ArrayType dsum_me; ArrayType dsum_m; ArrayType dw; @@ -120,7 +120,7 @@ GaussianInterpolateImageFunction::EvaluateAtContinuousI for (ImageRegionConstIteratorWithIndex It(this->GetInputImage(), region); !It.IsAtEnd(); ++It) { unsigned int j = It.GetIndex()[0] - region.GetIndex()[0]; - RealType w = erfArray[0][j]; + RealType w = erfArray[0][j]; if (grad) { dw[0] = gerfArray[0][j]; @@ -176,9 +176,9 @@ GaussianInterpolateImageFunction::EvaluateAtContinuousI template void -GaussianInterpolateImageFunction::ComputeErrorFunctionArray(const RegionType & region, - unsigned int dimension, - RealType cindex, +GaussianInterpolateImageFunction::ComputeErrorFunctionArray(const RegionType & region, + unsigned int dimension, + RealType cindex, vnl_vector & erfArray, vnl_vector & gerfArray, bool evaluateGradient) const @@ -223,7 +223,7 @@ GaussianInterpolateImageFunction::GetRadius() const -> itkExceptionMacro("Input image required!"); } - const InputImageType * input = this->GetInputImage(); + const InputImageType * input = this->GetInputImage(); const typename InputImageType::SpacingType spacing = input->GetSpacing(); for (unsigned int dim = 0; dim < ImageDimension; ++dim) diff --git a/Modules/Core/ImageFunction/include/itkLabelImageGaussianInterpolateImageFunction.hxx b/Modules/Core/ImageFunction/include/itkLabelImageGaussianInterpolateImageFunction.hxx index 01a2690f341..ad5c9a237a7 100644 --- a/Modules/Core/ImageFunction/include/itkLabelImageGaussianInterpolateImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkLabelImageGaussianInterpolateImageFunction.hxx @@ -37,7 +37,7 @@ template auto LabelImageGaussianInterpolateImageFunction::EvaluateAtContinuousIndex( const ContinuousIndexType & cindex, - OutputType * itkNotUsed(grad)) const -> OutputType + OutputType * itkNotUsed(grad)) const -> OutputType { vnl_vector erfArray[ImageDimension]; vnl_vector gerfArray[ImageDimension]; @@ -50,7 +50,7 @@ LabelImageGaussianInterpolateImageFunctionComputeErrorFunctionArray(region, d, cindex[d], erfArray[d], gerfArray[d], false); } - RealType wmax = 0.0; + RealType wmax = 0.0; OutputType Vmax{}; // Create a map object to store weights for each label encountered @@ -63,7 +63,7 @@ LabelImageGaussianInterpolateImageFunction It(this->GetInputImage(), region); !It.IsAtEnd(); ++It) { unsigned int j = It.GetIndex()[0] - region.GetIndex()[0]; - RealType w = erfArray[0][j]; + RealType w = erfArray[0][j]; for (unsigned int d = 1; d < ImageDimension; ++d) { j = It.GetIndex()[d] - region.GetIndex()[d]; @@ -71,8 +71,8 @@ LabelImageGaussianInterpolateImageFunction(basei[0]); const TInputImage * const inputImagePtr = this->GetInputImage(); - const RealType & val0 = inputImagePtr->GetPixel(basei); + const RealType & val0 = inputImagePtr->GetPixel(basei); if (distance <= 0.) { return (static_cast(val0)); @@ -166,7 +166,7 @@ class ITK_TEMPLATE_EXPORT LinearInterpolateImageFunction : public InterpolateIma const InternalComputationType distance1 = index[1] - static_cast(basei[1]); const TInputImage * const inputImagePtr = this->GetInputImage(); - const RealType & val00 = inputImagePtr->GetPixel(basei); + const RealType & val00 = inputImagePtr->GetPixel(basei); if (distance0 <= 0. && distance1 <= 0.) { return (static_cast(val00)); @@ -237,7 +237,7 @@ class ITK_TEMPLATE_EXPORT LinearInterpolateImageFunction : public InterpolateIma const InternalComputationType distance2 = index[2] - static_cast(basei[2]); const TInputImage * const inputImagePtr = this->GetInputImage(); - const RealType & val000 = inputImagePtr->GetPixel(basei); + const RealType & val000 = inputImagePtr->GetPixel(basei); if (distance0 <= 0. && distance1 <= 0. && distance2 <= 0.) { return (static_cast(val000)); @@ -486,13 +486,13 @@ class ITK_TEMPLATE_EXPORT LinearInterpolateImageFunction : public InterpolateIma */ template void - MakeZeroInitializer(const TInputImage * const inputImagePtr, + MakeZeroInitializer(const TInputImage * const inputImagePtr, VariableLengthVector & tempZeros) const { // Variable length vector version to get the size of the pixel correct. constexpr typename TInputImage::IndexType idx = { { 0 } }; - const typename TInputImage::PixelType & tempPixel = inputImagePtr->GetPixel(idx); - const unsigned int sizeOfVarLengthVector = tempPixel.GetSize(); + const typename TInputImage::PixelType & tempPixel = inputImagePtr->GetPixel(idx); + const unsigned int sizeOfVarLengthVector = tempPixel.GetSize(); tempZeros.SetSize(sizeOfVarLengthVector); tempZeros.Fill(RealTypeScalarRealType{}); } diff --git a/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.hxx b/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.hxx index b20e17b7aa9..7cff7210f7d 100644 --- a/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.hxx @@ -37,7 +37,7 @@ LinearInterpolateImageFunction::EvaluateUnoptimized(co // Compute base index = closest index below point // Compute distance from point to base index - IndexType baseIndex; + IndexType baseIndex; InternalComputationType distance[ImageDimension]; for (unsigned int dim = 0; dim < ImageDimension; ++dim) { @@ -66,9 +66,9 @@ LinearInterpolateImageFunction::EvaluateUnoptimized(co for (unsigned int counter = 0; counter < numberOfNeighbors; ++counter) { - InternalComputationType overlap = 1.0; // Fraction overlap - unsigned int upper = counter; // Each bit indicates upper/lower neighbour - IndexType neighIndex(baseIndex); + InternalComputationType overlap = 1.0; // Fraction overlap + unsigned int upper = counter; // Each bit indicates upper/lower neighbour + IndexType neighIndex(baseIndex); // Get neighbor index and overlap fraction for (unsigned int dim = 0; dim < ImageDimension; ++dim) diff --git a/Modules/Core/ImageFunction/include/itkMahalanobisDistanceThresholdImageFunction.h b/Modules/Core/ImageFunction/include/itkMahalanobisDistanceThresholdImageFunction.h index b66965296e2..290cfb2413f 100644 --- a/Modules/Core/ImageFunction/include/itkMahalanobisDistanceThresholdImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkMahalanobisDistanceThresholdImageFunction.h @@ -176,7 +176,7 @@ class ITK_TEMPLATE_EXPORT MahalanobisDistanceThresholdImageFunction // Cached versions of the mean and covariance to manage the // difference in vector/matrix types between this class and the // membership function used internally. - MeanVectorType m_Mean{}; + MeanVectorType m_Mean{}; CovarianceMatrixType m_Covariance{}; }; } // end namespace itk diff --git a/Modules/Core/ImageFunction/include/itkNeighborhoodBinaryThresholdImageFunction.hxx b/Modules/Core/ImageFunction/include/itkNeighborhoodBinaryThresholdImageFunction.hxx index 6ace6d7ea68..51b0d00d035 100644 --- a/Modules/Core/ImageFunction/include/itkNeighborhoodBinaryThresholdImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkNeighborhoodBinaryThresholdImageFunction.hxx @@ -61,10 +61,10 @@ NeighborhoodBinaryThresholdImageFunction::EvaluateAtIn it.SetLocation(index); // Walk the neighborhood - bool allInside = true; - const PixelType lower = this->GetLower(); - const PixelType upper = this->GetUpper(); - PixelType value; + bool allInside = true; + const PixelType lower = this->GetLower(); + const PixelType upper = this->GetUpper(); + PixelType value; const unsigned int size = it.Size(); for (unsigned int i = 0; i < size; ++i) { diff --git a/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.h index f8559126294..7ee72c8d3c4 100644 --- a/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.h @@ -187,9 +187,9 @@ class ITK_TEMPLATE_EXPORT RayCastInterpolateImageFunction : public InterpolateIm void PrintSelf(std::ostream & os, Indent indent) const override; - TransformPointer m_Transform{}; - InputPointType m_FocalPoint{}; - double m_Threshold{}; + TransformPointer m_Transform{}; + InputPointType m_FocalPoint{}; + double m_Threshold{}; InterpolatorPointer m_Interpolator{}; private: diff --git a/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.hxx b/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.hxx index 9dcc3f98925..a1b0e1805d7 100644 --- a/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.hxx @@ -319,7 +319,7 @@ void RayCastInterpolateImageFunction::RayCastHelper::RecordVolumeDimensions() { typename InputImageType::SpacingType spacing = this->m_Image->GetSpacing(); - SizeType dim = this->m_Image->GetLargestPossibleRegion().GetSize(); + SizeType dim = this->m_Image->GetLargestPossibleRegion().GetSize(); m_NumberOfVoxelsInX = dim[0]; m_NumberOfVoxelsInY = dim[1]; @@ -457,7 +457,7 @@ RayCastInterpolateImageFunction::RayCastHelper::CalcRa double interceptx[6]; double intercepty[6]; double interceptz[6]; - bool noInterceptFlag[6]; + bool noInterceptFlag[6]; for (unsigned int j = 0; j < numSides; ++j) { const double denom = @@ -483,7 +483,7 @@ RayCastInterpolateImageFunction::RayCastHelper::CalcRa } } - double cubeIntercepts[6][3]; + double cubeIntercepts[6][3]; unsigned int nSidesCrossed = 0; for (unsigned int j = 0; j < numSides; ++j) { @@ -552,7 +552,7 @@ RayCastInterpolateImageFunction::RayCastHelper::CalcRa } // Do cross product with these vectors - int cross[4][3]; + int cross[4][3]; unsigned int k = 0; for (unsigned int i = 0; i < 4; ++i) { @@ -670,11 +670,11 @@ RayCastInterpolateImageFunction::RayCastHelper::CalcRa template bool RayCastInterpolateImageFunction::RayCastHelper::SetRay(const OutputPointType & rayPosition, - const DirectionType & rayDirection) + const DirectionType & rayDirection) { // Store the position and direction of the ray typename TInputImage::SpacingType spacing = this->m_Image->GetSpacing(); - SizeType dim = this->m_Image->GetLargestPossibleRegion().GetSize(); + SizeType dim = this->m_Image->GetLargestPossibleRegion().GetSize(); // we need to translate the _center_ of the volume to the origin m_NumberOfVoxelsInX = dim[0]; @@ -930,7 +930,7 @@ RayCastInterpolateImageFunction::RayCastHelper::Adjust return false; } - int Istart[3]; + int Istart[3]; bool startOK; bool endOK; do @@ -1250,7 +1250,7 @@ RayCastInterpolateImageFunction::RayCastHelper::GetCur template bool RayCastInterpolateImageFunction::RayCastHelper::IntegrateAboveThreshold(double & integral, - double threshold) + double threshold) { // double posn3D_x, posn3D_y, posn3D_z; @@ -1398,7 +1398,7 @@ RayCastInterpolateImageFunction::Evaluate(const PointT ray.Initialise(); const PointType origin = this->m_Image->GetOrigin(); - const auto spacing = this->m_Image->GetSpacing(); + const auto spacing = this->m_Image->GetSpacing(); PointType rayPosition = point; diff --git a/Modules/Core/ImageFunction/include/itkVectorInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkVectorInterpolateImageFunction.h index 75241ddaf30..891cc1d633d 100644 --- a/Modules/Core/ImageFunction/include/itkVectorInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkVectorInterpolateImageFunction.h @@ -129,7 +129,7 @@ class ITK_TEMPLATE_EXPORT VectorInterpolateImageFunction EvaluateAtIndex(const IndexType & index) const override { OutputType output; - PixelType input = this->GetInputImage()->GetPixel(index); + PixelType input = this->GetInputImage()->GetPixel(index); for (unsigned int k = 0; k < this->GetInputImage()->GetNumberOfComponentsPerPixel(); ++k) { diff --git a/Modules/Core/ImageFunction/include/itkVectorLinearInterpolateImageFunction.hxx b/Modules/Core/ImageFunction/include/itkVectorLinearInterpolateImageFunction.hxx index 03acdba199f..22785cd2072 100644 --- a/Modules/Core/ImageFunction/include/itkVectorLinearInterpolateImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkVectorLinearInterpolateImageFunction.hxx @@ -39,8 +39,8 @@ VectorLinearInterpolateImageFunction::EvaluateAtContin // Compute base index = closet index below point // Compute distance from point to base index // - IndexType baseIndex; - InternalComputationType distance[ImageDimension]; + IndexType baseIndex; + InternalComputationType distance[ImageDimension]; const TInputImage * const inputImgPtr = this->GetInputImage(); for (unsigned int dim = 0; dim < ImageDimension; ++dim) { @@ -60,8 +60,8 @@ VectorLinearInterpolateImageFunction::EvaluateAtContin for (unsigned int counter = 0; counter < m_Neighbors; ++counter) { - InternalComputationType overlap = 1.0; // fraction overlap - unsigned int upper = counter; // each bit indicates upper/lower neighbour + InternalComputationType overlap = 1.0; // fraction overlap + unsigned int upper = counter; // each bit indicates upper/lower neighbour IndexType neighIndex; // get neighbor index and overlap fraction diff --git a/Modules/Core/ImageFunction/include/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.hxx b/Modules/Core/ImageFunction/include/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.hxx index 10036373eee..d946023b025 100644 --- a/Modules/Core/ImageFunction/include/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.hxx @@ -44,7 +44,7 @@ VectorLinearInterpolateNearestNeighborExtrapolateImageFunction::EvaluateAtIndex(const IndexTy const unsigned int size = it.Size(); for (unsigned int i = 0; i < size; ++i) { - PixelType p = it.GetPixel(i); + PixelType p = it.GetPixel(i); const unsigned int VectorDimension = NumericTraits::GetLength(p); if (i == 0) diff --git a/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.hxx b/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.hxx index fbf5460a377..c9c501ebdbe 100644 --- a/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.hxx @@ -72,7 +72,7 @@ WindowedSincInterpolateImageFunction::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -133,7 +133,7 @@ WindowedSincInterpolateImageFunction OutputType { IndexType baseIndex; - double distance[ImageDimension]; + double distance[ImageDimension]; // Compute the integer index based on the continuous one by // 'flooring' the index @@ -144,7 +144,7 @@ WindowedSincInterpolateImageFunction::Filled(VRadius); + auto radius = Size::Filled(VRadius); IteratorType nit(radius, this->GetInputImage(), this->GetInputImage()->GetBufferedRegion()); nit.SetLocation(baseIndex); diff --git a/Modules/Core/ImageFunction/test/itkBSplineDecompositionImageFilterTest.cxx b/Modules/Core/ImageFunction/test/itkBSplineDecompositionImageFilterTest.cxx index 443d2f112fa..fedc33247b0 100644 --- a/Modules/Core/ImageFunction/test/itkBSplineDecompositionImageFilterTest.cxx +++ b/Modules/Core/ImageFunction/test/itkBSplineDecompositionImageFilterTest.cxx @@ -39,7 +39,7 @@ ParseSplinePoles(char * splinePolesIn) typename TFilter::SplinePolesVectorType splinePolesOut; // Get the individual components - char * endPtr; + char * endPtr; typename TFilter::SplinePolesVectorType::value_type value; while (*splinePolesIn) { @@ -87,7 +87,7 @@ itkBSplineDecompositionImageFilterTest(int argc, char * argv[]) using ImageType = itk::Image; using BSplineInterpolatorFunctionType = itk::BSplineInterpolateImageFunction; - const unsigned int splineOrder = std::stoi(argv[1]); + const unsigned int splineOrder = std::stoi(argv[1]); const BSplineInterpolatorFunctionType::Pointer interpolator = makeRandomImageInterpolator(splineOrder); const ImageType::ConstPointer randImage = interpolator->GetInputImage(); @@ -113,7 +113,7 @@ itkBSplineDecompositionImageFilterTest(int argc, char * argv[]) ITK_TEST_EXPECT_EQUAL(filter->GetNumberOfPoles(), expectedSplinePoles.size()); FilterType::SplinePolesVectorType resultSplinePoles = filter->GetSplinePoles(); - constexpr double tolerance1 = 1e-10; + constexpr double tolerance1 = 1e-10; for (unsigned int i = 0; i < resultSplinePoles.size(); ++i) { const FilterType::SplinePolesVectorType::value_type expectedSplinePole = expectedSplinePoles[i]; diff --git a/Modules/Core/ImageFunction/test/itkBSplineInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkBSplineInterpolateImageFunctionTest.cxx index b46692d6372..f58d8b89e3e 100644 --- a/Modules/Core/ImageFunction/test/itkBSplineInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkBSplineInterpolateImageFunctionTest.cxx @@ -201,10 +201,10 @@ TestContinuousIndex(const TInterpolator * interp, const ContinuousIndexType & in */ template bool -TestContinuousIndexDerivative(const TInterpolator * interp, +TestContinuousIndexDerivative(const TInterpolator * interp, const ContinuousIndexType & index, - bool isInside, - double * trueValue) + bool isInside, + double * trueValue) { std::cout << " Index: " << index; @@ -221,7 +221,7 @@ TestContinuousIndexDerivative(const TInterpolator * interp, if (isInside) { typename TInterpolator::CovariantVectorType value; - const double value2 = interp->EvaluateAtContinuousIndex(index); + const double value2 = interp->EvaluateAtContinuousIndex(index); std::cout << "Interpolated Value: " << value2 << '\n'; value = interp->EvaluateDerivativeAtContinuousIndex(index); std::cout << " Value: "; @@ -291,7 +291,7 @@ test1DCubicSpline() #define NPOINTS 5 // number of points constexpr itk::SpacePrecisionType darray1[NPOINTS] = { 1.4, 8.9, 10.0, 40.0, -0.3 }; constexpr double truth[NPOINTS] = { 334.41265437584, 18.158173426944, 4.0000, 0, 442.24157192006658 }; - constexpr bool b_Inside[NPOINTS] = { true, true, true, false, true }; + constexpr bool b_Inside[NPOINTS] = { true, true, true, false, true }; // an integer position inside the image for (int ii = 0; ii < NPOINTS; ++ii) @@ -360,7 +360,7 @@ test2DSpline() #define NPOINTS2 4 // number of points constexpr itk::SpacePrecisionType darray1[NPOINTS2][2] = { { 0.1, 0.2 }, { 3.4, 5.8 }, { 4.0, 6.0 }, { 2.1, 8.0 } }; - constexpr double truth[NPOINTS2][6] = { + constexpr double truth[NPOINTS2][6] = { { 154.5, 140.14, 151.86429192392, 151.650316034, 151.865916515, 151.882483111 }, { 0, 13.84, 22.688125812495, 22.411473093, 22.606968306, 22.908345604 }, { 36.2, 36.2, 36.2, 36.2, 36.2, 36.2 }, @@ -525,7 +525,7 @@ test3DSplineDerivative() // an integer position inside the image for (int ii = 0; ii < NPOINTS4; ++ii) { - auto cindex = ContinuousIndexType3D(&darray1[ii][0]); + auto cindex = ContinuousIndexType3D(&darray1[ii][0]); const bool passed = TestContinuousIndexDerivative( interp, cindex, b_Inside[ii], &truth[splineOrder - 1][ii][0]); if (!passed) @@ -582,7 +582,7 @@ testInteger3DSpline() { 73.280126903, 73.280816965, 73.282780615, 73.285315943 }, { 42.0, 42.0, 42.0, 42.0 }, { 0, 0, 0, 0 } }; - constexpr bool b_Inside[NPOINTS4b] = { true, true, true, false }; + constexpr bool b_Inside[NPOINTS4b] = { true, true, true, false }; // an integer position inside the image for (int ii = 0; ii < NPOINTS4b; ++ii) @@ -620,7 +620,7 @@ testEvaluateValueAndDerivative() using ImageType = itk::Image; using BSplineInterpolatorFunctionType = itk::BSplineInterpolateImageFunction; - constexpr unsigned int SplineOrder = 3; + constexpr unsigned int SplineOrder = 3; const BSplineInterpolatorFunctionType::Pointer interpolator = makeRandomImageInterpolator(SplineOrder); @@ -632,7 +632,7 @@ testEvaluateValueAndDerivative() using CovariantVectorType = BSplineInterpolatorFunctionType::CovariantVectorType; const CovariantVectorType dx_1 = interpolator->EvaluateDerivativeAtContinuousIndex(x); - CovariantVectorType dx_2; + CovariantVectorType dx_2; BSplineInterpolatorFunctionType::OutputType value; interpolator->EvaluateValueAndDerivativeAtContinuousIndex(x, value, dx_2); @@ -688,11 +688,11 @@ void set1DInterpData(ImageType1D::Pointer imgPtr) { constexpr SizeType1D size = { { 36 } }; - constexpr double mydata[36] = { 454.0000, 369.4000, 295.2000, 230.8000, 175.6000, 129.0000, 90.4000, 59.2000, - 34.8000, 16.6000, 4.0000, -3.6000, -6.8000, -6.2000, -2.4000, 4.0000, - 12.4000, 22.2000, 32.8000, 43.6000, 54.0000, 63.4000, 71.2000, 76.8000, - 79.6000, 79.0000, 74.4000, 65.2000, 50.8000, 30.6000, 4.0000, -29.6000, - -70.8000, -120.2000, -178.4000, -246.0000 }; + constexpr double mydata[36] = { 454.0000, 369.4000, 295.2000, 230.8000, 175.6000, 129.0000, 90.4000, 59.2000, + 34.8000, 16.6000, 4.0000, -3.6000, -6.8000, -6.2000, -2.4000, 4.0000, + 12.4000, 22.2000, 32.8000, 43.6000, 54.0000, 63.4000, 71.2000, 76.8000, + 79.6000, 79.0000, 74.4000, 65.2000, 50.8000, 30.6000, 4.0000, -29.6000, + -70.8000, -120.2000, -178.4000, -246.0000 }; ImageType1D::RegionType region; region.SetSize(size); @@ -718,7 +718,7 @@ void set2DInterpData(ImageType2D::Pointer imgPtr) { constexpr SizeType2D size = { { 7, 7 } }; - constexpr double mydata[49] = { + constexpr double mydata[49] = { 154.5000, 82.4000, 30.9000, 0, -10.3000, 0, 30.9000, 117.0000, 62.4000, 23.4000, 0, -7.8000, 0, 23.4000, 18.0000, 9.6000, 3.6000, 0, -1.2000, 0, 3.6000, -120.0000, -64.0000, -24.0000, 0, 8.0000, 0, -24.0000, -274.5000, -146.4000, -54.9000, 0, 18.3000, 0, -54.9000, -423.0000, -225.6000, -84.6000, 0, 28.2000, 0, -84.6000, @@ -782,7 +782,7 @@ set3DDerivativeData(ImageType3D::Pointer imgPtr) { index[0] = col; const double col1 = col - 20.0; // Center - double value = 0.1 * col1 * col1 * col1 * col1 - 0.5 * col1 * col1 * col1 + 2.0 * col1 - 43.0; + double value = 0.1 * col1 * col1 * col1 * col1 - 0.5 * col1 * col1 * col1 + 2.0 * col1 - 43.0; value += 5.0 * row1 + 7.0; value += -2.0 * slice1 * slice1 - 6.0 * slice1 + 10.0; imgPtr->SetPixel(index, value); diff --git a/Modules/Core/ImageFunction/test/itkBSplineResampleImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkBSplineResampleImageFunctionTest.cxx index 2400ed5c893..80cf0c1e563 100644 --- a/Modules/Core/ImageFunction/test/itkBSplineResampleImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkBSplineResampleImageFunctionTest.cxx @@ -42,13 +42,13 @@ itkBSplineResampleImageFunctionTest(int, char *[]) using ImageType = itk::Image; using BSplineInterpolatorFunctionType = itk::BSplineInterpolateImageFunction; - constexpr unsigned int SplineOrder = 3; + constexpr unsigned int SplineOrder = 3; const BSplineInterpolatorFunctionType::Pointer interpolator = makeRandomImageInterpolator(SplineOrder); const ImageType::ConstPointer randImage = interpolator->GetInputImage(); using FilterType = itk::BSplineDecompositionImageFilter; - auto filter = FilterType::New(); + auto filter = FilterType::New(); const itk::SimpleFilterWatcher watcher(filter, "filter"); filter->SetSplineOrder(interpolator->GetSplineOrder()); diff --git a/Modules/Core/ImageFunction/test/itkBinaryThresholdImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkBinaryThresholdImageFunctionTest.cxx index f792b1b2741..46251e42a00 100644 --- a/Modules/Core/ImageFunction/test/itkBinaryThresholdImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkBinaryThresholdImageFunctionTest.cxx @@ -29,10 +29,10 @@ itkBinaryThresholdImageFunctionTest(int, char *[]) using FloatImage = itk::Image; - auto image = FloatImage::New(); + auto image = FloatImage::New(); FloatImage::RegionType region; - auto size = FloatImage::SizeType::Filled(64); - FloatImage::IndexType index{}; + auto size = FloatImage::SizeType::Filled(64); + FloatImage::IndexType index{}; region.SetIndex(index); region.SetSize(size); @@ -59,7 +59,7 @@ itkBinaryThresholdImageFunctionTest(int, char *[]) using ImageFunction = itk::BinaryThresholdImageFunction; auto threshold = ImageFunction::New(); - ImageFunction::PointType point; + ImageFunction::PointType point; ImageFunction::ContinuousIndexType continuousIndex; threshold->SetInputImage(image); diff --git a/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionOnVectorSpeedTest.cxx b/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionOnVectorSpeedTest.cxx index 7ac17917d41..63cecc6eff2 100644 --- a/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionOnVectorSpeedTest.cxx +++ b/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionOnVectorSpeedTest.cxx @@ -24,8 +24,8 @@ template int itkCentralDifferenceImageFunctionOnVectorSpeedTestRun(char * argv[]) { - const int imageSize = std::stoi(argv[1]); - const int reps = std::stoi(argv[2]); + const int imageSize = std::stoi(argv[1]); + const int reps = std::stoi(argv[2]); const bool doEAI = std::stoi(argv[3]); const bool doEACI = std::stoi(argv[4]); const bool doE = std::stoi(argv[5]); @@ -38,8 +38,8 @@ itkCentralDifferenceImageFunctionOnVectorSpeedTestRun(char * argv[]) using PixelType = itk::Vector; using ImageType = itk::Image; - auto image = ImageType::New(); - auto size = ImageType::SizeType::Filled(imageSize); + auto image = ImageType::New(); + auto size = ImageType::SizeType::Filled(imageSize); const typename ImageType::RegionType region(size); image->SetRegions(region); diff --git a/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionOnVectorTest.cxx b/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionOnVectorTest.cxx index 9f702326992..9c27f9fb39d 100644 --- a/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionOnVectorTest.cxx +++ b/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionOnVectorTest.cxx @@ -52,8 +52,8 @@ itkCentralDifferenceImageFunctionOnVectorTestRun() using PixelType = itk::Vector; using ImageType = itk::Image; - auto image = ImageType::New(); - auto size = ImageType::SizeType::Filled(16); + auto image = ImageType::New(); + auto size = ImageType::SizeType::Filled(16); const typename ImageType::RegionType region(size); image->SetRegions(region); @@ -92,7 +92,7 @@ itkCentralDifferenceImageFunctionOnVectorTestRun() // pick an index inside the image typename ImageType::IndexType index{ { 8, 8 } }; - OutputType indexOutput = function->EvaluateAtIndex(index); + OutputType indexOutput = function->EvaluateAtIndex(index); std::cout << "Index: " << index << " Derivative: "; std::cout << indexOutput << std::endl; @@ -129,7 +129,7 @@ itkCentralDifferenceImageFunctionOnVectorTestRun() } // test continuous index - auto cindex = itk::MakeFilled(8.0); + auto cindex = itk::MakeFilled(8.0); OutputType continuousIndexOutput = function->EvaluateAtContinuousIndex(cindex); std::cout << "ContinuousIndex: " << cindex << " Derivative: "; std::cout << continuousIndexOutput << std::endl; @@ -140,7 +140,7 @@ itkCentralDifferenceImageFunctionOnVectorTestRun() result = EXIT_FAILURE; } - auto point = itk::MakeFilled(8.0); + auto point = itk::MakeFilled(8.0); OutputType pointOutput = function->Evaluate(point); std::cout << "Point: " << point << " Derivative: "; std::cout << pointOutput << std::endl; diff --git a/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionSpeedTest.cxx b/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionSpeedTest.cxx index 222526dcc72..875f481a9eb 100644 --- a/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionSpeedTest.cxx +++ b/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionSpeedTest.cxx @@ -29,8 +29,8 @@ itkCentralDifferenceImageFunctionSpeedTest(int argc, char * argv[]) return EXIT_FAILURE; } - const int imageSize = std::stoi(argv[1]); - const int reps = std::stoi(argv[2]); + const int imageSize = std::stoi(argv[1]); + const int reps = std::stoi(argv[2]); const bool doEAI = std::stoi(argv[3]); const bool doEACI = std::stoi(argv[4]); const bool doE = std::stoi(argv[5]); @@ -42,8 +42,8 @@ itkCentralDifferenceImageFunctionSpeedTest(int argc, char * argv[]) using PixelType = unsigned int; using ImageType = itk::Image; - auto image = ImageType::New(); - auto size = ImageType::SizeType::Filled(imageSize); + auto image = ImageType::New(); + auto size = ImageType::SizeType::Filled(imageSize); const ImageType::RegionType region(size); image->SetRegions(region); diff --git a/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionTest.cxx index dc74455e041..c2f26078e88 100644 --- a/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionTest.cxx @@ -30,8 +30,8 @@ itkCentralDifferenceImageFunctionTest(int, char *[]) using PixelType = unsigned int; using ImageType = itk::Image; - auto image = ImageType::New(); - auto size = ImageType::SizeType::Filled(16); + auto image = ImageType::New(); + auto size = ImageType::SizeType::Filled(16); const ImageType::RegionType region(size); image->SetRegions(region); @@ -76,7 +76,7 @@ itkCentralDifferenceImageFunctionTest(int, char *[]) std::cout << "Index: " << index << " is inside the BufferedRegion." << std::endl; } - auto cindex = itk::MakeFilled(8.0); + auto cindex = itk::MakeFilled(8.0); OutputType continuousIndexOutput = function->EvaluateAtContinuousIndex(cindex); std::cout << "ContinuousIndex: " << cindex << " Derivative: "; std::cout << continuousIndexOutput << std::endl; @@ -87,7 +87,7 @@ itkCentralDifferenceImageFunctionTest(int, char *[]) result = EXIT_FAILURE; } - auto point = itk::MakeFilled(8.0); + auto point = itk::MakeFilled(8.0); OutputType pointOutput = function->Evaluate(point); std::cout << "Point: " << point << " Derivative: "; std::cout << pointOutput << std::endl; diff --git a/Modules/Core/ImageFunction/test/itkCovarianceImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkCovarianceImageFunctionTest.cxx index 9cfc6646e77..3875111c18a 100644 --- a/Modules/Core/ImageFunction/test/itkCovarianceImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkCovarianceImageFunctionTest.cxx @@ -34,9 +34,9 @@ itkCovarianceImageFunctionTest(int, char *[]) using FunctionType = itk::CovarianceImageFunction; // Create and allocate the image - auto image = ImageType::New(); - ImageType::SizeType size; - ImageType::IndexType start; + auto image = ImageType::New(); + ImageType::SizeType size; + ImageType::IndexType start; ImageType::RegionType region; size[0] = 20; diff --git a/Modules/Core/ImageFunction/test/itkGaussianBlurImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkGaussianBlurImageFunctionTest.cxx index 70fdfc534e8..6864b681eec 100644 --- a/Modules/Core/ImageFunction/test/itkGaussianBlurImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkGaussianBlurImageFunctionTest.cxx @@ -29,9 +29,9 @@ itkGaussianBlurImageFunctionTest(int, char *[]) using GFunctionType = itk::GaussianBlurImageFunction; // Create and allocate the image - auto image = ImageType::New(); - ImageType::SizeType size; - ImageType::IndexType start; + auto image = ImageType::New(); + ImageType::SizeType size; + ImageType::IndexType start; ImageType::RegionType region; size[0] = 50; @@ -183,7 +183,7 @@ itkGaussianBlurImageFunctionTest(int, char *[]) const GFunctionType::OutputType blurredvalue_point = gaussianFunction->Evaluate(pt); - auto continuousIndex = itk::MakeFilled(25); + auto continuousIndex = itk::MakeFilled(25); const GFunctionType::OutputType blurredvalue_continuousIndex = gaussianFunction->EvaluateAtContinuousIndex(continuousIndex); diff --git a/Modules/Core/ImageFunction/test/itkGaussianDerivativeImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkGaussianDerivativeImageFunctionTest.cxx index 60e4b9b690b..63232cc9aef 100644 --- a/Modules/Core/ImageFunction/test/itkGaussianDerivativeImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkGaussianDerivativeImageFunctionTest.cxx @@ -29,9 +29,9 @@ TestGaussianDerivativeImageFunction() using ImageType = itk::Image; // Create and allocate the image - auto image = ImageType::New(); - typename ImageType::SizeType size; - typename ImageType::IndexType start; + auto image = ImageType::New(); + typename ImageType::SizeType size; + typename ImageType::IndexType start; typename ImageType::RegionType region; size[0] = 50; @@ -94,7 +94,7 @@ TestGaussianDerivativeImageFunction() std::cout << "[PASSED] " << std::endl; std::cout << "Testing consistency within Index/Point/ContinuousIndex: "; - auto index = itk::Index::Filled(25); + auto index = itk::Index::Filled(25); typename DoGFunctionType::OutputType gradientIndex; gradientIndex = DoG->EvaluateAtIndex(index); diff --git a/Modules/Core/ImageFunction/test/itkGaussianInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkGaussianInterpolateImageFunctionTest.cxx index 63b30a4fc07..e24a3cda79b 100644 --- a/Modules/Core/ImageFunction/test/itkGaussianInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkGaussianInterpolateImageFunctionTest.cxx @@ -51,7 +51,7 @@ itkGaussianInterpolateImageFunctionTest(int, char *[]) image->SetRegions(region); image->Allocate(); - ImageType::PointType origin; + ImageType::PointType origin; ImageType::SpacingType spacing; origin.Fill(0.0); diff --git a/Modules/Core/ImageFunction/test/itkImageAdaptorInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkImageAdaptorInterpolateImageFunctionTest.cxx index 4c87c8b2ee8..7cdb429f2d7 100644 --- a/Modules/Core/ImageFunction/test/itkImageAdaptorInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkImageAdaptorInterpolateImageFunctionTest.cxx @@ -99,10 +99,10 @@ TestGeometricPoint(const InterpolatorType * interp, const PointType & point, boo * returns false otherwise */ bool -TestContinuousIndex(const InterpolatorType * interp, +TestContinuousIndex(const InterpolatorType * interp, const ContinuousIndexType & index, - bool isInside, - OutputType trueValue) + bool isInside, + OutputType trueValue) { std::cout << " Index: " << index; @@ -153,12 +153,12 @@ itkImageAdaptorInterpolateImageFunctionTest(int, char *[]) constexpr unsigned int ImageDimension = ImageAdaptorInterpolate::ImageDimension; constexpr ImageType::SizeType size = { { 20, 40, 80 } }; - constexpr double origin[3] = { 0.5, 0.5, 0.5 }; - constexpr double spacing[3] = { 0.1, 0.05, 0.025 }; + constexpr double origin[3] = { 0.5, 0.5, 0.5 }; + constexpr double spacing[3] = { 0.1, 0.05, 0.025 }; // Create a test image - auto image = ImageType::New(); + auto image = ImageType::New(); ImageType::RegionType region; region.SetSize(size); @@ -177,7 +177,7 @@ itkImageAdaptorInterpolateImageFunctionTest(int, char *[]) for (; !iter.IsAtEnd(); ++iter) { - IndexType index = iter.GetIndex(); + IndexType index = iter.GetIndex(); unsigned short value = 0; for (unsigned int j = 0; j < ImageDimension; ++j) @@ -207,15 +207,15 @@ itkImageAdaptorInterpolateImageFunctionTest(int, char *[]) /* Test evaluation at continuous indices and corresponding gemetric points */ std::cout << "Evaluate at: " << std::endl; - OutputType output; + OutputType output; ContinuousIndexType cindex; - PointType point; - bool passed; + PointType point; + bool passed; // an integer position inside the image { itk::SpacePrecisionType darray[3] = { 10, 20, 40 }; - constexpr double temp = 70.0; + constexpr double temp = 70.0; output = OutputType(temp); cindex = ContinuousIndexType(darray); passed = ImageAdaptorInterpolate::TestContinuousIndex(interp, cindex, true, output); @@ -237,7 +237,7 @@ itkImageAdaptorInterpolateImageFunctionTest(int, char *[]) // position at the image border { itk::SpacePrecisionType darray[3] = { 0, 20, 40 }; - constexpr double temp = 60.0; + constexpr double temp = 60.0; output = OutputType(temp); cindex = ContinuousIndexType(darray); passed = ImageAdaptorInterpolate::TestContinuousIndex(interp, cindex, true, output); @@ -259,8 +259,8 @@ itkImageAdaptorInterpolateImageFunctionTest(int, char *[]) // position near image border { constexpr itk::SpacePrecisionType epsilon = 1.0e-10; - itk::SpacePrecisionType darray[3] = { 19 - epsilon, 20, 40 }; - constexpr double temp = 79.0; + itk::SpacePrecisionType darray[3] = { 19 - epsilon, 20, 40 }; + constexpr double temp = 79.0; output = OutputType(temp); cindex = ContinuousIndexType(darray); passed = ImageAdaptorInterpolate::TestContinuousIndex(interp, cindex, true, output); @@ -282,7 +282,7 @@ itkImageAdaptorInterpolateImageFunctionTest(int, char *[]) // position outside the image { itk::SpacePrecisionType darray[3] = { 20, 20, 40 }; - constexpr double temp = 1.0; + constexpr double temp = 1.0; output = OutputType(temp); cindex = ContinuousIndexType(darray); passed = ImageAdaptorInterpolate::TestContinuousIndex(interp, cindex, false, output); @@ -304,7 +304,7 @@ itkImageAdaptorInterpolateImageFunctionTest(int, char *[]) // at non-integer position { itk::SpacePrecisionType darray[3] = { 5.25, 12.5, 42.0 }; - constexpr double temp = 59.75; + constexpr double temp = 59.75; output = OutputType(temp); cindex = ContinuousIndexType(darray); passed = ImageAdaptorInterpolate::TestContinuousIndex(interp, cindex, true, output); diff --git a/Modules/Core/ImageFunction/test/itkInterpolateTest.cxx b/Modules/Core/ImageFunction/test/itkInterpolateTest.cxx index cec327aee15..0658ded5eef 100644 --- a/Modules/Core/ImageFunction/test/itkInterpolateTest.cxx +++ b/Modules/Core/ImageFunction/test/itkInterpolateTest.cxx @@ -37,8 +37,8 @@ namespace /* Define the image size and physical coordinates */ SizeType size = { { 20, 40, 80 } }; -double origin[3] = { 0.5L, 0.5L, 0.5L }; -double spacing[3] = { 0.1L, 0.05L, 0.025L }; +double origin[3] = { 0.5L, 0.5L, 0.5L }; +double spacing[3] = { 0.1L, 0.05L, 0.025L }; } // namespace @@ -123,7 +123,7 @@ itkInterpolateTest(int, char *[]) std::cout << "Testing image interpolation methods:\n"; /* Allocate a simple test image */ - auto image = ImageType::New(); + auto image = ImageType::New(); ImageType::RegionType region; region.SetSize(size); image->SetLargestPossibleRegion(region); @@ -161,8 +161,8 @@ itkInterpolateTest(int, char *[]) // an integer position inside the image itk::SpacePrecisionType darray1[3] = { 10, 20, 40 }; - auto cindex = ContinuousIndexType(darray1); - bool passed = TestContinuousIndex(interp, cindex, true, 70); + auto cindex = ContinuousIndexType(darray1); + bool passed = TestContinuousIndex(interp, cindex, true, 70); if (!passed) { @@ -207,7 +207,7 @@ itkInterpolateTest(int, char *[]) // position near image border constexpr itk::SpacePrecisionType epsilon = 1.0e-10; - itk::SpacePrecisionType darray3[3] = { 19 - epsilon, 20, 40 }; + itk::SpacePrecisionType darray3[3] = { 19 - epsilon, 20, 40 }; cindex = ContinuousIndexType(darray3); passed = TestContinuousIndex(interp, cindex, true, 79); diff --git a/Modules/Core/ImageFunction/test/itkLabelImageGaussianInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkLabelImageGaussianInterpolateImageFunctionTest.cxx index 01cad23ef18..15839d356a0 100644 --- a/Modules/Core/ImageFunction/test/itkLabelImageGaussianInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkLabelImageGaussianInterpolateImageFunctionTest.cxx @@ -25,7 +25,7 @@ int itkLabelImageGaussianInterpolateImageFunctionTest(int, char *[]) { - int test_status = EXIT_SUCCESS; + int test_status = EXIT_SUCCESS; constexpr unsigned int Dimension = 2; using PixelType = unsigned short; // Label images should be integer value types using ImageType = itk::Image; @@ -36,10 +36,10 @@ itkLabelImageGaussianInterpolateImageFunctionTest(int, char *[]) using CoordinateType = float; // The ImageSizeToCompute - constexpr double FOV = 10.0; + constexpr double FOV = 10.0; constexpr itk::IndexValueType small_xSize = 3; constexpr itk::IndexValueType small_ySize = 3; - auto small_image = ImageType::New(); + auto small_image = ImageType::New(); { RegionType region; { @@ -106,10 +106,10 @@ itkLabelImageGaussianInterpolateImageFunctionTest(int, char *[]) // ######################## // Now check the results // The ImageSizeToCompute - constexpr unsigned char default_background_value = 17; + constexpr unsigned char default_background_value = 17; constexpr itk::IndexValueType large_xSize = 5 + 1; constexpr itk::IndexValueType large_ySize = 5; - auto large_image = ImageType::New(); + auto large_image = ImageType::New(); { RegionType region; { @@ -191,8 +191,8 @@ itkLabelImageGaussianInterpolateImageFunctionTest(int, char *[]) { for (itk::IndexValueType x = 0; x < large_xSize; ++x) { - const IndexType index = { { x, y } }; - const PixelType known_value = valarray[x][y]; + const IndexType index = { { x, y } }; + const PixelType known_value = valarray[x][y]; ImageType::PointType physPoint; large_image->TransformIndexToPhysicalPoint(index, physPoint); if (interpolator->IsInsideBuffer(physPoint)) diff --git a/Modules/Core/ImageFunction/test/itkLinearInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkLinearInterpolateImageFunctionTest.cxx index 7c4328ceb40..4f2c91376c5 100644 --- a/Modules/Core/ImageFunction/test/itkLinearInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkLinearInterpolateImageFunctionTest.cxx @@ -29,7 +29,7 @@ int RunLinearInterpolateTest() { using PixelType = float; - const unsigned int Dimensions = TDimension; + const unsigned int Dimensions = TDimension; constexpr unsigned int VectorDimension = 4; using VectorPixelType = itk::Vector; using ImageType = itk::Image; @@ -62,7 +62,7 @@ RunLinearInterpolateTest() constexpr IndexType start{}; - SizeType size; + SizeType size; constexpr int dimMaxLength = 3; size.Fill(dimMaxLength); @@ -77,7 +77,7 @@ RunLinearInterpolateTest() variablevectorimage->SetRegions(region); variablevectorimage->Allocate(); - typename ImageType::PointType origin; + typename ImageType::PointType origin; typename ImageType::SpacingType spacing; origin.Fill(0.0); @@ -107,7 +107,7 @@ RunLinearInterpolateTest() // Intensity = f(d1[,d2[,d3[,d4]]]) = 3*d1 [+ d2 [+ d3 [+ d4] ] ] // // - IndexType index; + IndexType index; unsigned int dimIt[4]; std::cout << "Image Data: " << std::endl; for (dimIt[3] = 0; dimIt[3] < dimLengths[3]; dimIt[3]++) @@ -162,7 +162,7 @@ RunLinearInterpolateTest() // The tolerance of the norm must be greater than the tolerance for individual items. const AccumulatorType normTolerance = std::sqrt(4.0f * tolerance * tolerance); - PointType point; + PointType point; AccumulatorType testLengths[4] = { 1, 1, 1, 1 }; for (unsigned int ind = 0; ind < Dimensions; ++ind) { diff --git a/Modules/Core/ImageFunction/test/itkMahalanobisDistanceThresholdImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkMahalanobisDistanceThresholdImageFunctionTest.cxx index baee59e3a0d..7dbe50d8cfe 100644 --- a/Modules/Core/ImageFunction/test/itkMahalanobisDistanceThresholdImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkMahalanobisDistanceThresholdImageFunctionTest.cxx @@ -35,9 +35,9 @@ itkMahalanobisDistanceThresholdImageFunctionTest(int, char *[]) using FunctionType = itk::MahalanobisDistanceThresholdImageFunction; // Create and allocate the image - auto image = ImageType::New(); - ImageType::SizeType size; - ImageType::IndexType start; + auto image = ImageType::New(); + ImageType::SizeType size; + ImageType::IndexType start; ImageType::RegionType region; size[0] = 50; @@ -70,7 +70,7 @@ itkMahalanobisDistanceThresholdImageFunctionTest(int, char *[]) function->SetThreshold(threshold); FunctionType::CovarianceMatrixType covariance(Dimension, Dimension); - FunctionType::MeanVectorType mean(Dimension); + FunctionType::MeanVectorType mean(Dimension); mean[0] = 10.0; mean[1] = 20.0; diff --git a/Modules/Core/ImageFunction/test/itkMeanImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkMeanImageFunctionTest.cxx index f75b108bc70..a99033c0336 100644 --- a/Modules/Core/ImageFunction/test/itkMeanImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkMeanImageFunctionTest.cxx @@ -35,8 +35,8 @@ itkMeanImageFunctionTest(int, char *[]) // Create and allocate the image auto image = ImageType::New(); - ImageType::SizeType size; - ImageType::IndexType start; + ImageType::SizeType size; + ImageType::IndexType start; ImageType::RegionType region; size[0] = 50; diff --git a/Modules/Core/ImageFunction/test/itkMedianImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkMedianImageFunctionTest.cxx index f78107b7a7c..2956015963a 100644 --- a/Modules/Core/ImageFunction/test/itkMedianImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkMedianImageFunctionTest.cxx @@ -31,12 +31,12 @@ itkMedianImageFunctionTest(int, char *[]) using FunctionType = itk::MedianImageFunction; // Create and allocate the image - auto image = ImageType::New(); - ImageType::SizeType size; - ImageType::IndexType start; + auto image = ImageType::New(); + ImageType::SizeType size; + ImageType::IndexType start; ImageType::RegionType region; - constexpr int sizeDim(50); - constexpr int centerIndex(sizeDim / 2); + constexpr int sizeDim(50); + constexpr int centerIndex(sizeDim / 2); size[0] = 50; size[1] = 50; size[2] = 50; @@ -101,7 +101,7 @@ itkMedianImageFunctionTest(int, char *[]) // first, put something in the neighborhood outside the current // neighborhood that will change the median result - unsigned char voxelval(28); + unsigned char voxelval(28); ImageType::IndexType index2; for (index2[0] = centerIndex - 2; index2[0] < centerIndex + 3; index2[0]++) { diff --git a/Modules/Core/ImageFunction/test/itkNearestNeighborInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkNearestNeighborInterpolateImageFunctionTest.cxx index b1e4b337bbd..e7992e408a5 100644 --- a/Modules/Core/ImageFunction/test/itkNearestNeighborInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkNearestNeighborInterpolateImageFunctionTest.cxx @@ -73,7 +73,7 @@ itkNearestNeighborInterpolateImageFunctionTest(int, char *[]) variablevectorimage->SetRegions(region); variablevectorimage->Allocate(); - ImageType::PointType origin; + ImageType::PointType origin; ImageType::SpacingType spacing; origin.Fill(0.0); @@ -141,7 +141,7 @@ itkNearestNeighborInterpolateImageFunctionTest(int, char *[]) variablevectorinterpolator->SetInputImage(variablevectorimage); constexpr double incr = 0.1; - PointType point; + PointType point; for (double yy = 0; yy < static_cast(maxy - 1); ++yy) { @@ -156,8 +156,8 @@ itkNearestNeighborInterpolateImageFunctionTest(int, char *[]) if (interpolator->IsInsideBuffer(point)) { - auto expectedX = itk::Math::Round(xxx); - auto expectedY = itk::Math::Round(yyy); + auto expectedX = itk::Math::Round(xxx); + auto expectedY = itk::Math::Round(yyy); const double expectedValue = static_cast(expectedX) + 3.0 * static_cast(expectedY); // test scalar image @@ -174,8 +174,8 @@ itkNearestNeighborInterpolateImageFunctionTest(int, char *[]) // test image of vectors const InterpolatedVectorType vectorpixel = vectorinterpolator->Evaluate(point); - const auto expectedvector = itk::MakeFilled(expectedValue); - const double errornorm = (expectedvector - vectorpixel).GetNorm(); + const auto expectedvector = itk::MakeFilled(expectedValue); + const double errornorm = (expectedvector - vectorpixel).GetNorm(); if (errornorm > 0) { diff --git a/Modules/Core/ImageFunction/test/itkNeighborhoodOperatorImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkNeighborhoodOperatorImageFunctionTest.cxx index 61d6ec2e34e..1969335eaa7 100644 --- a/Modules/Core/ImageFunction/test/itkNeighborhoodOperatorImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkNeighborhoodOperatorImageFunctionTest.cxx @@ -33,9 +33,9 @@ itkNeighborhoodOperatorImageFunctionTest(int, char *[]) using FunctionType = itk::NeighborhoodOperatorImageFunction; // Create and allocate the image - auto image = ImageType::New(); - ImageType::SizeType size; - ImageType::IndexType start; + auto image = ImageType::New(); + ImageType::SizeType size; + ImageType::IndexType start; ImageType::RegionType region; size[0] = 50; diff --git a/Modules/Core/ImageFunction/test/itkRGBInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkRGBInterpolateImageFunctionTest.cxx index 40e60c9c939..985fb9947e7 100644 --- a/Modules/Core/ImageFunction/test/itkRGBInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkRGBInterpolateImageFunctionTest.cxx @@ -63,7 +63,7 @@ TestGeometricPoint(const InterpolatorType * interp, const PointType & point, boo if (isInside) { - int k; + int k; OutputType value = interp->Evaluate(point); std::cout << " Value: "; for (k = 0; k < VectorDimension - 1; ++k) @@ -101,10 +101,10 @@ TestGeometricPoint(const InterpolatorType * interp, const PointType & point, boo * returns false otherwise */ bool -TestContinuousIndex(const InterpolatorType * interp, +TestContinuousIndex(const InterpolatorType * interp, const ContinuousIndexType & index, - bool isInside, - OutputType trueValue) + bool isInside, + OutputType trueValue) { std::cout << " Index: " << index; @@ -120,7 +120,7 @@ TestContinuousIndex(const InterpolatorType * interp, if (isInside) { - int k; + int k; OutputType value = interp->EvaluateAtContinuousIndex(index); std::cout << " Value: "; for (k = 0; k < VectorDimension - 1; ++k) @@ -171,12 +171,12 @@ itkRGBInterpolateImageFunctionTest(int, char *[]) constexpr unsigned int ImageDimension = RGBInterpolate::ImageDimension; constexpr ImageType::SizeType size = { { 20, 40, 80 } }; - constexpr double origin[3] = { 0.5, 0.5, 0.5 }; - constexpr double spacing[3] = { 0.1, 0.05, 0.025 }; + constexpr double origin[3] = { 0.5, 0.5, 0.5 }; + constexpr double spacing[3] = { 0.1, 0.05, 0.025 }; // Create a test image - auto image = ImageType::New(); + auto image = ImageType::New(); ImageType::RegionType region; region.SetSize(size); @@ -192,7 +192,7 @@ itkRGBInterpolateImageFunctionTest(int, char *[]) for (Iterator iter(image, region); !iter.IsAtEnd(); ++iter) { - IndexType index = iter.GetIndex(); + IndexType index = iter.GetIndex(); unsigned short value = 0; for (unsigned int j = 0; j < ImageDimension; ++j) @@ -221,10 +221,10 @@ itkRGBInterpolateImageFunctionTest(int, char *[]) // an integer position inside the image { itk::SpacePrecisionType darray[3] = { 10, 20, 40 }; - double temp[3] = { 70, 140, 210 }; - auto output = OutputType(temp); - auto cindex = ContinuousIndexType(darray); - bool passed = RGBInterpolate::TestContinuousIndex(interp, cindex, true, output); + double temp[3] = { 70, 140, 210 }; + auto output = OutputType(temp); + auto cindex = ContinuousIndexType(darray); + bool passed = RGBInterpolate::TestContinuousIndex(interp, cindex, true, output); if (!passed) { @@ -242,10 +242,10 @@ itkRGBInterpolateImageFunctionTest(int, char *[]) // position at the image border { itk::SpacePrecisionType darray2[3] = { 0, 20, 40 }; - double temp2[3] = { 60, 120, 180 }; - auto output = OutputType(temp2); - auto cindex = ContinuousIndexType(darray2); - bool passed = RGBInterpolate::TestContinuousIndex(interp, cindex, true, output); + double temp2[3] = { 60, 120, 180 }; + auto output = OutputType(temp2); + auto cindex = ContinuousIndexType(darray2); + bool passed = RGBInterpolate::TestContinuousIndex(interp, cindex, true, output); if (!passed) @@ -264,11 +264,11 @@ itkRGBInterpolateImageFunctionTest(int, char *[]) // position near image border { constexpr itk::SpacePrecisionType epsilon = 1.0e-10; - itk::SpacePrecisionType darray[3] = { 19 - epsilon, 20, 40 }; - double temp[3] = { 79, 158, 237 }; - auto output = OutputType(temp); - auto cindex = ContinuousIndexType(darray); - bool passed = RGBInterpolate::TestContinuousIndex(interp, cindex, true, output); + itk::SpacePrecisionType darray[3] = { 19 - epsilon, 20, 40 }; + double temp[3] = { 79, 158, 237 }; + auto output = OutputType(temp); + auto cindex = ContinuousIndexType(darray); + bool passed = RGBInterpolate::TestContinuousIndex(interp, cindex, true, output); if (!passed) @@ -287,10 +287,10 @@ itkRGBInterpolateImageFunctionTest(int, char *[]) // position outside the image { itk::SpacePrecisionType darray[3] = { 20, 20, 40 }; - double temp[3] = { 1, 1, 1 }; - auto output = OutputType(temp); - auto cindex = ContinuousIndexType(darray); - bool passed = RGBInterpolate::TestContinuousIndex(interp, cindex, false, output); + double temp[3] = { 1, 1, 1 }; + auto output = OutputType(temp); + auto cindex = ContinuousIndexType(darray); + bool passed = RGBInterpolate::TestContinuousIndex(interp, cindex, false, output); if (!passed) @@ -309,10 +309,10 @@ itkRGBInterpolateImageFunctionTest(int, char *[]) // at non-integer position { itk::SpacePrecisionType darray[3] = { 5.25, 12.5, 42.0 }; - double temp[3] = { 59.75, 119.5, 179.25 }; - auto output = OutputType(temp); - auto cindex = ContinuousIndexType(darray); - bool passed = RGBInterpolate::TestContinuousIndex(interp, cindex, true, output); + double temp[3] = { 59.75, 119.5, 179.25 }; + auto output = OutputType(temp); + auto cindex = ContinuousIndexType(darray); + bool passed = RGBInterpolate::TestContinuousIndex(interp, cindex, true, output); if (!passed) { diff --git a/Modules/Core/ImageFunction/test/itkRayCastInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkRayCastInterpolateImageFunctionTest.cxx index f023747d471..a6235ad7e10 100644 --- a/Modules/Core/ImageFunction/test/itkRayCastInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkRayCastInterpolateImageFunctionTest.cxx @@ -40,9 +40,9 @@ itkRayCastInterpolateImageFunctionTest(int itkNotUsed(argc), char * itkNotUsed(a using RegionType = ImageType::RegionType; /* Allocate a simple test image */ - auto image = ImageType::New(); + auto image = ImageType::New(); constexpr IndexType start{}; - SizeType size; + SizeType size; size[0] = 30; size[1] = 30; size[2] = 30; diff --git a/Modules/Core/ImageFunction/test/itkScatterMatrixImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkScatterMatrixImageFunctionTest.cxx index e65f2f8e929..cdb5a5806ab 100644 --- a/Modules/Core/ImageFunction/test/itkScatterMatrixImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkScatterMatrixImageFunctionTest.cxx @@ -33,9 +33,9 @@ itkScatterMatrixImageFunctionTest(int, char *[]) using FunctionType = itk::ScatterMatrixImageFunction; // Create and allocate the image - auto image = ImageType::New(); - ImageType::SizeType size; - ImageType::IndexType start; + auto image = ImageType::New(); + ImageType::SizeType size; + ImageType::IndexType start; ImageType::RegionType region; size[0] = 20; diff --git a/Modules/Core/ImageFunction/test/itkSumOfSquaresImageFunctionGTest.cxx b/Modules/Core/ImageFunction/test/itkSumOfSquaresImageFunctionGTest.cxx index 8c620dc53ec..70b078c0be6 100644 --- a/Modules/Core/ImageFunction/test/itkSumOfSquaresImageFunctionGTest.cxx +++ b/Modules/Core/ImageFunction/test/itkSumOfSquaresImageFunctionGTest.cxx @@ -74,7 +74,7 @@ Expect_EvaluateAtIndex_returns_zero_when_all_pixels_are_zero(const typename TIma template void Expect_EvaluateAtIndex_returns_number_of_neigbors_when_all_pixels_are_one(const typename TImage::SizeType & imageSize, - const unsigned int radius) + const unsigned int radius) { const auto image = TImage::New(); image->SetRegions(imageSize); @@ -106,9 +106,9 @@ TestBasicObjectProperties() imageFunction->SetNeighborhoodRadius(radius); EXPECT_EQ(radius, imageFunction->GetNeighborhoodRadius()); - auto size = TImage::SizeType::Filled(radius); + auto size = TImage::SizeType::Filled(radius); const itk::RectangularImageNeighborhoodShape shape(size); - const unsigned int neighborhoodSize = shape.GetNumberOfOffsets(); + const unsigned int neighborhoodSize = shape.GetNumberOfOffsets(); EXPECT_EQ(neighborhoodSize, imageFunction->GetNeighborhoodSize()); return EXIT_SUCCESS; diff --git a/Modules/Core/ImageFunction/test/itkVarianceImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkVarianceImageFunctionTest.cxx index 71bdf918783..49e59ff43b3 100644 --- a/Modules/Core/ImageFunction/test/itkVarianceImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkVarianceImageFunctionTest.cxx @@ -32,9 +32,9 @@ itkVarianceImageFunctionTest(int, char *[]) using FunctionType = itk::VarianceImageFunction; // Create and allocate the image - auto image = ImageType::New(); - ImageType::SizeType size; - ImageType::IndexType start; + auto image = ImageType::New(); + ImageType::SizeType size; + ImageType::IndexType start; ImageType::RegionType region; size[0] = 50; diff --git a/Modules/Core/ImageFunction/test/itkVectorInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkVectorInterpolateImageFunctionTest.cxx index 0feceab85a7..e823276b21b 100644 --- a/Modules/Core/ImageFunction/test/itkVectorInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkVectorInterpolateImageFunctionTest.cxx @@ -58,7 +58,7 @@ TestGeometricPoint(const InterpolatorType * interp, const PointType & point, boo if (isInside) { - int k; + int k; OutputType value = interp->Evaluate(point); std::cout << " Value: "; for (k = 0; k < VectorDimension - 1; ++k) @@ -97,10 +97,10 @@ TestGeometricPoint(const InterpolatorType * interp, const PointType & point, boo * returns false otherwise */ bool -TestContinuousIndex(const InterpolatorType * interp, +TestContinuousIndex(const InterpolatorType * interp, const ContinuousIndexType & index, - bool isInside, - OutputType trueValue) + bool isInside, + OutputType trueValue) { std::cout << " Index: " << index; @@ -116,7 +116,7 @@ TestContinuousIndex(const InterpolatorType * interp, if (isInside) { - int k; + int k; OutputType value = interp->EvaluateAtContinuousIndex(index); std::cout << " Value: "; for (k = 0; k < VectorDimension - 1; ++k) @@ -157,11 +157,11 @@ itkVectorInterpolateImageFunctionTest(int, char *[]) std::cout << "Testing vector image interpolation: " << std::endl; constexpr ImageType::SizeType size = { { 20, 40, 80 } }; - constexpr double origin[3] = { 0.5, 0.5, 0.5 }; - constexpr double spacing[3] = { 0.1, 0.05, 0.025 }; + constexpr double origin[3] = { 0.5, 0.5, 0.5 }; + constexpr double spacing[3] = { 0.1, 0.05, 0.025 }; // Create a test image - auto image = ImageType::New(); + auto image = ImageType::New(); ImageType::RegionType region; region.SetSize(size); @@ -177,7 +177,7 @@ itkVectorInterpolateImageFunctionTest(int, char *[]) for (Iterator iter(image, region); !iter.IsAtEnd(); ++iter) { - IndexType index = iter.GetIndex(); + IndexType index = iter.GetIndex(); unsigned short value = 0; for (int j = 0; j < ImageDimension; ++j) @@ -205,15 +205,15 @@ itkVectorInterpolateImageFunctionTest(int, char *[]) /* Test evaluation at continuous indices and corresponding geometric points */ std::cout << "Evaluate at: " << std::endl; - OutputType output; + OutputType output; ContinuousIndexType cindex; - PointType point; - bool passed; + PointType point; + bool passed; // an integer position inside the image { itk::SpacePrecisionType darray[3] = { 10, 20, 40 }; - double temp[3] = { 70, 140, 210 }; + double temp[3] = { 70, 140, 210 }; output = OutputType(temp); cindex = ContinuousIndexType(darray); passed = TestContinuousIndex(interp, cindex, true, output); @@ -247,7 +247,7 @@ itkVectorInterpolateImageFunctionTest(int, char *[]) // position at the image border { itk::SpacePrecisionType darray[3] = { 0, 20, 40 }; - double temp[3] = { 60, 120, 180 }; + double temp[3] = { 60, 120, 180 }; output = OutputType(temp); cindex = ContinuousIndexType(darray); passed = TestContinuousIndex(interp, cindex, true, output); @@ -270,7 +270,7 @@ itkVectorInterpolateImageFunctionTest(int, char *[]) { constexpr itk::SpacePrecisionType epsilon = 1.0e-10; constexpr itk::SpacePrecisionType darray[3] = { 19 - epsilon, 20, 40 }; - constexpr double temp[3] = { 79, 158, 237 }; + constexpr double temp[3] = { 79, 158, 237 }; output = OutputType(temp); cindex = ContinuousIndexType(darray); passed = TestContinuousIndex(interp, cindex, true, output); @@ -292,7 +292,7 @@ itkVectorInterpolateImageFunctionTest(int, char *[]) // position outside the image { constexpr itk::SpacePrecisionType darray[3] = { 20, 20, 40 }; - constexpr double temp[3] = { 1, 1, 1 }; + constexpr double temp[3] = { 1, 1, 1 }; output = OutputType(temp); cindex = ContinuousIndexType(darray); passed = TestContinuousIndex(interp, cindex, false, output); @@ -314,7 +314,7 @@ itkVectorInterpolateImageFunctionTest(int, char *[]) // at non-integer position { constexpr itk::SpacePrecisionType darray[3] = { 5.25, 12.5, 42.0 }; - constexpr double temp[3] = { 59.75, 119.5, 179.25 }; + constexpr double temp[3] = { 59.75, 119.5, 179.25 }; output = OutputType(temp); cindex = ContinuousIndexType(darray); passed = TestContinuousIndex(interp, cindex, true, output); diff --git a/Modules/Core/ImageFunction/test/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest.cxx index 6f100e427c9..562bc082ea3 100644 --- a/Modules/Core/ImageFunction/test/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest.cxx @@ -47,9 +47,9 @@ using OutputType = InterpolatorType::OutputType; */ bool TestGeometricPoint(const InterpolatorType * interp, - const PointType & point, - bool itkNotUsed(isInside), - OutputType trueValue) + const PointType & point, + bool itkNotUsed(isInside), + OutputType trueValue) { std::cout << " Point: " << point; @@ -67,7 +67,7 @@ TestGeometricPoint(const InterpolatorType * interp, if (bvalue) { - int k; + int k; OutputType value = interp->Evaluate(point); std::cout << " Value: "; for (k = 0; k < VectorDimension - 1; ++k) @@ -106,10 +106,10 @@ TestGeometricPoint(const InterpolatorType * interp, * returns false otherwise */ bool -TestContinuousIndex(const InterpolatorType * interp, +TestContinuousIndex(const InterpolatorType * interp, const ContinuousIndexType & index, - bool isInside, - OutputType trueValue) + bool isInside, + OutputType trueValue) { std::cout << " Index: " << index; @@ -127,7 +127,7 @@ TestContinuousIndex(const InterpolatorType * interp, if (isInside) { - int k; + int k; OutputType value = interp->EvaluateAtContinuousIndex(index); std::cout << " Value: "; for (k = 0; k < VectorDimension - 1; ++k) @@ -168,11 +168,11 @@ itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest(int, char std::cout << "Testing vector image interpolation: " << std::endl; constexpr ImageType::SizeType size = { { 20, 40, 80 } }; - constexpr double origin[3] = { 0.5, 0.5, 0.5 }; - constexpr double spacing[3] = { 0.1, 0.05, 0.025 }; + constexpr double origin[3] = { 0.5, 0.5, 0.5 }; + constexpr double spacing[3] = { 0.1, 0.05, 0.025 }; // Create a test image - auto image = ImageType::New(); + auto image = ImageType::New(); ImageType::RegionType region; region.SetSize(size); @@ -188,7 +188,7 @@ itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest(int, char for (Iterator iter(image, region); !iter.IsAtEnd(); ++iter) { - IndexType index = iter.GetIndex(); + IndexType index = iter.GetIndex(); unsigned short value = 0; for (int j = 0; j < ImageDimension; ++j) @@ -220,15 +220,15 @@ itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest(int, char /* Test evaluation at continuous indices and corresponding geometric points */ std::cout << "Evaluate at: " << std::endl; - OutputType output; + OutputType output; ContinuousIndexType cindex; - PointType point; - bool passed; + PointType point; + bool passed; // an integer position inside the image { itk::SpacePrecisionType darray[3] = { 10, 20, 40 }; - double temp[3] = { 70, 140, 210 }; + double temp[3] = { 70, 140, 210 }; output = OutputType(temp); cindex = ContinuousIndexType(darray); passed = TestContinuousIndex(interp, cindex, true, output); @@ -262,7 +262,7 @@ itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest(int, char // position at the image border { itk::SpacePrecisionType darray[3] = { 0, 20, 40 }; - double temp[3] = { 60, 120, 180 }; + double temp[3] = { 60, 120, 180 }; output = OutputType(temp); cindex = ContinuousIndexType(darray); passed = TestContinuousIndex(interp, cindex, true, output); @@ -285,7 +285,7 @@ itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest(int, char { constexpr itk::SpacePrecisionType epsilon = 1.0e-10; constexpr itk::SpacePrecisionType darray[3] = { 19 - epsilon, 20, 40 }; - constexpr double temp[3] = { 79, 158, 237 }; + constexpr double temp[3] = { 79, 158, 237 }; output = OutputType(temp); cindex = ContinuousIndexType(darray); passed = TestContinuousIndex(interp, cindex, true, output); @@ -307,7 +307,7 @@ itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest(int, char // position outside the image { constexpr itk::SpacePrecisionType darray[3] = { 20, 20, 40 }; - constexpr double temp[3] = { 79, 158, 237 }; + constexpr double temp[3] = { 79, 158, 237 }; output = OutputType(temp); cindex = ContinuousIndexType(darray); passed = TestContinuousIndex(interp, cindex, false, output); @@ -329,7 +329,7 @@ itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest(int, char // at non-integer position { itk::SpacePrecisionType darray[3] = { 5.25, 12.5, 42.0 }; - double temp[3] = { 59.75, 119.5, 179.25 }; + double temp[3] = { 59.75, 119.5, 179.25 }; output = OutputType(temp); cindex = ContinuousIndexType(darray); passed = TestContinuousIndex(interp, cindex, true, output); diff --git a/Modules/Core/ImageFunction/test/itkVectorMeanImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkVectorMeanImageFunctionTest.cxx index 87c942ba019..142c7fe6a2a 100644 --- a/Modules/Core/ImageFunction/test/itkVectorMeanImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkVectorMeanImageFunctionTest.cxx @@ -34,9 +34,9 @@ itkVectorMeanImageFunctionTest(int, char *[]) using FunctionType = itk::VectorMeanImageFunction; // Create and allocate the image - auto image = ImageType::New(); - ImageType::SizeType size; - ImageType::IndexType start; + auto image = ImageType::New(); + ImageType::SizeType size; + ImageType::IndexType start; ImageType::RegionType region; size[0] = 20; diff --git a/Modules/Core/ImageFunction/test/itkWindowedSincInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkWindowedSincInterpolateImageFunctionTest.cxx index 3c433521b24..4b5a50dc5df 100644 --- a/Modules/Core/ImageFunction/test/itkWindowedSincInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkWindowedSincInterpolateImageFunctionTest.cxx @@ -90,10 +90,10 @@ TestGeometricPoint(const InterpolatorType * interp, const PointType & point, boo * returns false otherwise */ bool -TestContinuousIndex(const InterpolatorType * interp, +TestContinuousIndex(const InterpolatorType * interp, const ContinuousIndexType & index, - bool isInside, - OutputType trueValue) + bool isInside, + OutputType trueValue) { std::cout << " Index: " << index; @@ -146,12 +146,12 @@ itkWindowedSincInterpolateImageFunctionTest(int, char *[]) constexpr unsigned int ImageDimension = SincInterpolate::ImageDimension; constexpr ImageType::SizeType size = { { 20, 40, 80 } }; - constexpr double origin[3] = { 0.5, 0.5, 0.5 }; - constexpr double spacing[3] = { 0.1, 0.05, 0.025 }; + constexpr double origin[3] = { 0.5, 0.5, 0.5 }; + constexpr double spacing[3] = { 0.1, 0.05, 0.025 }; // Create a test image - auto image = ImageType::New(); + auto image = ImageType::New(); ImageType::RegionType region; region.SetSize(size); @@ -166,7 +166,7 @@ itkWindowedSincInterpolateImageFunctionTest(int, char *[]) for (Iterator iter(image, region); !iter.IsAtEnd(); ++iter) { - IndexType index = iter.GetIndex(); + IndexType index = iter.GetIndex(); unsigned short value = 0; for (unsigned int j = 0; j < ImageDimension; ++j) @@ -192,10 +192,10 @@ itkWindowedSincInterpolateImageFunctionTest(int, char *[]) /* Test evaluation at continuous indices and corresponding gemetric points */ std::cout << "Evaluate at: " << std::endl; - OutputType output; + OutputType output; ContinuousIndexType cindex; - PointType point; - bool passed; + PointType point; + bool passed; // an integer position inside the image { @@ -242,7 +242,7 @@ itkWindowedSincInterpolateImageFunctionTest(int, char *[]) // position near image border { constexpr double epsilon = 1.0e-10; - CoordinateType darray[3] = { 19 - epsilon, 20, 40 }; + CoordinateType darray[3] = { 19 - epsilon, 20, 40 }; output = OutputType(79); cindex = ContinuousIndexType(darray); passed = SincInterpolate::TestContinuousIndex(interp, cindex, true, output); diff --git a/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.h b/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.h index 3b6e6447b7d..039163dc353 100644 --- a/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.h +++ b/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.h @@ -363,7 +363,7 @@ class ITK_TEMPLATE_EXPORT AutomaticTopologyMeshSource : public MeshSource, IdentifierType, IdentifierArrayHashFunction, IdentifierArrayEqualsFunction>; PointHashMap m_PointsHashTable{}; - CellHashMap m_CellsHashTable{}; - MeshPointer m_OutputMesh{}; // Retained for convenience. + CellHashMap m_CellsHashTable{}; + MeshPointer m_OutputMesh{}; // Retained for convenience. }; } // end namespace itk diff --git a/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.hxx b/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.hxx index 735b156496a..4f5291c7344 100644 --- a/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.hxx +++ b/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.hxx @@ -43,8 +43,8 @@ auto AutomaticTopologyMeshSource::AddPoint(const PointType & p0) -> IdentifierType { const IdentifierType nextNewPointID = m_OutputMesh->GetNumberOfPoints(); - IdentifierType & pointIDPlusOne = m_PointsHashTable[p0]; - IdentifierType pointID; + IdentifierType & pointIDPlusOne = m_PointsHashTable[p0]; + IdentifierType pointID; if (pointIDPlusOne != 0) { @@ -63,7 +63,7 @@ template auto AutomaticTopologyMeshSource::AddPoint(const CoordinateType * p0) -> IdentifierType { - PointType newPoint; + PointType newPoint; unsigned int i; for (i = 0; i < PointDimension; ++i) @@ -83,9 +83,9 @@ AutomaticTopologyMeshSource::AddPoint(CoordinateType x0, CoordinateType x5) -> IdentifierType { const CoordinateType p0[] = { x0, x1, x2, x3, x4, x5 }; - PointType newPoint; - unsigned int i; - const unsigned int end = (PointDimension < 6 ? PointDimension : 6); + PointType newPoint; + unsigned int i; + const unsigned int end = (PointDimension < 6 ? PointDimension : 6); for (i = 0; i < end; ++i) { @@ -107,7 +107,7 @@ AutomaticTopologyMeshSource::AddVertex(const IdentifierArrayType & // m_PointsHashTable[ foo ] is set to 0 if foo is not found, but I // want the initial identifier to be 0. IdentifierType * cellIDPlusOne = &m_CellsHashTable[pointIDs]; - IdentifierType cellID; + IdentifierType cellID; if (*cellIDPlusOne != 0) { @@ -137,7 +137,7 @@ AutomaticTopologyMeshSource::AddLine(const IdentifierArrayType & po { // Check to see if the cell is already referenced in the hash table. IdentifierType * cellIDPlusOne = &m_CellsHashTable[pointIDs]; - IdentifierType cellID; + IdentifierType cellID; if (*cellIDPlusOne != 0) { @@ -152,7 +152,7 @@ AutomaticTopologyMeshSource::AddLine(const IdentifierArrayType & po // Add the points and vertices, keeping track of the vertex IDs. IdentifierArrayType vertexArray(pointIdsEnd); - IdentifierType i; + IdentifierType i; for (i = 0; i < pointIdsEnd; ++i) { const IdentifierType pointID = pointIDs[i]; @@ -185,7 +185,7 @@ AutomaticTopologyMeshSource::AddTriangle(const IdentifierArrayType { // Check to see if the cell is already referenced in the hash table. IdentifierType * cellIDPlusOne = &m_CellsHashTable[pointIDs]; - IdentifierType cellID; + IdentifierType cellID; if (*cellIDPlusOne != 0) { @@ -197,7 +197,7 @@ AutomaticTopologyMeshSource::AddTriangle(const IdentifierArrayType constexpr IdentifierType pointIdsEnd = 3; constexpr IdentifierType lineIdsEnd = 3; - IdentifierType i; + IdentifierType i; // Construct the cell. CellAutoPointer newCell(new TriangleCell, true); @@ -247,7 +247,7 @@ AutomaticTopologyMeshSource::AddQuadrilateral(const IdentifierArray { // Check to see if the cell is already referenced in the hash table. IdentifierType * cellIDPlusOne = &m_CellsHashTable[pointIDs]; - IdentifierType cellID; + IdentifierType cellID; if (*cellIDPlusOne != 0) { @@ -259,7 +259,7 @@ AutomaticTopologyMeshSource::AddQuadrilateral(const IdentifierArray constexpr IdentifierType pointIdsEnd = 4; constexpr IdentifierType lineIdsEnd = 4; - IdentifierType i; + IdentifierType i; // Construct the cell. CellAutoPointer newCell(new QuadrilateralCell, true); @@ -308,7 +308,7 @@ AutomaticTopologyMeshSource::AddTetrahedron(const IdentifierArrayTy { // Check to see if the cell is already referenced in the hash table. IdentifierType * cellIDPlusOne = &m_CellsHashTable[pointIDs]; - IdentifierType cellID; + IdentifierType cellID; if (*cellIDPlusOne != 0) { @@ -321,7 +321,7 @@ AutomaticTopologyMeshSource::AddTetrahedron(const IdentifierArrayTy constexpr IdentifierType pointIdsEnd = 4; constexpr IdentifierType lineIdsEnd = 6; constexpr IdentifierType faceIdsEnd = 4; - IdentifierType i; + IdentifierType i; // Construct the cell. CellAutoPointer newCell(new TetrahedronCell, true); @@ -385,7 +385,7 @@ AutomaticTopologyMeshSource::AddHexahedron(const IdentifierArrayTyp { // Check to see if the cell is already referenced in the hash table. IdentifierType * cellIDPlusOne = &m_CellsHashTable[pointIDs]; - IdentifierType cellID; + IdentifierType cellID; if (*cellIDPlusOne != 0) { @@ -398,7 +398,7 @@ AutomaticTopologyMeshSource::AddHexahedron(const IdentifierArrayTyp constexpr IdentifierType pointIdsEnd = 8; constexpr IdentifierType lineIdsEnd = 12; constexpr IdentifierType faceIdsEnd = 6; - IdentifierType i; + IdentifierType i; // Construct the cell. CellAutoPointer newCell(new HexahedronCell, true); diff --git a/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.h b/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.h index d11619c2226..eda8e8202d9 100644 --- a/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.h +++ b/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.h @@ -158,7 +158,7 @@ class ITK_TEMPLATE_EXPORT BinaryMask3DMeshSource : public ImageToMeshFilter::AddCells(unsigned char celltype, unsigned char celltran, int index) { - int i; + int i; IdentifierType ** currentrowtmp; IdentifierType ** currentframetmp; @@ -1376,9 +1376,9 @@ BinaryMask3DMeshSource::AddCells(unsigned char celltyp m_AvailableNodes[4] = 1; } - typename TriCell::CellAutoPointer insertCell; + typename TriCell::CellAutoPointer insertCell; typename OutputMeshType::PointIdentifier tripoints[3]; - auto * tp = (unsigned char *)malloc(3 * sizeof(unsigned char)); + auto * tp = (unsigned char *)malloc(3 * sizeof(unsigned char)); auto * tpl = (IdentifierType *)malloc(3 * sizeof(IdentifierType)); @@ -2367,13 +2367,13 @@ BinaryMask3DMeshSource::AddCells(unsigned char celltyp template void -BinaryMask3DMeshSource::AddNodes(int index, - unsigned char * nodesid, - IdentifierType * globalnodesid, +BinaryMask3DMeshSource::AddNodes(int index, + unsigned char * nodesid, + IdentifierType * globalnodesid, IdentifierType ** currentrowtmp, IdentifierType ** currentframetmp) { - int i; + int i; OPointType new_p; for (i = 0; i < 3; ++i) @@ -2595,7 +2595,7 @@ template IdentifierType BinaryMask3DMeshSource::SearchThroughLastRow(int index, int start, int end) { - int mid; + int mid; auto lindex = static_cast(index); if ((end - start) > 1) @@ -2638,8 +2638,8 @@ template IdentifierType BinaryMask3DMeshSource::SearchThroughLastFrame(int index, int start, int end) { - int mid; - auto lindex = static_cast(index); + int mid; + auto lindex = static_cast(index); IdentifierType result = 0; if ((end - start) > 1) diff --git a/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.h b/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.h index 1ef911786af..b26ae9d6180 100644 --- a/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.h +++ b/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.h @@ -259,15 +259,15 @@ class ITK_TEMPLATE_EXPORT ConnectedRegionsMeshFilter : public MeshToMeshFilter m_SeedList{}; std::vector m_RegionList{}; - std::vector m_RegionSizes{}; + std::vector m_RegionSizes{}; - std::vector m_Visited{}; - SizeValueType m_NumberOfCellsInRegion{}; - IdentifierType m_RegionNumber{}; + std::vector m_Visited{}; + SizeValueType m_NumberOfCellsInRegion{}; + IdentifierType m_RegionNumber{}; std::vector * m_Wave{ nullptr }; std::vector * m_Wave2{ nullptr }; }; // class declaration diff --git a/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx b/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx index e54ceae5727..ca245f5aedf 100644 --- a/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx @@ -55,7 +55,7 @@ template void ConnectedRegionsMeshFilter::DeleteSeed(IdentifierType id) { - std::vector tmpVector; + std::vector tmpVector; std::vector::iterator i; for (i = m_SeedList.begin(); i != m_SeedList.end(); ++i) @@ -79,7 +79,7 @@ template void ConnectedRegionsMeshFilter::DeleteSpecifiedRegion(IdentifierType id) { - std::vector tmpVector; + std::vector tmpVector; std::vector::iterator i; for (i = m_RegionList.begin(); i != m_RegionList.end(); ++i) @@ -139,10 +139,10 @@ template void ConnectedRegionsMeshFilter::GenerateData() { - const InputMeshConstPointer input = this->GetInput(); - const OutputMeshPointer output = this->GetOutput(); - const InputMeshPointsContainerConstPointer inPts = input->GetPoints(); - const InputMeshCellsContainerConstPointer inCells = input->GetCells(); + const InputMeshConstPointer input = this->GetInput(); + const OutputMeshPointer output = this->GetOutput(); + const InputMeshPointsContainerConstPointer inPts = input->GetPoints(); + const InputMeshCellsContainerConstPointer inCells = input->GetCells(); const InputMeshCellDataContainerConstPointer inCellData = input->GetCellData(); itkDebugMacro("Executing connectivity"); @@ -181,7 +181,7 @@ ConnectedRegionsMeshFilter::GenerateData() IdentifierType largestRegionId = 0; const int tenth = numCells / 10 + 1; - int cellId = 0; + int cellId = 0; if (m_ExtractionMode != PointSeededRegions && m_ExtractionMode != CellSeededRegions && m_ExtractionMode != ClosestPointRegion) { // visit all cells marking with region number @@ -239,11 +239,11 @@ ConnectedRegionsMeshFilter::GenerateData() else if (m_ExtractionMode == ClosestPointRegion) { // find the closest point - double minDist2 = NumericTraits::max(); + double minDist2 = NumericTraits::max(); InputMeshPointIdentifier minId = 0; for (PointsContainerConstIterator piter = inPts->Begin(); piter != inPts->End(); ++piter) { - const auto x = piter->Value(); + const auto x = piter->Value(); const double dist2 = x.SquaredEuclideanDistanceTo(m_ClosestPoint); if (dist2 < minDist2) { @@ -280,14 +280,14 @@ ConnectedRegionsMeshFilter::GenerateData() // Create output cells // - const InputMeshCellsContainerPointer outCells(InputMeshCellsContainer::New()); + const InputMeshCellsContainerPointer outCells(InputMeshCellsContainer::New()); const InputMeshCellDataContainerPointer outCellData(InputMeshCellDataContainer::New()); cellId = 0; - CellsContainerConstIterator cell; + CellsContainerConstIterator cell; CellDataContainerConstIterator cellData; - const bool CellDataPresent = (nullptr != inCellData && !inCellData->empty()); - InputMeshCellPointer cellCopy; // need an autopointer to duplicate a cell - int inserted_count = 0; + const bool CellDataPresent = (nullptr != inCellData && !inCellData->empty()); + InputMeshCellPointer cellCopy; // need an autopointer to duplicate a cell + int inserted_count = 0; if (m_ExtractionMode == PointSeededRegions || m_ExtractionMode == CellSeededRegions || m_ExtractionMode == ClosestPointRegion || m_ExtractionMode == AllRegions) @@ -316,8 +316,8 @@ ConnectedRegionsMeshFilter::GenerateData() else if (m_ExtractionMode == SpecifiedRegions) { std::vector::iterator i; - IdentifierType regionId; - bool inReg = false; + IdentifierType regionId; + bool inReg = false; if (CellDataPresent) { cellData = inCellData->Begin(); @@ -404,15 +404,15 @@ template void ConnectedRegionsMeshFilter::PropagateConnectedWave() { - const InputMeshConstPointer input = this->GetInput(); - IdentifierType cellId; - InputMeshCellPointer cellPtr; - InputMeshPointIdConstIterator piter; + const InputMeshConstPointer input = this->GetInput(); + IdentifierType cellId; + InputMeshCellPointer cellPtr; + InputMeshPointIdConstIterator piter; const InputMeshCellLinksContainerConstPointer cellLinks = input->GetCellLinks(); - InputMeshCellLinksContainer links; + InputMeshCellLinksContainer links; - std::vector::iterator i; - std::vector * tmpWave; + std::vector::iterator i; + std::vector * tmpWave; typename std::set::iterator citer; while (!m_Wave->empty()) diff --git a/Modules/Core/Mesh/include/itkImageToParametricSpaceFilter.hxx b/Modules/Core/Mesh/include/itkImageToParametricSpaceFilter.hxx index 428b2b60371..f38a29c3e4a 100644 --- a/Modules/Core/Mesh/include/itkImageToParametricSpaceFilter.hxx +++ b/Modules/Core/Mesh/include/itkImageToParametricSpaceFilter.hxx @@ -56,7 +56,7 @@ template void ImageToParametricSpaceFilter::GenerateOutputInformation() { - const OutputMeshPointer mesh = this->GetOutput(); + const OutputMeshPointer mesh = this->GetOutput(); const PointsContainerPointer points = mesh->GetPoints(); PointDataContainerPointer pointData; @@ -70,7 +70,7 @@ ImageToParametricSpaceFilter::GenerateOutputInformatio } const InputImageConstPointer image = this->GetInput(0); - const SizeValueType numberOfPixels = image->GetRequestedRegion().GetNumberOfPixels(); + const SizeValueType numberOfPixels = image->GetRequestedRegion().GetNumberOfPixels(); points->Reserve(numberOfPixels); pointData->Reserve(numberOfPixels); @@ -84,11 +84,11 @@ template void ImageToParametricSpaceFilter::GenerateData() { - const OutputMeshPointer mesh = this->GetOutput(); - const PointsContainerPointer points = mesh->GetPoints(); + const OutputMeshPointer mesh = this->GetOutput(); + const PointsContainerPointer points = mesh->GetPoints(); const PointDataContainerPointer pointData = PointDataContainer::New(); - InputImageConstPointer image = this->GetInput(0); - const InputImageRegionType region = image->GetRequestedRegion(); + InputImageConstPointer image = this->GetInput(0); + const InputImageRegionType region = image->GetRequestedRegion(); const SizeValueType numberOfPixels = region.GetNumberOfPixels(); diff --git a/Modules/Core/Mesh/include/itkInteriorExteriorMeshFilter.hxx b/Modules/Core/Mesh/include/itkInteriorExteriorMeshFilter.hxx index eaf04872ed3..3d2bd774731 100644 --- a/Modules/Core/Mesh/include/itkInteriorExteriorMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkInteriorExteriorMeshFilter.hxx @@ -61,7 +61,7 @@ InteriorExteriorMeshFilter::GenerateD using InputPointDataContainerConstPointer = typename TInputMesh::PointDataContainerConstPointer; - const InputMeshType * inputMesh = this->GetInput(); + const InputMeshType * inputMesh = this->GetInput(); const OutputMeshPointer outputMesh = this->GetOutput(); if (!inputMesh) @@ -82,10 +82,10 @@ InteriorExteriorMeshFilter::GenerateD outputMesh->SetBufferedRegion(outputMesh->GetRequestedRegion()); - const InputPointsContainerConstPointer inPoints = inputMesh->GetPoints(); + const InputPointsContainerConstPointer inPoints = inputMesh->GetPoints(); const InputPointDataContainerConstPointer inData = inputMesh->GetPointData(); - typename InputPointsContainer::ConstIterator inputPoint = inPoints->Begin(); + typename InputPointsContainer::ConstIterator inputPoint = inPoints->Begin(); typename InputPointDataContainer::ConstIterator inputData; bool inputDataExists = false; diff --git a/Modules/Core/Mesh/include/itkMesh.h b/Modules/Core/Mesh/include/itkMesh.h index 1317e8f1f1a..55ffb0cde15 100644 --- a/Modules/Core/Mesh/include/itkMesh.h +++ b/Modules/Core/Mesh/include/itkMesh.h @@ -486,10 +486,10 @@ class ITK_TEMPLATE_EXPORT Mesh : public PointSet::GetCellsArray() -> CellsVectorContain IdentifierType index = 0; for (auto cellItr = m_CellsContainer->Begin(); cellItr != m_CellsContainer->End(); ++cellItr) { - auto cellPointer = cellItr->Value(); + auto cellPointer = cellItr->Value(); const unsigned int numOfPoints = cellPointer->GetNumberOfPoints(); // Insert the cell type @@ -296,7 +296,7 @@ Mesh::GetBoundingBox() const -> const Bound template void -Mesh::SetBoundaryAssignments(int dimension, +Mesh::SetBoundaryAssignments(int dimension, BoundaryAssignmentsContainer * boundaryAssignments) { itkDebugMacro("setting BoundaryAssignments[" << dimension << "] container to " << boundaryAssignments); @@ -413,10 +413,10 @@ Mesh::GetCellData(CellIdentifier cellId, Ce template void -Mesh::SetBoundaryAssignment(int dimension, - CellIdentifier cellId, +Mesh::SetBoundaryAssignment(int dimension, + CellIdentifier cellId, CellFeatureIdentifier featureId, - CellIdentifier boundaryId) + CellIdentifier boundaryId) { const BoundaryAssignmentIdentifier assignId(cellId, featureId); @@ -444,10 +444,10 @@ Mesh::SetBoundaryAssignment(int template bool -Mesh::GetBoundaryAssignment(int dimension, - CellIdentifier cellId, +Mesh::GetBoundaryAssignment(int dimension, + CellIdentifier cellId, CellFeatureIdentifier featureId, - CellIdentifier * boundaryId) const + CellIdentifier * boundaryId) const { const BoundaryAssignmentIdentifier assignId(cellId, featureId); @@ -468,8 +468,8 @@ Mesh::GetBoundaryAssignment(int template bool -Mesh::RemoveBoundaryAssignment(int dimension, - CellIdentifier cellId, +Mesh::RemoveBoundaryAssignment(int dimension, + CellIdentifier cellId, CellFeatureIdentifier featureId) { const BoundaryAssignmentIdentifier assignId(cellId, featureId); @@ -558,10 +558,10 @@ Mesh::Initialize() template bool -Mesh::GetCellBoundaryFeature(int dimension, - CellIdentifier cellId, +Mesh::GetCellBoundaryFeature(int dimension, + CellIdentifier cellId, CellFeatureIdentifier featureId, - CellAutoPointer & boundary) const + CellAutoPointer & boundary) const { /** * First check if the boundary has been explicitly assigned. @@ -606,9 +606,9 @@ Mesh::GetCellBoundaryFeature(int */ template auto -Mesh::GetCellBoundaryFeatureNeighbors(int dimension, - CellIdentifier cellId, - CellFeatureIdentifier featureId, +Mesh::GetCellBoundaryFeatureNeighbors(int dimension, + CellIdentifier cellId, + CellFeatureIdentifier featureId, std::set * cellSet) -> CellIdentifier { @@ -685,7 +685,7 @@ Mesh::GetCellBoundaryFeatureNeighbors(int * Now get the cell links for the first point. */ typename CellType::PointIdConstIterator pointId = boundary->PointIdsBegin(); - PointCellLinksContainer currentCells(m_CellLinksContainer->GetElement(*pointId++)); + PointCellLinksContainer currentCells(m_CellLinksContainer->GetElement(*pointId++)); /** * Next, loop over the other points, and intersect their cell links with @@ -810,7 +810,7 @@ Mesh::GetCellNeighbors(CellIdentifier cellI * Now get the cell links for the first point. */ typename CellType::PointIdConstIterator pointId = cell->PointIdsBegin(); - PointCellLinksContainer currentCells(m_CellLinksContainer->GetElement(*pointId++)); + PointCellLinksContainer currentCells(m_CellLinksContainer->GetElement(*pointId++)); /** * Next, loop over the other points, and intersect their cell links with @@ -864,15 +864,15 @@ Mesh::GetCellNeighbors(CellIdentifier cellI */ template bool -Mesh::GetAssignedCellBoundaryIfOneExists(int dimension, - CellIdentifier cellId, +Mesh::GetAssignedCellBoundaryIfOneExists(int dimension, + CellIdentifier cellId, CellFeatureIdentifier featureId, - CellAutoPointer & boundary) const + CellAutoPointer & boundary) const { if (m_BoundaryAssignmentsContainers[dimension].IsNotNull()) { const BoundaryAssignmentIdentifier assignId(cellId, featureId); - CellIdentifier boundaryId; + CellIdentifier boundaryId; if (m_BoundaryAssignmentsContainers[dimension]->GetElementIfIndexExists(assignId, &boundaryId)) { @@ -946,7 +946,7 @@ Mesh::BuildCellLinks() const for (CellsContainerIterator cellItr = m_CellsContainer->Begin(); cellItr != m_CellsContainer->End(); ++cellItr) { const CellIdentifier cellId = cellItr->Index(); - CellType * cellptr = cellItr->Value(); + CellType * cellptr = cellItr->Value(); /** * For each point, make sure the cell links container has its index, @@ -1033,7 +1033,7 @@ Mesh::ReleaseCellsMemory() // the pointer to the first Cell is assumed to be the // base pointer of the array CellsContainerIterator first = m_CellsContainer->Begin(); - CellType * baseOfCellsArray = first->Value(); + CellType * baseOfCellsArray = first->Value(); delete[] baseOfCellsArray; m_CellsContainer->Initialize(); itkDebugMacro("CellsAllocatedAsADynamicArray"); @@ -1045,7 +1045,7 @@ Mesh::ReleaseCellsMemory() // It is assumed that every cell was allocated independently. // A Cell iterator is created for going through the cells // deleting one by one. - CellsContainerIterator cell = m_CellsContainer->Begin(); + CellsContainerIterator cell = m_CellsContainer->Begin(); const CellsContainerIterator end = m_CellsContainer->End(); while (cell != end) { diff --git a/Modules/Core/Mesh/include/itkMeshToMeshFilter.hxx b/Modules/Core/Mesh/include/itkMeshToMeshFilter.hxx index c20b92364f0..5781bb2775e 100644 --- a/Modules/Core/Mesh/include/itkMeshToMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkMeshToMeshFilter.hxx @@ -66,20 +66,20 @@ template void MeshToMeshFilter::CopyInputMeshToOutputMeshPoints() { - const InputMeshType * inputMesh = this->GetInput(); + const InputMeshType * inputMesh = this->GetInput(); const OutputMeshPointer outputMesh = this->GetOutput(); using OutputPointsContainer = typename TOutputMesh::PointsContainer; using InputPointsContainer = typename TInputMesh::PointsContainer; - auto outputPoints = OutputPointsContainer::New(); + auto outputPoints = OutputPointsContainer::New(); const InputPointsContainer * inputPoints = inputMesh->GetPoints(); if (inputPoints) { outputPoints->Reserve(inputPoints->Size()); - typename InputPointsContainer::ConstIterator inputItr = inputPoints->Begin(); + typename InputPointsContainer::ConstIterator inputItr = inputPoints->Begin(); const typename InputPointsContainer::ConstIterator inputEnd = inputPoints->End(); typename OutputPointsContainer::Iterator outputItr = outputPoints->Begin(); @@ -99,20 +99,20 @@ template void MeshToMeshFilter::CopyInputMeshToOutputMeshPointData() { - const InputMeshType * inputMesh = this->GetInput(); + const InputMeshType * inputMesh = this->GetInput(); const OutputMeshPointer outputMesh = this->GetOutput(); using OutputPointDataContainer = typename TOutputMesh::PointDataContainer; using InputPointDataContainer = typename TInputMesh::PointDataContainer; - auto outputPointData = OutputPointDataContainer::New(); + auto outputPointData = OutputPointDataContainer::New(); const InputPointDataContainer * inputPointData = inputMesh->GetPointData(); if (inputPointData) { outputPointData->Reserve(inputPointData->Size()); - typename InputPointDataContainer::ConstIterator inputItr = inputPointData->Begin(); + typename InputPointDataContainer::ConstIterator inputItr = inputPointData->Begin(); const typename InputPointDataContainer::ConstIterator inputEnd = inputPointData->End(); typename OutputPointDataContainer::Iterator outputItr = outputPointData->Begin(); @@ -132,20 +132,20 @@ template void MeshToMeshFilter::CopyInputMeshToOutputMeshCellLinks() { - const InputMeshType * inputMesh = this->GetInput(); + const InputMeshType * inputMesh = this->GetInput(); const OutputMeshPointer outputMesh = this->GetOutput(); using OutputCellLinksContainer = typename TOutputMesh::CellLinksContainer; using InputCellLinksContainer = typename TInputMesh::CellLinksContainer; - auto outputCellLinks = OutputCellLinksContainer::New(); + auto outputCellLinks = OutputCellLinksContainer::New(); const InputCellLinksContainer * inputCellLinks = inputMesh->GetCellLinks(); if (inputCellLinks) { outputCellLinks->Reserve(inputCellLinks->Size()); - typename InputCellLinksContainer::ConstIterator inputItr = inputCellLinks->Begin(); + typename InputCellLinksContainer::ConstIterator inputItr = inputCellLinks->Begin(); const typename InputCellLinksContainer::ConstIterator inputEnd = inputCellLinks->End(); typename OutputCellLinksContainer::Iterator outputItr = outputCellLinks->Begin(); @@ -165,7 +165,7 @@ template void MeshToMeshFilter::CopyInputMeshToOutputMeshCells() { - const InputMeshType * inputMesh = this->GetInput(); + const InputMeshType * inputMesh = this->GetInput(); const OutputMeshPointer outputMesh = this->GetOutput(); using OutputCellsContainer = typename TOutputMesh::CellsContainer; @@ -174,14 +174,14 @@ MeshToMeshFilter::CopyInputMeshToOutputMeshCells() outputMesh->SetCellsAllocationMethod(MeshEnums::MeshClassCellsAllocationMethod::CellsAllocatedDynamicallyCellByCell); - auto outputCells = OutputCellsContainer::New(); + auto outputCells = OutputCellsContainer::New(); const InputCellsContainer * inputCells = inputMesh->GetCells(); if (inputCells) { outputCells->Reserve(inputCells->Size()); - typename InputCellsContainer::ConstIterator inputItr = inputCells->Begin(); + typename InputCellsContainer::ConstIterator inputItr = inputCells->Begin(); const typename InputCellsContainer::ConstIterator inputEnd = inputCells->End(); typename OutputCellsContainer::Iterator outputItr = outputCells->Begin(); @@ -208,20 +208,20 @@ template void MeshToMeshFilter::CopyInputMeshToOutputMeshCellData() { - const InputMeshType * inputMesh = this->GetInput(); + const InputMeshType * inputMesh = this->GetInput(); const OutputMeshPointer outputMesh = this->GetOutput(); using OutputCellDataContainer = typename TOutputMesh::CellDataContainer; using InputCellDataContainer = typename TInputMesh::CellDataContainer; - auto outputCellData = OutputCellDataContainer::New(); + auto outputCellData = OutputCellDataContainer::New(); const InputCellDataContainer * inputCellData = inputMesh->GetCellData(); if (inputCellData) { outputCellData->Reserve(inputCellData->Size()); - typename InputCellDataContainer::ConstIterator inputItr = inputCellData->Begin(); + typename InputCellDataContainer::ConstIterator inputItr = inputCellData->Begin(); const typename InputCellDataContainer::ConstIterator inputEnd = inputCellData->End(); typename OutputCellDataContainer::Iterator outputItr = outputCellData->Begin(); diff --git a/Modules/Core/Mesh/include/itkParametricSpaceToImageSpaceMeshFilter.hxx b/Modules/Core/Mesh/include/itkParametricSpaceToImageSpaceMeshFilter.hxx index 3ec0811767f..628e6ed7a79 100644 --- a/Modules/Core/Mesh/include/itkParametricSpaceToImageSpaceMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkParametricSpaceToImageSpaceMeshFilter.hxx @@ -51,7 +51,7 @@ ParametricSpaceToImageSpaceMeshFilter::GenerateData() using OutputPointDataContainerPointer = typename TOutputMesh::PointDataContainerPointer; - const InputMeshType * inputMesh = this->GetInput(); + const InputMeshType * inputMesh = this->GetInput(); const OutputMeshPointer outputMesh = this->GetOutput(); if (!inputMesh) @@ -66,12 +66,12 @@ ParametricSpaceToImageSpaceMeshFilter::GenerateData() outputMesh->SetBufferedRegion(outputMesh->GetRequestedRegion()); - const InputPointsContainer * inPoints = inputMesh->GetPoints(); + const InputPointsContainer * inPoints = inputMesh->GetPoints(); const OutputPointsContainerPointer outPoints = OutputPointsContainer::New(); outPoints->Reserve(inputMesh->GetNumberOfPoints()); - const InputPointDataContainer * inData = inputMesh->GetPointData(); + const InputPointDataContainer * inData = inputMesh->GetPointData(); const OutputPointDataContainerPointer outData = OutputPointDataContainer::New(); outData->Reserve(inputMesh->GetNumberOfPoints()); @@ -89,11 +89,11 @@ ParametricSpaceToImageSpaceMeshFilter::GenerateData() return; } - typename InputPointsContainer::ConstIterator inputPointIt = inPoints->Begin(); + typename InputPointsContainer::ConstIterator inputPointIt = inPoints->Begin(); const typename InputPointsContainer::ConstIterator inputPointEnd = inPoints->End(); - typename InputPointDataContainer::ConstIterator inputDataIt = inData->Begin(); + typename InputPointDataContainer::ConstIterator inputDataIt = inData->Begin(); - typename OutputPointsContainer::Iterator outputPointIt = outPoints->Begin(); + typename OutputPointsContainer::Iterator outputPointIt = outPoints->Begin(); typename OutputPointDataContainer::Iterator outputDataIt = outData->Begin(); // support progress methods/callbacks diff --git a/Modules/Core/Mesh/include/itkRegularSphereMeshSource.hxx b/Modules/Core/Mesh/include/itkRegularSphereMeshSource.hxx index f7ee850085b..fad141fdfa4 100644 --- a/Modules/Core/Mesh/include/itkRegularSphereMeshSource.hxx +++ b/Modules/Core/Mesh/include/itkRegularSphereMeshSource.hxx @@ -53,7 +53,7 @@ RegularSphereMeshSource::GenerateData() const PointsContainerPointer myPoints = outputMesh->GetPoints(); - PointType p1; + PointType p1; IdentifierType idx = 0; p1[0] = 1 * m_Scale[0] + m_Center[0]; @@ -142,18 +142,18 @@ RegularSphereMeshSource::GenerateData() for (i = 0; i < m_Resolution; ++i) { const typename OutputMeshType::CellsContainerPointer myCells = outputMesh->GetCells(); - typename OutputMeshType::CellsContainer::Iterator cells = myCells->Begin(); + typename OutputMeshType::CellsContainer::Iterator cells = myCells->Begin(); - auto result = OutputMeshType::New(); - PointType v[3]; + auto result = OutputMeshType::New(); + PointType v[3]; PointType * v_pt[3]; v_pt[0] = &v[0]; v_pt[1] = &v[1]; v_pt[2] = &v[2]; - IdentifierType cellIdx = 0; + IdentifierType cellIdx = 0; const IdentifierType pointIdxOffset = outputMesh->GetNumberOfPoints(); - IdentifierType pointIdx = pointIdxOffset; - IdentifierType newIdx[3] = { 0, 1, 2 }; + IdentifierType pointIdx = pointIdxOffset; + IdentifierType newIdx[3] = { 0, 1, 2 }; // container for the processed edges // when subdividing a triangle, the corresponding subdivided @@ -348,9 +348,9 @@ RegularSphereMeshSource::Divide(const PointType & p1, const PointTy template void -RegularSphereMeshSource::AddCell(OutputMeshType * mesh, +RegularSphereMeshSource::AddCell(OutputMeshType * mesh, const typename OutputMeshType::PointIdentifier * pointIds, - IdentifierType idx) + IdentifierType idx) { CellAutoPointer testCell(new TriCellType, true); diff --git a/Modules/Core/Mesh/include/itkSimplexMesh.hxx b/Modules/Core/Mesh/include/itkSimplexMesh.hxx index 6239d9db3e9..0e99f5da50e 100644 --- a/Modules/Core/Mesh/include/itkSimplexMesh.hxx +++ b/Modules/Core/Mesh/include/itkSimplexMesh.hxx @@ -40,8 +40,8 @@ SimplexMesh::~SimplexMesh() { itkDebugMacro("Mesh Destructor "); - const GeometryMapPointer geometryMap = this->GetGeometryData(); - GeometryMapIterator pointDataIterator = geometryMap->Begin(); + const GeometryMapPointer geometryMap = this->GetGeometryData(); + GeometryMapIterator pointDataIterator = geometryMap->Begin(); const GeometryMapIterator pointDataEnd = geometryMap->End(); while (pointDataIterator != pointDataEnd) @@ -176,7 +176,7 @@ auto SimplexMesh::AddEdge(PointIdentifier startPointId, PointIdentifier endPointId) -> CellIdentifier { - CellAutoPointer NewCellPointer(new LineType, true); + CellAutoPointer NewCellPointer(new LineType, true); const CellIdentifier edgeId = m_LastCellId; NewCellPointer->SetPointId(0, startPointId); @@ -198,7 +198,7 @@ SimplexMesh::AddFace(CellAutoPointer & cell template auto -SimplexMesh::ReplaceFace(CellIdentifier replaceIndex, +SimplexMesh::ReplaceFace(CellIdentifier replaceIndex, CellAutoPointer & cellPointer) -> CellIdentifier { // Release previous cell, if any. @@ -227,7 +227,7 @@ SimplexMesh::PrintSelf(std::ostream & os, I template void -SimplexMesh::SetGeometryData(PointIdentifier pointId, +SimplexMesh::SetGeometryData(PointIdentifier pointId, SimplexMeshGeometry * geometryData) { SimplexMeshGeometry * oldGeometryData; @@ -247,8 +247,8 @@ SimplexMesh::GetNeighbors(PointIdentifier i template auto -SimplexMesh::GetNeighbors(PointIdentifier idx, - unsigned int radius, +SimplexMesh::GetNeighbors(PointIdentifier idx, + unsigned int radius, NeighborListType * list) const -> NeighborListType * { if (list == nullptr) @@ -364,8 +364,8 @@ SimplexMesh::SwapNeighbors(PointIdentifier PointIdentifier secondIdx) { SimplexMeshGeometry * data = m_GeometryData->GetElement(pointIdx); - int firstFound = -1; - int secondFound = -1; + int firstFound = -1; + int secondFound = -1; for (int i = 0; i < 3; ++i) { diff --git a/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.h b/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.h index c16b30cca71..fc800e97cf7 100644 --- a/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.h +++ b/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.h @@ -98,11 +98,11 @@ class ITK_TEMPLATE_EXPORT SimplexMeshAdaptTopologyFilter : public MeshToMeshFilt class SimplexCellVisitor { public: - InputMeshPointer mesh; - double totalArea; - double totalCurvature; - double minCellSize; - double maxCellSize; + InputMeshPointer mesh; + double totalArea; + double totalCurvature; + double minCellSize; + double maxCellSize; typename DoubleValueMapType::Pointer areaMap; typename DoubleValueMapType::Pointer curvatureMap; @@ -129,9 +129,9 @@ class ITK_TEMPLATE_EXPORT SimplexMeshAdaptTopologyFilter : public MeshToMeshFilt { typename InputPolygonType::PointIdIterator it = poly->PointIdsBegin(); - double meanCurvature = 0; + double meanCurvature = 0; const PointIdentifier refPoint = *it; - double val = mesh->GetMeanCurvature(*it++); + double val = mesh->GetMeanCurvature(*it++); meanCurvature += itk::Math::abs(val); PointIdentifier id1 = *it; diff --git a/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.hxx b/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.hxx index cd970eed42e..43bc7bcbd63 100644 --- a/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.hxx +++ b/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.hxx @@ -65,7 +65,7 @@ template void SimplexMeshAdaptTopologyFilter::CopyInputMeshToOutputMeshGeometryData() { - const InputMeshType * inputMesh = this->GetInput(); + const InputMeshType * inputMesh = this->GetInput(); const OutputMeshPointer outputMesh = this->GetOutput(); const PointIdentifier numberOfPoints = inputMesh->GetNumberOfPoints(); @@ -84,7 +84,7 @@ SimplexMeshAdaptTopologyFilter::CopyInputMeshToOutputMe for (PointIdentifier pointId = 0; pointId < numberOfPoints; ++pointId) { - auto * outputGeometryDataItem = new SimplexMeshGeometry; + auto * outputGeometryDataItem = new SimplexMeshGeometry; SimplexMeshGeometry * inputGeometryDataItem = inputGeometryItr.Value(); outputGeometryDataItem->CopyFrom(*inputGeometryDataItem); outputGeometryData->InsertElement(pointId, outputGeometryDataItem); @@ -112,9 +112,9 @@ SimplexMeshAdaptTopologyFilter::ComputeCellParameters() outputMesh->Accept(mv); const typename DoubleValueMapType::Pointer areas = simplexVisitor->GetAreaMap(); - DoubleContainerIterator areaIt = areas->Begin(); + DoubleContainerIterator areaIt = areas->Begin(); const typename DoubleValueMapType::Pointer curvatures = simplexVisitor->GetCurvatureMap(); - DoubleContainerIterator curvatureIt = curvatures->Begin(); + DoubleContainerIterator curvatureIt = curvatures->Begin(); const double averageCurvature = simplexVisitor->GetTotalMeanCurvature(); @@ -243,8 +243,8 @@ SimplexMeshAdaptTopologyFilter::ComputeCellParameters() outputMesh->AddEdge(firstNewIndex, secondNewIndex); // splitting cell - PointIdentifier newPointIndex{}; - auto * polygon = new OutputPolygonType; + PointIdentifier newPointIndex{}; + auto * polygon = new OutputPolygonType; InputCellAutoPointer newPolygonPointer1; newPolygonPointer1.TakeOwnership(polygon); @@ -292,15 +292,15 @@ SimplexMeshAdaptTopologyFilter::ComputeCellParameters() template void -SimplexMeshAdaptTopologyFilter::ModifyNeighborCells(CellIdentifier id1, - CellIdentifier id2, +SimplexMeshAdaptTopologyFilter::ModifyNeighborCells(CellIdentifier id1, + CellIdentifier id2, PointIdentifier insertPointId) { const OutputMeshPointer outputMesh = this->GetOutput(); std::set cells1 = outputMesh->GetCellLinks()->GetElement(id1); std::set cells2 = outputMesh->GetCellLinks()->GetElement(id2); - auto cellIt = cells1.begin(); + auto cellIt = cells1.begin(); std::set result; @@ -324,8 +324,8 @@ SimplexMeshAdaptTopologyFilter::ModifyNeighborCells(Cel if (nextCell->GetNumberOfPoints() == 2) { InputCellPointIdIterator lineIt = nextCell->PointIdsBegin(); - const PointIdentifier first = *lineIt++; - const PointIdentifier second = *lineIt; + const PointIdentifier first = *lineIt++; + const PointIdentifier second = *lineIt; outputMesh->AddEdge(first, insertPointId); outputMesh->AddEdge(insertPointId, second); @@ -339,9 +339,9 @@ SimplexMeshAdaptTopologyFilter::ModifyNeighborCells(Cel { m_NewSimplexCellPointer.TakeOwnership(new OutputPolygonType); InputPolygonPointIdIterator pointIt = nextCell->PointIdsBegin(); - PointIdentifier cnt{}; - PointIdentifier first = *pointIt++; - const PointIdentifier startId = first; + PointIdentifier cnt{}; + PointIdentifier first = *pointIt++; + const PointIdentifier startId = first; PointIdentifier second = 0; @@ -395,7 +395,7 @@ auto SimplexMeshAdaptTopologyFilter::ComputeCellCenter(InputCellAutoPointer & simplexCell) -> InputPointType { - const OutputMeshPointer outputMesh = this->GetOutput(); + const OutputMeshPointer outputMesh = this->GetOutput(); InputPolygonPointIdIterator pointIt = simplexCell->PointIdsBegin(); InputPointType p1{}; diff --git a/Modules/Core/Mesh/include/itkSimplexMeshToTriangleMeshFilter.h b/Modules/Core/Mesh/include/itkSimplexMeshToTriangleMeshFilter.h index 1aa0cfd69da..2b1eb4f1d83 100644 --- a/Modules/Core/Mesh/include/itkSimplexMeshToTriangleMeshFilter.h +++ b/Modules/Core/Mesh/include/itkSimplexMeshToTriangleMeshFilter.h @@ -112,7 +112,7 @@ class ITK_TEMPLATE_EXPORT SimplexMeshToTriangleMeshFilter : public MeshToMeshFil { using PointIdIterator = typename SimplexPolygonType::PointIdIterator; PointIdIterator it = poly->PointIdsBegin(); - InputPointType center{}; + InputPointType center{}; InputPointType p{}; @@ -144,7 +144,7 @@ class ITK_TEMPLATE_EXPORT SimplexMeshToTriangleMeshFilter : public MeshToMeshFil protected: InputMeshConstPointer m_Mesh; - PointMapPointer m_CenterMap; + PointMapPointer m_CenterMap; }; using SimplexVisitorInterfaceType = itk:: diff --git a/Modules/Core/Mesh/include/itkSimplexMeshToTriangleMeshFilter.hxx b/Modules/Core/Mesh/include/itkSimplexMeshToTriangleMeshFilter.hxx index 7441ef87066..9996c8a9d97 100644 --- a/Modules/Core/Mesh/include/itkSimplexMeshToTriangleMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkSimplexMeshToTriangleMeshFilter.hxx @@ -50,7 +50,7 @@ SimplexMeshToTriangleMeshFilter::CreateTriangles() { auto meshSource = AutoMeshSourceType::New(); - const typename TInputMesh::ConstPointer inputMesh = this->GetInput(0); + const typename TInputMesh::ConstPointer inputMesh = this->GetInput(0); const typename InputPointsContainer::ConstPointer points = inputMesh->GetPoints(); typename TInputMesh::PointsContainerConstIterator pointsIt = points->Begin(); @@ -65,11 +65,11 @@ SimplexMeshToTriangleMeshFilter::CreateTriangles() const CellIdentifier newId3 = FindCellId(n[2], pointsIt.Index(), n[0]); typename AutoMeshSourceType::PointType p1; - const bool b1 = m_Centers->GetElementIfIndexExists(newId1, &p1); + const bool b1 = m_Centers->GetElementIfIndexExists(newId1, &p1); typename AutoMeshSourceType::PointType p2; - const bool b2 = m_Centers->GetElementIfIndexExists(newId2, &p2); + const bool b2 = m_Centers->GetElementIfIndexExists(newId2, &p2); typename AutoMeshSourceType::PointType p3; - const bool b3 = m_Centers->GetElementIfIndexExists(newId3, &p3); + const bool b3 = m_Centers->GetElementIfIndexExists(newId3, &p3); meshSource->AddTriangle(p1, p2, p3); @@ -93,7 +93,7 @@ SimplexMeshToTriangleMeshFilter::FindCellId(CellIdentif std::set cells1 = this->GetInput(0)->GetCellLinks()->GetElement(id1); std::set cells2 = this->GetInput(0)->GetCellLinks()->GetElement(id2); std::set cells3 = this->GetInput(0)->GetCellLinks()->GetElement(id3); - auto cellIt = cells1.begin(); + auto cellIt = cells1.begin(); while (cellIt != cells1.end()) { diff --git a/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.h b/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.h index fbaa812f10e..1342ab9cd9d 100644 --- a/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.h +++ b/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.h @@ -121,8 +121,8 @@ class ITK_TEMPLATE_EXPORT SimplexMeshVolumeCalculator : public Object { using PointIdIterator = typename SimplexPolygonType::PointIdIterator; PointIdIterator it = poly->PointIdsBegin(); - InputPointType center{}; - InputPointType p{}; + InputPointType center{}; + InputPointType p{}; while (it != poly->PointIdsEnd()) { @@ -152,7 +152,7 @@ class ITK_TEMPLATE_EXPORT SimplexMeshVolumeCalculator : public Object protected: InputMeshPointer m_Mesh; - PointMapPointer m_CenterMap; + PointMapPointer m_CenterMap; }; using SimplexVisitorInterfaceType = itk:: diff --git a/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.hxx b/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.hxx index 2e5cb52b531..1d1b25a5c53 100644 --- a/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.hxx +++ b/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.hxx @@ -223,8 +223,8 @@ SimplexMeshVolumeCalculator::Compute() InputPointType p2{}; InputPointType p3{}; - const InputPointsContainerPointer Points = m_SimplexMesh->GetPoints(); - InputPointsContainerIterator pointsIt = Points->Begin(); + const InputPointsContainerPointer Points = m_SimplexMesh->GetPoints(); + InputPointsContainerIterator pointsIt = Points->Begin(); const InputPointsContainerIterator pointsEnd = Points->End(); while (pointsIt != pointsEnd) diff --git a/Modules/Core/Mesh/include/itkSphereMeshSource.hxx b/Modules/Core/Mesh/include/itkSphereMeshSource.hxx index 41b09a878dd..f0afc9fa570 100644 --- a/Modules/Core/Mesh/include/itkSphereMeshSource.hxx +++ b/Modules/Core/Mesh/include/itkSphereMeshSource.hxx @@ -71,7 +71,7 @@ SphereMeshSource::GenerateData() outputMesh->SetCellsAllocationMethod(MeshEnums::MeshClassCellsAllocationMethod::CellsAllocatedDynamicallyCellByCell); - const PointsContainerPointer myPoints = outputMesh->GetPoints(); + const PointsContainerPointer myPoints = outputMesh->GetPoints(); typename PointsContainer::Iterator point = myPoints->Begin(); OPointType p1; diff --git a/Modules/Core/Mesh/include/itkTransformMeshFilter.hxx b/Modules/Core/Mesh/include/itkTransformMeshFilter.hxx index fb938c19383..9484520dc90 100644 --- a/Modules/Core/Mesh/include/itkTransformMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkTransformMeshFilter.hxx @@ -58,7 +58,7 @@ TransformMeshFilter::GenerateData() using InputPointsContainerConstPointer = typename TInputMesh::PointsContainerConstPointer; using OutputPointsContainerPointer = typename TOutputMesh::PointsContainerPointer; - const InputMeshType * inputMesh = this->GetInput(); + const InputMeshType * inputMesh = this->GetInput(); const OutputMeshPointer outputMesh = this->GetOutput(); if (!inputMesh) @@ -79,14 +79,14 @@ TransformMeshFilter::GenerateData() outputMesh->SetBufferedRegion(outputMesh->GetRequestedRegion()); const InputPointsContainerConstPointer inPoints = inputMesh->GetPoints(); - const OutputPointsContainerPointer outPoints = outputMesh->GetPoints(); + const OutputPointsContainerPointer outPoints = outputMesh->GetPoints(); outPoints->Reserve(inputMesh->GetNumberOfPoints()); outPoints->Squeeze(); // in case the previous mesh had // allocated a larger memory typename InputPointsContainer::ConstIterator inputPoint = inPoints->Begin(); - typename OutputPointsContainer::Iterator outputPoint = outPoints->Begin(); + typename OutputPointsContainer::Iterator outputPoint = outPoints->Begin(); while (inputPoint != inPoints->End()) { diff --git a/Modules/Core/Mesh/include/itkTriangleMeshCurvatureCalculator.h b/Modules/Core/Mesh/include/itkTriangleMeshCurvatureCalculator.h index c8fbd2ab601..d26120343d9 100644 --- a/Modules/Core/Mesh/include/itkTriangleMeshCurvatureCalculator.h +++ b/Modules/Core/Mesh/include/itkTriangleMeshCurvatureCalculator.h @@ -54,7 +54,7 @@ class TriangleMeshCurvatureCalculatorEnums }; extern ITKMesh_EXPORT std::ostream & - operator<<(std::ostream & out, const TriangleMeshCurvatureCalculatorEnums::Curvatures value); +operator<<(std::ostream & out, const TriangleMeshCurvatureCalculatorEnums::Curvatures value); /** \class TriangleMeshCurvatureCalculator * \brief @@ -134,9 +134,9 @@ class ITK_TEMPLATE_EXPORT TriangleMeshCurvatureCalculator : public Object ComputeGaussCurvature(const InputMeshType * inputMesh); private: - CurvaturesEnum m_CurvatureType = CurvaturesEnum::GaussCurvature; + CurvaturesEnum m_CurvatureType = CurvaturesEnum::GaussCurvature; DoubleVectorContainerPointer m_GaussCurvatureData{}; - MeshConstPointer m_TriangleMesh{}; + MeshConstPointer m_TriangleMesh{}; }; } // namespace itk diff --git a/Modules/Core/Mesh/include/itkTriangleMeshCurvatureCalculator.hxx b/Modules/Core/Mesh/include/itkTriangleMeshCurvatureCalculator.hxx index b2ee5673a1d..f9b4ca404b2 100644 --- a/Modules/Core/Mesh/include/itkTriangleMeshCurvatureCalculator.hxx +++ b/Modules/Core/Mesh/include/itkTriangleMeshCurvatureCalculator.hxx @@ -78,8 +78,8 @@ TriangleMeshCurvatureCalculator::ComputeGaussCurvature(const InputMe { const unsigned int numberOfPoints = inputMesh->GetNumberOfPoints(); - const auto K = make_unique_for_overwrite(numberOfPoints); - const auto dA = std::make_unique(numberOfPoints); + const auto K = make_unique_for_overwrite(numberOfPoints); + const auto dA = std::make_unique(numberOfPoints); const double pi2 = itk::Math::twopi; for (unsigned int k = 0; k < numberOfPoints; ++k) { @@ -87,12 +87,12 @@ TriangleMeshCurvatureCalculator::ComputeGaussCurvature(const InputMe } const CellsContainerConstPointer outCells = inputMesh->GetCells(); - CellsContainerConstIterator cellsItr = outCells->Begin(); + CellsContainerConstIterator cellsItr = outCells->Begin(); while (cellsItr != outCells->End()) { CellType * cellPointer = cellsItr.Value(); - auto * triangleCellPointer = dynamic_cast(cellPointer); + auto * triangleCellPointer = dynamic_cast(cellPointer); if (triangleCellPointer == nullptr) { itkExceptionMacro("Input Mesh is not a Triangle Mesh"); diff --git a/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.h b/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.h index 9cb41f3c77b..85e18482d79 100644 --- a/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.h +++ b/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.h @@ -34,7 +34,7 @@ class Point1D { public: double m_X; - int m_Sign; + int m_Sign; Point1D() = default; Point1D(const double p, const int s) diff --git a/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx b/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx index 807a4ae8318..b39c01ac4cc 100644 --- a/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx +++ b/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx @@ -86,7 +86,7 @@ void TriangleMeshToBinaryImageFilter::SetSpacing(const float spacing[3]) { const Vector sf(spacing); - SpacingType s; + SpacingType s; s.CastFrom(sf); this->SetSpacing(s); } @@ -105,7 +105,7 @@ void TriangleMeshToBinaryImageFilter::SetOrigin(const float origin[3]) { const Point of(origin); - PointType p; + PointType p; p.CastFrom(of); this->SetOrigin(p); } @@ -176,23 +176,23 @@ TriangleMeshToBinaryImageFilter::GenerateData() template int -TriangleMeshToBinaryImageFilter::PolygonToImageRaster(PointVector coords, +TriangleMeshToBinaryImageFilter::PolygonToImageRaster(PointVector coords, Point1DArray & zymatrix, - int extent[6]) + int extent[6]) { // convert the polygon into a rasterizable form by finding its // intersection with each z plane, and store the (x,y) coords // of each intersection in a vector called "matrix" - const int zSize = extent[5] - extent[4] + 1; - const int zInc = extent[3] - extent[2] + 1; + const int zSize = extent[5] - extent[4] + 1; + const int zInc = extent[3] - extent[2] + 1; Point2DArray matrix(zSize); // each iteration of the following loop examines one edge of the // polygon, where the endpoints of the edge are p1 and p2 - auto n = static_cast(coords.size()); + auto n = static_cast(coords.size()); PointType p0 = coords[0]; PointType p1 = coords[n - 1]; - double area = 0.0; + double area = 0.0; for (int i = 0; i < n; ++i) { @@ -238,7 +238,7 @@ TriangleMeshToBinaryImageFilter::PolygonToImageRaster( { const double r = (p2[2] - static_cast(z)) * temp; const double f = 1.0 - r; - Point2DType XY; + Point2DType XY; XY[0] = r * p1[0] + f * p2[0]; XY[1] = r * p1[1] + f * p2[1]; matrix[z - extent[4]].push_back(XY); @@ -283,19 +283,19 @@ TriangleMeshToBinaryImageFilter::PolygonToImageRaster( for (int k = 0; k < n; ++k) { Point2DType & p2D1 = xylist[2 * k]; - const double X1 = p2D1[0]; - const double Y1 = p2D1[1]; + const double X1 = p2D1[0]; + const double Y1 = p2D1[1]; Point2DType & p2D2 = xylist[2 * k + 1]; - const double X2 = p2D2[0]; - const double Y2 = p2D2[1]; + const double X2 = p2D2[0]; + const double Y2 = p2D2[1]; if (Math::ExactlyEquals(Y2, Y1)) { continue; } const double temp = 1.0 / (Y2 - Y1); - auto ymin = static_cast(std::ceil(Y1)); - auto ymax = static_cast(std::ceil(Y2)); + auto ymin = static_cast(std::ceil(Y1)); + auto ymax = static_cast(std::ceil(Y2)); for (int y = ymin; y < ymax; ++y) { const double r = (Y2 - y) * temp; @@ -320,7 +320,7 @@ TriangleMeshToBinaryImageFilter::RasterizeTriangles() const InputMeshPointer input = this->GetInput(0); const InputPointsContainerPointer myPoints = input->GetPoints(); - InputPointsContainerIterator points = myPoints->Begin(); + InputPointsContainerIterator points = myPoints->Begin(); int extent[6]; @@ -335,8 +335,8 @@ TriangleMeshToBinaryImageFilter::RasterizeTriangles() const OutputImagePointer OutputImage = this->GetOutput(); // need to transform points from physical to index coordinates - auto NewPoints = PointsContainer::New(); - auto NewPointSet = PointSetType::New(); + auto NewPoints = PointsContainer::New(); + auto NewPointSet = PointSetType::New(); PointSetType::PointType newpoint; unsigned int pointId = 0; @@ -356,19 +356,19 @@ TriangleMeshToBinaryImageFilter::RasterizeTriangles() // the stencil is kept in 'zymatrix' that provides // the x extents for each (y,z) coordinate for which a ray // parallel to the x axis intersects the polydata - const int zInc = extent[3] - extent[2] + 1; - const int zSize = extent[5] - extent[4] + 1; + const int zInc = extent[3] - extent[2] + 1; + const int zSize = extent[5] - extent[4] + 1; Point1DArray zymatrix(zInc * zSize); - PointVector coords; + PointVector coords; const CellsContainerPointer cells = input->GetCells(); - CellsContainerIterator cellIt = cells->Begin(); + CellsContainerIterator cellIt = cells->Begin(); while (cellIt != cells->End()) { - CellType * nextCell = cellIt->Value(); + CellType * nextCell = cellIt->Value(); typename CellType::PointIdIterator pointIt = nextCell->PointIdsBegin(); - PointType p; + PointType p; switch (nextCell->GetType()) { @@ -406,7 +406,7 @@ TriangleMeshToBinaryImageFilter::RasterizeTriangles() { for (int y = extent[2]; y <= extent[3]; ++y) { - const int zyidx = (z - extent[4]) * zInc + (y - extent[2]); + const int zyidx = (z - extent[4]) * zInc + (y - extent[2]); Point1DVector xlist = zymatrix[zyidx]; if (xlist.size() <= 1) @@ -419,8 +419,8 @@ TriangleMeshToBinaryImageFilter::RasterizeTriangles() } // get the first entry double lastx = xlist[0].m_X; - int lastSign = xlist[0].m_Sign; - int signproduct = 1; + int lastSign = xlist[0].m_Sign; + int signproduct = 1; // if adjacent x values are within tolerance of each // other, check whether the number of 'exits' and @@ -430,12 +430,12 @@ TriangleMeshToBinaryImageFilter::RasterizeTriangles() // surface std::vector nlist; - const size_t m = xlist.size(); + const size_t m = xlist.size(); for (size_t j = 1; j < m; ++j) { const Point1D p1D = xlist[j]; - const double x = p1D.m_X; - const int sign = p1D.m_Sign; + const double x = p1D.m_X; + const int sign = p1D.m_Sign; // check absolute distance from lastx to x if (itk::Math::abs(x - lastx) > m_Tolerance) @@ -453,7 +453,7 @@ TriangleMeshToBinaryImageFilter::RasterizeTriangles() nlist.push_back(lastx); // create the stencil extents - int minx1 = extent[0]; // minimum allowable x1 value + int minx1 = extent[0]; // minimum allowable x1 value const int n = static_cast(nlist.size()) / 2; for (int i = 0; i < n; ++i) diff --git a/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.h b/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.h index cca7f319abc..8fd89b0ed2e 100644 --- a/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.h +++ b/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.h @@ -163,10 +163,10 @@ class ITK_TEMPLATE_EXPORT TriangleMeshToSimplexMeshFilter : public MeshToMeshFil * \brief add edge cells to the input mesh */ void - CreateNewEdge(CellIdentifier currentCellId, + CreateNewEdge(CellIdentifier currentCellId, CellFeatureIdentifier featureId, - PointIdentifier startPointId, - PointIdentifier endPointId, + PointIdentifier startPointId, + PointIdentifier endPointId, const InputMeshType * input); diff --git a/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.hxx b/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.hxx index 86cdaee0ce1..e7436ad0816 100644 --- a/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.hxx @@ -110,12 +110,12 @@ TriangleMeshToSimplexMeshFilter::CreateSimplexPoints() auto faceIterator = m_FaceSet->begin(); const InputMeshType * input = this->GetInput(0); - TOutputMesh * output = this->GetOutput(); + TOutputMesh * output = this->GetOutput(); while (faceIterator != m_FaceSet->end()) { const InputPointType newPoint = ComputeFaceCenter(*faceIterator, input); - OutputPointType copyPoint; + OutputPointType copyPoint; copyPoint.CastFrom(newPoint); const unsigned int id = *faceIterator; @@ -129,7 +129,7 @@ template void TriangleMeshToSimplexMeshFilter::CreateEdgeForTrianglePair(CellIdentifier pointIndex, CellIdentifier boundaryId, - TOutputMesh * outputMesh) + TOutputMesh * outputMesh) { const EdgeIdentifierType facePair = m_EdgeNeighborList->GetElement(boundaryId); @@ -158,13 +158,13 @@ TriangleMeshToSimplexMeshFilter::CreateSimplexNeighbors // add neighbor vertices const OutputPointsContainerPointer outputPointsContainer = output->GetPoints(); - OutputPointsContainerIterator points = outputPointsContainer->Begin(); + OutputPointsContainerIterator points = outputPointsContainer->Begin(); const InputBoundaryAssignmentsContainerPointer cntlines = this->GetInput(0)->GetBoundaryAssignments(1); while (points != outputPointsContainer->End()) { - const PointIdentifier idx = points.Index(); + const PointIdentifier idx = points.Index(); const InputBoundnaryAssignmentIdentifier key0(idx, 0); const InputBoundnaryAssignmentIdentifier key1(idx, 1); const InputBoundnaryAssignmentIdentifier key2(idx, 2); @@ -183,10 +183,10 @@ TriangleMeshToSimplexMeshFilter::CreateSimplexNeighbors template void -TriangleMeshToSimplexMeshFilter::CreateNewEdge(CellIdentifier currentCellId, +TriangleMeshToSimplexMeshFilter::CreateNewEdge(CellIdentifier currentCellId, CellFeatureIdentifier featureId, - PointIdentifier startPointId, - PointIdentifier endPointId, + PointIdentifier startPointId, + PointIdentifier endPointId, const InputMeshType * input) { CellIdentifier boundaryId; @@ -296,20 +296,20 @@ template void TriangleMeshToSimplexMeshFilter::CreateCells() { - const InputPointsContainer * pointsContainer = this->GetInput(0)->GetPoints(); + const InputPointsContainer * pointsContainer = this->GetInput(0)->GetPoints(); InputPointsContainerConstIterator points = pointsContainer->Begin(); - TOutputMesh * outputMesh = this->GetOutput(); + TOutputMesh * outputMesh = this->GetOutput(); using MapType = itk::MapContainer; while (points != pointsContainer->End()) { const PointIdentifier idx = points.Index(); - IndexSetType vertexNeighbors = m_VertexNeighborList->GetElement(idx); + IndexSetType vertexNeighbors = m_VertexNeighborList->GetElement(idx); auto iterator1 = vertexNeighbors.begin(); - auto tmpMap = MapType::New(); + auto tmpMap = MapType::New(); CellIdentifier startIdx = NumericTraits::max(); CellIdentifier lastIdx = 0; CellIdentifier wrongIdx = 0; @@ -353,8 +353,8 @@ TriangleMeshToSimplexMeshFilter::CreateCells() // create a new cell m_NewSimplexCellPointer.TakeOwnership(new OutputPolygonType); - PointIdentifier vertexIdx{}; - CellIdentifier nextIdx = startIdx; + PointIdentifier vertexIdx{}; + CellIdentifier nextIdx = startIdx; CellFeatureIdentifier featureId = 0; const CellIdentifier faceIndex = outputMesh->AddFace(m_NewSimplexCellPointer); @@ -399,14 +399,14 @@ TriangleMeshToSimplexMeshFilter::CreateCells() template auto -TriangleMeshToSimplexMeshFilter::ComputeFaceCenter(CellIdentifier faceId, +TriangleMeshToSimplexMeshFilter::ComputeFaceCenter(CellIdentifier faceId, const InputMeshType * inputMesh) -> InputPointType { CellAutoPointer cellPointer; inputMesh->GetCell(faceId, cellPointer); const PointIdentifier * tp = cellPointer->GetPointIds(); - InputPointType v1; + InputPointType v1; if (!inputMesh->GetPoint(tp[0], &v1)) { itkExceptionMacro("Point with id " << tp[0] << " does not exist in the input mesh"); diff --git a/Modules/Core/Mesh/include/itkVTKPolyDataReader.hxx b/Modules/Core/Mesh/include/itkVTKPolyDataReader.hxx index c363e5509f5..2b0f2112062 100644 --- a/Modules/Core/Mesh/include/itkVTKPolyDataReader.hxx +++ b/Modules/Core/Mesh/include/itkVTKPolyDataReader.hxx @@ -265,7 +265,7 @@ VTKPolyDataReader::GenerateData() } CellAutoPointer cell; - auto * triangleCell = new TriangleCellType; + auto * triangleCell = new TriangleCellType; for (PointIdentifier k = 0; k < 3; ++k) { triangleCell->SetPointId(k, ids[k]); diff --git a/Modules/Core/Mesh/include/itkVTKPolyDataWriter.hxx b/Modules/Core/Mesh/include/itkVTKPolyDataWriter.hxx index 4e08e0ae14c..3500c03970f 100644 --- a/Modules/Core/Mesh/include/itkVTKPolyDataWriter.hxx +++ b/Modules/Core/Mesh/include/itkVTKPolyDataWriter.hxx @@ -99,11 +99,11 @@ VTKPolyDataWriter::GenerateData() const PointsContainer * points = this->m_Input->GetPoints(); std::map IdMap; - PointIdentifier k = 0; + PointIdentifier k = 0; if (points) { - PointIterator pointIterator = points->Begin(); + PointIterator pointIterator = points->Begin(); const PointIterator pointEnd = points->End(); while (pointIterator != pointEnd) @@ -136,7 +136,7 @@ VTKPolyDataWriter::GenerateData() if (cells) { - CellIterator cellIterator = cells->Begin(); + CellIterator cellIterator = cells->Begin(); const CellIterator cellEnd = cells->End(); while (cellIterator != cellEnd) diff --git a/Modules/Core/Mesh/include/itkWarpMeshFilter.hxx b/Modules/Core/Mesh/include/itkWarpMeshFilter.hxx index 5023fd6eca5..381bb55bf10 100644 --- a/Modules/Core/Mesh/include/itkWarpMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkWarpMeshFilter.hxx @@ -73,8 +73,8 @@ WarpMeshFilter::GenerateData() using OutputPointsContainerPointer = typename TOutputMesh::PointsContainerPointer; - const InputMeshType * inputMesh = this->GetInput(); - const OutputMeshPointer outputMesh = this->GetOutput(); + const InputMeshType * inputMesh = this->GetInput(); + const OutputMeshPointer outputMesh = this->GetOutput(); const DisplacementFieldPointer fieldPtr = this->GetDisplacementField(); if (!inputMesh) @@ -89,7 +89,7 @@ WarpMeshFilter::GenerateData() outputMesh->SetBufferedRegion(outputMesh->GetRequestedRegion()); - const InputPointsContainer * inPoints = inputMesh->GetPoints(); + const InputPointsContainer * inPoints = inputMesh->GetPoints(); const OutputPointsContainerPointer outPoints = outputMesh->GetPoints(); outPoints->Reserve(inputMesh->GetNumberOfPoints()); @@ -97,7 +97,7 @@ WarpMeshFilter::GenerateData() // allocated a larger memory typename InputPointsContainer::ConstIterator inputPoint = inPoints->Begin(); - typename OutputPointsContainer::Iterator outputPoint = outPoints->Begin(); + typename OutputPointsContainer::Iterator outputPoint = outPoints->Begin(); using InputPointType = typename InputMeshType::PointType; using OutputPointType = typename OutputMeshType::PointType; @@ -111,7 +111,7 @@ WarpMeshFilter::GenerateData() while (inputPoint != inPoints->End()) { const InputPointType & originalPoint = inputPoint.Value(); - const auto index = fieldPtr->TransformPhysicalPointToIndex(originalPoint); + const auto index = fieldPtr->TransformPhysicalPointToIndex(originalPoint); displacement = fieldPtr->GetPixel(index); for (unsigned int i = 0; i < Dimension; ++i) diff --git a/Modules/Core/Mesh/src/itkSimplexMeshGeometry.cxx b/Modules/Core/Mesh/src/itkSimplexMeshGeometry.cxx index d0e6303670e..d0ea06130d9 100644 --- a/Modules/Core/Mesh/src/itkSimplexMeshGeometry.cxx +++ b/Modules/Core/Mesh/src/itkSimplexMeshGeometry.cxx @@ -25,7 +25,7 @@ namespace itk { SimplexMeshGeometry::SimplexMeshGeometry() { - constexpr double c = 1.0 / 3.0; + constexpr double c = 1.0 / 3.0; constexpr PointType p{}; pos.Fill(0); diff --git a/Modules/Core/Mesh/test/itkBinaryMask3DMeshSourceTest.cxx b/Modules/Core/Mesh/test/itkBinaryMask3DMeshSourceTest.cxx index 80eb8e95fc6..e2ed765367b 100644 --- a/Modules/Core/Mesh/test/itkBinaryMask3DMeshSourceTest.cxx +++ b/Modules/Core/Mesh/test/itkBinaryMask3DMeshSourceTest.cxx @@ -35,10 +35,10 @@ using PixelType = ImageType::PixelType; using ImagePointerType = ImageType::Pointer; void -CreateCubeConfig(ImagePointerType image, - const unsigned int StartX, - const unsigned int StartY, - const unsigned int StartZ, +CreateCubeConfig(ImagePointerType image, + const unsigned int StartX, + const unsigned int StartY, + const unsigned int StartZ, const unsigned char value1, const unsigned char value2, const unsigned char value3, @@ -49,10 +49,10 @@ CreateCubeConfig(ImagePointerType image, const unsigned char value8); void -Create16CubeConfig(ImagePointerType image, - const unsigned int StartX, - const unsigned int StartY, - const unsigned int StartZ, +Create16CubeConfig(ImagePointerType image, + const unsigned int StartX, + const unsigned int StartY, + const unsigned int StartZ, const unsigned char value1, const unsigned char value2, const unsigned char value3, @@ -126,10 +126,10 @@ itkBinaryMask3DMeshSourceTest(int argc, char * argv[]) } void -CreateCubeConfig(ImagePointerType image, - const unsigned int StartX, - const unsigned int StartY, - const unsigned int StartZ, +CreateCubeConfig(ImagePointerType image, + const unsigned int StartX, + const unsigned int StartY, + const unsigned int StartZ, const unsigned char value1, const unsigned char value2, const unsigned char value3, @@ -191,10 +191,10 @@ CreateCubeConfig(ImagePointerType image, } void -Create16CubeConfig(ImagePointerType image, - const unsigned int StartX, - const unsigned int StartY, - const unsigned int StartZ, +Create16CubeConfig(ImagePointerType image, + const unsigned int StartX, + const unsigned int StartY, + const unsigned int StartZ, const unsigned char value1, const unsigned char value2, const unsigned char value3, diff --git a/Modules/Core/Mesh/test/itkConnectedRegionsMeshFilterTest1.cxx b/Modules/Core/Mesh/test/itkConnectedRegionsMeshFilterTest1.cxx index c312b08bfe7..bb6bbb3b00a 100644 --- a/Modules/Core/Mesh/test/itkConnectedRegionsMeshFilterTest1.cxx +++ b/Modules/Core/Mesh/test/itkConnectedRegionsMeshFilterTest1.cxx @@ -45,8 +45,8 @@ itkConnectedRegionsMeshFilterTest1(int, char *[]) // Pass the mesh through the filter in a variety of ways. // constexpr PointType::ValueType pInit[3] = { 1, 2, 3 }; - PointType p = pInit; - auto connect = ConnectFilterType::New(); + PointType p = pInit; + auto connect = ConnectFilterType::New(); ITK_EXERCISE_BASIC_OBJECT_METHODS(connect, ConnectedRegionsMeshFilter, MeshToMeshFilter); @@ -96,9 +96,9 @@ itkConnectedRegionsMeshFilterTest1(int, char *[]) auto meshSource = SphereMeshSourceType::New(); - constexpr PointType center{}; + constexpr PointType center{}; constexpr PointType::ValueType scaleInit[3] = { 1, 1, 1 }; - const PointType scale = scaleInit; + const PointType scale = scaleInit; meshSource->SetCenter(center); meshSource->SetResolutionX(10); diff --git a/Modules/Core/Mesh/test/itkConnectedRegionsMeshFilterTest2.cxx b/Modules/Core/Mesh/test/itkConnectedRegionsMeshFilterTest2.cxx index f41dc9209a9..691a1f5dee9 100644 --- a/Modules/Core/Mesh/test/itkConnectedRegionsMeshFilterTest2.cxx +++ b/Modules/Core/Mesh/test/itkConnectedRegionsMeshFilterTest2.cxx @@ -37,8 +37,8 @@ itkConnectedRegionsMeshFilterTest2(int argc, char * argv[]) // Check if input file is a mesh file or image file by checking presence of .vtk const std::string fileName(argv[1]); - const size_t found = fileName.find(".vtk"); - bool imageSource = true; + const size_t found = fileName.find(".vtk"); + bool imageSource = true; if (found != std::string::npos) { diff --git a/Modules/Core/Mesh/test/itkDynamicMeshTest.cxx b/Modules/Core/Mesh/test/itkDynamicMeshTest.cxx index 3f4af0adbbc..ff6a4190d7f 100644 --- a/Modules/Core/Mesh/test/itkDynamicMeshTest.cxx +++ b/Modules/Core/Mesh/test/itkDynamicMeshTest.cxx @@ -70,7 +70,7 @@ itkDynamicMeshTest(int, char *[]) displacement[0] = 2; displacement[1] = 5; - auto pointA = itk::MakeFilled(0.0); + auto pointA = itk::MakeFilled(0.0); const PointType pointB = pointA + displacement; const PointType pointC = pointB + displacement; const PointType pointD = pointC + displacement; @@ -85,7 +85,7 @@ itkDynamicMeshTest(int, char *[]) std::cout << "Number of Points = " << mesh->GetNumberOfPoints() << std::endl; - PointsIterator point = pointsContainter->Begin(); + PointsIterator point = pointsContainter->Begin(); const PointsIterator endpoint = pointsContainter->End(); while (point != endpoint) diff --git a/Modules/Core/Mesh/test/itkImageToParametricSpaceFilterTest.cxx b/Modules/Core/Mesh/test/itkImageToParametricSpaceFilterTest.cxx index cb1ba5fb976..12728cfce78 100644 --- a/Modules/Core/Mesh/test/itkImageToParametricSpaceFilterTest.cxx +++ b/Modules/Core/Mesh/test/itkImageToParametricSpaceFilterTest.cxx @@ -63,7 +63,7 @@ itkImageToParametricSpaceFilterTest(int, char *[]) const ImagePointer imageY = ImageType::New(); const ImagePointer imageZ = ImageType::New(); - ImageType::SizeType size; + ImageType::SizeType size; constexpr ImageType::IndexType start{}; size[0] = 10; size[1] = 10; diff --git a/Modules/Core/Mesh/test/itkInteriorExteriorMeshFilterTest.cxx b/Modules/Core/Mesh/test/itkInteriorExteriorMeshFilterTest.cxx index f04bea2dd4d..7f584b44e1c 100644 --- a/Modules/Core/Mesh/test/itkInteriorExteriorMeshFilterTest.cxx +++ b/Modules/Core/Mesh/test/itkInteriorExteriorMeshFilterTest.cxx @@ -51,7 +51,7 @@ itkInteriorExteriorMeshFilterTest(int, char *[]) const PointsContainerPointer points = inputMesh->GetPoints(); // Fill a cube with points , just to get some data - constexpr int n = 3; // let's start with a few of them + constexpr int n = 3; // let's start with a few of them PointsContainerType::ElementIdentifier count = 0; // count them for (int x = -n; x <= n; ++x) diff --git a/Modules/Core/Mesh/test/itkMeshSourceGraftOutputTest.cxx b/Modules/Core/Mesh/test/itkMeshSourceGraftOutputTest.cxx index 04ed33a9280..166663d281c 100644 --- a/Modules/Core/Mesh/test/itkMeshSourceGraftOutputTest.cxx +++ b/Modules/Core/Mesh/test/itkMeshSourceGraftOutputTest.cxx @@ -101,7 +101,7 @@ template void MeshSourceGraftOutputFilter::GenerateData() { - const InputMeshType * inputMesh = this->GetInput(); + const InputMeshType * inputMesh = this->GetInput(); const OutputMeshPointer outputMesh = this->GetOutput(); if (!inputMesh) @@ -210,7 +210,7 @@ itkMeshSourceGraftOutputTest(int, char *[]) const PointsContainerPointer points = inputMesh->GetPoints(); // Fill a cube with points , just to get some data - constexpr int n = 1; // let's start with a few of them + constexpr int n = 1; // let's start with a few of them PointsContainerType::ElementIdentifier count = 0; // count them for (int x = -n; x <= n; ++x) @@ -258,7 +258,7 @@ itkMeshSourceGraftOutputTest(int, char *[]) auto affineTransform = TransformType::New(); affineTransform->Scale(3.5); TransformType::OffsetType::ValueType tInit[3] = { 100, 200, 300 }; - const TransformType::OffsetType translation = tInit; + const TransformType::OffsetType translation = tInit; affineTransform->Translate(translation); // Connect the inputs diff --git a/Modules/Core/Mesh/test/itkMeshSpatialObjectIOTest.cxx b/Modules/Core/Mesh/test/itkMeshSpatialObjectIOTest.cxx index 77ef5e2178b..d7e7ad30150 100644 --- a/Modules/Core/Mesh/test/itkMeshSpatialObjectIOTest.cxx +++ b/Modules/Core/Mesh/test/itkMeshSpatialObjectIOTest.cxx @@ -67,7 +67,7 @@ itkMeshSpatialObjectIOTest(int argc, char * argv[]) // Add cell links using CellLinksContainerType = MeshType::CellLinksContainer; - auto linkContainer = CellLinksContainerType::New(); + auto linkContainer = CellLinksContainerType::New(); MeshType::PointCellLinksContainer pcl; for (unsigned int j = 0; j < 3; ++j) @@ -168,7 +168,7 @@ itkMeshSpatialObjectIOTest(int argc, char * argv[]) std::cout << "Testing Points: "; const MeshType::Pointer mesh2 = meshSO2->GetMesh(); // Testing points - const MeshType::PointsContainer * points = mesh2->GetPoints(); + const MeshType::PointsContainer * points = mesh2->GetPoints(); MeshType::PointsContainer::ConstIterator it_points = points->Begin(); unsigned int j = 0; @@ -197,7 +197,7 @@ itkMeshSpatialObjectIOTest(int argc, char * argv[]) // Testing cells std::cout << "Testing Cells : "; - const MeshType::CellsContainer * cells = mesh2->GetCells(); + const MeshType::CellsContainer * cells = mesh2->GetCells(); MeshType::CellsContainer::ConstIterator it_cells = cells->Begin(); j = 0; @@ -233,7 +233,7 @@ itkMeshSpatialObjectIOTest(int argc, char * argv[]) std::cout << "Testing CellLinks : "; j = 0; using CellLinksContainer = MeshType::CellLinksContainer; - const CellLinksContainer * links = mesh2->GetCellLinks(); + const CellLinksContainer * links = mesh2->GetCellLinks(); MeshType::CellLinksContainer::ConstIterator it_celllinks = links->Begin(); while (it_celllinks != links->End()) @@ -246,7 +246,7 @@ itkMeshSpatialObjectIOTest(int argc, char * argv[]) } unsigned int i = 0; - auto it = (*it_celllinks)->Value().begin(); + auto it = (*it_celllinks)->Value().begin(); while (it != (*it_celllinks)->Value().end()) { if ((*it) != i) diff --git a/Modules/Core/Mesh/test/itkMeshTest.cxx b/Modules/Core/Mesh/test/itkMeshTest.cxx index c244cdd33fa..d0f427be5e9 100644 --- a/Modules/Core/Mesh/test/itkMeshTest.cxx +++ b/Modules/Core/Mesh/test/itkMeshTest.cxx @@ -204,13 +204,13 @@ itkMeshTest(int, char *[]) }; // Insert cell of each kind - auto cellVectorContainer = MeshType::CellsVectorContainer::New(); - int index = 0; + auto cellVectorContainer = MeshType::CellsVectorContainer::New(); + int index = 0; unsigned long value = 1; for (auto & pair : cellPointMap) { const itk::CellGeometryEnum cellType = pair.first; - const unsigned int numOfPoints = pair.second; + const unsigned int numOfPoints = pair.second; // Insert cell type cellVectorContainer->InsertElement(index++, static_cast(cellType)); @@ -233,7 +233,7 @@ itkMeshTest(int, char *[]) for (auto & pair : cellPointMap) { const unsigned int numOfPoints = pair.second; - CellAutoPointer temp_cell; + CellAutoPointer temp_cell; if (mesh0->GetCell(index++, temp_cell)) { @@ -402,7 +402,7 @@ itkMeshTest(int, char *[]) * This should be the test tetrahedron, except that we have done an * explicit assignment which removes this. */ - std::set neighborSet; + std::set neighborSet; std::set::iterator cell; mesh->GetCellBoundaryFeatureNeighbors(1, // Topological dimension of feature. 1, // CellIdentifier @@ -637,7 +637,7 @@ itkMeshTest(int, char *[]) * Try getting one of the QuadraticTriangle's edges. */ CellAutoPointer edgePointer; - const bool edgeExists = mesh->GetCellBoundaryFeature(1, // Topological dimension of boundary. + const bool edgeExists = mesh->GetCellBoundaryFeature(1, // Topological dimension of boundary. 2, // CellIdentifier. 0, // CellFeatureIdentifier edgePointer); // CellPointer to return the result @@ -669,7 +669,7 @@ itkMeshTest(int, char *[]) // Evaluate The Shape functions for a particular parametric point CellType::ParametricCoordArrayType parametricCoordinates(1); - CellType::ShapeFunctionsArrayType weights(edgePointer->GetNumberOfPoints()); + CellType::ShapeFunctionsArrayType weights(edgePointer->GetNumberOfPoints()); parametricCoordinates[0] = 0.25; edgePointer->EvaluateShapeFunctions(parametricCoordinates, weights); std::cout << "Shape Function weights = " << weights << std::endl; diff --git a/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx b/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx index 5bbfc6cf411..0a74152fbea 100644 --- a/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx +++ b/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx @@ -176,7 +176,7 @@ InternalTest(int argc, char * argv[]) ImagePointType refData = parametricFilter->GetOutput()->GetPointData()->ElementAt(pointId); typename OutputMeshType::PointType position = parametricFilter->GetOutput()->GetPoints()->ElementAt(pointId); - PositionType refPoint = helper::GetPosition(image.GetPointer(), imageIterator); + PositionType refPoint = helper::GetPosition(image.GetPointer(), imageIterator); for (unsigned int dim = 0; dim < ImageDimension; ++dim) { diff --git a/Modules/Core/Mesh/test/itkQuadrilateralCellTest.cxx b/Modules/Core/Mesh/test/itkQuadrilateralCellTest.cxx index 54931ba8085..03b5bcc6ece 100644 --- a/Modules/Core/Mesh/test/itkQuadrilateralCellTest.cxx +++ b/Modules/Core/Mesh/test/itkQuadrilateralCellTest.cxx @@ -49,11 +49,11 @@ itkQuadrilateralCellTest(int, char *[]) public: bool - EvaluatePosition(CoordinateType * inputPoint, - PointsContainer * points, - CoordinateType * closestPoint, - CoordinateType pcoord[], - double * distance, + EvaluatePosition(CoordinateType * inputPoint, + PointsContainer * points, + CoordinateType * closestPoint, + CoordinateType pcoord[], + double * distance, InterpolationWeightType * weights) override { return this->Superclass::EvaluatePosition(inputPoint, points, closestPoint, pcoord, distance, weights); @@ -162,10 +162,10 @@ itkQuadrilateralCellTest(int, char *[]) std::cout << inputPoint[1] << ", "; std::cout << inputPoint[2] << std::endl; - QuadrilateralCellType::CoordinateType closestPoint[3]; - double distance; + QuadrilateralCellType::CoordinateType closestPoint[3]; + double distance; QuadrilateralCellType::InterpolationWeightType weights[4]; - QuadrilateralCellType::CoordinateType pcoords[2]; // Quadrilateral has 2 parametric coordinates + QuadrilateralCellType::CoordinateType pcoords[2]; // Quadrilateral has 2 parametric coordinates bool isInside = testCell1->EvaluatePosition(inputPoint, points, closestPoint, pcoords, &distance, weights); if (!isInside) diff --git a/Modules/Core/Mesh/test/itkRegularSphereMeshSourceTest2.cxx b/Modules/Core/Mesh/test/itkRegularSphereMeshSourceTest2.cxx index 488443aace6..5bde2ee8938 100644 --- a/Modules/Core/Mesh/test/itkRegularSphereMeshSourceTest2.cxx +++ b/Modules/Core/Mesh/test/itkRegularSphereMeshSourceTest2.cxx @@ -56,11 +56,11 @@ itkRegularSphereMeshSourceTest2(int, char *[]) mesh2->Graft(mesh1); - const MeshType::PointsContainerConstPointer points = mesh2->GetPoints(); - MeshType::PointsContainerConstIterator it = points->Begin(); + const MeshType::PointsContainerConstPointer points = mesh2->GetPoints(); + MeshType::PointsContainerConstIterator it = points->Begin(); const MeshType::PointsContainerConstIterator end = points->End(); - MeshType::PointType center = source2->GetCenter(); + MeshType::PointType center = source2->GetCenter(); const SphereMeshSourceType::VectorType scale2 = source2->GetScale(); if ((scale2 - scale).GetNorm() != 0.) @@ -72,7 +72,7 @@ itkRegularSphereMeshSourceTest2(int, char *[]) while (it != end) { const MeshType::PointType p = it->Value(); - double d = 0.0; + double d = 0.0; for (unsigned int dim = 0; dim < Dimension; ++dim) { d += (center[dim] - p[dim]) * (center[dim] - p[dim]) / (scale[dim] * scale[dim]); diff --git a/Modules/Core/Mesh/test/itkSimplexMeshAdaptTopologyFilterTest.cxx b/Modules/Core/Mesh/test/itkSimplexMeshAdaptTopologyFilterTest.cxx index b26b05e9b8d..8a82e77dea5 100644 --- a/Modules/Core/Mesh/test/itkSimplexMeshAdaptTopologyFilterTest.cxx +++ b/Modules/Core/Mesh/test/itkSimplexMeshAdaptTopologyFilterTest.cxx @@ -45,10 +45,10 @@ itkSimplexMeshAdaptTopologyFilterTest(int argc, char * argv[]) // declare the triangle to simplex mesh filter using SimplexFilterType = itk::TriangleMeshToSimplexMeshFilter; - auto mySphereMeshSource = SphereMeshSourceType::New(); - auto center = itk::MakeFilled(10); + auto mySphereMeshSource = SphereMeshSourceType::New(); + auto center = itk::MakeFilled(10); PointType::ValueType scaleInit[3] = { 3, 3, 3 }; - const VectorType scale = scaleInit; + const VectorType scale = scaleInit; mySphereMeshSource->SetCenter(center); mySphereMeshSource->SetResolution(2); diff --git a/Modules/Core/Mesh/test/itkSimplexMeshToTriangleMeshFilterTest.cxx b/Modules/Core/Mesh/test/itkSimplexMeshToTriangleMeshFilterTest.cxx index cc792aaaa9d..f87d51a69a0 100644 --- a/Modules/Core/Mesh/test/itkSimplexMeshToTriangleMeshFilterTest.cxx +++ b/Modules/Core/Mesh/test/itkSimplexMeshToTriangleMeshFilterTest.cxx @@ -41,10 +41,10 @@ itkSimplexMeshToTriangleMeshFilterTest(int, char *[]) using TriangleFilterType = itk::SimplexMeshToTriangleMeshFilter; using TriangleMeshPointer = TriangleMeshType::Pointer; - auto mySphereMeshSource = SphereMeshSourceType::New(); - constexpr PointType center{}; + auto mySphereMeshSource = SphereMeshSourceType::New(); + constexpr PointType center{}; PointType::ValueType scaleInit[3] = { 5, 5, 5 }; - const VectorType scale = scaleInit; + const VectorType scale = scaleInit; mySphereMeshSource->SetCenter(center); mySphereMeshSource->SetResolution(1); @@ -59,7 +59,7 @@ itkSimplexMeshToTriangleMeshFilterTest(int, char *[]) backFilter->Print(std::cout); const SimplexMeshType::Pointer simplexMesh = simplexFilter->GetOutput(); - TriangleMeshPointer originalTriangleMesh = mySphereMeshSource->GetOutput(); + TriangleMeshPointer originalTriangleMesh = mySphereMeshSource->GetOutput(); std::cout << "Original triangle mesh: " << std::endl; std::cout << originalTriangleMesh << std::endl; diff --git a/Modules/Core/Mesh/test/itkSimplexMeshVolumeCalculatorTest.cxx b/Modules/Core/Mesh/test/itkSimplexMeshVolumeCalculatorTest.cxx index 6022739e9c8..c959c35a816 100644 --- a/Modules/Core/Mesh/test/itkSimplexMeshVolumeCalculatorTest.cxx +++ b/Modules/Core/Mesh/test/itkSimplexMeshVolumeCalculatorTest.cxx @@ -42,10 +42,10 @@ itkSimplexMeshVolumeCalculatorTest(int, char *[]) // Declare the type of the gradient image using SimplexFilterType = itk::TriangleMeshToSimplexMeshFilter; - auto mySphereMeshSource = SphereMeshSourceType::New(); - constexpr PointType center{}; + auto mySphereMeshSource = SphereMeshSourceType::New(); + constexpr PointType center{}; PointType::ValueType scaleInit[3] = { 10, 10, 10 }; - const VectorType scale = scaleInit; + const VectorType scale = scaleInit; mySphereMeshSource->SetCenter(center); mySphereMeshSource->SetScale(scale); diff --git a/Modules/Core/Mesh/test/itkSphereMeshSourceTest.cxx b/Modules/Core/Mesh/test/itkSphereMeshSourceTest.cxx index 9edaa822904..dd8a73da2ac 100644 --- a/Modules/Core/Mesh/test/itkSphereMeshSourceTest.cxx +++ b/Modules/Core/Mesh/test/itkSphereMeshSourceTest.cxx @@ -31,9 +31,9 @@ itkSphereMeshSourceTest(int, char *[]) ITK_EXERCISE_BASIC_OBJECT_METHODS(mySphereMeshSource, SphereMeshSource, MeshSource); - constexpr fPointType center{}; + constexpr fPointType center{}; constexpr fPointType::ValueType scaleInit[3] = { 1, 1, 1 }; - const fPointType scale = scaleInit; + const fPointType scale = scaleInit; mySphereMeshSource->SetCenter(center); mySphereMeshSource->SetResolutionX(1); @@ -53,7 +53,7 @@ itkSphereMeshSourceTest(int, char *[]) // itk::Mesh::PointsContainerPointer myoutput = mySphereMeshSource->GetOutput()->GetPoints(); // itk::Mesh::PointsContainer::Iterator m_output = myoutput->Begin(); - IPT pt{}; + IPT pt{}; IPT * pt_ptr = &pt; for (int i = 0; i < 12; ++i) diff --git a/Modules/Core/Mesh/test/itkTransformMeshFilterTest.cxx b/Modules/Core/Mesh/test/itkTransformMeshFilterTest.cxx index 6e463e40ce4..9d3c6328fd0 100644 --- a/Modules/Core/Mesh/test/itkTransformMeshFilterTest.cxx +++ b/Modules/Core/Mesh/test/itkTransformMeshFilterTest.cxx @@ -56,7 +56,7 @@ itkTransformMeshFilterTest(int, char *[]) const PointsContainerPointer points = inputMesh->GetPoints(); // Fill a cube with points , just to get some data - constexpr int n = 1; // let's start with a few of them + constexpr int n = 1; // let's start with a few of them PointsContainerType::ElementIdentifier count = 0; // count them for (int x = -n; x <= n; ++x) @@ -110,7 +110,7 @@ itkTransformMeshFilterTest(int, char *[]) auto affineTransform = TransformType::New(); affineTransform->Scale(3.5); TransformType::OffsetType::ValueType tInit[3] = { 100, 200, 300 }; - const TransformType::OffsetType translation = tInit; + const TransformType::OffsetType translation = tInit; affineTransform->Translate(translation); // Connect the inputs diff --git a/Modules/Core/Mesh/test/itkTriangleCellTest.cxx b/Modules/Core/Mesh/test/itkTriangleCellTest.cxx index 142b36c87eb..bfea9cc6d75 100644 --- a/Modules/Core/Mesh/test/itkTriangleCellTest.cxx +++ b/Modules/Core/Mesh/test/itkTriangleCellTest.cxx @@ -51,11 +51,11 @@ itkTriangleCellTest(int, char *[]) public: bool - EvaluatePosition(CoordinateType * inputPoint, - PointsContainer * points, - CoordinateType * closestPoint, - CoordinateType pcoord[], - double * distance, + EvaluatePosition(CoordinateType * inputPoint, + PointsContainer * points, + CoordinateType * closestPoint, + CoordinateType pcoord[], + double * distance, InterpolationWeightType * weights) override { return this->Superclass::EvaluatePosition(inputPoint, points, closestPoint, pcoord, distance, weights); @@ -114,7 +114,7 @@ itkTriangleCellTest(int, char *[]) * different types of cells. */ CellAutoPointer testCell; - auto * newcell = new TriangleHelper; + auto * newcell = new TriangleHelper; testCell.TakeOwnership(newcell); // polymorphism /** @@ -152,11 +152,11 @@ itkTriangleCellTest(int, char *[]) // // Exercise the EvaluatePosition() method of the TriangleCell // - TriangleCellType::CoordinateType inputPoint[3]; - TriangleCellType::PointsContainer * points = mesh->GetPoints(); - TriangleCellType::CoordinateType closestPoint[3]; - TriangleCellType::CoordinateType pcoords[3]; - double distance; + TriangleCellType::CoordinateType inputPoint[3]; + TriangleCellType::PointsContainer * points = mesh->GetPoints(); + TriangleCellType::CoordinateType closestPoint[3]; + TriangleCellType::CoordinateType pcoords[3]; + double distance; TriangleCellType::InterpolationWeightType weights[3]; constexpr double tolerance = 1e-5; diff --git a/Modules/Core/Mesh/test/itkTriangleMeshCurvatureCalculatorTest.cxx b/Modules/Core/Mesh/test/itkTriangleMeshCurvatureCalculatorTest.cxx index a97bf1ad340..318f46886ef 100644 --- a/Modules/Core/Mesh/test/itkTriangleMeshCurvatureCalculatorTest.cxx +++ b/Modules/Core/Mesh/test/itkTriangleMeshCurvatureCalculatorTest.cxx @@ -76,10 +76,10 @@ itkTriangleMeshCurvatureCalculatorTest(int argc, char * argv[]) using PointType = SphereMeshSourceType::PointType; using VectorType = SphereMeshSourceType::VectorType; - auto mySphereMeshSource = SphereMeshSourceType::New(); - constexpr PointType center{}; + auto mySphereMeshSource = SphereMeshSourceType::New(); + constexpr PointType center{}; PointType::ValueType scaleInit_1[Dimension] = { 5, 5, 5 }; - VectorType scale = scaleInit_1; + VectorType scale = scaleInit_1; mySphereMeshSource->SetCenter(center); mySphereMeshSource->SetResolution(1); diff --git a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest.cxx b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest.cxx index 20aefe75a6c..6cf441c2214 100644 --- a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest.cxx +++ b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest.cxx @@ -42,13 +42,13 @@ itkTriangleMeshToBinaryImageFilterTest(int argc, char * argv[]) using PointType = SphereMeshSourceType::PointType; using VectorType = SphereMeshSourceType::VectorType; - auto mySphereMeshSource = SphereMeshSourceType::New(); + auto mySphereMeshSource = SphereMeshSourceType::New(); PointType center; center[0] = 50; center[1] = 50; center[2] = 50; PointType::ValueType scaleInit[3] = { 10, 10, 10 }; - const VectorType scale = scaleInit; + const VectorType scale = scaleInit; mySphereMeshSource->SetCenter(center); mySphereMeshSource->SetResolution(3); @@ -80,14 +80,14 @@ itkTriangleMeshToBinaryImageFilterTest(int argc, char * argv[]) imageFilter->SetSize(size); constexpr double dspacing[3] = { 2.0, 2.0, 2.0 }; - constexpr float fspacing[3] = { 3.0, 3.0, 3.0 }; + constexpr float fspacing[3] = { 3.0, 3.0, 3.0 }; constexpr double defaultSpacing[3] = { 1.0, 1.0, 1.0 }; imageFilter->SetSpacing(dspacing); imageFilter->SetSpacing(fspacing); imageFilter->SetSpacing(defaultSpacing); constexpr double dorigin[3] = { 2.0, 2.0, 2.0 }; - constexpr float forigin[3] = { 3.0, 3.0, 3.0 }; + constexpr float forigin[3] = { 3.0, 3.0, 3.0 }; constexpr double defaultOrigin[3] = { 0.0, 0.0, 0.0 }; imageFilter->SetOrigin(dorigin); imageFilter->SetOrigin(forigin); @@ -95,7 +95,7 @@ itkTriangleMeshToBinaryImageFilterTest(int argc, char * argv[]) imageFilter->Update(); - auto im = ImageType::New(); + auto im = ImageType::New(); ImageType::SizeType imSize; imSize[0] = imSize[1] = imSize[2] = 100; im->SetRegions(imSize); diff --git a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest1.cxx b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest1.cxx index cd534333f16..cc6fcd6320b 100644 --- a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest1.cxx +++ b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest1.cxx @@ -36,10 +36,10 @@ itkTriangleMeshToBinaryImageFilterTest1(int argc, char * argv[]) using PointType = SphereMeshSourceType::PointType; using VectorType = SphereMeshSourceType::VectorType; - auto mySphereMeshSource = SphereMeshSourceType::New(); - auto center = itk::MakeFilled(50); + auto mySphereMeshSource = SphereMeshSourceType::New(); + auto center = itk::MakeFilled(50); PointType::ValueType scaleInit[3] = { 10, 10, 10 }; - const VectorType scale = scaleInit; + const VectorType scale = scaleInit; mySphereMeshSource->SetCenter(center); mySphereMeshSource->SetResolution(3); @@ -61,7 +61,7 @@ itkTriangleMeshToBinaryImageFilterTest1(int argc, char * argv[]) ITK_TRY_EXPECT_NO_EXCEPTION(imageFilter->Update()); using ROIImageFilter = itk::RegionOfInterestImageFilter; - auto roifilter = ROIImageFilter::New(); + auto roifilter = ROIImageFilter::New(); ROIImageFilter::RegionType region; region.GetModifiableIndex().Fill(35); region.GetModifiableSize().Fill(30); diff --git a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest2.cxx b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest2.cxx index 992e6db1b05..139297d881f 100644 --- a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest2.cxx +++ b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest2.cxx @@ -43,10 +43,10 @@ itkTriangleMeshToBinaryImageFilterTest2(int argc, char * argv[]) using TriangleFilterType = itk::SimplexMeshToTriangleMeshFilter; using TriangleMeshPointer = TriangleMeshType::Pointer; - auto mySphereMeshSource = SphereMeshSourceType::New(); - auto center = itk::MakeFilled(-5); + auto mySphereMeshSource = SphereMeshSourceType::New(); + auto center = itk::MakeFilled(-5); PointType::ValueType scaleInit[3] = { 10, 10, 10 }; - const VectorType scale = scaleInit; + const VectorType scale = scaleInit; mySphereMeshSource->SetCenter(center); mySphereMeshSource->SetResolution(3); @@ -60,7 +60,7 @@ itkTriangleMeshToBinaryImageFilterTest2(int argc, char * argv[]) backFilter->Update(); const SimplexMeshType::Pointer simplexMesh = simplexFilter->GetOutput(); - const TriangleMeshPointer originalTriangleMesh = mySphereMeshSource->GetOutput(); + const TriangleMeshPointer originalTriangleMesh = mySphereMeshSource->GetOutput(); std::cout << " Number of Points and Cells in Original Triangle Mesh" << std::endl; std::cout << originalTriangleMesh->GetNumberOfPoints() << std::endl; diff --git a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest4.cxx b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest4.cxx index 3b88f64e11e..a4135d48095 100644 --- a/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest4.cxx +++ b/Modules/Core/Mesh/test/itkTriangleMeshToBinaryImageFilterTest4.cxx @@ -87,7 +87,7 @@ itkTriangleMeshToBinaryImageFilterTest4(int argc, char * argv[]) constexpr ImageType::IndexType index3D = { { 0, 0, 0 } }; - const ImageType::RegionType region3D{ index3D, size }; + const ImageType::RegionType region3D{ index3D, size }; auto inputImage = ImageType::New(); inputImage->SetRegions(region3D); diff --git a/Modules/Core/Mesh/test/itkTriangleMeshToSimplexMeshFilter2Test.cxx b/Modules/Core/Mesh/test/itkTriangleMeshToSimplexMeshFilter2Test.cxx index d0577fddc35..0939456cf33 100644 --- a/Modules/Core/Mesh/test/itkTriangleMeshToSimplexMeshFilter2Test.cxx +++ b/Modules/Core/Mesh/test/itkTriangleMeshToSimplexMeshFilter2Test.cxx @@ -42,10 +42,10 @@ itkTriangleMeshToSimplexMeshFilter2Test(int, char *[]) // Declare the type of the gradient image using SimplexFilterType = itk::TriangleMeshToSimplexMeshFilter; - auto mySphereMeshSource = SphereMeshSourceType::New(); - constexpr PointType center{}; + auto mySphereMeshSource = SphereMeshSourceType::New(); + constexpr PointType center{}; PointType::ValueType scaleInit[3] = { 10, 10, 10 }; - const VectorType scale = scaleInit; + const VectorType scale = scaleInit; mySphereMeshSource->SetCenter(center); mySphereMeshSource->SetResolution(2); @@ -62,7 +62,7 @@ itkTriangleMeshToSimplexMeshFilter2Test(int, char *[]) for (int i = 0; i < 7; ++i) { - itk::TimeProbe timeProbe; + itk::TimeProbe timeProbe; NeighborsListType * neighbors = nullptr; timeProbe.Start(); diff --git a/Modules/Core/Mesh/test/itkTriangleMeshToSimplexMeshFilterTest.cxx b/Modules/Core/Mesh/test/itkTriangleMeshToSimplexMeshFilterTest.cxx index abfd216dfbd..a268b7bb303 100644 --- a/Modules/Core/Mesh/test/itkTriangleMeshToSimplexMeshFilterTest.cxx +++ b/Modules/Core/Mesh/test/itkTriangleMeshToSimplexMeshFilterTest.cxx @@ -40,10 +40,10 @@ itkTriangleMeshToSimplexMeshFilterTest(int, char *[]) // declare the triangle to simplex mesh filter using SimplexFilterType = itk::TriangleMeshToSimplexMeshFilter; - auto mySphereMeshSource = SphereMeshSourceType::New(); - constexpr PointType center{}; + auto mySphereMeshSource = SphereMeshSourceType::New(); + constexpr PointType center{}; PointType::ValueType scaleInit[3] = { 5, 5, 5 }; - const VectorType scale = scaleInit; + const VectorType scale = scaleInit; mySphereMeshSource->SetCenter(center); mySphereMeshSource->SetResolution(0); diff --git a/Modules/Core/Mesh/test/itkWarpMeshFilterTest.cxx b/Modules/Core/Mesh/test/itkWarpMeshFilterTest.cxx index c7e3a16ddc7..2fa73c769f1 100644 --- a/Modules/Core/Mesh/test/itkWarpMeshFilterTest.cxx +++ b/Modules/Core/Mesh/test/itkWarpMeshFilterTest.cxx @@ -118,10 +118,10 @@ itkWarpMeshFilterTest(int, char *[]) ITK_TRY_EXPECT_NO_EXCEPTION(warpFilter->Update()); - const MeshType::Pointer outputMesh = warpFilter->GetOutput(); + const MeshType::Pointer outputMesh = warpFilter->GetOutput(); const MeshType::ConstPointer inputMesh = warpFilter->GetInput(); - const MeshType::PointsContainerPointer outPoints = outputMesh->GetPoints(); + const MeshType::PointsContainerPointer outPoints = outputMesh->GetPoints(); const MeshType::PointsContainerConstPointer inPoints = inputMesh->GetPoints(); MeshType::PointsContainer::ConstIterator inputPoint = inPoints->Begin(); diff --git a/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.h b/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.h index a45e6c5a3dc..d34396daa14 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.h +++ b/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.h @@ -358,9 +358,9 @@ class ITK_TEMPLATE_EXPORT GeometricalQuadEdge : public QuadEdge static const OriginRefType m_NoPoint; protected: - OriginRefType m_Origin{}; // Geometrical information - PrimalDataType m_Data{}; // User data associated to this edge. - bool m_DataSet{ false }; // Indicates if the data is set. + OriginRefType m_Origin{}; // Geometrical information + PrimalDataType m_Data{}; // User data associated to this edge. + bool m_DataSet{ false }; // Indicates if the data is set. LineCellIdentifier m_LineCellIdent{}; }; } // namespace itk diff --git a/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.hxx b/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.hxx index 1eba82c2e90..a12faa45c6c 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.hxx @@ -45,7 +45,7 @@ template ::SetLnextRingWithSameLeftFace( const DualOriginRefType faceGeom, - int maxSize) + int maxSize) { #ifndef NDEBUG if (!this->IsLnextSharingSameFace(maxSize)) @@ -310,7 +310,7 @@ GeometricalQuadEdge::GetNextBo } // Ok, no more special cases - IteratorGeom it = edgeTest->BeginGeomOnext(); + IteratorGeom it = edgeTest->BeginGeomOnext(); const IteratorGeom end = edgeTest->EndGeomOnext(); while (it != end) @@ -594,7 +594,7 @@ GeometricalQuadEdge::Disconnec // Update faces if the edge isn't a wire if (this->IsAtBorder()) { - Self * e = (this->IsRightSet()) ? this->GetSym() : this; + Self * e = (this->IsRightSet()) ? this->GetSym() : this; IteratorGeom it = e->BeginGeomLnext(); while (it != e->EndGeomLnext()) { diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdge.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdge.h index e7a4ad1e8c9..26f57ce392a 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdge.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdge.h @@ -81,7 +81,7 @@ \ pt * GetInvRnext() { return (dynamic_cast(this->st::GetInvRnext())); } \ \ - pt * GetInvDnext() { return (dynamic_cast(this->st::GetInvDnext())); } \ + pt * GetInvDnext() { return (dynamic_cast(this->st::GetInvDnext())); } \ const pt * GetOnext() const { return (dynamic_cast(this->st::GetOnext())); } \ \ const dt * GetRot() const { return (dynamic_cast(this->st::GetRot())); } \ diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.h index 007c577c8dd..7c854271908 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.h @@ -254,26 +254,26 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMesh : public Mesh * itkNotUsed(cellSet)) { return CellIdentifier{}; @@ -308,10 +308,10 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMesh : public Mesh auto QuadEdgeMesh::Splice(QEPrimal * a, QEPrimal * b) -> PointIdentifier { - const bool SplitingOrigin = a->IsInOnextRing(b); + const bool SplitingOrigin = a->IsInOnextRing(b); PointIdentifier resultingOriginId; if (SplitingOrigin) @@ -151,7 +151,7 @@ QuadEdgeMesh::Splice(QEPrimal * a, QEPrimal * b) -> // Make sure the Origin's edge entry doesn't point to an entry edge // that isn't any more in the Onext ring: const PointIdentifier orgId = a->GetOrigin(); - PointType org = this->GetPoint(orgId); + PointType org = this->GetPoint(orgId); org.SetEdge(a); this->SetPoint(orgId, org); @@ -340,7 +340,7 @@ void QuadEdgeMesh::SetCell(CellIdentifier itkNotUsed(cId), CellAutoPointer & cell) { // NOTE ALEX: should add some checking to be sure everything went fine - EdgeCellType * qe; + EdgeCellType * qe; PolygonCellType * pe; // The QuadEdgeMeshCellTypes first @@ -353,8 +353,8 @@ QuadEdgeMesh::SetCell(CellIdentifier itkNotUsed(cId } else if ((pe = dynamic_cast(cell.GetPointer())) != nullptr) { - PointIdList points; - PointIdInternalIterator pit = pe->InternalPointIdsBegin(); + PointIdList points; + PointIdInternalIterator pit = pe->InternalPointIdsBegin(); const PointIdInternalIterator pend = pe->InternalPointIdsEnd(); while (pit != pend) { @@ -369,8 +369,8 @@ QuadEdgeMesh::SetCell(CellIdentifier itkNotUsed(cId else // non-QE cell, i.e. original itk cells for example { const PointIdentifier numPoint = cell->GetNumberOfPoints(); - PointIdIterator pointId = cell->PointIdsBegin(); - PointIdIterator endId = cell->PointIdsEnd(); + PointIdIterator pointId = cell->PointIdsBegin(); + PointIdIterator endId = cell->PointIdsEnd(); // Edge if (numPoint == 2) { @@ -404,7 +404,7 @@ template auto QuadEdgeMesh::FindFirstUnusedPointIndex() -> PointIdentifier { - PointIdentifier pid = 0; + PointIdentifier pid = 0; const PointIdentifier maxpid = this->GetNumberOfPoints(); if (!m_FreePointIndexes.empty()) @@ -464,7 +464,7 @@ QuadEdgeMesh::SqueezePointsIds() // Check if there is any data const PointDataContainerPointer pointData = this->GetPointData(); - const bool HasPointData = (pointData->Size() != 0); + const bool HasPointData = (pointData->Size() != 0); // if there is get hold on the last point's data PointDataContainerIterator lastData = pointData->End(); @@ -475,8 +475,8 @@ QuadEdgeMesh::SqueezePointsIds() // Some Temp var to be used in the while loop PointIdentifier FilledPointID; - QEType * EdgeRingEntry; - QEType * EdgeRingIter; + QEType * EdgeRingEntry; + QEType * EdgeRingIter; // for all the free indexes and while there is any gap while ((!m_FreePointIndexes.empty()) && (last.Index() >= this->GetNumberOfPoints())) @@ -685,7 +685,7 @@ QuadEdgeMesh::AddEdgeWithSecurePointList(const Poin QEPrimal * eDestination = pDestination.GetEdge(); // Ok, there's room and the points exist - auto * newEdge = new EdgeCellType(); + auto * newEdge = new EdgeCellType(); QEPrimal * newEdgeGeom = newEdge->GetQEGeom(); newEdgeGeom->SetOrigin(orgPid); @@ -804,17 +804,17 @@ QuadEdgeMesh::DeleteEdge(QEPrimal * e) DeleteCellsCont cellsToDelete; // Delete all references to 'e' in the cell container - CellsContainerIterator cit = this->GetCells()->Begin(); + CellsContainerIterator cit = this->GetCells()->Begin(); const CellsContainerIterator cend = this->GetCells()->End(); while (cit != cend) { auto * pcell = dynamic_cast(cit.Value()); - bool toDelete = false; + bool toDelete = false; if (pcell != (PolygonCellType *)nullptr) { - QEPrimal * edge = pcell->GetEdgeRingEntry(); - typename QEPrimal::IteratorGeom it = edge->BeginGeomLnext(); + QEPrimal * edge = pcell->GetEdgeRingEntry(); + typename QEPrimal::IteratorGeom it = edge->BeginGeomLnext(); const typename QEPrimal::IteratorGeom end = edge->EndGeomLnext(); while (it != end && !toDelete) @@ -849,7 +849,7 @@ QuadEdgeMesh::DeleteEdge(QEPrimal * e) // we checked all the cells in the container // now delete the elements in the map - auto dit = cellsToDelete.begin(); + auto dit = cellsToDelete.begin(); const auto dend = cellsToDelete.end(); while (dit != dend) { @@ -1016,7 +1016,7 @@ void QuadEdgeMesh::DeleteFace(FaceRefType faceToDelete) { const CellsContainerPointer cells = this->GetCells(); - CellType * c; + CellType * c; if (!cells->GetElementIfIndexExists(faceToDelete, &c)) { @@ -1046,7 +1046,7 @@ QuadEdgeMesh::DeleteFace(FaceRefType faceToDelete) return; } - typename QEPrimal::IteratorGeom it = e->BeginGeomLnext(); + typename QEPrimal::IteratorGeom it = e->BeginGeomLnext(); const typename QEPrimal::IteratorGeom end = e->EndGeomLnext(); while (it != end) @@ -1074,9 +1074,9 @@ QuadEdgeMesh::GetEdge() const -> QEPrimal * return ((QEPrimal *)nullptr); } - const CellsContainer * edgeCells = this->GetEdgeCells(); + const CellsContainer * edgeCells = this->GetEdgeCells(); const CellsContainerConstIterator cit = edgeCells->Begin(); - auto * e = dynamic_cast(cit.Value()); + auto * e = dynamic_cast(cit.Value()); return (e->GetQEGeom()); } @@ -1121,7 +1121,7 @@ QuadEdgeMesh::FindEdge(const PointIdentifier & pid0 if (initialEdge) { - typename QEPrimal::IteratorGeom it = initialEdge->BeginGeomOnext(); + typename QEPrimal::IteratorGeom it = initialEdge->BeginGeomOnext(); const typename QEPrimal::IteratorGeom end = initialEdge->EndGeomOnext(); while (it != end) { @@ -1142,7 +1142,7 @@ auto QuadEdgeMesh::FindEdgeCell(const PointIdentifier & pid0, const PointIdentifier & pid1) const -> EdgeCellType * { - auto * result = (EdgeCellType *)nullptr; + auto * result = (EdgeCellType *)nullptr; QEPrimal * EdgeGeom = FindEdge(pid0, pid1); if (EdgeGeom != (QEPrimal *)nullptr) @@ -1171,8 +1171,8 @@ QuadEdgeMesh::AddFace(const PointIdList & points) - { typename PointIdList::const_iterator itr = points.begin(); typename PointIdList::const_iterator end = points.end(); - PointIdentifier count{}; - const PointIdentifier pointId = points[i]; + PointIdentifier count{}; + const PointIdentifier pointId = points[i]; while (itr != end) { if (*itr == pointId) @@ -1248,7 +1248,7 @@ QuadEdgeMesh::AddFaceWithSecurePointList(const Poin { const PointIdentifier pid0 = points[i]; const PointIdentifier pid1 = points[(i + 1) % numberOfPoints]; - QEPrimal * edge = this->FindEdge(pid0, pid1); + QEPrimal * edge = this->FindEdge(pid0, pid1); if (!edge && CheckEdges) { @@ -1308,7 +1308,7 @@ void QuadEdgeMesh::AddFace(QEPrimal * entry) { // Create the cell and add it to the container - auto * faceCell = new PolygonCellType(entry); + auto * faceCell = new PolygonCellType(entry); const CellIdentifier fid = this->FindFirstUnusedCellIndex(); faceCell->SetIdent(fid); @@ -1316,7 +1316,7 @@ QuadEdgeMesh::AddFace(QEPrimal * entry) // Associate the above generated CellIndex as the default FaceRefType // of the new face [ i.e. use the itk level CellIdentifier as the // GeometricalQuadEdge::m_Origin of dual edges (edges of type QEDual) ]. - typename QEPrimal::IteratorGeom it = entry->BeginGeomLnext(); + typename QEPrimal::IteratorGeom it = entry->BeginGeomLnext(); const typename QEPrimal::IteratorGeom end = entry->EndGeomLnext(); while (it != end) @@ -1373,7 +1373,7 @@ QuadEdgeMesh::ClearCellsContainer() { if (m_EdgeCellsContainer->GetReferenceCount() == 1) { - CellsContainerIterator EdgeCell = m_EdgeCellsContainer->Begin(); + CellsContainerIterator EdgeCell = m_EdgeCellsContainer->Begin(); const CellsContainerIterator EdgeEnd = m_EdgeCellsContainer->End(); while (EdgeCell != EdgeEnd) { @@ -1419,8 +1419,8 @@ QuadEdgeMesh::ComputeNumberOfPoints() const -> Poin return (0); } - PointIdentifier numberOfPoints{}; - PointsContainerConstIterator pointIterator = points->Begin(); + PointIdentifier numberOfPoints{}; + PointsContainerConstIterator pointIterator = points->Begin(); const PointsContainerConstIterator pointEnd = points->End(); while (pointIterator != pointEnd) @@ -1445,8 +1445,8 @@ template auto QuadEdgeMesh::ComputeNumberOfFaces() const -> CellIdentifier { - CellIdentifier numberOfFaces{}; - CellsContainerConstIterator cellIterator = this->GetCells()->Begin(); + CellIdentifier numberOfFaces{}; + CellsContainerConstIterator cellIterator = this->GetCells()->Begin(); const CellsContainerConstIterator cellEnd = this->GetCells()->End(); PointIdentifier NumOfPoints; diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBaseIterator.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBaseIterator.h index ecce2858de6..ec258d16f6c 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBaseIterator.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBaseIterator.h @@ -216,8 +216,8 @@ class QuadEdgeMeshBaseIterator protected: QuadEdgeType * m_StartEdge{}; /**< Start edge */ QuadEdgeType * m_Iterator{}; /**< Current iteration position */ - int m_OpType{}; /**< Operation type */ - bool m_Start{}; /**< Indicates iteration has just started */ + int m_OpType{}; /**< Operation type */ + bool m_Start{}; /**< Indicates iteration has just started */ }; /** @@ -307,8 +307,8 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshConstIterator : public QuadEdgeMeshBaseIte public: /** Object creation methods. */ QuadEdgeMeshConstIterator(const QuadEdgeType * e = (QuadEdgeType *)0, - int op = Superclass::OperatorOnext, - bool start = true) + int op = Superclass::OperatorOnext, + bool start = true) : Superclass(const_cast(e), op, start) {} @@ -354,8 +354,8 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshConstIteratorGeom : public QuadEdgeMeshCon public: QuadEdgeMeshConstIteratorGeom(const QuadEdgeType * e = (QuadEdgeType *)0, - int op = Superclass::OperatorOnext, - bool start = true) + int op = Superclass::OperatorOnext, + bool start = true) : Superclass(e, op, start) {} diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.hxx index 71d0c4f3018..882e7dc4940 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.hxx @@ -30,7 +30,7 @@ QuadEdgeMeshBoundaryEdgesMeshFunction::Evaluate(const InputType & mesh) c using CellsContainerConstIterator = typename MeshType::CellsContainerConstIterator; std::set boundaryList; - CellsContainerConstIterator cellIterator = mesh.GetEdgeCells()->Begin(); + CellsContainerConstIterator cellIterator = mesh.GetEdgeCells()->Begin(); const CellsContainerConstIterator cellEnd = mesh.GetEdgeCells()->End(); while (cellIterator != cellEnd) @@ -52,7 +52,7 @@ QuadEdgeMeshBoundaryEdgesMeshFunction::Evaluate(const InputType & mesh) c // Pop the first edge of list and make sure it has no face // on its left [because we want to follow the boundary with // GeometricalQuadEdge::Lnext()]: - auto b = boundaryList.begin(); + auto b = boundaryList.begin(); QEPrimal * bdryEdge = *b; boundaryList.erase(b); if (bdryEdge->IsLeftSet()) @@ -72,7 +72,7 @@ QuadEdgeMeshBoundaryEdgesMeshFunction::Evaluate(const InputType & mesh) c // Follow, with Lnext(), the boundary while removing edges // from boundary list: - typename QEPrimal::IteratorGeom bIt = bdryEdge->BeginGeomLnext(); + typename QEPrimal::IteratorGeom bIt = bdryEdge->BeginGeomLnext(); const typename QEPrimal::IteratorGeom bEnd = bdryEdge->EndGeomLnext(); while (bIt != bEnd) diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorCreateCenterVertexFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorCreateCenterVertexFunction.hxx index 9f9ac5129d2..aa8e7fbd5fc 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorCreateCenterVertexFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorCreateCenterVertexFunction.hxx @@ -51,8 +51,8 @@ QuadEdgeMeshEulerOperatorCreateCenterVertexFunction::Evaluate(QE this->m_Mesh->DeleteFace(e->GetLeft()); // create new point geometry - unsigned int sum = 0; - VectorType vec{}; + unsigned int sum = 0; + VectorType vec{}; const PointIdentifier pid = this->m_Mesh->FindFirstUnusedPointIndex(); using AssociatedBarycenters = std::map; AssociatedBarycenters m_AssocBary; diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.hxx index de4ff946222..074c2672212 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.hxx @@ -47,7 +47,7 @@ QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction::Evaluate(QE // one-ring std::vector pList; - QEType * g_sym = g->GetSym(); + QEType * g_sym = g->GetSym(); using QEIterator = typename QEType::IteratorGeom; for (QEIterator it = g_sym->BeginGeomOnext(); it != g_sym->EndGeomOnext(); ++it) { @@ -71,7 +71,7 @@ QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction::Evaluate(QE PointId2 = pList.back(); pList.pop_back(); const FaceRefType FirstFace = this->m_Mesh->FindEdge(PointId1, PointId2)->GetLeft(); - bool SecondFaceFound = false; + bool SecondFaceFound = false; while ((pList.size()) && (!SecondFaceFound)) { PointId1 = PointId2; diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.hxx index 3e0681a601c..92a7b04a4ec 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.hxx @@ -139,7 +139,7 @@ QuadEdgeMeshEulerOperatorFlipEdgeFunction::Process(QEType * h) - using SplitFacet = QuadEdgeMeshEulerOperatorSplitFacetFunction; QEType * G = h->GetLnext(); - auto joinFacet = JoinFacet::New(); + auto joinFacet = JoinFacet::New(); joinFacet->SetInput(this->m_Mesh); QEType * H = joinFacet->Evaluate(h)->GetLnext(); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx index 31cba699981..1af057c0f20 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx @@ -134,9 +134,9 @@ QuadEdgeMeshEulerOperatorJoinVertexFunction::Process(QEType * e) const bool wasRiteTriangle = e_sym->IsLnextOfTriangle(); const PointIdentifier NewDest = e->GetDestination(); - PointIdentifier NewOrg = e->GetOrigin(); - QEType * leftZip = e->GetLnext(); - QEType * riteZip = e->GetOprev(); + PointIdentifier NewOrg = e->GetOrigin(); + QEType * leftZip = e->GetLnext(); + QEType * riteZip = e->GetOprev(); // // \ | / // @@ -258,7 +258,7 @@ QuadEdgeMeshEulerOperatorJoinVertexFunction::ProcessIsolatedQuad template TQEType * QuadEdgeMeshEulerOperatorJoinVertexFunction::ProcessIsolatedFace( - QEType * e, + QEType * e, std::stack & EdgesToBeDeleted) { const PointIdentifier org = e->GetOrigin(); @@ -286,11 +286,11 @@ QuadEdgeMeshEulerOperatorJoinVertexFunction::ProcessIsolatedFace template bool -QuadEdgeMeshEulerOperatorJoinVertexFunction::IsFaceIsolated(QEType * e, - const bool iWasLeftFace, +QuadEdgeMeshEulerOperatorJoinVertexFunction::IsFaceIsolated(QEType * e, + const bool iWasLeftFace, std::stack & oToBeDeleted) { - bool border; + bool border; QEType * e_sym = e->GetSym(); // turn around the face (left or right one) while edges are on the border @@ -314,7 +314,7 @@ QuadEdgeMeshEulerOperatorJoinVertexFunction::IsFaceIsolated(QETy template auto -QuadEdgeMeshEulerOperatorJoinVertexFunction::CheckStatus(QEType * e, +QuadEdgeMeshEulerOperatorJoinVertexFunction::CheckStatus(QEType * e, std::stack & oToBeDeleted) -> EdgeStatusType { @@ -556,7 +556,7 @@ QuadEdgeMeshEulerOperatorJoinVertexFunction::IsEdgeLinkingTwoDif { QEType * t = e; QEType * e_it = t; - bool org_border; + bool org_border; do { diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.hxx index 04acef95046..4600e0a6968 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.hxx @@ -78,7 +78,7 @@ QuadEdgeMeshEulerOperatorSplitFacetFunction::Evaluate(QEType * h const VertexRefType destPid = g->GetDestination(); // Create an new isolated edge and set its geometry: - auto * newEdge = new EdgeCellType; + auto * newEdge = new EdgeCellType; QEType * newEdgeGeom = newEdge->GetQEGeom(); // see the code of e.g. AddFace diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorsTestHelper.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorsTestHelper.h index e0f93847209..f40a945e7f2 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorsTestHelper.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorsTestHelper.h @@ -25,7 +25,7 @@ using IdentifierType = unsigned long; template bool -AssertTopologicalInvariants(TMesh * mesh, +AssertTopologicalInvariants(TMesh * mesh, IdentifierType NumVertices, IdentifierType NumFaces, IdentifierType NumEdges, @@ -84,10 +84,10 @@ CreateSquareQuadMesh(typename TMesh::Pointer mesh) ///////////////////////////////////////////////////////////// constexpr int expectedNumPts = 25; constexpr int expectedNumCells = 16; - const int simpleSquareCells[64] = { 0, 1, 6, 5, 1, 2, 7, 6, 2, 3, 8, 7, 3, 4, 9, 8, - 5, 6, 11, 10, 6, 7, 12, 11, 7, 8, 13, 12, 8, 9, 14, 13, - 10, 11, 16, 15, 11, 12, 17, 16, 12, 13, 18, 17, 13, 14, 19, 18, - 15, 16, 21, 20, 16, 17, 22, 21, 17, 18, 23, 22, 18, 19, 24, 23 }; + const int simpleSquareCells[64] = { 0, 1, 6, 5, 1, 2, 7, 6, 2, 3, 8, 7, 3, 4, 9, 8, + 5, 6, 11, 10, 6, 7, 12, 11, 7, 8, 13, 12, 8, 9, 14, 13, + 10, 11, 16, 15, 11, 12, 17, 16, 12, 13, 18, 17, 13, 14, 19, 18, + 15, 16, 21, 20, 16, 17, 22, 21, 17, 18, 23, 22, 18, 19, 24, 23 }; using PointType = typename MeshType::PointType; @@ -99,7 +99,7 @@ CreateSquareQuadMesh(typename TMesh::Pointer mesh) } typename CellType::CellAutoPointer cellpointer; - QEPolygonCellType * poly; + QEPolygonCellType * poly; for (int i = 0; i < expectedNumCells; ++i) { @@ -132,11 +132,11 @@ CreateSquareTriangularMesh(typename TMesh::Pointer mesh) ///////////////////////////////////////////////////////////// constexpr int expectedNumPts = 25; constexpr int expectedNumCells = 32; - const int simpleSquareCells[96] = { 0, 1, 6, 0, 6, 5, 1, 2, 7, 1, 7, 6, 2, 3, 8, 2, 8, 7, 3, 4, - 9, 3, 9, 8, 5, 6, 11, 5, 11, 10, 6, 7, 12, 6, 12, 11, 7, 8, 13, 7, - 13, 12, 8, 9, 14, 8, 14, 13, 10, 11, 16, 10, 16, 15, 11, 12, 17, 11, 17, 16, - 12, 13, 18, 12, 18, 17, 13, 14, 19, 13, 19, 18, 15, 16, 21, 15, 21, 20, 16, 17, - 22, 16, 22, 21, 17, 18, 23, 17, 23, 22, 18, 19, 24, 18, 24, 23 }; + const int simpleSquareCells[96] = { 0, 1, 6, 0, 6, 5, 1, 2, 7, 1, 7, 6, 2, 3, 8, 2, 8, 7, 3, 4, + 9, 3, 9, 8, 5, 6, 11, 5, 11, 10, 6, 7, 12, 6, 12, 11, 7, 8, 13, 7, + 13, 12, 8, 9, 14, 8, 14, 13, 10, 11, 16, 10, 16, 15, 11, 12, 17, 11, 17, 16, + 12, 13, 18, 12, 18, 17, 13, 14, 19, 13, 19, 18, 15, 16, 21, 15, 21, 20, 16, 17, + 22, 16, 22, 21, 17, 18, 23, 17, 23, 22, 18, 19, 24, 18, 24, 23 }; using PointType = typename TMesh::PointType; std::vector pts = GeneratePointCoordinates(5); @@ -147,7 +147,7 @@ CreateSquareTriangularMesh(typename TMesh::Pointer mesh) } typename CellType::CellAutoPointer cellpointer; - QEPolygonCellType * poly; + QEPolygonCellType * poly; for (int i = 0; i < expectedNumCells; ++i) { @@ -179,11 +179,11 @@ CreateTetraedronMesh(typename TMesh::Pointer mesh) ///////////////////////////////////////////////////////////// constexpr int expectedNumPts = 4; constexpr int expectedNumCells = 4; - const int simpleSquareCells[12] = { 0, 1, 2, 1, 0, 3, 1, 3, 2, 2, 3, 0 }; + const int simpleSquareCells[12] = { 0, 1, 2, 1, 0, 3, 1, 3, 2, 2, 3, 0 }; using PointType = typename TMesh::PointType; std::vector pts(4); - int i(0); + int i(0); pts[i][0] = 0.; pts[i][1] = 1.; pts[i++][2] = 0.; @@ -203,7 +203,7 @@ CreateTetraedronMesh(typename TMesh::Pointer mesh) } typename CellType::CellAutoPointer cellpointer; - QEPolygonCellType * poly; + QEPolygonCellType * poly; for (i = 0; i < expectedNumCells; ++i) { @@ -236,11 +236,11 @@ CreateSamosa(typename TMesh::Pointer mesh) ///////////////////////////////////////////////////////////// constexpr int expectedNumPts = 3; constexpr int expectedNumCells = 2; - const int simpleSquareCells[6] = { 0, 1, 2, 1, 0, 2 }; + const int simpleSquareCells[6] = { 0, 1, 2, 1, 0, 2 }; using PointType = typename TMesh::PointType; std::vector pts(3); - int i(0); + int i(0); pts[i][0] = 0.; pts[i][1] = 1.; pts[i++][2] = 0.; @@ -257,7 +257,7 @@ CreateSamosa(typename TMesh::Pointer mesh) } typename CellType::CellAutoPointer cellpointer; - QEPolygonCellType * poly; + QEPolygonCellType * poly; for (i = 0; i < expectedNumCells; ++i) { diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.h index 1cae9743cf4..51fe1f6599b 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.h @@ -131,7 +131,7 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshFrontBaseIterator } public: - QEType * m_Edge; + QEType * m_Edge; CoordinateType m_Cost; }; @@ -272,8 +272,8 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshConstFrontIterator : public QuadEdgeMeshFr public: /** Object creation methods. */ QuadEdgeMeshConstFrontIterator(const MeshType * itkNotUsed(mesh) = (MeshType *)0, - bool itkNotUsed(start) = true, - QEType * itkNotUsed(seed) = (QEType *)nullptr) + bool itkNotUsed(start) = true, + QEType * itkNotUsed(seed) = (QEType *)nullptr) {} /** \todo do we need here a : Superclass( mesh, start, seed ) { } */ diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.hxx index e53006deacd..e20f8af7455 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.hxx @@ -82,7 +82,7 @@ QuadEdgeMeshFrontBaseIterator::operator++() // Sort on the Cost: m_Front->sort(); // Consider the edge with lowest Cost: - auto fit = m_Front->begin(); + auto fit = m_Front->begin(); QEType * edge = fit->m_Edge; // Traverse the Onext ring in search of an unvisited Origin: diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.h index 554bd46f5d2..192cb44f100 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.h @@ -234,8 +234,8 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshLineCell * In order to have constant time access at the itk level instead of * of doing a search in the Mesh::Cell container. */ - CellIdentifier m_Identifier{}; - QEType * m_QuadEdgeGeom{}; + CellIdentifier m_Identifier{}; + QEType * m_QuadEdgeGeom{}; mutable PointIdentifier m_PointIds[2]{}; }; } // end namespace itk diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.hxx index 36544746796..b1ba53a921c 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.hxx @@ -135,9 +135,9 @@ QuadEdgeMeshLineCell::GetNumberOfBoundaryFeatures(int dimension) // --------------------------------------------------------------------- template bool -QuadEdgeMeshLineCell::GetBoundaryFeature(int itkNotUsed(dimension), +QuadEdgeMeshLineCell::GetBoundaryFeature(int itkNotUsed(dimension), CellFeatureIdentifier itkNotUsed(cellId), - CellAutoPointer & itkNotUsed(cell)) + CellAutoPointer & itkNotUsed(cell)) { // TODO : FIXME return (false); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshMacro.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshMacro.h index 12170621380..bd0ef9d3bb5 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshMacro.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshMacro.h @@ -62,7 +62,7 @@ namespace itk PointsContainerIterator pointIterator = points->Begin(); \ while (pointIterator != points->End()) \ { \ - PointType PointVariable = pointIterator.Value(); \ + PointType PointVariable = pointIterator.Value(); \ PointIdentifier PointIndex = pointIterator.Index(); /** \def itkQEMeshForAllPointsEndMacro diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.h index 3371dca1a00..fff7421f750 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.h @@ -166,14 +166,14 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshPolygonCell : public TCellInterface MakeCopy(CellAutoPointer & cell) const override { const PointIdentifier numberOfPoints = this->GetNumberOfPoints(); - auto * newPolygonCell = new Self(numberOfPoints); + auto * newPolygonCell = new Self(numberOfPoints); cell.TakeOwnership(newPolygonCell); if (numberOfPoints) { PointIdentifier i = 0; - PointIdInternalConstIterator it = this->InternalPointIdsBegin(); + PointIdInternalConstIterator it = this->InternalPointIdsBegin(); const PointIdInternalConstIterator end = this->InternalPointIdsEnd(); while (it != end) @@ -288,7 +288,7 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshPolygonCell : public TCellInterface { m_PointIds.clear(); - PointIdInternalConstIterator it = this->InternalPointIdsBegin(); + PointIdInternalConstIterator it = this->InternalPointIdsBegin(); const PointIdInternalConstIterator end = this->InternalPointIdsEnd(); while (it != end) diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.hxx index 7761c385187..f30b9f582ad 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.hxx @@ -121,8 +121,8 @@ unsigned int QuadEdgeMeshPolygonCell::GetNumberOfPoints() const { // The constructor creates one edge by default - unsigned int n = 0; - PointIdInternalConstIterator it = this->InternalPointIdsBegin(); + unsigned int n = 0; + PointIdInternalConstIterator it = this->InternalPointIdsBegin(); const PointIdInternalConstIterator end = this->InternalPointIdsEnd(); while (it != end) @@ -160,9 +160,9 @@ QuadEdgeMeshPolygonCell::GetNumberOfBoundaryFeatures(int dimensi // --------------------------------------------------------------------- template bool -QuadEdgeMeshPolygonCell::GetBoundaryFeature(int itkNotUsed(dimension), +QuadEdgeMeshPolygonCell::GetBoundaryFeature(int itkNotUsed(dimension), CellFeatureIdentifier itkNotUsed(cellId), - CellAutoPointer & itkNotUsed(cell)) + CellAutoPointer & itkNotUsed(cell)) { /// \todo return (false); @@ -175,8 +175,8 @@ QuadEdgeMeshPolygonCell::SetPointIds(PointIdConstIterator first) { if (this->GetNumberOfPoints() > 2) { - PointIdConstIterator i2 = first; - PointIdInternalIterator i1 = this->InternalPointIdsBegin(); + PointIdConstIterator i2 = first; + PointIdInternalIterator i1 = this->InternalPointIdsBegin(); const PointIdInternalIterator end = this->InternalPointIdsEnd(); while (i1 != end) @@ -195,8 +195,8 @@ QuadEdgeMeshPolygonCell::InternalSetPointIds(PointIdInternalCons { if (this->GetNumberOfPoints() > 2) { - PointIdInternalConstIterator i2 = first; - PointIdInternalIterator i1 = this->InternalPointIdsBegin(); + PointIdInternalConstIterator i2 = first; + PointIdInternalIterator i1 = this->InternalPointIdsBegin(); const PointIdInternalIterator end = this->InternalPointIdsEnd(); while (i1 != end) @@ -213,9 +213,9 @@ template void QuadEdgeMeshPolygonCell::SetPointIds(PointIdConstIterator first, PointIdConstIterator last) { - PointIdInternalIterator i1 = this->InternalPointIdsBegin(); + PointIdInternalIterator i1 = this->InternalPointIdsBegin(); const PointIdInternalIterator end = this->InternalPointIdsEnd(); - PointIdConstIterator i2 = first; + PointIdConstIterator i2 = first; while (i1 != end && i2 != last) { @@ -231,9 +231,9 @@ void QuadEdgeMeshPolygonCell::InternalSetPointIds(PointIdInternalConstIterator first, PointIdInternalConstIterator last) { - PointIdInternalIterator i1 = this->InternalPointIdsBegin(); + PointIdInternalIterator i1 = this->InternalPointIdsBegin(); const PointIdInternalIterator end = this->InternalPointIdsEnd(); - PointIdInternalConstIterator i2 = first; + PointIdInternalConstIterator i2 = first; while (i1 != end && i2 != last) { @@ -248,8 +248,8 @@ template void QuadEdgeMeshPolygonCell::SetPointId(int localId, PointIdentifier pId) { - int n = 0; - PointIdInternalIterator it = this->InternalPointIdsBegin(); + int n = 0; + PointIdInternalIterator it = this->InternalPointIdsBegin(); const PointIdInternalIterator end = this->InternalPointIdsEnd(); while (it != end && n <= localId) @@ -269,7 +269,7 @@ template auto QuadEdgeMeshPolygonCell::GetPointId(int localId) const -> PointIdentifier { - int n = 0; + int n = 0; PointIdInternalConstIterator it = this->InternalPointIdsBegin(); while (it != this->InternalPointIdsEnd() && n <= localId) @@ -305,7 +305,7 @@ template auto QuadEdgeMeshPolygonCell::InternalGetPointIds() const -> PointIdInternalConstIterator { - const QuadEdgeType * edge = const_cast(m_EdgeRingEntry); + const QuadEdgeType * edge = const_cast(m_EdgeRingEntry); const PointIdInternalConstIterator iterator(edge->BeginGeomLnext()); return iterator; @@ -316,7 +316,7 @@ template auto QuadEdgeMeshPolygonCell::InternalPointIdsBegin() const -> PointIdInternalConstIterator { - const QuadEdgeType * edge = const_cast(m_EdgeRingEntry); + const QuadEdgeType * edge = const_cast(m_EdgeRingEntry); const PointIdInternalConstIterator iterator(edge->BeginGeomLnext()); return iterator; @@ -327,7 +327,7 @@ template auto QuadEdgeMeshPolygonCell::InternalPointIdsEnd() const -> PointIdInternalConstIterator { - const auto * edge = const_cast(m_EdgeRingEntry); + const auto * edge = const_cast(m_EdgeRingEntry); const PointIdInternalConstIterator iterator = edge->EndGeomLnext(); return iterator; diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshScalarDataVTKPolyDataWriter.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshScalarDataVTKPolyDataWriter.hxx index 2b26e953818..1efdc78e62a 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshScalarDataVTKPolyDataWriter.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshScalarDataVTKPolyDataWriter.hxx @@ -68,7 +68,7 @@ QuadEdgeMeshScalarDataVTKPolyDataWriter::WriteCellData() SizeValueType k(0); const CellsContainerConstPointer cells = this->m_Input->GetCells(); - CellsContainerConstIterator it = cells->Begin(); + CellsContainerConstIterator it = cells->Begin(); CellDataContainerConstIterator c_it = celldata->Begin(); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshToQuadEdgeMeshFilter.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshToQuadEdgeMeshFilter.h index 1ce98643481..f63a2cec14e 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshToQuadEdgeMeshFilter.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshToQuadEdgeMeshFilter.h @@ -237,15 +237,15 @@ CopyMeshToMeshCells(const TInputMesh * in, TOutputMesh * out) return; } - InputCellsContainerConstIterator cIt = inCells->Begin(); + InputCellsContainerConstIterator cIt = inCells->Begin(); const InputCellsContainerConstIterator cEnd = inCells->End(); while (cIt != cEnd) { auto * pe = dynamic_cast(cIt.Value()); if (pe) { - InputPointIdList points; - InputPointsIdInternalIterator pIt = pe->InternalPointIdsBegin(); + InputPointIdList points; + InputPointsIdInternalIterator pIt = pe->InternalPointIdsBegin(); const InputPointsIdInternalIterator pEnd = pe->InternalPointIdsEnd(); while (pIt != pEnd) @@ -278,7 +278,7 @@ CopyMeshToMeshEdgeCells(const TInputMesh * in, TOutputMesh * out) return; } - InputCellsContainerConstIterator ecIt = inEdgeCells->Begin(); + InputCellsContainerConstIterator ecIt = inEdgeCells->Begin(); const InputCellsContainerConstIterator ecEnd = inEdgeCells->End(); while (ecIt != ecEnd) @@ -313,7 +313,7 @@ CopyMeshToMeshPoints(const TInputMesh * in, TOutputMesh * out) return; } - InputPointsContainerConstIterator inIt = inPoints->Begin(); + InputPointsContainerConstIterator inIt = inPoints->Begin(); const InputPointsContainerConstIterator inEnd = inPoints->End(); OutputPointsContainerPointer oPoints = out->GetPoints(); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshToQuadEdgeMeshFilter.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshToQuadEdgeMeshFilter.hxx index abb4efad468..6585c6e3030 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshToQuadEdgeMeshFilter.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshToQuadEdgeMeshFilter.hxx @@ -65,7 +65,7 @@ void QuadEdgeMeshToQuadEdgeMeshFilter::CopyInputMeshToOutputMeshPoints() { const InputMeshType * in = this->GetInput(); - OutputMeshType * out = this->GetOutput(); + OutputMeshType * out = this->GetOutput(); CopyMeshToMeshPoints(in, out); } @@ -76,7 +76,7 @@ void QuadEdgeMeshToQuadEdgeMeshFilter::CopyInputMeshToOutputMeshEdgeCells() { const InputMeshType * in = this->GetInput(); - OutputMeshType * out = this->GetOutput(); + OutputMeshType * out = this->GetOutput(); CopyMeshToMeshEdgeCells(in, out); } @@ -87,7 +87,7 @@ void QuadEdgeMeshToQuadEdgeMeshFilter::CopyInputMeshToOutputMeshCells() { const InputMeshType * in = this->GetInput(); - OutputMeshType * out = this->GetOutput(); + OutputMeshType * out = this->GetOutput(); CopyMeshToMeshCells(in, out); } @@ -98,7 +98,7 @@ void QuadEdgeMeshToQuadEdgeMeshFilter::CopyInputMeshToOutputMeshPointData() { const InputMeshType * in = this->GetInput(); - OutputMeshType * out = this->GetOutput(); + OutputMeshType * out = this->GetOutput(); CopyMeshToMeshPointData(in, out); } @@ -109,7 +109,7 @@ void QuadEdgeMeshToQuadEdgeMeshFilter::CopyInputMeshToOutputMeshCellData() { const InputMeshType * in = this->GetInput(); - OutputMeshType * out = this->GetOutput(); + OutputMeshType * out = this->GetOutput(); CopyMeshToMeshCellData(in, out); } diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.h index 9c90a67fe82..9bd7dc10051 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.h @@ -89,9 +89,9 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshTopologyChecker : public Object MeshPointer m_Mesh{}; PointIdentifier m_ExpectedNumberOfPoints{}; - CellIdentifier m_ExpectedNumberOfEdges{}; - CellIdentifier m_ExpectedNumberOfFaces{}; - CellIdentifier m_ExpectedNumberOfBoundaries{}; + CellIdentifier m_ExpectedNumberOfEdges{}; + CellIdentifier m_ExpectedNumberOfFaces{}; + CellIdentifier m_ExpectedNumberOfBoundaries{}; OffsetValueType m_ExpectedGenus{}; }; } // namespace itk diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.hxx index 1e9f3434ea5..72b04a6a7ed 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.hxx @@ -51,7 +51,7 @@ QuadEdgeMeshTopologyChecker::ValidateEulerCharacteristic() const const CellIdentifier numFaces = m_Mesh->ComputeNumberOfFaces(); // Number of Boundaries typename BoundaryEdges::OutputType listOfBoundaries = boundaryEdges->Evaluate((*m_Mesh)); - auto numBounds = static_cast(listOfBoundaries->size()); + auto numBounds = static_cast(listOfBoundaries->size()); delete listOfBoundaries; /** @@ -87,7 +87,7 @@ QuadEdgeMeshTopologyChecker::ValidateEulerCharacteristic() const } // Look is they are isolated edges - CellsContainerConstIterator cellIterator = m_Mesh->GetCells()->Begin(); + CellsContainerConstIterator cellIterator = m_Mesh->GetCells()->Begin(); const CellsContainerConstIterator cellEnd = m_Mesh->GetCells()->End(); while (cellIterator != cellEnd) { diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshZipMeshFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshZipMeshFunction.hxx index b9c51850568..28e79cd0875 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshZipMeshFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshZipMeshFunction.hxx @@ -75,13 +75,13 @@ QuadEdgeMeshZipMeshFunction::Evaluate(QEType * e) -> OutputType // / | \ // // // Store for latter usage (since e and e->GetRight() will be deleted): - QEType * a = e->GetLnext(); - QEType * b = e->GetOnext()->GetSym(); + QEType * a = e->GetLnext(); + QEType * b = e->GetOnext()->GetSym(); const OutputType VLeft = e->GetDestination(); const OutputType VRite = b->GetOrigin(); - const bool wasFacePresent = e->IsRightSet(); - const auto rightFaceID = e->GetRight(); - OutputType resultingPointId = QEType::m_NoPoint; + const bool wasFacePresent = e->IsRightSet(); + const auto rightFaceID = e->GetRight(); + OutputType resultingPointId = QEType::m_NoPoint; // We should be cautious and consider the case when the very // initial situation was the following: diff --git a/Modules/Core/QuadEdgeMesh/test/itkDynamicQuadEdgeMeshTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkDynamicQuadEdgeMeshTest.cxx index 16f0e2d7ff6..dd87450ab78 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkDynamicQuadEdgeMeshTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkDynamicQuadEdgeMeshTest.cxx @@ -79,7 +79,7 @@ itkDynamicQuadEdgeMeshTest(int, char *[]) std::cout << "Number of Points = " << mesh->GetNumberOfPoints() << std::endl; - PointsIterator point = pointsContainter->Begin(); + PointsIterator point = pointsContainter->Begin(); const PointsIterator endpoint = pointsContainter->End(); while (point != endpoint) diff --git a/Modules/Core/QuadEdgeMesh/test/itkGeometricalQuadEdgeTest1.cxx b/Modules/Core/QuadEdgeMesh/test/itkGeometricalQuadEdgeTest1.cxx index 93ae6190fe0..a3670de4ebb 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkGeometricalQuadEdgeTest1.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkGeometricalQuadEdgeTest1.cxx @@ -67,7 +67,7 @@ itkGeometricalQuadEdgeTest1(int, char *[]) { // Define a local scope for testing constructors - DualQuadEdgeType dummyQuadEdge1; // test constructor + DualQuadEdgeType dummyQuadEdge1; // test constructor PrimalQuadEdgeType dummyQuadEdge2; // test constructor dummyQuadEdge1.SetRot(&dummyQuadEdge2); // Test SetRot() diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshAddFaceTest1.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshAddFaceTest1.cxx index 7c6a0c0489a..0eae3af7127 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshAddFaceTest1.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshAddFaceTest1.cxx @@ -67,7 +67,7 @@ itkQuadEdgeMeshAddFaceTest1(int argc, char * argv[]) // \ / \ / // // p5---------------p6 // /// // - constexpr int NumPoints = 7; + constexpr int NumPoints = 7; PointIdentifier pid[NumPoints]; PointType::CoordinateType a = std::sqrt(3.0) / 2.0; @@ -585,7 +585,7 @@ itkQuadEdgeMeshAddFaceTest1(int argc, char * argv[]) auto moebiusMesh = MeshType::New(); - constexpr int moebNumPoints = 6; + constexpr int moebNumPoints = 6; PointIdentifier moebPid[moebNumPoints]; ValueArrayType moebPointCoordinates[moebNumPoints] = { { 0.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 }, { 1.0, 0.0, 0.0 }, diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshBasicLayerTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshBasicLayerTest.cxx index bcf9717150c..78e56242c7d 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshBasicLayerTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshBasicLayerTest.cxx @@ -194,7 +194,7 @@ itkQuadEdgeMeshBasicLayerTest(int, char *[]) std::cout << "on Sym()... " << std::endl; constexpr int lnextDestinationOnSym[3] = { 2, 0, 1 }; - int test = 0; + int test = 0; for (IteratorGeom itLnext = e[4]->GetSym()->BeginGeomLnext(); itLnext != e[4]->GetSym()->EndGeomLnext(); itLnext++, test++) { diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshCellInterfaceTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshCellInterfaceTest.cxx index c0742e2cd62..ab96ecfb9db 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshCellInterfaceTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshCellInterfaceTest.cxx @@ -70,7 +70,7 @@ TestCellInterface(std::string name, TCell * aCell) { const CellAutoPointer cell(aCell, true); - const TCell * cell2 = aCell; + const TCell * cell2 = aCell; std::cout << "-------- " << name << '(' << aCell->GetNameOfClass() << ')' << std::endl; std::cout << " Type: " << static_cast(cell->GetType()) << std::endl; @@ -178,11 +178,11 @@ TestQECellInterface(std::string name, TCell * aCell) { std::cout << "-------- " << name << '(' << aCell->GetNameOfClass() << ')' << std::endl; - TCell * cell = aCell; + TCell * cell = aCell; const TCell * cell2 = aCell; std::cout << " QE Iterator test: PointIds for empty cell: "; - typename TCell::PointIdInternalIterator pointId = cell->InternalPointIdsBegin(); + typename TCell::PointIdInternalIterator pointId = cell->InternalPointIdsBegin(); const typename TCell::PointIdInternalIterator endId = cell->InternalPointIdsEnd(); while (pointId != endId) { @@ -192,7 +192,7 @@ TestQECellInterface(std::string name, TCell * aCell) std::cout << std::endl; std::cout << " ConstIterator test: PointIds for empty cell: "; - typename TCell::PointIdInternalConstIterator cpointId = cell2->InternalPointIdsBegin(); + typename TCell::PointIdInternalConstIterator cpointId = cell2->InternalPointIdsBegin(); const typename TCell::PointIdInternalConstIterator cendId = cell2->InternalPointIdsEnd(); while (cpointId != cendId) @@ -222,7 +222,7 @@ TestQECellInterface(std::string name, TCell * aCell) std::cout << " ConstIterator test: PointIds for populated cell: "; - typename TCell::PointIdInternalConstIterator ppointId = cell2->InternalPointIdsBegin(); + typename TCell::PointIdInternalConstIterator ppointId = cell2->InternalPointIdsBegin(); const typename TCell::PointIdInternalConstIterator pendId = cell2->InternalPointIdsEnd(); while (ppointId != pendId) { @@ -233,7 +233,7 @@ TestQECellInterface(std::string name, TCell * aCell) cell->InternalSetPointIds(cell2->InternalPointIdsBegin(), cell2->InternalPointIdsEnd()); std::cout << " Iterator test: PointIds for populated cell: "; - typename TCell::PointIdInternalIterator pxpointId = cell->InternalPointIdsBegin(); + typename TCell::PointIdInternalIterator pxpointId = cell->InternalPointIdsBegin(); const typename TCell::PointIdInternalIterator pxendId = cell->InternalPointIdsEnd(); while (pxpointId != pxendId) { @@ -390,7 +390,7 @@ itkQuadEdgeMeshCellInterfaceTest(int, char *[]) multiVisitor->AddVisitor(QELineVisitor); multiVisitor->AddVisitor(QEPolyVisitor); - auto mesh = MeshType::New(); + auto mesh = MeshType::New(); MeshType::PointType pts[3]; pts[0][0] = 0; pts[0][1] = 0; @@ -411,13 +411,13 @@ itkQuadEdgeMeshCellInterfaceTest(int, char *[]) // test 4 very specific QELineCell destructor cases { const QELineCellType test; - QEType * quadEdgeGeom = test.GetQEGeom(); + QEType * quadEdgeGeom = test.GetQEGeom(); delete quadEdgeGeom->GetRot()->GetRot()->GetRot(); quadEdgeGeom->GetRot()->GetRot()->SetRot(nullptr); } { const QELineCellType test; - QEType * quadEdgeGeom = test.GetQEGeom(); + QEType * quadEdgeGeom = test.GetQEGeom(); delete quadEdgeGeom->GetRot()->GetRot()->GetRot(); quadEdgeGeom->GetRot()->GetRot()->SetRot(nullptr); delete quadEdgeGeom->GetRot()->GetRot(); @@ -425,7 +425,7 @@ itkQuadEdgeMeshCellInterfaceTest(int, char *[]) } { const QELineCellType test; - QEType * quadEdgeGeom = test.GetQEGeom(); + QEType * quadEdgeGeom = test.GetQEGeom(); delete quadEdgeGeom->GetRot()->GetRot()->GetRot(); quadEdgeGeom->GetRot()->GetRot()->SetRot(nullptr); delete quadEdgeGeom->GetRot()->GetRot(); diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshDeleteEdgeTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshDeleteEdgeTest.cxx index 0b3caadbfe4..2b48501bb49 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshDeleteEdgeTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshDeleteEdgeTest.cxx @@ -89,7 +89,7 @@ itkQuadEdgeMeshDeleteEdgeTest(int, char *[]) std::cout << indent << "Trying to remove only two edges..."; constexpr itk::IdentifierType expectedEdgeCount = 2; - const itk::IdentifierType obtainedEdgeCount = edgesBefore - mesh->ComputeNumberOfEdges(); + const itk::IdentifierType obtainedEdgeCount = edgesBefore - mesh->ComputeNumberOfEdges(); if (obtainedEdgeCount != expectedEdgeCount) { std::cerr << "Test failed!" << std::endl; diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshDeletePointAndReorderIDsTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshDeletePointAndReorderIDsTest.cxx index c3990e40131..832b7c72b06 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshDeletePointAndReorderIDsTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshDeletePointAndReorderIDsTest.cxx @@ -29,7 +29,7 @@ itkQuadEdgeMeshDeletePointAndReorderIDsTest(int, char *[]) using CellType = MeshType::CellType; using QEPolygonCellType = itk::QuadEdgeMeshPolygonCell; - auto mesh = MeshType::New(); + auto mesh = MeshType::New(); MeshType::PointType pts[5]; MeshType::PixelType ptData = 0.; diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexTest.cxx index 0918942579a..03152210b7c 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexTest.cxx @@ -105,7 +105,7 @@ itkQuadEdgeMeshEulerOperatorDeleteCenterVertexTest(int itkNotUsed(argc), char * { const MeshPointer specialmesh = MeshType::New(); - PointType pts3[4]; + PointType pts3[4]; pts3[0][0] = 0.0; pts3[0][1] = 0.0; pts3[0][2] = 0.0; diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorJoinVertexTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorJoinVertexTest.cxx index 96228c21e3d..35d433f80fa 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorJoinVertexTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorJoinVertexTest.cxx @@ -40,7 +40,7 @@ itkQuadEdgeMeshEulerOperatorJoinVertexTest(int argc, char * argv[]) return EXIT_FAILURE; } - int InputType; + int InputType; std::stringstream ssout(argv[1]); ssout >> InputType; @@ -61,7 +61,7 @@ itkQuadEdgeMeshEulerOperatorJoinVertexTest(int argc, char * argv[]) using JoinVertexType = itk::QuadEdgeMeshEulerOperatorJoinVertexFunction; const MeshPointer mesh = MeshType::New(); - PointIdentifier start_id(12); + PointIdentifier start_id(12); switch (InputType) { @@ -239,7 +239,7 @@ itkQuadEdgeMeshEulerOperatorJoinVertexTest(int argc, char * argv[]) #endif QEType * qe = mesh->FindEdge(start_id); - int kk(0); + int kk(0); using CheckerType = itk::QuadEdgeMeshTopologyChecker; auto check = CheckerType::New(); @@ -250,7 +250,7 @@ itkQuadEdgeMeshEulerOperatorJoinVertexTest(int argc, char * argv[]) const PointIdentifier id_org = qe->GetOrigin(); const PointIdentifier id_dest = qe->GetDestination(); - QEType * qe_output = joinVertex->Evaluate(qe); + QEType * qe_output = joinVertex->Evaluate(qe); const JoinVertexType::EdgeStatusType status = joinVertex->GetEdgeStatus(); std::cout << "*** " << kk << " ***" << std::endl; diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshFrontIteratorTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshFrontIteratorTest.cxx index cae8b06a02e..518c482af71 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshFrontIteratorTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshFrontIteratorTest.cxx @@ -207,7 +207,7 @@ itkQuadEdgeMeshFrontIteratorTest(int, char *[]) // Compare with Mesh container iteration version const size_t numberOfPoints = visitedSet.size(); - const int computedNumberOfPoints = mesh->ComputeNumberOfPoints(); + const int computedNumberOfPoints = mesh->ComputeNumberOfPoints(); std::cout << "numberOfPoints " << numberOfPoints << std::endl; std::cout << "computedNumberOfPoints= " << computedNumberOfPoints << std::endl; diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshIteratorTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshIteratorTest.cxx index 24d514d2e37..6bdea067d7a 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshIteratorTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshIteratorTest.cxx @@ -48,10 +48,10 @@ itkQuadEdgeMeshIteratorTest(int, char *[]) // #define NumPoints 6 #define NumEdges 6 - MeshType::PixelType a = std::sqrt(3.0) / 2.0; + MeshType::PixelType a = std::sqrt(3.0) / 2.0; const MeshType::PixelType points[NumPoints][3] = { { 1.0, 0.0, 0.0 }, { 0.5, a, 0.0 }, { -0.5, a, 0.0 }, { -1.0, 0.0, 0.0 }, { -0.5, -a, 0.0 }, { 0.5, -a, 0.0 } }; - MeshType::PointType pnts[NumPoints]; + MeshType::PointType pnts[NumPoints]; MeshType::PointIdentifier pids[NumPoints]; for (int i = 0; i < NumPoints; ++i) { diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshPointTest1.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshPointTest1.cxx index e04a1f732e6..e938e6f5ab4 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshPointTest1.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshPointTest1.cxx @@ -131,7 +131,7 @@ itkQuadEdgeMeshPointTest1(int, char *[]) return EXIT_FAILURE; } - PointType p6 = cc; + PointType p6 = cc; const PointType p6b = cc; // Test assignment operator from array if (p6.EuclideanDistanceTo(p3) > 1e-6) diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshPolygonCellTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshPolygonCellTest.cxx index 703a56498fa..0e065413feb 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshPolygonCellTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshPolygonCellTest.cxx @@ -107,7 +107,7 @@ itkQuadEdgeMeshPolygonCellTest(int, char *[]) * different types of cells. */ CellAutoPointer testCell; - auto * newcell = new PolygonCellType(4); + auto * newcell = new PolygonCellType(4); testCell.TakeOwnership(newcell); // polymorphism /** diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshTest1.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshTest1.cxx index 6607bf8827d..a66f4ce2627 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshTest1.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshTest1.cxx @@ -76,7 +76,7 @@ itkQuadEdgeMeshTest1(int, char *[]) } using PointsIterator = MeshType::PointsContainer::Iterator; - PointsIterator pointIterator = mesh->GetPoints()->Begin(); + PointsIterator pointIterator = mesh->GetPoints()->Begin(); const PointsIterator end = mesh->GetPoints()->End(); int nPoints = 0; diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshTest2.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshTest2.cxx index 948bba903c6..9a98e3fc840 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshTest2.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshTest2.cxx @@ -81,16 +81,16 @@ itkQuadEdgeMeshTest2(int, char *[]) } using CellIterator = MeshType::CellsContainer::Iterator; - CellIterator cellIterator = mesh->GetCells()->Begin(); + CellIterator cellIterator = mesh->GetCells()->Begin(); const unsigned int ids[] = { 0, 1, 2, 1, 2, 0, 2, 0, 1 }; - int itIds = 0; + int itIds = 0; while (cellIterator != mesh->GetCells()->End()) { MeshType::CellType * cellptr = cellIterator.Value(); - auto * lineCell = dynamic_cast(cellptr); + auto * lineCell = dynamic_cast(cellptr); lineCell->GetNameOfClass(); - QuadEdgeType * QEGeom = lineCell->GetQEGeom(); + QuadEdgeType * QEGeom = lineCell->GetQEGeom(); QuadEdgeType::IteratorGeom git = QEGeom->BeginGeomLnext(); while (git != QEGeom->EndGeomLnext()) { diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshTest3.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshTest3.cxx index 2515c83e4ba..69ebde59225 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshTest3.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshTest3.cxx @@ -133,7 +133,7 @@ itkQuadEdgeMeshTest3(int, char *[]) std::cout << "numCells = " << mesh->GetNumberOfCells() << std::endl; using PointIterator = MeshType::PointsContainer::ConstIterator; - PointIterator pointIterator = mesh->GetPoints()->Begin(); + PointIterator pointIterator = mesh->GetPoints()->Begin(); const PointIterator pointEnd = mesh->GetPoints()->End(); while (pointIterator != pointEnd) diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeTest1.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeTest1.cxx index 0bc1da2b284..57c72d133dc 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeTest1.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeTest1.cxx @@ -103,7 +103,7 @@ itkQuadEdgeTest1(int, char *[]) } // Verify that it can be changed. - auto * quadEdge3 = new QuadEdgeType; + auto * quadEdge3 = new QuadEdgeType; const QuadEdgeTypePointer quadEdge3p(quadEdge3, true); quadEdge1->SetOnext(quadEdge3); @@ -1182,9 +1182,9 @@ itkQuadEdgeTest1(int, char *[]) // Tests for the IsIsolated() method { // create a local scope for these tests - auto * quadEdge1 = new QuadEdgeType; + auto * quadEdge1 = new QuadEdgeType; const QuadEdgeTypePointer quadEdge1p(quadEdge1, true); - const QuadEdgeType * quadEdge1c = quadEdge1; + const QuadEdgeType * quadEdge1c = quadEdge1; if (quadEdge1c->IsIsolated() != true) { @@ -1193,7 +1193,7 @@ itkQuadEdgeTest1(int, char *[]) return EXIT_FAILURE; } - auto * quadEdge2 = new QuadEdgeType; + auto * quadEdge2 = new QuadEdgeType; const QuadEdgeTypePointer quadEdge2p(quadEdge2, true); quadEdge1->SetOnext(quadEdge2); @@ -1377,7 +1377,7 @@ itkQuadEdgeTest1(int, char *[]) quadEdgeC2->SetOnext(quadEdgeB2); quadEdgeB2->SetOnext(quadEdgeA2); - const unsigned int quadEdgeA1Order = quadEdgeA1c->GetOrder(); + const unsigned int quadEdgeA1Order = quadEdgeA1c->GetOrder(); constexpr unsigned int quadEdgeA1ExpectedOrder = 2; if (quadEdgeA1Order != quadEdgeA1ExpectedOrder) { @@ -1387,7 +1387,7 @@ itkQuadEdgeTest1(int, char *[]) return EXIT_FAILURE; } - const unsigned int quadEdgeB1Order = quadEdgeB1c->GetOrder(); + const unsigned int quadEdgeB1Order = quadEdgeB1c->GetOrder(); constexpr unsigned int quadEdgeB1ExpectedOrder = 2; if (quadEdgeB1Order != quadEdgeB1ExpectedOrder) { @@ -1397,7 +1397,7 @@ itkQuadEdgeTest1(int, char *[]) return EXIT_FAILURE; } - const unsigned int quadEdgeC1Order = quadEdgeC1c->GetOrder(); + const unsigned int quadEdgeC1Order = quadEdgeC1c->GetOrder(); constexpr unsigned int quadEdgeC1ExpectedOrder = 2; if (quadEdgeC1Order != quadEdgeC1ExpectedOrder) { @@ -1407,7 +1407,7 @@ itkQuadEdgeTest1(int, char *[]) return EXIT_FAILURE; } - const unsigned int quadEdgeA4Order = quadEdgeA4c->GetOrder(); + const unsigned int quadEdgeA4Order = quadEdgeA4c->GetOrder(); constexpr unsigned int quadEdgeA4ExpectedOrder = 3; if (quadEdgeA4Order != quadEdgeA4ExpectedOrder) { diff --git a/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.h b/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.h index d8e422bad1b..42fd7ed694a 100644 --- a/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.h @@ -108,8 +108,8 @@ class ITK_TEMPLATE_EXPORT ArrowSpatialObject : public SpatialObject private: VectorType m_DirectionInObjectSpace{}; - PointType m_PositionInObjectSpace{}; - double m_LengthInObjectSpace{}; + PointType m_PositionInObjectSpace{}; + double m_LengthInObjectSpace{}; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.h b/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.h index 0f2f3f33018..477075e547b 100644 --- a/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.h @@ -95,7 +95,7 @@ class ITK_TEMPLATE_EXPORT BoxSpatialObject : public SpatialObject InternalClone() const override; private: - SizeType m_SizeInObjectSpace{}; + SizeType m_SizeInObjectSpace{}; PointType m_PositionInObjectSpace{}; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkCastSpatialObjectFilter.h b/Modules/Core/SpatialObjects/include/itkCastSpatialObjectFilter.h index 56b4d58c6d3..48e1e102a79 100644 --- a/Modules/Core/SpatialObjects/include/itkCastSpatialObjectFilter.h +++ b/Modules/Core/SpatialObjects/include/itkCastSpatialObjectFilter.h @@ -90,7 +90,7 @@ class ITK_TEMPLATE_EXPORT CastSpatialObjectFilter : public Object outputList->push_back(sObj); } InputChildrenListType * inputList = m_Input->GetChildren(9999); - auto it = inputList->begin(); + auto it = inputList->begin(); while (it != inputList->end()) { obj = dynamic_cast(it->GetPointer()); diff --git a/Modules/Core/SpatialObjects/include/itkContourSpatialObject.h b/Modules/Core/SpatialObjects/include/itkContourSpatialObject.h index 938cad41022..c0ecacfdac3 100644 --- a/Modules/Core/SpatialObjects/include/itkContourSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkContourSpatialObject.h @@ -48,7 +48,7 @@ class ContourSpatialObjectEnums }; // Define how to print enumeration extern ITKSpatialObjects_EXPORT std::ostream & - operator<<(std::ostream & out, ContourSpatialObjectEnums::InterpolationMethod value); +operator<<(std::ostream & out, ContourSpatialObjectEnums::InterpolationMethod value); /** * \class ContourSpatialObject @@ -207,12 +207,12 @@ class ITK_TEMPLATE_EXPORT ContourSpatialObject ContourPointListType m_ControlPoints{}; InterpolationMethodEnum m_InterpolationMethod{}; - unsigned int m_InterpolationFactor{}; + unsigned int m_InterpolationFactor{}; - mutable bool m_IsClosed{}; - mutable int m_OrientationInObjectSpace{}; + mutable bool m_IsClosed{}; + mutable int m_OrientationInObjectSpace{}; mutable ModifiedTimeType m_OrientationInObjectSpaceMTime{}; - int m_AttachedToSlice{}; + int m_AttachedToSlice{}; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkContourSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkContourSpatialObject.hxx index 90dabbc6fb1..00b1b6cc135 100644 --- a/Modules/Core/SpatialObjects/include/itkContourSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkContourSpatialObject.hxx @@ -71,10 +71,10 @@ ContourSpatialObject::GetOrientationInObjectSpace() const m_OrientationInObjectSpaceMTime = this->GetMyMTime(); const ContourPointListType & points = this->GetPoints(); - auto it = points.begin(); - auto itend = points.end(); - PointType minPnt; - PointType maxPnt; + auto it = points.begin(); + auto itend = points.end(); + PointType minPnt; + PointType maxPnt; minPnt.Fill(NumericTraits::max()); maxPnt.Fill(NumericTraits::NonpositiveMin()); while (it != itend) diff --git a/Modules/Core/SpatialObjects/include/itkContourSpatialObjectPoint.h b/Modules/Core/SpatialObjects/include/itkContourSpatialObjectPoint.h index e10a7700549..078a75509bd 100644 --- a/Modules/Core/SpatialObjects/include/itkContourSpatialObjectPoint.h +++ b/Modules/Core/SpatialObjects/include/itkContourSpatialObjectPoint.h @@ -74,7 +74,7 @@ class ITK_TEMPLATE_EXPORT ContourSpatialObjectPoint : public SpatialObjectPoint< private: CovariantVectorType m_NormalInObjectSpace{}; - PointType m_PickedPointInObjectSpace{}; + PointType m_PickedPointInObjectSpace{}; }; } // end of namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObjectPoint.h b/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObjectPoint.h index 9b59f86234f..8a10e9e4c10 100644 --- a/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObjectPoint.h +++ b/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObjectPoint.h @@ -146,7 +146,7 @@ class ITK_TEMPLATE_EXPORT DTITubeSpatialObjectPoint : public TubeSpatialObjectPo GetField(DTITubeSpatialObjectPointFieldEnum name) const; protected: - float m_TensorMatrix[6]{}; + float m_TensorMatrix[6]{}; FieldListType m_Fields{}; /** Print the object */ diff --git a/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.h b/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.h index 9632a5f126d..f5d19f42e85 100644 --- a/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.h @@ -112,9 +112,9 @@ class ITK_TEMPLATE_EXPORT GaussianSpatialObject : public SpatialObject::ComputeMyBoundingBox() template bool -GaussianSpatialObject::ValueAtInObjectSpace(const PointType & point, - double & value, - unsigned int depth, +GaussianSpatialObject::ValueAtInObjectSpace(const PointType & point, + double & value, + unsigned int depth, const std::string & name) const { itkDebugMacro("Getting the value of the ellipse at " << point); diff --git a/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.h b/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.h index ac76e439011..325463d18d3 100644 --- a/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.h @@ -134,7 +134,7 @@ class ITK_TEMPLATE_EXPORT ImageMaskSpatialObject : public ImageSpatialObject::OneValue() }; }; } // end of namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx index b5bbc4630c0..e16d038ab7b 100644 --- a/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx @@ -139,8 +139,8 @@ auto ImageMaskSpatialObject::ComputeMyBoundingBoxInIndexSpace() const -> RegionType { const ImagePointer imagePointer = this->GetImage(); - const bool useMaskValue = this->GetUseMaskValue(); - const PixelType maskValue = this->GetMaskValue(); + const bool useMaskValue = this->GetUseMaskValue(); + const PixelType maskValue = this->GetMaskValue(); if (imagePointer == nullptr) { diff --git a/Modules/Core/SpatialObjects/include/itkImageSpatialObject.h b/Modules/Core/SpatialObjects/include/itkImageSpatialObject.h index 7039a43165b..3564c59a947 100644 --- a/Modules/Core/SpatialObjects/include/itkImageSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkImageSpatialObject.h @@ -93,9 +93,9 @@ class ITK_TEMPLATE_EXPORT ImageSpatialObject : public SpatialObject * The value returned is always of type double; for RGB Images the value returned is the value of the first channel. */ bool - ValueAtInObjectSpace(const PointType & point, - double & value, - unsigned int depth = 0, + ValueAtInObjectSpace(const PointType & point, + double & value, + unsigned int depth = 0, const std::string & name = "") const override; /** Returns the latest modified time of the object and its component. */ diff --git a/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx index e7436d399e6..16c909cfc72 100644 --- a/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx @@ -80,9 +80,9 @@ ImageSpatialObject::IsInsideInObjectSpace(const PointType template bool -ImageSpatialObject::ValueAtInObjectSpace(const PointType & point, - double & value, - unsigned int depth, +ImageSpatialObject::ValueAtInObjectSpace(const PointType & point, + double & value, + unsigned int depth, const std::string & name) const { if (this->GetTypeName().find(name) != std::string::npos) @@ -90,7 +90,7 @@ ImageSpatialObject::ValueAtInObjectSpace(const PointType if (this->IsEvaluableAtInObjectSpace(point, 0, name)) { ContinuousIndexType cIndex; - const bool isInside = m_Image->TransformPhysicalPointToContinuousIndex(point, cIndex); + const bool isInside = m_Image->TransformPhysicalPointToContinuousIndex(point, cIndex); if (isInside) { @@ -117,7 +117,7 @@ ImageSpatialObject::ComputeMyBoundingBox() { itkDebugMacro("Computing ImageSpatialObject bounding box"); - IndexType index = m_Image->GetLargestPossibleRegion().GetIndex(); + IndexType index = m_Image->GetLargestPossibleRegion().GetIndex(); typename ImageType::SizeType size = m_Image->GetLargestPossibleRegion().GetSize(); IndexType index2; @@ -235,7 +235,7 @@ template ModifiedTimeType ImageSpatialObject::GetMTime() const { - ModifiedTimeType latestMTime = Superclass::GetMTime(); + ModifiedTimeType latestMTime = Superclass::GetMTime(); const ModifiedTimeType imageMTime = m_Image->GetMTime(); if (imageMTime > latestMTime) diff --git a/Modules/Core/SpatialObjects/include/itkLineSpatialObjectPoint.hxx b/Modules/Core/SpatialObjects/include/itkLineSpatialObjectPoint.hxx index d2d5048b522..1b18bf147a9 100644 --- a/Modules/Core/SpatialObjects/include/itkLineSpatialObjectPoint.hxx +++ b/Modules/Core/SpatialObjects/include/itkLineSpatialObjectPoint.hxx @@ -25,7 +25,7 @@ namespace itk template LineSpatialObjectPoint::LineSpatialObjectPoint() { - unsigned int ii = 0; + unsigned int ii = 0; constexpr CovariantVectorType normal{}; while (ii < TPointDimension - 1) { diff --git a/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx index 7882906b6cc..f6287130b27 100644 --- a/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx @@ -54,7 +54,7 @@ MeshSpatialObject::IsInsideInObjectSpace(const PointType & point) const { if (this->GetMyBoundingBoxInObjectSpace()->IsInside(point)) { - const typename MeshType::CellsContainerPointer cells = m_Mesh->GetCells(); + const typename MeshType::CellsContainerPointer cells = m_Mesh->GetCells(); typename MeshType::CellsContainer::ConstIterator it = cells->Begin(); while (it != cells->End()) { @@ -68,7 +68,7 @@ MeshSpatialObject::IsInsideInObjectSpace(const PointType & point) const // If this is a triangle cell we need to check the distance if (it.Value()->GetNumberOfPoints() == 3) { - double minDist = 0.0; + double minDist = 0.0; const bool pointIsInsideInObjectSpace = it.Value()->EvaluatePosition(position, m_Mesh->GetPoints(), nullptr, nullptr, &minDist, nullptr); @@ -170,7 +170,7 @@ template ModifiedTimeType MeshSpatialObject::GetMTime() const { - ModifiedTimeType latestMTime = Superclass::GetMTime(); + ModifiedTimeType latestMTime = Superclass::GetMTime(); const ModifiedTimeType MeshMTime = m_Mesh->GetMTime(); if (MeshMTime > latestMTime) diff --git a/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx index 6d530129053..96d2a6284bd 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx @@ -46,9 +46,9 @@ MetaArrowConverter::MetaObjectToSpatialObject(const MetaObjectType * const float lengthInObjectSpace = metaArrow->Length(); arrowSO->SetLengthInObjectSpace(lengthInObjectSpace); - const double * metaPosition = metaArrow->Position(); - const double * metaDirection = metaArrow->Direction(); - typename SpatialObjectType::PointType positionInObjectSpace; + const double * metaPosition = metaArrow->Position(); + const double * metaDirection = metaArrow->Direction(); + typename SpatialObjectType::PointType positionInObjectSpace; typename SpatialObjectType::VectorType directionInObjectSpace; for (unsigned int i = 0; i < VDimension; ++i) { @@ -93,9 +93,9 @@ MetaArrowConverter::SpatialObjectToMetaObject(const SpatialObjectTyp mo->Length(metaLength); // convert position and direction - double metaPosition[VDimension]; - double metaDirection[VDimension]; - typename SpatialObjectType::PointType spPositionInObjectSpace = arrowSO->GetPositionInObjectSpace(); + double metaPosition[VDimension]; + double metaDirection[VDimension]; + typename SpatialObjectType::PointType spPositionInObjectSpace = arrowSO->GetPositionInObjectSpace(); typename SpatialObjectType::VectorType spDirectionInObjectSpace = arrowSO->GetDirectionInObjectSpace(); for (unsigned int i = 0; i < VDimension; ++i) { diff --git a/Modules/Core/SpatialObjects/include/itkMetaConverterBase.h b/Modules/Core/SpatialObjects/include/itkMetaConverterBase.h index 51d51b41e85..dd2b706297b 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaConverterBase.h +++ b/Modules/Core/SpatialObjects/include/itkMetaConverterBase.h @@ -98,7 +98,7 @@ class ITK_TEMPLATE_EXPORT MetaConverterBase : public Object private: - bool m_WriteImagesInSeparateFile{ false }; + bool m_WriteImagesInSeparateFile{ false }; unsigned int m_MetaIOVersion{ 0 }; }; diff --git a/Modules/Core/SpatialObjects/include/itkMetaConverterBase.hxx b/Modules/Core/SpatialObjects/include/itkMetaConverterBase.hxx index 5d8700bd51f..fe771897aa7 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaConverterBase.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaConverterBase.hxx @@ -29,7 +29,7 @@ MetaConverterBase::MetaObjectToSpatialObjectBase(const MetaObjectTyp { rval->SetId(mo->ID()); rval->SetParentId(mo->ParentID()); - auto tfm = SpatialObject::TransformType::New(); + auto tfm = SpatialObject::TransformType::New(); typename SpatialObject::TransformType::OffsetType off; typename SpatialObject::TransformType::MatrixType mat; typename SpatialObject::TransformType::CenterType cen; @@ -56,7 +56,7 @@ MetaConverterBase::MetaObjectToSpatialObjectBase(const MetaObjectTyp template void MetaConverterBase::SpatialObjectToMetaObjectBase(SpatialObjectConstPointer spatialObject, - MetaObjectType * mo) + MetaObjectType * mo) { mo->APIVersion(m_MetaIOVersion); @@ -94,7 +94,7 @@ auto MetaConverterBase::ReadMeta(const char * name) -> SpatialObjectPointer { SpatialObjectPointer rval; - MetaObjectType * mo = this->CreateMetaObject(); + MetaObjectType * mo = this->CreateMetaObject(); mo->APIVersion(m_MetaIOVersion); mo->Read(name); diff --git a/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx index b3940d6760d..019a58b5b48 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx @@ -57,7 +57,7 @@ MetaDTITubeConverter::MetaObjectToSpatialObject(const MetaObjectType auto it2 = tube->GetPoints().begin(); itk::CovariantVector v{}; - itk::Vector t{}; + itk::Vector t{}; for (unsigned int identifier = 0; identifier < tube->GetPoints().size(); ++identifier) { @@ -73,7 +73,7 @@ MetaDTITubeConverter::MetaObjectToSpatialObject(const MetaObjectType // Get the fields from the metaIO const DTITubePnt::FieldListType & metaFields = (*it2)->GetExtraFields(); - auto extraIt = metaFields.begin(); + auto extraIt = metaFields.begin(); while (extraIt != metaFields.end()) { // Do not add the optional fields @@ -249,7 +249,7 @@ MetaDTITubeConverter::SpatialObjectToMetaObject(const SpatialObjectT } const DTITubePnt::FieldListType & metaFields = it->GetFields(); - auto extraIt = metaFields.begin(); + auto extraIt = metaFields.begin(); while (extraIt != metaFields.end()) { pnt->AddField(extraIt->first.c_str(), extraIt->second); diff --git a/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx index f2f9f8c88b1..2e0b8d076d2 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx @@ -62,7 +62,7 @@ auto MetaGaussianConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) -> MetaObjectType * { const GaussianSpatialObjectConstPointer gaussianSO = dynamic_cast(so); - auto * metaGaussian = new GaussianMetaObjectType; + auto * metaGaussian = new GaussianMetaObjectType; if (gaussianSO.IsNull()) { itkExceptionMacro("Can't downcast SpatialObject to GaussianSpatialObject"); diff --git a/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx index db82cd0d97d..5e556e789a9 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx @@ -54,9 +54,9 @@ MetaImageConverter::AllocateImage(con using PointType = typename ImageType::PointType; using RegionType = typename ImageType::RegionType; - SizeType size; - PointType origin; - SpacingType spacing; + SizeType size; + PointType origin; + SpacingType spacing; DirectionType direction; for (unsigned int i = 0; i < VDimension; ++i) @@ -133,7 +133,7 @@ MetaImageConverter::SpatialObjectToMe const ImageConstPointer SOImage = imageSO->GetImage(); - int size[VDimension]; + int size[VDimension]; double spacing[VDimension]; double direction[VDimension * VDimension]; double origin[VDimension]; diff --git a/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx index e9b2f35bb3b..d3c6f4ffde8 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx @@ -62,7 +62,7 @@ MetaMeshConverter::MetaObjectToSpatialObject // Add Points using PointListType = typename MeshMetaObjectType::PointListType; const PointListType points = _mesh->GetPoints(); - auto it_points = points.begin(); + auto it_points = points.begin(); while (it_points != points.end()) { @@ -84,7 +84,7 @@ MetaMeshConverter::MetaObjectToSpatialObject { using CellListType = typename MetaMesh::CellListType; const CellListType cells = _mesh->GetCells((MET_CellGeometry)celltype); - auto it_cells = cells.begin(); + auto it_cells = cells.begin(); using CellInterfaceType = typename MeshType::CellType; using VertexCellType = itk::VertexCell; @@ -147,7 +147,7 @@ MetaMeshConverter::MetaObjectToSpatialObject // Add cell links using CellLinkListType = typename MetaMesh::CellLinkListType; const CellLinkListType links = _mesh->GetCellLinks(); - auto it_links = links.begin(); + auto it_links = links.begin(); using CellLinksContainerType = typename MeshType::CellLinksContainer; auto linkContainer = CellLinksContainerType::New(); @@ -227,7 +227,7 @@ MetaMeshConverter::SpatialObjectToMetaObject // Add Points using PointsContainer = typename MeshType::PointsContainer; - const PointsContainer * points = mesh->GetPoints(); + const PointsContainer * points = mesh->GetPoints(); typename MeshType::PointsContainer::ConstIterator it_points = points->Begin(); while (it_points != points->End()) @@ -244,16 +244,16 @@ MetaMeshConverter::SpatialObjectToMetaObject // Add Cells using CellsContainer = typename MeshType::CellsContainer; - const CellsContainer * cells = mesh->GetCells(); + const CellsContainer * cells = mesh->GetCells(); typename MeshType::CellsContainer::ConstIterator it_cells = cells->Begin(); while (it_cells != cells->End()) { const unsigned int celldim = (*it_cells)->Value()->GetNumberOfPoints(); - auto * cell = new MeshCell(celldim); + auto * cell = new MeshCell(celldim); typename MeshType::CellTraits::PointIdConstIterator itptids = (*it_cells)->Value()->GetPointIds(); - unsigned int i = 0; + unsigned int i = 0; while (itptids != (*it_cells)->Value()->PointIdsEnd()) { cell->m_PointsId[i++] = *itptids; diff --git a/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.h b/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.h index eba14b5f72b..ecf1c81d04c 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.h @@ -85,9 +85,9 @@ class ITK_TEMPLATE_EXPORT MetaSceneConverter : public Object /** Write out a SpatialObject. */ bool WriteMeta(const SpatialObjectType * soScene, - const std::string & fileName, - unsigned int depth = SpatialObjectType::MaximumDepth, - const std::string & soName = ""); + const std::string & fileName, + unsigned int depth = SpatialObjectType::MaximumDepth, + const std::string & soName = ""); itkGetMacro(Event, MetaEvent *); itkSetObjectMacro(Event, MetaEvent); @@ -113,8 +113,8 @@ class ITK_TEMPLATE_EXPORT MetaSceneConverter : public Object * gets read from & written to the MetaIO file */ void - RegisterMetaConverter(const std::string & metaTypeName, - const std::string & spatialObjectTypeName, + RegisterMetaConverter(const std::string & metaTypeName, + const std::string & spatialObjectTypeName, MetaConverterBaseType * converter); /** Convert a metaScene into a composite SpatialObject @@ -123,8 +123,8 @@ class ITK_TEMPLATE_EXPORT MetaSceneConverter : public Object */ MetaScene * CreateMetaScene(const SpatialObjectType * soScene, - unsigned int depth = SpatialObjectType::MaximumDepth, - const std::string & name = ""); + unsigned int depth = SpatialObjectType::MaximumDepth, + const std::string & name = ""); SpatialObjectPointer CreateSpatialObjectScene(MetaScene * mScene); @@ -162,12 +162,12 @@ class ITK_TEMPLATE_EXPORT MetaSceneConverter : public Object void SetTransform(SpatialObjectType * so, const MetaObject * meta); - MetaEvent * m_Event{}; - bool m_BinaryPoints{}; - bool m_WriteImagesInSeparateFile{}; - unsigned int m_TransformPrecision{}; + MetaEvent * m_Event{}; + bool m_BinaryPoints{}; + bool m_WriteImagesInSeparateFile{}; + unsigned int m_TransformPrecision{}; ConverterMapType m_ConverterMap{}; - unsigned int m_MetaIOVersion{ 0 }; + unsigned int m_MetaIOVersion{ 0 }; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx index 9951b5285ad..b51c85fa875 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx @@ -58,8 +58,8 @@ MetaSceneConverter::CreateSpatialObjectScene SpatialObjectPointer soScene = nullptr; MetaScene::ObjectListType * list = mScene->GetObjectList(); - auto it = list->begin(); - auto itEnd = list->end(); + auto it = list->begin(); + auto itEnd = list->end(); SpatialObjectPointer currentSO = nullptr; @@ -189,8 +189,8 @@ MetaSceneConverter::ReadMeta(const std::stri template MetaScene * MetaSceneConverter::CreateMetaScene(const SpatialObjectType * soScene, - unsigned int depth, - const std::string & name) + unsigned int depth, + const std::string & name) { auto * metaScene = new MetaScene(VDimension); metaScene->APIVersion(m_MetaIOVersion); @@ -295,9 +295,9 @@ MetaSceneConverter::CreateMetaScene(const Sp template bool MetaSceneConverter::WriteMeta(const SpatialObjectType * soScene, - const std::string & fileName, - unsigned int depth, - const std::string & soName) + const std::string & fileName, + unsigned int depth, + const std::string & soName) { MetaScene * metaScene = this->CreateMetaScene(soScene, depth, soName); diff --git a/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx index 19b80feb33c..f54cc343b46 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx @@ -55,7 +55,7 @@ MetaTubeConverter::MetaObjectToSpatialObject(const MetaObjectType * auto it2 = tubeMO->GetPoints().begin(); itk::CovariantVector v; - itk::Vector t; + itk::Vector t; for (unsigned int identifier = 0; identifier < tubeMO->GetPoints().size(); ++identifier) { diff --git a/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx index 9a80ec6bb7b..1c90ba2e781 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx @@ -66,7 +66,7 @@ MetaVesselTubeConverter::MetaObjectToSpatialObject(const MetaObjectT auto it2 = vesselTubeMO->GetPoints().begin(); itk::CovariantVector v; - itk::Vector t; + itk::Vector t; for (unsigned int identifier = 0; identifier < vesselTubeMO->GetPoints().size(); ++identifier) { diff --git a/Modules/Core/SpatialObjects/include/itkPointBasedSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkPointBasedSpatialObject.hxx index 06c44d8b7b8..1bca7d6e443 100644 --- a/Modules/Core/SpatialObjects/include/itkPointBasedSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkPointBasedSpatialObject.hxx @@ -98,11 +98,11 @@ PointBasedSpatialObject::ClosestPointInObje } SpatialObjectPointType closestPoint; - double closestPointDistance = NumericTraits::max(); + double closestPointDistance = NumericTraits::max(); while (it != itend) { const typename SpatialObjectPoint::PointType curpos = it->GetPositionInObjectSpace(); - const double curdistance = curpos.EuclideanDistanceTo(point); + const double curdistance = curpos.EuclideanDistanceTo(point); if (curdistance < closestPointDistance) { closestPoint = (*it); @@ -127,11 +127,11 @@ PointBasedSpatialObject::ClosestPointInWorl } SpatialObjectPointType closestPoint; - double closestPointDistance = NumericTraits::max(); + double closestPointDistance = NumericTraits::max(); while (it != itend) { const typename SpatialObjectPoint::PointType curpos = it->GetPositionInWorldSpace(); - const double curdistance = curpos.EuclideanDistanceTo(point); + const double curdistance = curpos.EuclideanDistanceTo(point); if (curdistance < closestPointDistance) { closestPoint = (*it); diff --git a/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.h b/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.h index d9f288e15ae..0fe37e3522a 100644 --- a/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.h @@ -109,10 +109,10 @@ class ITK_TEMPLATE_EXPORT PolygonSpatialObject InternalClone() const override; private: - mutable bool m_IsClosed{}; - mutable int m_OrientationInObjectSpace{}; + mutable bool m_IsClosed{}; + mutable int m_OrientationInObjectSpace{}; mutable ModifiedTimeType m_OrientationInObjectSpaceMTime{}; - double m_ThicknessInObjectSpace{}; + double m_ThicknessInObjectSpace{}; }; } // namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.hxx index d96b12a7867..647518e2e9f 100644 --- a/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.hxx @@ -59,10 +59,10 @@ PolygonSpatialObject::GetOrientationInObjectSpace() const m_OrientationInObjectSpaceMTime = this->GetMyMTime(); const PolygonPointListType & points = this->GetPoints(); - auto it = points.begin(); - auto itend = points.end(); - PointType minPnt; - PointType maxPnt; + auto it = points.begin(); + auto itend = points.end(); + PointType minPnt; + PointType maxPnt; minPnt.Fill(NumericTraits::max()); maxPnt.Fill(NumericTraits::NonpositiveMin()); while (it != itend) @@ -96,10 +96,10 @@ PolygonSpatialObject::MeasureAreaInObjectSpace() const // where N is a unit vector normal to the plane. The `.' represents the // dot product operator, the `x' represents the cross product operator, // and itk::Math::abs() is the absolute value function. - double area = 0.0; + double area = 0.0; const int numpoints = this->GetNumberOfPoints(); - int X = 0; - int Y = 1; + int X = 0; + int Y = 1; if (numpoints < 3) { @@ -117,10 +117,10 @@ PolygonSpatialObject::MeasureAreaInObjectSpace() const } const PolygonPointListType & points = this->GetPoints(); - auto it = points.begin(); - auto itend = points.end(); - PointType a = it->GetPositionInObjectSpace(); - PointType b; + auto it = points.begin(); + auto itend = points.end(); + PointType a = it->GetPositionInObjectSpace(); + PointType b; ++it; while (it != itend) { @@ -158,7 +158,7 @@ template double PolygonSpatialObject::MeasurePerimeterInObjectSpace() const { - double perimeter = 0.0; + double perimeter = 0.0; const int numpoints = this->GetNumberOfPoints(); if (numpoints < 3) @@ -206,8 +206,8 @@ PolygonSpatialObject::IsInsideInObjectSpace(const PointType & point) if (this->GetIsClosed() && this->GetMyBoundingBoxInObjectSpace()->IsInside(point)) { const int numpoints = this->GetNumberOfPoints(); - int X = -1; - int Y = -1; + int X = -1; + int Y = -1; if (numpoints >= 3) { @@ -228,8 +228,8 @@ PolygonSpatialObject::IsInsideInObjectSpace(const PointType & point) } const PolygonPointListType & points = this->GetPoints(); - auto it = points.begin(); - auto itend = points.end(); + auto it = points.begin(); + auto itend = points.end(); bool oddNodes = false; diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObject.h b/Modules/Core/SpatialObjects/include/itkSpatialObject.h index f12f8334bba..edbc95046a5 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkSpatialObject.h @@ -268,9 +268,9 @@ class ITK_TEMPLATE_EXPORT SpatialObject : public DataObject /** Returns the value at a point. Returns true if that value is valid. */ virtual bool - ValueAtInObjectSpace(const PointType & point, - double & value, - unsigned int depth = 0, + ValueAtInObjectSpace(const PointType & point, + double & value, + unsigned int depth = 0, const std::string & name = "") const; /** Returns true if the object can provide a "meaningful" value at @@ -292,15 +292,15 @@ class ITK_TEMPLATE_EXPORT SpatialObject : public DataObject /** Return the value of the object at a point. */ virtual bool - ValueAtChildrenInObjectSpace(const PointType & point, - double & value, - unsigned int depth = 0, + ValueAtChildrenInObjectSpace(const PointType & point, + double & value, + unsigned int depth = 0, const std::string & name = "") const; /** Return if the object is evaluable at a point. */ virtual bool - IsEvaluableAtChildrenInObjectSpace(const PointType & point, - unsigned int depth = 0, + IsEvaluableAtChildrenInObjectSpace(const PointType & point, + unsigned int depth = 0, const std::string & name = "") const; @@ -328,9 +328,9 @@ class ITK_TEMPLATE_EXPORT SpatialObject : public DataObject virtual #endif bool - ValueAtInWorldSpace(const PointType & point, - double & value, - unsigned int depth = 0, + ValueAtInWorldSpace(const PointType & point, + double & value, + unsigned int depth = 0, const std::string & name = "") const; /** World space equivalent to IsInsideInObjectSpace @@ -365,11 +365,11 @@ class ITK_TEMPLATE_EXPORT SpatialObject : public DataObject /** Return the n-th order derivative value at the specified point. */ virtual void - DerivativeAtInObjectSpace(const PointType & point, - short unsigned int order, - CovariantVectorType & value, - unsigned int depth = 0, - const std::string & name = "", + DerivativeAtInObjectSpace(const PointType & point, + short unsigned int order, + CovariantVectorType & value, + unsigned int depth = 0, + const std::string & name = "", const DerivativeOffsetType & offset = MakeFilled(1)); /** Return the n-th order derivative value at the specified point. @@ -382,11 +382,11 @@ class ITK_TEMPLATE_EXPORT SpatialObject : public DataObject virtual #endif void - DerivativeAtInWorldSpace(const PointType & point, - short unsigned int order, - CovariantVectorType & value, - unsigned int depth = 0, - const std::string & name = "", + DerivativeAtInWorldSpace(const PointType & point, + short unsigned int order, + CovariantVectorType & value, + unsigned int depth = 0, + const std::string & name = "", const DerivativeOffsetType & offset = MakeFilled(1)); @@ -466,8 +466,8 @@ class ITK_TEMPLATE_EXPORT SpatialObject : public DataObject virtual void AddChildrenToConstList(ChildrenConstListType * childrenCList, - unsigned int depth = 0, - const std::string & name = "") const; + unsigned int depth = 0, + const std::string & name = "") const; /** Get the number of children currently assigned to the object. */ unsigned int @@ -726,7 +726,7 @@ class ITK_TEMPLATE_EXPORT SpatialObject : public DataObject PropertyType m_Property{}; - int m_ParentId{ -1 }; + int m_ParentId{ -1 }; Self * m_Parent{ nullptr }; RegionType m_LargestPossibleRegion{}; diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx index 4ee5f40266c..8b7eb38189b 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx @@ -79,11 +79,11 @@ SpatialObject::SetId(int id) template void -SpatialObject::DerivativeAtInObjectSpace(const PointType & point, - short unsigned int order, - DerivativeVectorType & value, - unsigned int depth, - const std::string & name, +SpatialObject::DerivativeAtInObjectSpace(const PointType & point, + short unsigned int order, + DerivativeVectorType & value, + unsigned int depth, + const std::string & name, const DerivativeOffsetType & offset) { if (!IsEvaluableAtInObjectSpace(point, depth, name)) @@ -101,10 +101,10 @@ SpatialObject::DerivativeAtInObjectSpace(const PointType & else { typename DerivativeVectorType::Iterator it = value.Begin(); - DerivativeVectorType v1; - auto it_v1 = v1.cbegin(); - DerivativeVectorType v2; - auto it_v2 = v2.cbegin(); + DerivativeVectorType v1; + auto it_v1 = v1.cbegin(); + DerivativeVectorType v2; + auto it_v2 = v2.cbegin(); DerivativeOffsetType offsetDiv2; for (unsigned short i = 0; i < TDimension; ++i) @@ -130,11 +130,11 @@ SpatialObject::DerivativeAtInObjectSpace(const PointType & template void -SpatialObject::DerivativeAtInWorldSpace(const PointType & point, - short unsigned int order, - DerivativeVectorType & value, - unsigned int depth, - const std::string & name, +SpatialObject::DerivativeAtInWorldSpace(const PointType & point, + short unsigned int order, + DerivativeVectorType & value, + unsigned int depth, + const std::string & name, const DerivativeOffsetType & offset) { const PointType pnt = m_ObjectToWorldTransformInverse->TransformType::TransformPoint(point); @@ -143,8 +143,8 @@ SpatialObject::DerivativeAtInWorldSpace(const PointType & template bool -SpatialObject::IsInsideInObjectSpace(const PointType & point, - unsigned int depth, +SpatialObject::IsInsideInObjectSpace(const PointType & point, + unsigned int depth, const std::string & name) const { if (name.empty() || (this->GetTypeName().find(name) != std::string::npos)) @@ -175,8 +175,8 @@ SpatialObject::IsInsideInObjectSpace(const PointType & itkNotUsed(po template bool -SpatialObject::IsInsideInWorldSpace(const PointType & point, - unsigned int depth, +SpatialObject::IsInsideInWorldSpace(const PointType & point, + unsigned int depth, const std::string & name) const { const PointType pnt = m_ObjectToWorldTransformInverse->TransformType::TransformPoint(point); @@ -193,8 +193,8 @@ SpatialObject::IsInsideInWorldSpace(const PointType & point) const template bool -SpatialObject::IsInsideChildrenInObjectSpace(const PointType & point, - unsigned int depth, +SpatialObject::IsInsideChildrenInObjectSpace(const PointType & point, + unsigned int depth, const std::string & name) const { for (const auto & child : m_ChildrenList) @@ -211,8 +211,8 @@ SpatialObject::IsInsideChildrenInObjectSpace(const PointType & poi template bool -SpatialObject::IsEvaluableAtInObjectSpace(const PointType & point, - unsigned int depth, +SpatialObject::IsEvaluableAtInObjectSpace(const PointType & point, + unsigned int depth, const std::string & name) const { if (IsInsideInObjectSpace(point, 0, name)) @@ -234,8 +234,8 @@ SpatialObject::IsEvaluableAtInObjectSpace(const PointType & point, template bool -SpatialObject::IsEvaluableAtInWorldSpace(const PointType & point, - unsigned int depth, +SpatialObject::IsEvaluableAtInWorldSpace(const PointType & point, + unsigned int depth, const std::string & name) const { const PointType pnt = m_ObjectToWorldTransformInverse->TransformType::TransformPoint(point); @@ -244,8 +244,8 @@ SpatialObject::IsEvaluableAtInWorldSpace(const PointType & point, template bool -SpatialObject::IsEvaluableAtChildrenInObjectSpace(const PointType & point, - unsigned int depth, +SpatialObject::IsEvaluableAtChildrenInObjectSpace(const PointType & point, + unsigned int depth, const std::string & name) const { for (const auto & child : m_ChildrenList) @@ -262,9 +262,9 @@ SpatialObject::IsEvaluableAtChildrenInObjectSpace(const PointType & template bool -SpatialObject::ValueAtInObjectSpace(const PointType & point, - double & value, - unsigned int depth, +SpatialObject::ValueAtInObjectSpace(const PointType & point, + double & value, + unsigned int depth, const std::string & name) const { if (IsEvaluableAtInObjectSpace(point, 0, name)) @@ -297,9 +297,9 @@ SpatialObject::ValueAtInObjectSpace(const PointType & point, template bool -SpatialObject::ValueAtInWorldSpace(const PointType & point, - double & value, - unsigned int depth, +SpatialObject::ValueAtInWorldSpace(const PointType & point, + double & value, + unsigned int depth, const std::string & name) const { const PointType pnt = m_ObjectToWorldTransformInverse->TransformType::TransformPoint(point); @@ -308,9 +308,9 @@ SpatialObject::ValueAtInWorldSpace(const PointType & point, template bool -SpatialObject::ValueAtChildrenInObjectSpace(const PointType & point, - double & value, - unsigned int depth, +SpatialObject::ValueAtChildrenInObjectSpace(const PointType & point, + double & value, + unsigned int depth, const std::string & name) const { for (const auto & child : m_ChildrenList) @@ -394,7 +394,7 @@ SpatialObject::GetFamilyBoundingBoxInWorldSpace() const -> const Bou // Next Transform the corners of the bounding box using PointsContainer = typename BoundingBoxType::PointsContainer; const auto corners = m_FamilyBoundingBoxInObjectSpace->ComputeCorners(); - auto transformedCorners = PointsContainer::New(); + auto transformedCorners = PointsContainer::New(); transformedCorners->Reserve(static_cast(corners.size())); std::transform(corners.cbegin(), corners.cend(), transformedCorners->begin(), [this](const auto & point) { @@ -615,7 +615,7 @@ SpatialObject::GetMyBoundingBoxInWorldSpace() const -> const Boundin // Next Transform the corners of the bounding box using PointsContainer = typename BoundingBoxType::PointsContainer; const auto corners = m_MyBoundingBoxInObjectSpace->ComputeCorners(); - auto transformedCorners = PointsContainer::New(); + auto transformedCorners = PointsContainer::New(); transformedCorners->Reserve(static_cast(corners.size())); std::transform(corners.cbegin(), corners.cend(), transformedCorners->begin(), [this](const auto & point) { @@ -741,8 +741,8 @@ SpatialObject::GetConstChildren(unsigned int depth, const std::strin template void -SpatialObject::AddChildrenToList(ChildrenListType * childrenList, - unsigned int depth, +SpatialObject::AddChildrenToList(ChildrenListType * childrenList, + unsigned int depth, const std::string & name) const { for (const auto & child : m_ChildrenList) @@ -765,8 +765,8 @@ SpatialObject::AddChildrenToList(ChildrenListType * childrenList, template void SpatialObject::AddChildrenToConstList(ChildrenConstListType * childrenCList, - unsigned int depth, - const std::string & name) const + unsigned int depth, + const std::string & name) const { for (const auto & child : m_ChildrenList) { @@ -887,9 +887,9 @@ SpatialObject::CheckIdValidity() const ChildrenListType * children = this->GetChildren(); - typename ObjectListType::iterator it = children->begin(); + typename ObjectListType::iterator it = children->begin(); const typename ObjectListType::iterator itEnd = children->end(); - typename ObjectListType::iterator it2; + typename ObjectListType::iterator it2; while (it != itEnd) { @@ -922,8 +922,8 @@ SpatialObject::FixIdValidity() ChildrenListType * children = this->GetChildren(MaximumDepth); - auto it = children->begin(); - auto itEnd = children->end(); + auto it = children->begin(); + auto itEnd = children->end(); typename ObjectListType::iterator it2; while (it != itEnd) @@ -938,8 +938,8 @@ SpatialObject::FixIdValidity() const int idNew = this->GetNextAvailableId(); (*it2)->SetId(idNew); ChildrenListType * children2 = (*it2)->GetChildren(0); - auto childIt2 = children2->begin(); - auto childIt2End = children2->end(); + auto childIt2 = children2->begin(); + auto childIt2End = children2->end(); while (childIt2 != childIt2End) { (*childIt2)->SetParentId(idNew); @@ -992,7 +992,7 @@ SpatialObject::SetParent(Self * parent) { if (parent != m_Parent) { - Self * oldParent = m_Parent; + Self * oldParent = m_Parent; const TransformType * oldObjectWorldTransform = this->m_ObjectToWorldTransform; m_Parent = parent; diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.h b/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.h index 3b3a939e99e..badd9308f59 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.h +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.h @@ -106,8 +106,8 @@ class ITK_TEMPLATE_EXPORT SpatialObjectDuplicator : public Object private: SpatialObjectConstPointer m_Input{}; - SpatialObjectPointer m_DuplicateSpatialObject{}; - ModifiedTimeType m_InternalSpatialObjectTime{}; + SpatialObjectPointer m_DuplicateSpatialObject{}; + ModifiedTimeType m_InternalSpatialObjectTime{}; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.hxx b/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.hxx index 8bf872dadd7..5bbecb86a80 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.hxx +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.hxx @@ -32,7 +32,7 @@ SpatialObjectDuplicator::SpatialObjectDuplicator() template void SpatialObjectDuplicator::CopyObject(const InternalSpatialObjectType * source, - InternalSpatialObjectType * destination) + InternalSpatialObjectType * destination) { using SOType = itk::SpatialObject; @@ -42,7 +42,7 @@ SpatialObjectDuplicator::CopyObject(const InternalSpatialOb using ChildrenListType = typename TInputSpatialObject::ChildrenListType; ChildrenListType * children = source->GetChildren(); - auto it = children->begin(); + auto it = children->begin(); while (it != children->end()) { this->CopyObject(*it, newSO); @@ -79,7 +79,7 @@ SpatialObjectDuplicator::Update() // Create the children using ChildrenListType = typename TInputSpatialObject::ChildrenListType; ChildrenListType * children = m_Input->GetChildren(); - auto it = children->begin(); + auto it = children->begin(); while (it != children->end()) { this->CopyObject(*it, m_DuplicateSpatialObject); diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectFactory.h b/Modules/Core/SpatialObjects/include/itkSpatialObjectFactory.h index cb8c5bb3617..7c88c567b29 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectFactory.h +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectFactory.h @@ -45,7 +45,7 @@ class SpatialObjectFactory : public SpatialObjectFactoryBase static void RegisterSpatialObject() { - auto t = T::New(); + auto t = T::New(); const SpatialObjectFactoryBase::Pointer f = SpatialObjectFactoryBase::GetFactory(); f->RegisterSpatialObject(t->GetClassNameAndDimension().c_str(), t->GetClassNameAndDimension().c_str(), diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectFactoryBase.h b/Modules/Core/SpatialObjects/include/itkSpatialObjectFactoryBase.h index 3079c5dca96..564a937f030 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectFactoryBase.h +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectFactoryBase.h @@ -84,10 +84,10 @@ class ITKSpatialObjects_EXPORT SpatialObjectFactoryBase : public ObjectFactoryBa } void - RegisterSpatialObject(const char * classOverride, - const char * overrideClassName, - const char * description, - bool enableFlag, + RegisterSpatialObject(const char * classOverride, + const char * overrideClassName, + const char * description, + bool enableFlag, CreateObjectFunctionBase * createFunction) { this->RegisterOverride(classOverride, overrideClassName, description, enableFlag, createFunction); diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectProperty.h b/Modules/Core/SpatialObjects/include/itkSpatialObjectProperty.h index 90556a05347..0fcd73cf3ff 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectProperty.h +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectProperty.h @@ -166,7 +166,7 @@ class ITKSpatialObjects_EXPORT SpatialObjectProperty std::string m_Name{}; - std::map m_ScalarDictionary{}; + std::map m_ScalarDictionary{}; std::map m_StringDictionary{}; }; diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageFilter.h b/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageFilter.h index b0c72ba749b..1110007c02b 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageFilter.h +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageFilter.h @@ -202,14 +202,14 @@ class ITK_TEMPLATE_EXPORT SpatialObjectToImageFilter : public ImageSource::SetInput(const In template void -SpatialObjectToImageFilter::SetInput(unsigned int index, +SpatialObjectToImageFilter::SetInput(unsigned int index, const TInputSpatialObject * object) { // Process object is not const-correct so the const_cast is required here @@ -293,7 +293,7 @@ SpatialObjectToImageFilter::GenerateData() // Get the input and output pointers const InputSpatialObjectType * InputObject = this->GetInput(); - const OutputImagePointer OutputImage = this->GetOutput(); + const OutputImagePointer OutputImage = this->GetOutput(); // Generate the image SizeType size; @@ -343,7 +343,7 @@ SpatialObjectToImageFilter::GenerateData() myIteratorType it(OutputImage, region); - itk::Point objectPoint; + itk::Point objectPoint; itk::Point imagePoint; ProgressReporter progress(this, 0, OutputImage->GetRequestedRegion().GetNumberOfPixels()); diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.h b/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.h index b7a0ba60c80..b053129b913 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.h +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.h @@ -130,16 +130,16 @@ class ITK_TEMPLATE_EXPORT SpatialObjectToImageStatisticsCalculator : public Obje ComputeStatistics(); private: - ImageConstPointer m_Image{}; + ImageConstPointer m_Image{}; SpatialObjectPointer m_SpatialObject{}; - VectorType m_Mean{}; - AccumulateType m_Sum{}; - SizeValueType m_NumberOfPixels{}; - MatrixType m_CovarianceMatrix{}; - unsigned int m_SampleDirection{}; - ModifiedTimeType m_InternalImageTime{}; - ModifiedTimeType m_InternalSpatialObjectTime{}; - TimeStamp m_ModifiedTime{}; + VectorType m_Mean{}; + AccumulateType m_Sum{}; + SizeValueType m_NumberOfPixels{}; + MatrixType m_CovarianceMatrix{}; + unsigned int m_SampleDirection{}; + ModifiedTimeType m_InternalImageTime{}; + ModifiedTimeType m_InternalSpatialObjectTime{}; + TimeStamp m_ModifiedTime{}; typename SampleType::Pointer m_Sample{}; }; diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.hxx b/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.hxx index e3b2702a8c4..256d516bdf5 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.hxx +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.hxx @@ -119,10 +119,10 @@ SpatialObjectToImageStatisticsCalculator; MaskIteratorType it(maskImage, maskImage->GetLargestPossibleRegion()); - IndexType ind; - PointType pnt; - PointType tPnt; - VectorType mv; + IndexType ind; + PointType pnt; + PointType tPnt; + VectorType mv; while (!it.IsAtEnd()) { if (it.Get() > 0) // if inside the mask @@ -155,16 +155,16 @@ SpatialObjectToImageStatisticsCalculator ptMin; Point ptMax; - SizeType size; + SizeType size; for (unsigned int i = 0; i < Self::ObjectDimension; ++i) { ptMin[i] = bounds[i * 2]; ptMax[i] = bounds[i * 2 + 1]; } - auto indMin = m_Image->TransformPhysicalPointToIndex(ptMin); - auto indMax = m_Image->TransformPhysicalPointToIndex(ptMax); + auto indMin = m_Image->TransformPhysicalPointToIndex(ptMin); + auto indMax = m_Image->TransformPhysicalPointToIndex(ptMax); IndexType imageIndex = m_Image->GetLargestPossibleRegion().GetIndex(); - SizeType imageSize = m_Image->GetLargestPossibleRegion().GetSize(); + SizeType imageSize = m_Image->GetLargestPossibleRegion().GetSize(); for (unsigned int i = 0; i < Self::ObjectDimension; ++i) { if (indMin[i] > indMax[i]) @@ -185,9 +185,9 @@ SpatialObjectToImageStatisticsCalculator; IteratorType it(m_Image, region); - IndexType ind; - PointType pnt; - VectorType mv; + IndexType ind; + PointType pnt; + VectorType mv; while (!it.IsAtEnd()) { ind = it.GetIndex(); @@ -216,7 +216,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectToPointSetFilter.hxx b/Modules/Core/SpatialObjects/include/itkSpatialObjectToPointSetFilter.hxx index 944f8bbaabb..02a8c7799d9 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectToPointSetFilter.hxx +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectToPointSetFilter.hxx @@ -66,21 +66,21 @@ void SpatialObjectToPointSetFilter::GenerateData() { // Get the input and output pointers - const SpatialObjectType * inputObject = this->GetInput(); + const SpatialObjectType * inputObject = this->GetInput(); const typename OutputPointSetType::Pointer outputPointSet = this->GetOutput(); using PointIdentifier = typename OutputPointSetType::PointIdentifier; // Look for the number of points to allocate PointIdentifier numberOfPoints = 0; - const auto * inputSO = dynamic_cast(inputObject); + const auto * inputSO = dynamic_cast(inputObject); if (inputSO) { numberOfPoints = inputSO->GetNumberOfPoints() / m_SamplingFactor; } ChildrenListType * children = inputObject->GetChildren(m_ChildrenDepth); - auto it = children->begin(); + auto it = children->begin(); while (it != children->end()) { @@ -98,7 +98,7 @@ SpatialObjectToPointSetFilter::Genera outputPointSet->GetPoints()->Reserve(numberOfPoints); outputPointSet->GetPointData()->Reserve(numberOfPoints); - PointIdentifier pointId = 0; + PointIdentifier pointId = 0; typename OutputPointSetType::PointType point; // add the object it itself @@ -148,7 +148,7 @@ SpatialObjectToPointSetFilter::Genera template void SpatialObjectToPointSetFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); os << indent << "Children depth : " << m_ChildrenDepth << std::endl; diff --git a/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.hxx index 0c5b79cc19f..c8afcc309b7 100644 --- a/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.hxx @@ -83,18 +83,18 @@ SurfaceSpatialObject::ComputeNormals() itkExceptionMacro("ComputeNormals requires at least 3 points"); } - typename SurfacePointListType::iterator it = this->m_Points.begin(); + typename SurfacePointListType::iterator it = this->m_Points.begin(); const typename SurfacePointListType::iterator itEnd = this->m_Points.end(); while (it != itEnd) { // Try to find 3 points close to the corresponding point const SurfacePointType pt = *it; - const PointType pos = it->GetPositionInObjectSpace(); + const PointType pos = it->GetPositionInObjectSpace(); std::list badId; - unsigned int identifier[3]; - double absvec = 0; + unsigned int identifier[3]; + double absvec = 0; do { identifier[0] = 0; @@ -138,14 +138,14 @@ SurfaceSpatialObject::ComputeNormals() } const PointType pos2 = it2->GetPositionInObjectSpace(); - const float distance = pos2.EuclideanDistanceTo(pos); + const float distance = pos2.EuclideanDistanceTo(pos); // Check that the point is not the same as some previously defined bool valid = true; for (auto & j : identifier) { const PointType p = this->m_Points[j].GetPositionInObjectSpace(); - const float d = pos2.EuclideanDistanceTo(p); + const float d = pos2.EuclideanDistanceTo(p); if (Math::AlmostEquals(d, 0.0f)) { valid = false; diff --git a/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.h b/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.h index fe5a1af6c6b..8374751d30a 100644 --- a/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.h @@ -144,7 +144,7 @@ class ITK_TEMPLATE_EXPORT TubeSpatialObject : public PointBasedSpatialObject::ComputeMyBoundingBox() } PointType pt = it->GetPositionInObjectSpace(); - double ptRadius = it->GetRadiusInObjectSpace(); + double ptRadius = it->GetRadiusInObjectSpace(); // Compute a bounding box in object space PointType tmpPt; @@ -179,18 +179,18 @@ TubeSpatialObject::IsInsideInObjectSpace(const Point if (this->GetMyBoundingBoxInObjectSpace()->IsInside(point)) { double tempDist; - auto it = this->m_Points.begin(); - auto first = it; - auto it2 = it; + auto it = this->m_Points.begin(); + auto first = it; + auto it2 = it; ++it2; auto end = this->m_Points.end(); auto last = end; --last; const PointType firstP = first->GetPositionInObjectSpace(); - const double firstR = first->GetRadiusInObjectSpace(); + const double firstR = first->GetRadiusInObjectSpace(); const PointType lastP = last->GetPositionInObjectSpace(); - const double lastR = last->GetRadiusInObjectSpace(); + const double lastR = last->GetRadiusInObjectSpace(); bool withinEndCap = false; while (it2 != end) @@ -233,8 +233,8 @@ TubeSpatialObject::IsInsideInObjectSpace(const Point double lambda = A / B; B = std::sqrt(B); - double lambdaMin = 0; - double lambdaMax = 1; + double lambdaMin = 0; + double lambdaMax = 1; const double lambdaMinR = it->GetRadiusInObjectSpace(); const double lambdaMaxR = it2->GetRadiusInObjectSpace(); if (m_EndRounded || !withinEndCap) @@ -299,7 +299,7 @@ TubeSpatialObject::RemoveDuplicatePointsInObjectSpac if (it != this->m_Points.end()) { const PointType pnt2 = it->GetPositionInObjectSpace(); - const double dist = pnt.EuclideanDistanceTo(pnt2); + const double dist = pnt.EuclideanDistanceTo(pnt2); if (dist <= minSpacingInObjectSpace) { it = this->m_Points.erase(it); @@ -347,8 +347,8 @@ TubeSpatialObject::ComputeTangentsAndNormals() // Compute tangent using the adjacent points const PointType & x1 = this->GetPoint(it1)->GetPositionInObjectSpace(); const PointType & x3 = this->GetPoint(it3)->GetPositionInObjectSpace(); - double l{ 0.0 }; - VectorType t; + double l{ 0.0 }; + VectorType t; for (unsigned int i = 0; i < TDimension; ++i) { t[i] = (x3[i] - x1[i]); diff --git a/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.h b/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.h index 2b01626dc44..fc6ed229fef 100644 --- a/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.h +++ b/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.h @@ -263,7 +263,7 @@ class ITK_TEMPLATE_EXPORT TubeSpatialObjectPoint : public SpatialObjectPointValueAtInWorldSpace(testPoint, *valPtr) || itk::Math::NotExactlyEquals(val, contour->GetDefaultOutsideValue())) diff --git a/Modules/Core/SpatialObjects/test/itkDTITubeSpatialObjectTest.cxx b/Modules/Core/SpatialObjects/test/itkDTITubeSpatialObjectTest.cxx index 0d1fcd1238f..5dfd3eb698a 100644 --- a/Modules/Core/SpatialObjects/test/itkDTITubeSpatialObjectTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkDTITubeSpatialObjectTest.cxx @@ -135,9 +135,9 @@ itkDTITubeSpatialObjectTest(int, char *[]) std::cout << "==================================" << std::endl; std::cout << "Testing GroupSpatialObject:" << std::endl << std::endl; - ChildrenListType childrenList; + ChildrenListType childrenList; ChildrenListPointer returnedList; - unsigned int nbChildren; + unsigned int nbChildren; const TubePointer tube2 = TubeType::New(); tube2->GetProperty().SetName("Tube 2"); @@ -356,7 +356,7 @@ itkDTITubeSpatialObjectTest(int, char *[]) std::cout << "==============================================" << std::endl; std::cout << "Testing references behavior for SpatialObject:" << std::endl << std::endl; - const TubePointer tube = TubeType::New(); + const TubePointer tube = TubeType::New(); const GroupPointer net = GroupType::New(); @@ -436,9 +436,9 @@ itkDTITubeSpatialObjectTest(int, char *[]) static_cast(tube1->GetPoint(1))->GetNormal2InWorldSpace(); - const Point t_known(itk::MakePoint(0.57735, 0.57735, 0.57735)); - const Point n1_known(itk::MakePoint(0.707107, 0.707107, 0.0)); - const Point n2_known(itk::MakePoint(0.408248, 0.408248, 0.816497)); + const Point t_known(itk::MakePoint(0.57735, 0.57735, 0.57735)); + const Point n1_known(itk::MakePoint(0.707107, 0.707107, 0.0)); + const Point n2_known(itk::MakePoint(0.408248, 0.408248, 0.816497)); constexpr double tol = 0.0001; if ((itk::Math::abs(t[0] - t_known[0]) > tol) || (itk::Math::abs(t[1] - t_known[1]) > tol) || @@ -489,8 +489,8 @@ itkDTITubeSpatialObjectTest(int, char *[]) // For coverage only std::cout << "Testing PointBasedSO: "; using PointBasedType = itk::PointBasedSpatialObject<3>; - auto pBSO = PointBasedType::New(); - PointBasedType::SpatialObjectPointType pnt; + auto pBSO = PointBasedType::New(); + PointBasedType::SpatialObjectPointType pnt; PointBasedType::SpatialObjectPointListType ll; ll.push_back(pnt); pBSO->SetPoints(ll); diff --git a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest.cxx b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest.cxx index 7f2a23b5731..438f1abc949 100644 --- a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest.cxx @@ -41,10 +41,10 @@ itkImageMaskSpatialObjectTest(int, char *[]) using ImageType = ImageMaskSpatialObject::ImageType; using Iterator = itk::ImageRegionIterator; - auto image = ImageType::New(); - constexpr ImageType::SizeType size = { { 50, 50, 50 } }; + auto image = ImageType::New(); + constexpr ImageType::SizeType size = { { 50, 50, 50 } }; constexpr ImageType::IndexType index = { { 0, 0, 0 } }; - ImageType::RegionType region; + ImageType::RegionType region; region.SetSize(size); region.SetIndex(index); @@ -52,8 +52,8 @@ itkImageMaskSpatialObjectTest(int, char *[]) image->SetRegions(region); image->AllocateInitialized(); - ImageType::RegionType insideRegion; - constexpr ImageType::SizeType insideSize = { { 30, 30, 30 } }; + ImageType::RegionType insideRegion; + constexpr ImageType::SizeType insideSize = { { 30, 30, 30 } }; constexpr ImageType::IndexType insideIndex = { { 10, 10, 10 } }; insideRegion.SetSize(insideSize); insideRegion.SetIndex(insideIndex); @@ -82,8 +82,8 @@ itkImageMaskSpatialObjectTest(int, char *[]) while (!itr.IsAtEnd()) { const ImageType::IndexType constIndex = itr.GetIndex(); - const bool reference = insideRegion.IsInside(constIndex); - ImageType::PointType point; + const bool reference = insideRegion.IsInside(constIndex); + ImageType::PointType point; image->TransformIndexToPhysicalPoint(constIndex, point); const bool test = maskSO->IsInsideInWorldSpace(point); if (test != reference) diff --git a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest2.cxx b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest2.cxx index 6214ce9f309..73807fd160d 100644 --- a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest2.cxx +++ b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest2.cxx @@ -39,7 +39,7 @@ int itkImageMaskSpatialObjectTest2(int, char *[]) { constexpr unsigned int VDimension = 3; - int retval = EXIT_SUCCESS; + int retval = EXIT_SUCCESS; using ImageMaskSpatialObject = itk::ImageMaskSpatialObject; using PixelType = ImageMaskSpatialObject::PixelType; @@ -62,7 +62,7 @@ itkImageMaskSpatialObjectTest2(int, char *[]) image->SetDirection(direction); constexpr ImageType::SizeType size = { { 50, 50, 50 } }; - ImageType::PointType origin; + ImageType::PointType origin; origin[0] = 1.51; origin[1] = 2.10; origin[2] = -300; @@ -73,14 +73,14 @@ itkImageMaskSpatialObjectTest2(int, char *[]) spacing[1] = 0.7; spacing[2] = 1.1; image->SetSpacing(spacing); - constexpr unsigned int index_offset = 6543; + constexpr unsigned int index_offset = 6543; constexpr ImageType::IndexType index = { { index_offset, index_offset, index_offset } }; const ImageType::RegionType region{ index, size }; image->SetRegions(region); image->AllocateInitialized(); - ImageType::RegionType insideRegion; + ImageType::RegionType insideRegion; constexpr unsigned int INSIDE_SIZE = 30; constexpr unsigned int INSIDE_INDEX = index_offset + 10; { @@ -136,7 +136,7 @@ itkImageMaskSpatialObjectTest2(int, char *[]) while (!itr.IsAtEnd()) { const ImageType::IndexType constIndex = itr.GetIndex(); - const bool reference = insideRegion.IsInside(constIndex); + const bool reference = insideRegion.IsInside(constIndex); ImageType::PointType point; image->TransformIndexToPhysicalPoint(constIndex, point); @@ -192,12 +192,12 @@ itkImageMaskSpatialObjectTest2(int, char *[]) INSIDE_SIZE * INSIDE_SIZE)) * 100.0); const ImageType::SpacingType incrementVector = (endPoint - startPoint) / static_cast(numberOfSteps); - ImageType::PointType point = startPoint; + ImageType::PointType point = startPoint; for (int i = 0; i < numberOfSteps; ++i) { point += incrementVector; const bool isInside = maskSO->IsInsideInWorldSpace(point); - double value{}; + double value{}; maskSO->ValueAtInWorldSpace(point, value); const bool isZero = (itk::Math::ExactlyEquals(value, PixelType{})); if ((isInside && isZero) || (!isInside && !isZero)) diff --git a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest3.cxx b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest3.cxx index c40e2aa9052..3dfd8360e7e 100644 --- a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest3.cxx +++ b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest3.cxx @@ -42,8 +42,8 @@ itkImageMaskSpatialObjectTest3(int, char *[]) using PixelType = ImageMaskSpatialObjectType::PixelType; using ImageType = itk::Image; - auto image = ImageType::New(); - constexpr ImageType::SizeType size = { { 5, 5, 5 } }; + auto image = ImageType::New(); + constexpr ImageType::SizeType size = { { 5, 5, 5 } }; constexpr ImageType::PointType origin{}; image->SetOrigin(origin); diff --git a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest4.cxx b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest4.cxx index 4fff45c1cc7..270f4a26bba 100644 --- a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest4.cxx +++ b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest4.cxx @@ -46,7 +46,7 @@ Test3dImageMask() // then translate it by 7 in all directions // bounding box should by [7,8] x [7,8] x [7,8] - auto box1 = BoxType::New(); + auto box1 = BoxType::New(); BoxType::SizeType sizeArray; sizeArray[0] = 1; sizeArray[1] = 1; @@ -55,7 +55,7 @@ Test3dImageMask() box1->SetDefaultInsideValue(1); box1->SetDefaultOutsideValue(0); - auto transform = TransformType::New(); + auto transform = TransformType::New(); TransformType::OutputVectorType translation; transform->SetIdentity(); @@ -177,7 +177,7 @@ Test2dImageMask() // then translate it by 7 in all directions // bounding box should by [7,8] x [7,8] - auto box1 = BoxType::New(); + auto box1 = BoxType::New(); BoxType::SizeType sizeArray; sizeArray[0] = 1; sizeArray[1] = 1; @@ -185,7 +185,7 @@ Test2dImageMask() box1->SetDefaultInsideValue(1); box1->SetDefaultOutsideValue(0); - auto transform = TransformType::New(); + auto transform = TransformType::New(); TransformType::OutputVectorType translation; transform->SetIdentity(); diff --git a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest5.cxx b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest5.cxx index d794efd7e38..7a86e4ad10c 100644 --- a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest5.cxx +++ b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest5.cxx @@ -41,10 +41,10 @@ itkImageMaskSpatialObjectTest5(int, char *[]) using ImageType = ImageMaskSpatialObject::ImageType; using Iterator = itk::ImageRegionIterator; - auto image = ImageType::New(); - constexpr ImageType::SizeType size = { { 50, 50, 50 } }; + auto image = ImageType::New(); + constexpr ImageType::SizeType size = { { 50, 50, 50 } }; constexpr ImageType::IndexType index = { { 0, 0, 0 } }; - ImageType::RegionType region; + ImageType::RegionType region; region.SetSize(size); region.SetIndex(index); @@ -52,8 +52,8 @@ itkImageMaskSpatialObjectTest5(int, char *[]) image->SetRegions(region); image->AllocateInitialized(); - ImageType::RegionType insideRegion; - constexpr ImageType::SizeType insideSize = { { 30, 30, 30 } }; + ImageType::RegionType insideRegion; + constexpr ImageType::SizeType insideSize = { { 30, 30, 30 } }; constexpr ImageType::IndexType insideIndex = { { 10, 10, 10 } }; insideRegion.SetSize(insideSize); insideRegion.SetIndex(insideIndex); @@ -81,8 +81,8 @@ itkImageMaskSpatialObjectTest5(int, char *[]) while (!itr.IsAtEnd()) { const ImageType::IndexType constIndex = itr.GetIndex(); - const bool reference = insideRegion.IsInside(constIndex); - ImageType::PointType point; + const bool reference = insideRegion.IsInside(constIndex); + ImageType::PointType point; image->TransformIndexToPhysicalPoint(constIndex, point); const bool test = maskSO->IsInsideInWorldSpace(point); if (test != reference) @@ -102,8 +102,8 @@ itkImageMaskSpatialObjectTest5(int, char *[]) while (!itr.IsAtEnd()) { const ImageType::IndexType constIndex = itr.GetIndex(); - const bool reference = insideRegion.IsInside(constIndex); - ImageType::PointType point; + const bool reference = insideRegion.IsInside(constIndex); + ImageType::PointType point; image->TransformIndexToPhysicalPoint(constIndex, point); const bool test = maskSO->IsInsideInWorldSpace(point); if (test != reference) @@ -124,8 +124,8 @@ itkImageMaskSpatialObjectTest5(int, char *[]) while (!itr.IsAtEnd()) { const ImageType::IndexType constIndex = itr.GetIndex(); - const bool reference = insideRegion.IsInside(constIndex); - ImageType::PointType point; + const bool reference = insideRegion.IsInside(constIndex); + ImageType::PointType point; image->TransformIndexToPhysicalPoint(constIndex, point); const bool test = maskSO->IsInsideInWorldSpace(point); if (test == true) diff --git a/Modules/Core/SpatialObjects/test/itkImageSpatialObjectTest.cxx b/Modules/Core/SpatialObjects/test/itkImageSpatialObjectTest.cxx index d3b0b8d9066..3d878bf45a8 100644 --- a/Modules/Core/SpatialObjects/test/itkImageSpatialObjectTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkImageSpatialObjectTest.cxx @@ -44,11 +44,11 @@ itkImageSpatialObjectTest(int, char *[]) using Iterator = itk::ImageRegionIterator; using PointType = itk::Point; - auto image = ImageType::New(); - constexpr ImageType::SizeType size = { { 10, 10, 10 } }; + auto image = ImageType::New(); + constexpr ImageType::SizeType size = { { 10, 10, 10 } }; constexpr ImageType::IndexType index = { { 0, 0, 0 } }; - ImageType::RegionType region; - auto origin = itk::MakeFilled(5); + ImageType::RegionType region; + auto origin = itk::MakeFilled(5); region.SetSize(size); region.SetIndex(index); @@ -57,7 +57,7 @@ itkImageSpatialObjectTest(int, char *[]) image->Allocate(); Iterator it(image, region); - Pixel p = 0; + Pixel p = 0; for (; !it.IsAtEnd(); ++it, ++p) { @@ -114,7 +114,7 @@ itkImageSpatialObjectTest(int, char *[]) ImageSpatialObject::DerivativeVectorType derivative; imageSO->DerivativeAtInWorldSpace(q, 1, derivative); - Pixel expectedPixel = 1; + Pixel expectedPixel = 1; ImageSpatialObject::DerivativeVectorType expectedDerivative; expectedDerivative[0] = expectedPixel; expectedPixel = 10; diff --git a/Modules/Core/SpatialObjects/test/itkLandmarkSpatialObjectTest.cxx b/Modules/Core/SpatialObjects/test/itkLandmarkSpatialObjectTest.cxx index 9ea22c4a306..c411fc9e198 100644 --- a/Modules/Core/SpatialObjects/test/itkLandmarkSpatialObjectTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkLandmarkSpatialObjectTest.cxx @@ -37,7 +37,7 @@ itkLandmarkSpatialObjectTest(int, char *[]) for (unsigned int i = 0; i < 10; ++i) { LandmarkPointType p; - PointType pnt; + PointType pnt; pnt[0] = i; pnt[1] = i + 1; diff --git a/Modules/Core/SpatialObjects/test/itkMetaArrowConverterTest.cxx b/Modules/Core/SpatialObjects/test/itkMetaArrowConverterTest.cxx index e82b8783535..5106554eca4 100644 --- a/Modules/Core/SpatialObjects/test/itkMetaArrowConverterTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkMetaArrowConverterTest.cxx @@ -186,7 +186,7 @@ itkMetaArrowConverterTest(int argc, char * argv[]) // check direction (note: need to normalize before comparing) SpatialObjectType::VectorType directionNorm = direction; directionNorm.Normalize(); - const double * newMetaDirection = newMetaArrow->Direction(); + const double * newMetaDirection = newMetaArrow->Direction(); SpatialObjectType::VectorType newMetaDirectionNorm; newMetaDirectionNorm[0] = newMetaDirection[0]; newMetaDirectionNorm[1] = newMetaDirection[1]; diff --git a/Modules/Core/SpatialObjects/test/itkPolygonSpatialObjectIsInsideInObjectSpaceTest.cxx b/Modules/Core/SpatialObjects/test/itkPolygonSpatialObjectIsInsideInObjectSpaceTest.cxx index b91b7ad74cf..e658f14bd67 100644 --- a/Modules/Core/SpatialObjects/test/itkPolygonSpatialObjectIsInsideInObjectSpaceTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkPolygonSpatialObjectIsInsideInObjectSpaceTest.cxx @@ -64,8 +64,8 @@ itkPolygonSpatialObjectIsInsideInObjectSpaceTest(int argc, char * argv[]) // Get polygon points from CSV file PolygonPointListType polygonPointList; - std::ifstream fs; - char data[100]; + std::ifstream fs; + char data[100]; fs.open(csvFileName); if (fs.good()) @@ -77,7 +77,7 @@ itkPolygonSpatialObjectIsInsideInObjectSpaceTest(int argc, char * argv[]) { std::stringstream ss(data); - PolygonPointType polygonPt; + PolygonPointType polygonPt; const itk::SpatialObject::Pointer so = itk::SpatialObject::New(); polygonPt.SetSpatialObject(so); PointType pt; diff --git a/Modules/Core/SpatialObjects/test/itkPolygonSpatialObjectTest.cxx b/Modules/Core/SpatialObjects/test/itkPolygonSpatialObjectTest.cxx index 94e8ebc58ef..48b980c57f4 100644 --- a/Modules/Core/SpatialObjects/test/itkPolygonSpatialObjectTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkPolygonSpatialObjectTest.cxx @@ -33,17 +33,17 @@ itkPolygonSpatialObjectTest(int, char *[]) ITK_EXERCISE_BASIC_OBJECT_METHODS(rectangle, PolygonSpatialObject, PointBasedSpatialObject); - constexpr double d1[3] = { 0.0, 0.0, 0.0 }; + constexpr double d1[3] = { 0.0, 0.0, 0.0 }; const PolygonType::PointType p1(d1); - constexpr double d2[3] = { 2.0, 0.0, 0.0 }; + constexpr double d2[3] = { 2.0, 0.0, 0.0 }; const PolygonType::PointType p2(d2); - constexpr double d3[3] = { 2.0, 1.0, 0.0 }; + constexpr double d3[3] = { 2.0, 1.0, 0.0 }; const PolygonType::PointType p3(d3); - constexpr double d4[3] = { 0.0, 1.0, 0.0 }; + constexpr double d4[3] = { 0.0, 1.0, 0.0 }; const PolygonType::PointType p4(d4); PolygonType::PolygonPointListType pList; - PolygonType::PolygonPointType pPoint; + PolygonType::PolygonPointType pPoint; pList.clear(); pPoint.SetPositionInObjectSpace(p1); pList.push_back(pPoint); @@ -131,8 +131,8 @@ itkPolygonSpatialObjectTest(int, char *[]) // // test number of points std::cout << "Testing closest point for rectangle: "; - constexpr double tp1[3] = { 0.25, 0.0, 0.0 }; - const PolygonType::PointType testPoint1(tp1); + constexpr double tp1[3] = { 0.25, 0.0, 0.0 }; + const PolygonType::PointType testPoint1(tp1); const PolygonType::PolygonPointType closestPoint = rectangle->ClosestPointInWorldSpace(testPoint1); if (closestPoint.GetPositionInObjectSpace() != p1) { @@ -148,8 +148,8 @@ itkPolygonSpatialObjectTest(int, char *[]) // // test number of points std::cout << "Testing closest point for rectangle (2): "; - constexpr double tp2[3] = { 0.25, 5.0, 5.0 }; - const PolygonType::PointType testPoint2(tp2); + constexpr double tp2[3] = { 0.25, 5.0, 5.0 }; + const PolygonType::PointType testPoint2(tp2); const PolygonType::PolygonPointType closestPoint2 = rectangle->ClosestPointInWorldSpace(testPoint2); if (closestPoint2.GetPositionInObjectSpace() != p4) { diff --git a/Modules/Core/SpatialObjects/test/itkSpatialObjectToImageFilterTest.cxx b/Modules/Core/SpatialObjects/test/itkSpatialObjectToImageFilterTest.cxx index f7384ba27bb..cc7bed01432 100644 --- a/Modules/Core/SpatialObjects/test/itkSpatialObjectToImageFilterTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkSpatialObjectToImageFilterTest.cxx @@ -83,7 +83,7 @@ itkSpatialObjectToImageFilterTest(int, char *[]) // Testing spacing std::cout << "Testing Spacing: "; - float spacingFloat[2]; + float spacingFloat[2]; double spacingDouble[2]; for (unsigned int i = 0; i < 2; ++i) @@ -119,7 +119,7 @@ itkSpatialObjectToImageFilterTest(int, char *[]) // Testing Origin std::cout << "Testing Origin: "; - float originFloat[2]; + float originFloat[2]; double originDouble[2]; for (unsigned int i = 0; i < 2; ++i) diff --git a/Modules/Core/SpatialObjects/test/itkSpatialObjectToImageStatisticsCalculatorTest.cxx b/Modules/Core/SpatialObjects/test/itkSpatialObjectToImageStatisticsCalculatorTest.cxx index 077a4348a09..5e2219715de 100644 --- a/Modules/Core/SpatialObjects/test/itkSpatialObjectToImageStatisticsCalculatorTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkSpatialObjectToImageStatisticsCalculatorTest.cxx @@ -140,7 +140,7 @@ itkSpatialObjectToImageStatisticsCalculatorTest(int, char *[]) size3D[1] = 50; size3D[2] = 3; constexpr IndexType start{}; - RegionType region3D; + RegionType region3D; region3D.SetIndex(start); region3D.SetSize(size3D); image3D->SetRegions(region3D); @@ -173,7 +173,7 @@ itkSpatialObjectToImageStatisticsCalculatorTest(int, char *[]) std::cout << "Allocating spatial object." << std::endl; using Ellipse3DType = itk::EllipseSpatialObject<3>; - auto ellipse3D = Ellipse3DType::New(); + auto ellipse3D = Ellipse3DType::New(); double radii[3]; radii[0] = 10; radii[1] = 10; diff --git a/Modules/Core/SpatialObjects/test/itkSpatialObjectToPointSetFilterTest.cxx b/Modules/Core/SpatialObjects/test/itkSpatialObjectToPointSetFilterTest.cxx index 09f1c1803d1..853d59ffea0 100644 --- a/Modules/Core/SpatialObjects/test/itkSpatialObjectToPointSetFilterTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkSpatialObjectToPointSetFilterTest.cxx @@ -89,7 +89,7 @@ itkSpatialObjectToPointSetFilterTest(int, char *[]) std::cout << "Testing pointSet validity : "; using PointIterator = PointSetType::PointsContainer::ConstIterator; - PointIterator pointItr = pointSet->GetPoints()->Begin(); + PointIterator pointItr = pointSet->GetPoints()->Begin(); const PointIterator pointEnd = pointSet->GetPoints()->End(); unsigned int val = 0; @@ -115,7 +115,7 @@ itkSpatialObjectToPointSetFilterTest(int, char *[]) auto group3D = Group3DType::New(); - auto tube3D = Tube3DType::New(); + auto tube3D = Tube3DType::New(); Tube3DPointListType tubePointList; for (unsigned int i = 0; i < 10; ++i) { @@ -127,7 +127,7 @@ itkSpatialObjectToPointSetFilterTest(int, char *[]) tube3D->SetPoints(tubePointList); tube3D->Update(); - auto tube3D2 = Tube3DType::New(); + auto tube3D2 = Tube3DType::New(); Tube3DPointListType tubePointList2; for (unsigned int i = 10; i < 20; ++i) { @@ -178,7 +178,7 @@ itkSpatialObjectToPointSetFilterTest(int, char *[]) std::cout << "Testing pointSet3D validity : "; using PointIterator3D = PointSet3DType::PointsContainer::ConstIterator; - PointIterator3D pointItr2 = pointSet3D->GetPoints()->Begin(); + PointIterator3D pointItr2 = pointSet3D->GetPoints()->Begin(); const PointIterator3D pointEnd2 = pointSet3D->GetPoints()->End(); val = 0; diff --git a/Modules/Core/SpatialObjects/test/itkTubeSpatialObjectTest.cxx b/Modules/Core/SpatialObjects/test/itkTubeSpatialObjectTest.cxx index 3f63df19cc2..8f90059a2e4 100644 --- a/Modules/Core/SpatialObjects/test/itkTubeSpatialObjectTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkTubeSpatialObjectTest.cxx @@ -146,9 +146,9 @@ itkTubeSpatialObjectTest(int, char *[]) std::cout << "==================================" << std::endl; std::cout << "Testing GroupSpatialObject:" << std::endl << std::endl; - ChildrenListType childrenList; + ChildrenListType childrenList; ChildrenListPointer returnedList; - unsigned int nbChildren; + unsigned int nbChildren; const TubePointer tube2 = TubeType::New(); tube2->GetProperty().SetName("Tube 2"); @@ -366,7 +366,7 @@ itkTubeSpatialObjectTest(int, char *[]) std::cout << "==============================================" << std::endl; std::cout << "Testing references behavior for SpatialObject:" << std::endl << std::endl; - const TubePointer tube = TubeType::New(); + const TubePointer tube = TubeType::New(); const GroupPointer net = GroupType::New(); unsigned int tubeCount = tube->GetReferenceCount(); @@ -445,9 +445,9 @@ itkTubeSpatialObjectTest(int, char *[]) static_cast(tube1->GetPoint(1))->GetNormal2InWorldSpace(); - const Point t_known(itk::MakePoint(0.57735, 0.57735, 0.57735)); - const Point n1_known(itk::MakePoint(0.707107, 0.707107, 0.0)); - const Point n2_known(itk::MakePoint(0.408248, 0.408248, 0.816497)); + const Point t_known(itk::MakePoint(0.57735, 0.57735, 0.57735)); + const Point n1_known(itk::MakePoint(0.707107, 0.707107, 0.0)); + const Point n2_known(itk::MakePoint(0.408248, 0.408248, 0.816497)); constexpr double tol = 0.0001; if ((itk::Math::abs(t[0] - t_known[0]) > tol) || (itk::Math::abs(t[1] - t_known[1]) > tol) || @@ -500,8 +500,8 @@ itkTubeSpatialObjectTest(int, char *[]) // For coverage only std::cout << "Testing PointBasedSO: "; using PointBasedType = itk::PointBasedSpatialObject<3>; - auto pBSO = PointBasedType::New(); - PointBasedType::SpatialObjectPointType pnt; + auto pBSO = PointBasedType::New(); + PointBasedType::SpatialObjectPointType pnt; PointBasedType::SpatialObjectPointListType ll; ll.push_back(pnt); pBSO->SetPoints(ll); diff --git a/Modules/Core/TestKernel/include/itkGTestPredicate.h b/Modules/Core/TestKernel/include/itkGTestPredicate.h index a95cf5cb913..013996f28f9 100644 --- a/Modules/Core/TestKernel/include/itkGTestPredicate.h +++ b/Modules/Core/TestKernel/include/itkGTestPredicate.h @@ -58,9 +58,9 @@ inline ::testing::AssertionResult VectorDoubleRMSPredFormat(const char * expr1, const char * expr2, const char * rmsErrorExpr, - const T1 & val1, - const T2 & val2, - double rmsError) + const T1 & val1, + const T2 & val2, + double rmsError) { const size_t val1Size = itk::NumericTraits::GetLength(val1); const size_t val2Size = itk::NumericTraits::GetLength(val2); diff --git a/Modules/Core/TestKernel/include/itkPipelineMonitorImageFilter.h b/Modules/Core/TestKernel/include/itkPipelineMonitorImageFilter.h index a72f3304cf5..ec19f0da583 100644 --- a/Modules/Core/TestKernel/include/itkPipelineMonitorImageFilter.h +++ b/Modules/Core/TestKernel/include/itkPipelineMonitorImageFilter.h @@ -229,9 +229,9 @@ class ITK_TEMPLATE_EXPORT PipelineMonitorImageFilter : public ImageToImageFilter RegionVectorType m_UpdatedBufferedRegions{}; RegionVectorType m_UpdatedRequestedRegions{}; - PointType m_UpdatedOutputOrigin{}; - DirectionType m_UpdatedOutputDirection{}; - SpacingType m_UpdatedOutputSpacing{}; + PointType m_UpdatedOutputOrigin{}; + DirectionType m_UpdatedOutputDirection{}; + SpacingType m_UpdatedOutputSpacing{}; ImageRegionType m_UpdatedOutputLargestPossibleRegion{}; }; } // end namespace itk diff --git a/Modules/Core/TestKernel/include/itkPipelineMonitorImageFilter.hxx b/Modules/Core/TestKernel/include/itkPipelineMonitorImageFilter.hxx index f026e61e1ba..e064cc00f29 100644 --- a/Modules/Core/TestKernel/include/itkPipelineMonitorImageFilter.hxx +++ b/Modules/Core/TestKernel/include/itkPipelineMonitorImageFilter.hxx @@ -114,7 +114,7 @@ PipelineMonitorImageFilter::VerifyInputFilterBufferedRequestedRegion { // we expect that the input filter's output image's buffered // region is going to match its requested region - bool ret = true; + bool ret = true; unsigned int i; for (i = 0; i < m_UpdatedBufferedRegions.size(); ++i) { @@ -136,7 +136,7 @@ PipelineMonitorImageFilter::VerifyInputFilterMatchedRequestedRegions // region is going to match its requested region, which is going // to match the requested region at the end of propagation // - bool ret = true; + bool ret = true; size_t i = m_UpdatedBufferedRegions.size(); size_t j = m_InputRequestedRegions.size(); diff --git a/Modules/Core/TestKernel/include/itkRandomImageSource.h b/Modules/Core/TestKernel/include/itkRandomImageSource.h index 048a004885d..39809466c9a 100644 --- a/Modules/Core/TestKernel/include/itkRandomImageSource.h +++ b/Modules/Core/TestKernel/include/itkRandomImageSource.h @@ -151,9 +151,9 @@ class ITK_TEMPLATE_EXPORT RandomImageSource : public ImageSource GenerateOutputInformation() override; private: - SizeType m_Size{}; // size of the output image - SpacingType m_Spacing{}; // spacing - PointType m_Origin{}; // origin + SizeType m_Size{}; // size of the output image + SpacingType m_Spacing{}; // spacing + PointType m_Origin{}; // origin DirectionType m_Direction{}; // direction typename TOutputImage::PixelType m_Min{}; // minimum possible value @@ -161,7 +161,7 @@ class ITK_TEMPLATE_EXPORT RandomImageSource : public ImageSource // The following variables are deprecated, and provided here just for // backward compatibility. It use is discouraged. - mutable PointValueArrayType m_OriginArray{}; + mutable PointValueArrayType m_OriginArray{}; mutable SpacingValueArrayType m_SpacingArray{}; }; } // end namespace itk diff --git a/Modules/Core/TestKernel/include/itkRandomImageSource.hxx b/Modules/Core/TestKernel/include/itkRandomImageSource.hxx index 1c73b9c9315..1bdd2cf93e9 100644 --- a/Modules/Core/TestKernel/include/itkRandomImageSource.hxx +++ b/Modules/Core/TestKernel/include/itkRandomImageSource.hxx @@ -59,7 +59,7 @@ void RandomImageSource::SetSize(SizeValueArrayType sizeArray) { const unsigned int count = TOutputImage::ImageDimension; - unsigned int i; + unsigned int i; for (i = 0; i < count; ++i) { @@ -90,7 +90,7 @@ void RandomImageSource::SetSpacing(SpacingValueArrayType spacingArray) { const unsigned int count = TOutputImage::ImageDimension; - unsigned int i; + unsigned int i; for (i = 0; i < count; ++i) { @@ -114,7 +114,7 @@ void RandomImageSource::SetOrigin(PointValueArrayType originArray) { const unsigned int count = TOutputImage::ImageDimension; - unsigned int i; + unsigned int i; for (i = 0; i < count; ++i) { diff --git a/Modules/Core/TestKernel/include/itkTestDriverInclude.h b/Modules/Core/TestKernel/include/itkTestDriverInclude.h index 89fb5fdb5b2..0da48868fc6 100644 --- a/Modules/Core/TestKernel/include/itkTestDriverInclude.h +++ b/Modules/Core/TestKernel/include/itkTestDriverInclude.h @@ -55,15 +55,15 @@ #define ITK_TEST_DIMENSION_MAX 6 extern int -RegressionTestImage(const char * testImageFilename, - const char * baselineImageFilename, - int reportErrors, - double intensityTolerance, +RegressionTestImage(const char * testImageFilename, + const char * baselineImageFilename, + int reportErrors, + double intensityTolerance, itk::SizeValueType numberOfPixelsTolerance = 0, - unsigned int radiusTolerance = 0, - bool verifyInputInformation = true, - double coordinateTolerance = 1.0e-6, - double directionTolerance = 1.0e-6); + unsigned int radiusTolerance = 0, + bool verifyInputInformation = true, + double coordinateTolerance = 1.0e-6, + double directionTolerance = 1.0e-6); extern int HashTestImage(const char * testImageFilename, const std::string md5hash); @@ -78,12 +78,12 @@ using ComparePairType = std::pair; struct RegressionTestParameters { std::vector compareList; - double intensityTolerance; - unsigned int numberOfPixelsTolerance; - unsigned int radiusTolerance; - bool verifyInputInformation; - double coordinateTolerance; - double directionTolerance; + double intensityTolerance; + unsigned int numberOfPixelsTolerance; + unsigned int radiusTolerance; + bool verifyInputInformation; + double coordinateTolerance; + double directionTolerance; }; extern RegressionTestParameters & @@ -114,7 +114,7 @@ struct ProcessedOutputType // A structure to hold redirect output parameters struct RedirectOutputParameters { - bool redirect; + bool redirect; std::string fileName; }; @@ -133,15 +133,15 @@ extern void GetImageType(const char * fileName, itk::IOPixelEnum & pixelType, itk::IOComponentEnum & componentType); extern int -RegressionTestImage(const char * testImageFilename, - const char * baselineImageFilename, - int reportErrors, - double intensityTolerance, +RegressionTestImage(const char * testImageFilename, + const char * baselineImageFilename, + int reportErrors, + double intensityTolerance, itk::SizeValueType numberOfPixelsTolerance, - unsigned int radiusTolerance, - bool verifyInputInformation, - double coordinateTolerance, - double directionTolerance); + unsigned int radiusTolerance, + bool verifyInputInformation, + double coordinateTolerance, + double directionTolerance); extern int diff --git a/Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.h b/Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.h index 28b908f7046..7811a259a53 100644 --- a/Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.h +++ b/Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.h @@ -128,10 +128,10 @@ class ITK_TEMPLATE_EXPORT ComparisonImageFilter : public ImageToImageFilter::max() }; OutputPixelType m_MaximumDifference{ NumericTraits::NonpositiveMin() }; - bool m_VerifyInputInformation{ true }; + bool m_VerifyInputInformation{ true }; AccumulateType m_TotalDifference{}; diff --git a/Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.hxx b/Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.hxx index beba23bcc16..9423e28f31e 100644 --- a/Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.hxx +++ b/Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.hxx @@ -92,7 +92,7 @@ ComparisonImageFilter::DynamicThreadedGenerateData( // Get a pointer to each image. const InputImageType * validImage = this->GetInput(0); const InputImageType * testImage = this->GetInput(1); - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); if (validImage->GetBufferedRegion() != testImage->GetBufferedRegion()) { @@ -100,8 +100,8 @@ ComparisonImageFilter::DynamicThreadedGenerateData( } // Create a radius of pixels. - RadiusType radius; - const unsigned int minVoxelsNeeded = m_ToleranceRadius * 2 + 1; + RadiusType radius; + const unsigned int minVoxelsNeeded = m_ToleranceRadius * 2 + 1; const typename TInputImage::SizeType imageSize = validImage->GetBufferedRegion().GetSize(); for (unsigned int d = 0; d < TInputImage::ImageDimension; ++d) { @@ -119,12 +119,12 @@ ComparisonImageFilter::DynamicThreadedGenerateData( // Initialize the thread local variables OutputPixelType threadMinimumDifference{ NumericTraits::max() }; OutputPixelType threadMaximumDifference{ NumericTraits::NonpositiveMin() }; - AccumulateType threadDifferenceSum{}; - SizeValueType threadNumberOfPixels{ 0 }; + AccumulateType threadDifferenceSum{}; + SizeValueType threadNumberOfPixels{ 0 }; // Find the data-set boundary faces. FacesCalculator boundaryCalculator; - FaceListType faceList = boundaryCalculator(testImage, threadRegion, radius); + FaceListType faceList = boundaryCalculator(testImage, threadRegion, radius); // Support progress methods/callbacks. TotalProgressReporter progress(this, threadRegion.GetNumberOfPixels()); @@ -132,9 +132,9 @@ ComparisonImageFilter::DynamicThreadedGenerateData( // Process the internal face and each of the boundary faces. for (auto face = faceList.begin(); face != faceList.end(); ++face) { - SmartIterator test(radius, testImage, *face); // Iterate over test image. - InputIterator valid(validImage, *face); // Iterate over valid image. - OutputIterator out(outputPtr, *face); // Iterate over output image. + SmartIterator test(radius, testImage, *face); // Iterate over test image. + InputIterator valid(validImage, *face); // Iterate over valid image. + OutputIterator out(outputPtr, *face); // Iterate over output image. if (!test.GetNeedToUseBoundaryCondition() || !m_IgnoreBoundaryPixels) { test.OverrideBoundaryCondition(&nbc); @@ -146,7 +146,7 @@ ComparisonImageFilter::DynamicThreadedGenerateData( // Assume a good match - so test center pixel first, for speed const RealType difference = std::abs(static_cast(t) - test.GetCenterPixel()); - auto minimumDifference = static_cast(difference); + auto minimumDifference = static_cast(difference); // If center pixel isn't good enough, then test the neighborhood if (minimumDifference > m_DifferenceThreshold) @@ -159,7 +159,7 @@ ComparisonImageFilter::DynamicThreadedGenerateData( // Use the RealType for the difference to make sure we get the // sign. const RealType differenceReal = std::abs(static_cast(t) - test.GetPixel(i)); - auto d = static_cast(differenceReal); + auto d = static_cast(differenceReal); if (d < minimumDifference) { minimumDifference = d; diff --git a/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.hxx b/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.hxx index 9e4f6daf869..16f1c19ad98 100644 --- a/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.hxx +++ b/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.hxx @@ -50,7 +50,7 @@ ExtractSliceImageFilter::PrintSelf(std::ostream & os, template void ExtractSliceImageFilter::CallCopyOutputRegionToInputRegion( - InputImageRegionType & destRegion, + InputImageRegionType & destRegion, const OutputImageRegionType & srcRegion) { const ExtractSliceImageFilterRegionCopierType extractImageRegionCopier; @@ -67,9 +67,9 @@ ExtractSliceImageFilter::SetExtractionRegion(InputIma "InputImageDimension must be greater than OutputImageDimension"); m_ExtractionRegion = extractRegion; - unsigned int nonzeroSizeCount = 0; - InputImageSizeType inputSize = extractRegion.GetSize(); - OutputImageSizeType outputSize{}; + unsigned int nonzeroSizeCount = 0; + InputImageSizeType inputSize = extractRegion.GetSize(); + OutputImageSizeType outputSize{}; OutputImageIndexType outputIndex{}; /** @@ -110,7 +110,7 @@ ExtractSliceImageFilter::GenerateOutputInformation() // this filter allows the input and the output to be of different dimensions // get pointers to the input and output - TOutputImage * outputPtr = this->GetOutput(); + TOutputImage * outputPtr = this->GetOutput(); const TInputImage * inputPtr = this->GetInput(); if (!outputPtr || !inputPtr) @@ -134,13 +134,13 @@ ExtractSliceImageFilter::GenerateOutputInformation() // This logic needs to be augmented with logic that select which // dimensions to copy - const typename InputImageType::SpacingType & inputSpacing = inputPtr->GetSpacing(); + const typename InputImageType::SpacingType & inputSpacing = inputPtr->GetSpacing(); const typename InputImageType::DirectionType & inputDirection = inputPtr->GetDirection(); - const typename InputImageType::PointType & inputOrigin = inputPtr->GetOrigin(); + const typename InputImageType::PointType & inputOrigin = inputPtr->GetOrigin(); - typename OutputImageType::SpacingType outputSpacing; + typename OutputImageType::SpacingType outputSpacing; typename OutputImageType::DirectionType outputDirection; - typename OutputImageType::PointType outputOrigin{}; + typename OutputImageType::PointType outputOrigin{}; if (static_cast(OutputImageDimension) > static_cast(InputImageDimension)) { @@ -245,7 +245,7 @@ ExtractSliceImageFilter::DynamicThreadedGenerateData( // Get the input and output pointers const TInputImage * inputPtr = this->GetInput(); - TOutputImage * outputPtr = this->GetOutput(); + TOutputImage * outputPtr = this->GetOutput(); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); @@ -257,7 +257,7 @@ ExtractSliceImageFilter::DynamicThreadedGenerateData( using InputIterator = ImageRegionConstIterator; OutputIterator outIt(outputPtr, outputRegionForThread); - InputIterator inIt(inputPtr, inputRegionForThread); + InputIterator inIt(inputPtr, inputRegionForThread); // walk the output region, and sample the input image while (!outIt.IsAtEnd()) diff --git a/Modules/Core/TestKernel/include/itkTestingHashImageFilter.hxx b/Modules/Core/TestKernel/include/itkTestingHashImageFilter.hxx index 8caebeaed37..f7dd4de4bab 100644 --- a/Modules/Core/TestKernel/include/itkTestingHashImageFilter.hxx +++ b/Modules/Core/TestKernel/include/itkTestingHashImageFilter.hxx @@ -84,7 +84,7 @@ HashImageFilter::AfterThreadedGenerateData() const void * const buffer = input->GetBufferPointer(); const typename ImageType::RegionType largestRegion = input->GetBufferedRegion(); - const size_t numberOfValues = largestRegion.GetNumberOfPixels() * numberOfComponent; + const size_t numberOfValues = largestRegion.GetNumberOfPixels() * numberOfComponent; // Possible byte swap so we always calculate on little endian data const auto ByteSwapBigEndian = [buffer, numberOfValues] { @@ -101,7 +101,7 @@ HashImageFilter::AfterThreadedGenerateData() // NOTE: THIS IS NOT A nullptr TERMINATED STRING!!! //////// const size_t DigestSize = 32u; - char Digest[DigestSize]; + char Digest[DigestSize]; itksysMD5_FinalizeHex(md5, Digest); diff --git a/Modules/Core/TestKernel/include/itkTestingStretchIntensityImageFilter.hxx b/Modules/Core/TestKernel/include/itkTestingStretchIntensityImageFilter.hxx index 0a643454778..ee39d0ce210 100644 --- a/Modules/Core/TestKernel/include/itkTestingStretchIntensityImageFilter.hxx +++ b/Modules/Core/TestKernel/include/itkTestingStretchIntensityImageFilter.hxx @@ -101,19 +101,19 @@ StretchIntensityImageFilter::DynamicThreadedGenerateD const OutputImageRegionType & outputRegionForThread) { const TInputImage * inputPtr = this->GetInput(); - TOutputImage * outputPtr = this->GetOutput(0); + TOutputImage * outputPtr = this->GetOutput(0); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); const InputImageRegionType inputRegionForThread = outputRegionForThread; ImageRegionConstIterator inputIt(inputPtr, inputRegionForThread); - ImageRegionIterator outputIt(outputPtr, outputRegionForThread); + ImageRegionIterator outputIt(outputPtr, outputRegionForThread); while (!inputIt.IsAtEnd()) { const InputPixelType x = inputIt.Get(); - const RealType value = static_cast(x) * m_Scale + m_Shift; + const RealType value = static_cast(x) * m_Scale + m_Shift; auto result = Math::Round(value); diff --git a/Modules/Core/TestKernel/src/itkTestDriverInclude.cxx b/Modules/Core/TestKernel/src/itkTestDriverInclude.cxx index 576d649f3cb..c0715f8fea5 100644 --- a/Modules/Core/TestKernel/src/itkTestDriverInclude.cxx +++ b/Modules/Core/TestKernel/src/itkTestDriverInclude.cxx @@ -40,9 +40,9 @@ namespace { -RegressionTestParameters regressionTestParameters; +RegressionTestParameters regressionTestParameters; std::vector hashTestList; -RedirectOutputParameters redirectOutputParameters; +RedirectOutputParameters redirectOutputParameters; } // namespace RegressionTestParameters & @@ -174,7 +174,7 @@ ProcessArguments(int * argc, ArgumentStringType * argv, ProcessedOutputType * pr } // parse the command line - int i = 1; + int i = 1; bool skip = false; while (i < *argc) { @@ -197,7 +197,7 @@ ProcessArguments(int * argc, ArgumentStringType * argv, ProcessedOutputType * pr return 1; } const char * filename = (*argv)[i + 1]; - std::string md5hash0 = (*argv)[i + 2]; + std::string md5hash0 = (*argv)[i + 2]; // convert hash to all lowercase letters std::transform(md5hash0.begin(), md5hash0.end(), md5hash0.begin(), my_to_lower); @@ -459,15 +459,15 @@ GetImageType(const char * fileName, itk::IOPixelEnum & pixelType, itk::IOCompone // otherwise zero is returned if the difference is with in tolerances template int -RegressionTestHelper(const char * testImageFilename, - const char * baselineImageFilename, - int reportErrors, - double intensityTolerance, +RegressionTestHelper(const char * testImageFilename, + const char * baselineImageFilename, + int reportErrors, + double intensityTolerance, itk::SizeValueType numberOfPixelsTolerance, - unsigned int radiusTolerance, - bool verifyInputInformation, - double coordinateTolerance, - double directionTolerance) + unsigned int radiusTolerance, + bool verifyInputInformation, + double coordinateTolerance, + double directionTolerance) { // Use the factory mechanism to read the test and baseline files and convert // them to double @@ -705,17 +705,17 @@ RegressionTestHelper(const char * testImageFilename, } int -RegressionTestImage(const char * testImageFilename, - const char * baselineImageFilename, - int reportErrors, - double intensityTolerance, +RegressionTestImage(const char * testImageFilename, + const char * baselineImageFilename, + int reportErrors, + double intensityTolerance, itk::SizeValueType numberOfPixelsTolerance, - unsigned int radiusTolerance, - bool verifyInputInformation, - double coordinateTolerance, - double directionTolerance) + unsigned int radiusTolerance, + bool verifyInputInformation, + double coordinateTolerance, + double directionTolerance) { - itk::IOPixelEnum pixelType; + itk::IOPixelEnum pixelType; itk::IOComponentEnum componentType; try { @@ -966,9 +966,9 @@ RegressionTestBaselines(char * baselineFilename) std::string originalBaseline(baselineFilename); - int x = 0; + int x = 0; const std::string::size_type suffixPos = originalBaseline.rfind("."); - std::string suffix; + std::string suffix; if (suffixPos != std::string::npos) { suffix = originalBaseline.substr(suffixPos, originalBaseline.length()); diff --git a/Modules/Core/TestKernel/test/itkGoogleTest.cxx b/Modules/Core/TestKernel/test/itkGoogleTest.cxx index afcffc1ad4a..2835c124ebe 100644 --- a/Modules/Core/TestKernel/test/itkGoogleTest.cxx +++ b/Modules/Core/TestKernel/test/itkGoogleTest.cxx @@ -50,13 +50,13 @@ TEST(GoogleTest, TypedefsAndConstructors_Dimension2) ITK_EXPECT_VECTOR_NEAR(vec1, itk::MakeVector(1.1, 2.2), 1e-10); constexpr IndexType idx1 = { { 0, 1 } }; - const IndexType idx2 = itk::MakeIndex(0, 1); + const IndexType idx2 = itk::MakeIndex(0, 1); EXPECT_TRUE(idx1 == idx2); ITK_EXPECT_VECTOR_NEAR(idx1, idx2, 1e-10); ITK_EXPECT_VECTOR_NEAR(idx1, itk::MakeIndex(0, 1), 1e-10); constexpr SizeType sz1 = { { 0u, 1u } }; - const SizeType sz2 = itk::MakeSize(0u, 1u); + const SizeType sz2 = itk::MakeSize(0u, 1u); EXPECT_TRUE(sz1 == sz2); ITK_EXPECT_VECTOR_NEAR(sz1, sz2, 1e-10); ITK_EXPECT_VECTOR_NEAR(sz1, itk::MakeSize(0u, 1u), 1e-10); @@ -88,12 +88,12 @@ TEST(GoogleTest, TypedefsAndConstructors_Dimension3) ITK_EXPECT_VECTOR_NEAR(vec1, itk::MakeVector(1.1, 2.2, 3.3), 1e-10); constexpr IndexType idx1 = { { 0, 1, 2 } }; - const IndexType idx2 = itk::MakeIndex(0, 1, 2); + const IndexType idx2 = itk::MakeIndex(0, 1, 2); EXPECT_TRUE(idx1 == idx2); ITK_EXPECT_VECTOR_NEAR(idx1, idx2, 1e-10); constexpr SizeType sz1 = { { 0u, 1u, 2u } }; - const SizeType sz2 = itk::MakeSize(0u, 1u, 2u); + const SizeType sz2 = itk::MakeSize(0u, 1u, 2u); EXPECT_TRUE(sz1 == sz2); ITK_EXPECT_VECTOR_NEAR(sz1, itk::MakeSize(0u, 1u, 2u), 1e-10); } diff --git a/Modules/Core/TestKernel/test/itkRandomImageSourceAttributesTest.cxx b/Modules/Core/TestKernel/test/itkRandomImageSourceAttributesTest.cxx index c501a91c04f..d3d19b09c22 100644 --- a/Modules/Core/TestKernel/test/itkRandomImageSourceAttributesTest.cxx +++ b/Modules/Core/TestKernel/test/itkRandomImageSourceAttributesTest.cxx @@ -22,12 +22,12 @@ template int -itkRandomImageSourceAttributesTestHelper(const typename TImage::SizeType size, - const typename TImage::SpacingType spacing, - const typename TImage::PointType origin, +itkRandomImageSourceAttributesTestHelper(const typename TImage::SizeType size, + const typename TImage::SpacingType spacing, + const typename TImage::PointType origin, const typename TImage::DirectionType direction, - const typename TImage::ValueType min, - const typename TImage::ValueType max) + const typename TImage::ValueType min, + const typename TImage::ValueType max) { using ImageSourceType = itk::RandomImageSource; @@ -73,13 +73,13 @@ itkRandomImageSourceAttributesTest(int, char *[]) { using ImageType2D = itk::Image; - constexpr ImageType2D::SizeType size{ { 25, 25 } }; - const ImageType2D::SpacingType spacing{ { { 0.7, 2.1 } } }; - const ImageType2D::PointType origin{ { { -1.7, 5.2 } } }; + constexpr ImageType2D::SizeType size{ { 25, 25 } }; + const ImageType2D::SpacingType spacing{ { { 0.7, 2.1 } } }; + const ImageType2D::PointType origin{ { { -1.7, 5.2 } } }; constexpr itk::SpacePrecisionType d[4] = { 0, 1.0, 1.0, 0 }; - const ImageType2D::DirectionType direction = ImageType2D::DirectionType::InternalMatrixType(d); - constexpr ImageType2D::ValueType min{ 0.0 }; - constexpr ImageType2D::ValueType max{ 1000.0 }; + const ImageType2D::DirectionType direction = ImageType2D::DirectionType::InternalMatrixType(d); + constexpr ImageType2D::ValueType min{ 0.0 }; + constexpr ImageType2D::ValueType max{ 1000.0 }; testStatus = itkRandomImageSourceAttributesTestHelper(size, spacing, origin, direction, min, max); } @@ -87,13 +87,13 @@ itkRandomImageSourceAttributesTest(int, char *[]) { using ImageType3D = itk::Image; - constexpr ImageType3D::SizeType size{ { 14, 17, 36 } }; - const ImageType3D::SpacingType spacing{ { { 0.7, 0.4, 1.2 } } }; - const ImageType3D::PointType origin{ { { -1.7, 5.2, 3.4 } } }; + constexpr ImageType3D::SizeType size{ { 14, 17, 36 } }; + const ImageType3D::SpacingType spacing{ { { 0.7, 0.4, 1.2 } } }; + const ImageType3D::PointType origin{ { { -1.7, 5.2, 3.4 } } }; constexpr itk::SpacePrecisionType d[9] = { 0, 1.0, 0, 1.0, 0, 0, 0, 1.0, 0 }; - const ImageType3D::DirectionType direction = ImageType3D::DirectionType::InternalMatrixType(d); - constexpr ImageType3D::ValueType min{ 0.0 }; - constexpr ImageType3D::ValueType max{ 10.0 }; + const ImageType3D::DirectionType direction = ImageType3D::DirectionType::InternalMatrixType(d); + constexpr ImageType3D::ValueType min{ 0.0 }; + constexpr ImageType3D::ValueType max{ 10.0 }; testStatus = itkRandomImageSourceAttributesTestHelper(size, spacing, origin, direction, min, max); } diff --git a/Modules/Core/TestKernel/test/itkTestingComparisonImageFilterGTest.cxx b/Modules/Core/TestKernel/test/itkTestingComparisonImageFilterGTest.cxx index e6d9a1e65e6..572d54749be 100644 --- a/Modules/Core/TestKernel/test/itkTestingComparisonImageFilterGTest.cxx +++ b/Modules/Core/TestKernel/test/itkTestingComparisonImageFilterGTest.cxx @@ -40,8 +40,8 @@ TEST(itkTestingComparisonImageFilterTest, TestZeroImages) { // Create two 16x16 images of all zeros using ImageType = itk::Image; - auto image1 = ImageType::New(); - auto image2 = ImageType::New(); + auto image1 = ImageType::New(); + auto image2 = ImageType::New(); constexpr ImageType::SizeType size = { { 16, 16 } }; image1->SetRegions(size); image2->SetRegions(size); @@ -70,8 +70,8 @@ TEST(itkTestingComparisonImageFilterTest, TestOneDifferentPixel) { // Create two 16x16 images of all zeros but pixel at (5,5) is 1 using ImageType = itk::Image; - auto image1 = ImageType::New(); - auto image2 = ImageType::New(); + auto image1 = ImageType::New(); + auto image2 = ImageType::New(); constexpr ImageType::SizeType size = { { 16, 16 } }; image1->SetRegions(size); image2->SetRegions(size); diff --git a/Modules/Core/TestKernel/test/itkTestingStretchIntensityImageFilterTest.cxx b/Modules/Core/TestKernel/test/itkTestingStretchIntensityImageFilterTest.cxx index 73349c5e34c..d5b7ccd1b78 100644 --- a/Modules/Core/TestKernel/test/itkTestingStretchIntensityImageFilterTest.cxx +++ b/Modules/Core/TestKernel/test/itkTestingStretchIntensityImageFilterTest.cxx @@ -31,7 +31,7 @@ itkTestingStretchIntensityImageFilterTest(int itkNotUsed(argc), char * itkNotUse using StatsFilterType = itk::StatisticsImageFilter; constexpr ImageType::SizeType imageSize = { { 32, 32 } }; - auto image = ImageType::New(); + auto image = ImageType::New(); image->SetRegions(imageSize); image->Allocate(); PixelType i = -511; @@ -46,8 +46,8 @@ itkTestingStretchIntensityImageFilterTest(int itkNotUsed(argc), char * itkNotUse stretchFilter->SetInput(image); - int outputMinimumPixelValue = 16384; - int outputMaximumPixelValue = -5000; + int outputMinimumPixelValue = 16384; + int outputMaximumPixelValue = -5000; PixelType outputMinPix(outputMinimumPixelValue); PixelType outputMaxPix(outputMaximumPixelValue); stretchFilter->SetOutputMinimum(outputMinPix); diff --git a/Modules/Core/Transform/include/itkAffineTransform.h b/Modules/Core/Transform/include/itkAffineTransform.h index f89329daba2..bb19b3651b2 100644 --- a/Modules/Core/Transform/include/itkAffineTransform.h +++ b/Modules/Core/Transform/include/itkAffineTransform.h @@ -275,7 +275,7 @@ class ITK_TEMPLATE_EXPORT AffineTransform * omitted, then the AffineTransform is initialized to an identity * transformation in the appropriate number of dimensions. */ #if !defined(ITK_LEGACY_REMOVE) - [[deprecated("Removed unused constructor")]] AffineTransform(const MatrixType & matrix, + [[deprecated("Removed unused constructor")]] AffineTransform(const MatrixType & matrix, const OutputVectorType & offset); #endif AffineTransform(unsigned int parametersDimension); diff --git a/Modules/Core/Transform/include/itkAffineTransform.hxx b/Modules/Core/Transform/include/itkAffineTransform.hxx index d31c52d02e0..4a9efb7e8d7 100644 --- a/Modules/Core/Transform/include/itkAffineTransform.hxx +++ b/Modules/Core/Transform/include/itkAffineTransform.hxx @@ -36,7 +36,7 @@ AffineTransform::AffineTransform(unsigned int #if !defined(ITK_LEGACY_REMOVE) template -AffineTransform::AffineTransform(const MatrixType & matrix, +AffineTransform::AffineTransform(const MatrixType & matrix, const OutputVectorType & offset) : Superclass(matrix, offset) {} @@ -171,8 +171,8 @@ AffineTransform::Rotate2D(TParametersValueType template void AffineTransform::Rotate3D(const OutputVectorType & axis, - TParametersValueType angle, - bool pre) + TParametersValueType angle, + bool pre) { // Convert the axis to a unit vector const ScalarType r = std::sqrt(axis[0] * axis[0] + axis[1] * axis[1] + axis[2] * axis[2]); diff --git a/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.h b/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.h index fa7ad79f801..62930389456 100644 --- a/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.h +++ b/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.h @@ -131,16 +131,16 @@ class ITK_TEMPLATE_EXPORT AzimuthElevationToCartesianTransform void SetAzimuthElevationToCartesianParameters(const double sampleSize, const double firstSampleDistance, - const long maxAzimuth, - const long maxElevation, + const long maxAzimuth, + const long maxElevation, const double azimuthAngleSeparation, const double elevationAngleSeparation); void SetAzimuthElevationToCartesianParameters(const double sampleSize, const double firstSampleDistance, - const long maxAzimuth, - const long maxElevation); + const long maxAzimuth, + const long maxElevation); /** Transform from azimuth-elevation to cartesian. */ OutputPointType @@ -238,13 +238,13 @@ class ITK_TEMPLATE_EXPORT AzimuthElevationToCartesianTransform PrintSelf(std::ostream & os, Indent indent) const override; private: - long m_MaxAzimuth{}; - long m_MaxElevation{}; + long m_MaxAzimuth{}; + long m_MaxElevation{}; double m_RadiusSampleSize{}; double m_AzimuthAngularSeparation{}; double m_ElevationAngularSeparation{}; double m_FirstSampleDistance{}; - bool m_ForwardAzimuthElevationToPhysical{}; + bool m_ForwardAzimuthElevationToPhysical{}; }; // class AzimuthElevationToCartesianTransform } // namespace itk diff --git a/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.hxx b/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.hxx index 0eed576a8b0..f925352668c 100644 --- a/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.hxx +++ b/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.hxx @@ -39,7 +39,7 @@ AzimuthElevationToCartesianTransform::AzimuthE template void AzimuthElevationToCartesianTransform::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -75,7 +75,7 @@ auto AzimuthElevationToCartesianTransform::TransformAzElToCartesian( const InputPointType & point) const -> OutputPointType { - OutputPointType result; + OutputPointType result; const ScalarType Azimuth = ((2 * itk::Math::pi) / 360) * (point[0] * m_AzimuthAngularSeparation - ((m_MaxAzimuth - 1) / 2.0)); const ScalarType Elevation = @@ -110,8 +110,8 @@ void AzimuthElevationToCartesianTransform::SetAzimuthElevationToCartesianParameters( const double sampleSize, const double firstSampleDistance, - const long maxAzimuth, - const long maxElevation, + const long maxAzimuth, + const long maxElevation, const double azimuthAngleSeparation, const double elevationAngleSeparation) { @@ -128,8 +128,8 @@ void AzimuthElevationToCartesianTransform::SetAzimuthElevationToCartesianParameters( const double sampleSize, const double firstSampleDistance, - const long maxAzimuth, - const long maxElevation) + const long maxAzimuth, + const long maxElevation) { SetAzimuthElevationToCartesianParameters(sampleSize, firstSampleDistance, maxAzimuth, maxElevation, 1.0, 1.0); } diff --git a/Modules/Core/Transform/include/itkBSplineBaseTransform.h b/Modules/Core/Transform/include/itkBSplineBaseTransform.h index 0960434f73f..c6c2503025b 100644 --- a/Modules/Core/Transform/include/itkBSplineBaseTransform.h +++ b/Modules/Core/Transform/include/itkBSplineBaseTransform.h @@ -249,11 +249,11 @@ class ITK_TEMPLATE_EXPORT BSplineBaseTransform : public TransformGetNumberOfParametersPerDimension() ) to the indices array. */ virtual void - TransformPoint(const InputPointType & inputPoint, - OutputPointType & outputPoint, - WeightsType & weights, + TransformPoint(const InputPointType & inputPoint, + OutputPointType & outputPoint, + WeightsType & weights, ParameterIndexArrayType & indices, - bool & inside) const = 0; + bool & inside) const = 0; #if !defined(ITK_LEGACY_REMOVE) /** Get number of weights. */ diff --git a/Modules/Core/Transform/include/itkBSplineBaseTransform.hxx b/Modules/Core/Transform/include/itkBSplineBaseTransform.hxx index dcd985f54b0..630f3202338 100644 --- a/Modules/Core/Transform/include/itkBSplineBaseTransform.hxx +++ b/Modules/Core/Transform/include/itkBSplineBaseTransform.hxx @@ -119,7 +119,7 @@ template ::UpdateTransformParameters( const DerivativeType & update, - TParametersValueType factor) + TParametersValueType factor) { const NumberOfParametersType numberOfParameters = this->GetNumberOfParameters(); @@ -179,7 +179,7 @@ BSplineBaseTransform::WrapAsImag * NOTE: For efficiency, parameters are not copied locally. The parameters * are assumed to be maintained by the caller. */ - auto * dataPointer = const_cast(this->m_InternalParametersBuffer.data_block()); + auto * dataPointer = const_cast(this->m_InternalParametersBuffer.data_block()); const NumberOfParametersType numberOfPixels = this->GetNumberOfParametersPerDimension(); for (unsigned int j = 0; j < SpaceDimension; ++j) @@ -229,8 +229,8 @@ BSplineBaseTransform::PrintSelf( template void BSplineBaseTransform:: - ComputeJacobianFromBSplineWeightsWithRespectToPosition(const InputPointType & point, - WeightsType & weights, + ComputeJacobianFromBSplineWeightsWithRespectToPosition(const InputPointType & point, + WeightsType & weights, ParameterIndexArrayType & indexes) const { ContinuousIndexType index = @@ -250,13 +250,13 @@ BSplineBaseTransform:: this->m_WeightsFunction->Evaluate(index, weights, supportIndex); // For each dimension, copy the weight to the support region - constexpr auto supportSize = SizeType::Filled(SplineOrder + 1); + constexpr auto supportSize = SizeType::Filled(SplineOrder + 1); const RegionType supportRegion(supportIndex, supportSize); - unsigned long counter = 0; + unsigned long counter = 0; using IteratorType = ImageRegionIterator; - IteratorType coeffIterator(this->m_CoefficientImages[0], supportRegion); + IteratorType coeffIterator(this->m_CoefficientImages[0], supportRegion); const ParametersValueType * basePointer = this->m_CoefficientImages[0]->GetBufferPointer(); while (!coeffIterator.IsAtEnd()) { @@ -297,10 +297,10 @@ auto BSplineBaseTransform::TransformPoint(const InputPointType & point) const -> OutputPointType { - WeightsType weights; + WeightsType weights; ParameterIndexArrayType indices; - OutputPointType outputPoint; - bool inside; + OutputPointType outputPoint; + bool inside; this->TransformPoint(point, outputPoint, weights, indices, inside); diff --git a/Modules/Core/Transform/include/itkBSplineDeformableTransform.h b/Modules/Core/Transform/include/itkBSplineDeformableTransform.h index fc917133503..10d9f12fdc0 100644 --- a/Modules/Core/Transform/include/itkBSplineDeformableTransform.h +++ b/Modules/Core/Transform/include/itkBSplineDeformableTransform.h @@ -132,7 +132,7 @@ class ITK_TEMPLATE_EXPORT BSplineDeformableTransform CreateAnother() const override { itk::LightObject::Pointer smartPtr; - const Pointer copyPtr = Self::New().GetPointer(); + const Pointer copyPtr = Self::New().GetPointer(); // THE FOLLOWING LINE IS DIFFERENT FROM THE DEFAULT MACRO! copyPtr->m_BulkTransform = this->GetBulkTransform(); smartPtr = static_cast(copyPtr); @@ -251,11 +251,11 @@ class ITK_TEMPLATE_EXPORT BSplineDeformableTransform */ using Superclass::TransformPoint; void - TransformPoint(const InputPointType & inputPoint, - OutputPointType & outputPoint, - WeightsType & weights, + TransformPoint(const InputPointType & inputPoint, + OutputPointType & outputPoint, + WeightsType & weights, ParameterIndexArrayType & indices, - bool & inside) const override; + bool & inside) const override; void ComputeJacobianWithRespectToParameters(const InputPointType &, JacobianType &) const override; @@ -353,9 +353,9 @@ class ITK_TEMPLATE_EXPORT BSplineDeformableTransform * through the pointers (although it does enforce some * internal class synchronization). */ - const RegionType & m_GridRegion{}; - const OriginType & m_GridOrigin{}; - const SpacingType & m_GridSpacing{}; + const RegionType & m_GridRegion{}; + const OriginType & m_GridOrigin{}; + const SpacingType & m_GridSpacing{}; const DirectionType & m_GridDirection; /** The bulk transform. */ @@ -365,9 +365,9 @@ class ITK_TEMPLATE_EXPORT BSplineDeformableTransform /** Variables defining the interpolation support region. */ unsigned long m_Offset{}; - bool m_SplineOrderOdd{}; - IndexType m_ValidRegionLast{}; - IndexType m_ValidRegionFirst{}; + bool m_SplineOrderOdd{}; + IndexType m_ValidRegionLast{}; + IndexType m_ValidRegionFirst{}; void UpdateValidGridRegion(); diff --git a/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx b/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx index ac0a388edd5..36d6f3ed095 100644 --- a/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx +++ b/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx @@ -108,7 +108,7 @@ BSplineDeformableTransform::Upda // Where offset = floor(spline / 2 ). // Note that the last pixel is not included in the valid region // with odd spline orders. - typename RegionType::SizeType size; + typename RegionType::SizeType size; typename RegionType::IndexType index; for (unsigned int j = 0; j < VDimension; ++j) { @@ -412,7 +412,7 @@ BSplineDeformableTransform::SetC template void BSplineDeformableTransform::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { this->Superclass::PrintSelf(os, indent); @@ -462,11 +462,11 @@ BSplineDeformableTransform::Insi template void BSplineDeformableTransform::TransformPoint( - const InputPointType & inputPoint, - OutputPointType & outputPoint, - WeightsType & weights, + const InputPointType & inputPoint, + OutputPointType & outputPoint, + WeightsType & weights, ParameterIndexArrayType & indices, - bool & inside) const + bool & inside) const { inside = true; @@ -504,8 +504,8 @@ BSplineDeformableTransform::Tran outputPoint.Fill(ScalarType{}); using IteratorType = ImageScanlineConstIterator; - IteratorType coeffIterator[SpaceDimension]; - unsigned long counter = 0; + IteratorType coeffIterator[SpaceDimension]; + unsigned long counter = 0; const ParametersValueType * basePointer = this->m_CoefficientImages[0]->GetBufferPointer(); for (unsigned int j = 0; j < SpaceDimension; ++j) { @@ -550,7 +550,7 @@ template ::ComputeJacobianWithRespectToParameters( const InputPointType & point, - JacobianType & jacobian) const + JacobianType & jacobian) const { // Zero all components of jacobian jacobian.SetSize(SpaceDimension, this->GetNumberOfParameters()); @@ -580,7 +580,7 @@ BSplineDeformableTransform::Comp const IndexType startIndex = this->m_CoefficientImages[0]->GetLargestPossibleRegion().GetIndex(); const SizeType & MeshGridSize = this->m_GridRegion.GetSize(); - SizeType cumulativeGridSizes; + SizeType cumulativeGridSizes; cumulativeGridSizes[0] = (MeshGridSize[0]); for (unsigned int d = 1; d < SpaceDimension; ++d) { diff --git a/Modules/Core/Transform/include/itkBSplineTransform.h b/Modules/Core/Transform/include/itkBSplineTransform.h index e6970c031b9..bb4e1808678 100644 --- a/Modules/Core/Transform/include/itkBSplineTransform.h +++ b/Modules/Core/Transform/include/itkBSplineTransform.h @@ -232,11 +232,11 @@ class ITK_TEMPLATE_EXPORT BSplineTransform : public BSplineBaseTransform::BSplineTransfo constexpr OriginType meshOrigin{}; - auto meshPhysical = MakeFilled(1.0); + auto meshPhysical = MakeFilled(1.0); DirectionType meshDirection; meshDirection.SetIdentity(); @@ -163,7 +163,7 @@ auto BSplineTransform::GetTransformDomainPhysicalDimensions() const -> PhysicalDimensionsType { - const MeshSizeType size = this->GetTransformDomainMeshSize(); + const MeshSizeType size = this->GetTransformDomainMeshSize(); PhysicalDimensionsType physicalDim; for (unsigned int i = 0; i < VDimension; ++i) { @@ -287,10 +287,10 @@ BSplineTransform::SetFixedParame template void BSplineTransform::SetFixedParametersFromTransformDomainInformation( - const OriginType & meshOrigin, + const OriginType & meshOrigin, const PhysicalDimensionsType & meshPhysical, - const DirectionType & meshDirection, - const MeshSizeType & meshSize) + const DirectionType & meshDirection, + const MeshSizeType & meshSize) { // Set the grid size parameters @@ -507,11 +507,11 @@ BSplineTransform::InsideValidReg template void -BSplineTransform::TransformPoint(const InputPointType & point, - OutputPointType & outputPoint, - WeightsType & weights, +BSplineTransform::TransformPoint(const InputPointType & point, + OutputPointType & outputPoint, + WeightsType & weights, ParameterIndexArrayType & indices, - bool & inside) const + bool & inside) const { inside = true; @@ -535,14 +535,14 @@ BSplineTransform::TransformPoint this->m_WeightsFunction->Evaluate(index, weights, supportIndex); // For each dimension, correlate coefficient with weights - constexpr auto supportSize = SizeType::Filled(SplineOrder + 1); + constexpr auto supportSize = SizeType::Filled(SplineOrder + 1); const RegionType supportRegion(supportIndex, supportSize); outputPoint.Fill(ScalarType{}); using IteratorType = ImageScanlineConstIterator; - IteratorType coeffIterator[SpaceDimension]; - unsigned long counter = 0; + IteratorType coeffIterator[SpaceDimension]; + unsigned long counter = 0; const ParametersValueType * basePointer = this->m_CoefficientImages[0]->GetBufferPointer(); for (unsigned int j = 0; j < SpaceDimension; ++j) { @@ -596,7 +596,7 @@ template ::ComputeJacobianWithRespectToParameters( const InputPointType & point, - JacobianType & jacobian) const + JacobianType & jacobian) const { // Zero all components of jacobian jacobian.SetSize(SpaceDimension, this->GetNumberOfParameters()); @@ -626,7 +626,7 @@ BSplineTransform::ComputeJacobia const IndexType startIndex = this->m_CoefficientImages[0]->GetLargestPossibleRegion().GetIndex(); const MeshSizeType meshSize = this->GetTransformDomainMeshSize(); - SizeType cumulativeGridSizes; + SizeType cumulativeGridSizes; cumulativeGridSizes[0] = (meshSize[0] + SplineOrder); for (unsigned int d = 1; d < SpaceDimension; ++d) { diff --git a/Modules/Core/Transform/include/itkBSplineTransformInitializer.h b/Modules/Core/Transform/include/itkBSplineTransformInitializer.h index f0e8eb122d0..cb48d77174d 100644 --- a/Modules/Core/Transform/include/itkBSplineTransformInitializer.h +++ b/Modules/Core/Transform/include/itkBSplineTransformInitializer.h @@ -111,11 +111,11 @@ class ITK_TEMPLATE_EXPORT BSplineTransformInitializer : public Object PrintSelf(std::ostream & os, Indent indent) const override; private: - ImagePointer m_Image{}; + ImagePointer m_Image{}; TransformPointer m_Transform{}; MeshSizeType m_TransformDomainMeshSize{ MeshSizeType::Filled(1) }; - bool m_SetTransformDomainMeshSizeViaInitializer{ false }; + bool m_SetTransformDomainMeshSizeViaInitializer{ false }; }; // class BSplineTransformInitializer } // namespace itk diff --git a/Modules/Core/Transform/include/itkBSplineTransformInitializer.hxx b/Modules/Core/Transform/include/itkBSplineTransformInitializer.hxx index 24dec9a03f4..38507990f84 100644 --- a/Modules/Core/Transform/include/itkBSplineTransformInitializer.hxx +++ b/Modules/Core/Transform/include/itkBSplineTransformInitializer.hxx @@ -56,9 +56,9 @@ BSplineTransformInitializer::InitializeTransform() const itkExceptionMacro("Image dimensionality does not match the transform."); } - OriginType transformDomainOrigin; + OriginType transformDomainOrigin; PhysicalDimensionsType transformDomainPhysicalDimensions; - DirectionType transformDomainDirection; + DirectionType transformDomainDirection; // Determine the image corners. We keep track of the relative location of // the corners using a binary labeling system. For example, in a 3-D @@ -137,7 +137,7 @@ BSplineTransformInitializer::InitializeTransform() const transformDomainOrigin.Fill(0); PointIdentifier transformDomainOriginId = 0; - RealType minDistance = NumericTraits::max(); + RealType minDistance = NumericTraits::max(); for (unsigned int d = 0; d < cornerPoints->GetNumberOfPoints(); ++d) { @@ -163,7 +163,7 @@ BSplineTransformInitializer::InitializeTransform() const // axis. PointIdentifier minCornerId[SpaceDimension]; - double minAngle[SpaceDimension]; + double minAngle[SpaceDimension]; for (unsigned int d = 0; d < SpaceDimension; ++d) { diff --git a/Modules/Core/Transform/include/itkCenteredAffineTransform.hxx b/Modules/Core/Transform/include/itkCenteredAffineTransform.hxx index 485bcbcd326..03b360981db 100644 --- a/Modules/Core/Transform/include/itkCenteredAffineTransform.hxx +++ b/Modules/Core/Transform/include/itkCenteredAffineTransform.hxx @@ -119,7 +119,7 @@ template void CenteredAffineTransform::ComputeJacobianWithRespectToParameters( const InputPointType & p, - JacobianType & jacobian) const + JacobianType & jacobian) const { // The Jacobian of the affine transform is composed of // subblocks of diagonal matrices, each one of them having diff --git a/Modules/Core/Transform/include/itkCenteredEuler3DTransform.hxx b/Modules/Core/Transform/include/itkCenteredEuler3DTransform.hxx index ca2e7f26c46..207ca54b227 100644 --- a/Modules/Core/Transform/include/itkCenteredEuler3DTransform.hxx +++ b/Modules/Core/Transform/include/itkCenteredEuler3DTransform.hxx @@ -35,7 +35,7 @@ CenteredEuler3DTransform::CenteredEuler3DTransform(unsigne // Constructor with default arguments template -CenteredEuler3DTransform::CenteredEuler3DTransform(const MatrixType & matrix, +CenteredEuler3DTransform::CenteredEuler3DTransform(const MatrixType & matrix, const OutputPointType & offset) : Superclass(matrix, offset) {} diff --git a/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.hxx b/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.hxx index 93b2c435aef..6b8257eb6ef 100644 --- a/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.hxx +++ b/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.hxx @@ -113,7 +113,7 @@ template void CenteredSimilarity2DTransform::ComputeJacobianWithRespectToParameters( const InputPointType & p, - JacobianType & jacobian) const + JacobianType & jacobian) const { const double angle = this->GetAngle(); const double ca = std::cos(angle); @@ -123,8 +123,8 @@ CenteredSimilarity2DTransform::ComputeJacobianWithRespectT jacobian.Fill(0.0); const InputPointType center = this->GetCenter(); - const double cx = center[0]; - const double cy = center[1]; + const double cx = center[0]; + const double cy = center[1]; // derivatives with respect to the scale jacobian[0][0] = ca * (p[0] - cx) - sa * (p[1] - cy); diff --git a/Modules/Core/Transform/include/itkComposeScaleSkewVersor3DTransform.h b/Modules/Core/Transform/include/itkComposeScaleSkewVersor3DTransform.h index 0486c869d3e..2f29c738686 100644 --- a/Modules/Core/Transform/include/itkComposeScaleSkewVersor3DTransform.h +++ b/Modules/Core/Transform/include/itkComposeScaleSkewVersor3DTransform.h @@ -153,7 +153,7 @@ class ITK_TEMPLATE_EXPORT ComposeScaleSkewVersor3DTransform : public VersorRigid protected: ComposeScaleSkewVersor3DTransform(); #if !defined(ITK_LEGACY_REMOVE) - [[deprecated("Removed unused constructor")]] ComposeScaleSkewVersor3DTransform(const MatrixType & matrix, + [[deprecated("Removed unused constructor")]] ComposeScaleSkewVersor3DTransform(const MatrixType & matrix, const OutputVectorType & offset); #endif ComposeScaleSkewVersor3DTransform(unsigned int parametersDimension); diff --git a/Modules/Core/Transform/include/itkComposeScaleSkewVersor3DTransform.hxx b/Modules/Core/Transform/include/itkComposeScaleSkewVersor3DTransform.hxx index e48eefa9ead..798de2f70c9 100644 --- a/Modules/Core/Transform/include/itkComposeScaleSkewVersor3DTransform.hxx +++ b/Modules/Core/Transform/include/itkComposeScaleSkewVersor3DTransform.hxx @@ -47,7 +47,7 @@ ComposeScaleSkewVersor3DTransform::ComposeScaleSkewVersor3 // Constructor with arguments template ComposeScaleSkewVersor3DTransform::ComposeScaleSkewVersor3DTransform( - const MatrixType & matrix, + const MatrixType & matrix, const OutputVectorType & offset) : Superclass(matrix, offset) { @@ -67,7 +67,7 @@ ComposeScaleSkewVersor3DTransform::SetMatrix(const MatrixT template void -ComposeScaleSkewVersor3DTransform::SetMatrix(const MatrixType & matrix, +ComposeScaleSkewVersor3DTransform::SetMatrix(const MatrixType & matrix, const TParametersValueType itkNotUsed(tolerance)) { // Any matrix should work - bypass orthogonality testing @@ -308,7 +308,7 @@ template void ComposeScaleSkewVersor3DTransform::ComputeJacobianWithRespectToParameters( const InputPointType & p, - JacobianType & jacobian) const + JacobianType & jacobian) const { // Jacobian computed via // pip install sympy diff --git a/Modules/Core/Transform/include/itkCompositeTransform.h b/Modules/Core/Transform/include/itkCompositeTransform.h index f3615c60901..b86f00eb664 100644 --- a/Modules/Core/Transform/include/itkCompositeTransform.h +++ b/Modules/Core/Transform/include/itkCompositeTransform.h @@ -288,7 +288,7 @@ class ITK_TEMPLATE_EXPORT CompositeTransform : public MultiTransform::TransformVector(const Inpu template auto CompositeTransform::TransformVector(const InputVectorType & inputVector, - const InputPointType & inputPoint) const + const InputPointType & inputPoint) const -> OutputVectorType { OutputVectorType outputVector(inputVector); - OutputPointType outputPoint(inputPoint); + OutputPointType outputPoint(inputPoint); /* Apply in reverse queue order. */ for (auto it = this->m_TransformQueue.rbegin(); it != this->m_TransformQueue.rend(); ++it) @@ -113,11 +113,11 @@ CompositeTransform::TransformVector(const Inpu template auto CompositeTransform::TransformVector(const InputVnlVectorType & inputVector, - const InputPointType & inputPoint) const + const InputPointType & inputPoint) const -> OutputVnlVectorType { OutputVnlVectorType outputVector(inputVector); - OutputPointType outputPoint(inputPoint); + OutputPointType outputPoint(inputPoint); /* Apply in reverse queue order. */ for (auto it = this->m_TransformQueue.rbegin(); it != this->m_TransformQueue.rend(); ++it) @@ -167,11 +167,11 @@ CompositeTransform::TransformVector(const Inpu template auto CompositeTransform::TransformVector(const InputVectorPixelType & inputVector, - const InputPointType & inputPoint) const + const InputPointType & inputPoint) const -> OutputVectorPixelType { OutputVectorPixelType outputVector(inputVector); - OutputPointType outputPoint(inputPoint); + OutputPointType outputPoint(inputPoint); /* Apply in reverse queue order. */ for (auto it = this->m_TransformQueue.rbegin(); it != this->m_TransformQueue.rend(); ++it) @@ -205,10 +205,10 @@ template auto CompositeTransform::TransformCovariantVector( const InputCovariantVectorType & inputVector, - const InputPointType & inputPoint) const -> OutputCovariantVectorType + const InputPointType & inputPoint) const -> OutputCovariantVectorType { OutputCovariantVectorType outputVector(inputVector); - OutputPointType outputPoint(inputPoint); + OutputPointType outputPoint(inputPoint); /* Apply in reverse queue order. */ for (auto it = this->m_TransformQueue.rbegin(); it != this->m_TransformQueue.rend(); ++it) @@ -245,7 +245,7 @@ CompositeTransform::TransformCovariantVector(c -> OutputVectorPixelType { OutputVectorPixelType outputVector(inputVector); - OutputPointType outputPoint(inputPoint); + OutputPointType outputPoint(inputPoint); /* Apply in reverse queue order. */ for (auto it = this->m_TransformQueue.rbegin(); it != this->m_TransformQueue.rend(); ++it) @@ -262,10 +262,10 @@ template auto CompositeTransform::TransformDiffusionTensor3D( const InputDiffusionTensor3DType & inputTensor, - const InputPointType & inputPoint) const -> OutputDiffusionTensor3DType + const InputPointType & inputPoint) const -> OutputDiffusionTensor3DType { OutputDiffusionTensor3DType outputTensor(inputTensor); - OutputPointType outputPoint(inputPoint); + OutputPointType outputPoint(inputPoint); /* Apply in reverse queue order. */ for (auto it = this->m_TransformQueue.rbegin(); it != this->m_TransformQueue.rend(); ++it) @@ -282,10 +282,10 @@ template auto CompositeTransform::TransformDiffusionTensor3D( const InputVectorPixelType & inputTensor, - const InputPointType & inputPoint) const -> OutputVectorPixelType + const InputPointType & inputPoint) const -> OutputVectorPixelType { OutputVectorPixelType outputTensor(inputTensor); - OutputPointType outputPoint(inputPoint); + OutputPointType outputPoint(inputPoint); /* Apply in reverse queue order. */ for (auto it = this->m_TransformQueue.rbegin(); it != this->m_TransformQueue.rend(); ++it) @@ -336,10 +336,10 @@ template auto CompositeTransform::TransformSymmetricSecondRankTensor( const InputSymmetricSecondRankTensorType & inputTensor, - const InputPointType & inputPoint) const -> OutputSymmetricSecondRankTensorType + const InputPointType & inputPoint) const -> OutputSymmetricSecondRankTensorType { OutputSymmetricSecondRankTensorType outputTensor(inputTensor); - OutputPointType outputPoint(inputPoint); + OutputPointType outputPoint(inputPoint); /* Apply in reverse queue order. */ for (auto it = this->m_TransformQueue.rbegin(); it != this->m_TransformQueue.rend(); ++it) @@ -356,10 +356,10 @@ template auto CompositeTransform::TransformSymmetricSecondRankTensor( const InputVectorPixelType & inputTensor, - const InputPointType & inputPoint) const -> OutputVectorPixelType + const InputPointType & inputPoint) const -> OutputVectorPixelType { OutputVectorPixelType outputTensor(inputTensor); - OutputPointType outputPoint(inputPoint); + OutputPointType outputPoint(inputPoint); /* Apply in reverse queue order. */ for (auto it = this->m_TransformQueue.rbegin(); it != this->m_TransformQueue.rend(); ++it) @@ -454,7 +454,7 @@ template void CompositeTransform::ComputeJacobianWithRespectToParameters( const InputPointType & p, - JacobianType & outJacobian) const + JacobianType & outJacobian) const { /* Returns a concatenated MxN array, holding the Jacobian of each sub * transform that is selected for optimization. The order is the same @@ -470,8 +470,8 @@ template void CompositeTransform::ComputeJacobianWithRespectToParametersCachedTemporaries( const InputPointType & p, - JacobianType & outJacobian, - JacobianType & cacheJacobian) const + JacobianType & outJacobian, + JacobianType & cacheJacobian) const { // NOTE: This must have been done outside of outJacobian.SetSize( VDimension, this->GetNumberOfLocalParameters() ); assert(outJacobian.rows() == VDimension && outJacobian.cols() == this->GetNumberOfLocalParameters()); @@ -662,7 +662,7 @@ CompositeTransform::SetParameters(const Parame else { NumberOfParametersType offset{}; - auto it = transforms.end(); + auto it = transforms.end(); do { @@ -822,7 +822,7 @@ CompositeTransform::GetNumberOfFixedParameters template void CompositeTransform::UpdateTransformParameters(const DerivativeType & update, - ScalarType factor) + ScalarType factor) { /* Update parameters within the sub-transforms set to be optimized. */ /* NOTE: We might want to thread this over each sub-transform, if we @@ -899,8 +899,8 @@ template void CompositeTransform::FlattenTransformQueue() { - TransformQueueType transformQueue; - TransformQueueType transformsToOptimizeQueue; + TransformQueueType transformQueue; + TransformQueueType transformsToOptimizeQueue; TransformsToOptimizeFlagsType transformsToOptimizeFlags; for (SizeValueType m = 0; m < this->GetNumberOfTransforms(); ++m) @@ -979,7 +979,7 @@ CompositeTransform::InternalClone() const // TODO: is it really the right behavior? // LightObject::Pointer loPtr = Superclass::InternalClone(); - LightObject::Pointer loPtr = CreateAnother(); + LightObject::Pointer loPtr = CreateAnother(); const typename Self::Pointer clone = dynamic_cast(loPtr.GetPointer()); if (clone.IsNull()) { diff --git a/Modules/Core/Transform/include/itkElasticBodyReciprocalSplineKernelTransform.hxx b/Modules/Core/Transform/include/itkElasticBodyReciprocalSplineKernelTransform.hxx index 06c6911b990..6fec6f6b3db 100644 --- a/Modules/Core/Transform/include/itkElasticBodyReciprocalSplineKernelTransform.hxx +++ b/Modules/Core/Transform/include/itkElasticBodyReciprocalSplineKernelTransform.hxx @@ -54,7 +54,7 @@ ElasticBodyReciprocalSplineKernelTransform::Co template void ElasticBodyReciprocalSplineKernelTransform::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Core/Transform/include/itkElasticBodySplineKernelTransform.hxx b/Modules/Core/Transform/include/itkElasticBodySplineKernelTransform.hxx index f0987c86276..93779f5dc90 100644 --- a/Modules/Core/Transform/include/itkElasticBodySplineKernelTransform.hxx +++ b/Modules/Core/Transform/include/itkElasticBodySplineKernelTransform.hxx @@ -30,7 +30,7 @@ ElasticBodySplineKernelTransform::ElasticBodyS template void ElasticBodySplineKernelTransform::ComputeG(const InputVectorType & x, - GMatrixType & gmatrix) const + GMatrixType & gmatrix) const { const TParametersValueType r = x.GetNorm(); const TParametersValueType factor = -3.0 * r; diff --git a/Modules/Core/Transform/include/itkEuler3DTransform.h b/Modules/Core/Transform/include/itkEuler3DTransform.h index 962f54bc159..02111adbe26 100644 --- a/Modules/Core/Transform/include/itkEuler3DTransform.h +++ b/Modules/Core/Transform/include/itkEuler3DTransform.h @@ -165,7 +165,7 @@ class ITK_TEMPLATE_EXPORT Euler3DTransform : public Rigid3DTransform::ComputeMatrix() { // need to check if angles are in the right order - const ScalarType cx = std::cos(m_AngleX); - const ScalarType sx = std::sin(m_AngleX); - const ScalarType cy = std::cos(m_AngleY); - const ScalarType sy = std::sin(m_AngleY); - const ScalarType cz = std::cos(m_AngleZ); - const ScalarType sz = std::sin(m_AngleZ); - const ScalarType one = NumericTraits::OneValue(); + const ScalarType cx = std::cos(m_AngleX); + const ScalarType sx = std::sin(m_AngleX); + const ScalarType cy = std::cos(m_AngleY); + const ScalarType sy = std::sin(m_AngleY); + const ScalarType cz = std::cos(m_AngleZ); + const ScalarType sz = std::sin(m_AngleZ); + const ScalarType one = NumericTraits::OneValue(); constexpr ScalarType zero{}; Matrix RotationX; @@ -285,7 +285,7 @@ Euler3DTransform::ComputeMatrix() template void Euler3DTransform::ComputeJacobianWithRespectToParameters(const InputPointType & p, - JacobianType & jacobian) const + JacobianType & jacobian) const { // need to check if angles are in the right order const double cx = std::cos(m_AngleX); diff --git a/Modules/Core/Transform/include/itkFixedCenterOfRotationAffineTransform.h b/Modules/Core/Transform/include/itkFixedCenterOfRotationAffineTransform.h index b85cd10fa61..54f06f596c5 100644 --- a/Modules/Core/Transform/include/itkFixedCenterOfRotationAffineTransform.h +++ b/Modules/Core/Transform/include/itkFixedCenterOfRotationAffineTransform.h @@ -120,7 +120,7 @@ class ITK_TEMPLATE_EXPORT FixedCenterOfRotationAffineTransform protected: /** Construct an FixedCenterOfRotationAffineTransform object */ #if !defined(ITK_LEGACY_REMOVE) - [[deprecated("Removed unused constructor")]] FixedCenterOfRotationAffineTransform(const MatrixType & matrix, + [[deprecated("Removed unused constructor")]] FixedCenterOfRotationAffineTransform(const MatrixType & matrix, const OutputVectorType & offset); #endif FixedCenterOfRotationAffineTransform(unsigned int outputSpaceDims, unsigned int paramsDims); diff --git a/Modules/Core/Transform/include/itkFixedCenterOfRotationAffineTransform.hxx b/Modules/Core/Transform/include/itkFixedCenterOfRotationAffineTransform.hxx index 381785f268a..326ca422f6c 100644 --- a/Modules/Core/Transform/include/itkFixedCenterOfRotationAffineTransform.hxx +++ b/Modules/Core/Transform/include/itkFixedCenterOfRotationAffineTransform.hxx @@ -40,7 +40,7 @@ FixedCenterOfRotationAffineTransform::FixedCen #if !defined(ITK_LEGACY_REMOVE) template FixedCenterOfRotationAffineTransform::FixedCenterOfRotationAffineTransform( - const MatrixType & matrix, + const MatrixType & matrix, const OutputVectorType & offset) : Superclass(matrix, offset) {} diff --git a/Modules/Core/Transform/include/itkKernelTransform.hxx b/Modules/Core/Transform/include/itkKernelTransform.hxx index 2c3cd7f34bf..5b338dc9587 100644 --- a/Modules/Core/Transform/include/itkKernelTransform.hxx +++ b/Modules/Core/Transform/include/itkKernelTransform.hxx @@ -90,7 +90,7 @@ KernelTransform::ComputeReflexiveG(PointsItera template void KernelTransform::ComputeDeformationContribution(const InputPointType & thisPoint, - OutputPointType & result) const + OutputPointType & result) const { /* * Default implementation of the the method. This can be overloaded @@ -123,8 +123,8 @@ KernelTransform::ComputeD() { const PointIdentifier numberOfLandmarks = this->m_SourceLandmarks->GetNumberOfPoints(); - PointsIterator sp = this->m_SourceLandmarks->GetPoints()->Begin(); - PointsIterator tp = this->m_TargetLandmarks->GetPoints()->Begin(); + PointsIterator sp = this->m_SourceLandmarks->GetPoints()->Begin(); + PointsIterator tp = this->m_TargetLandmarks->GetPoints()->Begin(); const PointsIterator end = this->m_SourceLandmarks->GetPoints()->End(); this->m_Displacements->Reserve(numberOfLandmarks); @@ -191,7 +191,7 @@ KernelTransform::ComputeK() this->m_KMatrix.fill(0.0); - PointsIterator p1 = this->m_SourceLandmarks->GetPoints()->Begin(); + PointsIterator p1 = this->m_SourceLandmarks->GetPoints()->Begin(); const PointsIterator end = this->m_SourceLandmarks->GetPoints()->End(); GMatrixType G; @@ -201,7 +201,7 @@ KernelTransform::ComputeK() while (p1 != end) { PointsIterator p2 = p1; // start at the diagonal element - unsigned int j = i; + unsigned int j = i; // Compute the block diagonal element, i.e. kernel for pi->pi G = this->ComputeReflexiveG(p1); @@ -234,7 +234,7 @@ template void KernelTransform::ComputeP() { - const PointIdentifier numberOfLandmarks = this->m_SourceLandmarks->GetNumberOfPoints(); + const PointIdentifier numberOfLandmarks = this->m_SourceLandmarks->GetNumberOfPoints(); const vnl_matrix I{ IMatrixType().set_identity().as_matrix() }; InputPointType p{}; @@ -376,16 +376,16 @@ KernelTransform::SetParameters(const Parameter // Save parameters. Needed for proper operation of TransformUpdateParameters. if (¶meters != &(this->m_Parameters)) { - const size_t parameterSize = this->GetParameters().Size(); + const size_t parameterSize = this->GetParameters().Size(); constexpr NumberOfParametersType offset{}; this->CopyInParameters(&(parameters.data_block())[offset], &(parameters.data_block())[offset] + parameterSize); } - auto landmarks = PointsContainer::New(); + auto landmarks = PointsContainer::New(); const unsigned int numberOfLandmarks = parameters.Size() / VDimension; landmarks->Reserve(numberOfLandmarks); - PointsIterator itr = landmarks->Begin(); + PointsIterator itr = landmarks->Begin(); const PointsIterator end = landmarks->End(); InputPointType landMark; @@ -420,12 +420,12 @@ KernelTransform::SetFixedParameters(const Fixe // setting of the target landmarks, and allowing the Transform // I/O mechanism to be supported. - auto landmarks = PointsContainer::New(); + auto landmarks = PointsContainer::New(); const unsigned int numberOfLandmarks = parameters.Size() / VDimension; landmarks->Reserve(numberOfLandmarks); - PointsIterator itr = landmarks->Begin(); + PointsIterator itr = landmarks->Begin(); const PointsIterator end = landmarks->End(); InputPointType landMark; @@ -452,7 +452,7 @@ KernelTransform::UpdateParameters() const { this->m_Parameters = ParametersType(this->m_SourceLandmarks->GetNumberOfPoints() * VDimension); - PointsIterator itr = this->m_SourceLandmarks->GetPoints()->Begin(); + PointsIterator itr = this->m_SourceLandmarks->GetPoints()->Begin(); const PointsIterator end = this->m_SourceLandmarks->GetPoints()->End(); unsigned int pcounter = 0; @@ -487,7 +487,7 @@ KernelTransform::GetFixedParameters() const -> // This was added to support the Transform Reader/Writer mechanism this->m_FixedParameters = ParametersType(this->m_TargetLandmarks->GetNumberOfPoints() * VDimension); - PointsIterator itr = this->m_TargetLandmarks->GetPoints()->Begin(); + PointsIterator itr = this->m_TargetLandmarks->GetPoints()->Begin(); const PointsIterator end = this->m_TargetLandmarks->GetPoints()->End(); unsigned int pcounter = 0; diff --git a/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.h b/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.h index 854cbe434e1..970cfb1467f 100644 --- a/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.h +++ b/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.h @@ -453,7 +453,7 @@ class ITK_TEMPLATE_EXPORT MatrixOffsetTransformBase * the inverse of the current Matrix. jac will be resized as needed, but it's * more efficient if it's already properly sized. */ void - ComputeInverseJacobianWithRespectToPosition(const InputPointType & x, + ComputeInverseJacobianWithRespectToPosition(const InputPointType & x, InverseJacobianPositionType & jac) const override; using Superclass::ComputeInverseJacobianWithRespectToPosition; @@ -508,7 +508,7 @@ class ITK_TEMPLATE_EXPORT MatrixOffsetTransformBase * omitted, then the MatrixOffsetTransformBase is initialized to an identity * transformation in the appropriate number of dimensions. */ #if !defined(ITK_LEGACY_REMOVE) - [[deprecated("Removed unused constructor")]] MatrixOffsetTransformBase(const MatrixType & matrix, + [[deprecated("Removed unused constructor")]] MatrixOffsetTransformBase(const MatrixType & matrix, const OutputVectorType & offset); #endif explicit MatrixOffsetTransformBase(unsigned int paramDims = ParametersDimension); @@ -584,16 +584,16 @@ class ITK_TEMPLATE_EXPORT MatrixOffsetTransformBase itkGetConstMacro(Singular, bool); private: - MatrixType m_Matrix{ MatrixType::GetIdentity() }; // Matrix of the transformation - OutputVectorType m_Offset{}; // Offset of the transformation + MatrixType m_Matrix{ MatrixType::GetIdentity() }; // Matrix of the transformation + OutputVectorType m_Offset{}; // Offset of the transformation mutable InverseMatrixType m_InverseMatrix{ InverseMatrixType::GetIdentity() }; // Inverse of the matrix - mutable bool m_Singular{ false }; // Is m_Inverse singular? + mutable bool m_Singular{ false }; // Is m_Inverse singular? - InputPointType m_Center{}; + InputPointType m_Center{}; OutputVectorType m_Translation{}; /** To avoid recomputation of the inverse if not needed */ - TimeStamp m_MatrixMTime{}; + TimeStamp m_MatrixMTime{}; mutable TimeStamp m_InverseMatrixMTime{}; }; // class MatrixOffsetTransformBase } // namespace itk diff --git a/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx b/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx index 3f7747078b1..70a3175a891 100644 --- a/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx +++ b/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx @@ -40,7 +40,7 @@ MatrixOffsetTransformBase MatrixOffsetTransformBase::MatrixOffsetTransformBase( - const MatrixType & matrix, + const MatrixType & matrix, const OutputVectorType & offset) : m_Matrix(matrix) , m_Offset(offset) @@ -98,7 +98,7 @@ MatrixOffsetTransformBase void MatrixOffsetTransformBase::Compose(const Self * other, - bool pre) + bool pre) { if (pre) { @@ -172,7 +172,7 @@ MatrixOffsetTransformBase tvect = vnl_mat * vnl_vect; - OutputVectorPixelType outVect; + OutputVectorPixelType outVect; outVect.SetSize(vectorDim); for (unsigned int i = 0; i < vectorDim; ++i) { @@ -234,7 +234,7 @@ MatrixOffsetTransformBase tvect = vnl_mat * vnl_vect; - OutputVectorPixelType outVect; + OutputVectorPixelType outVect; outVect.SetSize(vectorDim); for (unsigned int i = 0; i < vectorDim; ++i) { @@ -281,7 +281,7 @@ MatrixOffsetTransformBase::UpdateTransformParameters( const DerivativeType & update, - ScalarType factor) + ScalarType factor) { /* Update parameters within the sub-transforms. */ /* NOTE: We might want to thread this over each sub-transform, if we diff --git a/Modules/Core/Transform/include/itkQuaternionRigidTransform.h b/Modules/Core/Transform/include/itkQuaternionRigidTransform.h index 1b2ff7731a3..088c93316e3 100644 --- a/Modules/Core/Transform/include/itkQuaternionRigidTransform.h +++ b/Modules/Core/Transform/include/itkQuaternionRigidTransform.h @@ -136,7 +136,7 @@ class ITK_TEMPLATE_EXPORT QuaternionRigidTransform : public Rigid3DTransform::QuaternionRigidTransform(unsigne #if !defined(ITK_LEGACY_REMOVE) // Constructor with explicit arguments template -QuaternionRigidTransform::QuaternionRigidTransform(const MatrixType & matrix, +QuaternionRigidTransform::QuaternionRigidTransform(const MatrixType & matrix, const OutputVectorType & offset) : Superclass(matrix, offset) { @@ -119,7 +119,7 @@ auto QuaternionRigidTransform::GetParameters() const -> const ParametersType & { VnlQuaternionType quaternion = this->GetRotation(); - OutputVectorType translation = this->GetTranslation(); + OutputVectorType translation = this->GetTranslation(); // Transfer the quaternion part unsigned int par = 0; diff --git a/Modules/Core/Transform/include/itkRigid2DTransform.hxx b/Modules/Core/Transform/include/itkRigid2DTransform.hxx index 4d5fb5345ae..9e45d60ef28 100644 --- a/Modules/Core/Transform/include/itkRigid2DTransform.hxx +++ b/Modules/Core/Transform/include/itkRigid2DTransform.hxx @@ -94,8 +94,8 @@ Rigid2DTransform::ComputeMatrixParameters() { // Extract the orthogonal part of the matrix // - MatrixType p{ this->GetMatrix().GetVnlMatrix() }; - vnl_svd svd{ (p.GetVnlMatrix()).as_ref() }; + MatrixType p{ this->GetMatrix().GetVnlMatrix() }; + vnl_svd svd{ (p.GetVnlMatrix()).as_ref() }; vnl_matrix r{ svd.U() * svd.V().transpose() }; m_Angle = std::acos(r[0][0]); @@ -276,7 +276,7 @@ Rigid2DTransform::GetParameters() const -> const Parameter template void Rigid2DTransform::ComputeJacobianWithRespectToParameters(const InputPointType & p, - JacobianType & j) const + JacobianType & j) const { j.SetSize(OutputSpaceDimension, this->GetNumberOfLocalParameters()); j.Fill(0.0); diff --git a/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.hxx b/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.hxx index 4a8a451ebcb..5bd95cc51fc 100644 --- a/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.hxx +++ b/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.hxx @@ -140,7 +140,7 @@ Rigid3DPerspectiveTransform::SetRotation(const VersorType template void Rigid3DPerspectiveTransform::SetRotation(const Vector & axis, - double angle) + double angle) { VersorType v; v.Set(axis, angle); @@ -152,7 +152,7 @@ template auto Rigid3DPerspectiveTransform::TransformPoint(const InputPointType & point) const -> OutputPointType { - unsigned int i; + unsigned int i; InputPointType centered; for (i = 0; i < 3; ++i) diff --git a/Modules/Core/Transform/include/itkRigid3DTransform.h b/Modules/Core/Transform/include/itkRigid3DTransform.h index 66315e00dad..544032f0c5d 100644 --- a/Modules/Core/Transform/include/itkRigid3DTransform.h +++ b/Modules/Core/Transform/include/itkRigid3DTransform.h @@ -151,13 +151,13 @@ class ITK_TEMPLATE_EXPORT Rigid3DTransform : public MatrixOffsetTransformBase::GetTolerance()); protected: #if !defined(ITK_LEGACY_REMOVE) - [[deprecated("Removed unused constructor")]] Rigid3DTransform(const MatrixType & matrix, + [[deprecated("Removed unused constructor")]] Rigid3DTransform(const MatrixType & matrix, const OutputVectorType & offset); #endif Rigid3DTransform(unsigned int paramDim); diff --git a/Modules/Core/Transform/include/itkRigid3DTransform.hxx b/Modules/Core/Transform/include/itkRigid3DTransform.hxx index 3a2d3b6f49c..caca85aaff3 100644 --- a/Modules/Core/Transform/include/itkRigid3DTransform.hxx +++ b/Modules/Core/Transform/include/itkRigid3DTransform.hxx @@ -52,7 +52,7 @@ Rigid3DTransform::PrintSelf(std::ostream & os, Indent inde // Check if input matrix is orthogonal to within tolerance template bool -Rigid3DTransform::MatrixIsOrthogonal(const MatrixType & matrix, +Rigid3DTransform::MatrixIsOrthogonal(const MatrixType & matrix, const TParametersValueType tolerance) { const typename MatrixType::InternalMatrixType test = matrix.GetVnlMatrix() * matrix.GetTranspose(); @@ -97,8 +97,8 @@ Rigid3DTransform::SetParameters(const ParametersType & par this->m_Parameters = parameters; } - unsigned int par = 0; - MatrixType matrix; + unsigned int par = 0; + MatrixType matrix; OutputVectorType translation; for (unsigned int row = 0; row < 3; ++row) diff --git a/Modules/Core/Transform/include/itkScalableAffineTransform.h b/Modules/Core/Transform/include/itkScalableAffineTransform.h index 62575106dd9..eefcc725544 100644 --- a/Modules/Core/Transform/include/itkScalableAffineTransform.h +++ b/Modules/Core/Transform/include/itkScalableAffineTransform.h @@ -137,7 +137,7 @@ class ITK_TEMPLATE_EXPORT ScalableAffineTransform : public AffineTransform::ScalableAffineTransfo #if !defined(ITK_LEGACY_REMOVE) template -ScalableAffineTransform::ScalableAffineTransform(const MatrixType & matrix, +ScalableAffineTransform::ScalableAffineTransform(const MatrixType & matrix, const OutputVectorType & offset) : Superclass(matrix, offset) { @@ -163,7 +163,7 @@ ScalableAffineTransform::ComputeMatrix() } if (scaleChanged) { - MatrixType mat; + MatrixType mat; typename MatrixType::InternalMatrixType & imat = mat.GetVnlMatrix(); for (unsigned int i = 0; i < VDimension; ++i) { diff --git a/Modules/Core/Transform/include/itkScaleLogarithmicTransform.hxx b/Modules/Core/Transform/include/itkScaleLogarithmicTransform.hxx index 9b11689ef9f..2ad263a0fa8 100644 --- a/Modules/Core/Transform/include/itkScaleLogarithmicTransform.hxx +++ b/Modules/Core/Transform/include/itkScaleLogarithmicTransform.hxx @@ -75,7 +75,7 @@ template void ScaleLogarithmicTransform::ComputeJacobianWithRespectToParameters( const InputPointType & p, - JacobianType & jacobian) const + JacobianType & jacobian) const { const ScaleType & scales = this->GetScale(); diff --git a/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.h b/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.h index 1a84f9580b3..0b96a41681a 100644 --- a/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.h +++ b/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.h @@ -156,7 +156,7 @@ class ITK_TEMPLATE_EXPORT ScaleSkewVersor3DTransform : public VersorRigid3DTrans protected: ScaleSkewVersor3DTransform(); #if !defined(ITK_LEGACY_REMOVE) - [[deprecated("Removed unused constructor")]] ScaleSkewVersor3DTransform(const MatrixType & matrix, + [[deprecated("Removed unused constructor")]] ScaleSkewVersor3DTransform(const MatrixType & matrix, const OutputVectorType & offset); #endif ScaleSkewVersor3DTransform(unsigned int parametersDimension); diff --git a/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.hxx b/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.hxx index 75a9b204fde..72a856e1ab5 100644 --- a/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.hxx +++ b/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.hxx @@ -43,7 +43,7 @@ ScaleSkewVersor3DTransform::ScaleSkewVersor3DTransform(uns #if !defined(ITK_LEGACY_REMOVE) // Constructor with arguments template -ScaleSkewVersor3DTransform::ScaleSkewVersor3DTransform(const MatrixType & matrix, +ScaleSkewVersor3DTransform::ScaleSkewVersor3DTransform(const MatrixType & matrix, const OutputVectorType & offset) : Superclass(matrix, offset) { @@ -63,7 +63,7 @@ ScaleSkewVersor3DTransform::SetMatrix(const MatrixType & m template void -ScaleSkewVersor3DTransform::SetMatrix(const MatrixType & matrix, +ScaleSkewVersor3DTransform::SetMatrix(const MatrixType & matrix, const TParametersValueType itkNotUsed(tolerance)) { // Any matrix should work - bypass orthogonality testing diff --git a/Modules/Core/Transform/include/itkScaleTransform.hxx b/Modules/Core/Transform/include/itkScaleTransform.hxx index 8ef488a62c8..aa36d0e3771 100644 --- a/Modules/Core/Transform/include/itkScaleTransform.hxx +++ b/Modules/Core/Transform/include/itkScaleTransform.hxx @@ -106,7 +106,7 @@ template auto ScaleTransform::TransformPoint(const InputPointType & point) const -> OutputPointType { - OutputPointType result; + OutputPointType result; const InputPointType & center = this->GetCenter(); for (unsigned int i = 0; i < SpaceDimension; ++i) @@ -201,7 +201,7 @@ ScaleTransform::SetIdentity() template void ScaleTransform::ComputeJacobianWithRespectToParameters(const InputPointType & p, - JacobianType & j) const + JacobianType & j) const { j.SetSize(SpaceDimension, this->GetNumberOfLocalParameters()); j.Fill(0.0); @@ -257,7 +257,7 @@ template inline auto ScaleTransform::BackTransform(const OutputPointType & point) const -> InputPointType { - InputPointType result; + InputPointType result; const InputPointType & center = this->GetCenter(); for (unsigned int i = 0; i < SpaceDimension; ++i) diff --git a/Modules/Core/Transform/include/itkScaleVersor3DTransform.h b/Modules/Core/Transform/include/itkScaleVersor3DTransform.h index 65f9d879d86..b5d9fa77e6e 100644 --- a/Modules/Core/Transform/include/itkScaleVersor3DTransform.h +++ b/Modules/Core/Transform/include/itkScaleVersor3DTransform.h @@ -140,7 +140,7 @@ class ITK_TEMPLATE_EXPORT ScaleVersor3DTransform : public VersorRigid3DTransform protected: ScaleVersor3DTransform(); #if !defined(ITK_LEGACY_REMOVE) - [[deprecated("Removed unused constructor")]] ScaleVersor3DTransform(const MatrixType & matrix, + [[deprecated("Removed unused constructor")]] ScaleVersor3DTransform(const MatrixType & matrix, const OutputVectorType & offset); #endif ScaleVersor3DTransform(unsigned int parametersDimension); diff --git a/Modules/Core/Transform/include/itkScaleVersor3DTransform.hxx b/Modules/Core/Transform/include/itkScaleVersor3DTransform.hxx index a2249516183..05650e5c5a2 100644 --- a/Modules/Core/Transform/include/itkScaleVersor3DTransform.hxx +++ b/Modules/Core/Transform/include/itkScaleVersor3DTransform.hxx @@ -40,7 +40,7 @@ ScaleVersor3DTransform::ScaleVersor3DTransform(unsigned in #if !defined(ITK_LEGACY_REMOVE) // Constructor with arguments template -ScaleVersor3DTransform::ScaleVersor3DTransform(const MatrixType & matrix, +ScaleVersor3DTransform::ScaleVersor3DTransform(const MatrixType & matrix, const OutputVectorType & offset) : Superclass(matrix, offset) { @@ -60,7 +60,7 @@ ScaleVersor3DTransform::SetMatrix(const MatrixType & matri template void -ScaleVersor3DTransform::SetMatrix(const MatrixType & matrix, +ScaleVersor3DTransform::SetMatrix(const MatrixType & matrix, const TParametersValueType itkNotUsed(tolerance)) { // Any matrix should work - bypass orthogonality testing diff --git a/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx b/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx index 570cafb74dc..e37eaab374e 100644 --- a/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx +++ b/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx @@ -182,8 +182,8 @@ Similarity2DTransform::ComputeJacobianWithRespectToParamet jacobian.Fill(0.0); const InputPointType center = this->GetCenter(); - const double cx = center[0]; - const double cy = center[1]; + const double cx = center[0]; + const double cy = center[1]; // derivatives with respect to the scale jacobian[0][0] = ca * (p[0] - cx) - sa * (p[1] - cy); diff --git a/Modules/Core/Transform/include/itkSimilarity3DTransform.h b/Modules/Core/Transform/include/itkSimilarity3DTransform.h index abd687f8ee2..6125cc69ee0 100644 --- a/Modules/Core/Transform/include/itkSimilarity3DTransform.h +++ b/Modules/Core/Transform/include/itkSimilarity3DTransform.h @@ -141,7 +141,7 @@ class ITK_TEMPLATE_EXPORT Similarity3DTransform : public VersorRigid3DTransform< protected: #if !defined(ITK_LEGACY_REMOVE) - [[deprecated("Removed unused constructor")]] Similarity3DTransform(const MatrixType & matrix, + [[deprecated("Removed unused constructor")]] Similarity3DTransform(const MatrixType & matrix, const OutputVectorType & offset); #endif Similarity3DTransform(unsigned int paramDim); diff --git a/Modules/Core/Transform/include/itkSimilarity3DTransform.hxx b/Modules/Core/Transform/include/itkSimilarity3DTransform.hxx index 53052417b31..253840aea42 100644 --- a/Modules/Core/Transform/include/itkSimilarity3DTransform.hxx +++ b/Modules/Core/Transform/include/itkSimilarity3DTransform.hxx @@ -40,7 +40,7 @@ Similarity3DTransform::Similarity3DTransform(unsigned int #if !defined(ITK_LEGACY_REMOVE) // Constructor with arguments template -Similarity3DTransform::Similarity3DTransform(const MatrixType & matrix, +Similarity3DTransform::Similarity3DTransform(const MatrixType & matrix, const OutputVectorType & offset) : Superclass(matrix, offset) , m_Scale(1.0) diff --git a/Modules/Core/Transform/include/itkThinPlateR2LogRSplineKernelTransform.hxx b/Modules/Core/Transform/include/itkThinPlateR2LogRSplineKernelTransform.hxx index fa93ee76121..6c8fffa3332 100644 --- a/Modules/Core/Transform/include/itkThinPlateR2LogRSplineKernelTransform.hxx +++ b/Modules/Core/Transform/include/itkThinPlateR2LogRSplineKernelTransform.hxx @@ -23,7 +23,7 @@ namespace itk template void ThinPlateR2LogRSplineKernelTransform::ComputeG(const InputVectorType & x, - GMatrixType & gmatrix) const + GMatrixType & gmatrix) const { const TParametersValueType r = x.GetNorm(); @@ -37,7 +37,7 @@ template void ThinPlateR2LogRSplineKernelTransform::ComputeDeformationContribution( const InputPointType & thisPoint, - OutputPointType & result) const + OutputPointType & result) const { const unsigned long numberOfLandmarks = this->m_SourceLandmarks->GetNumberOfPoints(); @@ -45,7 +45,7 @@ ThinPlateR2LogRSplineKernelTransform::ComputeD for (unsigned int lnd = 0; lnd < numberOfLandmarks; ++lnd) { - const InputVectorType position = thisPoint - sp->Value(); + const InputVectorType position = thisPoint - sp->Value(); const TParametersValueType r = position.GetNorm(); const TParametersValueType R2logR = (r > 1e-8) ? r * r * std::log(r) : TParametersValueType{}; for (unsigned int odim = 0; odim < VDimension; ++odim) diff --git a/Modules/Core/Transform/include/itkThinPlateSplineKernelTransform.hxx b/Modules/Core/Transform/include/itkThinPlateSplineKernelTransform.hxx index de480e4e880..fed3e34621d 100644 --- a/Modules/Core/Transform/include/itkThinPlateSplineKernelTransform.hxx +++ b/Modules/Core/Transform/include/itkThinPlateSplineKernelTransform.hxx @@ -23,7 +23,7 @@ namespace itk template void ThinPlateSplineKernelTransform::ComputeG(const InputVectorType & x, - GMatrixType & gmatrix) const + GMatrixType & gmatrix) const { const TParametersValueType r = x.GetNorm(); @@ -38,7 +38,7 @@ template void ThinPlateSplineKernelTransform::ComputeDeformationContribution( const InputPointType & thisPoint, - OutputPointType & result) const + OutputPointType & result) const { const unsigned long numberOfLandmarks = this->m_SourceLandmarks->GetNumberOfPoints(); @@ -46,7 +46,7 @@ ThinPlateSplineKernelTransform::ComputeDeforma for (unsigned int lnd = 0; lnd < numberOfLandmarks; ++lnd) { - const InputVectorType position = thisPoint - sp->Value(); + const InputVectorType position = thisPoint - sp->Value(); const TParametersValueType r = position.GetNorm(); for (unsigned int odim = 0; odim < VDimension; ++odim) diff --git a/Modules/Core/Transform/include/itkTransform.h b/Modules/Core/Transform/include/itkTransform.h index b2fe825d2fd..d17fa0b8e2f 100644 --- a/Modules/Core/Transform/include/itkTransform.h +++ b/Modules/Core/Transform/include/itkTransform.h @@ -298,7 +298,7 @@ class ITK_TEMPLATE_EXPORT Transform : public TransformBaseTemplateComputeJacobianWithRespectToParameters(p, jacobian); @@ -541,7 +541,7 @@ class ITK_TEMPLATE_EXPORT Transform : public TransformBaseTemplate::UpdateTransformParameters( const DerivativeType & update, - ParametersValueType factor) + ParametersValueType factor) { const NumberOfParametersType numberOfParameters = this->GetNumberOfParameters(); @@ -122,7 +122,7 @@ Transform::UpdateTransf template auto Transform::TransformVector(const InputVectorType & vector, - const InputPointType & point) const + const InputPointType & point) const -> OutputVectorType { JacobianPositionType jacobian; @@ -198,7 +198,7 @@ template ::TransformCovariantVector( const InputCovariantVectorType & vector, - const InputPointType & point) const -> OutputCovariantVectorType + const InputPointType & point) const -> OutputCovariantVectorType { InverseJacobianPositionType jacobian; this->ComputeInverseJacobianWithRespectToPosition(point, jacobian); @@ -220,7 +220,7 @@ template ::TransformCovariantVector( const InputVectorPixelType & vector, - const InputPointType & point) const -> OutputVectorPixelType + const InputPointType & point) const -> OutputVectorPixelType { if (vector.GetSize() != VInputDimension) @@ -251,7 +251,7 @@ template ::TransformDiffusionTensor3D( const InputDiffusionTensor3DType & inputTensor, - const InputPointType & point) const -> OutputDiffusionTensor3DType + const InputPointType & point) const -> OutputDiffusionTensor3DType { InverseJacobianPositionType invJacobian; this->ComputeInverseJacobianWithRespectToPosition(point, invJacobian); @@ -267,7 +267,7 @@ template ::TransformDiffusionTensor3D( const InputVectorPixelType & inputTensor, - const InputPointType & point) const -> OutputVectorPixelType + const InputPointType & point) const -> OutputVectorPixelType { if (inputTensor.GetSize() != 6) { @@ -296,7 +296,7 @@ Transform::TransformDif template typename Transform::OutputDiffusionTensor3DType Transform:: - PreservationOfPrincipalDirectionDiffusionTensor3DReorientation(const InputDiffusionTensor3DType & inputTensor, + PreservationOfPrincipalDirectionDiffusionTensor3DReorientation(const InputDiffusionTensor3DType & inputTensor, const InverseJacobianPositionType & jacobian) const { Matrix matrix{}; @@ -316,7 +316,7 @@ Transform:: } } - typename InputDiffusionTensor3DType::EigenValuesArrayType eigenValues; + typename InputDiffusionTensor3DType::EigenValuesArrayType eigenValues; typename InputDiffusionTensor3DType::EigenVectorsMatrixType eigenVectors; inputTensor.ComputeEigenAnalysis(eigenValues, eigenVectors); @@ -379,7 +379,7 @@ template ::TransformSymmetricSecondRankTensor( const InputSymmetricSecondRankTensorType & inputTensor, - const InputPointType & point) const -> OutputSymmetricSecondRankTensorType + const InputPointType & point) const -> OutputSymmetricSecondRankTensorType { JacobianPositionType jacobian; this->ComputeJacobianWithRespectToPosition(point, jacobian); @@ -396,7 +396,7 @@ Transform::TransformSym } } - JacobianType outTensor = jacobian * tensor * invJacobian; + JacobianType outTensor = jacobian * tensor * invJacobian; OutputSymmetricSecondRankTensorType outputTensor; for (unsigned int i = 0; i < VOutputDimension; ++i) @@ -415,7 +415,7 @@ template ::TransformSymmetricSecondRankTensor( const InputVectorPixelType & inputTensor, - const InputPointType & point) const -> OutputVectorPixelType + const InputPointType & point) const -> OutputVectorPixelType { if (inputTensor.GetSize() != (VInputDimension * VInputDimension)) @@ -475,7 +475,7 @@ Transform::ApplyToImage origin = inverse->TransformPoint(origin); image->SetOrigin(origin); - typename ImageType::SpacingType spacing = image->GetSpacing(); + typename ImageType::SpacingType spacing = image->GetSpacing(); typename ImageType::DirectionType direction = image->GetDirection(); // transform direction cosines and compute new spacing for (unsigned int i = 0; i < ImageType::ImageDimension; ++i) @@ -505,7 +505,7 @@ template ::ComputeJacobianWithRespectToPosition( const InputPointType & pnt, - JacobianType & jacobian) const + JacobianType & jacobian) const { JacobianPositionType jacobian_fixed; this->ComputeJacobianWithRespectToPosition(pnt, jacobian_fixed); @@ -517,7 +517,7 @@ template ::ComputeInverseJacobianWithRespectToPosition( const InputPointType & pnt, - JacobianType & jacobian) const + JacobianType & jacobian) const { InverseJacobianPositionType jacobian_fixed; this->ComputeInverseJacobianWithRespectToPosition(pnt, jacobian_fixed); @@ -529,7 +529,7 @@ Transform::ComputeInver template void Transform::ComputeInverseJacobianWithRespectToPosition( - const InputPointType & pnt, + const InputPointType & pnt, InverseJacobianPositionType & jacobian) const { JacobianPositionType forward_jacobian; diff --git a/Modules/Core/Transform/include/itkTransformBase.h b/Modules/Core/Transform/include/itkTransformBase.h index e5991088798..731dca8a931 100644 --- a/Modules/Core/Transform/include/itkTransformBase.h +++ b/Modules/Core/Transform/include/itkTransformBase.h @@ -54,7 +54,7 @@ class TransformBaseTemplateEnums }; // Define how to print enumeration extern ITKTransform_EXPORT std::ostream & - operator<<(std::ostream & out, const TransformBaseTemplateEnums::TransformCategory value); +operator<<(std::ostream & out, const TransformBaseTemplateEnums::TransformCategory value); /** \class TransformBaseTemplate * * This class is an abstract class to represent a spatial transform. diff --git a/Modules/Core/Transform/include/itkTranslationTransform.h b/Modules/Core/Transform/include/itkTranslationTransform.h index bb951052e76..e6cb023c01e 100644 --- a/Modules/Core/Transform/include/itkTranslationTransform.h +++ b/Modules/Core/Transform/include/itkTranslationTransform.h @@ -251,7 +251,7 @@ class ITK_TEMPLATE_EXPORT TranslationTransform : public Transform::VersorRigid3DTransform(unsigned in #if !defined(ITK_LEGACY_REMOVE) // Constructor with arguments template -VersorRigid3DTransform::VersorRigid3DTransform(const MatrixType & matrix, +VersorRigid3DTransform::VersorRigid3DTransform(const MatrixType & matrix, const OutputVectorType & offset) : Superclass(matrix, offset) {} @@ -124,7 +124,7 @@ VersorRigid3DTransform::GetParameters() const -> const Par template void VersorRigid3DTransform::UpdateTransformParameters(const DerivativeType & update, - TParametersValueType factor) + TParametersValueType factor) { const SizeValueType numberOfParameters = this->GetNumberOfParameters(); @@ -171,7 +171,7 @@ VersorRigid3DTransform::UpdateTransformParameters(const De // of a particular length along the versor gradient // direction. - VersorType gradientRotation; + VersorType gradientRotation; const TParametersValueType norm = axis.GetNorm(); if (Math::FloatAlmostEqual(norm, 0.0)) { diff --git a/Modules/Core/Transform/include/itkVersorTransform.h b/Modules/Core/Transform/include/itkVersorTransform.h index 13dedf257d8..cb085be8c50 100644 --- a/Modules/Core/Transform/include/itkVersorTransform.h +++ b/Modules/Core/Transform/include/itkVersorTransform.h @@ -136,7 +136,7 @@ class ITK_TEMPLATE_EXPORT VersorTransform : public Rigid3DTransform::ComputeMatrixParameters() template void VersorTransform::ComputeJacobianWithRespectToParameters(const InputPointType & p, - JacobianType & jacobian) const + JacobianType & jacobian) const { using ValueType = typename VersorType::ValueType; diff --git a/Modules/Core/Transform/include/itkVolumeSplineKernelTransform.hxx b/Modules/Core/Transform/include/itkVolumeSplineKernelTransform.hxx index 84bf7d63888..dc5ae2434c0 100644 --- a/Modules/Core/Transform/include/itkVolumeSplineKernelTransform.hxx +++ b/Modules/Core/Transform/include/itkVolumeSplineKernelTransform.hxx @@ -23,7 +23,7 @@ namespace itk template void VolumeSplineKernelTransform::ComputeG(const InputVectorType & x, - GMatrixType & gmatrix) const + GMatrixType & gmatrix) const { const TParametersValueType r = x.GetNorm(); @@ -39,7 +39,7 @@ template void VolumeSplineKernelTransform::ComputeDeformationContribution( const InputPointType & thisPoint, - OutputPointType & result) const + OutputPointType & result) const { const unsigned long numberOfLandmarks = this->m_SourceLandmarks->GetNumberOfPoints(); @@ -47,7 +47,7 @@ VolumeSplineKernelTransform::ComputeDeformatio for (unsigned int lnd = 0; lnd < numberOfLandmarks; ++lnd) { - const InputVectorType position = thisPoint - sp->Value(); + const InputVectorType position = thisPoint - sp->Value(); const TParametersValueType r = position.GetNorm(); const TParametersValueType r3 = r * r * r; diff --git a/Modules/Core/Transform/test/itkAffineTransformTest.cxx b/Modules/Core/Transform/test/itkAffineTransformTest.cxx index 1e655c55b48..df575f46f1d 100644 --- a/Modules/Core/Transform/test/itkAffineTransformTest.cxx +++ b/Modules/Core/Transform/test/itkAffineTransformTest.cxx @@ -84,7 +84,7 @@ template bool testVariableVector(const TVector & v1, const TVector & v2, int maxUlps = 4) { - bool pass = true; + bool pass = true; const unsigned int D1 = v1.Size(); const unsigned int D2 = v2.Size(); @@ -124,7 +124,7 @@ itkAffineTransformTest(int, char *[]) /* Create a 2D identity transformation and show its parameters */ using Affine2DType = itk::AffineTransform; - auto id2 = Affine2DType::New(); + auto id2 = Affine2DType::New(); Matrix2Type matrix2 = id2->GetMatrix(); Vector2Type vector2 = id2->GetOffset(); std::cout << "Matrix from instantiating an identity transform:" << std::endl << matrix2; @@ -343,7 +343,7 @@ itkAffineTransformTest(int, char *[]) /* Transform a point */ const itk::Point u2({ 3, 5 }); - itk::Point v2 = aff2->TransformPoint(u2); + itk::Point v2 = aff2->TransformPoint(u2); std::cout << "Transform a point:" << std::endl << v2[0] << " , " << v2[1] << std::endl; itk::Point v2T({ 41.37, 26.254 }); @@ -360,7 +360,7 @@ itkAffineTransformTest(int, char *[]) /* Transform a vnl_vector */ const vnl_vector_fixed x2{ 1, 2 }; - vnl_vector_fixed y2 = aff2->TransformVector(x2); + vnl_vector_fixed y2 = aff2->TransformVector(x2); std::cout << "Transform a vnl_vector:" << std::endl << y2[0] << " , " << y2[1] << std::endl; @@ -378,7 +378,7 @@ itkAffineTransformTest(int, char *[]) /* Transform a vector */ const itk::Vector u3({ 3, 5 }); - itk::Vector v3 = aff2->TransformVector(u3); + itk::Vector v3 = aff2->TransformVector(u3); std::cout << "Transform a vector:" << std::endl << v3[0] << " , " << v3[1] << std::endl; itk::Vector v3T({ 35.37, 22.254 }); @@ -469,7 +469,7 @@ itkAffineTransformTest(int, char *[]) /* Create a 3D transform and rotate in 3D */ const itk::Vector axis({ .707, .707, .707 }); - auto aff3 = Affine3DType::New(); + auto aff3 = Affine3DType::New(); aff3->Rotate3D(axis, 1.0, true); std::cout << "Create and rotate a 3D transform:" << std::endl; aff3->Print(std::cout); @@ -547,7 +547,7 @@ itkAffineTransformTest(int, char *[]) constexpr double data[] = { 5, 10, 15, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 5, 10, 15, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 5, 10, 15, 0, 0, 1 }; - const vnl_matrix vnlData(data, 3, 12); + const vnl_matrix vnlData(data, 3, 12); Affine3DType::JacobianType expectedJacobian(vnlData); for (unsigned int i = 0; i < 3; ++i) { @@ -621,7 +621,7 @@ itkAffineTransformTest(int, char *[]) paff->Print(std::cout); Affine3DType::ParametersType parameters1(paff->GetNumberOfParameters()); Affine3DType::ParametersType fixed_parameters = paff->GetFixedParameters(); - const size_t fixed_params_size = fixed_parameters.Size(); + const size_t fixed_params_size = fixed_parameters.Size(); for (unsigned int q = 0; q < fixed_params_size; ++q) { fixed_parameters[q] = 100.0 + q; @@ -678,7 +678,7 @@ itkAffineTransformTest(int, char *[]) } { Affine3DType::ParametersType fixed_parameters_inv_inv = paff_inv_inv->GetFixedParameters(); - double mag_error = 0; + double mag_error = 0; for (unsigned int q = 0; q < fixed_parameters_inv_inv.size(); ++q) { const double v = (fixed_parameters[q] - fixed_parameters_inv_inv[q]); diff --git a/Modules/Core/Transform/test/itkAzimuthElevationToCartesianTransformTest.cxx b/Modules/Core/Transform/test/itkAzimuthElevationToCartesianTransformTest.cxx index 20e4bf50728..ec4bac283ad 100644 --- a/Modules/Core/Transform/test/itkAzimuthElevationToCartesianTransformTest.cxx +++ b/Modules/Core/Transform/test/itkAzimuthElevationToCartesianTransformTest.cxx @@ -83,7 +83,7 @@ itkAzimuthElevationToCartesianTransformTest(int argc, char * argv[]) transform->SetAzimuthElevationToCartesianParameters(1.0, 5.0, 45, 45); // test a bunch of points in all quadrants and those that could create exceptions - PointType q; + PointType q; std::vector p; q[0] = 1; diff --git a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest.cxx b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest.cxx index 13e1f1a5c54..5dd90c28428 100644 --- a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest.cxx +++ b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest.cxx @@ -63,7 +63,7 @@ itkBSplineDeformableTransformTest1() using RegionType = TransformType::RegionType; RegionType region; - auto size = RegionType::SizeType::Filled(10); + auto size = RegionType::SizeType::Filled(10); region.SetSize(size); std::cout << region << std::endl; @@ -97,7 +97,7 @@ itkBSplineDeformableTransformTest1() * Allocate memory for the parameters */ const unsigned long numberOfParameters = transform->GetNumberOfParameters(); - ParametersType parameters(numberOfParameters); + ParametersType parameters(numberOfParameters); parameters.Fill(ParametersType::ValueType{}); /** @@ -109,8 +109,8 @@ itkBSplineDeformableTransformTest1() using CoefficientImageType = itk::Image; CoefficientImageType::Pointer coeffImages[SpaceDimension]; - const unsigned int numberOfControlPoints = region.GetNumberOfPixels(); - CoefficientType * dataPointer = parameters.data_block(); + const unsigned int numberOfControlPoints = region.GetNumberOfPixels(); + CoefficientType * dataPointer = parameters.data_block(); for (auto & it : coeffImages) { it = CoefficientImageType::New(); @@ -211,9 +211,9 @@ itkBSplineDeformableTransformTest1() using WeightsType = TransformType::WeightsType; using IndexArrayType = TransformType::ParameterIndexArrayType; - WeightsType weights; + WeightsType weights; IndexArrayType indices; - bool inside; + bool inside; inputPoint.Fill(8.3); transform->TransformPoint(inputPoint, outputPoint, weights, indices, inside); @@ -230,9 +230,9 @@ itkBSplineDeformableTransformTest1() // cycling through all the parameters and weights used in the previous // transformation constexpr unsigned int numberOfCoefficientInSupportRegion = TransformType::NumberOfWeights; - const unsigned int numberOfParametersPerDimension = transform->GetNumberOfParametersPerDimension(); - unsigned int linearIndex; - unsigned int baseIndex; + const unsigned int numberOfParametersPerDimension = transform->GetNumberOfParametersPerDimension(); + unsigned int linearIndex; + unsigned int baseIndex; std::cout << "Index" << '\t' << "Value" << '\t' << "Weight" << std::endl; for (unsigned int j = 0; j < SpaceDimension; ++j) @@ -416,7 +416,7 @@ itkBSplineDeformableTransformTest1() transform2->SetParameters(parameters); transform2->SetIdentity(); TransformType::ParametersType parameters2 = transform2->GetParameters(); - const unsigned int numberOfParameters2 = transform2->GetNumberOfParameters(); + const unsigned int numberOfParameters2 = transform2->GetNumberOfParameters(); std::cout << "numberOfParameters = " << numberOfParameters2 << std::endl; for (unsigned int i = 0; i < numberOfParameters2; ++i) { @@ -491,7 +491,7 @@ itkBSplineDeformableTransformTest2() // This should generate an exception because parameters have not yet // been set. - auto inputPoint = itk::MakeFilled(0.0); + auto inputPoint = itk::MakeFilled(0.0); TransformType::OutputPointType outputPoint; { bool exceptionCaught(false); @@ -589,7 +589,7 @@ itkBSplineDeformableTransformTest3() using RegionType = TransformType::RegionType; RegionType region; - auto size = RegionType::SizeType::Filled(10); + auto size = RegionType::SizeType::Filled(10); region.SetSize(size); std::cout << region << std::endl; @@ -609,7 +609,7 @@ itkBSplineDeformableTransformTest3() * Allocate memory for the parameters */ const unsigned long numberOfParameters = transform->GetNumberOfParameters(); - ParametersType parameters(numberOfParameters); + ParametersType parameters(numberOfParameters); /** * Define N * N-D grid of spline coefficients by wrapping the @@ -620,8 +620,8 @@ itkBSplineDeformableTransformTest3() using CoefficientImageType = itk::Image; CoefficientImageType::Pointer coeffImages[SpaceDimension]; - const unsigned int numberOfControlPoints = region.GetNumberOfPixels(); - CoefficientType * dataPointer = parameters.data_block(); + const unsigned int numberOfControlPoints = region.GetNumberOfPixels(); + CoefficientType * dataPointer = parameters.data_block(); for (auto & it : coeffImages) { it = CoefficientImageType::New(); @@ -650,7 +650,7 @@ itkBSplineDeformableTransformTest3() // point within the grid support region - auto inputPoint = itk::MakeFilled(9.0); + auto inputPoint = itk::MakeFilled(9.0); PointType outputPoint = transform->TransformPoint(inputPoint); std::cout << "Input Point: " << inputPoint << std::endl; diff --git a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx index cd06457f92e..ce95c301762 100644 --- a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx +++ b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx @@ -99,8 +99,8 @@ class BSplineDeformableTransformTest2Helper resampler->SetInterpolator(interpolator); - typename FixedImageType::SpacingType fixedSpacing = fixedImage->GetSpacing(); - typename FixedImageType::PointType fixedOrigin = fixedImage->GetOrigin(); + typename FixedImageType::SpacingType fixedSpacing = fixedImage->GetSpacing(); + typename FixedImageType::PointType fixedOrigin = fixedImage->GetOrigin(); const typename FixedImageType::DirectionType fixedDirection = fixedImage->GetDirection(); resampler->SetOutputSpacing(fixedSpacing); @@ -109,7 +109,7 @@ class BSplineDeformableTransformTest2Helper const typename FixedImageType::RegionType fixedRegion = fixedImage->GetBufferedRegion(); - typename FixedImageType::SizeType fixedSize = fixedRegion.GetSize(); + typename FixedImageType::SizeType fixedSize = fixedRegion.GetSize(); resampler->SetSize(fixedSize); resampler->SetOutputStartIndex(fixedRegion.GetIndex()); @@ -125,7 +125,7 @@ class BSplineDeformableTransformTest2Helper using RegionType = typename TransformType::RegionType; - RegionType bsplineRegion; + RegionType bsplineRegion; typename RegionType::SizeType size; const unsigned int numberOfGridNodesOutsideTheImageSupport = VSplineOrder; @@ -205,8 +205,8 @@ class BSplineDeformableTransformTest2Helper fi.GoToBegin(); - typename TransformType::InputPointType fixedPoint; - typename TransformType::OutputPointType movingPoint; + typename TransformType::InputPointType fixedPoint; + typename TransformType::OutputPointType movingPoint; typename DeformationFieldType::IndexType index; VectorType displacement; diff --git a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx index 099bf78b7ff..f545a15c569 100644 --- a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx +++ b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx @@ -100,8 +100,8 @@ class BSplineDeformableTransformTest3Helper resampler->SetInterpolator(interpolator); - typename FixedImageType::SpacingType fixedSpacing = fixedImage->GetSpacing(); - typename FixedImageType::PointType fixedOrigin = fixedImage->GetOrigin(); + typename FixedImageType::SpacingType fixedSpacing = fixedImage->GetSpacing(); + typename FixedImageType::PointType fixedOrigin = fixedImage->GetOrigin(); const typename FixedImageType::DirectionType fixedDirection = fixedImage->GetDirection(); resampler->SetOutputSpacing(fixedSpacing); @@ -110,7 +110,7 @@ class BSplineDeformableTransformTest3Helper const typename FixedImageType::RegionType fixedRegion = fixedImage->GetBufferedRegion(); - typename FixedImageType::SizeType fixedSize = fixedRegion.GetSize(); + typename FixedImageType::SizeType fixedSize = fixedRegion.GetSize(); resampler->SetSize(fixedSize); resampler->SetOutputStartIndex(fixedRegion.GetIndex()); @@ -126,7 +126,7 @@ class BSplineDeformableTransformTest3Helper using RegionType = typename TransformType::RegionType; - RegionType bsplineRegion; + RegionType bsplineRegion; typename RegionType::SizeType size; const unsigned int numberOfGridNodesOutsideTheImageSupport = VSplineOrder; @@ -219,8 +219,8 @@ class BSplineDeformableTransformTest3Helper fi.GoToBegin(); - typename TransformType::InputPointType fixedPoint; - typename TransformType::OutputPointType movingPoint; + typename TransformType::InputPointType fixedPoint; + typename TransformType::OutputPointType movingPoint; typename DeformationFieldType::IndexType index; VectorType displacement; diff --git a/Modules/Core/Transform/test/itkBSplineTransformGTest.cxx b/Modules/Core/Transform/test/itkBSplineTransformGTest.cxx index 62f9c4cf020..ba1f73ceb64 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformGTest.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformGTest.cxx @@ -32,8 +32,8 @@ template * bspline1, const itk::BSplineTransform * bspline2, - const std::string & description = "", - double tolerance = 1e-15) + const std::string & description = "", + double tolerance = 1e-15) { using BSplineType = itk::BSplineTransform; // Compare Transform Domain interface @@ -114,7 +114,7 @@ TEST(ITKBSplineTransform, Copying_Clone) ASSERT_EQ(coeffImageArray.Size(), 2); const SizeType imageSize = itk::MakeSize(10, 10); - DirectionType imageDirection; // filled with zeros + DirectionType imageDirection; // filled with zeros imageDirection(0, 1) = -1; imageDirection(1, 0) = 1; diff --git a/Modules/Core/Transform/test/itkBSplineTransformInitializerTest1.cxx b/Modules/Core/Transform/test/itkBSplineTransformInitializerTest1.cxx index da74ebc1356..583c3a2bcd1 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformInitializerTest1.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformInitializerTest1.cxx @@ -74,8 +74,8 @@ itkBSplineTransformInitializerTest1(int argc, char * argv[]) resampler->SetInterpolator(interpolator); - const FixedImageType::SpacingType fixedSpacing = fixedImage->GetSpacing(); - const FixedImageType::PointType fixedOrigin = fixedImage->GetOrigin(); + const FixedImageType::SpacingType fixedSpacing = fixedImage->GetSpacing(); + const FixedImageType::PointType fixedOrigin = fixedImage->GetOrigin(); const FixedImageType::DirectionType fixedDirection = fixedImage->GetDirection(); resampler->SetOutputSpacing(fixedSpacing); @@ -83,7 +83,7 @@ itkBSplineTransformInitializerTest1(int argc, char * argv[]) resampler->SetOutputDirection(fixedDirection); const FixedImageType::RegionType fixedRegion = fixedImage->GetBufferedRegion(); - const FixedImageType::SizeType fixedSize = fixedRegion.GetSize(); + const FixedImageType::SizeType fixedSize = fixedRegion.GetSize(); resampler->SetSize(fixedSize); resampler->SetOutputStartIndex(fixedRegion.GetIndex()); @@ -164,9 +164,9 @@ itkBSplineTransformInitializerTest1(int argc, char * argv[]) fi.GoToBegin(); - TransformType::InputPointType fixedPoint; - TransformType::OutputPointType movingPoint; - TransformType::JacobianType jacobian; + TransformType::InputPointType fixedPoint; + TransformType::OutputPointType movingPoint; + TransformType::JacobianType jacobian; DeformationFieldType::IndexType index; VectorType displacement; diff --git a/Modules/Core/Transform/test/itkBSplineTransformInitializerTest2.cxx b/Modules/Core/Transform/test/itkBSplineTransformInitializerTest2.cxx index 1ed968b3876..2a13852559e 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformInitializerTest2.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformInitializerTest2.cxx @@ -117,7 +117,7 @@ itkBSplineTransformInitializerTest2(int argc, char * argv[]) // be the same. using PermuterType = itk::PermuteAxesImageFilter; - auto permuter = PermuterType::New(); + auto permuter = PermuterType::New(); PermuterType::PermuteOrderArrayType array; array[0] = 1; diff --git a/Modules/Core/Transform/test/itkBSplineTransformTest.cxx b/Modules/Core/Transform/test/itkBSplineTransformTest.cxx index 60b91002832..313b6392df9 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformTest.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformTest.cxx @@ -127,7 +127,7 @@ itkBSplineTransformTest1() * Allocate memory for the parameters */ const unsigned long numberOfParameters = transform->GetNumberOfParameters(); - ParametersType parameters(numberOfParameters); + ParametersType parameters(numberOfParameters); parameters.Fill(ParametersType::ValueType{}); /** @@ -138,9 +138,9 @@ itkBSplineTransformTest1() using CoefficientType = ParametersType::ValueType; using CoefficientImageType = itk::Image; - CoefficientImageType::Pointer coeffImages[SpaceDimension]; + CoefficientImageType::Pointer coeffImages[SpaceDimension]; CoefficientImageType::SizeType size; - unsigned int numberOfControlPoints = 0; + unsigned int numberOfControlPoints = 0; for (unsigned int j = 0; j < SpaceDimension; ++j) { size[j] = (meshSize[j] + SplineOrder); @@ -233,9 +233,9 @@ itkBSplineTransformTest1() using WeightsType = TransformType::WeightsType; using IndexArrayType = TransformType::ParameterIndexArrayType; - WeightsType weights; + WeightsType weights; IndexArrayType indices; - bool inside; + bool inside; inputPoint.Fill(8.3); transform->TransformPoint(inputPoint, outputPoint, weights, indices, inside); @@ -252,9 +252,9 @@ itkBSplineTransformTest1() // cycling through all the parameters and weights used in the previous // transformation constexpr unsigned int numberOfCoefficientInSupportRegion = TransformType::NumberOfWeights; - const unsigned int numberOfParametersPerDimension = transform->GetNumberOfParametersPerDimension(); - unsigned int linearIndex; - unsigned int baseIndex; + const unsigned int numberOfParametersPerDimension = transform->GetNumberOfParametersPerDimension(); + unsigned int linearIndex; + unsigned int baseIndex; std::cout << "Index" << '\t' << "Value" << '\t' << "Weight" << std::endl; for (unsigned int j = 0; j < SpaceDimension; ++j) @@ -446,7 +446,7 @@ itkBSplineTransformTest1() transform2->SetTransformDomainDirection(direction); transform2->SetIdentity(); TransformType::ParametersType parameters2 = transform2->GetParameters(); - const unsigned int numberOfParameters2 = transform2->GetNumberOfParameters(); + const unsigned int numberOfParameters2 = transform2->GetNumberOfParameters(); std::cout << "numberOfParameters = " << numberOfParameters2 << std::endl; for (unsigned int i = 0; i < numberOfParameters2; ++i) { @@ -630,7 +630,7 @@ itkBSplineTransformTest3() * Allocate memory for the parameters */ const unsigned long numberOfParameters = transform->GetNumberOfParameters(); - ParametersType parameters(numberOfParameters); + ParametersType parameters(numberOfParameters); parameters.Fill(ParametersType::ValueType{}); /** @@ -641,9 +641,9 @@ itkBSplineTransformTest3() using CoefficientType = ParametersType::ValueType; using CoefficientImageType = itk::Image; - CoefficientImageType::Pointer coeffImages[SpaceDimension]; + CoefficientImageType::Pointer coeffImages[SpaceDimension]; CoefficientImageType::SizeType size; - unsigned int numberOfControlPoints = 0; + unsigned int numberOfControlPoints = 0; for (unsigned int j = 0; j < SpaceDimension; ++j) { size[j] = (meshSize[j] + SplineOrder); diff --git a/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx b/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx index db2d05c7717..6977846326b 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx @@ -99,8 +99,8 @@ class BSplineTransformTest2Helper resampler->SetInterpolator(interpolator); - typename FixedImageType::SpacingType fixedSpacing = fixedImage->GetSpacing(); - const typename FixedImageType::PointType fixedOrigin = fixedImage->GetOrigin(); + typename FixedImageType::SpacingType fixedSpacing = fixedImage->GetSpacing(); + const typename FixedImageType::PointType fixedOrigin = fixedImage->GetOrigin(); const typename FixedImageType::DirectionType fixedDirection = fixedImage->GetDirection(); resampler->SetOutputSpacing(fixedSpacing); @@ -109,7 +109,7 @@ class BSplineTransformTest2Helper const typename FixedImageType::RegionType fixedRegion = fixedImage->GetBufferedRegion(); - typename FixedImageType::SizeType fixedSize = fixedRegion.GetSize(); + typename FixedImageType::SizeType fixedSize = fixedRegion.GetSize(); resampler->SetSize(fixedSize); resampler->SetOutputStartIndex(fixedRegion.GetIndex()); @@ -140,7 +140,7 @@ class BSplineTransformTest2Helper using ParametersType = typename TransformType::ParametersType; const unsigned int numberOfParameters = bsplineTransform->GetNumberOfParameters(); - ParametersType parameters(numberOfParameters); + ParametersType parameters(numberOfParameters); std::ifstream infile; @@ -180,8 +180,8 @@ class BSplineTransformTest2Helper fi.GoToBegin(); - typename TransformType::InputPointType fixedPoint; - typename TransformType::OutputPointType movingPoint; + typename TransformType::InputPointType fixedPoint; + typename TransformType::OutputPointType movingPoint; typename DeformationFieldType::IndexType index; VectorType displacement; diff --git a/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx b/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx index 7df941b4ac3..6b519749cfe 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx @@ -99,8 +99,8 @@ class BSplineTransformTest3Helper resampler->SetInterpolator(interpolator); - typename FixedImageType::SpacingType fixedSpacing = fixedImage->GetSpacing(); - const typename FixedImageType::PointType fixedOrigin = fixedImage->GetOrigin(); + typename FixedImageType::SpacingType fixedSpacing = fixedImage->GetSpacing(); + const typename FixedImageType::PointType fixedOrigin = fixedImage->GetOrigin(); const typename FixedImageType::DirectionType fixedDirection = fixedImage->GetDirection(); resampler->SetOutputSpacing(fixedSpacing); @@ -109,7 +109,7 @@ class BSplineTransformTest3Helper const typename FixedImageType::RegionType fixedRegion = fixedImage->GetBufferedRegion(); - typename FixedImageType::SizeType fixedSize = fixedRegion.GetSize(); + typename FixedImageType::SizeType fixedSize = fixedRegion.GetSize(); resampler->SetSize(fixedSize); resampler->SetOutputStartIndex(fixedRegion.GetIndex()); @@ -125,7 +125,7 @@ class BSplineTransformTest3Helper using RegionType = typename TransformType::RegionType; - RegionType bsplineRegion; + RegionType bsplineRegion; typename RegionType::SizeType size; const unsigned int numberOfGridNodesOutsideTheImageSupport = VSplineOrder; @@ -205,8 +205,8 @@ class BSplineTransformTest3Helper fi.GoToBegin(); - typename TransformType::InputPointType fixedPoint; - typename TransformType::OutputPointType movingPoint; + typename TransformType::InputPointType fixedPoint; + typename TransformType::OutputPointType movingPoint; typename DeformationFieldType::IndexType index; VectorType displacement; diff --git a/Modules/Core/Transform/test/itkCenteredAffineTransformTest.cxx b/Modules/Core/Transform/test/itkCenteredAffineTransformTest.cxx index 2f42b256bbc..3088c516eca 100644 --- a/Modules/Core/Transform/test/itkCenteredAffineTransformTest.cxx +++ b/Modules/Core/Transform/test/itkCenteredAffineTransformTest.cxx @@ -221,14 +221,14 @@ itkCenteredAffineTransformTest(int, char *[]) /* Create an image for testing index<->physical transforms */ std::cout << "Creating image for testing index<->physical transforms" << std::endl; - double spacing[3] = { 1.0, 2.0, 3.0 }; - double origin[3] = { 4.0, 5.0, 6.0 }; + double spacing[3] = { 1.0, 2.0, 3.0 }; + double origin[3] = { 4.0, 5.0, 6.0 }; const itk::Image::Pointer image = itk::Image::New(); image->SetOrigin(origin); image->SetSpacing(spacing); /* Test output of ComputeJacobianWithRespectToParameters */ - auto jaff = Affine3DType::New(); + auto jaff = Affine3DType::New(); const Affine3DType::MatrixType jaffMatrix = jaff->GetMatrix(); std::cout << "GetMatrix:" << std::endl; std::cout << jaffMatrix << std::endl; diff --git a/Modules/Core/Transform/test/itkCenteredEuler3DTransformTest.cxx b/Modules/Core/Transform/test/itkCenteredEuler3DTransformTest.cxx index 46ab5bf20be..e16cef21132 100644 --- a/Modules/Core/Transform/test/itkCenteredEuler3DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkCenteredEuler3DTransformTest.cxx @@ -27,9 +27,9 @@ itkCenteredEuler3DTransformTest(int, char *[]) std::cout << "==================================" << std::endl; std::cout << "Testing Centered Euler Angles 3D Transform" << std::endl << std::endl; - constexpr double epsilon = 1e-10; + constexpr double epsilon = 1e-10; constexpr unsigned int N = 3; - bool Ok = true; + bool Ok = true; using EulerTransformType = itk::CenteredEuler3DTransform; auto eulerTransform = EulerTransformType::New(); @@ -67,8 +67,8 @@ itkCenteredEuler3DTransformTest(int, char *[]) // Rotate an itk::Point EulerTransformType::InputPointType::ValueType pInit[3] = { 10, -5, 3 }; - const EulerTransformType::InputPointType p = pInit; - EulerTransformType::InputPointType q; + const EulerTransformType::InputPointType p = pInit; + EulerTransformType::InputPointType q; itk::Matrix RotationX; RotationX[0][0] = 1; @@ -132,7 +132,7 @@ itkCenteredEuler3DTransformTest(int, char *[]) eulerTransform->SetRotation(0, 0, 0); EulerTransformType::OffsetType::ValueType ioffsetInit[3] = { 1, -4, 8 }; - const EulerTransformType::OffsetType ioffset = ioffsetInit; + const EulerTransformType::OffsetType ioffset = ioffsetInit; eulerTransform->SetOffset(ioffset); std::cout << "eulerTransform: " << eulerTransform; @@ -250,7 +250,7 @@ itkCenteredEuler3DTransformTest(int, char *[]) EulerTransformType::JacobianType approxJacobian = jacobian; for (unsigned int k = 0; k < eulerTransform->GetNumberOfParameters(); ++k) { - constexpr double delta = 0.001; + constexpr double delta = 0.001; EulerTransformType::ParametersType plusParameters; EulerTransformType::ParametersType minusParameters; @@ -338,7 +338,7 @@ itkCenteredEuler3DTransformTest(int, char *[]) std::cout << "Testing offset updating after changing angle order (ZYX) : "; const double dtr = (std::atan(1.0) * 4.0) / 180.0; // cast angles from degrees to radians - auto centeredtransform = EulerTransformType::New(); + auto centeredtransform = EulerTransformType::New(); EulerTransformType::ParametersType transformParameters = centeredtransform->GetParameters(); transformParameters[0] = 32; transformParameters[1] = -51; diff --git a/Modules/Core/Transform/test/itkCenteredRigid2DTransformTest.cxx b/Modules/Core/Transform/test/itkCenteredRigid2DTransformTest.cxx index 30bd450912b..00be2814085 100644 --- a/Modules/Core/Transform/test/itkCenteredRigid2DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkCenteredRigid2DTransformTest.cxx @@ -49,9 +49,9 @@ itkCenteredRigid2DTransformTest(int, char *[]) std::cout << "==================================" << std::endl; std::cout << "Testing CenteredRigid 2D Transform" << std::endl << std::endl; - constexpr double epsilon = 1e-10; + constexpr double epsilon = 1e-10; constexpr unsigned int N = 2; - bool Ok = true; + bool Ok = true; using CenteredRigidTransformType = itk::CenteredRigid2DTransform; auto transform = CenteredRigidTransformType::New(); @@ -66,8 +66,8 @@ itkCenteredRigid2DTransformTest(int, char *[]) // Rotate an itk::Point constexpr CenteredRigidTransformType::InputPointType::ValueType pInit[2] = { 10, 10 }; - CenteredRigidTransformType::InputPointType p = pInit; - CenteredRigidTransformType::InputPointType q; + CenteredRigidTransformType::InputPointType p = pInit; + CenteredRigidTransformType::InputPointType q; q[0] = p[0] * costh - p[1] * sinth; q[1] = p[0] * sinth + p[1] * costh; @@ -98,7 +98,7 @@ itkCenteredRigid2DTransformTest(int, char *[]) transform->SetAngle(0); CenteredRigidTransformType::OffsetType::ValueType ioffsetInit[2] = { 1, 4 }; - const CenteredRigidTransformType::OffsetType ioffset = ioffsetInit; + const CenteredRigidTransformType::OffsetType ioffset = ioffsetInit; transform->SetOffset(ioffset); @@ -129,7 +129,7 @@ itkCenteredRigid2DTransformTest(int, char *[]) std::cout << "Testing Inverse:"; // Populate the transform with some parameters - auto transform2 = CenteredRigidTransformType::New(); + auto transform2 = CenteredRigidTransformType::New(); constexpr double a = 0.175; transform2->SetAngle(a); @@ -329,7 +329,7 @@ itkCenteredRigid2DTransformTest(int, char *[]) TransformType::JacobianType approxJacobian = jacobian; for (unsigned int k = 0; k < t1->GetNumberOfParameters(); ++k) { - constexpr double delta = 0.001; + constexpr double delta = 0.001; TransformType::ParametersType plusParameters; TransformType::ParametersType minusParameters; diff --git a/Modules/Core/Transform/test/itkComposeScaleSkewVersor3DTransformTest.cxx b/Modules/Core/Transform/test/itkComposeScaleSkewVersor3DTransformTest.cxx index 68a242a79a6..da25079f0bf 100644 --- a/Modules/Core/Transform/test/itkComposeScaleSkewVersor3DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkComposeScaleSkewVersor3DTransformTest.cxx @@ -91,7 +91,7 @@ itkComposeScaleSkewVersor3DTransformTest(int, char *[]) { std::cout << "Test initial rotation matrix " << std::endl; - auto transform = TransformType::New(); + auto transform = TransformType::New(); const MatrixType matrix = transform->GetMatrix(); std::cout << "Matrix = " << std::endl; std::cout << matrix << std::endl; @@ -135,8 +135,8 @@ itkComposeScaleSkewVersor3DTransformTest(int, char *[]) { // Rotate an itk::Point constexpr TransformType::InputPointType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputPointType p = pInit; - TransformType::OutputPointType q; + const TransformType::InputPointType p = pInit; + TransformType::OutputPointType q; q = versor.Transform(p); TransformType::OutputPointType r; @@ -165,8 +165,8 @@ itkComposeScaleSkewVersor3DTransformTest(int, char *[]) { // Translate an itk::Vector TransformType::InputVectorType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputVectorType p = pInit; - TransformType::OutputVectorType q; + const TransformType::InputVectorType p = pInit; + TransformType::OutputVectorType q; q = versor.Transform(p); TransformType::OutputVectorType r; @@ -195,8 +195,8 @@ itkComposeScaleSkewVersor3DTransformTest(int, char *[]) { // Translate an itk::CovariantVector TransformType::InputCovariantVectorType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputCovariantVectorType p = pInit; - TransformType::OutputCovariantVectorType q; + const TransformType::InputCovariantVectorType p = pInit; + TransformType::OutputCovariantVectorType q; q = versor.Transform(p); TransformType::OutputCovariantVectorType r; @@ -391,7 +391,7 @@ itkComposeScaleSkewVersor3DTransformTest(int, char *[]) std::cout << " Exercise the Scaling methods " << std::endl; auto transform = TransformType::New(); - auto axis = itk::MakeFilled>(1); + auto axis = itk::MakeFilled>(1); const double angle = (std::atan(1.0) / 45.0) * 30.0; // turn 30 degrees transform->SetRotation(axis, angle); @@ -558,7 +558,7 @@ itkComposeScaleSkewVersor3DTransformTest(int, char *[]) params1[i] += epsilon; idT->SetParameters(params1); TransformType::InputPointType pnt1 = idT->TransformPoint(pnt); - ParametersType params2 = params; + ParametersType params2 = params; params2[i] -= epsilon; idT->SetParameters(params2); TransformType::InputPointType pnt2 = idT->TransformPoint(pnt); diff --git a/Modules/Core/Transform/test/itkCompositeTransformTest.cxx b/Modules/Core/Transform/test/itkCompositeTransformTest.cxx index 2f863e0c9cd..96f900f6d5e 100644 --- a/Modules/Core/Transform/test/itkCompositeTransformTest.cxx +++ b/Modules/Core/Transform/test/itkCompositeTransformTest.cxx @@ -158,7 +158,7 @@ itkCompositeTransformTest(int, char *[]) /* Add an affine transform */ using AffineType = itk::AffineTransform; - auto affine = AffineType::New(); + auto affine = AffineType::New(); Matrix2Type matrix2; matrix2[0][0] = 1; matrix2[0][1] = 2; @@ -291,7 +291,7 @@ itkCompositeTransformTest(int, char *[]) inputVector[0] = 0.4; inputVector[1] = 0.6; - CompositeType::InputCovariantVectorType inputCVector; + CompositeType::InputCovariantVectorType inputCVector; CompositeType::OutputCovariantVectorType outputCVector; inputCVector[0] = 0.4; inputCVector[1] = 0.6; @@ -502,8 +502,8 @@ itkCompositeTransformTest(int, char *[]) /* Test GetNumberOfParameters */ std::cout << "GetNumberOfParameters: " << std::endl; - unsigned int affineParamsN = affine->GetNumberOfParameters(); - unsigned int affine2ParamsN = affine2->GetNumberOfParameters(); + unsigned int affineParamsN = affine->GetNumberOfParameters(); + unsigned int affine2ParamsN = affine2->GetNumberOfParameters(); const unsigned int nParameters = compositeTransform->GetNumberOfParameters(); std::cout << "Number of parameters: " << nParameters << std::endl; if (nParameters != affineParamsN + affine2ParamsN) diff --git a/Modules/Core/Transform/test/itkEuler2DTransformTest.cxx b/Modules/Core/Transform/test/itkEuler2DTransformTest.cxx index 41294bb9073..3dfe2a93dd2 100644 --- a/Modules/Core/Transform/test/itkEuler2DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkEuler2DTransformTest.cxx @@ -50,9 +50,9 @@ itkEuler2DTransformTest(int, char *[]) std::cout << "==================================" << std::endl; std::cout << "Testing Euler Angles 2D Transform" << std::endl << std::endl; - constexpr double epsilon = 1e-10; + constexpr double epsilon = 1e-10; constexpr unsigned int N = 2; - bool Ok = true; + bool Ok = true; using EulerTransformType = itk::Euler2DTransform; auto eulerTransform = EulerTransformType::New(); @@ -80,8 +80,8 @@ itkEuler2DTransformTest(int, char *[]) // Rotate an itk::Point constexpr EulerTransformType::InputPointType::ValueType pInit[2] = { 10, 10 }; - EulerTransformType::InputPointType p = pInit; - EulerTransformType::InputPointType q; + EulerTransformType::InputPointType p = pInit; + EulerTransformType::InputPointType q; q[0] = p[0] * costh - p[1] * sinth; q[1] = p[0] * sinth + p[1] * costh; @@ -113,7 +113,7 @@ itkEuler2DTransformTest(int, char *[]) eulerTransform->SetRotation(0); EulerTransformType::OffsetType::ValueType ioffsetInit[2] = { 1, 4 }; - const EulerTransformType::OffsetType ioffset = ioffsetInit; + const EulerTransformType::OffsetType ioffset = ioffsetInit; eulerTransform->SetOffset(ioffset); @@ -302,7 +302,7 @@ itkEuler2DTransformTest(int, char *[]) TransformType::JacobianType approxJacobian = jacobian2; for (unsigned int k = 0; k < t1->GetNumberOfParameters(); ++k) { - constexpr double delta = 0.001; + constexpr double delta = 0.001; TransformType::ParametersType plusParameters; TransformType::ParametersType minusParameters; diff --git a/Modules/Core/Transform/test/itkEuler3DTransformGTest.cxx b/Modules/Core/Transform/test/itkEuler3DTransformGTest.cxx index a170cc3697b..7b97f71aaa6 100644 --- a/Modules/Core/Transform/test/itkEuler3DTransformGTest.cxx +++ b/Modules/Core/Transform/test/itkEuler3DTransformGTest.cxx @@ -28,7 +28,7 @@ TEST(Euler3DTransform, SetFixedParametersThrowsWhenSizeIsLessThanInputSpaceDimen for (unsigned int size{}; size < TransformType::InputSpaceDimension; ++size) { - const auto transform = TransformType::New(); + const auto transform = TransformType::New(); const TransformType::FixedParametersType fixedParameters(size); ASSERT_THROW(transform->SetFixedParameters(fixedParameters), itk::ExceptionObject); } @@ -39,7 +39,7 @@ TEST(Euler3DTransform, TestSetGetCenterAfterSetIdentity) using EulerTransformType = itk::Euler3DTransform<>; // Testing preservation of the center of rotation - auto eulerTransformWithCenter = EulerTransformType::New(); + auto eulerTransformWithCenter = EulerTransformType::New(); const itk::Point centerOfRotation({ 200, 400, 300 }); eulerTransformWithCenter->SetCenter(centerOfRotation); EXPECT_EQ(eulerTransformWithCenter->GetCenter(), centerOfRotation); diff --git a/Modules/Core/Transform/test/itkEuler3DTransformTest.cxx b/Modules/Core/Transform/test/itkEuler3DTransformTest.cxx index c089e4e734c..bcb66c723a7 100644 --- a/Modules/Core/Transform/test/itkEuler3DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkEuler3DTransformTest.cxx @@ -27,9 +27,9 @@ itkEuler3DTransformTest(int, char *[]) std::cout << "==================================" << std::endl; std::cout << "Testing Euler Angles 3D Transform" << std::endl << std::endl; - constexpr double epsilon = 1e-10; + constexpr double epsilon = 1e-10; constexpr unsigned int N = 3; - bool Ok = true; + bool Ok = true; using EulerTransformType = itk::Euler3DTransform; auto eulerTransform = EulerTransformType::New(); @@ -67,8 +67,8 @@ itkEuler3DTransformTest(int, char *[]) // Rotate an itk::Point EulerTransformType::InputPointType::ValueType pInit[3] = { 10, -5, 3 }; - const EulerTransformType::InputPointType p = pInit; - EulerTransformType::InputPointType q; + const EulerTransformType::InputPointType p = pInit; + EulerTransformType::InputPointType q; itk::Matrix RotationX; RotationX[0][0] = 1; @@ -165,7 +165,7 @@ itkEuler3DTransformTest(int, char *[]) eulerTransform->SetRotation(0, 0, 0); EulerTransformType::OffsetType::ValueType ioffsetInit[3] = { 1, -4, 8 }; - const EulerTransformType::OffsetType ioffset = ioffsetInit; + const EulerTransformType::OffsetType ioffset = ioffsetInit; eulerTransform->SetOffset(ioffset); std::cout << "eulerTransform: " << eulerTransform; @@ -293,7 +293,7 @@ itkEuler3DTransformTest(int, char *[]) EulerTransformType::JacobianType approxJacobian = jacobian; for (unsigned int k = 0; k < eulerTransform->GetNumberOfParameters(); ++k) { - constexpr double delta = 0.001; + constexpr double delta = 0.001; EulerTransformType::ParametersType plusParameters; EulerTransformType::ParametersType minusParameters; @@ -372,7 +372,7 @@ itkEuler3DTransformTest(int, char *[]) using MatrixType = TransformType::MatrixType; MatrixType matrix; - auto t = TransformType::New(); + auto t = TransformType::New(); // attempt to set an non-orthogonal matrix unsigned int par = 0; @@ -467,7 +467,7 @@ itkEuler3DTransformTest(int, char *[]) { std::cout << "Test GetInverse(): "; - auto t_inv = TransformType::New(); + auto t_inv = TransformType::New(); const bool invSuccessful = t->GetInverse(t_inv); if (!invSuccessful) { diff --git a/Modules/Core/Transform/test/itkFixedCenterOfRotationAffineTransformTest.cxx b/Modules/Core/Transform/test/itkFixedCenterOfRotationAffineTransformTest.cxx index 6bac90b1309..b836406151d 100644 --- a/Modules/Core/Transform/test/itkFixedCenterOfRotationAffineTransformTest.cxx +++ b/Modules/Core/Transform/test/itkFixedCenterOfRotationAffineTransformTest.cxx @@ -27,10 +27,10 @@ itkFixedCenterOfRotationAffineTransformTest(int, char *[]) { using FCoRAffine2DType = itk::FixedCenterOfRotationAffineTransform; - auto id2 = FCoRAffine2DType::New(); - FCoRAffine2DType::MatrixType matrix2 = id2->GetMatrixComponent(); + auto id2 = FCoRAffine2DType::New(); + FCoRAffine2DType::MatrixType matrix2 = id2->GetMatrixComponent(); FCoRAffine2DType::InputVectorType vector2 = id2->GetOffsetComponent(); - FCoRAffine2DType::InputPointType point2 = id2->GetCenterOfRotationComponent(); + FCoRAffine2DType::InputPointType point2 = id2->GetCenterOfRotationComponent(); std::cout << "Instantiation of an identity Transform: "; @@ -198,7 +198,7 @@ itkFixedCenterOfRotationAffineTransformTest(int, char *[]) FCoRAffine2DType::InputPointType expectedPoint; - FCoRAffine2DType::MatrixType matrix; + FCoRAffine2DType::MatrixType matrix; matrix[0][0] = 1; matrix[0][1] = 2; matrix[1][0] = 3; diff --git a/Modules/Core/Transform/test/itkIdentityTransformTest.cxx b/Modules/Core/Transform/test/itkIdentityTransformTest.cxx index bcb9eedd6aa..c8786d32fac 100644 --- a/Modules/Core/Transform/test/itkIdentityTransformTest.cxx +++ b/Modules/Core/Transform/test/itkIdentityTransformTest.cxx @@ -28,9 +28,9 @@ itkIdentityTransformTest(int, char *[]) std::cout << "==================================" << std::endl; std::cout << "Testing Identity Transform " << std::endl << std::endl; - constexpr double epsilon = 1e-10; + constexpr double epsilon = 1e-10; constexpr unsigned int N = 2; - bool Ok = true; + bool Ok = true; using IdentityTransformType = itk::IdentityTransform; auto transform = IdentityTransformType::New(); diff --git a/Modules/Core/Transform/test/itkMatrixOffsetTransformBaseGTest.cxx b/Modules/Core/Transform/test/itkMatrixOffsetTransformBaseGTest.cxx index 154bf9ae526..12acd19d0c4 100644 --- a/Modules/Core/Transform/test/itkMatrixOffsetTransformBaseGTest.cxx +++ b/Modules/Core/Transform/test/itkMatrixOffsetTransformBaseGTest.cxx @@ -54,7 +54,7 @@ Assert_SetFixedParameters_throws_when_size_is_less_than_NDimensions() using TransformBaseType = itk::MatrixOffsetTransformBase; using FixedParametersType = typename TransformBaseType::FixedParametersType; - const auto transformBase = TransformBaseType::New(); + const auto transformBase = TransformBaseType::New(); const FixedParametersType fixedParameters(size); ASSERT_THROW(transformBase->SetFixedParameters(fixedParameters), itk::ExceptionObject); } diff --git a/Modules/Core/Transform/test/itkMultiTransformTest.cxx b/Modules/Core/Transform/test/itkMultiTransformTest.cxx index 7112370af1b..5f00ba11ce8 100644 --- a/Modules/Core/Transform/test/itkMultiTransformTest.cxx +++ b/Modules/Core/Transform/test/itkMultiTransformTest.cxx @@ -104,7 +104,7 @@ class MultiTransformTestTransform : public itk::MultiTransform; - auto affine = AffineType::New(); + auto affine = AffineType::New(); Matrix2Type matrix2; matrix2[0][0] = 0; matrix2[0][1] = -1; @@ -325,10 +325,10 @@ itkMultiTransformTest(int, char *[]) auto field = FieldType::New(); // This is based on itk::Image - constexpr int dimLength = 4; - constexpr auto size = itk::MakeFilled(dimLength); + constexpr int dimLength = 4; + constexpr auto size = itk::MakeFilled(dimLength); constexpr FieldType::IndexType start{}; - FieldType::RegionType region; + FieldType::RegionType region; region.SetSize(size); region.SetIndex(start); field->SetRegions(region); @@ -419,8 +419,8 @@ itkMultiTransformTest(int, char *[]) /* Test GetNumberOfParameters */ std::cout << "GetNumberOfParameters: " << std::endl; - unsigned int affineParamsN = affine->GetNumberOfParameters(); - unsigned int displacementParamsN = displacementTransform->GetNumberOfParameters(); + unsigned int affineParamsN = affine->GetNumberOfParameters(); + unsigned int displacementParamsN = displacementTransform->GetNumberOfParameters(); const unsigned int nParameters = multiTransform->GetNumberOfParameters(); std::cout << "Number of parameters: " << nParameters << std::endl; if (nParameters != affineParamsN + displacementParamsN) diff --git a/Modules/Core/Transform/test/itkQuaternionRigidTransformTest.cxx b/Modules/Core/Transform/test/itkQuaternionRigidTransformTest.cxx index f482fef1e4d..3838a15fce9 100644 --- a/Modules/Core/Transform/test/itkQuaternionRigidTransformTest.cxx +++ b/Modules/Core/Transform/test/itkQuaternionRigidTransformTest.cxx @@ -27,14 +27,14 @@ itkQuaternionRigidTransformTest(int, char *[]) using CoordinateType = double; using TransformType = itk::QuaternionRigidTransform; - constexpr double epsilon = 1e-10; + constexpr double epsilon = 1e-10; constexpr unsigned int N = 3; bool Ok = true; /* Create a 3D identity transformation and show its parameters */ { - auto identityTransform = TransformType::New(); + auto identityTransform = TransformType::New(); TransformType::OffsetType offset = identityTransform->GetOffset(); std::cout << "Vector from instantiating an identity transform: "; std::cout << offset << std::endl; @@ -55,7 +55,7 @@ itkQuaternionRigidTransformTest(int, char *[]) /* Create a Rigid 3D transform with translation */ { - auto translation = TransformType::New(); + auto translation = TransformType::New(); TransformType::OutputVectorType itransVector; itransVector[0] = 1; itransVector[1] = 4; @@ -85,8 +85,8 @@ itkQuaternionRigidTransformTest(int, char *[]) { // Translate an itk::Point constexpr TransformType::InputPointType::ValueType pInit[3] = { 10, 10, 10 }; - const TransformType::InputPointType p = pInit; - TransformType::InputPointType q; + const TransformType::InputPointType p = pInit; + TransformType::InputPointType q; q = p + itransVector; TransformType::OutputPointType r; r = translation->TransformPoint(p); @@ -114,8 +114,8 @@ itkQuaternionRigidTransformTest(int, char *[]) { // Translate an itk::Vector TransformType::InputVectorType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputVectorType p = pInit; - TransformType::OutputVectorType q; + TransformType::InputVectorType p = pInit; + TransformType::OutputVectorType q; q = translation->TransformVector(p); for (unsigned int i = 0; i < N; ++i) { @@ -140,8 +140,8 @@ itkQuaternionRigidTransformTest(int, char *[]) { // Translate an itk::CovariantVector TransformType::InputCovariantVectorType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputCovariantVectorType p = pInit; - TransformType::OutputCovariantVectorType q; + TransformType::InputCovariantVectorType p = pInit; + TransformType::OutputCovariantVectorType q; q = translation->TransformCovariantVector(p); for (unsigned int i = 0; i < N; ++i) { @@ -194,7 +194,7 @@ itkQuaternionRigidTransformTest(int, char *[]) /* Create a Rigid 3D transform with a rotation given by a Matrix */ { - auto rotation = TransformType::New(); + auto rotation = TransformType::New(); TransformType::VnlQuaternionType qrotation; // 15 degrees in radians @@ -266,8 +266,8 @@ itkQuaternionRigidTransformTest(int, char *[]) { // Rotate an itk::Point constexpr TransformType::InputPointType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputPointType p = pInit; - TransformType::InputPointType q; + TransformType::InputPointType p = pInit; + TransformType::InputPointType q; q[0] = p[0] * costh - p[1] * sinth; q[1] = p[0] * sinth + p[1] * costh; @@ -299,7 +299,7 @@ itkQuaternionRigidTransformTest(int, char *[]) { // Rotate an itk::Vector TransformType::InputVectorType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputVectorType p = pInit; + TransformType::InputVectorType p = pInit; TransformType::InputPointType q; q[0] = p[0] * costh - p[1] * sinth; @@ -332,8 +332,8 @@ itkQuaternionRigidTransformTest(int, char *[]) { // Rotate an itk::CovariantVector TransformType::InputCovariantVectorType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputCovariantVectorType p = pInit; - TransformType::OutputCovariantVectorType q; + TransformType::InputCovariantVectorType p = pInit; + TransformType::OutputCovariantVectorType q; q[0] = p[0] * costh - p[1] * sinth; q[1] = p[0] * sinth + p[1] * costh; @@ -403,7 +403,7 @@ itkQuaternionRigidTransformTest(int, char *[]) // Test the Jacobian std::cout << "Testing ComputeJacobianWithRespectToParameters()" << std::endl; - auto quaternionRigid = TransformType::New(); + auto quaternionRigid = TransformType::New(); TransformType::ParametersType parameters(quaternionRigid->GetNumberOfParameters()); parameters.Fill(0.0); @@ -432,7 +432,7 @@ itkQuaternionRigidTransformTest(int, char *[]) TransformType::JacobianType approxJacobian = jacobian; for (unsigned int k = 0; k < quaternionRigid->GetNumberOfParameters(); ++k) { - constexpr double delta = 0.001; + constexpr double delta = 0.001; TransformType::ParametersType plusParameters; TransformType::ParametersType minusParameters; @@ -473,7 +473,7 @@ itkQuaternionRigidTransformTest(int, char *[]) TransformType::OutputPointType pOut; quaternionRigid->SetParameters(parameters); { - auto inverseQuaternionRigid = TransformType::New(); + auto inverseQuaternionRigid = TransformType::New(); const bool inverseIsValid = quaternionRigid->GetInverse(inverseQuaternionRigid); if (!inverseIsValid) { @@ -505,7 +505,7 @@ itkQuaternionRigidTransformTest(int, char *[]) /* Create a Rigid 3D transform with a defined center and a rotation given by a Matrix */ { - auto rotation = TransformType::New(); + auto rotation = TransformType::New(); TransformType::VnlQuaternionType qrotation; // 15 degrees in radians @@ -601,8 +601,8 @@ itkQuaternionRigidTransformTest(int, char *[]) { // Rotate an itk::Point constexpr TransformType::InputPointType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputPointType p = pInit; - TransformType::InputPointType q; + TransformType::InputPointType p = pInit; + TransformType::InputPointType q; const CoordinateType x = p[0] - center[0]; const CoordinateType y = p[1] - center[1]; @@ -638,7 +638,7 @@ itkQuaternionRigidTransformTest(int, char *[]) { // Rotate an itk::Vector TransformType::InputVectorType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputVectorType p = pInit; + TransformType::InputVectorType p = pInit; TransformType::OutputVectorType q; q[0] = p[0] * costh - p[1] * sinth; @@ -671,8 +671,8 @@ itkQuaternionRigidTransformTest(int, char *[]) { // Rotate an itk::CovariantVector TransformType::InputCovariantVectorType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputCovariantVectorType p = pInit; - TransformType::OutputCovariantVectorType q; + TransformType::InputCovariantVectorType p = pInit; + TransformType::OutputCovariantVectorType q; q[0] = p[0] * costh - p[1] * sinth; q[1] = p[0] * sinth + p[1] * costh; diff --git a/Modules/Core/Transform/test/itkRigid2DTransformTest.cxx b/Modules/Core/Transform/test/itkRigid2DTransformTest.cxx index b65ceb433af..16af66271e6 100644 --- a/Modules/Core/Transform/test/itkRigid2DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkRigid2DTransformTest.cxx @@ -48,7 +48,7 @@ itkRigid2DTransformTest(int, char *[]) using TransformType = itk::Rigid2DTransform; - constexpr double epsilon = 1e-10; + constexpr double epsilon = 1e-10; constexpr unsigned int N = 2; @@ -80,9 +80,9 @@ itkRigid2DTransformTest(int, char *[]) /* Create a Rigid 2D transform with translation */ { - auto translation = TransformType::New(); + auto translation = TransformType::New(); TransformType::OffsetType::ValueType ioffsetInit[2] = { 1, 4 }; - TransformType::OffsetType ioffset = ioffsetInit; + TransformType::OffsetType ioffset = ioffsetInit; translation->SetOffset(ioffset); @@ -125,9 +125,9 @@ itkRigid2DTransformTest(int, char *[]) { // Translate an itk::Point constexpr TransformType::InputPointType::ValueType pInit[2] = { 10, 10 }; - const TransformType::InputPointType p = pInit; - TransformType::InputPointType q = p + ioffset; - TransformType::OutputPointType r = translation->TransformPoint(p); + const TransformType::InputPointType p = pInit; + TransformType::InputPointType q = p + ioffset; + TransformType::OutputPointType r = translation->TransformPoint(p); for (unsigned int i = 0; i < N; ++i) { if (itk::Math::abs(q[i] - r[i]) > epsilon) @@ -152,8 +152,8 @@ itkRigid2DTransformTest(int, char *[]) { // Translate an itk::Vector TransformType::InputVectorType::ValueType pInit[2] = { 10, 10 }; - TransformType::InputVectorType p = pInit; - TransformType::OutputVectorType q = translation->TransformVector(p); + TransformType::InputVectorType p = pInit; + TransformType::OutputVectorType q = translation->TransformVector(p); for (unsigned int i = 0; i < N; ++i) { if (itk::Math::abs(q[i] - p[i]) > epsilon) @@ -177,8 +177,8 @@ itkRigid2DTransformTest(int, char *[]) { // Translate an itk::CovariantVector TransformType::InputCovariantVectorType::ValueType pInit[2] = { 10, 10 }; - TransformType::InputCovariantVectorType p = pInit; - TransformType::OutputCovariantVectorType q = translation->TransformCovariantVector(p); + TransformType::InputCovariantVectorType p = pInit; + TransformType::OutputCovariantVectorType q = translation->TransformCovariantVector(p); for (unsigned int i = 0; i < N; ++i) { if (itk::Math::abs(q[i] - p[i]) > epsilon) @@ -229,7 +229,7 @@ itkRigid2DTransformTest(int, char *[]) /* Create a Rigid 2D transform with a rotation given by a Matrix */ { - auto rotation = TransformType::New(); + auto rotation = TransformType::New(); TransformType::MatrixType mrotation; mrotation.SetIdentity(); @@ -332,8 +332,8 @@ itkRigid2DTransformTest(int, char *[]) { // Rotate an itk::Point constexpr TransformType::InputPointType::ValueType pInit[2] = { 10, 10 }; - TransformType::InputPointType p = pInit; - TransformType::InputPointType q; + TransformType::InputPointType p = pInit; + TransformType::InputPointType q; q[0] = p[0] * costh + p[1] * sinth; q[1] = -p[0] * sinth + p[1] * costh; @@ -363,7 +363,7 @@ itkRigid2DTransformTest(int, char *[]) { // Rotate an itk::Vector TransformType::InputVectorType::ValueType pInit[2] = { 10, 10 }; - TransformType::InputVectorType p = pInit; + TransformType::InputVectorType p = pInit; TransformType::InputPointType q; q[0] = p[0] * costh + p[1] * sinth; @@ -394,8 +394,8 @@ itkRigid2DTransformTest(int, char *[]) { // Rotate an itk::CovariantVector TransformType::InputCovariantVectorType::ValueType pInit[2] = { 10, 10 }; - TransformType::InputCovariantVectorType p = pInit; - TransformType::OutputCovariantVectorType q; + TransformType::InputCovariantVectorType p = pInit; + TransformType::OutputCovariantVectorType q; q[0] = p[0] * costh + p[1] * sinth; q[1] = -p[0] * sinth + p[1] * costh; @@ -463,7 +463,7 @@ itkRigid2DTransformTest(int, char *[]) auto t1 = TransformType::New(); // Set parameters - double angle0 = -21.0 / 180.0 * itk::Math::pi; + double angle0 = -21.0 / 180.0 * itk::Math::pi; TransformType::InputPointType center; center[0] = 12.0; center[1] = -8.9; diff --git a/Modules/Core/Transform/test/itkRigid3DPerspectiveTransformTest.cxx b/Modules/Core/Transform/test/itkRigid3DPerspectiveTransformTest.cxx index a35c4aba8bb..f258f658ab1 100644 --- a/Modules/Core/Transform/test/itkRigid3DPerspectiveTransformTest.cxx +++ b/Modules/Core/Transform/test/itkRigid3DPerspectiveTransformTest.cxx @@ -28,7 +28,7 @@ itkRigid3DPerspectiveTransformTest(int, char *[]) using TransformType = itk::Rigid3DPerspectiveTransform; - constexpr double epsilon = 1e-10; + constexpr double epsilon = 1e-10; constexpr unsigned int N = 3; constexpr double focal = 100.0; @@ -49,7 +49,7 @@ itkRigid3DPerspectiveTransformTest(int, char *[]) auto covVector = itk::MakeFilled(1.0); ITK_TRY_EXPECT_EXCEPTION(transform->TransformCovariantVector(covVector)); - auto point = itk::MakeFilled(1.0); + auto point = itk::MakeFilled(1.0); typename TransformType::JacobianPositionType jacobianPosition; ITK_TRY_EXPECT_EXCEPTION(transform->ComputeJacobianWithRespectToPosition(point, jacobianPosition)); } @@ -129,10 +129,10 @@ itkRigid3DPerspectiveTransformTest(int, char *[]) { // Projecting an itk::Point - auto p = itk::MakeFilled(10); - TransformType::InputPointType q = p + ioffset; + auto p = itk::MakeFilled(10); + TransformType::InputPointType q = p + ioffset; TransformType::OutputPointType s; - const double factor = focal / q[2]; + const double factor = focal / q[2]; s[0] = q[0] * factor; s[1] = q[1] * factor; TransformType::OutputPointType r = translation->TransformPoint(p); @@ -172,8 +172,8 @@ itkRigid3DPerspectiveTransformTest(int, char *[]) std::cout << offset << std::endl; using VersorType = TransformType::VersorType; - VersorType rotation; - VersorType::VectorType axis; + VersorType rotation; + VersorType::VectorType axis; const VersorType::ValueType angle = 30.0f * std::atan(1.0f) / 45.0f; axis[0] = 1.0f; axis[1] = 1.0f; @@ -185,10 +185,10 @@ itkRigid3DPerspectiveTransformTest(int, char *[]) { // Project an itk::Point - auto p = itk::MakeFilled(10.0); - TransformType::InputPointType q = p + ioffset; + auto p = itk::MakeFilled(10.0); + TransformType::InputPointType q = p + ioffset; TransformType::OutputPointType s; - const double factor = focal / q[2]; + const double factor = focal / q[2]; s[0] = q[0] * factor; s[1] = q[1] * factor; TransformType::OutputPointType r = rigid->TransformPoint(p); diff --git a/Modules/Core/Transform/test/itkRigid3DTransformTest.cxx b/Modules/Core/Transform/test/itkRigid3DTransformTest.cxx index fccc845f43f..ac4e7d816a2 100644 --- a/Modules/Core/Transform/test/itkRigid3DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkRigid3DTransformTest.cxx @@ -81,7 +81,7 @@ TestSettingTranslation() p1.set_size(12); p1 = r1->GetParameters(); - auto r2 = TransformType::New(); + auto r2 = TransformType::New(); TransformType::ParametersType p2; p2.set_size(12); @@ -127,14 +127,14 @@ itkRigid3DTransformTest(int, char *[]) using TransformType = itk::Rigid3DTransformSurrogate; using ParametersType = TransformType::ParametersType; - constexpr double epsilon = 1e-10; + constexpr double epsilon = 1e-10; constexpr unsigned int N = 3; bool Ok = true; /* Create a 3D identity transformation and show its parameters */ { - auto identityTransform = TransformType::New(); + auto identityTransform = TransformType::New(); TransformType::OffsetType offset = identityTransform->GetOffset(); std::cout << "Vector from instantiating an identity transform: "; std::cout << offset << std::endl; @@ -156,9 +156,9 @@ itkRigid3DTransformTest(int, char *[]) /* Create a Rigid 3D transform with translation */ { - auto translation = TransformType::New(); + auto translation = TransformType::New(); TransformType::OffsetType::ValueType ioffsetInit[3] = { 1, 4, 9 }; - TransformType::OffsetType ioffset = ioffsetInit; + TransformType::OffsetType ioffset = ioffsetInit; translation->SetOffset(ioffset); @@ -183,8 +183,8 @@ itkRigid3DTransformTest(int, char *[]) { // Translate an itk::Point constexpr TransformType::InputPointType::ValueType pInit[3] = { 10, 10, 10 }; - const TransformType::InputPointType p = pInit; - TransformType::InputPointType q; + const TransformType::InputPointType p = pInit; + TransformType::InputPointType q; q = p + ioffset; TransformType::OutputPointType r; r = translation->TransformPoint(p); @@ -212,8 +212,8 @@ itkRigid3DTransformTest(int, char *[]) { // Translate an itk::Vector TransformType::InputVectorType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputVectorType p = pInit; - TransformType::OutputVectorType q; + TransformType::InputVectorType p = pInit; + TransformType::OutputVectorType q; q = translation->TransformVector(p); for (unsigned int i = 0; i < N; ++i) { @@ -238,8 +238,8 @@ itkRigid3DTransformTest(int, char *[]) { // Translate an itk::CovariantVector TransformType::InputCovariantVectorType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputCovariantVectorType p = pInit; - TransformType::OutputCovariantVectorType q; + TransformType::InputCovariantVectorType p = pInit; + TransformType::OutputCovariantVectorType q; q = translation->TransformCovariantVector(p); for (unsigned int i = 0; i < N; ++i) { @@ -292,7 +292,7 @@ itkRigid3DTransformTest(int, char *[]) /* Create a Rigid 3D transform with a rotation given by a Matrix */ { - auto rotation = TransformType::New(); + auto rotation = TransformType::New(); TransformType::MatrixType mrotation; mrotation.SetIdentity(); @@ -359,8 +359,8 @@ itkRigid3DTransformTest(int, char *[]) { // Rotate an itk::Point constexpr TransformType::InputPointType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputPointType p = pInit; - TransformType::InputPointType q; + TransformType::InputPointType p = pInit; + TransformType::InputPointType q; q[0] = p[0] * costh + p[1] * sinth; q[1] = -p[0] * sinth + p[1] * costh; @@ -392,7 +392,7 @@ itkRigid3DTransformTest(int, char *[]) { // Rotate an itk::Vector TransformType::InputVectorType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputVectorType p = pInit; + TransformType::InputVectorType p = pInit; TransformType::InputPointType q; q[0] = p[0] * costh + p[1] * sinth; @@ -425,8 +425,8 @@ itkRigid3DTransformTest(int, char *[]) { // Rotate an itk::CovariantVector TransformType::InputCovariantVectorType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputCovariantVectorType p = pInit; - TransformType::OutputCovariantVectorType q; + TransformType::InputCovariantVectorType p = pInit; + TransformType::OutputCovariantVectorType q; q[0] = p[0] * costh + p[1] * sinth; q[1] = -p[0] * sinth + p[1] * costh; @@ -496,7 +496,7 @@ itkRigid3DTransformTest(int, char *[]) // Testing SetParameters() std::cout << "Testing SetParameters() ... "; - auto t = TransformType::New(); + auto t = TransformType::New(); ParametersType p(t->GetNumberOfParameters()); // attempt to set an non-orthogonal matrix @@ -578,7 +578,7 @@ itkRigid3DTransformTest(int, char *[]) // Testing SetIdentity() std::cout << "Testing SetIdentity() ... "; - auto t = TransformType::New(); + auto t = TransformType::New(); ParametersType p(t->GetNumberOfParameters()); t->SetIdentity(); diff --git a/Modules/Core/Transform/test/itkScaleLogarithmicTransformTest.cxx b/Modules/Core/Transform/test/itkScaleLogarithmicTransformTest.cxx index 44fe9b492c2..e50c5dc82eb 100644 --- a/Modules/Core/Transform/test/itkScaleLogarithmicTransformTest.cxx +++ b/Modules/Core/Transform/test/itkScaleLogarithmicTransformTest.cxx @@ -26,7 +26,7 @@ itkScaleLogarithmicTransformTest(int, char *[]) { using TransformType = itk::ScaleLogarithmicTransform; - constexpr double epsilon = 1e-10; + constexpr double epsilon = 1e-10; constexpr unsigned int N = 3; bool testStatus = true; @@ -39,7 +39,7 @@ itkScaleLogarithmicTransformTest(int, char *[]) /* Create a 3D identity transformation and show its parameters */ { - auto identityTransform = TransformType::New(); + auto identityTransform = TransformType::New(); TransformType::ScaleType scale = identityTransform->GetScale(); std::cout << "Scale from instantiating an identity transform: "; for (unsigned int j = 0; j < N; ++j) @@ -67,7 +67,7 @@ itkScaleLogarithmicTransformTest(int, char *[]) auto scaleTransform = TransformType::New(); TransformType::ScaleType::ValueType iscaleInit[3] = { 1, 4, 9 }; - TransformType::ScaleType iscale = iscaleInit; + TransformType::ScaleType iscale = iscaleInit; scaleTransform->SetScale(iscale); @@ -96,8 +96,8 @@ itkScaleLogarithmicTransformTest(int, char *[]) { // scale an itk::Point constexpr TransformType::InputPointType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputPointType p = pInit; - TransformType::InputPointType q; + TransformType::InputPointType p = pInit; + TransformType::InputPointType q; for (unsigned int j = 0; j < N; ++j) { q[j] = p[j] * iscale[j]; @@ -127,8 +127,8 @@ itkScaleLogarithmicTransformTest(int, char *[]) { // Scale an itk::Vector TransformType::InputVectorType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputVectorType p = pInit; - TransformType::OutputVectorType q; + TransformType::InputVectorType p = pInit; + TransformType::OutputVectorType q; for (unsigned int j = 0; j < N; ++j) { q[j] = p[j] * iscale[j]; @@ -157,8 +157,8 @@ itkScaleLogarithmicTransformTest(int, char *[]) { // Scale an itk::CovariantVector TransformType::InputCovariantVectorType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputCovariantVectorType p = pInit; - TransformType::OutputCovariantVectorType q; + TransformType::InputCovariantVectorType p = pInit; + TransformType::OutputCovariantVectorType q; for (unsigned int j = 0; j < N; ++j) { q[j] = p[j] / iscale[j]; diff --git a/Modules/Core/Transform/test/itkScaleSkewVersor3DTransformTest.cxx b/Modules/Core/Transform/test/itkScaleSkewVersor3DTransformTest.cxx index e310cc965e9..8b2f4e87427 100644 --- a/Modules/Core/Transform/test/itkScaleSkewVersor3DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkScaleSkewVersor3DTransformTest.cxx @@ -94,7 +94,7 @@ itkScaleSkewVersor3DTransformTest(int, char *[]) { std::cout << "Test initial rotation matrix " << std::endl; - auto transform = TransformType::New(); + auto transform = TransformType::New(); const MatrixType matrix = transform->GetMatrix(); std::cout << "Matrix = " << std::endl; std::cout << matrix << std::endl; @@ -138,8 +138,8 @@ itkScaleSkewVersor3DTransformTest(int, char *[]) { // Rotate an itk::Point constexpr TransformType::InputPointType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputPointType p = pInit; - TransformType::OutputPointType q; + const TransformType::InputPointType p = pInit; + TransformType::OutputPointType q; q = versor.Transform(p); TransformType::OutputPointType r; @@ -168,8 +168,8 @@ itkScaleSkewVersor3DTransformTest(int, char *[]) { // Translate an itk::Vector TransformType::InputVectorType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputVectorType p = pInit; - TransformType::OutputVectorType q; + const TransformType::InputVectorType p = pInit; + TransformType::OutputVectorType q; q = versor.Transform(p); TransformType::OutputVectorType r; @@ -198,8 +198,8 @@ itkScaleSkewVersor3DTransformTest(int, char *[]) { // Translate an itk::CovariantVector TransformType::InputCovariantVectorType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputCovariantVectorType p = pInit; - TransformType::OutputCovariantVectorType q; + const TransformType::InputCovariantVectorType p = pInit; + TransformType::OutputCovariantVectorType q; q = versor.Transform(p); TransformType::OutputCovariantVectorType r; diff --git a/Modules/Core/Transform/test/itkScaleTransformTest.cxx b/Modules/Core/Transform/test/itkScaleTransformTest.cxx index 6a87a68fb44..9e48dbac60f 100644 --- a/Modules/Core/Transform/test/itkScaleTransformTest.cxx +++ b/Modules/Core/Transform/test/itkScaleTransformTest.cxx @@ -28,7 +28,7 @@ itkScaleTransformTest(int, char *[]) using TransformType = itk::ScaleTransform; - constexpr double epsilon = 1e-10; + constexpr double epsilon = 1e-10; constexpr unsigned int N = 3; @@ -37,7 +37,7 @@ itkScaleTransformTest(int, char *[]) /* Create a 3D identity transformation and show its parameters */ { - auto identityTransform = TransformType::New(); + auto identityTransform = TransformType::New(); TransformType::ScaleType scale = identityTransform->GetScale(); std::cout << "Scale from instantiating an identity transform: "; for (unsigned int j = 0; j < N; ++j) @@ -65,7 +65,7 @@ itkScaleTransformTest(int, char *[]) auto scaleTransform = TransformType::New(); TransformType::ScaleType::ValueType iscaleInit[3] = { 1, 4, 9 }; - TransformType::ScaleType iscale = iscaleInit; + TransformType::ScaleType iscale = iscaleInit; scaleTransform->SetScale(iscale); if (scaleTransform->GetFixedParameters().Size() != 3) @@ -99,8 +99,8 @@ itkScaleTransformTest(int, char *[]) { // scale an itk::Point constexpr TransformType::InputPointType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputPointType p = pInit; - TransformType::InputPointType q; + TransformType::InputPointType p = pInit; + TransformType::InputPointType q; for (unsigned int j = 0; j < N; ++j) { q[j] = p[j] * iscale[j]; @@ -130,8 +130,8 @@ itkScaleTransformTest(int, char *[]) { // Scale an itk::Vector TransformType::InputVectorType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputVectorType p = pInit; - TransformType::OutputVectorType q; + TransformType::InputVectorType p = pInit; + TransformType::OutputVectorType q; for (unsigned int j = 0; j < N; ++j) { q[j] = p[j] * iscale[j]; @@ -160,8 +160,8 @@ itkScaleTransformTest(int, char *[]) { // Scale an itk::CovariantVector TransformType::InputCovariantVectorType::ValueType pInit[3] = { 10, 10, 10 }; - TransformType::InputCovariantVectorType p = pInit; - TransformType::OutputCovariantVectorType q; + TransformType::InputCovariantVectorType p = pInit; + TransformType::OutputCovariantVectorType q; for (unsigned int j = 0; j < N; ++j) { q[j] = p[j] / iscale[j]; diff --git a/Modules/Core/Transform/test/itkScaleVersor3DTransformTest.cxx b/Modules/Core/Transform/test/itkScaleVersor3DTransformTest.cxx index 0b629abbcaf..33f227172ad 100644 --- a/Modules/Core/Transform/test/itkScaleVersor3DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkScaleVersor3DTransformTest.cxx @@ -91,7 +91,7 @@ itkScaleVersor3DTransformTest(int, char *[]) { std::cout << "Test initial rotation matrix " << std::endl; - auto transform = TransformType::New(); + auto transform = TransformType::New(); const MatrixType matrix = transform->GetMatrix(); std::cout << "Matrix = " << std::endl; std::cout << matrix << std::endl; @@ -151,8 +151,8 @@ itkScaleVersor3DTransformTest(int, char *[]) { // Rotate an itk::Point constexpr TransformType::InputPointType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputPointType p = pInit; - TransformType::OutputPointType q; + const TransformType::InputPointType p = pInit; + TransformType::OutputPointType q; q = versor.Transform(p); TransformType::OutputPointType r; @@ -181,8 +181,8 @@ itkScaleVersor3DTransformTest(int, char *[]) { // Translate an itk::Vector TransformType::InputVectorType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputVectorType p = pInit; - TransformType::OutputVectorType q; + const TransformType::InputVectorType p = pInit; + TransformType::OutputVectorType q; q = versor.Transform(p); TransformType::OutputVectorType r; @@ -211,8 +211,8 @@ itkScaleVersor3DTransformTest(int, char *[]) { // Translate an itk::CovariantVector TransformType::InputCovariantVectorType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputCovariantVectorType p = pInit; - TransformType::OutputCovariantVectorType q; + const TransformType::InputCovariantVectorType p = pInit; + TransformType::OutputCovariantVectorType q; q = versor.Transform(p); TransformType::OutputCovariantVectorType r; diff --git a/Modules/Core/Transform/test/itkSimilarity2DTransformTest.cxx b/Modules/Core/Transform/test/itkSimilarity2DTransformTest.cxx index 884114af655..11619011e2a 100644 --- a/Modules/Core/Transform/test/itkSimilarity2DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkSimilarity2DTransformTest.cxx @@ -49,9 +49,9 @@ itkSimilarity2DTransformTest(int, char *[]) std::cout << "==================================" << std::endl; std::cout << "Testing Similarity 2D Transform" << std::endl << std::endl; - constexpr double epsilon = 1e-10; + constexpr double epsilon = 1e-10; constexpr unsigned int N = 2; - bool Ok = true; + bool Ok = true; using SimilarityTransformType = itk::CenteredSimilarity2DTransform; auto transform = SimilarityTransformType::New(); @@ -61,8 +61,8 @@ itkSimilarity2DTransformTest(int, char *[]) transform->SetIdentity(); SimilarityTransformType::InputPointType::ValueType pInit[2] = { 10, 10 }; - SimilarityTransformType::InputPointType p = pInit; - SimilarityTransformType::OutputPointType r; + SimilarityTransformType::InputPointType p = pInit; + SimilarityTransformType::OutputPointType r; r = transform->TransformPoint(p); for (unsigned int i = 0; i < N; ++i) @@ -196,7 +196,7 @@ itkSimilarity2DTransformTest(int, char *[]) transform->SetAngle(0); SimilarityTransformType::OffsetType::ValueType ioffsetInit[2] = { 1, 4 }; - const SimilarityTransformType::OffsetType ioffset = ioffsetInit; + const SimilarityTransformType::OffsetType ioffset = ioffsetInit; transform->SetOffset(ioffset); @@ -385,7 +385,7 @@ itkSimilarity2DTransformTest(int, char *[]) TransformType::JacobianType approxJacobian = jacobian; for (unsigned int k = 0; k < t1->GetNumberOfParameters(); ++k) { - constexpr double delta = 0.001; + constexpr double delta = 0.001; TransformType::ParametersType plusParameters; TransformType::ParametersType minusParameters; @@ -543,7 +543,7 @@ itkSimilarity2DTransformTest(int, char *[]) TransformType::JacobianType approxJacobian = jacobian; for (unsigned int k = 0; k < t1->GetNumberOfParameters(); ++k) { - constexpr double delta = 0.001; + constexpr double delta = 0.001; TransformType::ParametersType plusParameters; TransformType::ParametersType minusParameters; diff --git a/Modules/Core/Transform/test/itkSimilarity3DTransformTest.cxx b/Modules/Core/Transform/test/itkSimilarity3DTransformTest.cxx index 0c3d9b99a1d..44b45e38cdc 100644 --- a/Modules/Core/Transform/test/itkSimilarity3DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkSimilarity3DTransformTest.cxx @@ -97,7 +97,7 @@ itkSimilarity3DTransformTest(int, char *[]) } { std::cout << "Test initial rotation matrix " << std::endl; - auto transform = TransformType::New(); + auto transform = TransformType::New(); const MatrixType matrix = transform->GetMatrix(); std::cout << "Matrix = " << std::endl; std::cout << matrix << std::endl; @@ -140,8 +140,8 @@ itkSimilarity3DTransformTest(int, char *[]) { // Rotate an itk::Point constexpr TransformType::InputPointType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputPointType p = pInit; - TransformType::OutputPointType q; + const TransformType::InputPointType p = pInit; + TransformType::OutputPointType q; q = versor.Transform(p); TransformType::OutputPointType r; @@ -170,8 +170,8 @@ itkSimilarity3DTransformTest(int, char *[]) { // Translate an itk::Vector TransformType::InputVectorType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputVectorType p = pInit; - TransformType::OutputVectorType q; + const TransformType::InputVectorType p = pInit; + TransformType::OutputVectorType q; q = versor.Transform(p); TransformType::OutputVectorType r; @@ -199,8 +199,8 @@ itkSimilarity3DTransformTest(int, char *[]) { // Translate an itk::CovariantVector TransformType::InputCovariantVectorType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputCovariantVectorType p = pInit; - TransformType::OutputCovariantVectorType q; + const TransformType::InputCovariantVectorType p = pInit; + TransformType::OutputCovariantVectorType q; q = versor.Transform(p); TransformType::OutputCovariantVectorType r; @@ -501,7 +501,7 @@ itkSimilarity3DTransformTest(int, char *[]) { // Testing SetMatrix() std::cout << "Testing SetMatrix() ... "; - bool Ok; + bool Ok; unsigned int par; MatrixType matrix; diff --git a/Modules/Core/Transform/test/itkSplineKernelTransformTest.cxx b/Modules/Core/Transform/test/itkSplineKernelTransformTest.cxx index ed9d4e7f615..cabcc3064fe 100644 --- a/Modules/Core/Transform/test/itkSplineKernelTransformTest.cxx +++ b/Modules/Core/Transform/test/itkSplineKernelTransformTest.cxx @@ -104,7 +104,7 @@ itkSplineKernelTransformTest(int, char *[]) { // Testing the number of parameters const EBSTransform2DType::ParametersType parameters1 = ebs2D->GetParameters(); - const unsigned int numberOfParameters = parameters1.Size(); + const unsigned int numberOfParameters = parameters1.Size(); if (numberOfParameters != 4 * 2) { std::cerr << "Number of parameters was not updated after" << std::endl; @@ -268,7 +268,7 @@ itkSplineKernelTransformTest(int, char *[]) } { TPSTransform2DType::JacobianPositionType testJacobian; - TPSTransform2DType::InputPointType testVector; + TPSTransform2DType::InputPointType testVector; testVector[0] = 0.0; testVector[1] = 1.0; bool exceptionCaught = false; @@ -456,8 +456,8 @@ itkSplineKernelTransformTest(int, char *[]) TPSTransform3DType::ParametersType parameters1 = tps3D->GetParameters(); tps3D->SetParameters(parameters1); TPSTransform3DType::ParametersType parameters2 = tps3D->GetParameters(); - const unsigned int numberOfParameters = parameters1.Size(); - constexpr double tolerance = 1e-7; + const unsigned int numberOfParameters = parameters1.Size(); + constexpr double tolerance = 1e-7; for (unsigned int pr = 0; pr < numberOfParameters; ++pr) { if (itk::Math::abs(parameters1[pr] - parameters2[pr]) > tolerance) diff --git a/Modules/Core/Transform/test/itkTransformCloneTest.cxx b/Modules/Core/Transform/test/itkTransformCloneTest.cxx index 15555dd93df..69a8857729b 100644 --- a/Modules/Core/Transform/test/itkTransformCloneTest.cxx +++ b/Modules/Core/Transform/test/itkTransformCloneTest.cxx @@ -59,7 +59,7 @@ itkTransformCloneTest(int, char *[]) { using AffineTransformType = itk::AffineTransform; using Transform3DType = itk::Transform; - auto affineXfrm = AffineTransformType::New(); + auto affineXfrm = AffineTransformType::New(); AffineTransformType::OutputVectorType axis; axis[0] = -1.0; axis[1] = 1.0; @@ -75,7 +75,7 @@ itkTransformCloneTest(int, char *[]) offset[2] = 32.768; affineXfrm->Translate(offset); - const Transform3DType::Pointer clonePtr = affineXfrm->Clone().GetPointer(); + const Transform3DType::Pointer clonePtr = affineXfrm->Clone().GetPointer(); const AffineTransformType::Pointer cloneAffineXfrm = dynamic_cast(clonePtr.GetPointer()); if (cloneAffineXfrm.IsNull()) diff --git a/Modules/Core/Transform/test/itkTransformGeometryImageFilterTest.cxx b/Modules/Core/Transform/test/itkTransformGeometryImageFilterTest.cxx index 7b396efaa3e..26f86a674d7 100644 --- a/Modules/Core/Transform/test/itkTransformGeometryImageFilterTest.cxx +++ b/Modules/Core/Transform/test/itkTransformGeometryImageFilterTest.cxx @@ -42,13 +42,13 @@ imagesDifferent(ImageType * baselineImage, ImageType * outputImage) { constexpr double tol = 1.e-3; // tolerance - typename ImageType::PointType origin = outputImage->GetOrigin(); + typename ImageType::PointType origin = outputImage->GetOrigin(); typename ImageType::DirectionType direction = outputImage->GetDirection(); - typename ImageType::SpacingType spacing = outputImage->GetSpacing(); + typename ImageType::SpacingType spacing = outputImage->GetSpacing(); - typename ImageType::PointType origin_d = baselineImage->GetOrigin(); + typename ImageType::PointType origin_d = baselineImage->GetOrigin(); typename ImageType::DirectionType direction_d = baselineImage->GetDirection(); - typename ImageType::SpacingType spacing_d = baselineImage->GetSpacing(); + typename ImageType::SpacingType spacing_d = baselineImage->GetSpacing(); // Image info validation bool result = false; // no difference by default diff --git a/Modules/Core/Transform/test/itkTransformsSetParametersTest.cxx b/Modules/Core/Transform/test/itkTransformsSetParametersTest.cxx index 879600929ca..e8266f4b088 100644 --- a/Modules/Core/Transform/test/itkTransformsSetParametersTest.cxx +++ b/Modules/Core/Transform/test/itkTransformsSetParametersTest.cxx @@ -72,7 +72,7 @@ TestKernelTransform(const char * name, KernelType *) kernel->SetSourceLandmarks(sourceLandmarks); kernel->SetTargetLandmarks(targetLandmarks); - const itk::ModifiedTimeType beginMTime = kernel->GetMTime(); + const itk::ModifiedTimeType beginMTime = kernel->GetMTime(); typename KernelType::ParametersType kernelParams = kernel->GetParameters(); kernelParams[0] = 1.0; kernel->SetParameters(kernelParams); diff --git a/Modules/Core/Transform/test/itkVersorRigid3DTransformTest.cxx b/Modules/Core/Transform/test/itkVersorRigid3DTransformTest.cxx index b0ca65d3a30..c1bc83c6e46 100644 --- a/Modules/Core/Transform/test/itkVersorRigid3DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkVersorRigid3DTransformTest.cxx @@ -88,7 +88,7 @@ itkVersorRigid3DTransformTest(int, char *[]) { std::cout << "Test initial rotation matrix " << std::endl; - auto transform = TransformType::New(); + auto transform = TransformType::New(); const MatrixType matrix = transform->GetMatrix(); std::cout << "Matrix = " << std::endl; std::cout << matrix << std::endl; @@ -132,8 +132,8 @@ itkVersorRigid3DTransformTest(int, char *[]) { // Rotate an itk::Point constexpr TransformType::InputPointType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputPointType p = pInit; - TransformType::OutputPointType q; + const TransformType::InputPointType p = pInit; + TransformType::OutputPointType q; q = versor.Transform(p); TransformType::OutputPointType r; @@ -162,8 +162,8 @@ itkVersorRigid3DTransformTest(int, char *[]) { // Translate an itk::Vector TransformType::InputVectorType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputVectorType p = pInit; - TransformType::OutputVectorType q; + const TransformType::InputVectorType p = pInit; + TransformType::OutputVectorType q; q = versor.Transform(p); TransformType::OutputVectorType r; @@ -192,8 +192,8 @@ itkVersorRigid3DTransformTest(int, char *[]) { // Translate an itk::CovariantVector TransformType::InputCovariantVectorType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputCovariantVectorType p = pInit; - TransformType::OutputCovariantVectorType q; + const TransformType::InputCovariantVectorType p = pInit; + TransformType::OutputCovariantVectorType q; q = versor.Transform(p); TransformType::OutputCovariantVectorType r; @@ -426,7 +426,7 @@ itkVersorRigid3DTransformTest(int, char *[]) // Testing SetMatrix() std::cout << "Testing SetMatrix() ... "; unsigned int par; - bool Ok; + bool Ok; MatrixType matrix; diff --git a/Modules/Core/Transform/test/itkVersorTransformTest.cxx b/Modules/Core/Transform/test/itkVersorTransformTest.cxx index 14b12354e20..88cf30f9cec 100644 --- a/Modules/Core/Transform/test/itkVersorTransformTest.cxx +++ b/Modules/Core/Transform/test/itkVersorTransformTest.cxx @@ -85,7 +85,7 @@ itkVersorTransformTest(int, char *[]) { std::cout << "Test initial rotation matrix " << std::endl; - auto transform = TransformType::New(); + auto transform = TransformType::New(); const MatrixType matrix = transform->GetMatrix(); std::cout << "Matrix = " << std::endl; std::cout << matrix << std::endl; @@ -129,8 +129,8 @@ itkVersorTransformTest(int, char *[]) { // Rotate an itk::Point constexpr TransformType::InputPointType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputPointType p = pInit; - TransformType::OutputPointType q; + const TransformType::InputPointType p = pInit; + TransformType::OutputPointType q; q = versor.Transform(p); TransformType::OutputPointType r; @@ -159,8 +159,8 @@ itkVersorTransformTest(int, char *[]) { // Translate an itk::Vector TransformType::InputVectorType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputVectorType p = pInit; - TransformType::OutputVectorType q; + const TransformType::InputVectorType p = pInit; + TransformType::OutputVectorType q; q = versor.Transform(p); TransformType::OutputVectorType r; @@ -189,8 +189,8 @@ itkVersorTransformTest(int, char *[]) { // Translate an itk::CovariantVector TransformType::InputCovariantVectorType::ValueType pInit[3] = { 1, 4, 9 }; - const TransformType::InputCovariantVectorType p = pInit; - TransformType::OutputCovariantVectorType q; + const TransformType::InputCovariantVectorType p = pInit; + TransformType::OutputCovariantVectorType q; q = versor.Transform(p); TransformType::OutputCovariantVectorType r; @@ -362,7 +362,7 @@ itkVersorTransformTest(int, char *[]) // Testing SetMatrix() std::cout << "Testing SetMatrix() ... "; unsigned int par; - bool Ok; + bool Ok; MatrixType matrix; diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionFunction.h b/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionFunction.h index 5d311eccb8f..c65317dc34a 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionFunction.h @@ -253,8 +253,8 @@ class ITK_TEMPLATE_EXPORT AnisotropicDiffusionFunction : public FiniteDifference } private: - double m_AverageGradientMagnitudeSquared{}; - double m_ConductanceParameter{}; + double m_AverageGradientMagnitudeSquared{}; + double m_ConductanceParameter{}; TimeStepType m_TimeStep{}; }; } // end namespace itk diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionImageFilter.h b/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionImageFilter.h index 2a577967fea..728e8f532a9 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionImageFilter.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionImageFilter.h @@ -152,10 +152,10 @@ class ITK_TEMPLATE_EXPORT AnisotropicDiffusionImageFilter bool m_GradientMagnitudeIsFixed{}; private: - double m_ConductanceParameter{}; - double m_ConductanceScalingParameter{}; + double m_ConductanceParameter{}; + double m_ConductanceScalingParameter{}; unsigned int m_ConductanceScalingUpdateInterval{}; - double m_FixedAverageGradientMagnitude{}; + double m_FixedAverageGradientMagnitude{}; TimeStepType m_TimeStep{}; }; diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureNDAnisotropicDiffusionFunction.h b/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureNDAnisotropicDiffusionFunction.h index 7d97fecf515..82c4321130b 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureNDAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureNDAnisotropicDiffusionFunction.h @@ -105,8 +105,8 @@ class ITK_TEMPLATE_EXPORT CurvatureNDAnisotropicDiffusionFunction : public Scala /** Compute incremental update. */ PixelType ComputeUpdate(const NeighborhoodType & it, - void * globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0)) override; + void * globalData, + const FloatOffsetType & offset = FloatOffsetType(0.0)) override; /** This method is called prior to each iteration of the solver. */ void diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureNDAnisotropicDiffusionFunction.hxx b/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureNDAnisotropicDiffusionFunction.hxx index 6a5885efa3b..d11e97b1dde 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureNDAnisotropicDiffusionFunction.hxx +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureNDAnisotropicDiffusionFunction.hxx @@ -71,8 +71,8 @@ CurvatureNDAnisotropicDiffusionFunction::CurvatureNDAnisotropicDiffusion template auto CurvatureNDAnisotropicDiffusionFunction::ComputeUpdate(const NeighborhoodType & it, - void * itkNotUsed(globalData), - const FloatOffsetType & itkNotUsed(offset)) -> PixelType + void * itkNotUsed(globalData), + const FloatOffsetType & itkNotUsed(offset)) -> PixelType { // Calculate the partial derivatives for each dimension double dx_forward[ImageDimension]; diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkGradientNDAnisotropicDiffusionFunction.h b/Modules/Filtering/AnisotropicSmoothing/include/itkGradientNDAnisotropicDiffusionFunction.h index f3ee6f4e648..4a4acaf534e 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkGradientNDAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkGradientNDAnisotropicDiffusionFunction.h @@ -92,8 +92,8 @@ class ITK_TEMPLATE_EXPORT GradientNDAnisotropicDiffusionFunction : public Scalar /** Compute the equation value. */ PixelType ComputeUpdate(const NeighborhoodType & it, - void * globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0)) override; + void * globalData, + const FloatOffsetType & offset = FloatOffsetType(0.0)) override; /** This method is called prior to each iteration of the solver. */ void diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkScalarAnisotropicDiffusionFunction.hxx b/Modules/Filtering/AnisotropicSmoothing/include/itkScalarAnisotropicDiffusionFunction.hxx index 798f8d83765..fd4055b85cd 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkScalarAnisotropicDiffusionFunction.hxx +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkScalarAnisotropicDiffusionFunction.hxx @@ -34,17 +34,17 @@ ScalarAnisotropicDiffusionFunction::CalculateAverageGradientMagnitudeSqu using BFC_type = NeighborhoodAlgorithm::ImageBoundaryFacesCalculator; using AccumulateType = typename NumericTraits::AccumulateType; - unsigned int i; - ZeroFluxNeumannBoundaryCondition bc; - AccumulateType accumulator; - PixelRealType val; - SizeValueType counter; - BFC_type bfc; - typename RNI_type::RadiusType radius; + unsigned int i; + ZeroFluxNeumannBoundaryCondition bc; + AccumulateType accumulator; + PixelRealType val; + SizeValueType counter; + BFC_type bfc; + typename RNI_type::RadiusType radius; typename BFC_type::FaceListType::iterator fit; - RNI_type iterator_list[ImageDimension]; - SNI_type face_iterator_list[ImageDimension]; + RNI_type iterator_list[ImageDimension]; + SNI_type face_iterator_list[ImageDimension]; DerivativeOperator operator_list[ImageDimension]; SizeValueType Stride[ImageDimension]; diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkVectorAnisotropicDiffusionFunction.hxx b/Modules/Filtering/AnisotropicSmoothing/include/itkVectorAnisotropicDiffusionFunction.hxx index 6d59f7686eb..ed9647834e2 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkVectorAnisotropicDiffusionFunction.hxx +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkVectorAnisotropicDiffusionFunction.hxx @@ -49,13 +49,13 @@ VectorAnisotropicDiffusionFunction::CalculateAverageGradientMagnitudeSqu } // Get the various region "faces" that are on the data set boundary. - BFC_type bfc; + BFC_type bfc; typename BFC_type::FaceListType faceList = bfc(ip, ip->GetRequestedRegion(), radius); - auto fit = faceList.begin(); + auto fit = faceList.begin(); // Now do the actual processing double accumulator = 0.0; - auto counter = SizeValueType{}; + auto counter = SizeValueType{}; // First process the non-boundary region @@ -87,7 +87,7 @@ VectorAnisotropicDiffusionFunction::CalculateAverageGradientMagnitudeSqu // Go on to the next region(s). These are on the boundary faces. ++fit; const VectorNeighborhoodInnerProduct SIP; - SNI_type face_iterator_list[ImageDimension]; + SNI_type face_iterator_list[ImageDimension]; while (fit != faceList.end()) { for (unsigned int i = 0; i < ImageDimension; ++i) diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureNDAnisotropicDiffusionFunction.h b/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureNDAnisotropicDiffusionFunction.h index 36a76c3eaf5..a9ca29d66af 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureNDAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureNDAnisotropicDiffusionFunction.h @@ -75,8 +75,8 @@ class ITK_TEMPLATE_EXPORT VectorCurvatureNDAnisotropicDiffusionFunction /** Compute the equation value. */ PixelType ComputeUpdate(const NeighborhoodType & it, - void * globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0)) override; + void * globalData, + const FloatOffsetType & offset = FloatOffsetType(0.0)) override; /** This method is called prior to each iteration of the solver. */ void diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkVectorGradientNDAnisotropicDiffusionFunction.h b/Modules/Filtering/AnisotropicSmoothing/include/itkVectorGradientNDAnisotropicDiffusionFunction.h index a793c6719a7..0631ec68c32 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkVectorGradientNDAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkVectorGradientNDAnisotropicDiffusionFunction.h @@ -77,8 +77,8 @@ class ITK_TEMPLATE_EXPORT VectorGradientNDAnisotropicDiffusionFunction /** Compute the equation value. */ PixelType ComputeUpdate(const NeighborhoodType & it, - void * globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0)) override; + void * globalData, + const FloatOffsetType & offset = FloatOffsetType(0.0)) override; /** This method is called prior to each iteration of the solver. */ void diff --git a/Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest2.cxx b/Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest2.cxx index 92350560a6d..819a113a51f 100644 --- a/Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest2.cxx +++ b/Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest2.cxx @@ -38,8 +38,8 @@ namespace bool SameImage(ImagePointer testImage, ImagePointer baselineImage) { - constexpr PixelType intensityTolerance = .001; - constexpr int radiusTolerance = 0; + constexpr PixelType intensityTolerance = .001; + constexpr int radiusTolerance = 0; constexpr unsigned long numberOfPixelTolerance = 0; using DiffType = itk::Testing::ComparisonImageFilter; diff --git a/Modules/Filtering/AnisotropicSmoothing/test/itkMinMaxCurvatureFlowImageFilterTest.cxx b/Modules/Filtering/AnisotropicSmoothing/test/itkMinMaxCurvatureFlowImageFilterTest.cxx index bdb9500744f..d657cfc95f6 100644 --- a/Modules/Filtering/AnisotropicSmoothing/test/itkMinMaxCurvatureFlowImageFilterTest.cxx +++ b/Modules/Filtering/AnisotropicSmoothing/test/itkMinMaxCurvatureFlowImageFilterTest.cxx @@ -43,10 +43,10 @@ constexpr unsigned int MAXRUNS = 5; // maximum number of runs template int testMinMaxCurvatureFlow(itk::Size & size, - double radius, - int numberOfRuns, - unsigned int niter[], - unsigned long radii[]); + double radius, + int numberOfRuns, + unsigned int niter[], + unsigned long radii[]); /** * This file tests the functionality of the MinMaxCurvatureFlowImageFilter. @@ -67,10 +67,10 @@ itkMinMaxCurvatureFlowImageFilterTest(int, char *[]) size2D[1] = 32; double radius = 10.0; // numberOfRuns = 2; /* reduced to speedup purify */ - int numberOfRuns = 1; - unsigned int niter[MAXRUNS] = { 100, 100 }; + int numberOfRuns = 1; + unsigned int niter[MAXRUNS] = { 100, 100 }; unsigned long radii[MAXRUNS] = { 1, 3 }; - const int err2D = testMinMaxCurvatureFlow(size2D, radius, numberOfRuns, niter, radii); + const int err2D = testMinMaxCurvatureFlow(size2D, radius, numberOfRuns, niter, radii); /* Dummy tests to test 3D and ND. @@ -116,11 +116,11 @@ itkMinMaxCurvatureFlowImageFilterTest(int, char *[]) template int -testMinMaxCurvatureFlow(itk::Size & size, // ND image size - double radius, // ND-sphere radius - int numberOfRuns, // number of times to run the filter - unsigned int niter[], // number of iterations - unsigned long radii[] // stencil radius +testMinMaxCurvatureFlow(itk::Size & size, // ND image size + double radius, // ND-sphere radius + int numberOfRuns, // number of times to run the filter + unsigned int niter[], // number of iterations + unsigned long radii[] // stencil radius ) { @@ -140,10 +140,10 @@ testMinMaxCurvatureFlow(itk::Size & size, // ND image s * Create an image containing a circle/sphere with intensity of 0 * and background of 255 with added salt and pepper noise. */ - const double sqrRadius = itk::Math::sqr(radius); // radius of the circle/sphere - constexpr double fractionNoise = 0.30; // salt & pepper noise fraction - constexpr PixelType foreground = 0.0; // intensity value of the foreground - constexpr PixelType background = 255.0; // intensity value of the background + const double sqrRadius = itk::Math::sqr(radius); // radius of the circle/sphere + constexpr double fractionNoise = 0.30; // salt & pepper noise fraction + constexpr PixelType foreground = 0.0; // intensity value of the foreground + constexpr PixelType background = 255.0; // intensity value of the background std::cout << "Create an image of circle/sphere with noise" << std::endl; auto circleImage = ImageType::New(); @@ -162,7 +162,7 @@ testMinMaxCurvatureFlow(itk::Size & size, // ND image s for (; !circleIter.IsAtEnd(); ++circleIter) { typename ImageType::IndexType index = circleIter.GetIndex(); - float value; + float value; double lhs = 0.0; for (j = 0; j < ImageDimension; ++j) @@ -197,7 +197,7 @@ testMinMaxCurvatureFlow(itk::Size & size, // ND image s denoiser->SetTimeStep(0.05); // attach a progress watcher to the denoiser - ShowProgressObject progressWatch(denoiser); + ShowProgressObject progressWatch(denoiser); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); @@ -247,7 +247,7 @@ testMinMaxCurvatureFlow(itk::Size & size, // ND image s for (; !outIter.IsAtEnd(); ++outIter) { typename ImageType::IndexType index = outIter.GetIndex(); - const PixelType value = outIter.Get(); + const PixelType value = outIter.Get(); double lhs = 0.0; for (j = 0; j < ImageDimension; ++j) diff --git a/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.h b/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.h index 578f47c63f2..41e66df25d2 100644 --- a/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.h +++ b/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.h @@ -170,10 +170,10 @@ class ITK_TEMPLATE_EXPORT AntiAliasBinaryImageFilter : public SparseFieldLevelSe /** Overridden from the parent class to introduce a constraint on * surface flow under certain conditions. */ ValueType - CalculateUpdateValue(const IndexType & idx, + CalculateUpdateValue(const IndexType & idx, const TimeStepType & dt, - const ValueType & value, - const ValueType & change) override; + const ValueType & value, + const ValueType & change) override; /** Overridden from ProcessObject to set certain values before starting the * finite difference solver and then create an appropriate output */ diff --git a/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.hxx b/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.hxx index 7dba3e3735e..aa4a63a8467 100644 --- a/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.hxx +++ b/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.hxx @@ -56,15 +56,15 @@ AntiAliasBinaryImageFilter::AntiAliasBinaryImageFilte template auto -AntiAliasBinaryImageFilter::CalculateUpdateValue(const IndexType & idx, +AntiAliasBinaryImageFilter::CalculateUpdateValue(const IndexType & idx, const TimeStepType & dt, - const ValueType & value, - const ValueType & change) -> ValueType + const ValueType & value, + const ValueType & change) -> ValueType { // This method introduces the constraint on the flow of the surface. const BinaryValueType binary_val = m_InputImage->GetPixel(idx); - const ValueType new_value = value + dt * change; + const ValueType new_value = value + dt * change; if (Math::ExactlyEquals(binary_val, m_UpperBinaryValue)) { diff --git a/Modules/Filtering/AntiAlias/test/itkAntiAliasBinaryImageFilterTest.cxx b/Modules/Filtering/AntiAlias/test/itkAntiAliasBinaryImageFilterTest.cxx index 774bfd4b581..2a023277745 100644 --- a/Modules/Filtering/AntiAlias/test/itkAntiAliasBinaryImageFilterTest.cxx +++ b/Modules/Filtering/AntiAlias/test/itkAntiAliasBinaryImageFilterTest.cxx @@ -98,9 +98,9 @@ itkAntiAliasBinaryImageFilterTest(int argc, char * argv[]) itk::AntiAliasBinaryImageFilter::New(); // Create a binary image of a sphere. - auto image = BinaryImageType::New(); - BinaryImageType::RegionType region; - BinaryImageType::RegionType::SizeType sz; + auto image = BinaryImageType::New(); + BinaryImageType::RegionType region; + BinaryImageType::RegionType::SizeType sz; BinaryImageType::RegionType::IndexType idx; for (unsigned int k = 0; k < 3; ++k) { diff --git a/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.h b/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.h index 75297f79349..4beb838af73 100644 --- a/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.h +++ b/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.h @@ -141,9 +141,9 @@ class ITK_TEMPLATE_EXPORT MRASlabIdentifier : public Object * for average calculation. In a sense, it's sampling size per slice. */ unsigned int m_NumberOfSamples{}; - int m_SlicingDirection{}; - ImagePixelType m_BackgroundMinimumThreshold{}; - double m_Tolerance{}; + int m_SlicingDirection{}; + ImagePixelType m_BackgroundMinimumThreshold{}; + double m_Tolerance{}; SlabRegionVectorType m_Slabs{}; }; } // end namespace itk diff --git a/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.hxx b/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.hxx index 02a442f158d..b0e4067324a 100644 --- a/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.hxx +++ b/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.hxx @@ -47,18 +47,18 @@ MRASlabIdentifier::GenerateSlabRegions() itkExceptionMacro("ERROR: This algorithm only works with 3D images."); } - ImageSizeType size; + ImageSizeType size; ImageRegionType region; - ImageIndexType index; + ImageIndexType index; region = m_Image->GetLargestPossibleRegion(); size = region.GetSize(); index = region.GetIndex(); const IndexValueType firstSlice = index[m_SlicingDirection]; const IndexValueType lastSlice = firstSlice + size[m_SlicingDirection]; - const SizeValueType totalSlices = size[m_SlicingDirection]; + const SizeValueType totalSlices = size[m_SlicingDirection]; - double sum; + double sum; std::vector avgMin(totalSlices); // calculate minimum intensities for each slice ImagePixelType pixel; @@ -73,7 +73,7 @@ MRASlabIdentifier::GenerateSlabRegions() size[m_SlicingDirection] = 1; region.SetSize(size); - SizeValueType count = 0; + SizeValueType count = 0; IndexValueType currentSlice = firstSlice; while (currentSlice < lastSlice) { @@ -133,11 +133,11 @@ MRASlabIdentifier::GenerateSlabRegions() double prevSign = *am_iter - average; double avgMinValue; - ImageIndexType slabIndex; + ImageIndexType slabIndex; ImageRegionType slabRegion; - ImageSizeType slabSize; + ImageSizeType slabSize; - SizeValueType slabLength = 0; + SizeValueType slabLength = 0; IndexValueType slabBegin = firstSlice; slabSize = size; slabIndex = index; diff --git a/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.h b/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.h index b713b3ecf22..6fc6e505d21 100644 --- a/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.h +++ b/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.h @@ -597,9 +597,9 @@ class ITK_TEMPLATE_EXPORT MRIBiasFieldCorrectionFilter : public ImageToImageFilt bool m_UsingBiasFieldCorrection{ true }; bool m_GeneratingOutput{ true }; - unsigned int m_SlabNumberOfSamples{ 200 }; + unsigned int m_SlabNumberOfSamples{ 200 }; InputImagePixelType m_SlabBackgroundMinimumThreshold{}; - double m_SlabTolerance{ 0.0 }; + double m_SlabTolerance{ 0.0 }; /** The degree of the bias field estimate. */ int m_BiasFieldDegree{ 3 }; diff --git a/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx b/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx index 0305cd5d5b0..f7d0f181585 100644 --- a/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx +++ b/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx @@ -81,7 +81,7 @@ MRIBiasEnergyFunction::GetValue(const Parameters if (m_SamplingFactor[0] == 1 && m_SamplingFactor[1] == 1 && m_SamplingFactor[2] == 1) { - ImageRegionIterator iIter(m_Image, m_Region); + ImageRegionIterator iIter(m_Image, m_Region); typename TBiasField::SimpleForwardIterator bIter(m_BiasField); bIter.Begin(); @@ -118,9 +118,9 @@ MRIBiasEnergyFunction::GetValue(const Parameters } else { - typename ImageType::IndexType origIndex = m_Region.GetIndex(); + typename ImageType::IndexType origIndex = m_Region.GetIndex(); typename TBiasField::IndexType indexBias(SpaceDimension); - typename ImageType::SizeType size = m_Region.GetSize(); + typename ImageType::SizeType size = m_Region.GetSize(); // Use indexing for incomplete sampling if (!m_Mask) @@ -426,13 +426,13 @@ MRIBiasFieldCorrectionFilter::Initialize( template auto MRIBiasFieldCorrectionFilter::EstimateBiasField(InputImageRegionType region, - unsigned int degree, + unsigned int degree, int maximumIteration) -> BiasFieldType { itkDebugMacro("Estimating bias field "); - bool cleanCoeffs = false; + bool cleanCoeffs = false; BiasFieldType::DomainSizeType biasSize; this->GetBiasFieldSize(region, biasSize); BiasFieldType bias(static_cast(biasSize.size()), degree, biasSize); @@ -489,7 +489,7 @@ MRIBiasFieldCorrectionFilter::EstimateBia scales.Fill(100); optimizer->SetScales(scales); - const int noOfBiasFieldCoefficients = bias.GetNumberOfCoefficients(); + const int noOfBiasFieldCoefficients = bias.GetNumberOfCoefficients(); typename EnergyFunctionType::ParametersType initialPosition(noOfBiasFieldCoefficients); for (int i = 0; i < noOfBiasFieldCoefficients; ++i) { @@ -531,13 +531,13 @@ MRIBiasFieldCorrectionFilter::EstimateBia template void -MRIBiasFieldCorrectionFilter::CorrectImage(BiasFieldType & bias, +MRIBiasFieldCorrectionFilter::CorrectImage(BiasFieldType & bias, InputImageRegionType region) { itkDebugMacro("Correcting the image "); using Pixel = InternalImagePixelType; ImageRegionIterator iIter(m_InternalInput, region); - BiasFieldType::SimpleForwardIterator bIter(&bias); + BiasFieldType::SimpleForwardIterator bIter(&bias); BiasFieldType::DomainSizeType biasSize; this->GetBiasFieldSize(region, biasSize); @@ -586,12 +586,12 @@ MRIBiasFieldCorrectionFilter::CorrectInte const IndexValueType lastSlice = region.GetIndex()[m_SlicingDirection] + static_cast(region.GetSize()[m_SlicingDirection]); InputImageRegionType sliceRegion; - InputImageIndexType index = region.GetIndex(); - InputImageSizeType size = region.GetSize(); + InputImageIndexType index = region.GetIndex(); + InputImageSizeType size = region.GetSize(); sliceRegion.SetSize(size); BiasFieldType bias = this->EstimateBiasField(sliceRegion, 0, m_InterSliceCorrectionMaximumIteration); - const double globalBiasCoef = bias.GetCoefficients()[0]; + const double globalBiasCoef = bias.GetCoefficients()[0]; size[m_SlicingDirection] = 1; sliceRegion.SetSize(size); @@ -649,7 +649,7 @@ MRIBiasFieldCorrectionFilter::GenerateDat this->GetBiasFieldSize(*iter, biasSize); BiasFieldType bias(static_cast(biasSize.size()), m_BiasFieldDegree, biasSize); - const int nCoef = bias.GetNumberOfCoefficients(); + const int nCoef = bias.GetNumberOfCoefficients(); std::vector lastBiasCoef; lastBiasCoef.resize(nCoef); for (int i = 0; i < nCoef; ++i) @@ -830,11 +830,11 @@ MRIBiasFieldCorrectionFilter::ExpImage(In template void MRIBiasFieldCorrectionFilter::GetBiasFieldSize( - InputImageRegionType region, + InputImageRegionType region, BiasFieldType::DomainSizeType & biasSize) { InputImageSizeType size = region.GetSize(); - int biasDim = 0; + int biasDim = 0; for (unsigned int dim = 0; dim < ImageDimension; ++dim) { if (size[dim] > 1) @@ -860,10 +860,10 @@ template void MRIBiasFieldCorrectionFilter::AdjustSlabRegions( SlabRegionVectorType & slabs, - OutputImageRegionType requestedRegion) + OutputImageRegionType requestedRegion) { OutputImageIndexType indexFirst = requestedRegion.GetIndex(); - OutputImageSizeType size = requestedRegion.GetSize(); + OutputImageSizeType size = requestedRegion.GetSize(); OutputImageIndexType indexLast = indexFirst; for (SizeValueType i = 0; i < ImageDimension; ++i) @@ -875,7 +875,7 @@ MRIBiasFieldCorrectionFilter::AdjustSlabR const IndexValueType coordLast = indexLast[m_SlicingDirection]; - OutputImageSizeType tempSize = size; + OutputImageSizeType tempSize = size; OutputImageIndexType tempIndex = indexFirst; auto iter = slabs.begin(); diff --git a/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.h b/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.h index 76930f0a916..39d9e24c410 100644 --- a/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.h +++ b/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.h @@ -420,29 +420,29 @@ class ITK_TEMPLATE_EXPORT N4BiasFieldCorrectionImageFilter : public ImageToImage CalculateConvergenceMeasurement(const RealImageType *, const RealImageType *) const; MaskPixelType m_MaskLabel{}; - bool m_UseMaskLabel{ false }; + bool m_UseMaskLabel{ false }; // Parameters for deconvolution with Wiener filter unsigned int m_NumberOfHistogramBins{ 200 }; - RealType m_WienerFilterNoise{ static_cast(0.01) }; - RealType m_BiasFieldFullWidthAtHalfMaximum{ static_cast(0.15) }; + RealType m_WienerFilterNoise{ static_cast(0.01) }; + RealType m_BiasFieldFullWidthAtHalfMaximum{ static_cast(0.15) }; // Convergence parameters VariableSizeArrayType m_MaximumNumberOfIterations{}; - unsigned int m_ElapsedIterations{ 0 }; - RealType m_ConvergenceThreshold{ static_cast(0.001) }; - RealType m_CurrentConvergenceMeasurement{}; - unsigned int m_CurrentLevel{ 0 }; + unsigned int m_ElapsedIterations{ 0 }; + RealType m_ConvergenceThreshold{ static_cast(0.001) }; + RealType m_CurrentConvergenceMeasurement{}; + unsigned int m_CurrentLevel{ 0 }; // B-spline fitting parameters typename BiasFieldControlPointLatticeType::Pointer m_LogBiasFieldControlPointLattice{}; unsigned int m_SplineOrder{ 3 }; - ArrayType m_NumberOfControlPoints{}; - ArrayType m_NumberOfFittingLevels{}; + ArrayType m_NumberOfControlPoints{}; + ArrayType m_NumberOfFittingLevels{}; }; } // end namespace itk diff --git a/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.hxx b/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.hxx index 8844e349f45..a5270363cf1 100644 --- a/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.hxx +++ b/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.hxx @@ -117,13 +117,13 @@ N4BiasFieldCorrectionImageFilter::Generat ImageAlgorithm::Copy(inputImage, logInputImage.GetPointer(), inputRegion, inputRegion); - const auto maskImageBufferRange = MakeImageBufferRange(maskImage); - const auto confidenceImageBufferRange = MakeImageBufferRange(confidenceImage); + const auto maskImageBufferRange = MakeImageBufferRange(maskImage); + const auto confidenceImageBufferRange = MakeImageBufferRange(confidenceImage); const MaskPixelType maskLabel = this->GetMaskLabel(); - const bool useMaskLabel = this->GetUseMaskLabel(); + const bool useMaskLabel = this->GetUseMaskLabel(); const ImageBufferRange logInputImageBufferRange{ *logInputImage }; - const size_t numberOfPixels = logInputImageBufferRange.size(); + const size_t numberOfPixels = logInputImageBufferRange.size(); // Number of pixels of the input image that are included with the filter. size_t numberOfIncludedPixels = 0; @@ -242,7 +242,7 @@ N4BiasFieldCorrectionImageFilter::Generat using CustomBinaryFilter = itk::BinaryGeneratorImageFilter; auto expAndDivFilter = CustomBinaryFilter::New(); auto expAndDivLambda = [](const typename InputImageType::PixelType & input, - const typename RealImageType::PixelType & biasField) -> + const typename RealImageType::PixelType & biasField) -> typename OutputImageType::PixelType { return static_cast(input / std::exp(biasField)); }; @@ -258,12 +258,12 @@ template void N4BiasFieldCorrectionImageFilter::SharpenImage( const RealImageType * unsharpenedImage, - RealImageType * sharpenedImage) const + RealImageType * sharpenedImage) const { - const auto maskImageBufferRange = MakeImageBufferRange(this->GetMaskImage()); - const auto confidenceImageBufferRange = MakeImageBufferRange(this->GetConfidenceImage()); + const auto maskImageBufferRange = MakeImageBufferRange(this->GetMaskImage()); + const auto confidenceImageBufferRange = MakeImageBufferRange(this->GetConfidenceImage()); const MaskPixelType maskLabel = this->GetMaskLabel(); - const bool useMaskLabel = this->GetUseMaskLabel(); + const bool useMaskLabel = this->GetUseMaskLabel(); // Build the histogram for the uncorrected image. Store copy // in a vnl_vector to utilize vnl FFT routines. Note that variables @@ -273,7 +273,7 @@ N4BiasFieldCorrectionImageFilter::Sharpen RealType binMaximum = NumericTraits::NonpositiveMin(); RealType binMinimum = NumericTraits::max(); - const auto unsharpenedImageBufferRange = MakeImageBufferRange(unsharpenedImage); + const auto unsharpenedImageBufferRange = MakeImageBufferRange(unsharpenedImage); const size_t numberOfPixels = unsharpenedImageBufferRange.size(); for (size_t indexValue = 0; indexValue < numberOfPixels; ++indexValue) @@ -308,9 +308,9 @@ N4BiasFieldCorrectionImageFilter::Sharpen { const RealType pixel = unsharpenedImageBufferRange[indexValue]; - const RealType cidx = (static_cast(pixel) - binMinimum) / histogramSlope; + const RealType cidx = (static_cast(pixel) - binMinimum) / histogramSlope; const unsigned int idx = itk::Math::floor(cidx); - const RealType offset = cidx - static_cast(idx); + const RealType offset = cidx - static_cast(idx); if (offset == 0.0) { @@ -455,7 +455,7 @@ N4BiasFieldCorrectionImageFilter::Sharpen (!useMaskLabel && maskImageBufferRange[indexValue] != MaskPixelType{})) && (confidenceImageBufferRange.empty() || confidenceImageBufferRange[indexValue] > 0.0)) { - const RealType cidx = (unsharpenedImageBufferRange[indexValue] - binMinimum) / histogramSlope; + const RealType cidx = (unsharpenedImageBufferRange[indexValue] - binMinimum) / histogramSlope; const unsigned int idx = itk::Math::floor(cidx); RealType correctedPixel = 0; @@ -476,7 +476,7 @@ template typename N4BiasFieldCorrectionImageFilter::RealImagePointer N4BiasFieldCorrectionImageFilter::UpdateBiasFieldEstimate( RealImageType * fieldEstimate, - const size_t numberOfIncludedPixels) + const size_t numberOfIncludedPixels) { // Temporarily set the direction cosine to identity since the B-spline // approximation algorithm works in parametric space and not physical @@ -485,8 +485,8 @@ N4BiasFieldCorrectionImageFilter::UpdateB identity.SetIdentity(); const typename ScalarImageType::RegionType & bufferedRegion = fieldEstimate->GetBufferedRegion(); - const SizeValueType numberOfPixels = bufferedRegion.GetNumberOfPixels(); - const bool filterHandlesMemory = false; + const SizeValueType numberOfPixels = bufferedRegion.GetNumberOfPixels(); + const bool filterHandlesMemory = false; using ImporterType = ImportImageFilter; auto importer = ImporterType::New(); @@ -500,19 +500,19 @@ N4BiasFieldCorrectionImageFilter::UpdateB const typename ImporterType::OutputImageType * parametricFieldEstimate = importer->GetOutput(); const PointSetPointer fieldPoints = PointSetType::New(); - auto & pointSTLContainer = fieldPoints->GetPoints()->CastToSTLContainer(); + auto & pointSTLContainer = fieldPoints->GetPoints()->CastToSTLContainer(); pointSTLContainer.reserve(numberOfIncludedPixels); auto & pointDataSTLContainer = fieldPoints->GetPointData()->CastToSTLContainer(); pointDataSTLContainer.reserve(numberOfIncludedPixels); - auto weights = BSplineFilterType::WeightsContainerType::New(); + auto weights = BSplineFilterType::WeightsContainerType::New(); auto & weightSTLContainer = weights->CastToSTLContainer(); weightSTLContainer.reserve(numberOfIncludedPixels); - const auto maskImageBufferRange = MakeImageBufferRange(this->GetMaskImage()); - const auto confidenceImageBufferRange = MakeImageBufferRange(this->GetConfidenceImage()); + const auto maskImageBufferRange = MakeImageBufferRange(this->GetMaskImage()); + const auto confidenceImageBufferRange = MakeImageBufferRange(this->GetConfidenceImage()); const MaskPixelType maskLabel = this->GetMaskLabel(); - const bool useMaskLabel = this->GetUseMaskLabel(); + const bool useMaskLabel = this->GetUseMaskLabel(); ImageRegionConstIteratorWithIndex It(parametricFieldEstimate, parametricFieldEstimate->GetRequestedRegion()); @@ -544,7 +544,7 @@ N4BiasFieldCorrectionImageFilter::UpdateB auto bspliner = BSplineFilterType::New(); typename BSplineFilterType::ArrayType numberOfControlPoints; - auto numberOfFittingLevels = MakeFilled(1); + auto numberOfFittingLevels = MakeFilled(1); for (unsigned int d = 0; d < ImageDimension; ++d) { if (!this->m_LogBiasFieldControlPointLattice) @@ -655,12 +655,12 @@ N4BiasFieldCorrectionImageFilter::Calcula RealType sigma = 0.0; RealType N = 0.0; - const auto maskImageBufferRange = MakeImageBufferRange(this->GetMaskImage()); - const auto confidenceImageBufferRange = MakeImageBufferRange(this->GetConfidenceImage()); + const auto maskImageBufferRange = MakeImageBufferRange(this->GetMaskImage()); + const auto confidenceImageBufferRange = MakeImageBufferRange(this->GetConfidenceImage()); const MaskPixelType maskLabel = this->GetMaskLabel(); - const bool useMaskLabel = this->GetUseMaskLabel(); + const bool useMaskLabel = this->GetUseMaskLabel(); - const auto subtracterImageBufferRange = MakeImageBufferRange(subtracter->GetOutput()); + const auto subtracterImageBufferRange = MakeImageBufferRange(subtracter->GetOutput()); const size_t numberOfPixels = subtracterImageBufferRange.size(); for (size_t indexValue = 0; indexValue < numberOfPixels; ++indexValue) @@ -687,7 +687,7 @@ N4BiasFieldCorrectionImageFilter::Calcula template void N4BiasFieldCorrectionImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/BiasCorrection/test/itkCompositeValleyFunctionTest.cxx b/Modules/Filtering/BiasCorrection/test/itkCompositeValleyFunctionTest.cxx index 1fb25d85f1b..fd7900d1065 100644 --- a/Modules/Filtering/BiasCorrection/test/itkCompositeValleyFunctionTest.cxx +++ b/Modules/Filtering/BiasCorrection/test/itkCompositeValleyFunctionTest.cxx @@ -64,7 +64,7 @@ itkCompositeValleyFunctionTest(int, char *[]) return EXIT_FAILURE; } - const long numberOfSamples = function.GetNumberOfSamples(); + const long numberOfSamples = function.GetNumberOfSamples(); const double measure = function.GetLowerBound() + interval1 * numberOfSamples * 0.5; const double value1 = function(measure); const double value2 = function.Evaluate(measure); diff --git a/Modules/Filtering/BiasCorrection/test/itkMRIBiasFieldCorrectionFilterTest.cxx b/Modules/Filtering/BiasCorrection/test/itkMRIBiasFieldCorrectionFilterTest.cxx index 196d2ca5b02..c08c0b5abf7 100644 --- a/Modules/Filtering/BiasCorrection/test/itkMRIBiasFieldCorrectionFilterTest.cxx +++ b/Modules/Filtering/BiasCorrection/test/itkMRIBiasFieldCorrectionFilterTest.cxx @@ -36,9 +36,9 @@ itkMRIBiasFieldCorrectionFilterTest(int, char *[]) using MaskType = itk::Image; using ImageIteratorType = itk::ImageRegionIteratorWithIndex; - const bool SaveImages = false; - ImageType::SizeType imageSize; - ImageType::IndexType imageIndex; + const bool SaveImages = false; + ImageType::SizeType imageSize; + ImageType::IndexType imageIndex; ImageType::RegionType imageRegion; imageSize[0] = 30; imageSize[1] = 30; @@ -103,7 +103,7 @@ itkMRIBiasFieldCorrectionFilterTest(int, char *[]) sphere->SetRadius(5.0); randomGenerator->SetSeed(2003); - ImageIteratorType i_iter(image, imageRegion); + ImageIteratorType i_iter(image, imageRegion); SphereType::InputType point; while (!i_iter.IsAtEnd()) { @@ -122,7 +122,7 @@ itkMRIBiasFieldCorrectionFilterTest(int, char *[]) // creates a bias field using BiasFieldType = itk::MultivariateLegendrePolynomial; BiasFieldType::DomainSizeType biasSize(3); - constexpr int biasDegree = 3; + constexpr int biasDegree = 3; biasSize[0] = imageSize[0]; biasSize[1] = imageSize[1]; biasSize[2] = imageSize[2]; @@ -187,20 +187,20 @@ itkMRIBiasFieldCorrectionFilterTest(int, char *[]) filter->SetInput(imageWithBias); - constexpr int slicingDirection = 2; - constexpr bool isBiasFieldMultiplicative = true; - bool usingSlabIdentification = true; - constexpr bool usingBiasFieldCorrection = true; - constexpr bool generatingOutput = true; - constexpr unsigned int slabNumberOfSamples = 10; + constexpr int slicingDirection = 2; + constexpr bool isBiasFieldMultiplicative = true; + bool usingSlabIdentification = true; + constexpr bool usingBiasFieldCorrection = true; + constexpr bool generatingOutput = true; + constexpr unsigned int slabNumberOfSamples = 10; constexpr InputImagePixelType slabBackgroundMinimumThreshold = 0; - constexpr double slabTolerance = 0.0; - int volumeCorrectionMaximumIteration = 200; - int interSliceCorrectionMaximumIteration = 100; - double optimizerInitialRadius = 0.02; - constexpr double optimizerGrowthFactor = 1.01; - const double optimizerShrinkFactor = std::pow(optimizerGrowthFactor, -0.25); - bool usingInterSliceIntensityCorrection = true; + constexpr double slabTolerance = 0.0; + int volumeCorrectionMaximumIteration = 200; + int interSliceCorrectionMaximumIteration = 100; + double optimizerInitialRadius = 0.02; + constexpr double optimizerGrowthFactor = 1.01; + const double optimizerShrinkFactor = std::pow(optimizerGrowthFactor, -0.25); + bool usingInterSliceIntensityCorrection = true; filter->SetSlabNumberOfSamples(slabNumberOfSamples); @@ -467,7 +467,7 @@ itkMRIBiasFieldCorrectionFilterTest(int, char *[]) t2 = time(nullptr); std::cout << "Run time (in s)" << t2 - t1 << std::endl; - double sumOfErrorFinal = 0.0; + double sumOfErrorFinal = 0.0; ImageIteratorType o5_iter(filter->GetOutput(), filter->GetOutput()->GetLargestPossibleRegion()); i_iter.GoToBegin(); while (!i_iter.IsAtEnd()) diff --git a/Modules/Filtering/BiasCorrection/test/itkN4BiasFieldCorrectionImageFilterTest.cxx b/Modules/Filtering/BiasCorrection/test/itkN4BiasFieldCorrectionImageFilterTest.cxx index a73fc5af375..6d05a29af15 100644 --- a/Modules/Filtering/BiasCorrection/test/itkN4BiasFieldCorrectionImageFilterTest.cxx +++ b/Modules/Filtering/BiasCorrection/test/itkN4BiasFieldCorrectionImageFilterTest.cxx @@ -66,7 +66,7 @@ template TValue Convert(std::string optionString) { - TValue value; + TValue value; std::istringstream iss(optionString); iss >> value; @@ -77,7 +77,7 @@ template std::vector ConvertVector(std::string optionString) { - std::vector values; + std::vector values; std::string::size_type crosspos = optionString.find('x', 0); if (crosspos == std::string::npos) @@ -86,8 +86,8 @@ ConvertVector(std::string optionString) } else { - std::string element = optionString.substr(0, crosspos); - TValue value; + std::string element = optionString.substr(0, crosspos); + TValue value; std::istringstream iss(element); iss >> value; values.push_back(value); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryDilateImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryDilateImageFilter.hxx index 7cb21d3d7ef..745a5b3cfd6 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryDilateImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryDilateImageFilter.hxx @@ -42,14 +42,14 @@ BinaryDilateImageFilter::GenerateData() this->AllocateOutputs(); // Retrieve input and output pointers - const typename OutputImageType::Pointer output = this->GetOutput(); + const typename OutputImageType::Pointer output = this->GetOutput(); const typename InputImageType::ConstPointer input = this->GetInput(); // Get values from superclass - const InputPixelType foregroundValue = this->GetForegroundValue(); - const InputPixelType backgroundValue = this->GetBackgroundValue(); - const KernelType kernel = this->GetKernel(); - auto radius = InputSizeType::Filled(1); + const InputPixelType foregroundValue = this->GetForegroundValue(); + const InputPixelType backgroundValue = this->GetBackgroundValue(); + const KernelType kernel = this->GetKernel(); + auto radius = InputSizeType::Filled(1); const typename TOutputImage::RegionType outputRegion = output->GetBufferedRegion(); // compute the size of the temp image. It is needed to create the progress @@ -83,7 +83,7 @@ BinaryDilateImageFilter::GenerateData() // except for pixels with DilateValue. These pixels are initially // replaced with BackgroundValue and potentially replaced later with // DilateValue as the Minkowski sums are performed. - ImageRegionIterator outIt(output, outputRegion); + ImageRegionIterator outIt(output, outputRegion); ImageRegionConstIterator inIt(input, outputRegion); for (inIt.GoToBegin(), outIt.GoToBegin(); !outIt.IsAtEnd(); ++outIt, ++inIt) @@ -238,7 +238,7 @@ BinaryDilateImageFilter::GenerateData() // paint the structuring element typename NeighborIndexContainer::const_iterator itIdx; - NeighborIndexContainer & idxDifferenceSet = this->GetDifferenceSet(centerPixelCode); + NeighborIndexContainer & idxDifferenceSet = this->GetDifferenceSet(centerPixelCode); for (itIdx = idxDifferenceSet.begin(); itIdx != idxDifferenceSet.end(); ++itIdx) { const IndexType idx = tmpRegIndexIt.GetIndex() + *itIdx; @@ -379,8 +379,8 @@ BinaryDilateImageFilter::GenerateData() // Paint input image translated with respect to the SE CCs vectors // --> "( Xb0 UNION Xb1 UNION ... Xbn )" typename Superclass::ComponentVectorConstIterator vecIt; - auto vecBeginIt = this->KernelCCVectorBegin(); - auto vecEndIt = this->KernelCCVectorEnd(); + auto vecBeginIt = this->KernelCCVectorBegin(); + auto vecEndIt = this->KernelCCVectorEnd(); // iterator on output image ImageRegionIteratorWithIndex ouRegIndexIt(output, outputRegion); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryErodeImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryErodeImageFilter.hxx index be4170a41cd..58ffd5f55d6 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryErodeImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryErodeImageFilter.hxx @@ -42,14 +42,14 @@ BinaryErodeImageFilter::GenerateData() this->AllocateOutputs(); // Retrieve input and output pointers - const typename OutputImageType::Pointer output = this->GetOutput(); + const typename OutputImageType::Pointer output = this->GetOutput(); const typename InputImageType::ConstPointer input = this->GetInput(); // Get values from superclass - const InputPixelType foregroundValue = this->GetForegroundValue(); - const InputPixelType backgroundValue = this->GetBackgroundValue(); - const KernelType kernel = this->GetKernel(); - auto radius = InputSizeType::Filled(1); + const InputPixelType foregroundValue = this->GetForegroundValue(); + const InputPixelType backgroundValue = this->GetBackgroundValue(); + const KernelType kernel = this->GetKernel(); + auto radius = InputSizeType::Filled(1); const typename TOutputImage::RegionType outputRegion = output->GetBufferedRegion(); // compute the size of the temp image. It is needed to create the progress @@ -230,7 +230,7 @@ BinaryErodeImageFilter::GenerateData() // paint the structuring element typename NeighborIndexContainer::const_iterator itIdx; - NeighborIndexContainer & idxDifferenceSet = this->GetDifferenceSet(centerPixelCode); + NeighborIndexContainer & idxDifferenceSet = this->GetDifferenceSet(centerPixelCode); for (itIdx = idxDifferenceSet.begin(); itIdx != idxDifferenceSet.end(); ++itIdx) { const IndexType idx = tmpRegIndexIt.GetIndex() + *itIdx; @@ -299,7 +299,7 @@ BinaryErodeImageFilter::GenerateData() // paint the structuring element NeighborIndexContainer & indexDifferenceSet = this->GetDifferenceSet(i); - const auto staticEndIndex = indexDifferenceSet.end(); + const auto staticEndIndex = indexDifferenceSet.end(); for (auto itIndex = indexDifferenceSet.begin(); itIndex != staticEndIndex; ++itIndex) { const IndexType idx(neighbIndex + *itIndex); @@ -373,8 +373,8 @@ BinaryErodeImageFilter::GenerateData() // Paint input image translated with respect to the SE CCs vectors // --> "( Xb0 UNION Xb1 UNION ... Xbn )" typename Superclass::ComponentVectorConstIterator vecIt; - auto vecBeginIt = this->KernelCCVectorBegin(); - auto vecEndIt = this->KernelCCVectorEnd(); + auto vecBeginIt = this->KernelCCVectorBegin(); + auto vecEndIt = this->KernelCCVectorEnd(); // iterator on output image ImageRegionIteratorWithIndex ouRegIndexIt(output, outputRegion); @@ -450,7 +450,7 @@ BinaryErodeImageFilter::GenerateData() for (inIt.GoToBegin(), outIt.GoToBegin(); !outIt.IsAtEnd(); ++outIt, ++inIt) { - const InputPixelType inValue = inIt.Get(); + const InputPixelType inValue = inIt.Get(); const OutputPixelType outValue = outIt.Get(); if (Math::ExactlyEquals(outValue, backgroundValue) && Math::NotExactlyEquals(inValue, foregroundValue)) { diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalClosingImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalClosingImageFilter.hxx index 43d10049309..50b0dda106d 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalClosingImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalClosingImageFilter.hxx @@ -155,7 +155,7 @@ BinaryMorphologicalClosingImageFilter::Gener template void BinaryMorphologicalClosingImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalOpeningImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalOpeningImageFilter.hxx index 75c7749b63f..9bc6fe23f74 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalOpeningImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalOpeningImageFilter.hxx @@ -80,7 +80,7 @@ BinaryMorphologicalOpeningImageFilter::Gener template void BinaryMorphologicalOpeningImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.hxx index 717de939f18..785b7f56bc6 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.hxx @@ -136,7 +136,7 @@ BinaryMorphologyImageFilter::AnalyzeKernel() ImageRegionIteratorWithIndex kernelImageItIndex(tmpSEImage, tmpSEImage->GetRequestedRegion()); // Neighborhood iterator on SE element temp image - auto padBy = InputSizeType::Filled(1); + auto padBy = InputSizeType::Filled(1); NeighborhoodIterator SEoNeighbIt(padBy, tmpSEImage, tmpSEImage->GetRequestedRegion()); SEoNeighbIt.OverrideBoundaryCondition(&cbc); const SizeValueType neighborhoodSize = SEoNeighbIt.Size(); @@ -239,7 +239,7 @@ BinaryMorphologyImageFilter::AnalyzeKernel() // offset relatively to the center SE element and add it to the // index of this center SE element: const OffsetType currentOffset = this->GetKernel().GetOffset(k); - IndexType currentShiftedPosition = centerElementPosition + currentOffset; + IndexType currentShiftedPosition = centerElementPosition + currentOffset; // Add to current element position the offset corresponding the // current adj direction diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryPruningImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryPruningImageFilter.hxx index f1497cd0a50..f7fc0ab1ae9 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryPruningImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryPruningImageFilter.hxx @@ -66,7 +66,7 @@ BinaryPruningImageFilter::PrepareData() const typename OutputImageType::RegionType region = pruneImage->GetRequestedRegion(); ImageRegionConstIterator it(inputImage, region); - ImageRegionIterator ot(pruneImage, region); + ImageRegionIterator ot(pruneImage, region); itkDebugMacro("PrepareData: Copy input to output"); @@ -91,7 +91,7 @@ BinaryPruningImageFilter::ComputePruneImage() const typename OutputImageType::RegionType region = pruneImage->GetRequestedRegion(); - auto radius = MakeFilled(1); + auto radius = MakeFilled(1); NeighborhoodIteratorType ot(radius, pruneImage, region); const typename NeighborhoodIteratorType::OffsetType offset1 = { { -1, -1 } }; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.hxx index 1cdca586802..c5c81f8865c 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.hxx @@ -67,7 +67,7 @@ BinaryThinningImageFilter::PrepareData() const typename OutputImageType::RegionType region = thinImage->GetRequestedRegion(); ImageRegionConstIterator it(inputImage, region); - ImageRegionIterator ot(thinImage, region); + ImageRegionIterator ot(thinImage, region); itkDebugMacro("PrepareData: Copy input to output"); @@ -101,7 +101,7 @@ BinaryThinningImageFilter::ComputeThinImage() const typename OutputImageType::RegionType region = thinImage->GetRequestedRegion(); - auto radius = MakeFilled(1); + auto radius = MakeFilled(1); NeighborhoodIteratorType ot(radius, thinImage, region); // Create a set of offsets from the center. @@ -131,7 +131,7 @@ BinaryThinningImageFilter::ComputeThinImage() bool testC; bool testD; - std::vector pixelsToDelete; + std::vector pixelsToDelete; typename std::vector::iterator pixelsToDeleteIt; // Loop through the image several times until there is no change. diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkDilateObjectMorphologyImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkDilateObjectMorphologyImageFilter.hxx index 128d31ba4e9..46b155cbf32 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkDilateObjectMorphologyImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkDilateObjectMorphologyImageFilter.hxx @@ -31,10 +31,10 @@ DilateObjectMorphologyImageFilter::DilateObj template void DilateObjectMorphologyImageFilter::Evaluate(OutputNeighborhoodIteratorType & nit, - const KernelType & kernel) + const KernelType & kernel) { - unsigned int i; - KernelIteratorType kernel_it; + unsigned int i; + KernelIteratorType kernel_it; const KernelIteratorType kernelEnd = kernel.End(); bool valid = true; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkErodeObjectMorphologyImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkErodeObjectMorphologyImageFilter.hxx index f980da7ce73..d3da85e23c4 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkErodeObjectMorphologyImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkErodeObjectMorphologyImageFilter.hxx @@ -33,10 +33,10 @@ ErodeObjectMorphologyImageFilter::ErodeObjec template void ErodeObjectMorphologyImageFilter::Evaluate(OutputNeighborhoodIteratorType & nit, - const KernelType & kernel) + const KernelType & kernel) { - unsigned int i; - KernelIteratorType kernel_it; + unsigned int i; + KernelIteratorType kernel_it; const KernelIteratorType kernelEnd = kernel.End(); bool valid = true; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.hxx index 1f7ed59d2ca..93909c0b8d3 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.hxx @@ -124,7 +124,7 @@ ObjectMorphologyImageFilter::DynamicThreaded const OutputImageRegionType & outputRegionForThread) { // Find the boundary "faces" - NeighborhoodAlgorithm::ImageBoundaryFacesCalculator fC; + NeighborhoodAlgorithm::ImageBoundaryFacesCalculator fC; const typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = fC(this->GetInput(), outputRegionForThread, m_Kernel.GetRadius()); @@ -137,7 +137,7 @@ ObjectMorphologyImageFilter::DynamicThreaded TotalProgressReporter progress(this, this->GetOutput()->GetRequestedRegion().GetNumberOfPixels()); OutputNeighborhoodIteratorType oSNIter; - InputNeighborhoodIteratorType iSNIter; + InputNeighborhoodIteratorType iSNIter; for (const auto & face : faceList) { oSNIter = OutputNeighborhoodIteratorType(m_Kernel.GetRadius(), this->GetOutput(), face); @@ -175,9 +175,9 @@ ObjectMorphologyImageFilter::IsObjectPixelOn { static const auto s = static_cast(std::pow(3.0, static_cast(ImageDimension))); - PixelType tf; + PixelType tf; unsigned int i; - bool isInside = true; + bool isInside = true; if (m_UseBoundaryCondition) { diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryClosingByReconstructionImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryClosingByReconstructionImageFilterTest.cxx index fa3189c9a13..1d24e46fc7a 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryClosingByReconstructionImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryClosingByReconstructionImageFilterTest.cxx @@ -51,7 +51,7 @@ itkBinaryClosingByReconstructionImageFilterTest(int argc, char * argv[]) using KernelType = itk::BinaryBallStructuringElement; KernelType ball; - auto ballSize = KernelType::SizeType::Filled(std::stoi(argv[5])); + auto ballSize = KernelType::SizeType::Filled(std::stoi(argv[5])); ball.SetRadius(ballSize); ball.CreateStructuringElement(); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest.cxx index cc42fc676d7..947622d87d2 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryDilateImageFilterTest.cxx @@ -124,7 +124,7 @@ itkBinaryDilateImageFilterTest(int, char *[]) const itk::SimpleFilterWatcher filterWatcher(filter); // Create the structuring element - myKernelType ball; + myKernelType ball; myKernelType::SizeType ballSize; ballSize[0] = 1; ballSize[1] = 4; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest.cxx index dd8ab3a75d8..b2854527b8f 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryErodeImageFilterTest.cxx @@ -124,7 +124,7 @@ itkBinaryErodeImageFilterTest(int, char *[]) const itk::SimpleFilterWatcher watcher(filter, "filter"); // Create the structuring element - myKernelType ball; + myKernelType ball; myKernelType::SizeType ballSize; ballSize[0] = 1; ballSize[1] = 4; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalClosingImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalClosingImageFilterTest.cxx index 4b190efaa23..b2672b7ff3a 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalClosingImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalClosingImageFilterTest.cxx @@ -49,7 +49,7 @@ itkBinaryMorphologicalClosingImageFilterTest(int argc, char * argv[]) using KernelType = itk::BinaryBallStructuringElement; KernelType ball; - auto ballSize = KernelType::SizeType::Filled(std::stoi(argv[3])); + auto ballSize = KernelType::SizeType::Filled(std::stoi(argv[3])); ball.SetRadius(ballSize); ball.CreateStructuringElement(); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalOpeningImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalOpeningImageFilterTest.cxx index 1039990eb48..4328ae1b12d 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalOpeningImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryMorphologicalOpeningImageFilterTest.cxx @@ -49,7 +49,7 @@ itkBinaryMorphologicalOpeningImageFilterTest(int argc, char * argv[]) using KernelType = itk::BinaryBallStructuringElement; KernelType ball; - auto ballSize = KernelType::SizeType::Filled(std::stoi(argv[3])); + auto ballSize = KernelType::SizeType::Filled(std::stoi(argv[3])); ball.SetRadius(ballSize); ball.CreateStructuringElement(); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryOpeningByReconstructionImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryOpeningByReconstructionImageFilterTest.cxx index 294cf34d9f2..09a12463477 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryOpeningByReconstructionImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkBinaryOpeningByReconstructionImageFilterTest.cxx @@ -48,7 +48,7 @@ itkBinaryOpeningByReconstructionImageFilterTest(int argc, char * argv[]) using KernelType = itk::BinaryBallStructuringElement; KernelType ball; - auto ballSize = KernelType::SizeType::Filled(std::stoi(argv[3])); + auto ballSize = KernelType::SizeType::Filled(std::stoi(argv[3])); ball.SetRadius(ballSize); ball.CreateStructuringElement(); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/itkErodeObjectMorphologyImageFilterTest.cxx b/Modules/Filtering/BinaryMathematicalMorphology/test/itkErodeObjectMorphologyImageFilterTest.cxx index b9b9e10e5a2..b2669ef46f5 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/itkErodeObjectMorphologyImageFilterTest.cxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/itkErodeObjectMorphologyImageFilterTest.cxx @@ -122,11 +122,11 @@ itkErodeObjectMorphologyImageFilterTest(int, char *[]) using myFilterType = itk::ErodeObjectMorphologyImageFilter; // Create the filter - auto filter = myFilterType::New(); + auto filter = myFilterType::New(); const itk::SimpleFilterWatcher watcher(filter, "filter"); // Create the structuring element - myKernelType ball; + myKernelType ball; myKernelType::SizeType ballSize; ballSize[0] = 2; ballSize[1] = 4; diff --git a/Modules/Filtering/Colormap/include/itkColormapFunction.h b/Modules/Filtering/Colormap/include/itkColormapFunction.h index e79bf83746a..3f267d6cece 100644 --- a/Modules/Filtering/Colormap/include/itkColormapFunction.h +++ b/Modules/Filtering/Colormap/include/itkColormapFunction.h @@ -95,7 +95,7 @@ class ColormapFunction : public Object auto maxInputValue = static_cast(this->m_MaximumInputValue); auto minInputValue = static_cast(this->m_MinimumInputValue); - auto d = static_cast(maxInputValue - minInputValue); + auto d = static_cast(maxInputValue - minInputValue); RealType value = (static_cast(v) - static_cast(minInputValue)) / d; value = std::clamp(value, 0.0, 1.0); return value; @@ -107,7 +107,7 @@ class ColormapFunction : public Object RGBComponentType RescaleRGBComponentValue(RealType v) const { - auto d = static_cast(m_MaximumRGBComponentValue - m_MinimumRGBComponentValue); + auto d = static_cast(m_MaximumRGBComponentValue - m_MinimumRGBComponentValue); const RGBComponentType rescaled = static_cast(d * v) + this->m_MinimumRGBComponentValue; return rescaled; diff --git a/Modules/Filtering/Colormap/include/itkCustomColormapFunction.hxx b/Modules/Filtering/Colormap/include/itkCustomColormapFunction.hxx index 06fe497b8c0..ff0363fe31c 100644 --- a/Modules/Filtering/Colormap/include/itkCustomColormapFunction.hxx +++ b/Modules/Filtering/Colormap/include/itkCustomColormapFunction.hxx @@ -37,13 +37,13 @@ CustomColormapFunction::operator()(const TScalar & v) const GREEN = 1, BLUE = 2 }; - RealType RGBValue[3] = { 0.0 }; + RealType RGBValue[3] = { 0.0 }; const ChannelType * const ColorChannel[3] = { &m_RedChannel, &m_GreenChannel, &m_BlueChannel }; for (size_t color = RED; color <= BLUE; ++color) // Go through all the colors { const size_t size = ColorChannel[color]->size(); - auto index = Math::Ceil(value * static_cast(size - 1)); + auto index = Math::Ceil(value * static_cast(size - 1)); if (size == 1 || index < 1) { diff --git a/Modules/Filtering/Colormap/include/itkScalarToRGBColormapImageFilter.hxx b/Modules/Filtering/Colormap/include/itkScalarToRGBColormapImageFilter.hxx index 97049bc5ed0..32158f75afc 100644 --- a/Modules/Filtering/Colormap/include/itkScalarToRGBColormapImageFilter.hxx +++ b/Modules/Filtering/Colormap/include/itkScalarToRGBColormapImageFilter.hxx @@ -98,7 +98,7 @@ void ScalarToRGBColormapImageFilter::DynamicThreadedGenerateData( const OutputImageRegionType & outputRegionForThread) { - const InputImagePointer inputPtr = this->GetInput(); + const InputImagePointer inputPtr = this->GetInput(); const OutputImagePointer outputPtr = this->GetOutput(); TotalProgressReporter progressReporter(this, this->GetOutput()->GetRequestedRegion().GetNumberOfPixels()); @@ -111,7 +111,7 @@ ScalarToRGBColormapImageFilter::DynamicThreadedGenera this->CallCopyOutputRegionToInputRegion(inputRegionForThread, outputRegionForThread); ImageRegionConstIterator inputIt(inputPtr, inputRegionForThread); - ImageRegionIterator outputIt(outputPtr, outputRegionForThread); + ImageRegionIterator outputIt(outputPtr, outputRegionForThread); while (!inputIt.IsAtEnd()) { diff --git a/Modules/Filtering/Colormap/test/itkCustomColormapFunctionTest.cxx b/Modules/Filtering/Colormap/test/itkCustomColormapFunctionTest.cxx index 7a84a2335b8..c8e2c6db0ed 100644 --- a/Modules/Filtering/Colormap/test/itkCustomColormapFunctionTest.cxx +++ b/Modules/Filtering/Colormap/test/itkCustomColormapFunctionTest.cxx @@ -55,7 +55,7 @@ class CustomColormapFunctionHelper : public CustomColormapFunction redChannel, std::vector greenChannel, std::vector blueChannel, - ScalarType val) + ScalarType val) { using ColormapType = itk::Function::CustomColormapFunction; diff --git a/Modules/Filtering/Colormap/test/itkScalarToRGBColormapImageFilterTest.cxx b/Modules/Filtering/Colormap/test/itkScalarToRGBColormapImageFilterTest.cxx index 22373e614f8..25eaede68c6 100644 --- a/Modules/Filtering/Colormap/test/itkScalarToRGBColormapImageFilterTest.cxx +++ b/Modules/Filtering/Colormap/test/itkScalarToRGBColormapImageFilterTest.cxx @@ -335,9 +335,9 @@ itkScalarToRGBColormapImageFilterTest(int argc, char * argv[]) auto vcolormap = VectorColormapType::New(); std::ifstream str(argv[4]); - std::string line; + std::string line; - float value; + float value; ColormapType::ChannelType channel; // Get red values diff --git a/Modules/Filtering/Convolution/include/itkConvolutionImageFilter.hxx b/Modules/Filtering/Convolution/include/itkConvolutionImageFilter.hxx index 9abddcb136d..5d8fee8f121 100644 --- a/Modules/Filtering/Convolution/include/itkConvolutionImageFilter.hxx +++ b/Modules/Filtering/Convolution/include/itkConvolutionImageFilter.hxx @@ -70,7 +70,7 @@ ConvolutionImageFilter::GenerateData() template template void -ConvolutionImageFilter::ComputeConvolution(const TImage * kernelImage, +ConvolutionImageFilter::ComputeConvolution(const TImage * kernelImage, ProgressAccumulator * progress) { using KernelImagePixelType = typename TImage::PixelType; @@ -95,7 +95,7 @@ ConvolutionImageFilter::ComputeConvolut // Flip the kernel using FlipperType = FlipImageFilter; - auto flipper = FlipperType::New(); + auto flipper = FlipperType::New(); constexpr auto axesArray = MakeFilled(true); flipper->SetFlipAxes(axesArray); flipper->SetInput(kernelImage); @@ -156,7 +156,7 @@ ConvolutionImageFilter::ComputeConvolut // Set up the crop sizes. const CropSizeType upperCropSize(radius); - CropSizeType lowerCropSize(radius); + CropSizeType lowerCropSize(radius); convolutionFilter->GraftOutput(this->GetOutput()); @@ -191,8 +191,8 @@ bool ConvolutionImageFilter::GetKernelNeedsPadding() const { const KernelImageType * kernel = this->GetKernelImage(); - const InputRegionType kernelRegion = kernel->GetLargestPossibleRegion(); - InputSizeType kernelSize = kernelRegion.GetSize(); + const InputRegionType kernelRegion = kernel->GetLargestPossibleRegion(); + InputSizeType kernelSize = kernelRegion.GetSize(); for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -210,9 +210,9 @@ auto ConvolutionImageFilter::GetKernelPadSize() const -> KernelSizeType { const KernelImageType * kernel = this->GetKernelImage(); - const KernelRegionType kernelRegion = kernel->GetLargestPossibleRegion(); - KernelSizeType kernelSize = kernelRegion.GetSize(); - KernelSizeType padSize; + const KernelRegionType kernelRegion = kernel->GetLargestPossibleRegion(); + KernelSizeType kernelSize = kernelRegion.GetSize(); + KernelSizeType padSize; for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -255,7 +255,7 @@ ConvolutionImageFilter::GenerateInputRe // Crop the output request region to fit within the largest // possible region. const typename InputImageType::Pointer inputPtr = const_cast(this->GetInput()); - const bool cropped = inputRegion.Crop(inputPtr->GetLargestPossibleRegion()); + const bool cropped = inputRegion.Crop(inputPtr->GetLargestPossibleRegion()); if (!cropped) { InvalidRequestedRegionError e(__FILE__, __LINE__); diff --git a/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.h b/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.h index be046213d62..da6d7021915 100644 --- a/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.h +++ b/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.h @@ -160,7 +160,7 @@ class ITK_TEMPLATE_EXPORT ConvolutionImageFilterBase : public ImageToImageFilter bool m_Normalize{ false }; DefaultBoundaryConditionType m_DefaultBoundaryCondition{}; - BoundaryConditionType * m_BoundaryCondition{}; + BoundaryConditionType * m_BoundaryCondition{}; OutputRegionModeEnum m_OutputRegionMode{ ConvolutionImageFilterBaseEnums::ConvolutionImageFilterOutputRegion::SAME }; }; diff --git a/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.hxx b/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.hxx index 41a678ec6e2..24ae1c1face 100644 --- a/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.hxx +++ b/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.hxx @@ -55,7 +55,7 @@ ConvolutionImageFilterBase::GetValidReg const InputRegionType inputLargestPossibleRegion = inputPtr->GetLargestPossibleRegion(); OutputIndexType validIndex = inputLargestPossibleRegion.GetIndex(); - OutputSizeType validSize = inputLargestPossibleRegion.GetSize(); + OutputSizeType validSize = inputLargestPossibleRegion.GetSize(); // Shrink the output largest possible region by the kernel radius. KernelSizeType kernelSize = this->GetKernelImage()->GetLargestPossibleRegion().GetSize(); diff --git a/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.h b/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.h index 437cb254e25..548e6f8d7a8 100644 --- a/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.h +++ b/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.h @@ -138,43 +138,43 @@ class ITK_TEMPLATE_EXPORT FFTConvolutionImageFilter * normalizing the kernel if requested, shifting the kernel, and * taking the Fourier transform of the padded inputs. */ void - PrepareInputs(const InputImageType * input, - const KernelImageType * kernel, + PrepareInputs(const InputImageType * input, + const KernelImageType * kernel, InternalComplexImagePointerType & preparedInput, InternalComplexImagePointerType & preparedKernel, - ProgressAccumulator * progress, - float progressWeight); + ProgressAccumulator * progress, + float progressWeight); /** Prepare the input image. This includes padding the image and * taking the Fourier transform of the padded image. */ void - PrepareInput(const InputImageType * input, + PrepareInput(const InputImageType * input, InternalComplexImagePointerType & preparedInput, - ProgressAccumulator * progress, - float progressWeight); + ProgressAccumulator * progress, + float progressWeight); /** Pad the input image. */ void - PadInput(const InputImageType * input, + PadInput(const InputImageType * input, InternalImagePointerType & paddedInput, - ProgressAccumulator * progress, - float progressWeight); + ProgressAccumulator * progress, + float progressWeight); /** Take the Fourier transform of the padded input. */ void - TransformPaddedInput(const InternalImageType * paddedInput, + TransformPaddedInput(const InternalImageType * paddedInput, InternalComplexImagePointerType & transformedInput, - ProgressAccumulator * progress, - float progressWeight); + ProgressAccumulator * progress, + float progressWeight); /** Prepare the kernel. This includes resizing the input and kernel * images, normalizing the kernel if requested, shifting the kernel, * and taking the Fourier transform of the padded kernel. */ void - PrepareKernel(const KernelImageType * kernel, + PrepareKernel(const KernelImageType * kernel, InternalComplexImagePointerType & preparedKernel, - ProgressAccumulator * progress, - float progressWeight); + ProgressAccumulator * progress, + float progressWeight); /** Produce output from the final Fourier domain image. */ void @@ -206,8 +206,8 @@ class ITK_TEMPLATE_EXPORT FFTConvolutionImageFilter PrintSelf(std::ostream & os, Indent indent) const override; private: - SizeValueType m_SizeGreatestPrimeFactor{}; - InternalSizeType m_FFTPadSize{ { 0 } }; + SizeValueType m_SizeGreatestPrimeFactor{}; + InternalSizeType m_FFTPadSize{ { 0 } }; InternalRegionType m_PaddedInputRegion{}; }; } // namespace itk diff --git a/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.hxx b/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.hxx index a192e001c47..6511bfb97c5 100644 --- a/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.hxx +++ b/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.hxx @@ -57,7 +57,7 @@ FFTConvolutionImageFilter(this->GetPrimaryInput()); + auto * inputPtr = itkDynamicCastInDebugMode(this->GetPrimaryInput()); const bool wasPartiallyInside = inputRegion.Crop(inputPtr->GetLargestPossibleRegion()); if (!wasPartiallyInside) { @@ -115,12 +115,12 @@ FFTConvolutionImageFilter void FFTConvolutionImageFilter::PrepareInputs( - const InputImageType * input, - const KernelImageType * kernel, + const InputImageType * input, + const KernelImageType * kernel, InternalComplexImagePointerType & preparedInput, InternalComplexImagePointerType & preparedKernel, - ProgressAccumulator * progress, - float progressWeight) + ProgressAccumulator * progress, + float progressWeight) { this->PrepareInput(input, preparedInput, progress, 0.5f * progressWeight); this->PrepareKernel(kernel, preparedKernel, progress, 0.5f * progressWeight); @@ -129,10 +129,10 @@ FFTConvolutionImageFilter void FFTConvolutionImageFilter::PrepareInput( - const InputImageType * input, + const InputImageType * input, InternalComplexImagePointerType & preparedInput, - ProgressAccumulator * progress, - float progressWeight) + ProgressAccumulator * progress, + float progressWeight) { InternalImagePointerType paddedInput; this->PadInput(input, paddedInput, progress, 0.3f * progressWeight); @@ -142,22 +142,22 @@ FFTConvolutionImageFilter void FFTConvolutionImageFilter::PadInput( - const InputImageType * input, + const InputImageType * input, InternalImagePointerType & paddedInput, - ProgressAccumulator * progress, - float progressWeight) + ProgressAccumulator * progress, + float progressWeight) { float remainingProgress = 1.0f; - const InputRegionType inputLargestRegion = input->GetLargestPossibleRegion(); - InputSizeType inputLargestSize = inputLargestRegion.GetSize(); - InputIndexType inputLargestIndex = inputLargestRegion.GetIndex(); - const InputRegionType inputRequestedRegion = input->GetRequestedRegion(); - InputSizeType inputRequestedSize = inputRequestedRegion.GetSize(); - InputIndexType inputRequestedIndex = inputRequestedRegion.GetIndex(); + const InputRegionType inputLargestRegion = input->GetLargestPossibleRegion(); + InputSizeType inputLargestSize = inputLargestRegion.GetSize(); + InputIndexType inputLargestIndex = inputLargestRegion.GetIndex(); + const InputRegionType inputRequestedRegion = input->GetRequestedRegion(); + InputSizeType inputRequestedSize = inputRequestedRegion.GetSize(); + InputIndexType inputRequestedIndex = inputRequestedRegion.GetIndex(); const OutputRegionType outputRequestedRegion = this->GetOutput()->GetRequestedRegion(); - OutputSizeType outputRequestedSize = outputRequestedRegion.GetSize(); - OutputIndexType outputRequestedIndex = outputRequestedRegion.GetIndex(); + OutputSizeType outputRequestedSize = outputRequestedRegion.GetSize(); + OutputIndexType outputRequestedIndex = outputRequestedRegion.GetIndex(); // Pad the input image such that the requested region, expanded by // twice the kernel radius, lies entirely within the buffered region. @@ -167,9 +167,9 @@ FFTConvolutionImageFilter; using PadSizeType = typename InputPadFilterType::SizeType; - PadSizeType lowerPad; - PadSizeType upperPad; - bool needsKernelPadding = false; + PadSizeType lowerPad; + PadSizeType upperPad; + bool needsKernelPadding = false; KernelSizeType kernelRadius = this->GetKernelRadius(); for (unsigned int dim = 0; dim < ImageDimension; ++dim) { @@ -216,7 +216,7 @@ FFTConvolutionImageFilter void FFTConvolutionImageFilter::TransformPaddedInput( - const InternalImageType * paddedInput, + const InternalImageType * paddedInput, InternalComplexImagePointerType & transformedInput, - ProgressAccumulator * progress, - float progressWeight) + ProgressAccumulator * progress, + float progressWeight) { // Take the Fourier transform of the padded image. auto imageFFTFilter = FFTFilterType::New(); @@ -330,15 +330,15 @@ FFTConvolutionImageFilter void FFTConvolutionImageFilter::PrepareKernel( - const KernelImageType * kernel, + const KernelImageType * kernel, InternalComplexImagePointerType & preparedKernel, - ProgressAccumulator * progress, - float progressWeight) + ProgressAccumulator * progress, + float progressWeight) { const KernelRegionType kernelRegion = kernel->GetLargestPossibleRegion(); - KernelSizeType kernelSize = kernelRegion.GetSize(); + KernelSizeType kernelSize = kernelRegion.GetSize(); - InputSizeType inputPadSize = m_PaddedInputRegion.GetSize(); + InputSizeType inputPadSize = m_PaddedInputRegion.GetSize(); typename KernelImageType::SizeType kernelUpperBound; for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -388,7 +388,7 @@ FFTConvolutionImageFilter; - auto kernelShifter = KernelShiftFilterType::New(); + auto kernelShifter = KernelShiftFilterType::New(); typename KernelShiftFilterType::OffsetType kernelShift; for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -414,9 +414,9 @@ FFTConvolutionImageFilterChangeRegionOn(); using InfoOffsetValueType = typename InfoFilterType::OutputImageOffsetValueType; - const InputIndexType & inputIndex = m_PaddedInputRegion.GetIndex(); + const InputIndexType & inputIndex = m_PaddedInputRegion.GetIndex(); const KernelIndexType & kernelIndex = kernel->GetLargestPossibleRegion().GetIndex(); - InfoOffsetValueType kernelOffset[ImageDimension]; + InfoOffsetValueType kernelOffset[ImageDimension]; for (unsigned int i = 0; i < ImageDimension; ++i) { kernelOffset[i] = static_cast(inputIndex[i] - kernelIndex[i]); @@ -434,8 +434,8 @@ template ::ProduceOutput( InternalComplexImageType * paddedOutput, - ProgressAccumulator * progress, - float progressWeight) + ProgressAccumulator * progress, + float progressWeight) { // Transform the convolution result back into physical space auto ifftFilter = IFFTFilterType::New(); @@ -452,9 +452,9 @@ FFTConvolutionImageFilter void FFTConvolutionImageFilter::CropOutput( - InternalImageType * paddedOutput, + InternalImageType * paddedOutput, ProgressAccumulator * progress, - float progressWeight) + float progressWeight) { InternalIndexType paddedOutputIndex = paddedOutput->GetLargestPossibleRegion().GetIndex(); @@ -474,7 +474,7 @@ FFTConvolutionImageFilterGetOutput()->GetRequestedRegion().GetSize(); + auto requestedRegionSize = this->GetOutput()->GetRequestedRegion().GetSize(); const InternalRegionType extractionRegion(extractionIndex, requestedRegionSize); extractFilter->SetExtractionRegion(extractionRegion); diff --git a/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx b/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx index 8811dfede9e..c6ec8a099a0 100644 --- a/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx +++ b/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx @@ -102,7 +102,7 @@ public: private: SizeValueType m_RequiredNumberOfOverlappingPixels; - double m_PrecisionTolerance; + double m_PrecisionTolerance; }; } // namespace Functor @@ -300,7 +300,7 @@ MaskedFFTNormalizedCorrelationImageFilter // Flip the moving images along all dimensions so that the correlation can be more easily handled. using FlipperType = itk::FlipImageFilter; constexpr auto flipAxes = MakeFilled(true); - auto rotater = FlipperType::New(); + auto rotater = FlipperType::New(); rotater->SetFlipAxes(flipAxes); rotater->SetInput(inputImage); rotater->Update(); @@ -316,7 +316,7 @@ template typename TMaskImage::Pointer MaskedFFTNormalizedCorrelationImageFilter::PreProcessMask( const InputImageType * inputImage, - const MaskImageType * inputMask) + const MaskImageType * inputMask) { typename MaskImageType::Pointer outputMask; if (inputMask) @@ -353,7 +353,7 @@ template typename TInputImage::Pointer MaskedFFTNormalizedCorrelationImageFilter::PreProcessImage( const InputImageType * inputImage, - const MaskImageType * inputMask) + const MaskImageType * inputMask) { // Wherever the mask is 0, the intensity image must also be 0. // We achieve this by multiplying the image with the mask, since the mask now contains @@ -374,10 +374,10 @@ template typename LocalOutputImageType::Pointer MaskedFFTNormalizedCorrelationImageFilter::CalculateForwardFFT( LocalInputImageType * inputImage, - InputSizeType & FFTImageSize) + InputSizeType & FFTImageSize) { const typename LocalInputImageType::PixelType constantPixel = 0; - const typename LocalInputImageType::SizeType upperPad = + const typename LocalInputImageType::SizeType upperPad = FFTImageSize - inputImage->GetLargestPossibleRegion().GetSize(); using PadType = itk::ConstantPadImageFilter; @@ -407,7 +407,7 @@ template typename LocalOutputImageType::Pointer MaskedFFTNormalizedCorrelationImageFilter::CalculateInverseFFT( LocalInputImageType * inputImage, - RealSizeType & combinedImageSize) + RealSizeType & combinedImageSize) { // The inverse Fourier transform normalizes by the number of voxels in the Fourier image. // It also converts the image from complex (with small imaginary values since @@ -677,7 +677,7 @@ MaskedFFTNormalizedCorrelationImageFilter // get pointers to the input and output const InputImageConstPointer fixedImage = this->GetFixedImage(); const InputImageConstPointer movingImage = this->GetMovingImage(); - const OutputImagePointer output = this->GetOutput(); + const OutputImagePointer output = this->GetOutput(); // Compute the size of the output image. typename OutputImageType::SizeType size; @@ -697,7 +697,7 @@ MaskedFFTNormalizedCorrelationImageFilter // moving image provides that NCC score when centered at that // location. itk::ContinuousIndex movingImageOffset; - RealPointType outputOrigin; + RealPointType outputOrigin; for (unsigned int i = 0; i < ImageDimension; ++i) { movingImageOffset[i] = -static_cast(movingImage->GetLargestPossibleRegion().GetSize()[i] - 1) / 2.0; @@ -738,7 +738,7 @@ MaskedFFTNormalizedCorrelationImageFilter template void MaskedFFTNormalizedCorrelationImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); } diff --git a/Modules/Filtering/Convolution/include/itkNormalizedCorrelationImageFilter.hxx b/Modules/Filtering/Convolution/include/itkNormalizedCorrelationImageFilter.hxx index f7c2a5defdc..fd7a638648d 100644 --- a/Modules/Filtering/Convolution/include/itkNormalizedCorrelationImageFilter.hxx +++ b/Modules/Filtering/Convolution/include/itkNormalizedCorrelationImageFilter.hxx @@ -53,7 +53,7 @@ NormalizedCorrelationImageFilter(this->GetInput()); - const MaskImagePointer maskPtr = const_cast(this->GetMaskImage()); + const MaskImagePointer maskPtr = const_cast(this->GetMaskImage()); if (!inputPtr || !maskPtr) { @@ -99,7 +99,7 @@ NormalizedCorrelationImageFilterGetOperator().GetRadius()); - typename NormalizedTemplateType::Iterator ntIt; + typename NormalizedTemplateType::Iterator ntIt; typename OutputNeighborhoodType::ConstIterator tIt; OutputPixelRealType sum = 0.0; @@ -109,7 +109,7 @@ NormalizedCorrelationImageFilter(this->GetOperator().Size()); + auto num = static_cast(this->GetOperator().Size()); const OutputPixelRealType mean = sum / num; const OutputPixelRealType var = (sumOfSquares - (sum * sum / num)) / (num - 1.0); const OutputPixelRealType std = std::sqrt(var); @@ -128,9 +128,9 @@ NormalizedCorrelationImageFilterGetOutput(); + OutputImageType * output = this->GetOutput(); const InputImageType * input = this->GetInput(); - const MaskImageType * mask = this->GetMaskImage(); + const MaskImageType * mask = this->GetMaskImage(); // Break the input into a series of regions. The first region is free // of boundary conditions, the rest with boundary conditions. Note, @@ -140,7 +140,7 @@ NormalizedCorrelationImageFilter; using FaceListType = typename BFC::FaceListType; - BFC faceCalculator; + BFC faceCalculator; const FaceListType faceList = faceCalculator(input, outputRegionForThread, this->GetOperator().GetRadius()); TotalProgressReporter progress(this, output->GetRequestedRegion().GetNumberOfPixels()); @@ -148,15 +148,15 @@ NormalizedCorrelationImageFilter bit; - ImageRegionIterator it; - ImageRegionConstIterator mit; - unsigned int i; - const unsigned int templateSize = normalizedTemplate.Size(); - OutputPixelRealType realTemplateSize; - OutputPixelRealType value; - OutputPixelRealType numerator; - OutputPixelRealType denominator; - const OutputPixelRealType zero = OutputPixelType{}; + ImageRegionIterator it; + ImageRegionConstIterator mit; + unsigned int i; + const unsigned int templateSize = normalizedTemplate.Size(); + OutputPixelRealType realTemplateSize; + OutputPixelRealType value; + OutputPixelRealType numerator; + OutputPixelRealType denominator; + const OutputPixelRealType zero = OutputPixelType{}; realTemplateSize = static_cast(templateSize); for (const auto & face : faceList) diff --git a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterDeltaFunctionTest.cxx b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterDeltaFunctionTest.cxx index 70e55a7f4a1..c6825d09c96 100644 --- a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterDeltaFunctionTest.cxx +++ b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterDeltaFunctionTest.cxx @@ -43,7 +43,7 @@ itkConvolutionImageFilterDeltaFunctionTest(int argc, char * argv[]) // Set up delta function image. const ImageType::RegionType region = reader->GetOutput()->GetLargestPossibleRegion(); - auto deltaFunctionImage = ImageType::New(); + auto deltaFunctionImage = ImageType::New(); deltaFunctionImage->SetRegions(region); deltaFunctionImage->AllocateInitialized(); diff --git a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterStreamingTest.cxx b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterStreamingTest.cxx index 8793c97a425..293432571e7 100644 --- a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterStreamingTest.cxx +++ b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterStreamingTest.cxx @@ -33,7 +33,7 @@ GenerateKernelForStreamingTest() { using SourceType = itk::GaussianImageSource; using KernelSizeType = typename SourceType::SizeType; - auto source = SourceType::New(); + auto source = SourceType::New(); constexpr KernelSizeType kernelSize{ { 3, 5 } }; source->SetSize(kernelSize); source->SetMean(2); diff --git a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterSubregionTest.cxx b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterSubregionTest.cxx index 15faee64027..c50a153bb42 100644 --- a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterSubregionTest.cxx +++ b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterSubregionTest.cxx @@ -31,7 +31,7 @@ GenerateGaussianKernelForSubregionTest() { using SourceType = itk::GaussianImageSource; using KernelSizeType = typename SourceType::SizeType; - auto source = SourceType::New(); + auto source = SourceType::New(); constexpr KernelSizeType kernelSize{ { 3, 5 } }; source->SetSize(kernelSize); source->SetMean(2); @@ -65,9 +65,9 @@ doConvolutionImageFilterSubregionTest(int argc, char * argv[]) const RegionType requestedRegion(requestedIndex, requestedSize); const bool normalize = (argc > 8 ? atoi(argv[8]) == 1 : false); - auto regionMode = (argc > 9 && std::string("valid").compare(argv[9]) == 0 - ? itk::ConvolutionImageFilterBaseEnums::ConvolutionImageFilterOutputRegion::VALID - : itk::ConvolutionImageFilterBaseEnums::ConvolutionImageFilterOutputRegion::SAME); + auto regionMode = (argc > 9 && std::string("valid").compare(argv[9]) == 0 + ? itk::ConvolutionImageFilterBaseEnums::ConvolutionImageFilterOutputRegion::VALID + : itk::ConvolutionImageFilterBaseEnums::ConvolutionImageFilterOutputRegion::SAME); using ReaderType = itk::ImageFileReader; diff --git a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTest.cxx b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTest.cxx index a9c994a2284..bff7e3eeae0 100644 --- a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTest.cxx @@ -166,7 +166,7 @@ itkConvolutionImageFilterTest(int argc, char * argv[]) // Test VALID output region mode with kernel that is larger than // the input image. Should result in a zero-size valid region. - auto largeKernel = ImageType::New(); + auto largeKernel = ImageType::New(); ImageType::RegionType kernelRegion(reader1->GetOutput()->GetLargestPossibleRegion().GetSize()); kernelRegion.PadByRadius(5); @@ -188,8 +188,8 @@ itkConvolutionImageFilterTest(int argc, char * argv[]) } // Test for invalid request region. - auto invalidIndex = ImageType::IndexType::Filled(1000); - auto invalidSize = ImageType::SizeType::Filled(1000); + auto invalidIndex = ImageType::IndexType::Filled(1000); + auto invalidSize = ImageType::SizeType::Filled(1000); const ImageType::RegionType invalidRequestRegion(invalidIndex, invalidSize); convoluter->GetOutput()->SetRequestedRegion(invalidRequestRegion); try diff --git a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTestInt.cxx b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTestInt.cxx index c04fa7db791..1955889768f 100644 --- a/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTestInt.cxx +++ b/Modules/Filtering/Convolution/test/itkConvolutionImageFilterTestInt.cxx @@ -86,7 +86,7 @@ itkConvolutionImageFilterTestInt(int argc, char * argv[]) auto monitor = MonitorFilter::New(); monitor->SetInput(convolver->GetOutput()); - constexpr unsigned int numberOfStreamDivisions = 4; + constexpr unsigned int numberOfStreamDivisions = 4; const itk::StreamingImageFilter::Pointer streamingFilter = itk::StreamingImageFilter::New(); streamingFilter->SetNumberOfStreamDivisions(numberOfStreamDivisions); diff --git a/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterDeltaFunctionTest.cxx b/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterDeltaFunctionTest.cxx index 0bbb76933f3..294c300d135 100644 --- a/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterDeltaFunctionTest.cxx +++ b/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterDeltaFunctionTest.cxx @@ -54,7 +54,7 @@ itkFFTConvolutionImageFilterDeltaFunctionTest(int argc, char * argv[]) // Set up delta function image const ImageType::RegionType region = reader->GetOutput()->GetLargestPossibleRegion(); - auto deltaFunctionImage = ImageType::New(); + auto deltaFunctionImage = ImageType::New(); deltaFunctionImage->SetRegions(region); deltaFunctionImage->AllocateInitialized(); diff --git a/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTest.cxx b/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTest.cxx index 0eb0e2d6832..2d6ff3f0187 100644 --- a/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Convolution/test/itkFFTConvolutionImageFilterTest.cxx @@ -171,7 +171,7 @@ itkFFTConvolutionImageFilterTest(int argc, char * argv[]) itk::ConstantBoundaryCondition constantBoundaryCondition; convoluter->SetBoundaryCondition(&constantBoundaryCondition); - itk::PeriodicBoundaryCondition periodicBoundaryCondition; + itk::PeriodicBoundaryCondition periodicBoundaryCondition; itk::ZeroFluxNeumannBoundaryCondition zeroFluxNeumannBoundaryCondition; if (argc >= 7) { @@ -213,7 +213,7 @@ itkFFTConvolutionImageFilterTest(int argc, char * argv[]) // Test VALID output region mode with kernel that is larger than // the input image. Should result in a zero-size valid region. - auto largeKernel = ImageType::New(); + auto largeKernel = ImageType::New(); ImageType::RegionType kernelRegion(reader1->GetOutput()->GetLargestPossibleRegion().GetSize()); kernelRegion.PadByRadius(5); @@ -226,8 +226,8 @@ itkFFTConvolutionImageFilterTest(int argc, char * argv[]) ITK_TRY_EXPECT_EXCEPTION(convoluter->Update()); // Test for invalid request region. - auto invalidIndex = ImageType::IndexType::Filled(1000); - auto invalidSize = ImageType::SizeType::Filled(1000); + auto invalidIndex = ImageType::IndexType::Filled(1000); + auto invalidSize = ImageType::SizeType::Filled(1000); const ImageType::RegionType invalidRequestRegion(invalidIndex, invalidSize); convoluter->GetOutput()->SetRequestedRegion(invalidRequestRegion); diff --git a/Modules/Filtering/Convolution/test/itkFFTNormalizedCorrelationImageFilterTest.cxx b/Modules/Filtering/Convolution/test/itkFFTNormalizedCorrelationImageFilterTest.cxx index bf59e4be804..b9e54171a4d 100644 --- a/Modules/Filtering/Convolution/test/itkFFTNormalizedCorrelationImageFilterTest.cxx +++ b/Modules/Filtering/Convolution/test/itkFFTNormalizedCorrelationImageFilterTest.cxx @@ -53,11 +53,11 @@ itkFFTNormalizedCorrelationImageFilterTest(int argc, char * argv[]) using RealImageType = itk::Image; using FilterType = itk::FFTNormalizedCorrelationImageFilter; - char * fixedImageFileName = argv[1]; - char * movingImageFileName = argv[2]; - const char * outputImageFileName = argv[3]; + char * fixedImageFileName = argv[1]; + char * movingImageFileName = argv[2]; + const char * outputImageFileName = argv[3]; constexpr FilterType::SizeValueType requiredNumberOfOverlappingPixels = 0; - FilterType::RealPixelType requiredFractionOfOverlappingPixels = 0; + FilterType::RealPixelType requiredFractionOfOverlappingPixels = 0; if (argc > 4) { requiredFractionOfOverlappingPixels = std::stod(argv[4]); diff --git a/Modules/Filtering/Convolution/test/itkMaskedFFTNormalizedCorrelationImageFilterTest.cxx b/Modules/Filtering/Convolution/test/itkMaskedFFTNormalizedCorrelationImageFilterTest.cxx index 90990a34081..de311db256d 100644 --- a/Modules/Filtering/Convolution/test/itkMaskedFFTNormalizedCorrelationImageFilterTest.cxx +++ b/Modules/Filtering/Convolution/test/itkMaskedFFTNormalizedCorrelationImageFilterTest.cxx @@ -47,11 +47,11 @@ itkMaskedFFTNormalizedCorrelationImageFilterTest(int argc, char * argv[]) using RealImageType = itk::Image; using FilterType = itk::MaskedFFTNormalizedCorrelationImageFilter; - char * fixedImageFileName = argv[1]; - char * movingImageFileName = argv[2]; - const char * outputImageFileName = argv[3]; + char * fixedImageFileName = argv[1]; + char * movingImageFileName = argv[2]; + const char * outputImageFileName = argv[3]; constexpr FilterType::SizeValueType requiredNumberOfOverlappingPixels = 0; - FilterType::RealPixelType requiredFractionOfOverlappingPixels = 0; + FilterType::RealPixelType requiredFractionOfOverlappingPixels = 0; if (argc > 4) { requiredFractionOfOverlappingPixels = std::stod(argv[4]); @@ -74,7 +74,7 @@ itkMaskedFFTNormalizedCorrelationImageFilterTest(int argc, char * argv[]) if (argc > 5) { char * fixedMaskFileName = argv[5]; - auto fixedMaskReader = MaskReaderType::New(); + auto fixedMaskReader = MaskReaderType::New(); fixedMaskReader->SetFileName(fixedMaskFileName); fixedMaskReader->Update(); filter->SetFixedImageMask(fixedMaskReader->GetOutput()); @@ -83,7 +83,7 @@ itkMaskedFFTNormalizedCorrelationImageFilterTest(int argc, char * argv[]) if (argc > 6) { char * movingMaskFileName = argv[6]; - auto movingMaskReader = MaskReaderType::New(); + auto movingMaskReader = MaskReaderType::New(); movingMaskReader->SetFileName(movingMaskFileName); movingMaskReader->Update(); filter->SetMovingImageMask(movingMaskReader->GetOutput()); diff --git a/Modules/Filtering/Convolution/test/itkNormalizedCorrelationImageFilterTest.cxx b/Modules/Filtering/Convolution/test/itkNormalizedCorrelationImageFilterTest.cxx index 59d135181a0..4a4125de7c0 100644 --- a/Modules/Filtering/Convolution/test/itkNormalizedCorrelationImageFilterTest.cxx +++ b/Modules/Filtering/Convolution/test/itkNormalizedCorrelationImageFilterTest.cxx @@ -77,7 +77,7 @@ itkNormalizedCorrelationImageFilterTest(int argc, char * argv[]) // Create a filter using FilterType = itk::NormalizedCorrelationImageFilter; - auto filter = FilterType::New(); + auto filter = FilterType::New(); const itk::SimpleFilterWatcher watcher(filter, "Normalized correlation"); filter->SetInput(input->GetOutput()); diff --git a/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowFunction.h b/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowFunction.h index 71e5573d1ae..4a9c1b5d7e4 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowFunction.h +++ b/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowFunction.h @@ -82,8 +82,8 @@ class ITK_TEMPLATE_EXPORT BinaryMinMaxCurvatureFlowFunction : public MinMaxCurva /** Compute the solution update for each pixel that does not lie on a the data set boundary. */ PixelType ComputeUpdate(const NeighborhoodType & it, - void * globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0)) override; + void * globalData, + const FloatOffsetType & offset = FloatOffsetType(0.0)) override; protected: BinaryMinMaxCurvatureFlowFunction(); diff --git a/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowFunction.hxx b/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowFunction.hxx index 93278a4875d..4d1bcdd71e0 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowFunction.hxx +++ b/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowFunction.hxx @@ -33,8 +33,8 @@ BinaryMinMaxCurvatureFlowFunction::BinaryMinMaxCurvatureFlowFunction() template auto BinaryMinMaxCurvatureFlowFunction::ComputeUpdate(const NeighborhoodType & it, - void * globalData, - const FloatOffsetType & offset) -> PixelType + void * globalData, + const FloatOffsetType & offset) -> PixelType { using CurvatureFlowFunctionType = CurvatureFlowFunction; const PixelType update = this->CurvatureFlowFunctionType::ComputeUpdate(it, globalData, offset); @@ -45,7 +45,7 @@ BinaryMinMaxCurvatureFlowFunction::ComputeUpdate(const NeighborhoodType } const NeighborhoodInnerProduct innerProduct; - const PixelType avgValue = innerProduct(it, this->m_StencilOperator); + const PixelType avgValue = innerProduct(it, this->m_StencilOperator); if (avgValue < m_Threshold) { diff --git a/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowFunction.h b/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowFunction.h index 7b9c09af7a5..9db8ba48299 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowFunction.h +++ b/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowFunction.h @@ -126,8 +126,8 @@ class ITK_TEMPLATE_EXPORT CurvatureFlowFunction : public FiniteDifferenceFunctio /** Compute the solution update for each pixel that does not lie on a the data set boundary. */ PixelType ComputeUpdate(const NeighborhoodType & it, - void * globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0)) override; + void * globalData, + const FloatOffsetType & offset = FloatOffsetType(0.0)) override; protected: /// \cond HIDE_STRUCTURE diff --git a/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowFunction.hxx b/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowFunction.hxx index 570efe96065..8b6a86d5de7 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowFunction.hxx +++ b/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowFunction.hxx @@ -26,7 +26,7 @@ namespace itk template CurvatureFlowFunction::CurvatureFlowFunction() { - RadiusType r; + RadiusType r; unsigned int j; for (j = 0; j < ImageDimension; ++j) @@ -49,8 +49,8 @@ CurvatureFlowFunction::ComputeGlobalTimeStep(void * itkNotUsed(gd)) cons template auto CurvatureFlowFunction::ComputeUpdate(const NeighborhoodType & it, - void * itkNotUsed(gd), - const FloatOffsetType & itkNotUsed(offset)) -> PixelType + void * itkNotUsed(gd), + const FloatOffsetType & itkNotUsed(offset)) -> PixelType { // cache the stride for each dimension IdentifierType stride[ImageDimension]; @@ -63,10 +63,10 @@ CurvatureFlowFunction::ComputeUpdate(const NeighborhoodType & it, const IdentifierType center = it.Size() / 2; const NeighborhoodScalesType neighborhoodScales = this->ComputeNeighborhoodScales(); - PixelRealType magnitudeSqr = 0.0; - PixelRealType firstderiv[ImageDimension]; - PixelRealType secderiv[ImageDimension]; - PixelRealType crossderiv[ImageDimension][ImageDimension] = {}; + PixelRealType magnitudeSqr = 0.0; + PixelRealType firstderiv[ImageDimension]; + PixelRealType secderiv[ImageDimension]; + PixelRealType crossderiv[ImageDimension][ImageDimension] = {}; for (unsigned int i = 0; i < ImageDimension; ++i) { // compute first order derivatives diff --git a/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowImageFilter.hxx b/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowImageFilter.hxx index abcb2205f74..615e75aeb10 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowImageFilter.hxx +++ b/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowImageFilter.hxx @@ -77,7 +77,7 @@ CurvatureFlowImageFilter::GenerateInputRequestedRegio // get pointers to the input and output const typename Superclass::InputImagePointer inputPtr = const_cast(this->GetInput()); - const OutputImagePointer outputPtr = this->GetOutput(); + const OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) { diff --git a/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.h b/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.h index d3a6e7bca61..39b1284d2f8 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.h +++ b/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.h @@ -90,8 +90,8 @@ class ITK_TEMPLATE_EXPORT MinMaxCurvatureFlowFunction : public CurvatureFlowFunc /** Compute the solution update for each pixel that does not lie on a the data set boundary. */ PixelType ComputeUpdate(const NeighborhoodType & it, - void * globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0)) override; + void * globalData, + const FloatOffsetType & offset = FloatOffsetType(0.0)) override; protected: MinMaxCurvatureFlowFunction(); diff --git a/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.hxx b/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.hxx index c83283880bf..90042ab180f 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.hxx +++ b/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.hxx @@ -41,7 +41,7 @@ MinMaxCurvatureFlowFunction::SetStencilRadius(const RadiusValueType valu } m_StencilRadius = (value > 1) ? value : 1; - RadiusType radius; + RadiusType radius; unsigned int j; for (j = 0; j < ImageDimension; ++j) @@ -61,8 +61,8 @@ MinMaxCurvatureFlowFunction::InitializeStencilOperator() m_StencilOperator.SetRadius(m_StencilRadius); - RadiusValueType counter[ImageDimension]; - unsigned int j; + RadiusValueType counter[ImageDimension]; + unsigned int j; const RadiusValueType span = 2 * m_StencilRadius + 1; const RadiusValueType sqrRadius = m_StencilRadius * m_StencilRadius; for (j = 0; j < ImageDimension; ++j) @@ -123,11 +123,11 @@ MinMaxCurvatureFlowFunction::ComputeThreshold(const DispatchBase &, cons PixelType threshold{}; // Compute gradient - PixelType gradient[ImageDimension]; - PixelType gradMagnitude; + PixelType gradient[ImageDimension]; + PixelType gradMagnitude; SizeValueType stride; SizeValueType center; - unsigned int j; + unsigned int j; center = it.Size() / 2; @@ -151,7 +151,7 @@ MinMaxCurvatureFlowFunction::ComputeThreshold(const DispatchBase &, cons // Search for all position in the neighborhood perpendicular to // the gradient and at a distance of StencilRadius from center. - RadiusValueType counter[ImageDimension]; + RadiusValueType counter[ImageDimension]; const RadiusValueType span = 2 * m_StencilRadius + 1; for (j = 0; j < ImageDimension; ++j) { @@ -228,8 +228,8 @@ MinMaxCurvatureFlowFunction::ComputeThreshold(const Dispatch<2> &, const PixelType threshold{}; // Compute gradient - double gradient[imageDimension]; - double gradMagnitude; + double gradient[imageDimension]; + double gradMagnitude; SizeValueType stride; SizeValueType center; SizeValueType position[imageDimension]; @@ -290,8 +290,8 @@ MinMaxCurvatureFlowFunction::ComputeThreshold(const Dispatch<3> &, const PixelType threshold{}; // Compute gradient - double gradient[imageDimension]; - double gradMagnitude; + double gradient[imageDimension]; + double gradMagnitude; SizeValueType strideY; SizeValueType strideZ; SizeValueType center; @@ -395,8 +395,8 @@ MinMaxCurvatureFlowFunction::ComputeThreshold(const Dispatch<3> &, const template auto MinMaxCurvatureFlowFunction::ComputeUpdate(const NeighborhoodType & it, - void * globalData, - const FloatOffsetType & offset) -> PixelType + void * globalData, + const FloatOffsetType & offset) -> PixelType { const PixelType update = this->Superclass::ComputeUpdate(it, globalData, offset); @@ -408,7 +408,7 @@ MinMaxCurvatureFlowFunction::ComputeUpdate(const NeighborhoodType & it, const PixelType threshold = this->ComputeThreshold(Dispatch(), it); const NeighborhoodInnerProduct innerProduct; - const PixelType avgValue = innerProduct(it, m_StencilOperator); + const PixelType avgValue = innerProduct(it, m_StencilOperator); if (avgValue < threshold) { diff --git a/Modules/Filtering/CurvatureFlow/test/itkBinaryMinMaxCurvatureFlowImageFilterTest.cxx b/Modules/Filtering/CurvatureFlow/test/itkBinaryMinMaxCurvatureFlowImageFilterTest.cxx index 3d43d960d1b..e85febf70ae 100644 --- a/Modules/Filtering/CurvatureFlow/test/itkBinaryMinMaxCurvatureFlowImageFilterTest.cxx +++ b/Modules/Filtering/CurvatureFlow/test/itkBinaryMinMaxCurvatureFlowImageFilterTest.cxx @@ -44,11 +44,11 @@ constexpr unsigned int MAXRUNS = 5; // maximum number of runs template int testBinaryMinMaxCurvatureFlow(itk::Size & size, - double threshold, - double radius, - int numberOfRuns, - unsigned int niter[], - unsigned long radii[]); + double threshold, + double radius, + int numberOfRuns, + unsigned int niter[], + unsigned long radii[]); /** * This file tests the functionality of the BinaryMinMaxCurvatureFlowImageFilter. @@ -68,9 +68,9 @@ itkBinaryMinMaxCurvatureFlowImageFilterTest(int, char *[]) size2D[0] = 64; size2D[1] = 64; constexpr double radius = 20.0; - constexpr int numberOfRuns = 2; - unsigned int niter[MAXRUNS] = { 100, 100 }; - unsigned long radii[MAXRUNS] = { 1, 3 }; + constexpr int numberOfRuns = 2; + unsigned int niter[MAXRUNS] = { 100, 100 }; + unsigned long radii[MAXRUNS] = { 1, 3 }; const int err2D = testBinaryMinMaxCurvatureFlow(size2D, 127.5, radius, numberOfRuns, niter, radii); @@ -85,11 +85,11 @@ itkBinaryMinMaxCurvatureFlowImageFilterTest(int, char *[]) template int testBinaryMinMaxCurvatureFlow(itk::Size & size, // ND image size - double threshold, - double radius, // ND-sphere radius - int numberOfRuns, // number of times to run the filter - unsigned int niter[], // number of iterations - unsigned long radii[] // stencil radius + double threshold, + double radius, // ND-sphere radius + int numberOfRuns, // number of times to run the filter + unsigned int niter[], // number of iterations + unsigned long radii[] // stencil radius ) { @@ -108,10 +108,10 @@ testBinaryMinMaxCurvatureFlow(itk::Size & size, // ND image siz * Create an image containing a circle/sphere with intensity of 0 * and background of 255 with added salt and pepper noise. */ - const double sqrRadius = itk::Math::sqr(radius); // radius of the circle/sphere - constexpr double fractionNoise = 0.30; // salt & pepper noise fraction - constexpr PixelType foreground = 0.0; // intensity value of the foreground - constexpr PixelType background = 255.0; // intensity value of the background + const double sqrRadius = itk::Math::sqr(radius); // radius of the circle/sphere + constexpr double fractionNoise = 0.30; // salt & pepper noise fraction + constexpr PixelType foreground = 0.0; // intensity value of the foreground + constexpr PixelType background = 255.0; // intensity value of the background std::cout << "Create an image of circle/sphere with noise" << std::endl; auto circleImage = ImageType::New(); @@ -127,7 +127,7 @@ testBinaryMinMaxCurvatureFlow(itk::Size & size, // ND image siz for (IteratorType circleIter(circleImage, circleImage->GetBufferedRegion()); !circleIter.IsAtEnd(); ++circleIter) { typename ImageType::IndexType index = circleIter.GetIndex(); - float value; + float value; double lhs = 0.0; for (int j = 0; j < ImageDimension; ++j) @@ -162,7 +162,7 @@ testBinaryMinMaxCurvatureFlow(itk::Size & size, // ND image siz denoiser->SetThreshold(threshold); // attach a progress watcher to the denoiser - ShowProgressObject progressWatch(denoiser); + ShowProgressObject progressWatch(denoiser); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); @@ -208,7 +208,7 @@ testBinaryMinMaxCurvatureFlow(itk::Size & size, // ND image siz for (IteratorType outIter(swapPointer, swapPointer->GetBufferedRegion()); !outIter.IsAtEnd(); ++outIter) { typename ImageType::IndexType index = outIter.GetIndex(); - const PixelType value = outIter.Get(); + const PixelType value = outIter.Get(); double lhs = 0.0; for (int j = 0; j < ImageDimension; ++j) diff --git a/Modules/Filtering/CurvatureFlow/test/itkCurvatureFlowTest.cxx b/Modules/Filtering/CurvatureFlow/test/itkCurvatureFlowTest.cxx index 1dbb5176e20..1efaa35db14 100644 --- a/Modules/Filtering/CurvatureFlow/test/itkCurvatureFlowTest.cxx +++ b/Modules/Filtering/CurvatureFlow/test/itkCurvatureFlowTest.cxx @@ -148,9 +148,9 @@ itkCurvatureFlowTest(int argc, char * argv[]) std::cout << "Test when wrong function type." << std::endl; using FunctionType = itk::DummyFunction; filter = FilterType::New(); - auto function = FunctionType::New(); - auto dummy = ImageType::New(); - auto size = ImageType::SizeType::Filled(3); + auto function = FunctionType::New(); + auto dummy = ImageType::New(); + auto size = ImageType::SizeType::Filled(3); const ImageType::RegionType region(size); dummy->SetRegions(region); dummy->Allocate(); @@ -190,7 +190,7 @@ itkCurvatureFlowTest(int argc, char * argv[]) denoiser->SetTimeStep(0.05); denoiser->SetNumberOfIterations(8); - ShowProgressObject progressWatch(denoiser); + ShowProgressObject progressWatch(denoiser); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); @@ -219,7 +219,7 @@ itkCurvatureFlowTest(int argc, char * argv[]) IteratorType it1(denoiser->GetOutput(), denoiser->GetOutput()->GetBufferedRegion()); IteratorType it2(streamer->GetOutput(), streamer->GetOutput()->GetBufferedRegion()); - bool testPass = true; + bool testPass = true; unsigned int failedPixels = 0; while (!it1.IsAtEnd()) { diff --git a/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.h b/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.h index 3ba06d8c6b8..f80e0c0af93 100644 --- a/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.h +++ b/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.h @@ -142,7 +142,7 @@ class ITK_TEMPLATE_EXPORT InverseDeconvolutionFunctor operator()(const TInput1 & I, const TInput2 & H) const { const double absH = itk::Math::abs(H); - TOutput value{}; + TOutput value{}; if (absH >= m_KernelZeroMagnitudeThreshold) { value = static_cast(I / H); diff --git a/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.hxx b/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.hxx index 7136101bc84..0bc4edd208e 100644 --- a/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.hxx +++ b/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.hxx @@ -78,7 +78,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { this->Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/Deconvolution/include/itkIterativeDeconvolutionImageFilter.hxx b/Modules/Filtering/Deconvolution/include/itkIterativeDeconvolutionImageFilter.hxx index 1cb34372c35..350f362b3bd 100644 --- a/Modules/Filtering/Deconvolution/include/itkIterativeDeconvolutionImageFilter.hxx +++ b/Modules/Filtering/Deconvolution/include/itkIterativeDeconvolutionImageFilter.hxx @@ -48,8 +48,8 @@ template ::Initialize( ProgressAccumulator * progress, - float progressWeight, - float itkNotUsed(iterationProgressWeight)) + float progressWeight, + float itkNotUsed(iterationProgressWeight)) { // Generate an estimate if there is none or if the input has changed. if (!this->m_CurrentEstimate || m_InputMTime != this->GetInput()->GetMTime()) @@ -75,7 +75,7 @@ template ::Finish( ProgressAccumulator * progress, - float progressWeight) + float progressWeight) { this->CropOutput(m_CurrentEstimate, progress, progressWeight); @@ -113,7 +113,7 @@ IterativeDeconvolutionImageFilterSetMiniPipelineFilter(this); const typename Superclass::InputImageConstPointer inputPtr = this->GetInput(); - const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(0); + const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(0); outputPtr->SetRequestedRegion(inputPtr->GetRequestedRegion()); outputPtr->SetBufferedRegion(inputPtr->GetBufferedRegion()); @@ -142,7 +142,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { this->Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.h b/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.h index 9d5d053c195..faa42bc918c 100644 --- a/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.h +++ b/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.h @@ -162,7 +162,7 @@ class ITK_TEMPLATE_EXPORT LandweberDeconvolutionImageFilter InternalComplexImageType>; typename LandweberFilterType::Pointer m_LandweberFilter{}; - typename IFFTFilterType::Pointer m_IFFTFilter{}; + typename IFFTFilterType::Pointer m_IFFTFilter{}; }; } // end namespace itk diff --git a/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.hxx b/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.hxx index 101363a01f8..4ed60c8667e 100644 --- a/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.hxx +++ b/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.hxx @@ -41,8 +41,8 @@ template ::Initialize( ProgressAccumulator * progress, - float progressWeight, - float iterationProgressWeight) + float progressWeight, + float iterationProgressWeight) { this->Superclass::Initialize(progress, 0.5f * progressWeight, iterationProgressWeight); @@ -73,7 +73,7 @@ template ::Iteration( ProgressAccumulator * progress, - float iterationProgressWeight) + float iterationProgressWeight) { // Set up minipipeline to compute the new estimate InternalComplexImagePointerType transformedEstimate; @@ -94,7 +94,7 @@ template ::Finish( ProgressAccumulator * progress, - float progressWeight) + float progressWeight) { this->Superclass::Finish(progress, progressWeight); @@ -106,7 +106,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { this->Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/Deconvolution/include/itkParametricBlindLeastSquaresDeconvolutionImageFilter.hxx b/Modules/Filtering/Deconvolution/include/itkParametricBlindLeastSquaresDeconvolutionImageFilter.hxx index 5a2f646499a..899bfdd8be4 100644 --- a/Modules/Filtering/Deconvolution/include/itkParametricBlindLeastSquaresDeconvolutionImageFilter.hxx +++ b/Modules/Filtering/Deconvolution/include/itkParametricBlindLeastSquaresDeconvolutionImageFilter.hxx @@ -57,8 +57,8 @@ template void ParametricBlindLeastSquaresDeconvolutionImageFilter::Initialize( ProgressAccumulator * progress, - float progressWeight, - float iterationProgressWeight) + float progressWeight, + float iterationProgressWeight) { // Set the kernel, needed by the class to pad the input properly m_KernelSource->Update(); @@ -92,7 +92,7 @@ ParametricBlindLeastSquaresDeconvolutionImageFilter InternalComplexType { @@ -144,9 +144,9 @@ ParametricBlindLeastSquaresDeconvolutionImageFilter; - auto estimateShifter = EstimateShiftFilterType::New(); + auto estimateShifter = EstimateShiftFilterType::New(); typename EstimateShiftFilterType::OffsetType shift; - typename InternalImageType::SizeType inputSize = this->GetInput()->GetLargestPossibleRegion().GetSize(); + typename InternalImageType::SizeType inputSize = this->GetInput()->GetLargestPossibleRegion().GetSize(); for (unsigned int i = 0; i < InternalImageType::ImageDimension; ++i) { shift[i] = -(static_cast(inputSize[i]) / 2); @@ -190,16 +190,16 @@ ParametricBlindLeastSquaresDeconvolutionImageFilterGetParameters(); - std::vector gradient(parameters.Size()); + std::vector gradient(parameters.Size()); for (unsigned int i = 0; i < parameters.Size(); ++i) { using InternalKernelImageType = typename KernelSourceType::OutputImageType; using InternalKernelImagePointer = typename InternalKernelImageType::Pointer; const typename KernelSourceType::ParametersValueType theta = parameters[i]; - constexpr double deltaTheta = 0.0001; - const double thetaPlus = theta + deltaTheta; - const double thetaMinus = theta - deltaTheta; + constexpr double deltaTheta = 0.0001; + const double thetaPlus = theta + deltaTheta; + const double thetaMinus = theta - deltaTheta; // Generate the plus image parameters[i] = thetaPlus; @@ -219,9 +219,9 @@ ParametricBlindLeastSquaresDeconvolutionImageFilterGetLargestPossibleRegion()); - ImageRegionConstIterator plusImageIter(plusImage, region); - ImageRegionConstIterator minusImageIter(minusImage, region); - ImageRegionConstIterator jacobianImageIter(jacobianIFFT->GetOutput(), region); + ImageRegionConstIterator plusImageIter(plusImage, region); + ImageRegionConstIterator minusImageIter(minusImage, region); + ImageRegionConstIterator jacobianImageIter(jacobianIFFT->GetOutput(), region); double sum = 0.0; while (!plusImageIter.IsAtEnd()) @@ -250,7 +250,7 @@ template void ParametricBlindLeastSquaresDeconvolutionImageFilter::Finish( ProgressAccumulator * progress, - float progressWeight) + float progressWeight) { // Take the inverse Fourier transform of the current estimate using InverseFFTFilterType = HalfHermitianToRealInverseFFTImageFilter; @@ -274,7 +274,7 @@ template void ParametricBlindLeastSquaresDeconvolutionImageFilter::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { this->Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/Deconvolution/include/itkProjectedIterativeDeconvolutionImageFilter.hxx b/Modules/Filtering/Deconvolution/include/itkProjectedIterativeDeconvolutionImageFilter.hxx index 4d3f0acbbed..652d395a717 100644 --- a/Modules/Filtering/Deconvolution/include/itkProjectedIterativeDeconvolutionImageFilter.hxx +++ b/Modules/Filtering/Deconvolution/include/itkProjectedIterativeDeconvolutionImageFilter.hxx @@ -37,8 +37,8 @@ ProjectedIterativeDeconvolutionImageFilter::~ProjectedIterativeDeco template void ProjectedIterativeDeconvolutionImageFilter::Initialize(ProgressAccumulator * progress, - float progressWeight, - float iterationProgressWeight) + float progressWeight, + float iterationProgressWeight) { this->Superclass::Initialize(progress, progressWeight, iterationProgressWeight); @@ -50,7 +50,7 @@ ProjectedIterativeDeconvolutionImageFilter::Initialize(ProgressAccu template void ProjectedIterativeDeconvolutionImageFilter::Iteration(ProgressAccumulator * progress, - float iterationProgressWeight) + float iterationProgressWeight) { this->Superclass::Iteration(progress, iterationProgressWeight); diff --git a/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.h b/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.h index d4c4fdf4903..d9af5fb104e 100644 --- a/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.h +++ b/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.h @@ -120,14 +120,14 @@ class ITK_TEMPLATE_EXPORT RichardsonLucyDeconvolutionImageFilter InternalImagePointerType m_PaddedInput{}; - typename ComplexMultiplyType::Pointer m_ComplexMultiplyFilter1{}; - typename IFFTFilterType::Pointer m_IFFTFilter1{}; - typename DivideFilterType::Pointer m_DivideFilter{}; - typename FFTFilterType::Pointer m_FFTFilter{}; - typename ConjugateAdaptorType::Pointer m_ConjugateAdaptor{}; + typename ComplexMultiplyType::Pointer m_ComplexMultiplyFilter1{}; + typename IFFTFilterType::Pointer m_IFFTFilter1{}; + typename DivideFilterType::Pointer m_DivideFilter{}; + typename FFTFilterType::Pointer m_FFTFilter{}; + typename ConjugateAdaptorType::Pointer m_ConjugateAdaptor{}; typename ComplexConjugateMultiplyType::Pointer m_ComplexMultiplyFilter2{}; - typename IFFTFilterType::Pointer m_IFFTFilter2{}; - typename MultiplyFilterType::Pointer m_MultiplyFilter{}; + typename IFFTFilterType::Pointer m_IFFTFilter2{}; + typename MultiplyFilterType::Pointer m_MultiplyFilter{}; }; } // end namespace itk diff --git a/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.hxx b/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.hxx index 4c05b50efae..9ede2f7df24 100644 --- a/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.hxx +++ b/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.hxx @@ -40,8 +40,8 @@ template ::Initialize( ProgressAccumulator * progress, - float progressWeight, - float iterationProgressWeight) + float progressWeight, + float iterationProgressWeight) { this->Superclass::Initialize(progress, 0.5f * progressWeight, iterationProgressWeight); @@ -110,7 +110,7 @@ template ::Iteration( ProgressAccumulator * progress, - float iterationProgressWeight) + float iterationProgressWeight) { // Set up minipipeline to compute the new estimate InternalComplexImagePointerType transformedEstimate; @@ -132,7 +132,7 @@ template ::Finish( ProgressAccumulator * progress, - float progressWeight) + float progressWeight) { this->Superclass::Finish(progress, progressWeight); @@ -150,7 +150,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { this->Superclass::PrintSelf(os, indent); } diff --git a/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.h b/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.h index 2e51062fcc0..ebb26e6be71 100644 --- a/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.h +++ b/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.h @@ -143,7 +143,7 @@ class ITK_TEMPLATE_EXPORT TikhonovDeconvolutionFunctor { const typename TOutput::value_type normH = std::norm(H); const typename TOutput::value_type denominator = normH + m_RegularizationConstant; - TOutput value{}; + TOutput value{}; if (denominator >= m_KernelZeroMagnitudeThreshold) { value = static_cast(I * (std::conj(H) / denominator)); diff --git a/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.hxx b/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.hxx index 8cd8f779017..aaaf07fd3fd 100644 --- a/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.hxx +++ b/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.hxx @@ -77,7 +77,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { this->Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/Deconvolution/include/itkWienerDeconvolutionImageFilter.hxx b/Modules/Filtering/Deconvolution/include/itkWienerDeconvolutionImageFilter.hxx index 51be0b4ff62..efcd7a79cd7 100644 --- a/Modules/Filtering/Deconvolution/include/itkWienerDeconvolutionImageFilter.hxx +++ b/Modules/Filtering/Deconvolution/include/itkWienerDeconvolutionImageFilter.hxx @@ -76,7 +76,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { this->Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.h b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.h index 3fa77ae658c..746b685afec 100644 --- a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.h +++ b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.h @@ -406,15 +406,15 @@ class ITK_TEMPLATE_EXPORT PatchBasedDenoisingBaseImageFilter : public ImageToIma // Cache input and output pointer to get rid of thousands of calls // to GetInput and GetOutput. const InputImageType * m_InputImage{}; - OutputImageType * m_OutputImage{}; + OutputImageType * m_OutputImage{}; private: /** Parameters that define patch size and patch weights (mask). */ - unsigned int m_PatchRadius{ 4 }; + unsigned int m_PatchRadius{ 4 }; PatchWeightsType m_PatchWeights{}; /** Parameters that define the strategy for kernel-bandwidth estimation. */ - bool m_KernelBandwidthEstimation{ false }; + bool m_KernelBandwidthEstimation{ false }; unsigned int m_KernelBandwidthUpdateFrequency{ 3 }; /** Parameters that define the total number of denoising iterations to perform @@ -424,12 +424,12 @@ class ITK_TEMPLATE_EXPORT PatchBasedDenoisingBaseImageFilter : public ImageToIma /** Parameters defining the usage of a specific noise model, if desired. */ NoiseModelEnum m_NoiseModel{ NoiseModelEnum::NOMODEL }; - double m_SmoothingWeight{ 1.0 }; - double m_NoiseModelFidelityWeight{ 0.0 }; + double m_SmoothingWeight{ 1.0 }; + double m_NoiseModelFidelityWeight{ 0.0 }; /** Parameter indicating whether components should be treated as if they are in Euclidean space regardless of pixel type. */ - bool m_AlwaysTreatComponentsAsEuclidean{ false }; + bool m_AlwaysTreatComponentsAsEuclidean{ false }; ComponentSpaceEnum m_ComponentSpace{ ComponentSpaceEnum::EUCLIDEAN }; bool m_ManualReinitialization{ false }; diff --git a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.hxx b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.hxx index a8e618ec339..a7e58e75712 100644 --- a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.hxx +++ b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.hxx @@ -211,7 +211,7 @@ PatchBasedDenoisingBaseImageFilter::GetPatchRadiusInV thisPtr->m_InputImage = this->GetInput(); } const typename InputImageType::SpacingType & spacing = this->m_InputImage->GetSpacing(); - typename InputImageType::SpacingValueType maxSpacing = spacing[0]; + typename InputImageType::SpacingValueType maxSpacing = spacing[0]; for (unsigned int dim = 1; dim < ImageDimension; ++dim) { if (spacing[dim] > maxSpacing) diff --git a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.h b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.h index ca5bdb24ae1..63a10998718 100644 --- a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.h +++ b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.h @@ -127,14 +127,14 @@ class ITK_TEMPLATE_EXPORT PatchBasedDenoisingImageFilter struct ThreadDataStruct { - ShortArrayType validDerivatives; - RealArrayType entropyFirstDerivative; - RealArrayType entropySecondDerivative; - ShortArrayType validNorms; - RealArrayType minNorm; - RealArrayType maxNorm; - BaseSamplerPointer sampler; - EigenValuesCacheType eigenValsCache; + ShortArrayType validDerivatives; + RealArrayType entropyFirstDerivative; + RealArrayType entropySecondDerivative; + ShortArrayType validNorms; + RealArrayType minNorm; + RealArrayType maxNorm; + BaseSamplerPointer sampler; + EigenValuesCacheType eigenValsCache; EigenVectorsCacheType eigenVecsCache; }; @@ -267,8 +267,8 @@ class ITK_TEMPLATE_EXPORT PatchBasedDenoisingImageFilter /** \brief A method to generically set a component */ template void - SetComponent(T & pix, - unsigned int itkNotUsed(idx), + SetComponent(T & pix, + unsigned int itkNotUsed(idx), typename DisableIfMultiComponent::type val) const { pix = val; @@ -322,13 +322,13 @@ class ITK_TEMPLATE_EXPORT PatchBasedDenoisingImageFilter void ComputeDifferenceAndWeightedSquaredNorm(const DiffusionTensor3D & a, const DiffusionTensor3D & b, - const RealArrayType & weight, - bool useCachedComputations, - SizeValueType cacheIndex, - EigenValuesCacheType & eigenValsCache, - EigenVectorsCacheType & eigenVecsCache, - RealType & diff, - RealArrayType & norm) + const RealArrayType & weight, + bool useCachedComputations, + SizeValueType cacheIndex, + EigenValuesCacheType & eigenValsCache, + EigenVectorsCacheType & eigenVecsCache, + RealType & diff, + RealArrayType & norm) { if (this->GetComponentSpace() == Superclass::ComponentSpaceEnum::RIEMANNIAN) { @@ -344,15 +344,15 @@ class ITK_TEMPLATE_EXPORT PatchBasedDenoisingImageFilter template void - ComputeDifferenceAndWeightedSquaredNorm(const PixelT & a, - const PixelT & b, - const RealArrayType & weight, - bool useCachedComputations, - SizeValueType cacheIndex, - EigenValuesCacheType & eigenValsCache, + ComputeDifferenceAndWeightedSquaredNorm(const PixelT & a, + const PixelT & b, + const RealArrayType & weight, + bool useCachedComputations, + SizeValueType cacheIndex, + EigenValuesCacheType & eigenValsCache, EigenVectorsCacheType & eigenVecsCache, - RealType & diff, - RealArrayType & norm) + RealType & diff, + RealArrayType & norm) { ComputeSignedEuclideanDifferenceAndWeightedSquaredNorm( a, b, weight, useCachedComputations, cacheIndex, eigenValsCache, eigenVecsCache, diff, norm); @@ -406,8 +406,8 @@ class ITK_TEMPLATE_EXPORT PatchBasedDenoisingImageFilter virtual ThreadDataStruct ThreadedComputeSigmaUpdate(const InputImageRegionType & regionToProcess, - const int itkNotUsed(threadId), - ThreadDataStruct threadData); + const int itkNotUsed(threadId), + ThreadDataStruct threadData); virtual RealArrayType ResolveSigmaUpdate(); @@ -417,14 +417,14 @@ class ITK_TEMPLATE_EXPORT PatchBasedDenoisingImageFilter virtual ThreadDataStruct ThreadedComputeImageUpdate(const InputImageRegionType & regionToProcess, - const int threadId, - ThreadDataStruct threadData); + const int threadId, + ThreadDataStruct threadData); virtual RealType - ComputeGradientJointEntropy(InstanceIdentifier id, + ComputeGradientJointEntropy(InstanceIdentifier id, typename ListAdaptorType::Pointer & inList, - BaseSamplerPointer & sampler, - ThreadDataStruct & threadData); + BaseSamplerPointer & sampler, + ThreadDataStruct & threadData); void ApplyUpdate() override; @@ -480,41 +480,41 @@ class ITK_TEMPLATE_EXPORT PatchBasedDenoisingImageFilter ThreadDataStruct ThreadedRiemannianMinMax(const InputImageRegionType & regionToProcess, - const int itkNotUsed(threadId), - const InputImageType * img, - ThreadDataStruct threadData); + const int itkNotUsed(threadId), + const InputImageType * img, + ThreadDataStruct threadData); virtual void ResolveRiemannianMinMax(); void - ComputeSignedEuclideanDifferenceAndWeightedSquaredNorm(const PixelType & a, - const PixelType & b, - const RealArrayType & weight, - bool useCachedComputations, - SizeValueType cacheIndex, - EigenValuesCacheType & eigenValsCache, + ComputeSignedEuclideanDifferenceAndWeightedSquaredNorm(const PixelType & a, + const PixelType & b, + const RealArrayType & weight, + bool useCachedComputations, + SizeValueType cacheIndex, + EigenValuesCacheType & eigenValsCache, EigenVectorsCacheType & eigenVecsCache, - RealType & diff, - RealArrayType & norm); + RealType & diff, + RealArrayType & norm); /** Returns the Log map in the tangent space of spdMatrixA. */ void ComputeLogMapAndWeightedSquaredGeodesicDifference(const DiffusionTensor3D & spdMatrixA, const DiffusionTensor3D & spdMatrixB, - const RealArrayType & weight, - bool useCachedComputations, - SizeValueType cacheIndex, - EigenValuesCacheType & eigenValsCache, - EigenVectorsCacheType & eigenVecsCache, - RealType & symMatrixLogMap, - RealArrayType & geodesicDist); + const RealArrayType & weight, + bool useCachedComputations, + SizeValueType cacheIndex, + EigenValuesCacheType & eigenValsCache, + EigenVectorsCacheType & eigenVecsCache, + RealType & symMatrixLogMap, + RealArrayType & geodesicDist); template void Compute3x3EigenAnalysis(const DiffusionTensor3D & spdMatrix, - FixedArray & eigenVals, - Matrix & eigenVecs); + FixedArray & eigenVals, + Matrix & eigenVecs); RealType AddEuclideanUpdate(const RealType & a, const RealType & b); @@ -527,7 +527,7 @@ class ITK_TEMPLATE_EXPORT PatchBasedDenoisingImageFilter struct ThreadFilterStruct { PatchBasedDenoisingImageFilter * Filter; - InputImageType * Img; + InputImageType * Img; }; std::vector m_ThreadData{}; @@ -543,26 +543,26 @@ class ITK_TEMPLATE_EXPORT PatchBasedDenoisingImageFilter bool m_UseFastTensorComputations{ true }; - RealArrayType m_KernelBandwidthSigma{}; - bool m_KernelBandwidthSigmaIsSet{ false }; - RealArrayType m_IntensityRescaleInvFactor{}; - PixelType m_ZeroPixel{}; + RealArrayType m_KernelBandwidthSigma{}; + bool m_KernelBandwidthSigmaIsSet{ false }; + RealArrayType m_IntensityRescaleInvFactor{}; + PixelType m_ZeroPixel{}; PixelArrayType m_ImageMin{}; PixelArrayType m_ImageMax{}; - double m_KernelBandwidthFractionPixelsForEstimation{ 0.20 }; - bool m_ComputeConditionalDerivatives{ false }; - double m_MinSigma{}; - double m_MinProbability{}; - unsigned int m_SigmaUpdateDecimationFactor{}; - double m_SigmaUpdateConvergenceTolerance{ 0.01 }; + double m_KernelBandwidthFractionPixelsForEstimation{ 0.20 }; + bool m_ComputeConditionalDerivatives{ false }; + double m_MinSigma{}; + double m_MinProbability{}; + unsigned int m_SigmaUpdateDecimationFactor{}; + double m_SigmaUpdateConvergenceTolerance{ 0.01 }; ShortArrayType m_SigmaConverged{}; - double m_KernelBandwidthMultiplicationFactor{ 1.0 }; + double m_KernelBandwidthMultiplicationFactor{ 1.0 }; RealType m_NoiseSigma{}; RealType m_NoiseSigmaSquared{}; - bool m_NoiseSigmaIsSet{ false }; + bool m_NoiseSigmaIsSet{ false }; - BaseSamplerPointer m_Sampler{}; + BaseSamplerPointer m_Sampler{}; typename ListAdaptorType::Pointer m_SearchSpaceList{}; }; } // end namespace itk diff --git a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx index 60a3c34b202..a7ce7d8686e 100644 --- a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx +++ b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx @@ -126,7 +126,7 @@ PatchBasedDenoisingImageFilter::CopyInputToOutput() } InputImageRegionConstIteratorType inputIt(this->m_InputImage, this->m_InputImage->GetRequestedRegion()); - OutputImageRegionIteratorType outputIt(this->m_OutputImage, this->m_OutputImage->GetRequestedRegion()); + OutputImageRegionIteratorType outputIt(this->m_OutputImage, this->m_OutputImage->GetRequestedRegion()); for (inputIt.GoToBegin(), outputIt.GoToBegin(); !outputIt.IsAtEnd(); ++inputIt, ++outputIt) { outputIt.Set(inputIt.Get()); @@ -216,10 +216,10 @@ template void PatchBasedDenoisingImageFilter::Initialize() { - typename InputImageType::IndexType requiredIndex{}; + typename InputImageType::IndexType requiredIndex{}; const typename InputImageType::RegionType largestRegion = this->GetInput()->GetLargestPossibleRegion(); - const PatchRadiusType radius = this->GetPatchRadiusInVoxels(); - auto two = MakeFilled(2); + const PatchRadiusType radius = this->GetPatchRadiusInVoxels(); + auto two = MakeFilled(2); requiredIndex += two * radius; if (!(largestRegion.IsInside(requiredIndex))) @@ -457,7 +457,7 @@ PatchBasedDenoisingImageFilter::InitializePatchWeight // Really we just want to handle relative anisotropies, // so base resampling on the deviation from the max spacing // in the input image. - typename WeightsImageType::SpacingType physicalSpacing = this->m_InputImage->GetSpacing(); + typename WeightsImageType::SpacingType physicalSpacing = this->m_InputImage->GetSpacing(); typename WeightsImageType::SpacingValueType maxSpacing = physicalSpacing[0]; for (unsigned int sp = 1; sp < physicalSpacing.Size(); ++sp) { @@ -470,9 +470,9 @@ PatchBasedDenoisingImageFilter::InitializePatchWeight // Allocate the patch weights (mask) as an image. // Done in physical space. - auto physicalSize = WeightsImageType::SizeType::Filled(physicalDiameter); + auto physicalSize = WeightsImageType::SizeType::Filled(physicalDiameter); const typename WeightsImageType::RegionType physicalRegion(physicalSize); - auto physicalWeightsImage = WeightsImageType::New(); + auto physicalWeightsImage = WeightsImageType::New(); physicalWeightsImage->SetRegions(physicalRegion); physicalWeightsImage->SetSpacing(physicalSpacing); physicalWeightsImage->Allocate(); @@ -513,7 +513,7 @@ PatchBasedDenoisingImageFilter::InitializePatchWeight // Weights for pixels between the inner disc and the outer disc // weights between zero and one determined by cubic-spline interpolation const unsigned int interval = (patchRadius + 1) - discRadius; - const float weight = (-2.0 / pow(interval, 3.0)) * pow((patchRadius + 1) - distanceFromCenter, 3.0f) + + const float weight = (-2.0 / pow(interval, 3.0)) * pow((patchRadius + 1) - distanceFromCenter, 3.0f) + (3.0 / pow(interval, 2.0)) * pow((patchRadius + 1) - distanceFromCenter, 2.0f); pwIt.Set(std::clamp(weight, 0.0f, 1.0f)); } @@ -542,7 +542,7 @@ PatchBasedDenoisingImageFilter::InitializePatchWeight resampler->Update(); // Patch weights (mask) in voxel space - const typename WeightsImageType::Pointer voxelWeightsImage = resampler->GetOutput(); + const typename WeightsImageType::Pointer voxelWeightsImage = resampler->GetOutput(); ImageRegionConstIterator vwIt(voxelWeightsImage, voxelWeightsImage->GetLargestPossibleRegion()); // Disc-smooth patch weights in voxel space @@ -665,9 +665,9 @@ typename PatchBasedDenoisingImageFilter::ThreadDataSt // Image, ImageDimension>::RegionType // ®ionToProcess, ::ThreadedRiemannianMinMax(const InputImageRegionType & regionToProcess, - const int itkNotUsed(threadId), - const InputImageType * img, - ThreadDataStruct threadData) + const int itkNotUsed(threadId), + const InputImageType * img, + ThreadDataStruct threadData) { // Compute the min and max norm of the length of the log map // with respect to identity @@ -690,7 +690,7 @@ typename PatchBasedDenoisingImageFilter::ThreadDataSt } RealArrayType identityWeight(m_NumIndependentComponents); identityWeight.Fill(NumericTraits::OneValue()); - RealType tmpDiff; + RealType tmpDiff; RealArrayType tmpNorm(m_NumIndependentComponents); RealArrayType minNorm(m_NumIndependentComponents); RealArrayType maxNorm(m_NumIndependentComponents); @@ -698,8 +698,8 @@ typename PatchBasedDenoisingImageFilter::ThreadDataSt minNorm.Fill(NumericTraits::max()); FaceCalculatorType faceCalculator; - FaceListType faceList = faceCalculator(img, regionToProcess, radius); - bool foundMinMax = false; + FaceListType faceList = faceCalculator(img, regionToProcess, radius); + bool foundMinMax = false; for (auto fIt = faceList.begin(); fIt != faceList.end(); ++fIt) { @@ -710,7 +710,7 @@ typename PatchBasedDenoisingImageFilter::ThreadDataSt } // Only evaluating each pixel once, so nothing to cache - const bool useCachedComputations = false; + const bool useCachedComputations = false; InputImageRegionConstIteratorType imgIt(img, *fIt); imgIt.GoToBegin(); for (imgIt.GoToBegin(); !imgIt.IsAtEnd(); ++imgIt) @@ -787,15 +787,15 @@ PatchBasedDenoisingImageFilter::ResolveRiemannianMinM template void PatchBasedDenoisingImageFilter::ComputeSignedEuclideanDifferenceAndWeightedSquaredNorm( - const PixelType & a, - const PixelType & b, - const RealArrayType & weight, - bool itkNotUsed(useCachedComputations), - SizeValueType itkNotUsed(cacheIndex), - EigenValuesCacheType & itkNotUsed(eigenValsCache), + const PixelType & a, + const PixelType & b, + const RealArrayType & weight, + bool itkNotUsed(useCachedComputations), + SizeValueType itkNotUsed(cacheIndex), + EigenValuesCacheType & itkNotUsed(eigenValsCache), EigenVectorsCacheType & itkNotUsed(eigenVecsCache), - RealType & diff, - RealArrayType & norm) + RealType & diff, + RealArrayType & norm) { for (unsigned int pc = 0; pc < m_NumPixelComponents; ++pc) { @@ -811,8 +811,8 @@ template void PatchBasedDenoisingImageFilter::Compute3x3EigenAnalysis( const DiffusionTensor3D & spdMatrix, - FixedArray & eigenVals, - Matrix & eigenVecs) + FixedArray & eigenVals, + Matrix & eigenVecs) { // This implementation based on @@ -957,17 +957,17 @@ void PatchBasedDenoisingImageFilter::ComputeLogMapAndWeightedSquaredGeodesicDifference( const DiffusionTensor3D & spdMatrixA, const DiffusionTensor3D & spdMatrixB, - const RealArrayType & weight, - bool useCachedComputations, - SizeValueType cacheIndex, - EigenValuesCacheType & eigenValsCache, - EigenVectorsCacheType & eigenVecsCache, - RealType & symMatrixLogMap, - RealArrayType & geodesicDist) + const RealArrayType & weight, + bool useCachedComputations, + SizeValueType cacheIndex, + EigenValuesCacheType & eigenValsCache, + EigenVectorsCacheType & eigenVecsCache, + RealType & symMatrixLogMap, + RealArrayType & geodesicDist) { using RealEigenValuesArrayType = typename RealType::EigenValuesArrayType; using RealEigenVectorsMatrixType = typename RealType::EigenVectorsMatrixType; - EigenValuesArrayType eigenVals; + EigenValuesArrayType eigenVals; EigenVectorsMatrixType eigenVecs; if (useCachedComputations) { @@ -1040,7 +1040,7 @@ PatchBasedDenoisingImageFilter::ComputeLogMapAndWeigh factor2 = spdMatrixB[2] * eigenVecs(2, 0) + spdMatrixB[4] * eigenVecs(2, 1) + spdMatrixB[5] * eigenVecs(2, 2); Y[5] = (eigenVecs(2, 0) * factor0 + eigenVecs(2, 1) * factor1 + eigenVecs(2, 2) * factor2) / eigenVals[2]; - RealEigenValuesArrayType YEigenVals; + RealEigenValuesArrayType YEigenVals; RealEigenVectorsMatrixType YEigenVecs; if (m_UseFastTensorComputations) { @@ -1141,7 +1141,7 @@ PatchBasedDenoisingImageFilter::AddExponentialMapUpda using RealEigenValuesArrayType = typename RealType::EigenValuesArrayType; using RealEigenVectorsMatrixType = typename RealType::EigenVectorsMatrixType; - RealEigenValuesArrayType eigenVals; + RealEigenValuesArrayType eigenVals; RealEigenVectorsMatrixType eigenVecs; if (m_UseFastTensorComputations) { @@ -1210,7 +1210,7 @@ PatchBasedDenoisingImageFilter::AddExponentialMapUpda // Since we are always working with DiffusionTensor3D pixels which are always // 3x3, these calculations can be optimized as follows. - RealEigenValuesArrayType YEigenVals; + RealEigenValuesArrayType YEigenVals; RealEigenVectorsMatrixType YEigenVecs; if (m_UseFastTensorComputations) { @@ -1368,7 +1368,7 @@ template void PatchBasedDenoisingImageFilter::ThreadedApplyUpdate( const InputImageRegionType & regionToProcess, - int itkNotUsed(threadId)) + int itkNotUsed(threadId)) { ImageAlgorithm::Copy(m_UpdateBuffer.GetPointer(), this->m_OutputImage, regionToProcess, regionToProcess); } @@ -1482,8 +1482,8 @@ template auto PatchBasedDenoisingImageFilter::ThreadedComputeSigmaUpdate( const InputImageRegionType & regionToProcess, - const int itkNotUsed(threadId), - ThreadDataStruct threadData) -> ThreadDataStruct + const int itkNotUsed(threadId), + ThreadDataStruct threadData) -> ThreadDataStruct { // Create two images to list adaptors, one for the iteration over the region // the other for querying to find the patches set the region of interest for @@ -1506,7 +1506,7 @@ PatchBasedDenoisingImageFilter::ThreadedComputeSigmaU const PatchRadiusType radius = this->GetPatchRadiusInVoxels(); const OutputImageType * output = this->m_OutputImage; - const InputImageType * inputImage = this->m_InputImage; + const InputImageType * inputImage = this->m_InputImage; auto inList = ListAdaptorType::New(); inList->SetImage(output); @@ -1521,14 +1521,14 @@ PatchBasedDenoisingImageFilter::ThreadedComputeSigmaU // region to avoid using boundary conditions (and it's faster). FaceCalculatorType faceCalculator; - FaceListType faceList = faceCalculator(output, regionToProcess, radius); + FaceListType faceList = faceCalculator(output, regionToProcess, radius); const unsigned int lengthPatch = this->GetPatchLengthInVoxels(); const unsigned int center = (lengthPatch - 1) / 2; - RealArrayType jointEntropyFirstDerivative(m_NumIndependentComponents); - RealArrayType jointEntropySecondDerivative(m_NumIndependentComponents); - RealArrayType nbhdEntropyFirstDerivative(m_NumIndependentComponents); - RealArrayType nbhdEntropySecondDerivative(m_NumIndependentComponents); + RealArrayType jointEntropyFirstDerivative(m_NumIndependentComponents); + RealArrayType jointEntropySecondDerivative(m_NumIndependentComponents); + RealArrayType nbhdEntropyFirstDerivative(m_NumIndependentComponents); + RealArrayType nbhdEntropySecondDerivative(m_NumIndependentComponents); jointEntropyFirstDerivative.Fill(0.0); jointEntropySecondDerivative.Fill(0.0); nbhdEntropyFirstDerivative.Fill(0.0); @@ -1553,8 +1553,8 @@ PatchBasedDenoisingImageFilter::ThreadedComputeSigmaU continue; } const InputImagePatchIterator currentPatch = sampleIt.GetMeasurementVector()[0]; - IndexType nIndex = currentPatch.GetIndex(); - const InstanceIdentifier currentPatchId = inList->GetImage()->ComputeOffset(nIndex); + IndexType nIndex = currentPatch.GetIndex(); + const InstanceIdentifier currentPatchId = inList->GetImage()->ComputeOffset(nIndex); // Select a set of patches from the full image, excluding points that have // neighbors outside the boundary at locations different than that of the @@ -1569,8 +1569,8 @@ PatchBasedDenoisingImageFilter::ThreadedComputeSigmaU // That is, the range formula is min(index,radius):max(index,size-radius-1) typename OutputImageType::RegionType region = inputImage->GetLargestPossibleRegion(); - IndexType rIndex; - typename OutputImageType::SizeType rSize = region.GetSize(); + IndexType rIndex; + typename OutputImageType::SizeType rSize = region.GetSize(); for (unsigned int dim = 0; dim < OutputImageType::ImageDimension; ++dim) { rIndex[dim] = std::min(nIndex[dim], static_cast(radius[dim])); @@ -1611,7 +1611,7 @@ PatchBasedDenoisingImageFilter::ThreadedComputeSigmaU currentPatchVec[jj] = currentPatch.GetPixel(jj); } - IndexType lastSelectedIdx; + IndexType lastSelectedIdx; InputImagePatchIterator selectedPatch; if (numPatches > 0) { @@ -1807,9 +1807,9 @@ PatchBasedDenoisingImageFilter::ResolveSigmaUpdate() // Accumulate the first and second derivatives from all the threads const RealValueType kernelSigma = m_KernelBandwidthSigma[ic]; - RealValueType firstDerivative = 0; - RealValueType secondDerivative = 0; - const size_t numThreads = m_ThreadData.size(); + RealValueType firstDerivative = 0; + RealValueType secondDerivative = 0; + const size_t numThreads = m_ThreadData.size(); for (unsigned int threadNum = 0; threadNum < numThreads; ++threadNum) { if (m_ThreadData[threadNum].validDerivatives[ic] > 0) @@ -1912,8 +1912,8 @@ template auto PatchBasedDenoisingImageFilter::ThreadedComputeImageUpdate( const InputImageRegionType & regionToProcess, - const int threadId, - ThreadDataStruct threadData) -> ThreadDataStruct + const int threadId, + ThreadDataStruct threadData) -> ThreadDataStruct { // Create two images to list adaptors, one for the iteration over the region // the other for querying to find the patches set the region of interest for @@ -1936,7 +1936,7 @@ PatchBasedDenoisingImageFilter::ThreadedComputeImageU const PatchRadiusType radius = this->GetPatchRadiusInVoxels(); - OutputImageType * output = this->m_OutputImage; + OutputImageType * output = this->m_OutputImage; const InputImageType * inputImage = this->m_InputImage; auto inList = ListAdaptorType::New(); @@ -1972,8 +1972,8 @@ PatchBasedDenoisingImageFilter::ThreadedComputeImageU GaussianOperatorType gOper; InputImageRegionConstIteratorType inputIt(inputImage, *fIt); - OutputImageRegionIteratorType updateIt(m_UpdateBuffer, *fIt); - OutputImageRegionIteratorType outputIt(output, *fIt); + OutputImageRegionIteratorType updateIt(m_UpdateBuffer, *fIt); + OutputImageRegionIteratorType outputIt(output, *fIt); updateIt.GoToBegin(); outputIt.GoToBegin(); @@ -2014,7 +2014,7 @@ PatchBasedDenoisingImageFilter::ThreadedComputeImageU { const RealValueType gradientFidelity = 2.0 * (this->GetComponent(in, pc) - this->GetComponent(out, pc)); constexpr RealValueType stepSizeFidelity = 0.5; - const RealValueType noiseVal = fidelityWeight * (stepSizeFidelity * gradientFidelity); + const RealValueType noiseVal = fidelityWeight * (stepSizeFidelity * gradientFidelity); this->SetComponent(result, pc, this->GetComponent(result, pc) + noiseVal); } break; @@ -2025,7 +2025,7 @@ PatchBasedDenoisingImageFilter::ThreadedComputeImageU { const PixelValueType inVal = this->GetComponent(in, pc); const PixelValueType outVal = this->GetComponent(out, pc); - const RealValueType sigmaSquared = this->GetComponent(m_NoiseSigmaSquared, pc); + const RealValueType sigmaSquared = this->GetComponent(m_NoiseSigmaSquared, pc); const RealValueType alpha = inVal * outVal / sigmaSquared; const RealValueType gradientFidelity = @@ -2090,25 +2090,25 @@ PatchBasedDenoisingImageFilter::ThreadedComputeImageU template auto PatchBasedDenoisingImageFilter::ComputeGradientJointEntropy( - InstanceIdentifier id, + InstanceIdentifier id, typename ListAdaptorType::Pointer & inList, - BaseSamplerPointer & sampler, - ThreadDataStruct & threadData) -> RealType + BaseSamplerPointer & sampler, + ThreadDataStruct & threadData) -> RealType { using IndexType = typename OutputImageType::IndexType; - const InputImagePatchIterator currentPatch = inList->GetMeasurementVector(id)[0]; + const InputImagePatchIterator currentPatch = inList->GetMeasurementVector(id)[0]; const typename OutputImageType::IndexType nIndex = currentPatch.GetIndex(); - const InstanceIdentifier currentPatchId = inList->GetImage()->ComputeOffset(nIndex); + const InstanceIdentifier currentPatchId = inList->GetImage()->ComputeOffset(nIndex); const unsigned int lengthPatch = this->GetPatchLengthInVoxels(); const unsigned int center = (lengthPatch - 1) / 2; const typename OutputImageType::Pointer output = this->m_OutputImage; - typename OutputImageType::RegionType region = this->m_InputImage->GetLargestPossibleRegion(); - IndexType rIndex; - typename OutputImageType::SizeType rSize = region.GetSize(); - const PatchRadiusType radius = this->GetPatchRadiusInVoxels(); + typename OutputImageType::RegionType region = this->m_InputImage->GetLargestPossibleRegion(); + IndexType rIndex; + typename OutputImageType::SizeType rSize = region.GetSize(); + const PatchRadiusType radius = this->GetPatchRadiusInVoxels(); for (unsigned int dim = 0; dim < OutputImageType::ImageDimension; ++dim) { rIndex[dim] = std::min(nIndex[dim], static_cast(radius[dim])); @@ -2125,11 +2125,11 @@ PatchBasedDenoisingImageFilter::ComputeGradientJointE const unsigned int numPatches = selectedPatches->GetTotalFrequency(); - RealType centerPatchDifference = m_ZeroPixel; - VariableLengthVector currentPatchVec(lengthPatch); + RealType centerPatchDifference = m_ZeroPixel; + VariableLengthVector currentPatchVec(lengthPatch); VariableLengthVector isInBoundsVec(lengthPatch); - VariableLengthVector patchWeightVec(lengthPatch); - const PatchWeightsType patchWeights = this->GetPatchWeights(); + VariableLengthVector patchWeightVec(lengthPatch); + const PatchWeightsType patchWeights = this->GetPatchWeights(); // Store the current patch prior to iterating over the selected patches // to avoid repeatedly calling GetPixel for this patch. @@ -2158,8 +2158,8 @@ PatchBasedDenoisingImageFilter::ComputeGradientJointE } } - IndexType lastSelectedIdx; - IndexType currSelectedIdx; + IndexType lastSelectedIdx; + IndexType currSelectedIdx; InputImagePatchIterator selectedPatch; if (numPatches > 0) { diff --git a/Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterTest.cxx b/Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterTest.cxx index d10e90258a7..5c51e47f9dc 100644 --- a/Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterTest.cxx +++ b/Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterTest.cxx @@ -40,8 +40,8 @@ ParseKernelBandwithSigma(char * kernelBandwithSigmaIn, unsigned int numIndepende kernelBandwithSigmaOut.SetSize(numIndependentComponents); // Get the individual components - char * endPtr; - unsigned int i = 0; + char * endPtr; + unsigned int i = 0; typename TFilter::RealArrayType::ValueType value; while (*kernelBandwithSigmaIn && i < numIndependentComponents) { @@ -70,16 +70,16 @@ template int doDenoising(const std::string & inputFileName, const std::string & outputFileName, - const unsigned int numIterations, - const int numThreads, - char * kernelBandwithSigma, - bool alwaysTreatComponentsAsEuclidean, - bool manualReinitialization, - const int numToSample, - bool computeConditionalDerivatives, - const double kernelBandwidthMultiplicationFactor, + const unsigned int numIterations, + const int numThreads, + char * kernelBandwithSigma, + bool alwaysTreatComponentsAsEuclidean, + bool manualReinitialization, + const int numToSample, + bool computeConditionalDerivatives, + const double kernelBandwidthMultiplicationFactor, const std::string & noiseModelStr, - const double noiseModelFidelityWeight) + const double noiseModelFidelityWeight) { using ReaderType = itk::ImageFileReader; @@ -207,7 +207,7 @@ doDenoising(const std::string & inputFileName, filter->GetNoiseModel() == FilterType::NoiseModelEnum::POISSON) { const typename ImageT::IndexType::IndexValueType indexValue = 0; - auto pixelIndex = ImageT::IndexType::Filled(indexValue); + auto pixelIndex = ImageT::IndexType::Filled(indexValue); const typename ImageT::PixelType originalPixelValue = inputImage->GetPixel(pixelIndex); @@ -264,7 +264,7 @@ doDenoising(const std::string & inputFileName, { const typename FilterType::RealArrayType::ValueType expectedValue = *expectedKernelBandwidthSigmaIt; const typename FilterType::RealArrayType::ValueType resultValue = *resultKernelBandwidthSigmaIt; - const double tolerance = 1e-2 * expectedValue; + const double tolerance = 1e-2 * expectedValue; if (!itk::Math::FloatAlmostEqual(expectedValue, resultValue, 10, tolerance)) { std::cout.precision(static_cast(itk::Math::abs(std::log10(tolerance)))); @@ -366,7 +366,7 @@ itkPatchBasedDenoisingImageFilterTest(int argc, char * argv[]) } const std::vector modelChoices{ "GAUSSIAN", "RICIAN", "POISSON", "NOMODEL" }; - std::string noiseModel = modelChoices[0]; + std::string noiseModel = modelChoices[0]; double noiseModelFidelityWeight = 0.0; if (argc > 13) diff --git a/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx b/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx index faf4ffe63b3..698c30d2c31 100644 --- a/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx +++ b/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx @@ -100,16 +100,16 @@ DiffusionTensor3DReconstructionImageFilterGetImage(); const typename MaskImageType::SizeType maskSize = maskImage->GetLargestPossibleRegion().GetSize(); - typename MaskImageType::SizeType refSize; + typename MaskImageType::SizeType refSize; const typename MaskImageType::PointType maskOrigin = maskImage->GetOrigin(); - typename MaskImageType::PointType refOrigin; + typename MaskImageType::PointType refOrigin; const typename MaskImageType::SpacingType maskSpacing = maskImage->GetSpacing(); - typename MaskImageType::SpacingType refSpacing; + typename MaskImageType::SpacingType refSpacing; const typename MaskImageType::DirectionType maskDirection = maskImage->GetDirection(); - typename MaskImageType::DirectionType refDirection; + typename MaskImageType::DirectionType refDirection; if (m_GradientImageTypeEnumeration == DiffusionTensor3DReconstructionImageFilterEnums::GradientImageFormat::GradientIsInManyImages) @@ -240,7 +240,7 @@ DiffusionTensor3DReconstructionImageFilter::IndexType index = it.GetIndex(); - typename ReferenceImageType::PointType point; + typename ReferenceImageType::PointType point; refImage->TransformIndexToPhysicalPoint(index, point); unmaskedPixel = maskSpatialObject->IsInsideInWorldSpace(point); } @@ -357,7 +357,7 @@ DiffusionTensor3DReconstructionImageFilter::IndexType index = git.GetIndex(); - typename ReferenceImageType::PointType point; + typename ReferenceImageType::PointType point; gradientImagePointer->TransformIndexToPhysicalPoint(index, point); unmaskedPixel = maskSpatialObject->IsInsideInWorldSpace(point); diff --git a/Modules/Filtering/DiffusionTensorImage/test/itkDiffusionTensor3DReconstructionImageFilterTest.cxx b/Modules/Filtering/DiffusionTensorImage/test/itkDiffusionTensor3DReconstructionImageFilterTest.cxx index a3c5635153a..7c40d1b79af 100644 --- a/Modules/Filtering/DiffusionTensorImage/test/itkDiffusionTensor3DReconstructionImageFilterTest.cxx +++ b/Modules/Filtering/DiffusionTensorImage/test/itkDiffusionTensor3DReconstructionImageFilterTest.cxx @@ -65,9 +65,9 @@ itkDiffusionTensor3DReconstructionImageFilterTest(int argc, char * argv[]) using ReferenceRegionType = ReferenceImageType::RegionType; using ReferenceIndexType = ReferenceRegionType::IndexType; using ReferenceSizeType = ReferenceRegionType::SizeType; - constexpr ReferenceSizeType sizeReferenceImage = { { 4, 4, 4 } }; + constexpr ReferenceSizeType sizeReferenceImage = { { 4, 4, 4 } }; constexpr ReferenceIndexType indexReferenceImage = { { 0, 0, 0 } }; - const ReferenceRegionType regionReferenceImage{ indexReferenceImage, sizeReferenceImage }; + const ReferenceRegionType regionReferenceImage{ indexReferenceImage, sizeReferenceImage }; referenceImage->SetRegions(regionReferenceImage); referenceImage->Allocate(); referenceImage->FillBuffer(100); @@ -92,10 +92,10 @@ itkDiffusionTensor3DReconstructionImageFilterTest(int argc, char * argv[]) for (unsigned int i = 0; i < numberOfGradientImages; ++i) { - auto gradientImage = GradientImageType::New(); - constexpr GradientSizeType sizeGradientImage = { { 4, 4, 4 } }; + auto gradientImage = GradientImageType::New(); + constexpr GradientSizeType sizeGradientImage = { { 4, 4, 4 } }; constexpr GradientIndexType indexGradientImage = { { 0, 0, 0 } }; - const GradientRegionType regionGradientImage{ indexGradientImage, sizeGradientImage }; + const GradientRegionType regionGradientImage{ indexGradientImage, sizeGradientImage }; gradientImage->SetRegions(regionGradientImage); gradientImage->Allocate(); @@ -116,7 +116,7 @@ itkDiffusionTensor3DReconstructionImageFilterTest(int argc, char * argv[]) std::cout << "Gradient directions: " << gradientDirection << std::endl; constexpr TensorReconstructionImageFilterType::GradientDirectionType::element_type epsilon = 1e-3; - TensorReconstructionImageFilterType::GradientDirectionType output = + TensorReconstructionImageFilterType::GradientDirectionType output = tensorReconstructionFilter->GetGradientDirection(i); for (unsigned int j = 0; j < gradientDirection.size(); ++j) { @@ -180,8 +180,8 @@ itkDiffusionTensor3DReconstructionImageFilterTest(int argc, char * argv[]) using TensorImageIndexType = TensorImageType::IndexType; constexpr TensorImageIndexType tensorImageIndex = { { 3, 3, 3 } }; - constexpr GradientIndexType gradientImageIndex = { { 3, 3, 3 } }; - constexpr ReferenceIndexType referenceImageIndex = { { 3, 3, 3 } }; + constexpr GradientIndexType gradientImageIndex = { { 3, 3, 3 } }; + constexpr ReferenceIndexType referenceImageIndex = { { 3, 3, 3 } }; std::cout << std::endl << "Pixels at index: " << tensorImageIndex << std::endl; std::cout << "Reference pixel " << referenceImage->GetPixel(referenceImageIndex) << std::endl; @@ -197,7 +197,7 @@ itkDiffusionTensor3DReconstructionImageFilterTest(int argc, char * argv[]) { -8.4079, 0.900034, 2.62504 } }; std::cout << std::endl << "Reconstructed tensor : " << std::endl; - bool passed = true; + bool passed = true; constexpr double precision = 0.0001; for (unsigned int i = 0; i < 3; ++i) { diff --git a/Modules/Filtering/DiffusionTensorImage/test/itkDiffusionTensor3DTest.cxx b/Modules/Filtering/DiffusionTensorImage/test/itkDiffusionTensor3DTest.cxx index cb4095beb2d..75cb48b051b 100644 --- a/Modules/Filtering/DiffusionTensorImage/test/itkDiffusionTensor3DTest.cxx +++ b/Modules/Filtering/DiffusionTensorImage/test/itkDiffusionTensor3DTest.cxx @@ -152,8 +152,8 @@ itkDiffusionTensor3DTest(int, char *[]) auto dti = ImageType::New(); - ImageType::SizeType size; - ImageType::IndexType start; + ImageType::SizeType size; + ImageType::IndexType start; ImageType::RegionType region; size[0] = 128; @@ -229,7 +229,7 @@ itkDiffusionTensor3DTest(int, char *[]) std::cout << "DiffusionTensor3D = " << std::endl; std::cout << tensor2 << std::endl; - Double3DTensorType::EigenValuesArrayType eigenValues; + Double3DTensorType::EigenValuesArrayType eigenValues; Double3DTensorType::EigenVectorsMatrixType eigenVectors; tensor2.ComputeEigenAnalysis(eigenValues, eigenVectors); diff --git a/Modules/Filtering/DisplacementField/include/itkBSplineExponentialDiffeomorphicTransform.hxx b/Modules/Filtering/DisplacementField/include/itkBSplineExponentialDiffeomorphicTransform.hxx index 1e8f915bdd5..71411d3c62e 100644 --- a/Modules/Filtering/DisplacementField/include/itkBSplineExponentialDiffeomorphicTransform.hxx +++ b/Modules/Filtering/DisplacementField/include/itkBSplineExponentialDiffeomorphicTransform.hxx @@ -65,7 +65,7 @@ template void BSplineExponentialDiffeomorphicTransform::UpdateTransformParameters( const DerivativeType & update, - ScalarType factor) + ScalarType factor) { // // Smooth the update field @@ -88,7 +88,7 @@ BSplineExponentialDiffeomorphicTransform::Upda } const typename ConstantVelocityFieldType::RegionType & bufferedRegion = velocityField->GetBufferedRegion(); - const SizeValueType numberOfPixels = bufferedRegion.GetNumberOfPixels(); + const SizeValueType numberOfPixels = bufferedRegion.GetNumberOfPixels(); auto * updateFieldPointer = reinterpret_cast(const_cast(update).data_block()); @@ -167,7 +167,7 @@ template auto BSplineExponentialDiffeomorphicTransform::BSplineSmoothConstantVelocityField( const ConstantVelocityFieldType * field, - const ArrayType & numberOfControlPoints) -> ConstantVelocityFieldPointer + const ArrayType & numberOfControlPoints) -> ConstantVelocityFieldPointer { auto bspliner = BSplineFilterType::New(); bspliner->SetUseInputFieldToDefineTheBSplineDomain(true); @@ -187,7 +187,7 @@ BSplineExponentialDiffeomorphicTransform::BSpl template void BSplineExponentialDiffeomorphicTransform::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/DisplacementField/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h b/Modules/Filtering/DisplacementField/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h index 9fce5a837fd..dc3e25f60e7 100644 --- a/Modules/Filtering/DisplacementField/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h +++ b/Modules/Filtering/DisplacementField/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h @@ -197,9 +197,9 @@ class ITK_TEMPLATE_EXPORT BSplineSmoothingOnUpdateDisplacementFieldTransform private: SplineOrderType m_SplineOrder{ 3 }; - bool m_EnforceStationaryBoundary{ true }; - ArrayType m_NumberOfControlPointsForTheUpdateField{}; - ArrayType m_NumberOfControlPointsForTheTotalField{}; + bool m_EnforceStationaryBoundary{ true }; + ArrayType m_NumberOfControlPointsForTheUpdateField{}; + ArrayType m_NumberOfControlPointsForTheTotalField{}; }; } // end namespace itk diff --git a/Modules/Filtering/DisplacementField/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.hxx b/Modules/Filtering/DisplacementField/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.hxx index 81f1d63b569..5cfef9141c7 100644 --- a/Modules/Filtering/DisplacementField/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.hxx +++ b/Modules/Filtering/DisplacementField/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.hxx @@ -66,12 +66,12 @@ template void BSplineSmoothingOnUpdateDisplacementFieldTransform::UpdateTransformParameters( const DerivativeType & update, - ScalarType factor) + ScalarType factor) { const DisplacementFieldPointer displacementField = this->GetModifiableDisplacementField(); const typename DisplacementFieldType::RegionType & bufferedRegion = displacementField->GetBufferedRegion(); - const SizeValueType numberOfPixels = bufferedRegion.GetNumberOfPixels(); + const SizeValueType numberOfPixels = bufferedRegion.GetNumberOfPixels(); using ImporterType = ImportImageFilter; const bool importFilterWillReleaseMemory = false; @@ -164,7 +164,7 @@ template auto BSplineSmoothingOnUpdateDisplacementFieldTransform::BSplineSmoothDisplacementField( const DisplacementFieldType * field, - const ArrayType & numberOfControlPoints) -> DisplacementFieldPointer + const ArrayType & numberOfControlPoints) -> DisplacementFieldPointer { auto bspliner = BSplineFilterType::New(); bspliner->SetUseInputFieldToDefineTheBSplineDomain(true); diff --git a/Modules/Filtering/DisplacementField/include/itkComposeDisplacementFieldsImageFilter.hxx b/Modules/Filtering/DisplacementField/include/itkComposeDisplacementFieldsImageFilter.hxx index 58824232fa7..7ac8172f8e1 100644 --- a/Modules/Filtering/DisplacementField/include/itkComposeDisplacementFieldsImageFilter.hxx +++ b/Modules/Filtering/DisplacementField/include/itkComposeDisplacementFieldsImageFilter.hxx @@ -74,11 +74,11 @@ template void ComposeDisplacementFieldsImageFilter::DynamicThreadedGenerateData(const RegionType & region) { - const typename OutputFieldType::Pointer output = this->GetOutput(); + const typename OutputFieldType::Pointer output = this->GetOutput(); const typename InputFieldType::ConstPointer warpingField = this->GetWarpingField(); ImageRegionConstIteratorWithIndex ItW(warpingField, region); - ImageRegionIterator ItF(output, region); + ImageRegionIterator ItF(output, region); PointType pointIn1; PointType pointIn2; diff --git a/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx b/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx index d8420365117..5421c7c0e73 100644 --- a/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx +++ b/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx @@ -57,7 +57,7 @@ template void ConstantVelocityFieldTransform::UpdateTransformParameters( const DerivativeType & update, - ScalarType factor) + ScalarType factor) { // This simply adds the values. // TODO: This should be multi-threaded probably, via image add filter. @@ -307,7 +307,7 @@ ConstantVelocityFieldTransform::CopyDisplaceme rval->Allocate(); ImageRegionConstIterator dispIt(toCopy, toCopy->GetLargestPossibleRegion()); - ImageRegionIterator cloneDispIt(rval, rval->GetLargestPossibleRegion()); + ImageRegionIterator cloneDispIt(rval, rval->GetLargestPossibleRegion()); for (dispIt.GoToBegin(), cloneDispIt.GoToBegin(); !dispIt.IsAtEnd() && !cloneDispIt.IsAtEnd(); ++dispIt, ++cloneDispIt) { @@ -321,7 +321,7 @@ typename LightObject::Pointer ConstantVelocityFieldTransform::InternalClone() const { // create a new instance - LightObject::Pointer loPtr = Superclass::InternalClone(); + LightObject::Pointer loPtr = Superclass::InternalClone(); const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { @@ -334,22 +334,22 @@ ConstantVelocityFieldTransform::InternalClone( rval->SetParameters(this->GetParameters()); // need the displacement field but GetDisplacementField is non-const. - auto * nonConstThis = const_cast(this); + auto * nonConstThis = const_cast(this); const typename DisplacementFieldType::ConstPointer dispField = nonConstThis->GetDisplacementField(); - const typename DisplacementFieldType::Pointer cloneDispField = this->CopyDisplacementField(dispField); + const typename DisplacementFieldType::Pointer cloneDispField = this->CopyDisplacementField(dispField); rval->GetModifiableInterpolator()->SetInputImage(cloneDispField); rval->SetDisplacementField(cloneDispField); // now do the inverse -- it actually gets created as a side effect? const typename DisplacementFieldType::ConstPointer invDispField = nonConstThis->GetInverseDisplacementField(); - const typename DisplacementFieldType::Pointer cloneInvDispField = this->CopyDisplacementField(invDispField); + const typename DisplacementFieldType::Pointer cloneInvDispField = this->CopyDisplacementField(invDispField); rval->SetInverseDisplacementField(cloneInvDispField); // copy the VelocityField // SetFixedParameters allocates the VelocityField ImageRegionConstIterator thisIt(this->m_ConstantVelocityField, this->m_ConstantVelocityField->GetLargestPossibleRegion()); - ImageRegionIterator cloneIt(rval->m_ConstantVelocityField, + ImageRegionIterator cloneIt(rval->m_ConstantVelocityField, rval->m_ConstantVelocityField->GetLargestPossibleRegion()); for (thisIt.GoToBegin(), cloneIt.GoToBegin(); !thisIt.IsAtEnd() && !cloneIt.IsAtEnd(); ++thisIt, ++cloneIt) { diff --git a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.hxx b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.hxx index e0ce4d724e9..c90cd401bb1 100644 --- a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.hxx +++ b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.hxx @@ -96,7 +96,7 @@ DisplacementFieldJacobianDeterminantFilter Superclass::GenerateInputRequestedRegion(); // get pointers to the input and output - const InputImagePointer inputPtr = const_cast(this->GetInput()); + const InputImagePointer inputPtr = const_cast(this->GetInput()); const OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) @@ -172,11 +172,11 @@ DisplacementFieldJacobianDeterminantFilter const OutputImageRegionType & outputRegionForThread) { ZeroFluxNeumannBoundaryCondition nbc; - ConstNeighborhoodIteratorType bit; - ImageRegionIterator it; + ConstNeighborhoodIteratorType bit; + ImageRegionIterator it; // Find the data-set boundary "faces" - NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; + NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; const typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = bC(dynamic_cast(m_RealValuedInputImage.GetPointer()), outputRegionForThread, @@ -227,7 +227,7 @@ DisplacementFieldJacobianDeterminantFilter template void DisplacementFieldJacobianDeterminantFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { using namespace print_helper; diff --git a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.h b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.h index 4391babe19d..bd68f082a8a 100644 --- a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.h +++ b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.h @@ -290,18 +290,18 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldToBSplineImageFilter : public ImageTo GenerateData() override; private: - bool m_EstimateInverse{ false }; - bool m_EnforceStationaryBoundary{ true }; + bool m_EstimateInverse{ false }; + bool m_EnforceStationaryBoundary{ true }; unsigned int m_SplineOrder{ 3 }; - ArrayType m_NumberOfControlPoints{}; - ArrayType m_NumberOfFittingLevels{}; + ArrayType m_NumberOfControlPoints{}; + ArrayType m_NumberOfFittingLevels{}; typename WeightsContainerType::Pointer m_PointWeights{}; - bool m_UsePointWeights{ false }; + bool m_UsePointWeights{ false }; - OriginType m_BSplineDomainOrigin{}; - SpacingType m_BSplineDomainSpacing{}; - SizeType m_BSplineDomainSize{}; + OriginType m_BSplineDomainOrigin{}; + SpacingType m_BSplineDomainSpacing{}; + SizeType m_BSplineDomainSize{}; DirectionType m_BSplineDomainDirection{}; bool m_BSplineDomainIsDefined{ true }; diff --git a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.hxx b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.hxx index 8a1a32bd82b..43a2c7b74a6 100644 --- a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.hxx +++ b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.hxx @@ -50,9 +50,9 @@ DisplacementFieldToBSplineImageFilter template void DisplacementFieldToBSplineImageFilter::SetBSplineDomain( - OriginType origin, - SpacingType spacing, - SizeType size, + OriginType origin, + SpacingType spacing, + SizeType size, DirectionType direction) { if (this->m_BSplineDomainOrigin != origin || this->m_BSplineDomainSpacing != spacing || @@ -183,7 +183,7 @@ DisplacementFieldToBSplineImageFilter } if (isOnStationaryBoundary) { - const VectorType data{}; + const VectorType data{}; typename InputPointSetType::PointType point; bsplineParametricDomainField->TransformIndexToPhysicalPoint(index, point); @@ -233,7 +233,7 @@ DisplacementFieldToBSplineImageFilter weight = static_cast(confidenceImage->GetPixel(index)); } - PointType parametricPoint; + PointType parametricPoint; typename InputPointSetType::PointType physicalPoint; inputField->TransformIndexToPhysicalPoint(index, physicalPoint); @@ -288,7 +288,7 @@ DisplacementFieldToBSplineImageFilter { itkDebugMacro("Gathering information from the input point set. "); - typename PointsContainerType::ConstIterator ItP = inputPointSet->GetPoints()->Begin(); + typename PointsContainerType::ConstIterator ItP = inputPointSet->GetPoints()->Begin(); typename PointDataContainerType::ConstIterator ItD = inputPointSet->GetPointData()->Begin(); while (ItP != inputPointSet->GetPoints()->End()) @@ -296,7 +296,7 @@ DisplacementFieldToBSplineImageFilter PointType parametricPoint; - PointType physicalPoint = ItP.Value(); + PointType physicalPoint = ItP.Value(); VectorType data = ItD.Value(); typename WeightsContainerType::Element weight = 1.0; @@ -384,7 +384,7 @@ DisplacementFieldToBSplineImageFilter template void DisplacementFieldToBSplineImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.h b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.h index 50167ded8e3..4d829e07758 100644 --- a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.h +++ b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.h @@ -184,7 +184,7 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldTransform : public Transform::ComputeJacobianWit template void DisplacementFieldTransform::ComputeJacobianWithRespectToPosition( - const IndexType & index, + const IndexType & index, JacobianPositionType & jacobian) const { this->ComputeJacobianWithRespectToPositionInternal(index, jacobian, false); @@ -164,7 +164,7 @@ DisplacementFieldTransform::ComputeJacobianWit template void DisplacementFieldTransform::ComputeInverseJacobianWithRespectToPosition( - const InputPointType & point, + const InputPointType & point, InverseJacobianPositionType & jacobian) const { const auto idx = m_DisplacementField->TransformPhysicalPointToIndex(point); @@ -176,7 +176,7 @@ void DisplacementFieldTransform::GetInverseJacobianOfForwardFieldWithRespectToPosition( const InputPointType & point, JacobianPositionType & jacobian, - bool useSVD) const + bool useSVD) const { const auto idx = m_DisplacementField->TransformPhysicalPointToIndex(point); this->GetInverseJacobianOfForwardFieldWithRespectToPosition(idx, jacobian, useSVD); @@ -185,9 +185,9 @@ DisplacementFieldTransform::GetInverseJacobian template void DisplacementFieldTransform::GetInverseJacobianOfForwardFieldWithRespectToPosition( - const IndexType & index, + const IndexType & index, JacobianPositionType & jacobian, - bool useSVD) const + bool useSVD) const { if (useSVD) { @@ -210,9 +210,9 @@ DisplacementFieldTransform::GetInverseJacobian template void DisplacementFieldTransform::ComputeJacobianWithRespectToPositionInternal( - const IndexType & index, + const IndexType & index, JacobianPositionType & jacobian, - bool doInverseJacobian) const + bool doInverseJacobian) const { typename DisplacementFieldType::IndexType startingIndex = @@ -278,7 +278,7 @@ DisplacementFieldTransform::ComputeJacobianWit for (unsigned int row = 0; row < VDimension; ++row) { const FixedArray localComponentGrad(jacobian[row]); - FixedArray physicalComponentGrad = + FixedArray physicalComponentGrad = m_DisplacementField->TransformLocalVectorToPhysicalVector(localComponentGrad); jacobian.set_row(row, physicalComponentGrad.data()); jacobian(row, row) += 1.; @@ -294,7 +294,7 @@ DisplacementFieldTransform::ComputeJacobianWit template void DisplacementFieldTransform::UpdateTransformParameters(const DerivativeType & update, - ScalarType factor) + ScalarType factor) { // This simply adds the values. // TODO: This should be multi-threaded probably, via image add filter. @@ -371,22 +371,22 @@ DisplacementFieldTransform::VerifyFixedParamet // same fixed parameters as the displacement field. const SizeType inverseFieldSize = this->m_InverseDisplacementField->GetLargestPossibleRegion().GetSize(); - PointType inverseFieldOrigin = this->m_InverseDisplacementField->GetOrigin(); - SpacingType inverseFieldSpacing = this->m_InverseDisplacementField->GetSpacing(); - DirectionType inverseFieldDirection = this->m_InverseDisplacementField->GetDirection(); + PointType inverseFieldOrigin = this->m_InverseDisplacementField->GetOrigin(); + SpacingType inverseFieldSpacing = this->m_InverseDisplacementField->GetSpacing(); + DirectionType inverseFieldDirection = this->m_InverseDisplacementField->GetDirection(); const SizeType fieldSize = this->m_DisplacementField->GetLargestPossibleRegion().GetSize(); - PointType fieldOrigin = this->m_DisplacementField->GetOrigin(); - SpacingType fieldSpacing = this->m_DisplacementField->GetSpacing(); - DirectionType fieldDirection = this->m_DisplacementField->GetDirection(); + PointType fieldOrigin = this->m_DisplacementField->GetOrigin(); + SpacingType fieldSpacing = this->m_DisplacementField->GetSpacing(); + DirectionType fieldDirection = this->m_DisplacementField->GetDirection(); // Tolerance for origin and spacing depends on the size of pixel // tolerance for directions a fraction of the unit cube. const double coordinateTolerance = m_CoordinateTolerance * fieldSpacing[0]; const double directionTolerance = m_DirectionTolerance; - std::ostringstream sizeString; - std::ostringstream originString; + std::ostringstream sizeString; + std::ostringstream originString; const std::ostringstream spacingString; const std::ostringstream directionString; diff --git a/Modules/Filtering/DisplacementField/include/itkExponentialDisplacementFieldImageFilter.h b/Modules/Filtering/DisplacementField/include/itkExponentialDisplacementFieldImageFilter.h index d3b1e5b859a..76e515da19b 100644 --- a/Modules/Filtering/DisplacementField/include/itkExponentialDisplacementFieldImageFilter.h +++ b/Modules/Filtering/DisplacementField/include/itkExponentialDisplacementFieldImageFilter.h @@ -157,15 +157,15 @@ class ITK_TEMPLATE_EXPORT ExponentialDisplacementFieldImageFilter : public Image using AdderPointer = typename AdderType::Pointer; private: - bool m_AutomaticNumberOfIterations{}; + bool m_AutomaticNumberOfIterations{}; unsigned int m_MaximumNumberOfIterations{}; bool m_ComputeInverse{}; DivideByConstantPointer m_Divider{}; - CasterPointer m_Caster{}; - VectorWarperPointer m_Warper{}; - AdderPointer m_Adder{}; + CasterPointer m_Caster{}; + VectorWarperPointer m_Warper{}; + AdderPointer m_Adder{}; }; } // end namespace itk diff --git a/Modules/Filtering/DisplacementField/include/itkGaussianExponentialDiffeomorphicTransform.hxx b/Modules/Filtering/DisplacementField/include/itkGaussianExponentialDiffeomorphicTransform.hxx index 2253aef2b2b..d0b4c9c7239 100644 --- a/Modules/Filtering/DisplacementField/include/itkGaussianExponentialDiffeomorphicTransform.hxx +++ b/Modules/Filtering/DisplacementField/include/itkGaussianExponentialDiffeomorphicTransform.hxx @@ -37,7 +37,7 @@ template void GaussianExponentialDiffeomorphicTransform::UpdateTransformParameters( const DerivativeType & update, - ScalarType factor) + ScalarType factor) { // // Smooth the update field @@ -56,7 +56,7 @@ GaussianExponentialDiffeomorphicTransform::Upd } const typename ConstantVelocityFieldType::RegionType & bufferedRegion = velocityField->GetBufferedRegion(); - const SizeValueType numberOfPixels = bufferedRegion.GetNumberOfPixels(); + const SizeValueType numberOfPixels = bufferedRegion.GetNumberOfPixels(); auto * updateFieldPointer = reinterpret_cast(const_cast(update).data_block()); @@ -136,7 +136,7 @@ template auto GaussianExponentialDiffeomorphicTransform::GaussianSmoothConstantVelocityField( ConstantVelocityFieldType * field, - ScalarType variance) -> ConstantVelocityFieldPointer + ScalarType variance) -> ConstantVelocityFieldPointer { if (variance <= 0.0) { @@ -191,16 +191,16 @@ GaussianExponentialDiffeomorphicTransform::Gau const ScalarType weight2 = 1.0 - weight1; const typename ConstantVelocityFieldType::RegionType region = field->GetLargestPossibleRegion(); - const typename ConstantVelocityFieldType::SizeType size = region.GetSize(); - const typename ConstantVelocityFieldType::IndexType startIndex = region.GetIndex(); + const typename ConstantVelocityFieldType::SizeType size = region.GetSize(); + const typename ConstantVelocityFieldType::IndexType startIndex = region.GetIndex(); - ImageRegionIteratorWithIndex fieldIt(field, field->GetLargestPossibleRegion()); + ImageRegionIteratorWithIndex fieldIt(field, field->GetLargestPossibleRegion()); ImageRegionConstIteratorWithIndex smoothedFieldIt(smoothField, smoothField->GetLargestPossibleRegion()); for (fieldIt.GoToBegin(), smoothedFieldIt.GoToBegin(); !fieldIt.IsAtEnd(); ++fieldIt, ++smoothedFieldIt) { typename ConstantVelocityFieldType::IndexType index = fieldIt.GetIndex(); - bool isOnBoundary = false; + bool isOnBoundary = false; for (unsigned int dimension = 0; dimension < Dimension; ++dimension) { if (index[dimension] == startIndex[dimension] || @@ -226,7 +226,7 @@ GaussianExponentialDiffeomorphicTransform::Gau template void GaussianExponentialDiffeomorphicTransform::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransform.hxx b/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransform.hxx index 16e62513ce5..84b7512cdf0 100644 --- a/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransform.hxx +++ b/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransform.hxx @@ -43,12 +43,12 @@ template void GaussianSmoothingOnUpdateDisplacementFieldTransform::UpdateTransformParameters( const DerivativeType & update, - ScalarType factor) + ScalarType factor) { const DisplacementFieldPointer displacementField = this->GetModifiableDisplacementField(); const typename DisplacementFieldType::RegionType & bufferedRegion = displacementField->GetBufferedRegion(); - const SizeValueType numberOfPixels = bufferedRegion.GetNumberOfPixels(); + const SizeValueType numberOfPixels = bufferedRegion.GetNumberOfPixels(); using ImporterType = ImportImageFilter; const bool importFilterWillReleaseMemory = false; @@ -129,7 +129,7 @@ template auto GaussianSmoothingOnUpdateDisplacementFieldTransform::GaussianSmoothDisplacementField( DisplacementFieldType * field, - ScalarType variance) -> DisplacementFieldPointer + ScalarType variance) -> DisplacementFieldPointer { if (variance <= 0.0) { @@ -184,16 +184,16 @@ GaussianSmoothingOnUpdateDisplacementFieldTransformGetLargestPossibleRegion(); - const typename DisplacementFieldType::SizeType size = region.GetSize(); - const typename DisplacementFieldType::IndexType startIndex = region.GetIndex(); + const typename DisplacementFieldType::SizeType size = region.GetSize(); + const typename DisplacementFieldType::IndexType startIndex = region.GetIndex(); - ImageRegionIteratorWithIndex fieldIt(field, field->GetLargestPossibleRegion()); + ImageRegionIteratorWithIndex fieldIt(field, field->GetLargestPossibleRegion()); ImageRegionConstIteratorWithIndex smoothedFieldIt(smoothField, smoothField->GetLargestPossibleRegion()); for (fieldIt.GoToBegin(), smoothedFieldIt.GoToBegin(); !fieldIt.IsAtEnd(); ++fieldIt, ++smoothedFieldIt) { typename DisplacementFieldType::IndexType index = fieldIt.GetIndex(); - bool isOnBoundary = false; + bool isOnBoundary = false; for (unsigned int dimension = 0; dimension < Superclass::Dimension; ++dimension) { if (index[dimension] == startIndex[dimension] || diff --git a/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.hxx b/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.hxx index 6fa34f78725..9153f9049b2 100644 --- a/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.hxx +++ b/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.hxx @@ -43,12 +43,12 @@ template void GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform::UpdateTransformParameters( const DerivativeType & update, - ScalarType factor) + ScalarType factor) { const TimeVaryingVelocityFieldPointer velocityField = this->GetModifiableVelocityField(); const typename VelocityFieldType::RegionType & bufferedRegion = velocityField->GetBufferedRegion(); - const SizeValueType numberOfPixels = bufferedRegion.GetNumberOfPixels(); + const SizeValueType numberOfPixels = bufferedRegion.GetNumberOfPixels(); using ImporterType = ImportImageFilter; const bool importFilterWillReleaseMemory = false; @@ -138,8 +138,8 @@ typename GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform::TimeVaryingVelocityFieldPointer GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform:: GaussianSmoothTimeVaryingVelocityField(VelocityFieldType * field, - ScalarType spatialVariance, - ScalarType temporalVariance) + ScalarType spatialVariance, + ScalarType temporalVariance) { if (spatialVariance <= 0.0 && temporalVariance <= 0.0) { @@ -199,10 +199,10 @@ GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransformGetLargestPossibleRegion().GetSize(); + TimeVaryingVelocityFieldSizeType size = field->GetLargestPossibleRegion().GetSize(); TimeVaryingVelocityFieldIndexType startIndex = field->GetLargestPossibleRegion().GetIndex(); - ImageRegionIteratorWithIndex fieldIt(field, field->GetLargestPossibleRegion()); + ImageRegionIteratorWithIndex fieldIt(field, field->GetLargestPossibleRegion()); ImageRegionConstIteratorWithIndex smoothedFieldIt(smoothField, smoothField->GetLargestPossibleRegion()); for (fieldIt.GoToBegin(), smoothedFieldIt.GoToBegin(); !fieldIt.IsAtEnd(); ++fieldIt, ++smoothedFieldIt) @@ -235,7 +235,7 @@ template void GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.h b/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.h index 4f2849e4097..18664610abf 100644 --- a/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.h +++ b/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.h @@ -195,10 +195,10 @@ class ITK_TEMPLATE_EXPORT InverseDisplacementFieldImageFilter : public ImageToIm PrepareKernelBaseSpline(); private: - SizeType m_Size{}; // Size of the output image + SizeType m_Size{}; // Size of the output image KernelTransformPointerType m_KernelTransform{}; // Coordinate transform to // use - SpacingType m_OutputSpacing{}; // output image spacing + SpacingType m_OutputSpacing{}; // output image spacing OriginPointType m_OutputOrigin{}; // output image origin unsigned int m_SubsamplingFactor{}; // factor to subsample the diff --git a/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.hxx b/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.hxx index 5bf10dd3f50..415e23a47c5 100644 --- a/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.hxx +++ b/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.hxx @@ -156,7 +156,7 @@ InverseDisplacementFieldImageFilter::PrepareKernelBas IteratorType ot(sampledInput, subsampledRegion); - OutputPixelType value; + OutputPixelType value; Point sourcePoint; Point targetPoint; diff --git a/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.h b/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.h index 54960f58982..b647d70bb00 100644 --- a/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.h +++ b/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.h @@ -172,15 +172,15 @@ class ITK_TEMPLATE_EXPORT InvertDisplacementFieldImageFilter : public ImageToIma // internal ivars necessary for multithreading basic operations typename DisplacementFieldType::Pointer m_ComposedField{}; - typename RealImageType::Pointer m_ScaledNormImage{}; + typename RealImageType::Pointer m_ScaledNormImage{}; - RealType m_MaxErrorNorm{}; - RealType m_MeanErrorNorm{}; - RealType m_Epsilon{}; + RealType m_MaxErrorNorm{}; + RealType m_MeanErrorNorm{}; + RealType m_Epsilon{}; SpacingType m_DisplacementFieldSpacing{}; - bool m_DoThreadedEstimateInverse{ false }; - bool m_EnforceBoundaryCondition{ true }; - std::mutex m_Mutex{}; + bool m_DoThreadedEstimateInverse{ false }; + bool m_EnforceBoundaryCondition{ true }; + std::mutex m_Mutex{}; }; } // end namespace itk diff --git a/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.hxx b/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.hxx index fdaadae6228..07503d3628e 100644 --- a/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.hxx +++ b/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.hxx @@ -129,7 +129,7 @@ InvertDisplacementFieldImageFilter::GenerateData() this->m_MeanErrorNorm = RealType{}; this->m_MaxErrorNorm = RealType{}; - float newProgress = static_cast(2 * iteration - 1) / (2 * m_MaximumNumberOfIterations); + float newProgress = static_cast(2 * iteration - 1) / (2 * m_MaximumNumberOfIterations); ProgressTransformer pt(oldProgress, newProgress, this); this->m_DoThreadedEstimateInverse = false; this->GetMultiThreader()->SetNumberOfWorkUnits(this->GetNumberOfWorkUnits()); @@ -170,12 +170,12 @@ void InvertDisplacementFieldImageFilter::DynamicThreadedGenerateData(const RegionType & region) { const typename DisplacementFieldType::RegionType fullRegion = this->m_ComposedField->GetRequestedRegion(); - const typename DisplacementFieldType::SizeType size = fullRegion.GetSize(); - const typename DisplacementFieldType::IndexType startIndex = fullRegion.GetIndex(); - const typename DisplacementFieldType::PixelType zeroVector{}; + const typename DisplacementFieldType::SizeType size = fullRegion.GetSize(); + const typename DisplacementFieldType::IndexType startIndex = fullRegion.GetIndex(); + const typename DisplacementFieldType::PixelType zeroVector{}; ImageRegionIterator ItE(this->m_ComposedField, region); - ImageRegionIterator ItS(this->m_ScaledNormImage, region); + ImageRegionIterator ItS(this->m_ScaledNormImage, region); if (this->m_DoThreadedEstimateInverse) { @@ -183,7 +183,7 @@ InvertDisplacementFieldImageFilter::DynamicThreadedGe for (ItI.GoToBegin(), ItE.GoToBegin(), ItS.GoToBegin(); !ItI.IsAtEnd(); ++ItI, ++ItE, ++ItS) { - VectorType update = ItE.Get(); + VectorType update = ItE.Get(); const RealType scaledNorm = ItS.Get(); if (scaledNorm > this->m_Epsilon * this->m_MaxErrorNorm) @@ -209,8 +209,8 @@ InvertDisplacementFieldImageFilter::DynamicThreadedGe else { VectorType inverseSpacing; - RealType localMean{}; - RealType localMax{}; + RealType localMean{}; + RealType localMax{}; for (unsigned int d = 0; d < ImageDimension; ++d) { inverseSpacing[d] = 1.0 / this->m_DisplacementFieldSpacing[d]; @@ -218,7 +218,7 @@ InvertDisplacementFieldImageFilter::DynamicThreadedGe for (ItE.GoToBegin(), ItS.GoToBegin(); !ItE.IsAtEnd(); ++ItE, ++ItS) { const VectorType & displacement = ItE.Get(); - RealType scaledNorm = 0.0; + RealType scaledNorm = 0.0; for (unsigned int d = 0; d < ImageDimension; ++d) { scaledNorm += itk::Math::sqr(displacement[d] * inverseSpacing[d]); diff --git a/Modules/Filtering/DisplacementField/include/itkIterativeInverseDisplacementFieldImageFilter.hxx b/Modules/Filtering/DisplacementField/include/itkIterativeInverseDisplacementFieldImageFilter.hxx index 0851f4b85fb..45a32001e8b 100644 --- a/Modules/Filtering/DisplacementField/include/itkIterativeInverseDisplacementFieldImageFilter.hxx +++ b/Modules/Filtering/DisplacementField/include/itkIterativeInverseDisplacementFieldImageFilter.hxx @@ -39,12 +39,12 @@ void IterativeInverseDisplacementFieldImageFilter::GenerateData() { const unsigned int ImageDimension = InputImageType::ImageDimension; - TimeType time; + TimeType time; time.Start(); // time measurement const InputImageConstPointer inputPtr = this->GetInput(0); - const OutputImagePointer outputPtr = this->GetOutput(0); + const OutputImagePointer outputPtr = this->GetOutput(0); // some checks if (inputPtr.IsNull()) @@ -99,14 +99,14 @@ IterativeInverseDisplacementFieldImageFilter::Generat const InputImageRegionType region = inputPtr->GetLargestPossibleRegion(); - unsigned int numberOfPoints = 1; + unsigned int numberOfPoints = 1; for (unsigned int i = 0; i < ImageDimension; ++i) { numberOfPoints *= region.GetSize()[i]; } - ProgressReporter progress(this, 0, inputPtr->GetLargestPossibleRegion().GetNumberOfPixels()); - OutputIterator OutputIt(outputPtr, outputPtr->GetRequestedRegion()); + ProgressReporter progress(this, 0, inputPtr->GetLargestPossibleRegion().GetNumberOfPixels()); + OutputIterator OutputIt(outputPtr, outputPtr->GetRequestedRegion()); const FieldInterpolatorPointer inputFieldInterpolator = FieldInterpolatorType::New(); inputFieldInterpolator->SetInputImage(inputPtr); @@ -117,10 +117,10 @@ IterativeInverseDisplacementFieldImageFilter::Generat { // get the output image index const OutputImageIndexType index = OutputIt.GetIndex(); - OutputImagePointType originalPoint; + OutputImagePointType originalPoint; outputPtr->TransformIndexToPhysicalPoint(index, originalPoint); - int stillSamePoint = 0; + int stillSamePoint = 0; double step = spacing; // get the required displacement @@ -164,7 +164,7 @@ IterativeInverseDisplacementFieldImageFilter::Generat if (inputFieldInterpolator->IsInsideBuffer(mappedPoint)) { FieldInterpolatorOutputType forwardVector = inputFieldInterpolator->Evaluate(mappedPoint); - double tmp = 0; + double tmp = 0; for (unsigned int l = 0; l < ImageDimension; ++l) { tmp += std::pow(mappedPoint[l] + forwardVector[l] - originalPoint[l], 2); @@ -184,7 +184,7 @@ IterativeInverseDisplacementFieldImageFilter::Generat if (inputFieldInterpolator->IsInsideBuffer(mappedPoint)) { FieldInterpolatorOutputType forwardVector = inputFieldInterpolator->Evaluate(mappedPoint); - double tmp = 0; + double tmp = 0; for (unsigned int l = 0; l < ImageDimension; ++l) { tmp += std::pow(mappedPoint[l] + forwardVector[l] - originalPoint[l], 2); @@ -241,7 +241,7 @@ IterativeInverseDisplacementFieldImageFilter::Generat template void IterativeInverseDisplacementFieldImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/DisplacementField/include/itkLandmarkDisplacementFieldSource.h b/Modules/Filtering/DisplacementField/include/itkLandmarkDisplacementFieldSource.h index c4cc52d9d4d..8ad93e4e330 100644 --- a/Modules/Filtering/DisplacementField/include/itkLandmarkDisplacementFieldSource.h +++ b/Modules/Filtering/DisplacementField/include/itkLandmarkDisplacementFieldSource.h @@ -167,9 +167,9 @@ class ITK_TEMPLATE_EXPORT LandmarkDisplacementFieldSource : public ImageSource void TimeVaryingBSplineVelocityFieldTransform::UpdateTransformParameters( const DerivativeType & update, - ScalarType factor) + ScalarType factor) { const NumberOfParametersType numberOfParameters = this->GetNumberOfParameters(); @@ -157,7 +157,7 @@ TimeVaryingBSplineVelocityFieldTransform::Upda template void TimeVaryingBSplineVelocityFieldTransform::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/DisplacementField/include/itkTimeVaryingVelocityFieldIntegrationImageFilter.hxx b/Modules/Filtering/DisplacementField/include/itkTimeVaryingVelocityFieldIntegrationImageFilter.hxx index 7b90bbee857..047efa58759 100644 --- a/Modules/Filtering/DisplacementField/include/itkTimeVaryingVelocityFieldIntegrationImageFilter.hxx +++ b/Modules/Filtering/DisplacementField/include/itkTimeVaryingVelocityFieldIntegrationImageFilter.hxx @@ -63,7 +63,7 @@ TimeVaryingVelocityFieldIntegrationImageFilter::GenerateOutputInformation() { const TimeVaryingVelocityFieldType * input = this->GetInput(); - DisplacementFieldType * output = this->GetOutput(); + DisplacementFieldType * output = this->GetOutput(); this->m_NumberOfTimePoints = input->GetLargestPossibleRegion().GetSize()[OutputImageDimension]; if (!input || !output) { @@ -80,9 +80,9 @@ TimeVaryingVelocityFieldIntegrationImageFilterGetSpacing(); - const InputOriginType & inputOrigin = input->GetOrigin(); + const InputSpacingType & inputSpacing = input->GetSpacing(); + const InputOriginType & inputOrigin = input->GetOrigin(); const InputDirectionType & inputDirection = input->GetDirection(); - const InputRegionType requestedRegion = input->GetRequestedRegion(); - const InputSizeType requestedSize = requestedRegion.GetSize(); + const InputRegionType requestedRegion = input->GetRequestedRegion(); + const InputSizeType requestedSize = requestedRegion.GetSize(); for (unsigned int i = 0; i < OutputImageDimension; ++i) { @@ -155,7 +155,7 @@ TimeVaryingVelocityFieldIntegrationImageFilter auto TimeVaryingVelocityFieldIntegrationImageFilter::IntegrateVelocityAtPoint( - const PointType & initialSpatialPoint, + const PointType & initialSpatialPoint, const TimeVaryingVelocityFieldType * inputField) -> VectorType { // Solve the initial value problem using fourth-order Runge-Kutta @@ -188,7 +188,7 @@ TimeVaryingVelocityFieldIntegrationImageFilterGetLargestPossibleRegion(); typename RegionType::IndexType lastIndex = region.GetIndex(); - typename RegionType::SizeType size = region.GetSize(); + typename RegionType::SizeType size = region.GetSize(); for (unsigned int d = 0; d < InputImageDimension; ++d) { lastIndex[d] += (size[d] - 1); @@ -280,7 +280,7 @@ template void TimeVaryingVelocityFieldIntegrationImageFilter::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.h b/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.h index 8aec91adb7d..e135848be67 100644 --- a/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.h +++ b/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.h @@ -187,12 +187,12 @@ class ITK_TEMPLATE_EXPORT TransformToDisplacementFieldFilter : public ImageSourc private: /** Member variables. */ - SizeType m_Size{}; // size of the output region - IndexType m_OutputStartIndex{}; // start index of the output region - SpacingType m_OutputSpacing{}; // output image spacing - OriginType m_OutputOrigin{}; // output image origin - DirectionType m_OutputDirection{}; // output image direction cosines - bool m_UseReferenceImage{ false }; + SizeType m_Size{}; // size of the output region + IndexType m_OutputStartIndex{}; // start index of the output region + SpacingType m_OutputSpacing{}; // output image spacing + OriginType m_OutputOrigin{}; // output image origin + DirectionType m_OutputDirection{}; // output image direction cosines + bool m_UseReferenceImage{ false }; }; } // end namespace itk diff --git a/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.hxx b/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.hxx index 392b008eb65..e5808a61085 100644 --- a/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.hxx +++ b/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.hxx @@ -50,7 +50,7 @@ TransformToDisplacementFieldFilter::Transfor template void TransformToDisplacementFieldFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -174,7 +174,7 @@ TransformToDisplacementFieldFilter::Nonlinea const OutputImageRegionType & outputRegionForThread) { // Get the output pointer - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); const TransformType * transform = this->GetInput()->Get(); // Define a few variables that will be used to translate from an input pixel @@ -217,7 +217,7 @@ TransformToDisplacementFieldFilter::LinearTh const OutputImageRegionType & outputRegionForThread) { // Get the output pointer - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); const TransformType * transformPtr = this->GetInput()->Get(); const OutputImageRegionType & largestPossibleRegion = outputPtr->GetLargestPossibleRegion(); diff --git a/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx b/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx index 107b19883e6..0fa2323a0cf 100644 --- a/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx +++ b/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx @@ -55,7 +55,7 @@ VelocityFieldTransform::VelocityFieldTransform template void VelocityFieldTransform::UpdateTransformParameters(const DerivativeType & update, - ScalarType factor) + ScalarType factor) { // This simply adds the values. // TODO: This should be multi-threaded probably, via image add filter. @@ -235,7 +235,7 @@ VelocityFieldTransform::CopyDisplacementField( rval->Allocate(); ImageRegionConstIterator dispIt(toCopy, toCopy->GetLargestPossibleRegion()); - ImageRegionIterator cloneDispIt(rval, rval->GetLargestPossibleRegion()); + ImageRegionIterator cloneDispIt(rval, rval->GetLargestPossibleRegion()); for (dispIt.GoToBegin(), cloneDispIt.GoToBegin(); !dispIt.IsAtEnd() && !cloneDispIt.IsAtEnd(); ++dispIt, ++cloneDispIt) { @@ -249,7 +249,7 @@ typename LightObject::Pointer VelocityFieldTransform::InternalClone() const { // create a new instance - LightObject::Pointer loPtr = Superclass::InternalClone(); + LightObject::Pointer loPtr = Superclass::InternalClone(); const typename Self::Pointer rval = dynamic_cast(loPtr.GetPointer()); if (rval.IsNull()) { @@ -262,22 +262,22 @@ VelocityFieldTransform::InternalClone() const rval->SetParameters(this->GetParameters()); // need the displacement field but GetDisplacementField is non-const. - auto * nonConstThis = const_cast(this); + auto * nonConstThis = const_cast(this); const typename DisplacementFieldType::ConstPointer dispField = nonConstThis->GetDisplacementField(); - const typename DisplacementFieldType::Pointer cloneDispField = this->CopyDisplacementField(dispField); + const typename DisplacementFieldType::Pointer cloneDispField = this->CopyDisplacementField(dispField); rval->GetModifiableInterpolator()->SetInputImage(cloneDispField); rval->SetDisplacementField(cloneDispField); // now do the inverse -- it actually gets created as a side effect? const typename DisplacementFieldType::ConstPointer invDispField = nonConstThis->GetInverseDisplacementField(); - const typename DisplacementFieldType::Pointer cloneInvDispField = this->CopyDisplacementField(invDispField); + const typename DisplacementFieldType::Pointer cloneInvDispField = this->CopyDisplacementField(invDispField); rval->SetInverseDisplacementField(cloneInvDispField); // copy the VelocityField // SetFixedParameters allocates the VelocityField ImageRegionConstIterator thisIt(this->m_VelocityField, this->m_VelocityField->GetLargestPossibleRegion()); - ImageRegionIterator cloneIt(rval->m_VelocityField, + ImageRegionIterator cloneIt(rval->m_VelocityField, rval->m_VelocityField->GetLargestPossibleRegion()); for (thisIt.GoToBegin(), cloneIt.GoToBegin(); !thisIt.IsAtEnd() && !cloneIt.IsAtEnd(); ++thisIt, ++cloneIt) { diff --git a/Modules/Filtering/DisplacementField/test/itkBSplineExponentialDiffeomorphicTransformTest.cxx b/Modules/Filtering/DisplacementField/test/itkBSplineExponentialDiffeomorphicTransformTest.cxx index 229937bbcfd..f03b9e7538d 100644 --- a/Modules/Filtering/DisplacementField/test/itkBSplineExponentialDiffeomorphicTransformTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkBSplineExponentialDiffeomorphicTransformTest.cxx @@ -45,10 +45,10 @@ itkBSplineExponentialDiffeomorphicTransformTest(int, char *[]) using FieldType = DisplacementTransformType::DisplacementFieldType; auto field = FieldType::New(); // This is based on itk::Image - FieldType::SizeType size; - FieldType::IndexType start; + FieldType::SizeType size; + FieldType::IndexType start; FieldType::RegionType region; - constexpr int dimLength = 20; + constexpr int dimLength = 20; size.Fill(dimLength); start.Fill(0); region.SetSize(size); @@ -64,7 +64,7 @@ itkBSplineExponentialDiffeomorphicTransformTest(int, char *[]) /* Test SmoothDisplacementFieldBSpline */ std::cout << "Test SmoothDisplacementFieldBSpline" << std::endl; - DisplacementTransformType::ParametersType paramsFill(displacementTransform->GetNumberOfParameters()); + DisplacementTransformType::ParametersType paramsFill(displacementTransform->GetNumberOfParameters()); constexpr DisplacementTransformType::ParametersValueType paramsFillValue = 0.0; paramsFill.Fill(paramsFillValue); // Add an outlier to visually see that some smoothing is taking place. diff --git a/Modules/Filtering/DisplacementField/test/itkBSplineSmoothingOnUpdateDisplacementFieldTransformTest.cxx b/Modules/Filtering/DisplacementField/test/itkBSplineSmoothingOnUpdateDisplacementFieldTransformTest.cxx index 42472a4ab47..3f9735fc937 100644 --- a/Modules/Filtering/DisplacementField/test/itkBSplineSmoothingOnUpdateDisplacementFieldTransformTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkBSplineSmoothingOnUpdateDisplacementFieldTransformTest.cxx @@ -43,22 +43,22 @@ itkBSplineSmoothingOnUpdateDisplacementFieldTransformTest(int, char *[]) constexpr typename DisplacementTransformType::ArrayType::ValueType controlPointsUpdateFieldVal = 4; - auto controlPointsUpdateField = + auto controlPointsUpdateField = itk::MakeFilled(controlPointsUpdateFieldVal); ITK_TEST_SET_GET_VALUE(controlPointsUpdateField, displacementTransform->GetNumberOfControlPointsForTheUpdateField()); constexpr typename DisplacementTransformType::ArrayType::ValueType controlPointsTotalFieldVal = 0; - auto controlPointsTotalField = + auto controlPointsTotalField = itk::MakeFilled(controlPointsTotalFieldVal); ITK_TEST_SET_GET_VALUE(controlPointsTotalField, displacementTransform->GetNumberOfControlPointsForTheTotalField()); using FieldType = DisplacementTransformType::DisplacementFieldType; auto field = FieldType::New(); // This is based on itk::Image - FieldType::SizeType size; - FieldType::IndexType start; + FieldType::SizeType size; + FieldType::IndexType start; FieldType::RegionType region; - constexpr int dimLength = 20; + constexpr int dimLength = 20; size.Fill(dimLength); start.Fill(0); region.SetSize(size); @@ -73,7 +73,7 @@ itkBSplineSmoothingOnUpdateDisplacementFieldTransformTest(int, char *[]) /* Test SmoothDisplacementFieldBSpline */ std::cout << "Test SmoothDisplacementFieldBSpline" << std::endl; - DisplacementTransformType::ParametersType paramsFill(displacementTransform->GetNumberOfParameters()); + DisplacementTransformType::ParametersType paramsFill(displacementTransform->GetNumberOfParameters()); constexpr DisplacementTransformType::ParametersValueType paramsFillValue = 0.0; paramsFill.Fill(paramsFillValue); // Add an outlier to visually see that some smoothing is taking place. diff --git a/Modules/Filtering/DisplacementField/test/itkComposeDisplacementFieldsImageFilterTest.cxx b/Modules/Filtering/DisplacementField/test/itkComposeDisplacementFieldsImageFilterTest.cxx index 213b2316f93..a4401f8486d 100644 --- a/Modules/Filtering/DisplacementField/test/itkComposeDisplacementFieldsImageFilterTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkComposeDisplacementFieldsImageFilterTest.cxx @@ -28,9 +28,9 @@ itkComposeDisplacementFieldsImageFilterTest(int, char *[]) using DisplacementFieldType = itk::Image; // Create a displacement field - DisplacementFieldType::PointType origin; - DisplacementFieldType::SpacingType spacing; - DisplacementFieldType::SizeType size; + DisplacementFieldType::PointType origin; + DisplacementFieldType::SpacingType spacing; + DisplacementFieldType::SizeType size; DisplacementFieldType::DirectionType direction; direction.SetIdentity(); diff --git a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldJacobianDeterminantFilterTest.cxx b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldJacobianDeterminantFilterTest.cxx index 7c86fd254fe..be169bee0ce 100644 --- a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldJacobianDeterminantFilterTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldJacobianDeterminantFilterTest.cxx @@ -26,7 +26,7 @@ static bool TestDisplacementJacobianDeterminantValue() { - bool testPassed = true; + bool testPassed = true; constexpr unsigned int ImageDimension = 2; using VectorType = itk::Vector; diff --git a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldToBSplineImageFilterTest.cxx b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldToBSplineImageFilterTest.cxx index 1310296de11..9f87afab75d 100644 --- a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldToBSplineImageFilterTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldToBSplineImageFilterTest.cxx @@ -29,9 +29,9 @@ itkDisplacementFieldToBSplineImageFilterTest(int, char *[]) using PointSetType = itk::PointSet; // Create a displacement field - DisplacementFieldType::PointType origin; - DisplacementFieldType::SpacingType spacing; - DisplacementFieldType::SizeType size; + DisplacementFieldType::PointType origin; + DisplacementFieldType::SpacingType spacing; + DisplacementFieldType::SizeType size; DisplacementFieldType::DirectionType direction; direction.SetIdentity(); diff --git a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformCloneTest.cxx b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformCloneTest.cxx index 03e3b647402..f7dcfeda3c6 100644 --- a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformCloneTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformCloneTest.cxx @@ -28,7 +28,7 @@ template bool testVector(const TVector & v1, const TVector & v2) { - bool pass = true; + bool pass = true; constexpr double tolerance = 1e-10; for (unsigned int i = 0; i < v1.Size() && i < v2.Size(); ++i) @@ -55,10 +55,10 @@ itkDisplacementFieldTransformCloneTest(int, char *[]) auto field = FieldType::New(); - FieldType::SizeType size; - FieldType::IndexType start; + FieldType::SizeType size; + FieldType::IndexType start; FieldType::RegionType region; - constexpr int dimLength = 20; + constexpr int dimLength = 20; size.Fill(dimLength); start.Fill(0); region.SetSize(size); diff --git a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformTest.cxx b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformTest.cxx index eb516678aba..70b3de2cb66 100644 --- a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformTest.cxx @@ -197,7 +197,7 @@ itkDisplacementFieldTransformTest(int argc, char * argv[]) // Test exceptions constexpr DisplacementTransformType::InputVnlVectorType::element_type vectorValue = 1.0; - DisplacementTransformType::InputVnlVectorType vector; + DisplacementTransformType::InputVnlVectorType vector; vector.fill(vectorValue); ITK_TRY_EXPECT_EXCEPTION(displacementTransform->TransformVector(vector)); @@ -237,10 +237,10 @@ itkDisplacementFieldTransformTest(int argc, char * argv[]) auto field = FieldType::New(); - constexpr int dimLength = 20; - auto size = itk::MakeFilled(dimLength); + constexpr int dimLength = 20; + auto size = itk::MakeFilled(dimLength); constexpr FieldType::IndexType start{}; - FieldType::RegionType region; + FieldType::RegionType region; region.SetSize(size); region.SetIndex(start); field->SetRegions(region); @@ -261,14 +261,14 @@ itkDisplacementFieldTransformTest(int argc, char * argv[]) const DisplacementFieldType::SizeType size2 = displacementTransform->GetDisplacementField()->GetLargestPossibleRegion().GetSize(); - const DisplacementFieldType::PointType origin2 = displacementTransform->GetDisplacementField()->GetOrigin(); + const DisplacementFieldType::PointType origin2 = displacementTransform->GetDisplacementField()->GetOrigin(); const DisplacementFieldType::DirectionType direction2 = displacementTransform->GetDisplacementField()->GetDirection(); - const DisplacementFieldType::SpacingType spacing2 = displacementTransform->GetDisplacementField()->GetSpacing(); + const DisplacementFieldType::SpacingType spacing2 = displacementTransform->GetDisplacementField()->GetSpacing(); size = field->GetLargestPossibleRegion().GetSize(); - const DisplacementFieldType::PointType origin = field->GetOrigin(); + const DisplacementFieldType::PointType origin = field->GetOrigin(); const DisplacementFieldType::DirectionType direction = field->GetDirection(); - const DisplacementFieldType::SpacingType spacing = field->GetSpacing(); + const DisplacementFieldType::SpacingType spacing = field->GetSpacing(); ITK_TEST_EXPECT_EQUAL(size, size2); ITK_TEST_EXPECT_EQUAL(origin, origin2); @@ -317,9 +317,9 @@ itkDisplacementFieldTransformTest(int argc, char * argv[]) { FieldType::PointType pt; field->TransformIndexToPhysicalPoint(it.GetIndex(), pt); - const FieldType::PointType pt2 = affineTransform->TransformPoint(pt); + const FieldType::PointType pt2 = affineTransform->TransformPoint(pt); FieldType::PointType::VectorType vec = pt2 - pt; - FieldType::PixelType v; + FieldType::PixelType v; v[0] = vec[0]; v[1] = vec[1]; field->SetPixel(it.GetIndex(), v); @@ -413,7 +413,7 @@ itkDisplacementFieldTransformTest(int argc, char * argv[]) // Test transforming of points // // Test a point with non-zero displacement - const FieldType::IndexType idx = field->TransformPhysicalPointToIndex(testPoint); + const FieldType::IndexType idx = field->TransformPhysicalPointToIndex(testPoint); const DisplacementTransformType::OutputPointType deformTruth = testPoint + field->GetPixel(idx); const DisplacementTransformType::OutputPointType deformOutput = displacementTransform->TransformPoint(testPoint); @@ -430,7 +430,7 @@ itkDisplacementFieldTransformTest(int argc, char * argv[]) testVector[1] = 0.5; const DisplacementTransformType::OutputVectorType deformVectorTruth = affineTransform->TransformVector(testVector); - DisplacementTransformType::OutputVectorType deformVector = + DisplacementTransformType::OutputVectorType deformVector = displacementTransform->TransformVector(testVector, testPoint); tolerance = 1e-4; diff --git a/Modules/Filtering/DisplacementField/test/itkExponentialDisplacementFieldImageFilterTest.cxx b/Modules/Filtering/DisplacementField/test/itkExponentialDisplacementFieldImageFilterTest.cxx index 995b621b87c..532319de621 100644 --- a/Modules/Filtering/DisplacementField/test/itkExponentialDisplacementFieldImageFilterTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkExponentialDisplacementFieldImageFilterTest.cxx @@ -247,7 +247,7 @@ itkExponentialDisplacementFieldImageFilterTest(int, char *[]) filter->SetComputeInverse(computeInverse); // Random number generator - vnl_random rng; + vnl_random rng; constexpr double power = 5.0; it.GoToBegin(); diff --git a/Modules/Filtering/DisplacementField/test/itkGaussianExponentialDiffeomorphicTransformTest.cxx b/Modules/Filtering/DisplacementField/test/itkGaussianExponentialDiffeomorphicTransformTest.cxx index d6f287b1b60..b7f1ac411b2 100644 --- a/Modules/Filtering/DisplacementField/test/itkGaussianExponentialDiffeomorphicTransformTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkGaussianExponentialDiffeomorphicTransformTest.cxx @@ -46,10 +46,10 @@ itkGaussianExponentialDiffeomorphicTransformTest(int, char *[]) using FieldType = DisplacementTransformType::DisplacementFieldType; auto field = FieldType::New(); // This is based on itk::Image - FieldType::SizeType size; - FieldType::IndexType start; + FieldType::SizeType size; + FieldType::IndexType start; FieldType::RegionType region; - constexpr int dimLength = 20; + constexpr int dimLength = 20; size.Fill(dimLength); start.Fill(0); region.SetSize(size); @@ -66,8 +66,8 @@ itkGaussianExponentialDiffeomorphicTransformTest(int, char *[]) /* Test SmoothDisplacementFieldGauss */ std::cout << "Test SmoothDisplacementFieldGauss" << std::endl; using ParametersValueType = DisplacementTransformType::ParametersValueType; - constexpr ParametersValueType paramsZero{}; - DisplacementTransformType::ParametersType paramsFill(displacementTransform->GetNumberOfParameters()); + constexpr ParametersValueType paramsZero{}; + DisplacementTransformType::ParametersType paramsFill(displacementTransform->GetNumberOfParameters()); constexpr DisplacementTransformType::ParametersValueType paramsFillValue = 0.0; paramsFill.Fill(paramsFillValue); // Add an outlier to visually see that some smoothing is taking place. diff --git a/Modules/Filtering/DisplacementField/test/itkGaussianSmoothingOnUpdateDisplacementFieldTransformTest.cxx b/Modules/Filtering/DisplacementField/test/itkGaussianSmoothingOnUpdateDisplacementFieldTransformTest.cxx index 2df9fa6e2ba..9a32f075ca3 100644 --- a/Modules/Filtering/DisplacementField/test/itkGaussianSmoothingOnUpdateDisplacementFieldTransformTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkGaussianSmoothingOnUpdateDisplacementFieldTransformTest.cxx @@ -41,10 +41,10 @@ itkGaussianSmoothingOnUpdateDisplacementFieldTransformTest(int, char *[]) using FieldType = DisplacementTransformType::DisplacementFieldType; auto field = FieldType::New(); // This is based on itk::Image - FieldType::SizeType size; - FieldType::IndexType start; + FieldType::SizeType size; + FieldType::IndexType start; FieldType::RegionType region; - constexpr int dimLength = 20; + constexpr int dimLength = 20; size.Fill(dimLength); start.Fill(0); region.SetSize(size); @@ -60,8 +60,8 @@ itkGaussianSmoothingOnUpdateDisplacementFieldTransformTest(int, char *[]) /* Test SmoothDisplacementFieldGauss */ std::cout << "Test SmoothDisplacementFieldGauss" << std::endl; using ParametersValueType = DisplacementTransformType::ParametersValueType; - constexpr ParametersValueType paramsZero{}; - DisplacementTransformType::ParametersType paramsFill(displacementTransform->GetNumberOfParameters()); + constexpr ParametersValueType paramsZero{}; + DisplacementTransformType::ParametersType paramsFill(displacementTransform->GetNumberOfParameters()); constexpr DisplacementTransformType::ParametersValueType paramsFillValue = 0.0; paramsFill.Fill(paramsFillValue); // Add an outlier to visually see that some smoothing is taking place. diff --git a/Modules/Filtering/DisplacementField/test/itkInverseDisplacementFieldImageFilterTest.cxx b/Modules/Filtering/DisplacementField/test/itkInverseDisplacementFieldImageFilterTest.cxx index 1a6419e74db..732032d86c8 100644 --- a/Modules/Filtering/DisplacementField/test/itkInverseDisplacementFieldImageFilterTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkInverseDisplacementFieldImageFilterTest.cxx @@ -132,7 +132,7 @@ itkInverseDisplacementFieldImageFilterTest(int argc, char * argv[]) p2[1] = p1[1] + fp1[1]; const DisplacementFieldType::IndexType id2 = filter->GetOutput()->TransformPhysicalPointToIndex(p2); - DisplacementFieldType::PixelType fp2 = filter->GetOutput()->GetPixel(id2); + DisplacementFieldType::PixelType fp2 = filter->GetOutput()->GetPixel(id2); if (itk::Math::abs(fp2[0] + fp1[0]) > 0.001 || itk::Math::abs(fp2[1] + fp1[1]) > 0.001) { diff --git a/Modules/Filtering/DisplacementField/test/itkInvertDisplacementFieldImageFilterTest.cxx b/Modules/Filtering/DisplacementField/test/itkInvertDisplacementFieldImageFilterTest.cxx index 60db093f18e..1ed3f45b411 100644 --- a/Modules/Filtering/DisplacementField/test/itkInvertDisplacementFieldImageFilterTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkInvertDisplacementFieldImageFilterTest.cxx @@ -37,9 +37,9 @@ itkInvertDisplacementFieldImageFilterTest(int argc, char * argv[]) using DisplacementFieldType = itk::Image; // Create a displacement field - DisplacementFieldType::PointType origin; - DisplacementFieldType::SpacingType spacing; - DisplacementFieldType::SizeType size; + DisplacementFieldType::PointType origin; + DisplacementFieldType::SpacingType spacing; + DisplacementFieldType::SizeType size; DisplacementFieldType::DirectionType direction; direction.SetIdentity(); @@ -63,13 +63,13 @@ itkInvertDisplacementFieldImageFilterTest(int argc, char * argv[]) constexpr float weight1 = 1.0; const DisplacementFieldType::RegionType region = field->GetLargestPossibleRegion(); - const DisplacementFieldType::IndexType startIndex = region.GetIndex(); + const DisplacementFieldType::IndexType startIndex = region.GetIndex(); itk::ImageRegionIteratorWithIndex ItF(field, field->GetLargestPossibleRegion()); for (ItF.GoToBegin(); !ItF.IsAtEnd(); ++ItF) { DisplacementFieldType::IndexType index = ItF.GetIndex(); - bool isOnBoundary = false; + bool isOnBoundary = false; for (unsigned int d = 0; d < ImageDimension; ++d) { if (index[d] == startIndex[d] || index[d] == static_cast(size[d]) - startIndex[d] - 1) diff --git a/Modules/Filtering/DisplacementField/test/itkLandmarkDisplacementFieldSourceTest.cxx b/Modules/Filtering/DisplacementField/test/itkLandmarkDisplacementFieldSourceTest.cxx index 4bebc3775dc..457b09aa899 100644 --- a/Modules/Filtering/DisplacementField/test/itkLandmarkDisplacementFieldSourceTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkLandmarkDisplacementFieldSourceTest.cxx @@ -61,7 +61,7 @@ itkLandmarkDisplacementFieldSourceTest(int argc, char * argv[]) start[0] = 0; start[1] = 0; const DisplacementFieldType::RegionType region{ start, size }; - DisplacementFieldType::DirectionType direction; + DisplacementFieldType::DirectionType direction; direction.SetIdentity(); auto kernelTransform = itk::ThinPlateSplineKernelTransform::New(); diff --git a/Modules/Filtering/DisplacementField/test/itkTimeVaryingBSplineVelocityFieldTransformTest.cxx b/Modules/Filtering/DisplacementField/test/itkTimeVaryingBSplineVelocityFieldTransformTest.cxx index f08b46b6bca..5caf44a4961 100644 --- a/Modules/Filtering/DisplacementField/test/itkTimeVaryingBSplineVelocityFieldTransformTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkTimeVaryingBSplineVelocityFieldTransformTest.cxx @@ -91,9 +91,9 @@ itkTimeVaryingBSplineVelocityFieldTransformTest(int, char *[]) // Now test the transform - TimeVaryingVelocityFieldType::PointType timeVaryingVelocityFieldOrigin; - TimeVaryingVelocityFieldType::SpacingType timeVaryingVelocityFieldSpacing; - TimeVaryingVelocityFieldType::SizeType timeVaryingVelocityFieldSize; + TimeVaryingVelocityFieldType::PointType timeVaryingVelocityFieldOrigin; + TimeVaryingVelocityFieldType::SpacingType timeVaryingVelocityFieldSpacing; + TimeVaryingVelocityFieldType::SizeType timeVaryingVelocityFieldSize; TimeVaryingVelocityFieldType::DirectionType timeVaryingVelocityFieldDirection; timeVaryingVelocityFieldDirection.SetIdentity(); diff --git a/Modules/Filtering/DisplacementField/test/itkTimeVaryingVelocityFieldIntegrationImageFilterTest.cxx b/Modules/Filtering/DisplacementField/test/itkTimeVaryingVelocityFieldIntegrationImageFilterTest.cxx index 1a3bfe9df95..669e8143b81 100644 --- a/Modules/Filtering/DisplacementField/test/itkTimeVaryingVelocityFieldIntegrationImageFilterTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkTimeVaryingVelocityFieldIntegrationImageFilterTest.cxx @@ -127,7 +127,7 @@ itkTimeVaryingVelocityFieldIntegrationImageFilterTest(int argc, char * argv[]) // -( 0.1 * 1.0 - ( 0.1 * 0.0 ) ) = -0.1 with ~epsilon deviation // due to numerical computations const DisplacementFieldType * inverseField = inverseIntegrator->GetOutput(); - VectorType displacement = inverseField->GetPixel(index); + VectorType displacement = inverseField->GetPixel(index); std::cout << "Estimated inverse displacement vector: " << displacement << std::endl; if (itk::Math::abs(displacement[0] + 0.101852) > 0.01) @@ -189,7 +189,7 @@ itkTimeVaryingVelocityFieldIntegrationImageFilterTest(int argc, char * argv[]) importFilter->SetSpacing(spacing); const unsigned int numberOfPixels = size[0] * size[1] * size[2] * size[3]; - auto * localBuffer = new VectorType[numberOfPixels]; + auto * localBuffer = new VectorType[numberOfPixels]; VectorType * it = localBuffer; for (unsigned int t = 0; t < size[3]; ++t) diff --git a/Modules/Filtering/DisplacementField/test/itkTransformToDisplacementFieldFilterTest.cxx b/Modules/Filtering/DisplacementField/test/itkTransformToDisplacementFieldFilterTest.cxx index 9b0a9747a7b..3ec504513c5 100644 --- a/Modules/Filtering/DisplacementField/test/itkTransformToDisplacementFieldFilterTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkTransformToDisplacementFieldFilterTest.cxx @@ -37,7 +37,7 @@ itkTransformToDisplacementFieldFilterTest(int argc, char * argv[]) const std::string transformName = argv[1]; const std::string fileName = argv[2]; - std::string bSplineParametersFile; + std::string bSplineParametersFile; if (argc > 3) { bSplineParametersFile = argv[3]; @@ -71,10 +71,10 @@ itkTransformToDisplacementFieldFilterTest(int argc, char * argv[]) using WriterType = itk::ImageFileWriter; // Create output information. - auto size = SizeType::Filled(20); + auto size = SizeType::Filled(20); constexpr IndexType index{}; - auto spacing = itk::MakeFilled(0.7); - auto origin = itk::MakeFilled(-10.0); + auto spacing = itk::MakeFilled(0.7); + auto origin = itk::MakeFilled(-10.0); // Create transforms. auto affineTransform = AffineTransformType::New(); @@ -106,7 +106,7 @@ itkTransformToDisplacementFieldFilterTest(int argc, char * argv[]) { dimensions[d] = spacing[d] * (size[d] - 1.0); } - BSplineTransformType::MeshSizeType meshSize; + BSplineTransformType::MeshSizeType meshSize; BSplineTransformType::DirectionType direction; direction.SetIdentity(); @@ -120,7 +120,7 @@ itkTransformToDisplacementFieldFilterTest(int argc, char * argv[]) // Create and set parameters. ParametersType parameters(bSplineTransform->GetNumberOfParameters()); - std::ifstream input(bSplineParametersFile.c_str()); + std::ifstream input(bSplineParametersFile.c_str()); if (input.is_open()) { for (unsigned int i = 0; i < parameters.GetSize(); ++i) diff --git a/Modules/Filtering/DisplacementField/test/itkTransformToDisplacementFieldFilterTest1.cxx b/Modules/Filtering/DisplacementField/test/itkTransformToDisplacementFieldFilterTest1.cxx index 8098d4d267d..adce8b017d3 100644 --- a/Modules/Filtering/DisplacementField/test/itkTransformToDisplacementFieldFilterTest1.cxx +++ b/Modules/Filtering/DisplacementField/test/itkTransformToDisplacementFieldFilterTest1.cxx @@ -72,9 +72,9 @@ itkTransformToDisplacementFieldFilterTest1(int argc, char * argv[]) // Create input image. - auto size = SizeType::Filled(24); + auto size = SizeType::Filled(24); constexpr IndexType index{}; - SpacingType spacing; + SpacingType spacing; spacing[0] = 1.1; spacing[1] = 2.2; spacing[2] = 3.3; @@ -96,7 +96,7 @@ itkTransformToDisplacementFieldFilterTest1(int argc, char * argv[]) inputDirection[2][2] = 0; const RegionType region{ index, size }; - auto image = ImageType::New(); + auto image = ImageType::New(); image->SetRegions(region); image->Allocate(); image->SetSpacing(spacing); @@ -104,7 +104,7 @@ itkTransformToDisplacementFieldFilterTest1(int argc, char * argv[]) image->SetDirection(inputDirection); image->FillBuffer(ScalarPixelType{}); - float incrValue = 100.0; + float incrValue = 100.0; IndexType pixelIndex; for (unsigned int i = 0; i < size[0]; ++i) { @@ -133,9 +133,9 @@ itkTransformToDisplacementFieldFilterTest1(int argc, char * argv[]) // Set Output information. constexpr IndexType outputIndex{}; - SpacingType outputSpacing; - auto outputSize = SizeType::Filled(24); - const RegionType outputRegion{ outputIndex, outputSize }; + SpacingType outputSpacing; + auto outputSize = SizeType::Filled(24); + const RegionType outputRegion{ outputIndex, outputSize }; outputSpacing[0] = 1.0; outputSpacing[1] = 2.0; outputSpacing[2] = 3.0; @@ -149,7 +149,7 @@ itkTransformToDisplacementFieldFilterTest1(int argc, char * argv[]) auto eulerTransform = TransformType::New(); { // Set the options. - auto imageCenter = IndexType::Filled(11); + auto imageCenter = IndexType::Filled(11); PointType centerPoint; image->TransformIndexToPhysicalPoint(imageCenter, centerPoint); eulerTransform->SetCenter(centerPoint); diff --git a/Modules/Filtering/DistanceMap/include/itkApproximateSignedDistanceMapImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkApproximateSignedDistanceMapImageFilter.hxx index 6e3aa6f9b4a..b5ee059429b 100644 --- a/Modules/Filtering/DistanceMap/include/itkApproximateSignedDistanceMapImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkApproximateSignedDistanceMapImageFilter.hxx @@ -47,7 +47,7 @@ ApproximateSignedDistanceMapImageFilter::GenerateData // Calculate the largest possible distance in the output image. // this maximum is the distance from one corner of the image to the other. - OutputSizeType outputSize = oRegion.GetSize(); + OutputSizeType outputSize = oRegion.GetSize(); OutputSizeValueType maximumDistance = 0; for (unsigned int i = 0; i < InputImageDimension; ++i) diff --git a/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.h b/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.h index 60011675f7d..8edbc0fba2a 100644 --- a/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.h @@ -172,10 +172,10 @@ class ITK_TEMPLATE_EXPORT ContourDirectedMeanDistanceImageFilter : public ImageT typename DistanceMapType::Pointer m_DistanceMap{}; - Array m_MeanDistance{}; + Array m_MeanDistance{}; Array m_Count{}; - RealType m_ContourDirectedMeanDistance{}; - bool m_UseImageSpacing{ true }; + RealType m_ContourDirectedMeanDistance{}; + bool m_UseImageSpacing{ true }; }; } // end namespace itk diff --git a/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.hxx index 845712e5a55..27b4ba4ccad 100644 --- a/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.hxx @@ -147,7 +147,7 @@ ContourDirectedMeanDistanceImageFilter::AfterThreade // Find mean over all threads IdentifierType count = 0; - RealType sum{}; + RealType sum{}; for (ThreadIdType i = 0; i < numberOfWorkUnits; ++i) { @@ -168,7 +168,7 @@ template void ContourDirectedMeanDistanceImageFilter::ThreadedGenerateData( const RegionType & outputRegionForThread, - ThreadIdType threadId) + ThreadIdType threadId) { ZeroFluxNeumannBoundaryCondition nbc; diff --git a/Modules/Filtering/DistanceMap/include/itkContourMeanDistanceImageFilter.h b/Modules/Filtering/DistanceMap/include/itkContourMeanDistanceImageFilter.h index 65a4b17f16b..273fdd0a86f 100644 --- a/Modules/Filtering/DistanceMap/include/itkContourMeanDistanceImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkContourMeanDistanceImageFilter.h @@ -155,7 +155,7 @@ class ITK_TEMPLATE_EXPORT ContourMeanDistanceImageFilter : public ImageToImageFi private: RealType m_MeanDistance{}; - bool m_UseImageSpacing{ true }; + bool m_UseImageSpacing{ true }; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/DistanceMap/include/itkDanielssonDistanceMapImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkDanielssonDistanceMapImageFilter.hxx index b2a90391e2a..f0bb7c8a61e 100644 --- a/Modules/Filtering/DistanceMap/include/itkDanielssonDistanceMapImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkDanielssonDistanceMapImageFilter.hxx @@ -107,7 +107,7 @@ DanielssonDistanceMapImageFilter::Prep const typename OutputImageType::RegionType region = voronoiMap->GetRequestedRegion(); // find the largest of the image dimensions - SizeType size = region.GetSize(); + SizeType size = region.GetSize(); SizeValueType maxLength = 0; for (unsigned int dim = 0; dim < InputImageDimension; ++dim) @@ -116,7 +116,7 @@ DanielssonDistanceMapImageFilter::Prep } ImageRegionConstIteratorWithIndex it(inputImage, region); - ImageRegionIteratorWithIndex ot(voronoiMap, region); + ImageRegionIteratorWithIndex ot(voronoiMap, region); itkDebugMacro("PrepareData: Copy input to output"); if (m_InputIsBinary) @@ -195,14 +195,14 @@ DanielssonDistanceMapImageFilter::Comp { itkDebugMacro("ComputeVoronoiMap Start"); const VoronoiImagePointer voronoiMap = this->GetVoronoiMap(); - const OutputImagePointer distanceMap = this->GetDistanceMap(); - const VectorImagePointer distanceComponents = this->GetVectorDistanceMap(); + const OutputImagePointer distanceMap = this->GetDistanceMap(); + const VectorImagePointer distanceComponents = this->GetVectorDistanceMap(); const typename OutputImageType::RegionType region = voronoiMap->GetRequestedRegion(); ImageRegionIteratorWithIndex ot(voronoiMap, region); - ImageRegionIteratorWithIndex ct(distanceComponents, region); - ImageRegionIteratorWithIndex dt(distanceMap, region); + ImageRegionIteratorWithIndex ct(distanceComponents, region); + ImageRegionIteratorWithIndex dt(distanceMap, region); itkDebugMacro("ComputeVoronoiMap Region: " << region); while (!ot.IsAtEnd()) @@ -214,7 +214,7 @@ DanielssonDistanceMapImageFilter::Comp } OffsetType distanceVector = ct.Get(); - double distance = 0.0; + double distance = 0.0; if (m_UseImageSpacing) { for (unsigned int i = 0; i < InputImageDimension; ++i) @@ -249,13 +249,13 @@ DanielssonDistanceMapImageFilter::Comp template void DanielssonDistanceMapImageFilter::UpdateLocalDistance( - VectorImageType * components, - const IndexType & here, + VectorImageType * components, + const IndexType & here, const OffsetType & offset) { const IndexType there = here + offset; - OffsetType offsetValueHere = components->GetPixel(here); - OffsetType offsetValueThere = components->GetPixel(there) + offset; + OffsetType offsetValueHere = components->GetPixel(here); + OffsetType offsetValueThere = components->GetPixel(there) + offset; double norm1 = 0.0; double norm2 = 0.0; @@ -292,7 +292,7 @@ DanielssonDistanceMapImageFilter::Gene // Specify images and regions. const VoronoiImagePointer voronoiMap = this->GetVoronoiMap(); - const VectorImagePointer distanceComponents = this->GetVectorDistanceMap(); + const VectorImagePointer distanceComponents = this->GetVectorDistanceMap(); const RegionType region = voronoiMap->GetRequestedRegion(); @@ -334,7 +334,7 @@ DanielssonDistanceMapImageFilter::Gene // Each pixel is visited 2^InputImageDimension times, and the number // of visits per pixel needs to be computed for progress reporting. const SizeValueType visitsPerPixel = (1 << InputImageDimension); - SizeValueType updateVisits = region.GetNumberOfPixels() * visitsPerPixel / 10; + SizeValueType updateVisits = region.GetNumberOfPixels() * visitsPerPixel / 10; if (updateVisits < 1) { updateVisits = 1; @@ -395,7 +395,7 @@ DanielssonDistanceMapImageFilter::Gene template void DanielssonDistanceMapImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.h b/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.h index e9e57b7f159..d96ffc67e9a 100644 --- a/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.h @@ -181,14 +181,14 @@ class ITK_TEMPLATE_EXPORT DirectedHausdorffDistanceImageFilter : public ImageToI DistanceMapPointer m_DistanceMap{ nullptr }; - RealType m_MaxDistance{}; + RealType m_MaxDistance{}; IdentifierType m_PixelCount{}; CompensatedSummationType m_Sum{}; RealType m_DirectedHausdorffDistance{}; RealType m_AverageHausdorffDistance{}; - bool m_UseImageSpacing{ true }; + bool m_UseImageSpacing{ true }; std::mutex m_Mutex{}; }; // end of class diff --git a/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx index ef3f229c88d..a36c41ee61d 100644 --- a/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx @@ -82,7 +82,7 @@ DirectedHausdorffDistanceImageFilter::GenerateInputR if (this->GetInput2()) { const InputImage2Pointer image2 = const_cast(this->GetInput2()); - const RegionType region = image1->GetRequestedRegion(); + const RegionType region = image1->GetRequestedRegion(); image2->SetRequestedRegion(region); } } @@ -154,13 +154,13 @@ void DirectedHausdorffDistanceImageFilter::DynamicThreadedGenerateData( const RegionType & regionForThread) { - const auto * inputPtr1 = this->GetInput1(); - ImageRegionConstIterator it1(inputPtr1, regionForThread); + const auto * inputPtr1 = this->GetInput1(); + ImageRegionConstIterator it1(inputPtr1, regionForThread); ImageRegionConstIterator it2(m_DistanceMap, regionForThread); - RealType maxDistance{}; + RealType maxDistance{}; CompensatedSummationType sum = 0.0; - IdentifierType pixelCount = 0; + IdentifierType pixelCount = 0; // support progress methods/callbacks TotalProgressReporter progress(this, inputPtr1->GetRequestedRegion().GetNumberOfPixels()); diff --git a/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.hxx index 50ea481e038..8c69dd72e25 100644 --- a/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.hxx @@ -98,11 +98,11 @@ FastChamferDistanceImageFilter::GenerateDataND() constexpr int SIGN_MASK = 1; constexpr int INNER_MASK = 2; - auto r = MakeFilled::RadiusType>(1); + auto r = MakeFilled::RadiusType>(1); NeighborhoodIterator it(r, this->GetOutput(), m_RegionToProcess); const unsigned int center_voxel = it.Size() / 2; - const auto neighbor_type = make_unique_for_overwrite(it.Size()); + const auto neighbor_type = make_unique_for_overwrite(it.Size()); /** 1st Scan , using neighbors from center_voxel+1 to it.Size()-1 */ /** Precomputing the neighbor types */ diff --git a/Modules/Filtering/DistanceMap/include/itkHausdorffDistanceImageFilter.h b/Modules/Filtering/DistanceMap/include/itkHausdorffDistanceImageFilter.h index 63feaafccbb..7b5050cc482 100644 --- a/Modules/Filtering/DistanceMap/include/itkHausdorffDistanceImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkHausdorffDistanceImageFilter.h @@ -149,7 +149,7 @@ class ITK_TEMPLATE_EXPORT HausdorffDistanceImageFilter : public ImageToImageFilt private: RealType m_HausdorffDistance{}; RealType m_AverageHausdorffDistance{}; - bool m_UseImageSpacing{ true }; + bool m_UseImageSpacing{ true }; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.h b/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.h index d128087a398..8860534e1f4 100644 --- a/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.h @@ -186,19 +186,19 @@ class ITK_TEMPLATE_EXPORT IsoContourDistanceImageFilter : public ImageToImageFil using OutputNeighborhoodIteratorType = NeighborhoodIterator; void - ComputeValue(const InputNeighbordIteratorType & inNeigIt, - OutputNeighborhoodIteratorType & outNeigIt, - unsigned int center, + ComputeValue(const InputNeighbordIteratorType & inNeigIt, + OutputNeighborhoodIteratorType & outNeigIt, + unsigned int center, const std::vector & stride); private: PixelRealType m_LevelSetValue{}; - PixelType m_FarValue{}; + PixelType m_FarValue{}; InputSpacingType m_Spacing{}; - bool m_NarrowBanding{}; - NarrowBandPointer m_NarrowBand{}; + bool m_NarrowBanding{}; + NarrowBandPointer m_NarrowBand{}; std::vector m_NarrowBandRegion{}; std::mutex m_Mutex{}; diff --git a/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx index 19cfbac292a..6bfb3bd01ff 100644 --- a/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx @@ -120,7 +120,7 @@ ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION IsoContourDistanceImageFilter::ThreaderFullCallback(void * arg) { using WorkUnitInfo = MultiThreaderBase::WorkUnitInfo; - auto * workUnitInfo = static_cast(arg); + auto * workUnitInfo = static_cast(arg); const ThreadIdType workUnitID = workUnitInfo->WorkUnitID; const ThreadIdType workUnitCount = workUnitInfo->NumberOfWorkUnits; using FilterStruct = typename ImageSource::ThreadStruct; @@ -130,7 +130,7 @@ IsoContourDistanceImageFilter::ThreaderFullCallback(v // execute the actual method with appropriate output region // first find out how many pieces extent can be split into. typename TOutputImage::RegionType splitRegion; - const ThreadIdType total = filter->SplitRequestedRegion(workUnitID, workUnitCount, splitRegion); + const ThreadIdType total = filter->SplitRequestedRegion(workUnitID, workUnitCount, splitRegion); if (workUnitID < total) { @@ -157,7 +157,7 @@ IsoContourDistanceImageFilter::BeforeThreadedGenerate // itkImageSource::SplitRequestedRegion. Sometimes this number is less than // the number of threads requested. OutputImageRegionType dummy; - const unsigned int actualThreads = this->SplitRequestedRegion(0, this->GetNumberOfWorkUnits(), dummy); + const unsigned int actualThreads = this->SplitRequestedRegion(0, this->GetNumberOfWorkUnits(), dummy); m_Spacing = this->GetInput()->GetSpacing(); @@ -172,18 +172,18 @@ template void IsoContourDistanceImageFilter::ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, - ThreadIdType itkNotUsed(threadId)) + ThreadIdType itkNotUsed(threadId)) { using ImageConstPointer = typename InputImageType::ConstPointer; using OutputPointer = typename OutputImageType::Pointer; const ImageConstPointer inputPtr = this->GetInput(); - const OutputPointer outputPtr = this->GetOutput(); + const OutputPointer outputPtr = this->GetOutput(); using ConstIteratorType = ImageRegionConstIterator; using IteratorType = ImageRegionIterator; ConstIteratorType inIt(inputPtr, outputRegionForThread); - IteratorType outIt(outputPtr, outputRegionForThread); + IteratorType outIt(outputPtr, outputRegionForThread); const PixelType negFarValue = -m_FarValue; @@ -212,16 +212,16 @@ template void IsoContourDistanceImageFilter::ThreadedGenerateDataFull( const OutputImageRegionType & outputRegionForThread, - ThreadIdType itkNotUsed(threadId)) + ThreadIdType itkNotUsed(threadId)) { using ImageConstPointer = typename InputImageType::ConstPointer; using OutputPointer = typename OutputImageType::Pointer; const ImageConstPointer inputPtr = this->GetInput(); - const OutputPointer outputPtr = this->GetOutput(); + const OutputPointer outputPtr = this->GetOutput(); InputSizeType radiusIn; - SizeType radiusOut; + SizeType radiusOut; unsigned int n; @@ -233,7 +233,7 @@ IsoContourDistanceImageFilter::ThreadedGenerateDataFu // Define Neighborhood iterator ConstNeighborhoodIterator inNeigIt(radiusIn, inputPtr, outputRegionForThread); - NeighborhoodIterator outNeigIt(radiusOut, outputPtr, outputRegionForThread); + NeighborhoodIterator outNeigIt(radiusOut, outputPtr, outputRegionForThread); // Get Stride information to move across dimension std::vector stride(ImageDimension, 0); @@ -254,22 +254,22 @@ template void IsoContourDistanceImageFilter::ThreadedGenerateDataBand( const OutputImageRegionType & itkNotUsed(outputRegionForThread), - ThreadIdType threadId) + ThreadIdType threadId) { const typename InputImageType::ConstPointer inputPtr = this->GetInput(); - const typename OutputImageType::Pointer outputPtr = this->GetOutput(); + const typename OutputImageType::Pointer outputPtr = this->GetOutput(); // Tasks: // 1. Initialize whole output image (done in ThreadedGenerateData) // 2. Wait for threads (done in ThreadedGenerateData) // 3. Computation over the narrowband - auto bandIt = m_NarrowBandRegion[threadId].Begin; + auto bandIt = m_NarrowBandRegion[threadId].Begin; const auto bandEnd = m_NarrowBandRegion[threadId].End; unsigned int n; InputSizeType radiusIn; - SizeType radiusOut; + SizeType radiusOut; for (n = 0; n < ImageDimension; ++n) { radiusIn[n] = 2; @@ -277,7 +277,7 @@ IsoContourDistanceImageFilter::ThreadedGenerateDataBa } // Create neighborhood iterator - InputNeighbordIteratorType inNeigIt(radiusIn, inputPtr, inputPtr->GetRequestedRegion()); + InputNeighbordIteratorType inNeigIt(radiusIn, inputPtr, inputPtr->GetRequestedRegion()); OutputNeighborhoodIteratorType outNeigIt(radiusOut, outputPtr, outputPtr->GetRequestedRegion()); // Get Stride information to move across dimension @@ -302,13 +302,13 @@ IsoContourDistanceImageFilter::ThreadedGenerateDataBa template void -IsoContourDistanceImageFilter::ComputeValue(const InputNeighbordIteratorType & inNeigIt, - OutputNeighborhoodIteratorType & outNeigIt, - unsigned int center, +IsoContourDistanceImageFilter::ComputeValue(const InputNeighbordIteratorType & inNeigIt, + OutputNeighborhoodIteratorType & outNeigIt, + unsigned int center, const std::vector & stride) { const PixelRealType val0 = static_cast(inNeigIt.GetPixel(center)) - m_LevelSetValue; - const bool sign = (val0 > 0); + const bool sign = (val0 > 0); PixelRealType grad0[ImageDimension]; @@ -368,8 +368,8 @@ IsoContourDistanceImageFilter::ComputeValue(const Inp { const PixelRealType val = itk::Math::abs(grad[n]) * m_Spacing[n] / norm / diff; - const PixelRealType valNew0 = val0 * val; - const PixelRealType valNew1 = val1 * val; + const PixelRealType valNew0 = val0 * val; + const PixelRealType valNew1 = val1 * val; const std::lock_guard lockGuard(m_Mutex); if (itk::Math::abs(static_cast(valNew0)) < itk::Math::abs(static_cast(outNeigIt.GetNext(n, 0)))) { diff --git a/Modules/Filtering/DistanceMap/include/itkReflectiveImageRegionConstIterator.h b/Modules/Filtering/DistanceMap/include/itkReflectiveImageRegionConstIterator.h index 4f2944b4357..e166be71407 100644 --- a/Modules/Filtering/DistanceMap/include/itkReflectiveImageRegionConstIterator.h +++ b/Modules/Filtering/DistanceMap/include/itkReflectiveImageRegionConstIterator.h @@ -180,7 +180,7 @@ class ITK_TEMPLATE_EXPORT ReflectiveImageRegionConstIterator : public ImageConst FillOffsets(const OffsetValueType & value); private: - bool m_IsFirstPass[TImage::ImageDimension]{}; + bool m_IsFirstPass[TImage::ImageDimension]{}; OffsetType m_BeginOffset{}; OffsetType m_EndOffset{}; }; diff --git a/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.hxx index 8061e30f59f..822894a39fd 100644 --- a/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.hxx @@ -178,7 +178,7 @@ SignedDanielssonDistanceMapImageFilter template void SignedDanielssonDistanceMapImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); os << indent << "Signed Danielson Distance: " << std::endl; diff --git a/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.h b/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.h index 3aceaad932e..f1db37b1aed 100644 --- a/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.h @@ -185,10 +185,10 @@ class ITK_TEMPLATE_EXPORT SignedMaurerDistanceMapImageFilter : public ImageToIma private: void - Voronoi(unsigned int, OutputIndexType idx, OutputImageType * output); + Voronoi(unsigned int, OutputIndexType idx, OutputImageType * output); bool Remove(OutputPixelType, OutputPixelType, OutputPixelType, OutputPixelType, OutputPixelType, OutputPixelType); - InputPixelType m_BackgroundValue{}; + InputPixelType m_BackgroundValue{}; InputSpacingType m_Spacing{}; unsigned int m_CurrentDimension{ 0 }; diff --git a/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.hxx index 81d97432a3b..bc4ffb41b99 100644 --- a/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.hxx @@ -40,8 +40,8 @@ SignedMaurerDistanceMapImageFilter::SignedMaurerDista template unsigned int -SignedMaurerDistanceMapImageFilter::SplitRequestedRegion(unsigned int i, - unsigned int num, +SignedMaurerDistanceMapImageFilter::SplitRequestedRegion(unsigned int i, + unsigned int num, OutputImageRegionType & splitRegion) { // Get the output pointer @@ -53,7 +53,7 @@ SignedMaurerDistanceMapImageFilter::SplitRequestedReg const OutputSizeType & requestedRegionSize = splitRegion.GetSize(); OutputIndexType splitIndex = splitRegion.GetIndex(); - OutputSizeType splitSize = splitRegion.GetSize(); + OutputSizeType splitSize = splitRegion.GetSize(); // split on the outermost dimension available // and avoid the current dimension @@ -71,7 +71,7 @@ SignedMaurerDistanceMapImageFilter::SplitRequestedReg // determine the actual number of pieces that will be generated auto range = static_cast(requestedRegionSize[splitAxis]); - auto valuesPerThread = static_cast(std::ceil(range / static_cast(num))); + auto valuesPerThread = static_cast(std::ceil(range / static_cast(num))); const unsigned int maxThreadIdUsed = static_cast(std::ceil(range / static_cast(valuesPerThread))) - 1; @@ -103,7 +103,7 @@ SignedMaurerDistanceMapImageFilter::GenerateData() { const ThreadIdType numberOfWorkUnits = this->GetNumberOfWorkUnits(); - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); const InputImageType * inputPtr = this->GetInput(); m_InputCache = this->GetInput(); @@ -167,13 +167,13 @@ template void SignedMaurerDistanceMapImageFilter::ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) + ThreadIdType threadId) { OutputImageType * outputImage = this->GetOutput(); const InputRegionType region = outputRegionForThread; - InputSizeType size = region.GetSize(); - InputIndexType startIndex = outputRegionForThread.GetIndex(); + InputSizeType size = region.GetSize(); + InputIndexType startIndex = outputRegionForThread.GetIndex(); OutputImageType * outputPtr = this->GetOutput(); @@ -210,7 +210,7 @@ SignedMaurerDistanceMapImageFilter::ThreadedGenerateD // This variable provides the amount by which to divide the dimensionless index in order to get the index for each // dimension. vnl_vector k(InputImageDimension - 1); - unsigned int count = 0; + unsigned int count = 0; k[count] = 1; for (unsigned int d = m_CurrentDimension + InputImageDimension - 1; d > m_CurrentDimension + 1; d--) { @@ -223,10 +223,10 @@ SignedMaurerDistanceMapImageFilter::ThreadedGenerateD // It must be divided by each dimension size in order to get the index for that dimension. // The result of this division is the offsetIndex, which is the index offset relative to the region of this thread. // The true pixel location (idx) is provided by the sum of the offsetIndex and the startIndex. - InputSizeValueType index; - OutputIndexType offsetIndex{}; + InputSizeValueType index; + OutputIndexType offsetIndex{}; const InputSizeValueType tempRow = NumberOfRows[m_CurrentDimension]; - OutputIndexType idx{}; + OutputIndexType idx{}; for (InputSizeValueType n = 0; n < tempRow; ++n) { @@ -255,7 +255,7 @@ SignedMaurerDistanceMapImageFilter::ThreadedGenerateD const typename OutputImageType::RegionType outputRegion = outputRegionForThread; OutputIterator Ot(outputPtr, outputRegion); - InputIterator It(m_InputCache, outputRegion); + InputIterator It(m_InputCache, outputRegion); Ot.GoToBegin(); It.GoToBegin(); @@ -307,11 +307,11 @@ SignedMaurerDistanceMapImageFilter::ThreadedGenerateD template void -SignedMaurerDistanceMapImageFilter::Voronoi(unsigned int d, - OutputIndexType idx, +SignedMaurerDistanceMapImageFilter::Voronoi(unsigned int d, + OutputIndexType idx, OutputImageType * output) { - const OutputRegionType oRegion = output->GetRequestedRegion(); + const OutputRegionType oRegion = output->GetRequestedRegion(); const OutputSizeValueType nd = oRegion.GetSize()[d]; vnl_vector g(nd, 0); @@ -319,7 +319,7 @@ SignedMaurerDistanceMapImageFilter::Voronoi(unsigned const InputRegionType iRegion = m_InputCache->GetRequestedRegion(); - InputIndexType startIndex = iRegion.GetIndex(); + InputIndexType startIndex = iRegion.GetIndex(); OutputPixelType di; diff --git a/Modules/Filtering/DistanceMap/test/itkApproximateSignedDistanceMapImageFilterTest.cxx b/Modules/Filtering/DistanceMap/test/itkApproximateSignedDistanceMapImageFilterTest.cxx index dcd7a4daf3f..a6803c9c639 100644 --- a/Modules/Filtering/DistanceMap/test/itkApproximateSignedDistanceMapImageFilterTest.cxx +++ b/Modules/Filtering/DistanceMap/test/itkApproximateSignedDistanceMapImageFilterTest.cxx @@ -32,7 +32,7 @@ template double SimpleSignedDistance(const TPoint & p) { - auto center = itk::MakeFilled(32); + auto center = itk::MakeFilled(32); constexpr double radius = 16; double accum = 0.0; @@ -70,11 +70,11 @@ itkApproximateSignedDistanceMapImageFilterTest(int argc, char * argv[]) // Make a binary input image based on the signed distance function // using the inside and outside values - const InputPixelType insideValue = std::stoi(argv[1]); + const InputPixelType insideValue = std::stoi(argv[1]); constexpr InputPixelType outsideValue = 0; - auto image = InputImageType::New(); - auto size = InputImageType::SizeType::Filled(64); + auto image = InputImageType::New(); + auto size = InputImageType::SizeType::Filled(64); const InputImageType::RegionType region(size); image->SetRegions(region); diff --git a/Modules/Filtering/DistanceMap/test/itkContourDirectedMeanDistanceImageFilterTest.cxx b/Modules/Filtering/DistanceMap/test/itkContourDirectedMeanDistanceImageFilterTest.cxx index d30138d4ed4..2053ab17f19 100644 --- a/Modules/Filtering/DistanceMap/test/itkContourDirectedMeanDistanceImageFilterTest.cxx +++ b/Modules/Filtering/DistanceMap/test/itkContourDirectedMeanDistanceImageFilterTest.cxx @@ -64,7 +64,7 @@ itkContourDirectedMeanDistanceImageFilterTest(int, char *[]) region2.SetIndex(index); itk::ImageRegionIterator it1(image1, region1); - Pixel1Type count{}; + Pixel1Type count{}; while (!it1.IsAtEnd()) { it1.Set(++count); @@ -99,7 +99,7 @@ itkContourDirectedMeanDistanceImageFilterTest(int, char *[]) // Check results constexpr FilterType::RealType trueDistance = 8.37831; - const FilterType::RealType distance = filter->GetContourDirectedMeanDistance(); + const FilterType::RealType distance = filter->GetContourDirectedMeanDistance(); std::cout << " True distance: " << trueDistance << std::endl; std::cout << " Computed distance: " << distance << std::endl; @@ -128,7 +128,7 @@ itkContourDirectedMeanDistanceImageFilterTest(int, char *[]) // Check results constexpr FilterType::RealType trueDistance = 4.2053; - const FilterType::RealType distance = filter->GetContourDirectedMeanDistance(); + const FilterType::RealType distance = filter->GetContourDirectedMeanDistance(); std::cout << " True distance: " << trueDistance << std::endl; std::cout << " Computed distance: " << distance << std::endl; diff --git a/Modules/Filtering/DistanceMap/test/itkContourMeanDistanceImageFilterTest.cxx b/Modules/Filtering/DistanceMap/test/itkContourMeanDistanceImageFilterTest.cxx index 105e5e72974..b1fe5640fb8 100644 --- a/Modules/Filtering/DistanceMap/test/itkContourMeanDistanceImageFilterTest.cxx +++ b/Modules/Filtering/DistanceMap/test/itkContourMeanDistanceImageFilterTest.cxx @@ -72,7 +72,7 @@ itkContourMeanDistanceImageFilterTest(int argc, char * argv[]) region2.SetIndex(index); itk::ImageRegionIterator it1(image1, region1); - Pixel1Type count{}; + Pixel1Type count{}; while (!it1.IsAtEnd()) { it1.Set(++count); @@ -130,7 +130,7 @@ itkContourMeanDistanceImageFilterTest(int argc, char * argv[]) // check results constexpr FilterType::RealType trueDistance = 8.07158; - const FilterType::RealType distance = filter->GetMeanDistance(); + const FilterType::RealType distance = filter->GetMeanDistance(); std::cout << " True distance: " << trueDistance << std::endl; std::cout << " Computed distance: " << distance << std::endl; @@ -168,7 +168,7 @@ itkContourMeanDistanceImageFilterTest(int argc, char * argv[]) // check results constexpr FilterType::RealType trueDistance = 8.07158 / 2; - const FilterType::RealType distance = filter->GetMeanDistance(); + const FilterType::RealType distance = filter->GetMeanDistance(); std::cout << " True distance: " << trueDistance << std::endl; std::cout << " Computed distance: " << distance << std::endl; if (itk::Math::abs(trueDistance - distance) > 0.5) diff --git a/Modules/Filtering/DistanceMap/test/itkDanielssonDistanceMapImageFilterTest.cxx b/Modules/Filtering/DistanceMap/test/itkDanielssonDistanceMapImageFilterTest.cxx index 90b0a782d6f..32fda356d0c 100644 --- a/Modules/Filtering/DistanceMap/test/itkDanielssonDistanceMapImageFilterTest.cxx +++ b/Modules/Filtering/DistanceMap/test/itkDanielssonDistanceMapImageFilterTest.cxx @@ -39,8 +39,8 @@ itkDanielssonDistanceMapImageFilterTest(int, char *[]) /* Allocate the 2D image */ constexpr myImageType2D1::SizeType size2D = { { 9, 9 } }; - myImageType2D1::IndexType index2D = { { 0, 0 } }; - const myImageType2D1::RegionType region2D{ index2D, size2D }; + myImageType2D1::IndexType index2D = { { 0, 0 } }; + const myImageType2D1::RegionType region2D{ index2D, size2D }; auto inputImage2D = myImageType2D1::New(); inputImage2D->SetRegions(region2D); @@ -131,7 +131,7 @@ itkDanielssonDistanceMapImageFilterTest(int, char *[]) ITK_TRY_EXPECT_NO_EXCEPTION(filter2D->Update()); - const double distance2 = outputDistance2D->GetPixel(index); + const double distance2 = outputDistance2D->GetPixel(index); constexpr myImageType2D2::PixelType epsilon = 1e-5; if (itk::Math::abs(distance2 - distance1 * distance1) > epsilon) { @@ -186,10 +186,10 @@ itkDanielssonDistanceMapImageFilterTest(int, char *[]) // Allocate the 3D image using ImageType3D = itk::Image; - constexpr ImageType3D::SizeType size3D = { { 200, 200, 200 } }; + constexpr ImageType3D::SizeType size3D = { { 200, 200, 200 } }; constexpr ImageType3D::IndexType index3D = { { 0, 0 } }; - const ImageType3D::RegionType region3D{ index3D, size3D }; - auto inputImage3D = ImageType3D::New(); + const ImageType3D::RegionType region3D{ index3D, size3D }; + auto inputImage3D = ImageType3D::New(); inputImage3D->SetRegions(region3D); inputImage3D->Allocate(); inputImage3D->FillBuffer(1); @@ -197,7 +197,7 @@ itkDanielssonDistanceMapImageFilterTest(int, char *[]) // Set a few pixels in the middle of the image to 0. These are the foreground pixels for which the distance will be // solved. ImageType3D::IndexType foregroundIndex; - ImageType3D::SizeType foregroundSize; + ImageType3D::SizeType foregroundSize; for (unsigned int i = 0; i < 3; ++i) { foregroundSize[i] = 5; diff --git a/Modules/Filtering/DistanceMap/test/itkDirectedHausdorffDistanceImageFilterTest1.cxx b/Modules/Filtering/DistanceMap/test/itkDirectedHausdorffDistanceImageFilterTest1.cxx index 57546d8d7c3..b9fddbd3d53 100644 --- a/Modules/Filtering/DistanceMap/test/itkDirectedHausdorffDistanceImageFilterTest1.cxx +++ b/Modules/Filtering/DistanceMap/test/itkDirectedHausdorffDistanceImageFilterTest1.cxx @@ -64,7 +64,7 @@ itkDirectedHausdorffDistanceImageFilterTest1(int, char *[]) region2.SetIndex(index); itk::ImageRegionIterator it1(image1, region1); - Pixel1Type count{}; + Pixel1Type count{}; while (!it1.IsAtEnd()) { it1.Set(++count); @@ -84,7 +84,7 @@ itkDirectedHausdorffDistanceImageFilterTest1(int, char *[]) // Compute the directed Hausdorff distance h(image1,image2) { using FilterType = itk::DirectedHausdorffDistanceImageFilter; - auto filter = FilterType::New(); + auto filter = FilterType::New(); const itk::SimpleFilterWatcher watcher(filter, "filter"); filter->SetInput1(image1); diff --git a/Modules/Filtering/DistanceMap/test/itkFastChamferDistanceImageFilterTest.cxx b/Modules/Filtering/DistanceMap/test/itkFastChamferDistanceImageFilterTest.cxx index 95a4a8dd3bc..537db997980 100644 --- a/Modules/Filtering/DistanceMap/test/itkFastChamferDistanceImageFilterTest.cxx +++ b/Modules/Filtering/DistanceMap/test/itkFastChamferDistanceImageFilterTest.cxx @@ -26,7 +26,7 @@ template double SimpleSignedDistance(const TPoint & p) { - auto center = itk::MakeFilled(16); + auto center = itk::MakeFilled(16); constexpr double radius = 10; double accum = 0.0; @@ -66,8 +66,8 @@ FastChamferDistanceImageFilterTest(unsigned int iPositive, unsigned int iNegativ using ImageType = itk::Image; using PointType = itk::Point; - auto size = ImageType::SizeType::Filled(32); - const typename ImageType::IndexType index{}; + auto size = ImageType::SizeType::Filled(32); + const typename ImageType::IndexType index{}; const typename ImageType::RegionType region{ index, size }; auto inputImage = ImageType::New(); @@ -121,7 +121,7 @@ FastChamferDistanceImageFilterTest(unsigned int iPositive, unsigned int iNegativ std::cout << "Band size: " << band->Size() << std::endl; // Loop through the band - auto itNB = band->Begin(); + auto itNB = band->Begin(); const auto itNBend = band->End(); // BandNodeType *tmp; diff --git a/Modules/Filtering/DistanceMap/test/itkHausdorffDistanceImageFilterTest.cxx b/Modules/Filtering/DistanceMap/test/itkHausdorffDistanceImageFilterTest.cxx index 7405cfc79cc..54a4626e9f2 100644 --- a/Modules/Filtering/DistanceMap/test/itkHausdorffDistanceImageFilterTest.cxx +++ b/Modules/Filtering/DistanceMap/test/itkHausdorffDistanceImageFilterTest.cxx @@ -70,7 +70,7 @@ itkHausdorffDistanceImageFilterTest(int argc, char * argv[]) region2.SetIndex(index); itk::ImageRegionIterator it1(image1, region1); - Pixel1Type count{}; + Pixel1Type count{}; while (!it1.IsAtEnd()) { it1.Set(++count); diff --git a/Modules/Filtering/DistanceMap/test/itkIsoContourDistanceImageFilterTest.cxx b/Modules/Filtering/DistanceMap/test/itkIsoContourDistanceImageFilterTest.cxx index 3ebebf9acec..b0020247077 100644 --- a/Modules/Filtering/DistanceMap/test/itkIsoContourDistanceImageFilterTest.cxx +++ b/Modules/Filtering/DistanceMap/test/itkIsoContourDistanceImageFilterTest.cxx @@ -47,7 +47,7 @@ template double SimpleSignedDistance(const TPoint & p) { - auto center = itk::MakeFilled(50); + auto center = itk::MakeFilled(50); constexpr double radius = 19.5; double accum = 0.0; @@ -72,8 +72,8 @@ itkIsoContourDistanceImageFilterTest(int, char *[]) using PointType = itk::Point; // Fill an input image with simple signed distance function - auto image = ImageType::New(); - auto size = ImageType::SizeType::Filled(128); + auto image = ImageType::New(); + auto size = ImageType::SizeType::Filled(128); const ImageType::RegionType region(size); image->SetRegions(region); @@ -111,7 +111,7 @@ itkIsoContourDistanceImageFilterTest(int, char *[]) return EXIT_FAILURE; } - ShowProgressObject progressWatch(isocontour); + ShowProgressObject progressWatch(isocontour); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); diff --git a/Modules/Filtering/DistanceMap/test/itkReflectiveImageRegionIteratorTest.cxx b/Modules/Filtering/DistanceMap/test/itkReflectiveImageRegionIteratorTest.cxx index d04a1a60624..c156d15b5d8 100644 --- a/Modules/Filtering/DistanceMap/test/itkReflectiveImageRegionIteratorTest.cxx +++ b/Modules/Filtering/DistanceMap/test/itkReflectiveImageRegionIteratorTest.cxx @@ -49,7 +49,7 @@ itkReflectiveImageRegionIteratorTest(int, char *[]) visitImage->SetRegions(region); visitImage->Allocate(); - IteratorType nit(myImage, region); + IteratorType nit(myImage, region); IteratorVisitsType vit(visitImage, region); // Store information on the Image @@ -81,7 +81,7 @@ itkReflectiveImageRegionIteratorTest(int, char *[]) rvt.GoToBegin(); while (!rit.IsAtEnd()) { - const PixelType value = rit.Get(); + const PixelType value = rit.Get(); const ImageType::IndexType index = rit.GetIndex(); rvt.Set(rvt.Get() + 1); if (value != index) @@ -97,7 +97,7 @@ itkReflectiveImageRegionIteratorTest(int, char *[]) // Each element should be visited 2 ^ # of dimensions // each left shift = multiply by 2 constexpr int visits = (1 << (ImageType::ImageDimension)); - int failed = 0; + int failed = 0; // Verify the number of visits vit.GoToBegin(); diff --git a/Modules/Filtering/DistanceMap/test/itkSignedDanielssonDistanceMapImageFilterTest11.cxx b/Modules/Filtering/DistanceMap/test/itkSignedDanielssonDistanceMapImageFilterTest11.cxx index bd7ccb99e3f..2b9edc23ccc 100644 --- a/Modules/Filtering/DistanceMap/test/itkSignedDanielssonDistanceMapImageFilterTest11.cxx +++ b/Modules/Filtering/DistanceMap/test/itkSignedDanielssonDistanceMapImageFilterTest11.cxx @@ -36,8 +36,8 @@ itkSignedDanielssonDistanceMapImageFilterTest11(int, char *[]) /* Allocate the 2D image */ constexpr myImageType2D1::SizeType size2D = { { 5, 5 } }; - myImageType2D1::IndexType index2D = { { 0, 0 } }; - const myImageType2D1::RegionType region2D{ index2D, size2D }; + myImageType2D1::IndexType index2D = { { 0, 0 } }; + const myImageType2D1::RegionType region2D{ index2D, size2D }; auto inputImage2D = myImageType2D1::New(); inputImage2D->SetRegions(region2D); diff --git a/Modules/Filtering/DistanceMap/test/itkSignedMaurerDistanceMapImageFilterTest11.cxx b/Modules/Filtering/DistanceMap/test/itkSignedMaurerDistanceMapImageFilterTest11.cxx index f5450b40bed..e2331adbe3b 100644 --- a/Modules/Filtering/DistanceMap/test/itkSignedMaurerDistanceMapImageFilterTest11.cxx +++ b/Modules/Filtering/DistanceMap/test/itkSignedMaurerDistanceMapImageFilterTest11.cxx @@ -36,8 +36,8 @@ itkSignedMaurerDistanceMapImageFilterTest11(int, char *[]) /* Allocate the 2D image */ constexpr myImageType2D1::SizeType size2D = { { 5, 5 } }; - myImageType2D1::IndexType index2D = { { 0, 0 } }; - myImageType2D1::RegionType region2D; + myImageType2D1::IndexType index2D = { { 0, 0 } }; + myImageType2D1::RegionType region2D; region2D.SetSize(size2D); region2D.SetIndex(index2D); diff --git a/Modules/Filtering/FFT/include/itkComplexToComplex1DFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkComplexToComplex1DFFTImageFilter.hxx index 50aeac6fe0b..121f666bd1b 100644 --- a/Modules/Filtering/FFT/include/itkComplexToComplex1DFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkComplexToComplex1DFFTImageFilter.hxx @@ -36,7 +36,7 @@ ComplexToComplex1DFFTImageFilter::GenerateInputReques Superclass::GenerateInputRequestedRegion(); // get pointers to the inputs - const typename InputImageType::Pointer inputPtr = const_cast(this->GetInput()); + const typename InputImageType::Pointer inputPtr = const_cast(this->GetInput()); const typename OutputImageType::Pointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) @@ -51,11 +51,11 @@ ComplexToComplex1DFFTImageFilter::GenerateInputReques OutputIndexType outputRequestedRegionStartIndex = outputPtr->GetRequestedRegion().GetIndex(); //// the regions other than the fft direction are fine - typename InputImageType::SizeType inputRequestedRegionSize = outputRequestedRegionSize; + typename InputImageType::SizeType inputRequestedRegionSize = outputRequestedRegionSize; typename InputImageType::IndexType inputRequestedRegionStartIndex = outputRequestedRegionStartIndex; // we but need all of the input in the fft direction - const unsigned int direction = this->m_Direction; + const unsigned int direction = this->m_Direction; const typename InputImageType::SizeType & inputLargeSize = inputPtr->GetLargestPossibleRegion().GetSize(); inputRequestedRegionSize[direction] = inputLargeSize[direction]; const typename InputImageType::IndexType & inputLargeIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); @@ -83,7 +83,7 @@ ComplexToComplex1DFFTImageFilter::EnlargeOutputReques ConstOutputIndexType requestedIndex = outputPtr->GetRequestedRegion().GetIndex(); ConstOutputIndexType outputLargeIndex = outputPtr->GetLargestPossibleRegion().GetIndex(); - typename OutputImageType::SizeType enlargedSize = requestedSize; + typename OutputImageType::SizeType enlargedSize = requestedSize; typename OutputImageType::IndexType enlargedIndex = requestedIndex; enlargedSize[this->m_Direction] = outputLargeSize[this->m_Direction]; enlargedIndex[this->m_Direction] = outputLargeIndex[this->m_Direction]; diff --git a/Modules/Filtering/FFT/include/itkFFTPadImageFilter.hxx b/Modules/Filtering/FFT/include/itkFFTPadImageFilter.hxx index c5bd1320fbe..29d26aa66ec 100644 --- a/Modules/Filtering/FFT/include/itkFFTPadImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkFFTPadImageFilter.hxx @@ -47,11 +47,11 @@ FFTPadImageFilter::GenerateOutputInformation() Superclass::GenerateOutputInformation(); const InputImageType * input0 = this->GetInput(); - OutputImageType * output0 = this->GetOutput(); + OutputImageType * output0 = this->GetOutput(); const RegionType region0 = input0->GetLargestPossibleRegion(); - SizeType size; - IndexType index; + SizeType size; + IndexType index; for (unsigned int i = 0; i < ImageDimension; ++i) { SizeValueType padSize = 0; diff --git a/Modules/Filtering/FFT/include/itkFFTWCommon.h b/Modules/Filtering/FFT/include/itkFFTWCommon.h index 81b0ea00a7b..a0489284d80 100644 --- a/Modules/Filtering/FFT/include/itkFFTWCommon.h +++ b/Modules/Filtering/FFT/include/itkFFTWCommon.h @@ -79,24 +79,24 @@ class Proxy # endif static PlanType - Plan_dft_c2r_1d(int n, + Plan_dft_c2r_1d(int n, ComplexType * in, - PixelType * out, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + PixelType * out, + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { return Plan_dft_c2r(1, &n, in, out, flags, threads, canDestroyInput); } static PlanType - Plan_dft_c2r_2d(int nx, - int ny, + Plan_dft_c2r_2d(int nx, + int ny, ComplexType * in, - PixelType * out, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + PixelType * out, + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { int sizes[2]; sizes[0] = nx; @@ -106,14 +106,14 @@ class Proxy } static PlanType - Plan_dft_c2r_3d(int nx, - int ny, - int nz, + Plan_dft_c2r_3d(int nx, + int ny, + int nz, ComplexType * in, - PixelType * out, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + PixelType * out, + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { int sizes[3]; sizes[0] = nx; @@ -124,13 +124,13 @@ class Proxy } static PlanType - Plan_dft_c2r(int rank, - const int * n, - ComplexType * in, - PixelType * out, - unsigned int flags, + Plan_dft_c2r(int rank, + const int * n, + ComplexType * in, + PixelType * out, + unsigned int flags, [[maybe_unused]] int threads = 1, - bool canDestroyInput = false) + bool canDestroyInput = false) { # ifndef ITK_USE_CUFFTW const std::lock_guard lockGuard(FFTWGlobalConfiguration::GetLockMutex()); @@ -176,24 +176,24 @@ class Proxy static PlanType - Plan_dft_r2c_1d(int n, - PixelType * in, + Plan_dft_r2c_1d(int n, + PixelType * in, ComplexType * out, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { return Plan_dft_r2c(1, &n, in, out, flags, threads, canDestroyInput); } static PlanType - Plan_dft_r2c_2d(int nx, - int ny, - PixelType * in, + Plan_dft_r2c_2d(int nx, + int ny, + PixelType * in, ComplexType * out, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { int sizes[2]; sizes[0] = nx; @@ -203,14 +203,14 @@ class Proxy } static PlanType - Plan_dft_r2c_3d(int nx, - int ny, - int nz, - PixelType * in, + Plan_dft_r2c_3d(int nx, + int ny, + int nz, + PixelType * in, ComplexType * out, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { int sizes[3]; sizes[0] = nx; @@ -221,13 +221,13 @@ class Proxy } static PlanType - Plan_dft_r2c(int rank, - const int * n, - PixelType * in, - ComplexType * out, - unsigned int flags, + Plan_dft_r2c(int rank, + const int * n, + PixelType * in, + ComplexType * out, + unsigned int flags, [[maybe_unused]] int threads = 1, - bool canDestroyInput = false) + bool canDestroyInput = false) { // # ifndef ITK_USE_CUFFTW @@ -273,26 +273,26 @@ class Proxy } static PlanType - Plan_dft_1d(int n, + Plan_dft_1d(int n, ComplexType * in, ComplexType * out, - int sign, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + int sign, + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { return Plan_dft(1, &n, in, out, sign, flags, threads, canDestroyInput); } static PlanType - Plan_dft_2d(int nx, - int ny, + Plan_dft_2d(int nx, + int ny, ComplexType * in, ComplexType * out, - int sign, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + int sign, + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { int sizes[2]; sizes[0] = nx; @@ -302,15 +302,15 @@ class Proxy } static PlanType - Plan_dft_3d(int nx, - int ny, - int nz, + Plan_dft_3d(int nx, + int ny, + int nz, ComplexType * in, ComplexType * out, - int sign, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + int sign, + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { int sizes[3]; sizes[0] = nx; @@ -321,14 +321,14 @@ class Proxy } static PlanType - Plan_dft(int rank, - const int * n, - ComplexType * in, - ComplexType * out, - int sign, - unsigned int flags, + Plan_dft(int rank, + const int * n, + ComplexType * in, + ComplexType * out, + int sign, + unsigned int flags, [[maybe_unused]] int threads = 1, - bool canDestroyInput = false) + bool canDestroyInput = false) { # ifndef ITK_USE_CUFFTW const std::lock_guard lockGuard(FFTWGlobalConfiguration::GetLockMutex()); @@ -409,24 +409,24 @@ class Proxy # endif static PlanType - Plan_dft_c2r_1d(int n, + Plan_dft_c2r_1d(int n, ComplexType * in, - PixelType * out, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + PixelType * out, + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { return Plan_dft_c2r(1, &n, in, out, flags, threads, canDestroyInput); } static PlanType - Plan_dft_c2r_2d(int nx, - int ny, + Plan_dft_c2r_2d(int nx, + int ny, ComplexType * in, - PixelType * out, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + PixelType * out, + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { int sizes[2]; sizes[0] = nx; @@ -436,14 +436,14 @@ class Proxy } static PlanType - Plan_dft_c2r_3d(int nx, - int ny, - int nz, + Plan_dft_c2r_3d(int nx, + int ny, + int nz, ComplexType * in, - PixelType * out, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + PixelType * out, + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { int sizes[3]; sizes[0] = nx; @@ -454,13 +454,13 @@ class Proxy } static PlanType - Plan_dft_c2r(int rank, - const int * n, - ComplexType * in, - PixelType * out, - unsigned int flags, + Plan_dft_c2r(int rank, + const int * n, + ComplexType * in, + PixelType * out, + unsigned int flags, [[maybe_unused]] int threads = 1, - bool canDestroyInput = false) + bool canDestroyInput = false) { # ifndef ITK_USE_CUFFTW const std::lock_guard lockGuard(FFTWGlobalConfiguration::GetLockMutex()); @@ -506,24 +506,24 @@ class Proxy static PlanType - Plan_dft_r2c_1d(int n, - PixelType * in, + Plan_dft_r2c_1d(int n, + PixelType * in, ComplexType * out, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { return Plan_dft_r2c(1, &n, in, out, flags, threads, canDestroyInput); } static PlanType - Plan_dft_r2c_2d(int nx, - int ny, - PixelType * in, + Plan_dft_r2c_2d(int nx, + int ny, + PixelType * in, ComplexType * out, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { int sizes[2]; sizes[0] = nx; @@ -533,14 +533,14 @@ class Proxy } static PlanType - Plan_dft_r2c_3d(int nx, - int ny, - int nz, - PixelType * in, + Plan_dft_r2c_3d(int nx, + int ny, + int nz, + PixelType * in, ComplexType * out, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { int sizes[3]; sizes[0] = nx; @@ -551,13 +551,13 @@ class Proxy } static PlanType - Plan_dft_r2c(int rank, - const int * n, - PixelType * in, - ComplexType * out, - unsigned int flags, + Plan_dft_r2c(int rank, + const int * n, + PixelType * in, + ComplexType * out, + unsigned int flags, [[maybe_unused]] int threads = 1, - bool canDestroyInput = false) + bool canDestroyInput = false) { # ifndef ITK_USE_CUFFTW const std::lock_guard lockGuard(FFTWGlobalConfiguration::GetLockMutex()); @@ -602,26 +602,26 @@ class Proxy } static PlanType - Plan_dft_1d(int n, + Plan_dft_1d(int n, ComplexType * in, ComplexType * out, - int sign, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + int sign, + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { return Plan_dft(1, &n, in, out, sign, flags, threads, canDestroyInput); } static PlanType - Plan_dft_2d(int nx, - int ny, + Plan_dft_2d(int nx, + int ny, ComplexType * in, ComplexType * out, - int sign, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + int sign, + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { int sizes[2]; sizes[0] = nx; @@ -631,15 +631,15 @@ class Proxy } static PlanType - Plan_dft_3d(int nx, - int ny, - int nz, + Plan_dft_3d(int nx, + int ny, + int nz, ComplexType * in, ComplexType * out, - int sign, - unsigned int flags, - int threads = 1, - bool canDestroyInput = false) + int sign, + unsigned int flags, + int threads = 1, + bool canDestroyInput = false) { int sizes[3]; sizes[0] = nx; @@ -650,14 +650,14 @@ class Proxy } static PlanType - Plan_dft(int rank, - const int * n, - ComplexType * in, - ComplexType * out, - int sign, - unsigned int flags, + Plan_dft(int rank, + const int * n, + ComplexType * in, + ComplexType * out, + int sign, + unsigned int flags, [[maybe_unused]] int threads = 1, - bool canDestroyInput = false) + bool canDestroyInput = false) { # ifndef ITK_USE_CUFFTW const std::lock_guard lockGuard(FFTWGlobalConfiguration::GetLockMutex()); diff --git a/Modules/Filtering/FFT/include/itkFFTWCommonExtended.h b/Modules/Filtering/FFT/include/itkFFTWCommonExtended.h index 5594042729e..f4bdec11009 100644 --- a/Modules/Filtering/FFT/include/itkFFTWCommonExtended.h +++ b/Modules/Filtering/FFT/include/itkFFTWCommonExtended.h @@ -72,11 +72,11 @@ class ComplexToComplexProxy return plan; } static PlanType - Plan_dft_c2r_2d(int nx, - int ny, - ComplexType * in, - PixelType * out, - unsigned int flags, + Plan_dft_c2r_2d(int nx, + int ny, + ComplexType * in, + PixelType * out, + unsigned int flags, [[maybe_unused]] int threads = 1) { # ifndef ITK_USE_CUFFTW @@ -87,12 +87,12 @@ class ComplexToComplexProxy return plan; } static PlanType - Plan_dft_c2r_3d(int nx, - int ny, - int nz, - ComplexType * in, - PixelType * out, - unsigned int flags, + Plan_dft_c2r_3d(int nx, + int ny, + int nz, + ComplexType * in, + PixelType * out, + unsigned int flags, [[maybe_unused]] int threads = 1) { # ifndef ITK_USE_CUFFTW @@ -103,11 +103,11 @@ class ComplexToComplexProxy return plan; } static PlanType - Plan_dft_c2r(int rank, - const int * n, - ComplexType * in, - PixelType * out, - unsigned int flags, + Plan_dft_c2r(int rank, + const int * n, + ComplexType * in, + PixelType * out, + unsigned int flags, [[maybe_unused]] int threads = 1) { # ifndef ITK_USE_CUFFTW @@ -129,11 +129,11 @@ class ComplexToComplexProxy return plan; } static PlanType - Plan_dft_r2c_2d(int nx, - int ny, - PixelType * in, - ComplexType * out, - unsigned int flags, + Plan_dft_r2c_2d(int nx, + int ny, + PixelType * in, + ComplexType * out, + unsigned int flags, [[maybe_unused]] int threads = 1) { # ifndef ITK_USE_CUFFTW @@ -144,12 +144,12 @@ class ComplexToComplexProxy return plan; } static PlanType - Plan_dft_r2c_3d(int nx, - int ny, - int nz, - PixelType * in, - ComplexType * out, - unsigned int flags, + Plan_dft_r2c_3d(int nx, + int ny, + int nz, + PixelType * in, + ComplexType * out, + unsigned int flags, [[maybe_unused]] int threads = 1) { # ifndef ITK_USE_CUFFTW @@ -160,11 +160,11 @@ class ComplexToComplexProxy return plan; } static PlanType - Plan_dft_r2c(int rank, - const int * n, - PixelType * in, - ComplexType * out, - unsigned int flags, + Plan_dft_r2c(int rank, + const int * n, + PixelType * in, + ComplexType * out, + unsigned int flags, [[maybe_unused]] int threads = 1) { # ifndef ITK_USE_CUFFTW @@ -175,11 +175,11 @@ class ComplexToComplexProxy return plan; } static PlanType - Plan_dft_1d(const int n, - ComplexType * in, - ComplexType * out, - int sign, - unsigned int flags, + Plan_dft_1d(const int n, + ComplexType * in, + ComplexType * out, + int sign, + unsigned int flags, [[maybe_unused]] int threads = 1) { # ifndef ITK_USE_CUFFTW @@ -227,11 +227,11 @@ class ComplexToComplexProxy return plan; } static PlanType - Plan_dft_c2r_2d(int nx, - int ny, - ComplexType * in, - PixelType * out, - unsigned int flags, + Plan_dft_c2r_2d(int nx, + int ny, + ComplexType * in, + PixelType * out, + unsigned int flags, [[maybe_unused]] int threads = 1) { # ifndef ITK_USE_CUFFTW @@ -242,12 +242,12 @@ class ComplexToComplexProxy return plan; } static PlanType - Plan_dft_c2r_3d(int nx, - int ny, - int nz, - ComplexType * in, - PixelType * out, - unsigned int flags, + Plan_dft_c2r_3d(int nx, + int ny, + int nz, + ComplexType * in, + PixelType * out, + unsigned int flags, [[maybe_unused]] int threads = 1) { # ifndef ITK_USE_CUFFTW @@ -258,11 +258,11 @@ class ComplexToComplexProxy return plan; } static PlanType - Plan_dft_c2r(int rank, - const int * n, - ComplexType * in, - PixelType * out, - unsigned int flags, + Plan_dft_c2r(int rank, + const int * n, + ComplexType * in, + PixelType * out, + unsigned int flags, [[maybe_unused]] int threads = 1) { # ifndef ITK_USE_CUFFTW @@ -285,11 +285,11 @@ class ComplexToComplexProxy } static PlanType - Plan_dft_r2c_2d(int nx, - int ny, - PixelType * in, - ComplexType * out, - unsigned int flags, + Plan_dft_r2c_2d(int nx, + int ny, + PixelType * in, + ComplexType * out, + unsigned int flags, [[maybe_unused]] int threads = 1) { # ifndef ITK_USE_CUFFTW @@ -301,12 +301,12 @@ class ComplexToComplexProxy } static PlanType - Plan_dft_r2c_3d(int nx, - int ny, - int nz, - PixelType * in, - ComplexType * out, - unsigned int flags, + Plan_dft_r2c_3d(int nx, + int ny, + int nz, + PixelType * in, + ComplexType * out, + unsigned int flags, [[maybe_unused]] int threads = 1) { # ifndef ITK_USE_CUFFTW @@ -318,11 +318,11 @@ class ComplexToComplexProxy } static PlanType - Plan_dft_r2c(int rank, - const int * n, - PixelType * in, - ComplexType * out, - unsigned int flags, + Plan_dft_r2c(int rank, + const int * n, + PixelType * in, + ComplexType * out, + unsigned int flags, [[maybe_unused]] int threads = 1) { # ifndef ITK_USE_CUFFTW @@ -333,11 +333,11 @@ class ComplexToComplexProxy return plan; } static PlanType - Plan_dft_1d(const int n, - ComplexType * in, - ComplexType * out, - int sign, - unsigned int flags, + Plan_dft_1d(const int n, + ComplexType * in, + ComplexType * out, + int sign, + unsigned int flags, [[maybe_unused]] int threads = 1) { # ifndef ITK_USE_CUFFTW diff --git a/Modules/Filtering/FFT/include/itkFFTWComplexToComplex1DFFTImageFilter.h b/Modules/Filtering/FFT/include/itkFFTWComplexToComplex1DFFTImageFilter.h index f4930a9cf78..3393d52366b 100644 --- a/Modules/Filtering/FFT/include/itkFFTWComplexToComplex1DFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkFFTWComplexToComplex1DFFTImageFilter.h @@ -94,9 +94,9 @@ class ITK_TEMPLATE_EXPORT FFTWComplexToComplex1DFFTImageFilter void DestroyPlans(); - bool m_PlanComputed{ false }; - PlanArrayType m_PlanArray{}; - unsigned int m_LastImageSize{ 0 }; + bool m_PlanComputed{ false }; + PlanArrayType m_PlanArray{}; + unsigned int m_LastImageSize{ 0 }; PlanBufferPointerType m_InputBufferArray{}; PlanBufferPointerType m_OutputBufferArray{}; }; diff --git a/Modules/Filtering/FFT/include/itkFFTWComplexToComplex1DFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkFFTWComplexToComplex1DFFTImageFilter.hxx index 5e8cc2a8e25..193682216f9 100644 --- a/Modules/Filtering/FFT/include/itkFFTWComplexToComplex1DFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkFFTWComplexToComplex1DFFTImageFilter.hxx @@ -84,7 +84,7 @@ FFTWComplexToComplex1DFFTImageFilter::BeforeThreadedG OutputImageType * outputPtr = this->GetOutput(); const typename OutputImageType::SizeType & outputSize = outputPtr->GetRequestedRegion().GetSize(); - const unsigned int lineSize = outputSize[this->m_Direction]; + const unsigned int lineSize = outputSize[this->m_Direction]; if (this->m_PlanComputed) { @@ -133,14 +133,14 @@ template void FFTWComplexToComplex1DFFTImageFilter::ThreadedGenerateData( const OutputImageRegionType & outputRegion, - ThreadIdType threadID) + ThreadIdType threadID) { // get pointers to the input and output const InputImageType * inputPtr = this->GetInput(); - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); const typename OutputImageType::SizeType & outputSize = outputPtr->GetRequestedRegion().GetSize(); - const unsigned int lineSize = outputSize[this->m_Direction]; + const unsigned int lineSize = outputSize[this->m_Direction]; using InputIteratorType = itk::ImageLinearConstIteratorWithIndex; using OutputIteratorType = itk::ImageLinearIteratorWithIndex; @@ -151,7 +151,7 @@ FFTWComplexToComplex1DFFTImageFilter::ThreadedGenerat inputIt.SetDirection(this->m_Direction); outputIt.SetDirection(this->m_Direction); - typename InputIteratorType::PixelType * inputBufferIt; + typename InputIteratorType::PixelType * inputBufferIt; typename OutputIteratorType::PixelType * outputBufferIt; // for every fft line diff --git a/Modules/Filtering/FFT/include/itkFFTWComplexToComplexFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkFFTWComplexToComplexFFTImageFilter.hxx index e89cc5b5013..f325a76ea23 100644 --- a/Modules/Filtering/FFT/include/itkFFTWComplexToComplexFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkFFTWComplexToComplexFFTImageFilter.hxx @@ -52,7 +52,7 @@ FFTWComplexToComplexFFTImageFilter::BeforeThreadedGen { // get pointers to the input and output const InputImageType * input = this->GetInput(); - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); if (!input || !output) { @@ -76,9 +76,9 @@ FFTWComplexToComplexFFTImageFilter::BeforeThreadedGen } typename FFTWProxyType::PlanType plan; - auto * in = (typename FFTWProxyType::ComplexType *)input->GetBufferPointer(); - auto * out = (typename FFTWProxyType::ComplexType *)output->GetBufferPointer(); - int flags = m_PlanRigor; + auto * in = (typename FFTWProxyType::ComplexType *)input->GetBufferPointer(); + auto * out = (typename FFTWProxyType::ComplexType *)output->GetBufferPointer(); + int flags = m_PlanRigor; if (!m_CanUseDestructiveAlgorithm) { // if the input is about to be destroyed, there is no need to force fftw @@ -111,7 +111,7 @@ FFTWComplexToComplexFFTImageFilter::DynamicThreadedGe { using IteratorType = ImageRegionIterator; const SizeValueType totalOutputSize = this->GetOutput()->GetRequestedRegion().GetNumberOfPixels(); - IteratorType it(this->GetOutput(), outputRegionForThread); + IteratorType it(this->GetOutput(), outputRegionForThread); while (!it.IsAtEnd()) { PixelType val = it.Value(); diff --git a/Modules/Filtering/FFT/include/itkFFTWForward1DFFTImageFilter.h b/Modules/Filtering/FFT/include/itkFFTWForward1DFFTImageFilter.h index 9d29a8fef22..8b67cf5831a 100644 --- a/Modules/Filtering/FFT/include/itkFFTWForward1DFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkFFTWForward1DFFTImageFilter.h @@ -93,9 +93,9 @@ class ITK_TEMPLATE_EXPORT FFTWForward1DFFTImageFilter : public Forward1DFFTImage void DestroyPlans(); - bool m_PlanComputed{ false }; - PlanArrayType m_PlanArray{}; - unsigned int m_LastImageSize{ 0 }; + bool m_PlanComputed{ false }; + PlanArrayType m_PlanArray{}; + unsigned int m_LastImageSize{ 0 }; PlanBufferPointerType m_InputBufferArray{}; PlanBufferPointerType m_OutputBufferArray{}; }; diff --git a/Modules/Filtering/FFT/include/itkFFTWForward1DFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkFFTWForward1DFFTImageFilter.hxx index e16d7f67d65..40008571c8e 100644 --- a/Modules/Filtering/FFT/include/itkFFTWForward1DFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkFFTWForward1DFFTImageFilter.hxx @@ -84,7 +84,7 @@ FFTWForward1DFFTImageFilter::BeforeThreadedGenerateDa OutputImageType * outputPtr = this->GetOutput(); const typename OutputImageType::SizeType & outputSize = outputPtr->GetRequestedRegion().GetSize(); - const unsigned int lineSize = outputSize[this->GetDirection()]; + const unsigned int lineSize = outputSize[this->GetDirection()]; if (this->m_PlanComputed) { @@ -124,15 +124,15 @@ FFTWForward1DFFTImageFilter::BeforeThreadedGenerateDa template void FFTWForward1DFFTImageFilter::ThreadedGenerateData(const OutputImageRegionType & outputRegion, - ThreadIdType threadID) + ThreadIdType threadID) { // get pointers to the input and output const InputImageType * inputPtr = this->GetInput(); - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); using InputIteratorType = itk::ImageLinearConstIteratorWithIndex; using OutputIteratorType = itk::ImageLinearIteratorWithIndex; - InputIteratorType inputIt(inputPtr, outputRegion); + InputIteratorType inputIt(inputPtr, outputRegion); OutputIteratorType outputIt(outputPtr, outputRegion); inputIt.SetDirection(this->GetDirection()); diff --git a/Modules/Filtering/FFT/include/itkFFTWForwardFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkFFTWForwardFFTImageFilter.hxx index 76f4d189eed..411387e4933 100644 --- a/Modules/Filtering/FFT/include/itkFFTWForwardFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkFFTWForwardFFTImageFilter.hxx @@ -47,7 +47,7 @@ FFTWForwardFFTImageFilter::GenerateData() { // Get pointers to the input and output. const typename InputImageType::ConstPointer inputPtr = this->GetInput(); - const typename OutputImageType::Pointer outputPtr = this->GetOutput(); + const typename OutputImageType::Pointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) { @@ -62,7 +62,7 @@ FFTWForwardFFTImageFilter::GenerateData() outputPtr->SetBufferedRegion(outputPtr->GetRequestedRegion()); outputPtr->Allocate(); - const typename InputImageType::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename InputImageType::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); const typename OutputImageType::SizeType & outputSize = outputPtr->GetLargestPossibleRegion().GetSize(); // figure out sizes @@ -92,8 +92,8 @@ FFTWForwardFFTImageFilter::GenerateData() fftwOutput->Allocate(); typename FFTWProxyType::PlanType plan; - auto * in = const_cast(inputPtr->GetBufferPointer()); - int flags = m_PlanRigor; + auto * in = const_cast(inputPtr->GetBufferPointer()); + int flags = m_PlanRigor; if (!m_CanUseDestructiveAlgorithm) { // if the input is about to be destroyed, there is no need to force fftw diff --git a/Modules/Filtering/FFT/include/itkFFTWGlobalConfiguration.h b/Modules/Filtering/FFT/include/itkFFTWGlobalConfiguration.h index f03790868fc..985c6e9e29d 100644 --- a/Modules/Filtering/FFT/include/itkFFTWGlobalConfiguration.h +++ b/Modules/Filtering/FFT/include/itkFFTWGlobalConfiguration.h @@ -367,11 +367,11 @@ class ITKFFT_EXPORT FFTWGlobalConfiguration : public Object static FFTWGlobalConfigurationGlobals * m_PimplGlobals; - std::mutex m_Mutex; - bool m_NewWisdomAvailable{ false }; - int m_PlanRigor{ 0 }; - bool m_WriteWisdomCache{ false }; - bool m_ReadWisdomCache{ true }; + std::mutex m_Mutex; + bool m_NewWisdomAvailable{ false }; + int m_PlanRigor{ 0 }; + bool m_WriteWisdomCache{ false }; + bool m_ReadWisdomCache{ true }; std::string m_WisdomCacheBase; // m_WriteWisdomCache Controls the behavior of default // wisdom file creation policies. diff --git a/Modules/Filtering/FFT/include/itkFFTWHalfHermitianToRealInverseFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkFFTWHalfHermitianToRealInverseFFTImageFilter.hxx index 3e806a78b98..489c1553622 100644 --- a/Modules/Filtering/FFT/include/itkFFTWHalfHermitianToRealInverseFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkFFTWHalfHermitianToRealInverseFFTImageFilter.hxx @@ -39,7 +39,7 @@ void FFTWHalfHermitianToRealInverseFFTImageFilter::BeforeThreadedGenerateData() { // Get pointers to the input and output. - typename InputImageType::ConstPointer inputPtr = this->GetInput(); + typename InputImageType::ConstPointer inputPtr = this->GetInput(); const typename OutputImageType::Pointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) @@ -55,7 +55,7 @@ FFTWHalfHermitianToRealInverseFFTImageFilter::BeforeT outputPtr->SetBufferedRegion(outputPtr->GetRequestedRegion()); outputPtr->Allocate(); - const InputSizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const InputSizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); const OutputSizeType outputSize = outputPtr->GetLargestPossibleRegion().GetSize(); // Figure out sizes. @@ -88,7 +88,7 @@ FFTWHalfHermitianToRealInverseFFTImageFilter::BeforeT return new typename FFTWProxyType::ComplexType[totalInputSize]; } }(); - OutputPixelType * out = outputPtr->GetBufferPointer(); + OutputPixelType * out = outputPtr->GetBufferPointer(); typename FFTWProxyType::PlanType plan; int sizes[ImageDimension]; @@ -128,7 +128,7 @@ FFTWHalfHermitianToRealInverseFFTImageFilter::Dynamic { using IteratorType = ImageRegionIterator; const unsigned long totalOutputSize = this->GetOutput()->GetRequestedRegion().GetNumberOfPixels(); - IteratorType it(this->GetOutput(), outputRegionForThread); + IteratorType it(this->GetOutput(), outputRegionForThread); while (!it.IsAtEnd()) { it.Set(it.Value() / totalOutputSize); @@ -150,7 +150,7 @@ FFTWHalfHermitianToRealInverseFFTImageFilter::UpdateO template void FFTWHalfHermitianToRealInverseFFTImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/FFT/include/itkFFTWInverse1DFFTImageFilter.h b/Modules/Filtering/FFT/include/itkFFTWInverse1DFFTImageFilter.h index 925113ac12a..e41dfdf265f 100644 --- a/Modules/Filtering/FFT/include/itkFFTWInverse1DFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkFFTWInverse1DFFTImageFilter.h @@ -92,9 +92,9 @@ class ITK_TEMPLATE_EXPORT FFTWInverse1DFFTImageFilter : public Inverse1DFFTImage void DestroyPlans(); - bool m_PlanComputed{ false }; - PlanArrayType m_PlanArray{}; - unsigned int m_LastImageSize{ 0 }; + bool m_PlanComputed{ false }; + PlanArrayType m_PlanArray{}; + unsigned int m_LastImageSize{ 0 }; PlanBufferPointerType m_InputBufferArray{}; PlanBufferPointerType m_OutputBufferArray{}; }; diff --git a/Modules/Filtering/FFT/include/itkFFTWInverse1DFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkFFTWInverse1DFFTImageFilter.hxx index 01016bd82a4..68301d14660 100644 --- a/Modules/Filtering/FFT/include/itkFFTWInverse1DFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkFFTWInverse1DFFTImageFilter.hxx @@ -85,7 +85,7 @@ FFTWInverse1DFFTImageFilter::BeforeThreadedGenerateDa OutputImageType * outputPtr = this->GetOutput(); const typename OutputImageType::SizeType & outputSize = outputPtr->GetRequestedRegion().GetSize(); - const unsigned int lineSize = outputSize[this->m_Direction]; + const unsigned int lineSize = outputSize[this->m_Direction]; if (this->m_PlanComputed) { @@ -125,18 +125,18 @@ FFTWInverse1DFFTImageFilter::BeforeThreadedGenerateDa template void FFTWInverse1DFFTImageFilter::ThreadedGenerateData(const OutputImageRegionType & outputRegion, - ThreadIdType threadID) + ThreadIdType threadID) { // get pointers to the input and output const InputImageType * inputPtr = this->GetInput(); - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); const typename OutputImageType::SizeType & outputSize = outputPtr->GetRequestedRegion().GetSize(); - const unsigned int lineSize = outputSize[this->m_Direction]; + const unsigned int lineSize = outputSize[this->m_Direction]; using InputIteratorType = itk::ImageLinearConstIteratorWithIndex; using OutputIteratorType = itk::ImageLinearIteratorWithIndex; - InputIteratorType inputIt(inputPtr, outputRegion); + InputIteratorType inputIt(inputPtr, outputRegion); OutputIteratorType outputIt(outputPtr, outputRegion); inputIt.SetDirection(this->m_Direction); diff --git a/Modules/Filtering/FFT/include/itkFFTWInverseFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkFFTWInverseFFTImageFilter.hxx index b6773e0af59..936f13ac502 100644 --- a/Modules/Filtering/FFT/include/itkFFTWInverseFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkFFTWInverseFFTImageFilter.hxx @@ -42,7 +42,7 @@ FFTWInverseFFTImageFilter::BeforeThreadedGenerateData { // Get pointers to the input and output. const typename InputImageType::ConstPointer inputPtr = this->GetInput(); - const typename OutputImageType::Pointer outputPtr = this->GetOutput(); + const typename OutputImageType::Pointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) { @@ -57,7 +57,7 @@ FFTWInverseFFTImageFilter::BeforeThreadedGenerateData outputPtr->SetBufferedRegion(outputPtr->GetRequestedRegion()); outputPtr->Allocate(); - const InputSizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const InputSizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); const OutputSizeType outputSize = outputPtr->GetLargestPossibleRegion().GetSize(); // Figure out sizes. @@ -82,7 +82,7 @@ FFTWInverseFFTImageFilter::BeforeThreadedGenerateData auto * in = (typename FFTWProxyType::ComplexType *)fullToHalfFilter->GetOutput()->GetBufferPointer(); - OutputPixelType * out = outputPtr->GetBufferPointer(); + OutputPixelType * out = outputPtr->GetBufferPointer(); typename FFTWProxyType::PlanType plan; int sizes[ImageDimension]; @@ -106,7 +106,7 @@ FFTWInverseFFTImageFilter::DynamicThreadedGenerateDat { using IteratorType = ImageRegionIterator; const unsigned long totalOutputSize = this->GetOutput()->GetRequestedRegion().GetNumberOfPixels(); - IteratorType it(this->GetOutput(), outputRegionForThread); + IteratorType it(this->GetOutput(), outputRegionForThread); while (!it.IsAtEnd()) { it.Set(it.Value() / totalOutputSize); diff --git a/Modules/Filtering/FFT/include/itkFFTWRealToHalfHermitianForwardFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkFFTWRealToHalfHermitianForwardFFTImageFilter.hxx index a6a1fd22794..8237ead96c9 100644 --- a/Modules/Filtering/FFT/include/itkFFTWRealToHalfHermitianForwardFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkFFTWRealToHalfHermitianForwardFFTImageFilter.hxx @@ -42,7 +42,7 @@ FFTWRealToHalfHermitianForwardFFTImageFilter::Generat { // Get pointers to the input and output. const typename InputImageType::ConstPointer inputPtr = this->GetInput(); - const typename OutputImageType::Pointer outputPtr = this->GetOutput(); + const typename OutputImageType::Pointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) { @@ -57,7 +57,7 @@ FFTWRealToHalfHermitianForwardFFTImageFilter::Generat outputPtr->SetBufferedRegion(outputPtr->GetRequestedRegion()); outputPtr->Allocate(); - const typename InputImageType::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename InputImageType::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); const typename OutputImageType::SizeType & outputSize = outputPtr->GetLargestPossibleRegion().GetSize(); // figure out sizes @@ -74,9 +74,9 @@ FFTWRealToHalfHermitianForwardFFTImageFilter::Generat } typename FFTWProxyType::PlanType plan; - auto * in = const_cast(inputPtr->GetBufferPointer()); - auto * out = (typename FFTWProxyType::ComplexType *)outputPtr->GetBufferPointer(); - int flags = m_PlanRigor; + auto * in = const_cast(inputPtr->GetBufferPointer()); + auto * out = (typename FFTWProxyType::ComplexType *)outputPtr->GetBufferPointer(); + int flags = m_PlanRigor; if (!m_CanUseDestructiveAlgorithm) { // if the input is about to be destroyed, there is no need to force fftw @@ -110,7 +110,7 @@ FFTWRealToHalfHermitianForwardFFTImageFilter::UpdateO template void FFTWRealToHalfHermitianForwardFFTImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/FFT/include/itkForward1DFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkForward1DFFTImageFilter.hxx index c7393cc0ae0..dd4b86ace3b 100644 --- a/Modules/Filtering/FFT/include/itkForward1DFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkForward1DFFTImageFilter.hxx @@ -37,7 +37,7 @@ Forward1DFFTImageFilter::GenerateInputRequestedRegion Superclass::GenerateInputRequestedRegion(); // get pointers to the inputs - auto * input = const_cast(this->GetInput()); + auto * input = const_cast(this->GetInput()); OutputImageType * output = this->GetOutput(); // we need to compute the input requested region (size and start index) @@ -47,11 +47,11 @@ Forward1DFFTImageFilter::GenerateInputRequestedRegion OutputIndexType outputRequestedRegionStartIndex = output->GetRequestedRegion().GetIndex(); //// the regions other than the fft direction are fine - typename InputImageType::SizeType inputRequestedRegionSize = outputRequestedRegionSize; + typename InputImageType::SizeType inputRequestedRegionSize = outputRequestedRegionSize; typename InputImageType::IndexType inputRequestedRegionStartIndex = outputRequestedRegionStartIndex; // we but need all of the input in the fft direction - const unsigned int direction = this->m_Direction; + const unsigned int direction = this->m_Direction; const typename InputImageType::SizeType & inputLargeSize = input->GetLargestPossibleRegion().GetSize(); inputRequestedRegionSize[direction] = inputLargeSize[direction]; const typename InputImageType::IndexType & inputLargeIndex = input->GetLargestPossibleRegion().GetIndex(); @@ -79,7 +79,7 @@ Forward1DFFTImageFilter::EnlargeOutputRequestedRegion ConstOutputIndexType requestedIndex = output->GetRequestedRegion().GetIndex(); ConstOutputIndexType outputLargeIndex = output->GetLargestPossibleRegion().GetIndex(); - typename OutputImageType::SizeType enlargedSize = requestedSize; + typename OutputImageType::SizeType enlargedSize = requestedSize; typename OutputImageType::IndexType enlargedIndex = requestedIndex; enlargedSize[this->m_Direction] = outputLargeSize[this->m_Direction]; enlargedIndex[this->m_Direction] = outputLargeIndex[this->m_Direction]; diff --git a/Modules/Filtering/FFT/include/itkFullToHalfHermitianImageFilter.hxx b/Modules/Filtering/FFT/include/itkFullToHalfHermitianImageFilter.hxx index 8200112835f..a0a4a5ad57f 100644 --- a/Modules/Filtering/FFT/include/itkFullToHalfHermitianImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkFullToHalfHermitianImageFilter.hxx @@ -41,17 +41,17 @@ FullToHalfHermitianImageFilter::GenerateOutputInformation() // Get pointers to the input and output const typename InputImageType::ConstPointer inputPtr = this->GetInput(); - const typename OutputImageType::Pointer outputPtr = this->GetOutput(); + const typename OutputImageType::Pointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) { return; } - const typename InputImageType::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename InputImageType::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); const typename InputImageType::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); - typename OutputImageType::SizeType outputSize; + typename OutputImageType::SizeType outputSize; typename OutputImageType::IndexType outputStartIndex; for (unsigned int i = 0; i < OutputImageType::ImageDimension; ++i) @@ -87,7 +87,7 @@ FullToHalfHermitianImageFilter::DynamicThreadedGenerateData( const OutputImageRegionType & outputRegionForThread) { const typename InputImageType::ConstPointer inputPtr = this->GetInput(); - const typename OutputImageType::Pointer outputPtr = this->GetOutput(); + const typename OutputImageType::Pointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) { diff --git a/Modules/Filtering/FFT/include/itkHalfHermitianToRealInverseFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkHalfHermitianToRealInverseFFTImageFilter.hxx index a19e4f44b47..f250b4dc306 100644 --- a/Modules/Filtering/FFT/include/itkHalfHermitianToRealInverseFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkHalfHermitianToRealInverseFFTImageFilter.hxx @@ -36,7 +36,7 @@ HalfHermitianToRealInverseFFTImageFilter::GenerateOut // get pointers to the input and output const typename InputImageType::ConstPointer inputPtr = this->GetInput(); - const typename OutputImageType::Pointer outputPtr = this->GetOutput(); + const typename OutputImageType::Pointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) { @@ -48,10 +48,10 @@ HalfHermitianToRealInverseFFTImageFilter::GenerateOut // has no meaning in the result of an FFT. For an IFFT, since the // spacing is propagated to the complex result, we can use the spacing // from the input to propagate back to the output. - const typename InputImageType::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename InputImageType::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); const typename InputImageType::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); - typename OutputImageType::SizeType outputSize; + typename OutputImageType::SizeType outputSize; typename OutputImageType::IndexType outputStartIndex; // In 4.3.4 of the FFTW documentation, they indicate the size of diff --git a/Modules/Filtering/FFT/include/itkHalfToFullHermitianImageFilter.hxx b/Modules/Filtering/FFT/include/itkHalfToFullHermitianImageFilter.hxx index bd54acd4e48..6bb8b6ec66f 100644 --- a/Modules/Filtering/FFT/include/itkHalfToFullHermitianImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkHalfToFullHermitianImageFilter.hxx @@ -43,17 +43,17 @@ HalfToFullHermitianImageFilter::GenerateOutputInformation() // Get pointers to the input and output const typename InputImageType::ConstPointer inputPtr = this->GetInput(); - const typename OutputImageType::Pointer outputPtr = this->GetOutput(); + const typename OutputImageType::Pointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) { return; } - const typename InputImageType::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename InputImageType::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); const typename InputImageType::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); - typename OutputImageType::SizeType outputSize; + typename OutputImageType::SizeType outputSize; typename OutputImageType::IndexType outputStartIndex; for (unsigned int i = 0; i < OutputImageType::ImageDimension; ++i) @@ -92,21 +92,21 @@ HalfToFullHermitianImageFilter::DynamicThreadedGenerateData( const OutputImageRegionType & outputRegionForThread) { const typename InputImageType::ConstPointer inputPtr = this->GetInput(); - const typename OutputImageType::Pointer outputPtr = this->GetOutput(); + const typename OutputImageType::Pointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) { return; } - const InputImageRegionType inputRegion = inputPtr->GetLargestPossibleRegion(); + const InputImageRegionType inputRegion = inputPtr->GetLargestPossibleRegion(); const InputImageIndexType & inputRegionIndex = inputRegion.GetIndex(); - const InputImageSizeType & inputRegionSize = inputRegion.GetSize(); - InputImageIndexType inputRegionMaximumIndex = inputRegionIndex + inputRegionSize; + const InputImageSizeType & inputRegionSize = inputRegion.GetSize(); + InputImageIndexType inputRegionMaximumIndex = inputRegionIndex + inputRegionSize; // Copy the non-reflected region. OutputImageRegionType copyRegion(outputRegionForThread); - const bool copy = copyRegion.Crop(inputRegion); + const bool copy = copyRegion.Crop(inputRegion); // Set up the ProgressReporter. TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); @@ -119,9 +119,9 @@ HalfToFullHermitianImageFilter::DynamicThreadedGenerateData( // Now copy the redundant complex conjugate region, if there is one // in this thread's output region. - OutputImageIndexType outputRegionIndex = outputRegionForThread.GetIndex(); + OutputImageIndexType outputRegionIndex = outputRegionForThread.GetIndex(); const OutputImageSizeType outputRegionSize = outputRegionForThread.GetSize(); - OutputImageIndexType outputRegionMaximumIndex = outputRegionIndex + outputRegionSize; + OutputImageIndexType outputRegionMaximumIndex = outputRegionIndex + outputRegionSize; if (outputRegionMaximumIndex[0] > inputRegionMaximumIndex[0]) { @@ -141,8 +141,8 @@ HalfToFullHermitianImageFilter::DynamicThreadedGenerateData( for (unsigned int i = 0; i < ImageDimension; ++i) { const OutputImageRegionType outputLargestPossibleRegion = outputPtr->GetLargestPossibleRegion(); - OutputImageIndexType outputLargestPossibleRegionIndex = outputLargestPossibleRegion.GetIndex(); - OutputImageSizeType outputLargestPossibleRegionSize = outputLargestPossibleRegion.GetSize(); + OutputImageIndexType outputLargestPossibleRegionIndex = outputLargestPossibleRegion.GetIndex(); + OutputImageSizeType outputLargestPossibleRegionSize = outputLargestPossibleRegion.GetSize(); if (conjugateIndex[i] != outputLargestPossibleRegionIndex[i]) { index[i] = outputLargestPossibleRegionSize[i] - conjugateIndex[i] + 2 * outputLargestPossibleRegionIndex[i]; diff --git a/Modules/Filtering/FFT/include/itkInverse1DFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkInverse1DFFTImageFilter.hxx index 883eb6377e3..72daa9d0307 100644 --- a/Modules/Filtering/FFT/include/itkInverse1DFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkInverse1DFFTImageFilter.hxx @@ -38,7 +38,7 @@ Inverse1DFFTImageFilter::GenerateInputRequestedRegion Superclass::GenerateInputRequestedRegion(); // get pointers to the inputs - const typename InputImageType::Pointer input = const_cast(this->GetInput()); + const typename InputImageType::Pointer input = const_cast(this->GetInput()); const typename OutputImageType::Pointer output = this->GetOutput(); if (!input || !output) @@ -53,11 +53,11 @@ Inverse1DFFTImageFilter::GenerateInputRequestedRegion OutputIndexType outputRequestedRegionStartIndex = output->GetRequestedRegion().GetIndex(); //// the regions other than the fft direction are fine - typename InputImageType::SizeType inputRequestedRegionSize = outputRequestedRegionSize; + typename InputImageType::SizeType inputRequestedRegionSize = outputRequestedRegionSize; typename InputImageType::IndexType inputRequestedRegionStartIndex = outputRequestedRegionStartIndex; // we but need all of the input in the fft direction - const unsigned int direction = this->m_Direction; + const unsigned int direction = this->m_Direction; const typename InputImageType::SizeType & inputLargeSize = input->GetLargestPossibleRegion().GetSize(); inputRequestedRegionSize[direction] = inputLargeSize[direction]; const typename InputImageType::IndexType & inputLargeIndex = input->GetLargestPossibleRegion().GetIndex(); @@ -84,7 +84,7 @@ Inverse1DFFTImageFilter::EnlargeOutputRequestedRegion ConstOutputIndexType requestedIndex = output->GetRequestedRegion().GetIndex(); ConstOutputIndexType outputLargeIndex = output->GetLargestPossibleRegion().GetIndex(); - typename OutputImageType::SizeType enlargedSize = requestedSize; + typename OutputImageType::SizeType enlargedSize = requestedSize; typename OutputImageType::IndexType enlargedIndex = requestedIndex; enlargedSize[this->m_Direction] = outputLargeSize[this->m_Direction]; enlargedIndex[this->m_Direction] = outputLargeIndex[this->m_Direction]; diff --git a/Modules/Filtering/FFT/include/itkRealToHalfHermitianForwardFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkRealToHalfHermitianForwardFFTImageFilter.hxx index 63f16651dcc..e5935304307 100644 --- a/Modules/Filtering/FFT/include/itkRealToHalfHermitianForwardFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkRealToHalfHermitianForwardFFTImageFilter.hxx @@ -33,7 +33,7 @@ RealToHalfHermitianForwardFFTImageFilter::GenerateOut { // Get pointers to the input and output. const typename InputImageType::ConstPointer inputPtr = this->GetInput(); - const typename OutputImageType::Pointer outputPtr = this->GetOutput(); + const typename OutputImageType::Pointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) { @@ -43,10 +43,10 @@ RealToHalfHermitianForwardFFTImageFilter::GenerateOut // This is all based on the same function in itk::ShrinkImageFilter // ShrinkImageFilter also modifies the image spacing, but spacing // has no meaning in the result of an FFT. - const InputSizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const InputSizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); const InputIndexType inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); - OutputSizeType outputSize; + OutputSizeType outputSize; OutputIndexType outputStartIndex; // In 4.3.4 of the FFTW documentation, they indicate the size of diff --git a/Modules/Filtering/FFT/include/itkVnlComplexToComplex1DFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkVnlComplexToComplex1DFFTImageFilter.hxx index f06ba59f305..4923d8eefd5 100644 --- a/Modules/Filtering/FFT/include/itkVnlComplexToComplex1DFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkVnlComplexToComplex1DFFTImageFilter.hxx @@ -39,7 +39,7 @@ VnlComplexToComplex1DFFTImageFilter::GenerateData() // get pointers to the input and output const typename Superclass::InputImageType * input = this->GetInput(); - typename Superclass::OutputImageType * output = this->GetOutput(); + typename Superclass::OutputImageType * output = this->GetOutput(); const typename Superclass::InputImageType::SizeType & inputSize = input->GetRequestedRegion().GetSize(); @@ -54,7 +54,7 @@ VnlComplexToComplex1DFFTImageFilter::GenerateData() [this, input, output, direction, vectorSize](const typename OutputImageType::RegionType & lambdaRegion) { using InputIteratorType = ImageLinearConstIteratorWithIndex; using OutputIteratorType = ImageLinearIteratorWithIndex; - InputIteratorType inputIt(input, lambdaRegion); + InputIteratorType inputIt(input, lambdaRegion); OutputIteratorType outputIt(output, lambdaRegion); inputIt.SetDirection(direction); @@ -62,10 +62,10 @@ VnlComplexToComplex1DFFTImageFilter::GenerateData() using PixelType = typename TInputImage::PixelType; using VNLVectorType = vnl_vector; - VNLVectorType inputBuffer(vectorSize); + VNLVectorType inputBuffer(vectorSize); typename VNLVectorType::iterator inputBufferIt = inputBuffer.begin(); // fft is done in-place - typename VNLVectorType::iterator outputBufferIt = inputBuffer.begin(); + typename VNLVectorType::iterator outputBufferIt = inputBuffer.begin(); vnl_fft_1d::ValueType> v1d(vectorSize); // for every fft line diff --git a/Modules/Filtering/FFT/include/itkVnlComplexToComplexFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkVnlComplexToComplexFFTImageFilter.hxx index 63f07db7735..9d55bdb4878 100644 --- a/Modules/Filtering/FFT/include/itkVnlComplexToComplexFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkVnlComplexToComplexFFTImageFilter.hxx @@ -39,7 +39,7 @@ void VnlComplexToComplexFFTImageFilter::BeforeThreadedGenerateData() { const ImageType * input = this->GetInput(); - ImageType * output = this->GetOutput(); + ImageType * output = this->GetOutput(); const typename ImageType::RegionType bufferedRegion = input->GetBufferedRegion(); const typename ImageType::SizeType & imageSize = bufferedRegion.GetSize(); @@ -84,7 +84,7 @@ VnlComplexToComplexFFTImageFilter::DynamicThreadedGen { using IteratorType = ImageRegionIterator; const SizeValueType totalOutputSize = this->GetOutput()->GetRequestedRegion().GetNumberOfPixels(); - IteratorType it(this->GetOutput(), outputRegionForThread); + IteratorType it(this->GetOutput(), outputRegionForThread); while (!it.IsAtEnd()) { PixelType val = it.Value(); diff --git a/Modules/Filtering/FFT/include/itkVnlForward1DFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkVnlForward1DFFTImageFilter.hxx index 5f1c59ef59a..300a5f7a75b 100644 --- a/Modules/Filtering/FFT/include/itkVnlForward1DFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkVnlForward1DFFTImageFilter.hxx @@ -40,7 +40,7 @@ VnlForward1DFFTImageFilter::GenerateData() // get pointers to the input and output const typename Superclass::InputImageType * input = this->GetInput(); - typename Superclass::OutputImageType * output = this->GetOutput(); + typename Superclass::OutputImageType * output = this->GetOutput(); const typename Superclass::InputImageType::SizeType & inputSize = input->GetRequestedRegion().GetSize(); @@ -60,7 +60,7 @@ VnlForward1DFFTImageFilter::GenerateData() [input, output, direction, vectorSize](const typename OutputImageType::RegionType & lambdaRegion) { using InputIteratorType = ImageLinearConstIteratorWithIndex; using OutputIteratorType = ImageLinearIteratorWithIndex; - InputIteratorType inputIt(input, lambdaRegion); + InputIteratorType inputIt(input, lambdaRegion); OutputIteratorType outputIt(output, lambdaRegion); inputIt.SetDirection(direction); @@ -69,11 +69,11 @@ VnlForward1DFFTImageFilter::GenerateData() using PixelType = typename TInputImage::PixelType; using ComplexType = std::complex; using ComplexVectorType = vnl_vector; - ComplexVectorType inputBuffer(vectorSize); + ComplexVectorType inputBuffer(vectorSize); typename ComplexVectorType::iterator inputBufferIt = inputBuffer.begin(); // fft is done in-place typename ComplexVectorType::iterator outputBufferIt = inputBuffer.begin(); - vnl_fft_1d v1d(vectorSize); + vnl_fft_1d v1d(vectorSize); // for every fft line for (inputIt.GoToBegin(), outputIt.GoToBegin(); !inputIt.IsAtEnd(); outputIt.NextLine(), inputIt.NextLine()) diff --git a/Modules/Filtering/FFT/include/itkVnlForwardFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkVnlForwardFFTImageFilter.hxx index d4dfa318010..8ccceedc6e8 100644 --- a/Modules/Filtering/FFT/include/itkVnlForwardFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkVnlForwardFFTImageFilter.hxx @@ -31,7 +31,7 @@ VnlForwardFFTImageFilter::GenerateData() { // Get pointers to the input and output. const typename InputImageType::ConstPointer inputPtr = this->GetInput(); - const typename OutputImageType::Pointer outputPtr = this->GetOutput(); + const typename OutputImageType::Pointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) { @@ -61,7 +61,7 @@ VnlForwardFFTImageFilter::GenerateData() } const InputPixelType * in = inputPtr->GetBufferPointer(); - SignalVectorType signal(vectorSize); + SignalVectorType signal(vectorSize); for (unsigned int i = 0; i < vectorSize; ++i) { signal[i] = in[i]; @@ -75,7 +75,7 @@ VnlForwardFFTImageFilter::GenerateData() for (ImageRegionIteratorWithIndex oIt(outputPtr, outputPtr->GetLargestPossibleRegion()); !oIt.IsAtEnd(); ++oIt) { - const typename OutputImageType::IndexType index = oIt.GetIndex(); + const typename OutputImageType::IndexType index = oIt.GetIndex(); const typename OutputImageType::OffsetValueType offset = inputPtr->ComputeOffset(index); oIt.Set(signal[offset]); } diff --git a/Modules/Filtering/FFT/include/itkVnlHalfHermitianToRealInverseFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkVnlHalfHermitianToRealInverseFFTImageFilter.hxx index 1d9d86e0ddf..366bfc6f820 100644 --- a/Modules/Filtering/FFT/include/itkVnlHalfHermitianToRealInverseFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkVnlHalfHermitianToRealInverseFFTImageFilter.hxx @@ -30,7 +30,7 @@ VnlHalfHermitianToRealInverseFFTImageFilter::Generate { // Get pointers to the input and output. const typename InputImageType::ConstPointer inputPtr = this->GetInput(); - const typename OutputImageType::Pointer outputPtr = this->GetOutput(); + const typename OutputImageType::Pointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) { @@ -41,9 +41,9 @@ VnlHalfHermitianToRealInverseFFTImageFilter::Generate // reports the beginning and the end of the process. const ProgressReporter progress(this, 0, 1); - const InputSizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); - const InputIndexType inputIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); - const OutputSizeType outputSize = outputPtr->GetLargestPossibleRegion().GetSize(); + const InputSizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const InputIndexType inputIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); + const OutputSizeType outputSize = outputPtr->GetLargestPossibleRegion().GetSize(); const OutputIndexType outputIndex = outputPtr->GetLargestPossibleRegion().GetIndex(); // Allocate output buffer memory @@ -68,7 +68,7 @@ VnlHalfHermitianToRealInverseFFTImageFilter::Generate SignalVectorType signal(vectorSize); const OutputIndexValueType maxXIndex = inputIndex[0] + static_cast(inputSize[0]); - unsigned int si = 0; + unsigned int si = 0; for (ImageRegionIteratorWithIndex oIt(outputPtr, outputPtr->GetLargestPossibleRegion()); !oIt.IsAtEnd(); ++oIt) diff --git a/Modules/Filtering/FFT/include/itkVnlInverse1DFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkVnlInverse1DFFTImageFilter.hxx index c9509f822f8..0721b4c4a9c 100644 --- a/Modules/Filtering/FFT/include/itkVnlInverse1DFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkVnlInverse1DFFTImageFilter.hxx @@ -39,7 +39,7 @@ VnlInverse1DFFTImageFilter::GenerateData() // get pointers to the input and output const typename Superclass::InputImageType * input = this->GetInput(); - typename Superclass::OutputImageType * output = this->GetOutput(); + typename Superclass::OutputImageType * output = this->GetOutput(); const typename Superclass::InputImageType::SizeType & inputSize = input->GetRequestedRegion().GetSize(); @@ -54,18 +54,18 @@ VnlInverse1DFFTImageFilter::GenerateData() [input, output, direction, vectorSize](const typename OutputImageType::RegionType & lambdaRegion) { using InputIteratorType = ImageLinearConstIteratorWithIndex; using OutputIteratorType = ImageLinearIteratorWithIndex; - InputIteratorType inputIt(input, lambdaRegion); + InputIteratorType inputIt(input, lambdaRegion); OutputIteratorType outputIt(output, lambdaRegion); inputIt.SetDirection(direction); outputIt.SetDirection(direction); using OutputPixelType = typename TOutputImage::PixelType; - vnl_vector> inputBuffer(vectorSize); + vnl_vector> inputBuffer(vectorSize); typename vnl_vector>::iterator inputBufferIt = inputBuffer.begin(); // fft is done in-place typename vnl_vector>::iterator outputBufferIt = inputBuffer.begin(); - vnl_fft_1d v1d(vectorSize); + vnl_fft_1d v1d(vectorSize); // for every fft line for (inputIt.GoToBegin(), outputIt.GoToBegin(); !inputIt.IsAtEnd(); outputIt.NextLine(), inputIt.NextLine()) diff --git a/Modules/Filtering/FFT/include/itkVnlInverseFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkVnlInverseFFTImageFilter.hxx index c0c463dff00..0940ee3bc8c 100644 --- a/Modules/Filtering/FFT/include/itkVnlInverseFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkVnlInverseFFTImageFilter.hxx @@ -30,7 +30,7 @@ VnlInverseFFTImageFilter::GenerateData() { // Get pointers to the input and output. const typename InputImageType::ConstPointer inputPtr = this->GetInput(); - const typename OutputImageType::Pointer outputPtr = this->GetOutput(); + const typename OutputImageType::Pointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) { diff --git a/Modules/Filtering/FFT/include/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx index 5c2a7ca02c6..fa8e0c94dc5 100644 --- a/Modules/Filtering/FFT/include/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx @@ -30,7 +30,7 @@ VnlRealToHalfHermitianForwardFFTImageFilter::Generate { // Get pointers to the input and output. const typename InputImageType::ConstPointer inputPtr = this->GetInput(); - const typename OutputImageType::Pointer outputPtr = this->GetOutput(); + const typename OutputImageType::Pointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) { @@ -60,7 +60,7 @@ VnlRealToHalfHermitianForwardFFTImageFilter::Generate } const InputPixelType * in = inputPtr->GetBufferPointer(); - SignalVectorType signal(vectorSize); + SignalVectorType signal(vectorSize); for (unsigned int i = 0; i < vectorSize; ++i) { signal[i] = in[i]; @@ -74,7 +74,7 @@ VnlRealToHalfHermitianForwardFFTImageFilter::Generate for (ImageRegionIteratorWithIndex oIt(outputPtr, outputPtr->GetLargestPossibleRegion()); !oIt.IsAtEnd(); ++oIt) { - const typename OutputImageType::IndexType index = oIt.GetIndex(); + const typename OutputImageType::IndexType index = oIt.GetIndex(); const typename OutputImageType::OffsetValueType offset = inputPtr->ComputeOffset(index); oIt.Set(signal[offset]); } diff --git a/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx b/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx index c22b04bf3a9..c2a3f4824c0 100644 --- a/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx +++ b/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx @@ -48,7 +48,7 @@ struct FFTWGlobalConfigurationGlobals : m_Instance(nullptr) {}; FFTWGlobalConfiguration::Pointer m_Instance; - std::mutex m_CreationMutex; + std::mutex m_CreationMutex; }; WisdomFilenameGeneratorBase::WisdomFilenameGeneratorBase() = default; @@ -423,7 +423,7 @@ FFTWGlobalConfiguration::FFTWGlobalConfiguration() // If the environmental variable is set, then use it, else // use the requested directory std::string envSetPath; - const bool WisdomCacheBaseEnvSet = itksys::SystemTools::GetEnv("ITK_FFTW_WISDOM_CACHE_BASE", envSetPath); + const bool WisdomCacheBaseEnvSet = itksys::SystemTools::GetEnv("ITK_FFTW_WISDOM_CACHE_BASE", envSetPath); if (WisdomCacheBaseEnvSet) // The environment variable overrides application settings. { this->m_WisdomCacheBase = envSetPath; @@ -442,7 +442,7 @@ FFTWGlobalConfiguration::FFTWGlobalConfiguration() // Default library behavior should be to NOT write // cache files in the default home account std::string auto_import_env; - const bool envITK_FFTW_WRITE_WISDOM_CACHEfound = + const bool envITK_FFTW_WRITE_WISDOM_CACHEfound = itksys::SystemTools::GetEnv("ITK_FFTW_WRITE_WISDOM_CACHE", auto_import_env); if (envITK_FFTW_WRITE_WISDOM_CACHEfound && isDeclineString(auto_import_env)) { @@ -457,7 +457,7 @@ FFTWGlobalConfiguration::FFTWGlobalConfiguration() // Default library behavior should be to NOT write // cache files in the default home account std::string auto_import_env; - const bool envITK_FFTW_READ_WISDOM_CACHEfound = + const bool envITK_FFTW_READ_WISDOM_CACHEfound = itksys::SystemTools::GetEnv("ITK_FFTW_READ_WISDOM_CACHE", auto_import_env); if (envITK_FFTW_READ_WISDOM_CACHEfound && isDeclineString(auto_import_env)) { @@ -597,7 +597,7 @@ FFTWGlobalConfiguration::ImportWisdomFileFloat(const std::string & # if defined(ITK_USE_FFTWF) # ifdef _WIN32 FILE * f; - int fd; + int fd; if (!_sopen_s(&fd, path.c_str(), _O_RDONLY, _SH_DENYNO, _S_IREAD)) { if ((f = _fdopen(fd, "r")) != nullptr) @@ -631,7 +631,7 @@ FFTWGlobalConfiguration::ImportWisdomFileDouble(const std::string & # if defined(ITK_USE_FFTWD) # ifdef _WIN32 FILE * f; - int fd; + int fd; if (!_sopen_s(&fd, path.c_str(), _O_RDONLY, _SH_DENYNO, _S_IREAD)) { if ((f = _fdopen(fd, "r")) != nullptr) @@ -707,7 +707,7 @@ FFTWGlobalConfiguration::ExportWisdomFileDouble(const std::string & # if defined(ITK_USE_FFTWD) # ifdef _WIN32 FILE * f; - int fd; + int fd; if (!_sopen_s(&fd, path.c_str(), _O_RDONLY, _SH_DENYNO, _S_IREAD)) { if ((f = _fdopen(fd, "r")) != nullptr) diff --git a/Modules/Filtering/FFT/test/itkComplexToComplexFFTImageFilterTest.cxx b/Modules/Filtering/FFT/test/itkComplexToComplexFFTImageFilterTest.cxx index d94db8c744a..f18fd0b7614 100644 --- a/Modules/Filtering/FFT/test/itkComplexToComplexFFTImageFilterTest.cxx +++ b/Modules/Filtering/FFT/test/itkComplexToComplexFFTImageFilterTest.cxx @@ -98,8 +98,8 @@ itkComplexToComplexFFTImageFilterTest(int argc, char * argv[]) << std::endl; return EXIT_FAILURE; } - const char * inputImageFileName = argv[1]; - const char * outputImageFileName = argv[2]; + const char * inputImageFileName = argv[1]; + const char * outputImageFileName = argv[2]; const std::string pixelTypeString(argv[3]); // Test streaming enumeration for ComplexToComplexFFTImageFilterEnums::TransformDirection elements diff --git a/Modules/Filtering/FFT/test/itkFFTPadImageFilterTest.cxx b/Modules/Filtering/FFT/test/itkFFTPadImageFilterTest.cxx index 1a1f7b7d93d..933cd5f4a67 100644 --- a/Modules/Filtering/FFT/test/itkFFTPadImageFilterTest.cxx +++ b/Modules/Filtering/FFT/test/itkFFTPadImageFilterTest.cxx @@ -63,8 +63,8 @@ itkFFTPadImageFilterTest(int argc, char * argv[]) reader->SetFileName(argv[1]); itk::ZeroFluxNeumannBoundaryCondition zfnCond; - itk::ConstantBoundaryCondition zeroCond; - itk::PeriodicBoundaryCondition wrapCond; + itk::ConstantBoundaryCondition zeroCond; + itk::PeriodicBoundaryCondition wrapCond; // Create the filters auto fftpad = FFTPadType::New(); diff --git a/Modules/Filtering/FFT/test/itkFFTTest.h b/Modules/Filtering/FFT/test/itkFFTTest.h index d29e9de65a5..b78c0064ebf 100644 --- a/Modules/Filtering/FFT/test/itkFFTTest.h +++ b/Modules/Filtering/FFT/test/itkFFTTest.h @@ -41,8 +41,8 @@ test_fft(unsigned int * SizeOfDimensions) { using RealImageType = itk::Image; using ComplexImageType = itk::Image, VImageDimensions>; - unsigned int counter = 0; - typename RealImageType::SizeType imageSize; + unsigned int counter = 0; + typename RealImageType::SizeType imageSize; typename RealImageType::IndexType imageIndex; using indexValueType = typename RealImageType::IndexType::IndexValueType; @@ -69,8 +69,8 @@ test_fft(unsigned int * SizeOfDimensions) realImage->Allocate(); // Set up spacing and origin to test passing of metadata - typename RealImageType::PointType origin; - typename RealImageType::SpacingType spacing; + typename RealImageType::PointType origin; + typename RealImageType::SpacingType spacing; typename RealImageType::DirectionType direction{}; for (unsigned int i = 0; i < VImageDimensions; ++i) { @@ -137,8 +137,8 @@ test_fft(unsigned int * SizeOfDimensions) } // Get the size and the pointer to the complex image. - const typename ComplexImageType::Pointer complexImage = R2C->GetOutput(); - std::complex * fftbuf = complexImage->GetBufferPointer(); + const typename ComplexImageType::Pointer complexImage = R2C->GetOutput(); + std::complex * fftbuf = complexImage->GetBufferPointer(); const typename ComplexImageType::SizeType & complexImageSize = complexImage->GetLargestPossibleRegion().GetSize(); unsigned int sizes[4] = { 1, 1, 1, 1 }; @@ -278,8 +278,8 @@ test_fft_rtc(unsigned int * SizeOfDimensions) { using RealImageType = itk::Image; using ComplexImageType = itk::Image, VImageDimensions>; - unsigned int counter = 0; - typename RealImageType::SizeType imageSize; + unsigned int counter = 0; + typename RealImageType::SizeType imageSize; typename RealImageType::IndexType imageIndex; // We are testing the FFT for 1D, 2D, and 3D images. An array @@ -350,12 +350,12 @@ test_fft_rtc(unsigned int * SizeOfDimensions) R2Cb->Update(); // Get the size and the pointer to the complex image. - const typename ComplexImageType::Pointer complexImageA = R2Ca->GetOutput(); - std::complex * fftbufA = complexImageA->GetBufferPointer(); + const typename ComplexImageType::Pointer complexImageA = R2Ca->GetOutput(); + std::complex * fftbufA = complexImageA->GetBufferPointer(); const typename ComplexImageType::SizeType & complexImageSizeA = complexImageA->GetLargestPossibleRegion().GetSize(); - const typename ComplexImageType::Pointer complexImageB = R2Cb->GetOutput(); - std::complex * fftbufB = complexImageB->GetBufferPointer(); + const typename ComplexImageType::Pointer complexImageB = R2Cb->GetOutput(); + std::complex * fftbufB = complexImageB->GetBufferPointer(); const typename ComplexImageType::SizeType & complexImageSizeB = complexImageB->GetLargestPossibleRegion().GetSize(); @@ -417,7 +417,7 @@ test_fft_rtc(unsigned int * SizeOfDimensions) for (unsigned int k = 0; k < std::min(sizesA[0], sizesB[0]); ++k) { const double val = itk::Math::abs(fftbufA[zStrideA + yStrideA + k]); - double diff = itk::Math::abs(fftbufA[zStrideA + yStrideA + k] - fftbufB[zStrideB + yStrideB + k]); + double diff = itk::Math::abs(fftbufA[zStrideA + yStrideA + k] - fftbufB[zStrideB + yStrideB + k]); if (itk::Math::NotAlmostEquals(val, 0.0)) { diff /= itk::Math::abs(val); diff --git a/Modules/Filtering/FFT/test/itkFFTWComplexToComplexFFTImageFilterTest.cxx b/Modules/Filtering/FFT/test/itkFFTWComplexToComplexFFTImageFilterTest.cxx index b9c59c6b1da..628b085b81a 100644 --- a/Modules/Filtering/FFT/test/itkFFTWComplexToComplexFFTImageFilterTest.cxx +++ b/Modules/Filtering/FFT/test/itkFFTWComplexToComplexFFTImageFilterTest.cxx @@ -98,8 +98,8 @@ itkFFTWComplexToComplexFFTImageFilterTest(int argc, char * argv[]) std::cerr << " InputImage OutputImage " << std::endl; return EXIT_FAILURE; } - const char * inputImageFileName = argv[1]; - const char * outputImageFileName = argv[2]; + const char * inputImageFileName = argv[1]; + const char * outputImageFileName = argv[2]; const std::string pixelTypeString(argv[3]); const itk::ImageIOBase::Pointer imageIO = diff --git a/Modules/Filtering/FFT/test/itkFFTWD_FFTTest.cxx b/Modules/Filtering/FFT/test/itkFFTWD_FFTTest.cxx index f8c61bc67b0..97d7c05b7d2 100644 --- a/Modules/Filtering/FFT/test/itkFFTWD_FFTTest.cxx +++ b/Modules/Filtering/FFT/test/itkFFTWD_FFTTest.cxx @@ -40,7 +40,7 @@ itkFFTWD_FFTTest(int, char *[]) unsigned int SizeOfDimensions1[] = { 4, 4, 4 }; unsigned int SizeOfDimensions2[] = { 3, 5, 4 }; - int rval = 0; + int rval = 0; std::cerr << "FFTWD:double,1 (4,4,4)" << std::endl; if ((test_fft, itk::FFTWInverseFFTImageFilter>( diff --git a/Modules/Filtering/FFT/test/itkFFTWD_RealFFTTest.cxx b/Modules/Filtering/FFT/test/itkFFTWD_RealFFTTest.cxx index 70ede61adfe..2c73052dacf 100644 --- a/Modules/Filtering/FFT/test/itkFFTWD_RealFFTTest.cxx +++ b/Modules/Filtering/FFT/test/itkFFTWD_RealFFTTest.cxx @@ -46,7 +46,7 @@ itkFFTWD_RealFFTTest(int, char *[]) unsigned int SizeOfDimensions1[] = { 4, 4, 4 }; unsigned int SizeOfDimensions2[] = { 3, 5, 4 }; - int rval = 0; + int rval = 0; std::cerr << "FFTWD:double,1 (4,4,4)" << std::endl; if ((test_fft, itk::FFTWInverseFFTImageFilter>( SizeOfDimensions1)) != 0) diff --git a/Modules/Filtering/FFT/test/itkFFTWF_RealFFTTest.cxx b/Modules/Filtering/FFT/test/itkFFTWF_RealFFTTest.cxx index 8f2b923cb0f..88787db72f0 100644 --- a/Modules/Filtering/FFT/test/itkFFTWF_RealFFTTest.cxx +++ b/Modules/Filtering/FFT/test/itkFFTWF_RealFFTTest.cxx @@ -28,10 +28,10 @@ int itkFFTWF_RealFFTTest( # ifndef ITK_USE_CUFFTW - int argc, + int argc, char * argv[] # else - int itkNotUsed(argc), + int itkNotUsed(argc), char * itkNotUsed(argv)[] # endif ) @@ -64,7 +64,7 @@ itkFFTWF_RealFFTTest( unsigned int SizeOfDimensions1[] = { 4, 4, 4 }; unsigned int SizeOfDimensions2[] = { 3, 5, 4 }; - int rval = 0; + int rval = 0; std::cerr << "FFTWF:float,1 (4,4,4)" << std::endl; if ((test_fftSetInput(reader->GetOutput()); - auto ifft = TInverseFFT::New(); + auto ifft = TInverseFFT::New(); const bool xIsOdd = reader->GetOutput()->GetLargestPossibleRegion().GetSize()[0] % 2 == 1; ifft->SetActualXDimensionIsOdd(xIsOdd); ifft->SetInput(fft->GetOutput()); diff --git a/Modules/Filtering/FFT/test/itkFullToHalfHermitianImageFilterTest.cxx b/Modules/Filtering/FFT/test/itkFullToHalfHermitianImageFilterTest.cxx index e724f4856d9..d321439a167 100644 --- a/Modules/Filtering/FFT/test/itkFullToHalfHermitianImageFilterTest.cxx +++ b/Modules/Filtering/FFT/test/itkFullToHalfHermitianImageFilterTest.cxx @@ -41,7 +41,7 @@ itkFullToHalfHermitianImageFilterTest(int argc, char * argv[]) using ComplexImageType = itk::Image, 2>; using RandomSourceType = itk::RandomImageSource; - auto source = RandomSourceType::New(); + auto source = RandomSourceType::New(); RandomSourceType::SizeType size; size[0] = std::stoi(argv[1]); size[1] = std::stoi(argv[2]); diff --git a/Modules/Filtering/FFT/test/itkHalfToFullHermitianImageFilterTest.cxx b/Modules/Filtering/FFT/test/itkHalfToFullHermitianImageFilterTest.cxx index b9d035d83bd..9aeee1c71c1 100644 --- a/Modules/Filtering/FFT/test/itkHalfToFullHermitianImageFilterTest.cxx +++ b/Modules/Filtering/FFT/test/itkHalfToFullHermitianImageFilterTest.cxx @@ -40,7 +40,7 @@ itkHalfToFullHermitianImageFilterTest(int argc, char * argv[]) using ComplexImageType = itk::Image, 2>; using RandomSourceType = itk::RandomImageSource; - auto source = RandomSourceType::New(); + auto source = RandomSourceType::New(); RandomSourceType::SizeType size; size[0] = std::stoi(argv[1]); size[1] = std::stoi(argv[2]); @@ -78,7 +78,7 @@ itkHalfToFullHermitianImageFilterTest(int argc, char * argv[]) // Test that the output is the expected size. const ComplexImageType::RegionType halfToFullOutputRegion = halfToFullFilter->GetOutput()->GetLargestPossibleRegion(); - const ComplexImageType::SizeType halfToFullOutputSize = halfToFullOutputRegion.GetSize(); + const ComplexImageType::SizeType halfToFullOutputSize = halfToFullOutputRegion.GetSize(); if (halfToFullOutputSize != size) { std::cerr << "HalfToFullHermitianImageFilter did not produce an image of the expected size. " << std::endl; diff --git a/Modules/Filtering/FFT/test/itkRealFFTTest.h b/Modules/Filtering/FFT/test/itkRealFFTTest.h index a348a730a97..494d24a00a4 100644 --- a/Modules/Filtering/FFT/test/itkRealFFTTest.h +++ b/Modules/Filtering/FFT/test/itkRealFFTTest.h @@ -44,8 +44,8 @@ test_fft(unsigned int * SizeOfDimensions) { using RealImageType = itk::Image; using ComplexImageType = itk::Image, VImageDimensions>; - unsigned int counter = 0; - typename RealImageType::SizeType imageSize; + unsigned int counter = 0; + typename RealImageType::SizeType imageSize; typename RealImageType::IndexType imageIndex; // We are testing the FFT for 1D, 2D, and 3D images. An array @@ -125,8 +125,8 @@ test_fft(unsigned int * SizeOfDimensions) } // Get the size and the pointer to the complex image. - const typename ComplexImageType::Pointer complexImage = R2C->GetOutput(); - std::complex * fftbuf = complexImage->GetBufferPointer(); + const typename ComplexImageType::Pointer complexImage = R2C->GetOutput(); + std::complex * fftbuf = complexImage->GetBufferPointer(); const typename ComplexImageType::SizeType & complexImageSize = complexImage->GetLargestPossibleRegion().GetSize(); unsigned int sizes[4] = { 1, 1, 1, 1 }; @@ -230,8 +230,8 @@ test_fft_rtc(unsigned int * SizeOfDimensions) { using RealImageType = itk::Image; using ComplexImageType = itk::Image, VImageDimensions>; - unsigned int counter = 0; - typename RealImageType::SizeType imageSize; + unsigned int counter = 0; + typename RealImageType::SizeType imageSize; typename RealImageType::IndexType imageIndex; // We are testing the FFT for 1D, 2D, and 3D images. An array @@ -302,12 +302,12 @@ test_fft_rtc(unsigned int * SizeOfDimensions) R2Cb->Update(); // Get the size and the pointer to the complex image. - const typename ComplexImageType::Pointer complexImageA = R2Ca->GetOutput(); - std::complex * fftbufA = complexImageA->GetBufferPointer(); + const typename ComplexImageType::Pointer complexImageA = R2Ca->GetOutput(); + std::complex * fftbufA = complexImageA->GetBufferPointer(); const typename ComplexImageType::SizeType & complexImageSizeA = complexImageA->GetLargestPossibleRegion().GetSize(); - const typename ComplexImageType::Pointer complexImageB = R2Cb->GetOutput(); - std::complex * fftbufB = complexImageB->GetBufferPointer(); + const typename ComplexImageType::Pointer complexImageB = R2Cb->GetOutput(); + std::complex * fftbufB = complexImageB->GetBufferPointer(); const typename ComplexImageType::SizeType & complexImageSizeB = complexImageB->GetLargestPossibleRegion().GetSize(); @@ -369,7 +369,7 @@ test_fft_rtc(unsigned int * SizeOfDimensions) for (unsigned int k = 0; k < std::min(sizesA[0], sizesB[0]); ++k) { const double val = itk::Math::abs(fftbufA[zStrideA + yStrideA + k]); - double diff = itk::Math::abs(fftbufA[zStrideA + yStrideA + k] - fftbufB[zStrideB + yStrideB + k]); + double diff = itk::Math::abs(fftbufA[zStrideA + yStrideA + k] - fftbufB[zStrideB + yStrideB + k]); if (itk::Math::NotAlmostEquals(val, 0.0)) { diff /= itk::Math::abs(val); diff --git a/Modules/Filtering/FFT/test/itkVnlComplexToComplexFFTImageFilterTest.cxx b/Modules/Filtering/FFT/test/itkVnlComplexToComplexFFTImageFilterTest.cxx index 66be90be373..705d597d496 100644 --- a/Modules/Filtering/FFT/test/itkVnlComplexToComplexFFTImageFilterTest.cxx +++ b/Modules/Filtering/FFT/test/itkVnlComplexToComplexFFTImageFilterTest.cxx @@ -85,8 +85,8 @@ itkVnlComplexToComplexFFTImageFilterTest(int argc, char * argv[]) << std::endl; return EXIT_FAILURE; } - const char * inputImageFileName = argv[1]; - const char * outputImageFileName = argv[2]; + const char * inputImageFileName = argv[1]; + const char * outputImageFileName = argv[2]; const std::string pixelTypeString(argv[3]); const itk::ImageIOBase::Pointer imageIO = diff --git a/Modules/Filtering/FFT/test/itkVnlFFTTest.cxx b/Modules/Filtering/FFT/test/itkVnlFFTTest.cxx index 591e9427301..969275c1853 100644 --- a/Modules/Filtering/FFT/test/itkVnlFFTTest.cxx +++ b/Modules/Filtering/FFT/test/itkVnlFFTTest.cxx @@ -48,7 +48,7 @@ itkVnlFFTTest(int, char *[]) unsigned int SizeOfDimensions1[] = { 4, 4, 4, 4 }; unsigned int SizeOfDimensions2[] = { 3, 5, 4 }; unsigned int SizeOfDimensions3[] = { 7, 6, 4 }; // Should fail - int rval = 0; + int rval = 0; std::cerr << "Vnl float,1 (4,4,4)" << std::endl; if ((test_fft, itk::VnlInverseFFTImageFilter>( SizeOfDimensions1)) != 0) diff --git a/Modules/Filtering/FFT/test/itkVnlFFTWD_FFTTest.cxx b/Modules/Filtering/FFT/test/itkVnlFFTWD_FFTTest.cxx index ef858121ff0..bb2a1f6976c 100644 --- a/Modules/Filtering/FFT/test/itkVnlFFTWD_FFTTest.cxx +++ b/Modules/Filtering/FFT/test/itkVnlFFTWD_FFTTest.cxx @@ -43,7 +43,7 @@ itkVnlFFTWD_FFTTest(int, char *[]) unsigned int SizeOfDimensions1[] = { 4, 4, 4 }; unsigned int SizeOfDimensions2[] = { 3, 5, 4 }; - int rval = 0; + int rval = 0; std::cerr << "VnlFFTWD:double,1 (4,4,4)" << std::endl; if ((test_fft_rtc, itk::FFTWForwardFFTImageFilter>( SizeOfDimensions1)) != 0) diff --git a/Modules/Filtering/FFT/test/itkVnlFFTWD_RealFFTTest.cxx b/Modules/Filtering/FFT/test/itkVnlFFTWD_RealFFTTest.cxx index 0d736a36087..af034653e05 100644 --- a/Modules/Filtering/FFT/test/itkVnlFFTWD_RealFFTTest.cxx +++ b/Modules/Filtering/FFT/test/itkVnlFFTWD_RealFFTTest.cxx @@ -43,7 +43,7 @@ itkVnlFFTWD_RealFFTTest(int, char *[]) unsigned int SizeOfDimensions1[] = { 4, 4, 4 }; unsigned int SizeOfDimensions2[] = { 3, 5, 4 }; - int rval = 0; + int rval = 0; std::cerr << "VnlFFTWD:double,1 (4,4,4)" << std::endl; if ((test_fft_rtc, itk::FFTWForwardFFTImageFilter>( SizeOfDimensions1)) != 0) diff --git a/Modules/Filtering/FFT/test/itkVnlFFTWF_RealFFTTest.cxx b/Modules/Filtering/FFT/test/itkVnlFFTWF_RealFFTTest.cxx index 77dc15e2ebc..74b102f3de7 100644 --- a/Modules/Filtering/FFT/test/itkVnlFFTWF_RealFFTTest.cxx +++ b/Modules/Filtering/FFT/test/itkVnlFFTWF_RealFFTTest.cxx @@ -29,10 +29,10 @@ int itkVnlFFTWF_RealFFTTest( # ifndef ITK_USE_CUFFTW - int argc, + int argc, char * argv[] # else - int itkNotUsed(argc), + int itkNotUsed(argc), char * itkNotUsed(argv)[] # endif ) @@ -58,7 +58,7 @@ itkVnlFFTWF_RealFFTTest( unsigned int SizeOfDimensions1[] = { 4, 4, 4 }; unsigned int SizeOfDimensions2[] = { 3, 5, 4 }; - int rval = 0; + int rval = 0; std::cerr << "VnlFFTWF:float,1 (4,4,4)" << std::endl; if ((test_fft_rtcBegin(); - typename Superclass::NodeContainer::ConstIterator pointsIter = (this->GetAlivePoints())->Begin(); + typename AuxValueContainer::ConstIterator auxIter = m_AuxAliveValues->Begin(); + typename Superclass::NodeContainer::ConstIterator pointsIter = (this->GetAlivePoints())->Begin(); const typename Superclass::NodeContainer::ConstIterator pointsEnd = (this->GetAlivePoints())->End(); for (; pointsIter != pointsEnd; ++pointsIter, ++auxIter) @@ -173,8 +173,8 @@ FastMarchingExtensionImageFilterBegin(); - typename Superclass::NodeContainer::ConstIterator pointsIter = (this->GetTrialPoints())->Begin(); + typename AuxValueContainer::ConstIterator auxIter = m_AuxTrialValues->Begin(); + typename Superclass::NodeContainer::ConstIterator pointsIter = (this->GetTrialPoints())->Begin(); const typename Superclass::NodeContainer::ConstIterator pointsEnd = (this->GetTrialPoints())->End(); for (; pointsIter != pointsEnd; ++pointsIter, ++auxIter) @@ -199,9 +199,9 @@ FastMarchingExtensionImageFilter double FastMarchingExtensionImageFilter::UpdateValue( - const IndexType & index, + const IndexType & index, const SpeedImageType * speed, - LevelSetImageType * output) + LevelSetImageType * output) { // A extension value at node is chosen such that // grad(F) dot_product grad(Phi) = 0 @@ -225,8 +225,8 @@ FastMarchingExtensionImageFilter: template void FastMarchingExtensionImageFilterBase::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); os << indent << "Aux alive values: "; @@ -146,8 +146,8 @@ FastMarchingExtensionImageFilterBase: if (m_AuxiliaryAliveValues) { - AuxValueContainerConstIterator auxIter = m_AuxiliaryAliveValues->Begin(); - NodePairContainerConstIterator pointsIter = this->m_AlivePoints->Begin(); + AuxValueContainerConstIterator auxIter = m_AuxiliaryAliveValues->Begin(); + NodePairContainerConstIterator pointsIter = this->m_AlivePoints->Begin(); const NodePairContainerConstIterator pointsEnd = this->m_AlivePoints->Begin(); while (pointsIter != pointsEnd) @@ -170,8 +170,8 @@ FastMarchingExtensionImageFilterBase: if (m_AuxiliaryTrialValues) { - AuxValueContainerConstIterator auxIter = m_AuxiliaryTrialValues->Begin(); - NodePairContainerConstIterator pointsIter = this->m_TrialPoints->Begin(); + AuxValueContainerConstIterator auxIter = m_AuxiliaryTrialValues->Begin(); + NodePairContainerConstIterator pointsIter = this->m_TrialPoints->Begin(); const NodePairContainerConstIterator pointsEnd = this->m_TrialPoints->End(); while (pointsIter != pointsEnd) @@ -196,7 +196,7 @@ FastMarchingExtensionImageFilterBase: template void FastMarchingExtensionImageFilterBase::UpdateValue(OutputImageType * oImage, - const NodeType & iNode) + const NodeType & iNode) { // A extension value at node is chosen such that // grad(F) dot_product grad(Phi) = 0 @@ -234,8 +234,8 @@ FastMarchingExtensionImageFilterBase: // update auxiliary values for (unsigned int k = 0; k < AuxDimension; ++k) { - double numer = 0.; - double denom = 0.; + double numer = 0.; + double denom = 0.; AuxValueType auxVal; for (unsigned int j = 0; j < ImageDimension; ++j) diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.h b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.h index d4b5974e8b8..543a2837ac9 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.h @@ -54,7 +54,7 @@ class FastMarchingImageFilterEnums }; // Define how to print enumeration extern ITKFastMarching_EXPORT std::ostream & - operator<<(std::ostream & out, const FastMarchingImageFilterEnums::Label value); +operator<<(std::ostream & out, const FastMarchingImageFilterEnums::Label value); /** * \class FastMarchingImageFilter @@ -228,7 +228,7 @@ class ITK_TEMPLATE_EXPORT FastMarchingImageFilter : public ImageToImageFilterGetLargestPossibleRegion()); b_it.GoToBegin(); - TPixel zero_value{}; + TPixel zero_value{}; typename NodeContainer::ElementIdentifier NumberOfPoints = 0; NodeType node; @@ -439,17 +439,17 @@ class ITK_TEMPLATE_EXPORT FastMarchingImageFilter : public ImageToImageFilter::Initialize(LevelSetImageType * } // process input alive points - AxisNodeType node; + AxisNodeType node; NodeIndexType idx; if (m_AlivePoints) { - typename NodeContainer::ConstIterator pointsIter = m_AlivePoints->Begin(); + typename NodeContainer::ConstIterator pointsIter = m_AlivePoints->Begin(); const typename NodeContainer::ConstIterator pointsEnd = m_AlivePoints->End(); while (pointsIter != pointsEnd) @@ -184,7 +184,7 @@ FastMarchingImageFilter::Initialize(LevelSetImageType * if (m_OutsidePoints) { - typename NodeContainer::ConstIterator pointsIter = m_OutsidePoints->Begin(); + typename NodeContainer::ConstIterator pointsIter = m_OutsidePoints->Begin(); const typename NodeContainer::ConstIterator pointsEnd = m_OutsidePoints->End(); while (pointsIter != pointsEnd) @@ -216,7 +216,7 @@ FastMarchingImageFilter::Initialize(LevelSetImageType * // process the input trial points if (m_TrialPoints) { - typename NodeContainer::ConstIterator pointsIter = m_TrialPoints->Begin(); + typename NodeContainer::ConstIterator pointsIter = m_TrialPoints->Begin(); const typename NodeContainer::ConstIterator pointsEnd = m_TrialPoints->End(); while (pointsIter != pointsEnd) @@ -253,7 +253,7 @@ FastMarchingImageFilter::GenerateData() throw err; } - const LevelSetPointer output = this->GetOutput(); + const LevelSetPointer output = this->GetOutput(); const SpeedImageConstPointer speedImage = this->GetInput(); this->Initialize(output); @@ -265,8 +265,8 @@ FastMarchingImageFilter::GenerateData() // process points on the heap AxisNodeType node; - double currentValue; - double oldProgress = 0; + double currentValue; + double oldProgress = 0; this->UpdateProgress(0.0); // Send first progress event @@ -325,9 +325,9 @@ FastMarchingImageFilter::GenerateData() template void -FastMarchingImageFilter::UpdateNeighbors(const IndexType & index, +FastMarchingImageFilter::UpdateNeighbors(const IndexType & index, const SpeedImageType * speedImage, - LevelSetImageType * output) + LevelSetImageType * output) { IndexType neighIndex = index; @@ -369,9 +369,9 @@ FastMarchingImageFilter::UpdateNeighbors(const IndexType template double -FastMarchingImageFilter::UpdateValue(const IndexType & index, +FastMarchingImageFilter::UpdateValue(const IndexType & index, const SpeedImageType * speedImage, - LevelSetImageType * output) + LevelSetImageType * output) { IndexType neighIndex = index; diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.h b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.h index 9c7bb66f09b..6ee7b7cf927 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.h @@ -168,14 +168,14 @@ class ITK_TEMPLATE_EXPORT FastMarchingImageFilterBase : public FastMarchingBase< PrintSelf(std::ostream & os, Indent indent) const override; OutputRegionType m_BufferedRegion{}; - NodeType m_StartIndex{}; - NodeType m_LastIndex{}; + NodeType m_StartIndex{}; + NodeType m_LastIndex{}; - OutputRegionType m_OutputRegion{}; - OutputPointType m_OutputOrigin{}; - OutputSpacingType m_OutputSpacing{}; + OutputRegionType m_OutputRegion{}; + OutputPointType m_OutputOrigin{}; + OutputSpacingType m_OutputSpacing{}; OutputDirectionType m_OutputDirection{}; - bool m_OverrideOutputInformation{ false }; + bool m_OverrideOutputInformation{ false }; /** Generate the output image meta information. */ void @@ -184,7 +184,7 @@ class ITK_TEMPLATE_EXPORT FastMarchingImageFilterBase : public FastMarchingBase< void EnlargeOutputRequestedRegion(DataObject * output) override; - LabelImagePointer m_LabelImage{}; + LabelImagePointer m_LabelImage{}; ConnectedComponentImagePointer m_ConnectedComponentImage{}; IdentifierType diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx index 4c4a1dae032..85f7fea0503 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx @@ -35,9 +35,9 @@ public: : m_Value(NumericTraits::max()) {} - NodeType m_Node; + NodeType m_Node; OutputPixelType m_Value; - unsigned int m_Axis{ 0 }; + unsigned int m_Axis{ 0 }; bool operator<(const InternalNodeStructure & iRight) const @@ -112,8 +112,8 @@ FastMarchingImageFilterBase::GetTotalNumberOfNodes() const template void -FastMarchingImageFilterBase::SetOutputValue(OutputImageType * oImage, - const NodeType & iNode, +FastMarchingImageFilterBase::SetOutputValue(OutputImageType * oImage, + const NodeType & iNode, const OutputPixelType & iValue) { return oImage->SetPixel(iNode, iValue); @@ -136,7 +136,7 @@ FastMarchingImageFilterBase::GetLabelValueForGivenNode(const No template void -FastMarchingImageFilterBase::SetLabelValueForGivenNode(const NodeType & iNode, +FastMarchingImageFilterBase::SetLabelValueForGivenNode(const NodeType & iNode, const LabelType & iLabel) { m_LabelImage->SetPixel(iNode, iLabel); @@ -195,8 +195,8 @@ FastMarchingImageFilterBase::UpdateValue(OutputImageType * oIma template void -FastMarchingImageFilterBase::GetInternalNodesUsed(OutputImageType * oImage, - const NodeType & iNode, +FastMarchingImageFilterBase::GetInternalNodesUsed(OutputImageType * oImage, + const NodeType & iNode, InternalNodeStructureArray & ioNodesUsed) { NodeType neighbor_node = iNode; @@ -247,8 +247,8 @@ FastMarchingImageFilterBase::GetInternalNodesUsed(OutputImageTy template double -FastMarchingImageFilterBase::Solve(OutputImageType * itkNotUsed(oImage), - const NodeType & iNode, +FastMarchingImageFilterBase::Solve(OutputImageType * itkNotUsed(oImage), + const NodeType & iNode, InternalNodeStructureArray & iNeighbors) const { // Sort the local list @@ -336,7 +336,7 @@ FastMarchingImageFilterBase::CheckTopology(OutputImageType * oI if (strictTopologyViolation) { // Check for handles - auto radius = MakeFilled(1); + auto radius = MakeFilled(1); NeighborhoodIteratorType ItL(radius, this->m_LabelImage, this->m_LabelImage->GetBufferedRegion()); ItL.SetLocation(iNode); @@ -438,7 +438,7 @@ FastMarchingImageFilterBase::InitializeOutput(OutputImageType * OutputPixelType outputPixel = this->m_LargeValue; if (this->m_AlivePoints) { - NodePairContainerConstIterator pointsIter = this->m_AlivePoints->Begin(); + NodePairContainerConstIterator pointsIter = this->m_AlivePoints->Begin(); const NodePairContainerConstIterator pointsEnd = this->m_AlivePoints->End(); while (pointsIter != pointsEnd) @@ -467,7 +467,7 @@ FastMarchingImageFilterBase::InitializeOutput(OutputImageType * if (this->m_ForbiddenPoints) { - NodePairContainerConstIterator pointsIter = this->m_ForbiddenPoints->Begin(); + NodePairContainerConstIterator pointsIter = this->m_ForbiddenPoints->Begin(); const NodePairContainerConstIterator pointsEnd = this->m_ForbiddenPoints->End(); constexpr OutputPixelType zero{}; @@ -516,7 +516,7 @@ FastMarchingImageFilterBase::InitializeOutput(OutputImageType * // Process the input trial points if (this->m_TrialPoints) { - NodePairContainerConstIterator pointsIter = this->m_TrialPoints->Begin(); + NodePairContainerConstIterator pointsIter = this->m_TrialPoints->Begin(); const NodePairContainerConstIterator pointsEnd = this->m_TrialPoints->End(); while (pointsIter != pointsEnd) diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx index 1d71c00b726..4040a3a8e64 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx @@ -119,8 +119,8 @@ FastMarchingImageToNodePairContainerAdaptor::GenerateDa template void -FastMarchingImageToNodePairContainerAdaptor::SetPointsFromImage(const ImageType * image, - const LabelType & iLabel, +FastMarchingImageToNodePairContainerAdaptor::SetPointsFromImage(const ImageType * image, + const LabelType & iLabel, const OutputPixelType & iValue) { if (iLabel == Traits::Alive || iLabel == Traits::InitialTrial || iLabel == Traits::Forbidden) diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.h b/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.h index 1cda5ba21be..584d54b8944 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.h @@ -129,17 +129,17 @@ class ITK_TEMPLATE_EXPORT FastMarchingQuadEdgeMeshFilterBase : public FastMarchi UpdateValue(OutputMeshType * oMesh, const NodeType & iNode) override; const OutputVectorRealType - Solve(OutputMeshType * oMesh, - const NodeType & iId, - const OutputPointType & iCurrentPoint, + Solve(OutputMeshType * oMesh, + const NodeType & iId, + const OutputPointType & iCurrentPoint, const OutputVectorRealType & iF, - const NodeType & iId1, - const OutputPointType & iP1, - const bool iIsFar1, - const OutputVectorRealType iVal1, - const NodeType & iId2, - const OutputPointType & iP2, - const bool iIsFar2, + const NodeType & iId1, + const OutputPointType & iP1, + const bool iIsFar1, + const OutputVectorRealType iVal1, + const NodeType & iId2, + const OutputPointType & iP2, + const bool iIsFar2, const OutputVectorRealType & iVal2) const; @@ -154,18 +154,18 @@ class ITK_TEMPLATE_EXPORT FastMarchingQuadEdgeMeshFilterBase : public FastMarchi const OutputVectorRealType & iF) const; bool - UnfoldTriangle(OutputMeshType * oMesh, + UnfoldTriangle(OutputMeshType * oMesh, const OutputPointIdentifierType & iId, - const OutputPointType & iP, + const OutputPointType & iP, const OutputPointIdentifierType & iId1, - const OutputPointType & iP1, + const OutputPointType & iP1, const OutputPointIdentifierType & iId2, - const OutputPointType & iP2, - OutputVectorRealType & oNorm, - OutputVectorRealType & oSqNorm, - OutputVectorRealType & oDot1, - OutputVectorRealType & oDot2, - OutputPointIdentifierType & oId) const; + const OutputPointType & iP2, + OutputVectorRealType & oNorm, + OutputVectorRealType & oSqNorm, + OutputVectorRealType & oDot1, + OutputVectorRealType & oDot2, + OutputPointIdentifierType & oId) const; bool CheckTopology(OutputMeshType * oMesh, const NodeType & iNode) override; diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx index 35bdcea5c93..0f70cf6c348 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx @@ -42,8 +42,8 @@ FastMarchingQuadEdgeMeshFilterBase::GetTotalNumberOfNodes() con template void -FastMarchingQuadEdgeMeshFilterBase::SetOutputValue(OutputMeshType * oMesh, - const NodeType & iNode, +FastMarchingQuadEdgeMeshFilterBase::SetOutputValue(OutputMeshType * oMesh, + const NodeType & iNode, const OutputPixelType & iValue) { oMesh->SetPointData(iNode, iValue); @@ -78,7 +78,7 @@ FastMarchingQuadEdgeMeshFilterBase::GetLabelValueForGivenNode(c template void -FastMarchingQuadEdgeMeshFilterBase::SetLabelValueForGivenNode(const NodeType & iNode, +FastMarchingQuadEdgeMeshFilterBase::SetLabelValueForGivenNode(const NodeType & iNode, const LabelType & iLabel) { m_Label[iNode] = iLabel; @@ -217,24 +217,24 @@ FastMarchingQuadEdgeMeshFilterBase::UpdateValue(OutputMeshType template const typename FastMarchingQuadEdgeMeshFilterBase::OutputVectorRealType -FastMarchingQuadEdgeMeshFilterBase::Solve(OutputMeshType * oMesh, - const NodeType & iId, - const OutputPointType & iCurrentPoint, +FastMarchingQuadEdgeMeshFilterBase::Solve(OutputMeshType * oMesh, + const NodeType & iId, + const OutputPointType & iCurrentPoint, const OutputVectorRealType & iF, - const NodeType & iId1, - const OutputPointType & iP1, - const bool iIsFar1, - const OutputVectorRealType iVal1, - const NodeType & iId2, - const OutputPointType & iP2, - const bool iIsFar2, + const NodeType & iId1, + const OutputPointType & iP1, + const bool iIsFar1, + const OutputVectorRealType iVal1, + const NodeType & iId2, + const OutputPointType & iP2, + const bool iIsFar2, const OutputVectorRealType & iVal2) const { OutputVectorType Edge1 = iP1 - iCurrentPoint; OutputVectorType Edge2 = iP2 - iCurrentPoint; const OutputVectorRealType sq_norm1 = Edge1.GetSquaredNorm(); - OutputVectorRealType norm1 = 0.; + OutputVectorRealType norm1 = 0.; const OutputVectorRealType epsilon = NumericTraits::epsilon(); @@ -247,7 +247,7 @@ FastMarchingQuadEdgeMeshFilterBase::Solve(OutputMeshType * } const OutputVectorRealType sq_norm2 = Edge2.GetSquaredNorm(); - OutputVectorRealType norm2 = 0.; + OutputVectorRealType norm2 = 0.; if (sq_norm2 > epsilon) { @@ -278,10 +278,10 @@ FastMarchingQuadEdgeMeshFilterBase::Solve(OutputMeshType * } else { - OutputVectorRealType sq_norm3; - OutputVectorRealType norm3; - OutputVectorRealType dot1; - OutputVectorRealType dot2; + OutputVectorRealType sq_norm3; + OutputVectorRealType norm3; + OutputVectorRealType dot1; + OutputVectorRealType dot2; OutputPointIdentifierType new_id; const bool unfolded = @@ -291,7 +291,7 @@ FastMarchingQuadEdgeMeshFilterBase::Solve(OutputMeshType * { const OutputVectorRealType t_sq_norm3 = norm3 * norm3; - auto val3 = static_cast(this->GetOutputValue(oMesh, new_id)); + auto val3 = static_cast(this->GetOutputValue(oMesh, new_id)); const OutputVectorRealType t1 = ComputeUpdate(iVal1, val3, norm3, t_sq_norm3, norm1, sq_norm1, dot1, iF); const OutputVectorRealType t2 = ComputeUpdate(iVal2, val3, norm3, t_sq_norm3, norm2, sq_norm2, dot2, iF); @@ -378,20 +378,20 @@ FastMarchingQuadEdgeMeshFilterBase::ComputeUpdate(const OutputV template bool -FastMarchingQuadEdgeMeshFilterBase::UnfoldTriangle(OutputMeshType * oMesh, +FastMarchingQuadEdgeMeshFilterBase::UnfoldTriangle(OutputMeshType * oMesh, const OutputPointIdentifierType & itkNotUsed(iId), - const OutputPointType & iP, + const OutputPointType & iP, const OutputPointIdentifierType & iId1, - const OutputPointType & iP1, + const OutputPointType & iP1, const OutputPointIdentifierType & iId2, - const OutputPointType & iP2, - OutputVectorRealType & oNorm, - OutputVectorRealType & oSqNorm, - OutputVectorRealType & oDot1, - OutputVectorRealType & oDot2, - OutputPointIdentifierType & oId) const + const OutputPointType & iP2, + OutputVectorRealType & oNorm, + OutputVectorRealType & oSqNorm, + OutputVectorRealType & oDot1, + OutputVectorRealType & oDot2, + OutputPointIdentifierType & oId) const { - OutputVectorType Edge1 = iP1 - iP; + OutputVectorType Edge1 = iP1 - iP; OutputVectorRealType Norm1 = Edge1.GetNorm(); const OutputVectorRealType epsilon = NumericTraits::epsilon(); @@ -402,7 +402,7 @@ FastMarchingQuadEdgeMeshFilterBase::UnfoldTriangle(OutputMeshTy Edge1 *= inv_Norm; } - OutputVectorType Edge2 = iP2 - iP; + OutputVectorType Edge2 = iP2 - iP; OutputVectorRealType Norm2 = Edge2.GetNorm(); if (Norm2 > epsilon) { @@ -448,7 +448,7 @@ FastMarchingQuadEdgeMeshFilterBase::UnfoldTriangle(OutputMeshTy unsigned int nNum = 0; while (nNum < 50 && qe->GetLeft() != OutputMeshType::m_NoFace) { - OutputQEType * qe_Lnext = qe->GetLnext(); + OutputQEType * qe_Lnext = qe->GetLnext(); const OutputPointIdentifierType t_id = qe_Lnext->GetDestination(); oMesh->GetPoint(t_id, &t_pt); @@ -500,10 +500,10 @@ FastMarchingQuadEdgeMeshFilterBase::UnfoldTriangle(OutputMeshTy const OutputVectorRealType lambda12 = -(x1 * v2) / ((x - x1) * v2); // right most const OutputVectorRealType lambda21 = -(x2 * v1) / ((x - x2) * v1); // left most const OutputVectorRealType lambda22 = -(x2 * v2) / ((x - x2) * v2); // right most - const bool bIntersect11 = (lambda11 >= 0.) && (lambda11 <= 1.); - const bool bIntersect12 = (lambda12 >= 0.) && (lambda12 <= 1.); - const bool bIntersect21 = (lambda21 >= 0.) && (lambda21 <= 1.); - const bool bIntersect22 = (lambda22 >= 0.) && (lambda22 <= 1.); + const bool bIntersect11 = (lambda11 >= 0.) && (lambda11 <= 1.); + const bool bIntersect12 = (lambda12 >= 0.) && (lambda12 <= 1.); + const bool bIntersect21 = (lambda21 >= 0.) && (lambda21 <= 1.); + const bool bIntersect22 = (lambda22 >= 0.) && (lambda22 <= 1.); if (bIntersect11 && bIntersect12) { @@ -584,8 +584,8 @@ FastMarchingQuadEdgeMeshFilterBase::InitializeOutput(OutputMesh // Check that the input mesh is made of triangles { - const OutputCellsContainerPointer cells = oMesh->GetCells(); - OutputCellsContainerConstIterator c_it = cells->Begin(); + const OutputCellsContainerPointer cells = oMesh->GetCells(); + OutputCellsContainerConstIterator c_it = cells->Begin(); const OutputCellsContainerConstIterator c_end = cells->End(); while (c_it != c_end) @@ -605,7 +605,7 @@ FastMarchingQuadEdgeMeshFilterBase::InitializeOutput(OutputMesh const OutputPointDataContainerPointer pointdata = OutputPointDataContainer::New(); pointdata->Reserve(points->Size()); - OutputPointsContainerIterator p_it = points->Begin(); + OutputPointsContainerIterator p_it = points->Begin(); const OutputPointsContainerIterator p_end = points->End(); while (p_it != p_end) @@ -620,7 +620,7 @@ FastMarchingQuadEdgeMeshFilterBase::InitializeOutput(OutputMesh if (this->m_AlivePoints) { - NodePairContainerConstIterator pointsIter = this->m_AlivePoints->Begin(); + NodePairContainerConstIterator pointsIter = this->m_AlivePoints->Begin(); const NodePairContainerConstIterator pointsEnd = this->m_AlivePoints->End(); while (pointsIter != pointsEnd) @@ -641,7 +641,7 @@ FastMarchingQuadEdgeMeshFilterBase::InitializeOutput(OutputMesh } if (this->m_ForbiddenPoints) { - NodePairContainerConstIterator pointsIter = this->m_ForbiddenPoints->Begin(); + NodePairContainerConstIterator pointsIter = this->m_ForbiddenPoints->Begin(); const NodePairContainerConstIterator pointsEnd = this->m_ForbiddenPoints->End(); constexpr OutputPixelType zero{}; @@ -661,7 +661,7 @@ FastMarchingQuadEdgeMeshFilterBase::InitializeOutput(OutputMesh } if (this->m_TrialPoints) { - NodePairContainerConstIterator pointsIter = this->m_TrialPoints->Begin(); + NodePairContainerConstIterator pointsIter = this->m_TrialPoints->Begin(); const NodePairContainerConstIterator pointsEnd = this->m_TrialPoints->End(); while (pointsIter != pointsEnd) diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h b/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h index e7f2b69fda8..b631c96af86 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h @@ -134,7 +134,7 @@ class ITK_TEMPLATE_EXPORT FastMarchingReachedTargetNodesStoppingCriterion // there is at least one TargetPoint. if (!m_TargetNodes.empty()) { - auto pointsIter = m_TargetNodes.begin(); + auto pointsIter = m_TargetNodes.begin(); const auto pointsEnd = m_TargetNodes.end(); while (pointsIter != pointsEnd) @@ -184,14 +184,14 @@ class ITK_TEMPLATE_EXPORT FastMarchingReachedTargetNodesStoppingCriterion /** Destructor */ ~FastMarchingReachedTargetNodesStoppingCriterion() override = default; - TargetConditionEnum m_TargetCondition{ TargetConditionEnum::AllTargets }; + TargetConditionEnum m_TargetCondition{ TargetConditionEnum::AllTargets }; std::vector m_TargetNodes{}; std::vector m_ReachedTargetNodes{}; - size_t m_NumberOfTargetsToBeReached{ 0 }; - OutputPixelType m_TargetOffset{}; - OutputPixelType m_StoppingValue{}; - bool m_Satisfied{ false }; - bool m_Initialized{ false }; + size_t m_NumberOfTargetsToBeReached{ 0 }; + OutputPixelType m_TargetOffset{}; + OutputPixelType m_StoppingValue{}; + bool m_Satisfied{ false }; + bool m_Initialized{ false }; void Reset() override diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.h b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.h index 6e6c3c4f9e6..55176e5c996 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.h @@ -258,10 +258,10 @@ class ITK_TEMPLATE_EXPORT FastMarchingUpwindGradientImageFilter : public FastMar UpdateNeighbors(const IndexType & index, const SpeedImageType *, LevelSetImageType *) override; virtual void - ComputeGradient(const IndexType & index, + ComputeGradient(const IndexType & index, const LevelSetImageType * output, - const LabelImageType * labelImage, - GradientImageType * gradientImage); + const LabelImageType * labelImage, + GradientImageType * gradientImage); /** Check that target points are set. * Returns true if at least a target point exists; returns false otherwise. diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.hxx index ea7dbd82fbb..c67f1277966 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.hxx @@ -151,9 +151,9 @@ FastMarchingUpwindGradientImageFilter::GenerateData() template void -FastMarchingUpwindGradientImageFilter::UpdateNeighbors(const IndexType & index, +FastMarchingUpwindGradientImageFilter::UpdateNeighbors(const IndexType & index, const SpeedImageType * speedImage, - LevelSetImageType * output) + LevelSetImageType * output) { Superclass::UpdateNeighbors(index, speedImage, output); @@ -172,7 +172,7 @@ FastMarchingUpwindGradientImageFilter::UpdateNeighbors(c if (m_TargetReachedMode == TargetConditionEnum::OneTarget) { - typename NodeContainer::ConstIterator pointsIter = m_TargetPoints->Begin(); + typename NodeContainer::ConstIterator pointsIter = m_TargetPoints->Begin(); const typename NodeContainer::ConstIterator pointsEnd = m_TargetPoints->End(); for (; pointsIter != pointsEnd; ++pointsIter) { @@ -187,7 +187,7 @@ FastMarchingUpwindGradientImageFilter::UpdateNeighbors(c } else if (m_TargetReachedMode == TargetConditionEnum::SomeTargets) { - typename NodeContainer::ConstIterator pointsIter = m_TargetPoints->Begin(); + typename NodeContainer::ConstIterator pointsIter = m_TargetPoints->Begin(); const typename NodeContainer::ConstIterator pointsEnd = m_TargetPoints->End(); for (; pointsIter != pointsEnd; ++pointsIter) { @@ -207,7 +207,7 @@ FastMarchingUpwindGradientImageFilter::UpdateNeighbors(c } else if (m_TargetReachedMode == TargetConditionEnum::AllTargets) { - typename NodeContainer::ConstIterator pointsIter = m_TargetPoints->Begin(); + typename NodeContainer::ConstIterator pointsIter = m_TargetPoints->Begin(); const typename NodeContainer::ConstIterator pointsEnd = m_TargetPoints->End(); for (; pointsIter != pointsEnd; ++pointsIter) { @@ -249,10 +249,10 @@ FastMarchingUpwindGradientImageFilter::UpdateNeighbors(c template void FastMarchingUpwindGradientImageFilter::ComputeGradient( - const IndexType & index, + const IndexType & index, const LevelSetImageType * output, - const LabelImageType * itkNotUsed(labelImage), - GradientImageType * gradientImage) + const LabelImageType * itkNotUsed(labelImage), + GradientImageType * gradientImage) { IndexType neighIndex = index; diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilterBase.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilterBase.hxx index 395b5539a36..45ff1ca9053 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilterBase.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilterBase.hxx @@ -87,7 +87,7 @@ FastMarchingUpwindGradientImageFilterBase::InitializeOutput(Out template void FastMarchingUpwindGradientImageFilterBase::UpdateNeighbors(OutputImageType * oImage, - const NodeType & iNode) + const NodeType & iNode) { Superclass::UpdateNeighbors(oImage, iNode); @@ -100,13 +100,13 @@ FastMarchingUpwindGradientImageFilterBase::UpdateNeighbors(Outp template void FastMarchingUpwindGradientImageFilterBase::ComputeGradient(OutputImageType * oImage, - const NodeType & iNode) + const NodeType & iNode) { NodeType neighIndex = iNode; - OutputPixelType centerPixel; - OutputPixelType dx_forward; - OutputPixelType dx_backward; + OutputPixelType centerPixel; + OutputPixelType dx_forward; + OutputPixelType dx_backward; GradientPixelType gradientPixel; constexpr OutputPixelType ZERO{}; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingBaseTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingBaseTest.cxx index beb3a2af181..c34a8d50606 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingBaseTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingBaseTest.cxx @@ -155,9 +155,9 @@ itkFastMarchingBaseTest(int argc, char * argv[]) fmm->SetTopologyCheck(topologyCheck); ITK_TEST_SET_GET_VALUE(topologyCheck, fmm->GetTopologyCheck()); - auto processedPoints = ImageFastMarching::NodePairContainerType::New(); + auto processedPoints = ImageFastMarching::NodePairContainerType::New(); typename ImageFastMarching::NodePairType node_pair; - constexpr ImageType::OffsetType offset = { { 28, 35 } }; + constexpr ImageType::OffsetType offset = { { 28, 35 } }; constexpr itk::Index index{}; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx index bea2144ba99..ddbab7532b6 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx @@ -58,7 +58,7 @@ itkFastMarchingExtensionImageFilterTest(int, char *[]) auto marcher = MarcherType::New(); marcher->SetStoppingCriterion(criterion); - ShowProgressObject progressWatch(marcher); + ShowProgressObject progressWatch(marcher); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); @@ -117,7 +117,7 @@ itkFastMarchingExtensionImageFilterTest(int, char *[]) marcher->SetOutputSize(size); // setup a speed image of ones - auto speedImage = FloatImageType::New(); + auto speedImage = FloatImageType::New(); FloatImageType::RegionType region; region.SetSize(size); speedImage->SetLargestPossibleRegion(region); @@ -250,18 +250,18 @@ itkFastMarchingExtensionImageFilterTest(int, char *[]) // check the results passed = true; - const FloatImageType::Pointer output = marcher->GetOutput(); + const FloatImageType::Pointer output = marcher->GetOutput(); itk::ImageRegionIterator iterator(output, output->GetBufferedRegion()); using AuxImageType = MarcherType::AuxImageType; - const AuxImageType::Pointer auxImage = marcher->GetAuxiliaryImage(0); + const AuxImageType::Pointer auxImage = marcher->GetAuxiliaryImage(0); itk::ImageRegionIterator auxIterator(auxImage, auxImage->GetBufferedRegion()); while (!iterator.IsAtEnd()) { FloatImageType::IndexType tempIndex; - double distance; - float outputValue; + double distance; + float outputValue; tempIndex = iterator.GetIndex(); tempIndex -= offset0; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest1.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest1.cxx index f5a7118aba6..e96b3438cd2 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest1.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest1.cxx @@ -71,7 +71,7 @@ itkFastMarchingImageFilterRealTest1(int itkNotUsed(argc), char * itkNotUsed(argv marcher->SetStoppingCriterion(criterion); ITK_TEST_SET_GET_VALUE(criterion, marcher->GetStoppingCriterion()); - ShowProgressObject progressWatch(marcher); + ShowProgressObject progressWatch(marcher); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); @@ -141,7 +141,7 @@ itkFastMarchingImageFilterRealTest1(int itkNotUsed(argc), char * itkNotUsed(argv marcher->SetOutputSize(size); // Set up a speed image of ones - auto speedImage = FloatImageType::New(); + auto speedImage = FloatImageType::New(); FloatImageType::RegionType region; region.SetSize(size); speedImage->SetLargestPossibleRegion(region); diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest2.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest2.cxx index 59660c6a15c..1326473abc4 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest2.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest2.cxx @@ -68,7 +68,7 @@ itkFastMarchingImageFilterRealTest2(int itkNotUsed(argc), char * itkNotUsed(argv marcher->SetStoppingCriterion(criterion); - ShowProgressObject progressWatch(marcher); + ShowProgressObject progressWatch(marcher); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); @@ -79,7 +79,7 @@ itkFastMarchingImageFilterRealTest2(int itkNotUsed(argc), char * itkNotUsed(argv marcher->SetOutputSize(size); // Set up a speed image of ones - auto speedImage = FloatImageType::New(); + auto speedImage = FloatImageType::New(); FloatImageType::RegionType region; region.SetSize(size); speedImage->SetLargestPossibleRegion(region); @@ -128,7 +128,7 @@ itkFastMarchingImageFilterRealTest2(int itkNotUsed(argc), char * itkNotUsed(argv maskImage->SetBufferedRegion(region); maskImage->Allocate(); - itk::ImageRegionIterator speedIter(speedImage, speedImage->GetBufferedRegion()); + itk::ImageRegionIterator speedIter(speedImage, speedImage->GetBufferedRegion()); itk::ImageRegionIteratorWithIndex maskIter(maskImage, maskImage->GetBufferedRegion()); while (!speedIter.IsAtEnd()) { @@ -204,7 +204,7 @@ itkFastMarchingImageFilterRealTest2(int itkNotUsed(argc), char * itkNotUsed(argv while (!iterator.IsAtEnd()) { FloatImageType::IndexType tempIndex = iterator.GetIndex(); - auto outputValue = static_cast(iterator.Get()); + auto outputValue = static_cast(iterator.Get()); if (((tempIndex[0] > 22) && (tempIndex[0] < 42) && (tempIndex[1] > 27) && (tempIndex[1] < 37)) || ((tempIndex[1] > 22) && (tempIndex[1] < 42) && (tempIndex[0] > 27) && (tempIndex[0] < 37))) diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealWithNumberOfElementsTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealWithNumberOfElementsTest.cxx index 15160045ba6..f73cb43e01a 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealWithNumberOfElementsTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealWithNumberOfElementsTest.cxx @@ -107,7 +107,7 @@ itkFastMarchingImageFilterRealWithNumberOfElementsTest(int, char *[]) marcher->SetOutputSize(size); // setup a speed image of ones - auto speedImage = FloatImageType::New(); + auto speedImage = FloatImageType::New(); FloatImageType::RegionType region; region.SetSize(size); speedImage->SetLargestPossibleRegion(region); diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest.cxx index a3929eeb875..a87dd33a2e8 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest.cxx @@ -57,7 +57,7 @@ itkFastMarchingQuadEdgeMeshFilterBaseTest(int, char *[]) const MeshType::PointsContainerConstPointer points = sphere_output->GetPoints(); - MeshType::PointsContainerConstIterator p_it = points->Begin(); + MeshType::PointsContainerConstIterator p_it = points->Begin(); const MeshType::PointsContainerConstIterator p_end = points->End(); while (p_it != p_end) diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest2.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest2.cxx index c3ca92e1b09..b6f876ab02e 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest2.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest2.cxx @@ -54,7 +54,7 @@ itkFastMarchingQuadEdgeMeshFilterBaseTest2(int, char *[]) // Let's create here a plane! auto plane = MeshType::New(); - const PointsContainerPointer points = PointsContainer::New(); + const PointsContainerPointer points = PointsContainer::New(); const PointDataContainerPointer pointdata = PointDataContainer::New(); points->Reserve(100); @@ -127,7 +127,7 @@ itkFastMarchingQuadEdgeMeshFilterBaseTest2(int, char *[]) const PointDataContainerPointer output_data = output->GetPointData(); - PointDataContainer::ConstIterator o_data_it = output_data->Begin(); + PointDataContainer::ConstIterator o_data_it = output_data->Begin(); const PointDataContainer::ConstIterator o_data_end = output_data->End(); PointsContainer::ConstIterator p_it = points->Begin(); diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest3.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest3.cxx index 4188e79f749..257a716341b 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest3.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest3.cxx @@ -51,7 +51,7 @@ itkFastMarchingQuadEdgeMeshFilterBaseTest3(int, char *[]) // Let's create here a plane! auto plane = MeshType::New(); - const PointsContainerPointer points = PointsContainer::New(); + const PointsContainerPointer points = PointsContainer::New(); const PointDataContainerPointer pointdata = PointDataContainer::New(); points->Reserve(100); @@ -68,7 +68,7 @@ itkFastMarchingQuadEdgeMeshFilterBaseTest3(int, char *[]) p[1] = static_cast(j); if ((k % 2 == 0) && (i != 0) && (j != 0)) { - auto exp = static_cast(k / 2); + auto exp = static_cast(k / 2); const CoordType delta = 0.1 * std::pow(-1., exp); p[0] += delta; p[1] += delta; @@ -132,7 +132,7 @@ itkFastMarchingQuadEdgeMeshFilterBaseTest3(int, char *[]) const PointDataContainerPointer output_data = output->GetPointData(); - PointDataContainer::ConstIterator o_data_it = output_data->Begin(); + PointDataContainer::ConstIterator o_data_it = output_data->Begin(); const PointDataContainer::ConstIterator o_data_end = output_data->End(); PointsContainer::ConstIterator p_it = points->Begin(); diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest4.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest4.cxx index d1994a516b1..b302c0b60c4 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest4.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterBaseTest4.cxx @@ -54,7 +54,7 @@ itkFastMarchingQuadEdgeMeshFilterBaseTest4(int, char *[]) // Let's create here a plane! auto plane = MeshType::New(); - const PointsContainerPointer points = PointsContainer::New(); + const PointsContainerPointer points = PointsContainer::New(); const PointDataContainerPointer pointdata = PointDataContainer::New(); points->Reserve(100); @@ -63,9 +63,9 @@ itkFastMarchingQuadEdgeMeshFilterBaseTest4(int, char *[]) MeshType::PointType p; p[2] = 0.; - int k = 0; + int k = 0; constexpr double alpha = (30.0 / 180.0) * itk::Math::pi; - const double delta = 2.0 / std::tan(alpha); + const double delta = 2.0 / std::tan(alpha); for (int i = 0; i < 10; ++i) { @@ -129,7 +129,7 @@ itkFastMarchingQuadEdgeMeshFilterBaseTest4(int, char *[]) const PointDataContainerPointer output_data = output->GetPointData(); - PointDataContainer::ConstIterator o_data_it = output_data->Begin(); + PointDataContainer::ConstIterator o_data_it = output_data->Begin(); const PointDataContainer::ConstIterator o_data_end = output_data->End(); PointsContainer::ConstIterator p_it = points->Begin(); diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterWithNumberOfElementsTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterWithNumberOfElementsTest.cxx index 578d0829c73..4ba7e51a50c 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterWithNumberOfElementsTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingQuadEdgeMeshFilterWithNumberOfElementsTest.cxx @@ -56,7 +56,7 @@ itkFastMarchingQuadEdgeMeshFilterWithNumberOfElementsTest(int, char *[]) const MeshType::PointsContainerConstPointer points = sphere_output->GetPoints(); - MeshType::PointsContainerConstIterator p_it = points->Begin(); + MeshType::PointsContainerConstIterator p_it = points->Begin(); const MeshType::PointsContainerConstIterator p_end = points->End(); while (p_it != p_end) diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingTest.cxx index 0ce3434eadf..ae1ad7d117a 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingTest.cxx @@ -64,7 +64,7 @@ itkFastMarchingTest(int argc, char * argv[]) ITK_EXERCISE_BASIC_OBJECT_METHODS(marcher, FastMarchingImageFilter, ImageToImageFilter); - ShowProgressObject progressWatch(marcher); + ShowProgressObject progressWatch(marcher); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); @@ -175,7 +175,7 @@ itkFastMarchingTest(int argc, char * argv[]) ITK_TEST_SET_GET_BOOLEAN(marcher, OverrideOutputInformation, overrideOutputInformation); // setup a speed image of ones - auto speedImage = FloatImage::New(); + auto speedImage = FloatImage::New(); FloatImage::RegionType region; region.SetSize(size); speedImage->SetLargestPossibleRegion(region); @@ -198,7 +198,7 @@ itkFastMarchingTest(int argc, char * argv[]) marcher->Update(); // check the results - const FloatImage::Pointer output = marcher->GetOutput(); + const FloatImage::Pointer output = marcher->GetOutput(); itk::ImageRegionIterator iterator(output, output->GetBufferedRegion()); bool passed = true; @@ -207,8 +207,8 @@ itkFastMarchingTest(int argc, char * argv[]) { FloatImage::IndexType tempIndex; - double distance; - float outputValue; + double distance; + float outputValue; tempIndex = iterator.GetIndex(); tempIndex -= offset0; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingTest2.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingTest2.cxx index 9aa7e178169..83e3a0fe2c4 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingTest2.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingTest2.cxx @@ -52,7 +52,7 @@ itkFastMarchingTest2(int, char *[]) auto marcher = FloatFMType::New(); - ShowProgressObject progressWatch(marcher); + ShowProgressObject progressWatch(marcher); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); @@ -121,7 +121,7 @@ itkFastMarchingTest2(int, char *[]) marcher->SetOutputSize(size); // setup a speed image of ones - auto speedImage = FloatImage::New(); + auto speedImage = FloatImage::New(); FloatImage::RegionType region; region.SetSize(size); speedImage->SetLargestPossibleRegion(region); @@ -134,7 +134,7 @@ itkFastMarchingTest2(int, char *[]) MaskImage->SetBufferedRegion(region); MaskImage->Allocate(); - itk::ImageRegionIterator speedIter(speedImage, speedImage->GetBufferedRegion()); + itk::ImageRegionIterator speedIter(speedImage, speedImage->GetBufferedRegion()); itk::ImageRegionIteratorWithIndex maskIter(MaskImage, MaskImage->GetBufferedRegion()); while (!speedIter.IsAtEnd()) { @@ -168,14 +168,14 @@ itkFastMarchingTest2(int, char *[]) // check the results - const FloatImage::Pointer output = marcher->GetOutput(); + const FloatImage::Pointer output = marcher->GetOutput(); itk::ImageRegionIterator iterator(output, output->GetBufferedRegion()); bool passed = true; for (; !iterator.IsAtEnd(); ++iterator) { FloatImage::IndexType tempIndex = iterator.GetIndex(); - auto outputValue = static_cast(iterator.Get()); + auto outputValue = static_cast(iterator.Get()); if (((tempIndex[0] > 22) && (tempIndex[0] < 42) && (tempIndex[1] > 27) && (tempIndex[1] < 37)) || ((tempIndex[1] > 22) && (tempIndex[1] < 42) && (tempIndex[0] > 27) && (tempIndex[0] < 37))) diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingUpwindGradientBaseTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingUpwindGradientBaseTest.cxx index f2e039d5507..06978894115 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingUpwindGradientBaseTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingUpwindGradientBaseTest.cxx @@ -119,7 +119,7 @@ itkFastMarchingUpwindGradientBaseTest(int, char *[]) marcher->SetOutputSize(size); // setup a speed image of ones - auto speedImage = FloatImageType::New(); + auto speedImage = FloatImageType::New(); FloatImageType::RegionType region; region.SetSize(size); speedImage->SetLargestPossibleRegion(region); @@ -140,7 +140,7 @@ itkFastMarchingUpwindGradientBaseTest(int, char *[]) // check the results using FloatGradientImage = FloatFMType::GradientImageType; using GradientPixelType = FloatGradientImage::PixelType; - const FloatGradientImage::Pointer gradientOutput = marcher->GetGradientImage(); + const FloatGradientImage::Pointer gradientOutput = marcher->GetGradientImage(); itk::ImageRegionIterator iterator(gradientOutput, gradientOutput->GetBufferedRegion()); bool passed = true; @@ -148,8 +148,8 @@ itkFastMarchingUpwindGradientBaseTest(int, char *[]) while (!iterator.IsAtEnd()) { FloatGradientImage::IndexType tempIndex; - double distance; - GradientPixelType outputPixel; + double distance; + GradientPixelType outputPixel; tempIndex = iterator.GetIndex(); tempIndex -= offset0; @@ -196,7 +196,7 @@ itkFastMarchingUpwindGradientBaseTest(int, char *[]) constexpr FloatImageType::OffsetType offset1 = { { 50, 50 } }; constexpr FloatImageType::OffsetType offset2 = { { 40, 40 } }; // This point is farthest from the AlivePoint: - constexpr FloatImageType::OffsetType offset3 = { { 0, 0 } }; + constexpr FloatImageType::OffsetType offset3 = { { 0, 0 } }; const std::vector targetOffsets{ offset1, offset2, offset3 }; std::vector TargetNodes; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingUpwindGradientTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingUpwindGradientTest.cxx index ed9dde7f4bb..d305864b7a0 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingUpwindGradientTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingUpwindGradientTest.cxx @@ -125,7 +125,7 @@ itkFastMarchingUpwindGradientTest(int, char *[]) marcher->SetOutputSize(size); // setup a speed image of ones - auto speedImage = FloatImage::New(); + auto speedImage = FloatImage::New(); FloatImage::RegionType region; region.SetSize(size); speedImage->SetLargestPossibleRegion(region); @@ -178,7 +178,7 @@ itkFastMarchingUpwindGradientTest(int, char *[]) // check the results using FloatGradientImage = FloatFMType::GradientImageType; using GradientPixelType = FloatGradientImage::PixelType; - const FloatGradientImage::Pointer gradientOutput = marcher->GetGradientImage(); + const FloatGradientImage::Pointer gradientOutput = marcher->GetGradientImage(); itk::ImageRegionIterator iterator(gradientOutput, gradientOutput->GetBufferedRegion()); bool passed = true; @@ -187,8 +187,8 @@ itkFastMarchingUpwindGradientTest(int, char *[]) { FloatGradientImage::IndexType tempIndex; - double distance; - GradientPixelType outputPixel; + double distance; + GradientPixelType outputPixel; tempIndex = iterator.GetIndex(); tempIndex -= offset0; diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUAnisotropicDiffusionFunction.h b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUAnisotropicDiffusionFunction.h index adc4f18877a..04723677c1d 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUAnisotropicDiffusionFunction.h @@ -152,15 +152,15 @@ class ITK_TEMPLATE_EXPORT GPUAnisotropicDiffusionFunction : public GPUFiniteDiff } // GPU buffer for Computing Average Squared Gradient Magnitude - typename GPUDataManager::Pointer m_AnisotropicDiffusionFunctionGPUBuffer{}; + typename GPUDataManager::Pointer m_AnisotropicDiffusionFunctionGPUBuffer{}; typename GPUKernelManager::Pointer m_AnisotropicDiffusionFunctionGPUKernelManager{}; // GPU Kernel Handles int m_AverageGradientMagnitudeSquaredGPUKernelHandle{}; private: - double m_AverageGradientMagnitudeSquared{}; - double m_ConductanceParameter{}; + double m_AverageGradientMagnitudeSquared{}; + double m_ConductanceParameter{}; TimeStepType m_TimeStep{}; }; } // end namespace itk diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.hxx b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.hxx index 3b5ba1ba2e8..b547c01ab31 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.hxx +++ b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.hxx @@ -31,7 +31,7 @@ template GPUGradientNDAnisotropicDiffusionFunction::GPUGradientNDAnisotropicDiffusionFunction() { unsigned int i, j; - RadiusType r; + RadiusType r; for (i = 0; i < ImageDimension; ++i) { @@ -118,15 +118,15 @@ GPUGradientNDAnisotropicDiffusionFunction::GPUGradientNDAnisotropicDiffu template void GPUGradientNDAnisotropicDiffusionFunction::GPUComputeUpdate(const typename TImage::Pointer output, - typename TImage::Pointer buffer, + typename TImage::Pointer buffer, void * itkNotUsed(globalData)) { /** Launch GPU kernel to update buffer with output * GPU version of ComputeUpdate() - compute entire update buffer */ using GPUImageType = typename itk::GPUTraits::Type; - typename GPUImageType::Pointer inPtr = dynamic_cast(output.GetPointer()); - typename GPUImageType::Pointer bfPtr = dynamic_cast(buffer.GetPointer()); + typename GPUImageType::Pointer inPtr = dynamic_cast(output.GetPointer()); + typename GPUImageType::Pointer bfPtr = dynamic_cast(buffer.GetPointer()); typename GPUImageType::SizeType outSize = bfPtr->GetLargestPossibleRegion().GetSize(); int imgSize[3]; diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.hxx b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.hxx index b6a89d0f1ae..3e71550adf6 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.hxx +++ b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.hxx @@ -63,7 +63,7 @@ GPUScalarAnisotropicDiffusionFunction::GPUCalculateAverageGradientMagnit { // GPU kernel to compute Average Squared Gradient Magnitude using GPUImageType = typename itk::GPUTraits::Type; - typename GPUImageType::Pointer inPtr = dynamic_cast(ip); + typename GPUImageType::Pointer inPtr = dynamic_cast(ip); typename GPUImageType::SizeType outSize = inPtr->GetLargestPossibleRegion().GetSize(); int imgSize[3]; @@ -100,7 +100,7 @@ GPUScalarAnisotropicDiffusionFunction::GPUCalculateAverageGradientMagnit } typename GPUKernelManager::Pointer kernelManager = this->m_AnisotropicDiffusionFunctionGPUKernelManager; - int kernelHandle = this->m_AverageGradientMagnitudeSquaredGPUKernelHandle; + int kernelHandle = this->m_AverageGradientMagnitudeSquaredGPUKernelHandle; // Set arguments int argidx = 0; @@ -148,7 +148,7 @@ GPUScalarAnisotropicDiffusionFunction::GPUCalculateAverageGradientMagnit kernelManager->LaunchKernel(kernelHandle, ImageDim, globalSize, localSize); // Read back intermediate sums from GPU and compute final value - double sum = 0; + double sum = 0; const auto intermSum = make_unique_for_overwrite(bufferSize); this->m_AnisotropicDiffusionFunctionGPUBuffer->SetCPUBufferPointer(intermSum.get()); diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/test/itkGPUGradientAnisotropicDiffusionImageFilterTest.cxx b/Modules/Filtering/GPUAnisotropicSmoothing/test/itkGPUGradientAnisotropicDiffusionImageFilterTest.cxx index 36776b951c6..17bc8cbd8f9 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/test/itkGPUGradientAnisotropicDiffusionImageFilterTest.cxx +++ b/Modules/Filtering/GPUAnisotropicSmoothing/test/itkGPUGradientAnisotropicDiffusionImageFilterTest.cxx @@ -76,7 +76,7 @@ runGPUGradientAnisotropicDiffusionImageFilterTest(const std::string & inFile, co for (unsigned int idx = 0; idx < nThreadVec.size(); ++idx) { - int numberOfWorkUnits = nThreadVec[idx]; + int numberOfWorkUnits = nThreadVec[idx]; itk::TimeProbe cputimer; cputimer.Start(); @@ -135,8 +135,8 @@ runGPUGradientAnisotropicDiffusionImageFilterTest(const std::string & inFile, co // RMS Error check // --------------- - double diff = 0; - unsigned int nPix = 0; + double diff = 0; + unsigned int nPix = 0; itk::ImageRegionIterator cit(CPUFilter->GetOutput(), CPUFilter->GetOutput()->GetLargestPossibleRegion()); itk::ImageRegionIterator git(GPUFilter->GetOutput(), diff --git a/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.hxx b/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.hxx index fb056a0682e..128eb786755 100644 --- a/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.hxx +++ b/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.hxx @@ -123,7 +123,7 @@ GPUNeighborhoodOperatorImageFilterInitialize(); typename NeighborhoodGPUBufferType::IndexType index; - typename NeighborhoodGPUBufferType::SizeType size; + typename NeighborhoodGPUBufferType::SizeType size; for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -161,7 +161,7 @@ GPUNeighborhoodOperatorImageFilter; using GPUOutputManagerType = GPUImageDataManager; - typename GPUInputImage::Pointer inPtr = dynamic_cast(this->ProcessObject::GetInput(0)); + typename GPUInputImage::Pointer inPtr = dynamic_cast(this->ProcessObject::GetInput(0)); typename GPUOutputImage::Pointer otPtr = dynamic_cast(this->ProcessObject::GetOutput(0)); // typename GPUOutputImage::SizeType outSize = otPtr->GetLargestPossibleRegion().GetSize(); diff --git a/Modules/Filtering/GPUImageFilterBase/test/itkGPUNeighborhoodOperatorImageFilterTest.cxx b/Modules/Filtering/GPUImageFilterBase/test/itkGPUNeighborhoodOperatorImageFilterTest.cxx index 46fbf2a5400..aac9a407854 100644 --- a/Modules/Filtering/GPUImageFilterBase/test/itkGPUNeighborhoodOperatorImageFilterTest.cxx +++ b/Modules/Filtering/GPUImageFilterBase/test/itkGPUNeighborhoodOperatorImageFilterTest.cxx @@ -110,8 +110,8 @@ runGPUNeighborhoodOperatorImageFilterTest(const std::string & inFile, const std: // RMS Error check // --------------- - double diff = 0; - unsigned int nPix = 0; + double diff = 0; + unsigned int nPix = 0; itk::ImageRegionIterator cit(CPUFilter->GetOutput(), CPUFilter->GetOutput()->GetLargestPossibleRegion()); itk::ImageRegionIterator git(GPUFilter->GetOutput(), diff --git a/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.h b/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.h index 9db89ed9997..9921226a015 100644 --- a/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.h +++ b/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.h @@ -114,10 +114,10 @@ class ITK_TEMPLATE_EXPORT GPUDiscreteGaussianImageFilter private: /** Intermediate 1D Gaussian filters */ - typename FirstFilterType::Pointer m_FirstFilter{}; - typename LastFilterType::Pointer m_LastFilter{}; + typename FirstFilterType::Pointer m_FirstFilter{}; + typename LastFilterType::Pointer m_LastFilter{}; std::vector m_IntermediateFilters{}; - typename SingleFilterType::Pointer m_SingleFilter{}; + typename SingleFilterType::Pointer m_SingleFilter{}; }; } // end namespace itk diff --git a/Modules/Filtering/GPUSmoothing/include/itkGPUMeanImageFilter.hxx b/Modules/Filtering/GPUSmoothing/include/itkGPUMeanImageFilter.hxx index 0df3f4c17d3..f94a9061ef0 100644 --- a/Modules/Filtering/GPUSmoothing/include/itkGPUMeanImageFilter.hxx +++ b/Modules/Filtering/GPUSmoothing/include/itkGPUMeanImageFilter.hxx @@ -61,7 +61,7 @@ GPUMeanImageFilter::GPUGenerateData() using GPUInputImage = typename itk::GPUTraits::Type; using GPUOutputImage = typename itk::GPUTraits::Type; - typename GPUInputImage::Pointer inPtr = dynamic_cast(this->ProcessObject::GetInput(0)); + typename GPUInputImage::Pointer inPtr = dynamic_cast(this->ProcessObject::GetInput(0)); typename GPUOutputImage::Pointer otPtr = dynamic_cast(this->ProcessObject::GetOutput(0)); typename GPUOutputImage::SizeType outSize = otPtr->GetLargestPossibleRegion().GetSize(); diff --git a/Modules/Filtering/GPUSmoothing/test/itkGPUDiscreteGaussianImageFilterTest.cxx b/Modules/Filtering/GPUSmoothing/test/itkGPUDiscreteGaussianImageFilterTest.cxx index 52d9a5ff0cc..197f069108e 100644 --- a/Modules/Filtering/GPUSmoothing/test/itkGPUDiscreteGaussianImageFilterTest.cxx +++ b/Modules/Filtering/GPUSmoothing/test/itkGPUDiscreteGaussianImageFilterTest.cxx @@ -102,8 +102,8 @@ runGPUDiscreteGaussianImageFilterTest(const std::string & inFile, const std::str // RMS Error check // --------------- - double diff = 0; - unsigned int nPix = 0; + double diff = 0; + unsigned int nPix = 0; itk::ImageRegionIterator cit(CPUFilter->GetOutput(), CPUFilter->GetOutput()->GetLargestPossibleRegion()); itk::ImageRegionIterator git(GPUFilter->GetOutput(), diff --git a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h index 792964bbe00..88ebb31939b 100644 --- a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h +++ b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h @@ -77,8 +77,8 @@ class ITK_TEMPLATE_EXPORT GPUBinaryThreshold : public GPUFunctorBase } private: - TInput m_LowerThreshold{}; - TInput m_UpperThreshold{}; + TInput m_LowerThreshold{}; + TInput m_UpperThreshold{}; TOutput m_InsideValue{}; TOutput m_OutsideValue{}; }; diff --git a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.hxx b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.hxx index dba5d687444..431759e8c63 100644 --- a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.hxx +++ b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.hxx @@ -44,7 +44,7 @@ GPUBinaryThresholdImageFilter::GPUBinaryThresholdImag defines << "#define DIM_" << TInputImage::ImageDimension << '\n'; std::string validTypeName; - bool isValid = GetValidTypename(typeid(typename TInputImage::PixelType), validTypes, validTypeName); + bool isValid = GetValidTypename(typeid(typename TInputImage::PixelType), validTypes, validTypeName); if (isValid) { defines << "#define InPixelType " << validTypeName << '\n' << "#define OutPixelType " << validTypeName << '\n'; diff --git a/Modules/Filtering/GPUThresholding/test/itkGPUBinaryThresholdImageFilterTest.cxx b/Modules/Filtering/GPUThresholding/test/itkGPUBinaryThresholdImageFilterTest.cxx index 777b954c1fc..2ab84820b9b 100644 --- a/Modules/Filtering/GPUThresholding/test/itkGPUBinaryThresholdImageFilterTest.cxx +++ b/Modules/Filtering/GPUThresholding/test/itkGPUBinaryThresholdImageFilterTest.cxx @@ -62,14 +62,14 @@ runGPUBinaryThresholdImageFilterTest(const std::string & inFile, const std::stri using GPUThresholdFilterType = itk::GPUBinaryThresholdImageFilter; // threshold parameters - constexpr InputPixelType upperThreshold = 255; - constexpr InputPixelType lowerThreshold = 175; + constexpr InputPixelType upperThreshold = 255; + constexpr InputPixelType lowerThreshold = 175; constexpr OutputPixelType outsideValue = 0; constexpr OutputPixelType insideValue = 255; for (int numberOfWorkUnits = 1; numberOfWorkUnits <= 8; ++numberOfWorkUnits) { - auto CPUFilter = ThresholdFilterType::New(); + auto CPUFilter = ThresholdFilterType::New(); itk::TimeProbe cputimer; cputimer.Start(); @@ -115,8 +115,8 @@ runGPUBinaryThresholdImageFilterTest(const std::string & inFile, const std::stri // RMS Error check // --------------- - double diff = 0; - unsigned int nPix = 0; + double diff = 0; + unsigned int nPix = 0; itk::ImageRegionIterator cit(CPUFilter->GetOutput(), CPUFilter->GetOutput()->GetLargestPossibleRegion()); itk::ImageRegionIterator git(GPUFilter->GetOutput(), diff --git a/Modules/Filtering/GPUThresholding/test/itkGPUImageFilterTest.cxx b/Modules/Filtering/GPUThresholding/test/itkGPUImageFilterTest.cxx index ea1799970ed..e911cb7e6a6 100644 --- a/Modules/Filtering/GPUThresholding/test/itkGPUImageFilterTest.cxx +++ b/Modules/Filtering/GPUThresholding/test/itkGPUImageFilterTest.cxx @@ -77,8 +77,8 @@ runGPUImageFilterTest(const std::string & inFile, const std::string & outFile) } // threshold parameters - constexpr InputPixelType upperThreshold = 255; - constexpr InputPixelType lowerThreshold = 175; + constexpr InputPixelType upperThreshold = 255; + constexpr InputPixelType lowerThreshold = 175; constexpr OutputPixelType outsideValue = 0; constexpr OutputPixelType insideValue = 255; diff --git a/Modules/Filtering/ImageCompare/include/itkAbsoluteValueDifferenceImageFilter.h b/Modules/Filtering/ImageCompare/include/itkAbsoluteValueDifferenceImageFilter.h index d24653f7f70..cf914ac3873 100644 --- a/Modules/Filtering/ImageCompare/include/itkAbsoluteValueDifferenceImageFilter.h +++ b/Modules/Filtering/ImageCompare/include/itkAbsoluteValueDifferenceImageFilter.h @@ -69,8 +69,8 @@ class AbsoluteValueDifference2 inline TOutput operator()(const TInput1 & A, const TInput2 & B) const { - const auto dA = static_cast(A); - const auto dB = static_cast(B); + const auto dA = static_cast(A); + const auto dB = static_cast(B); const double diff = dA - dB; const double absdiff = (diff > 0.0) ? diff : -diff; diff --git a/Modules/Filtering/ImageCompare/include/itkCheckerBoardImageFilter.hxx b/Modules/Filtering/ImageCompare/include/itkCheckerBoardImageFilter.hxx index 56d4cf675d0..8f563591428 100644 --- a/Modules/Filtering/ImageCompare/include/itkCheckerBoardImageFilter.hxx +++ b/Modules/Filtering/ImageCompare/include/itkCheckerBoardImageFilter.hxx @@ -54,7 +54,7 @@ void CheckerBoardImageFilter::DynamicThreadedGenerateData(const ImageRegionType & outputRegionForThread) { // Get the output pointers - const OutputImagePointer outputPtr = this->GetOutput(); + const OutputImagePointer outputPtr = this->GetOutput(); const InputImageConstPointer input1Ptr = this->GetInput(0); const InputImageConstPointer input2Ptr = this->GetInput(1); @@ -63,8 +63,8 @@ CheckerBoardImageFilter::DynamicThreadedGenerateData(const ImageRegionTy using InputIterator = ImageRegionConstIteratorWithIndex; OutputIterator outItr(outputPtr, outputRegionForThread); - InputIterator in1Itr(input1Ptr, outputRegionForThread); - InputIterator in2Itr(input2Ptr, outputRegionForThread); + InputIterator in1Itr(input1Ptr, outputRegionForThread); + InputIterator in2Itr(input2Ptr, outputRegionForThread); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); diff --git a/Modules/Filtering/ImageCompare/include/itkSTAPLEImageFilter.h b/Modules/Filtering/ImageCompare/include/itkSTAPLEImageFilter.h index 2dd1ad6b87e..e3e6b073164 100644 --- a/Modules/Filtering/ImageCompare/include/itkSTAPLEImageFilter.h +++ b/Modules/Filtering/ImageCompare/include/itkSTAPLEImageFilter.h @@ -244,8 +244,8 @@ class ITK_TEMPLATE_EXPORT STAPLEImageFilter : public ImageToImageFilter::GenerateData() itkExceptionMacro("One or more input images do not contain matching RequestedRegions"); } - IteratorType in = IteratorType(this->GetInput(i), W->GetRequestedRegion()); + IteratorType in = IteratorType(this->GetInput(i), W->GetRequestedRegion()); FuzzyIteratorType out = FuzzyIteratorType(W, W->GetRequestedRegion()); while (!in.IsAtEnd()) @@ -132,7 +132,7 @@ STAPLEImageFilter::GenerateData() // Now iterate on estimating specificity and sensitivity for (unsigned int i = 0; i < number_of_input_files; ++i) { - IteratorType in = IteratorType(this->GetInput(i), W->GetRequestedRegion()); + IteratorType in = IteratorType(this->GetInput(i), W->GetRequestedRegion()); FuzzyIteratorType out = FuzzyIteratorType(W, W->GetRequestedRegion()); double p_num{}; diff --git a/Modules/Filtering/ImageCompare/include/itkSimilarityIndexImageFilter.hxx b/Modules/Filtering/ImageCompare/include/itkSimilarityIndexImageFilter.hxx index 05ab4a5ecc6..ab93483d59f 100644 --- a/Modules/Filtering/ImageCompare/include/itkSimilarityIndexImageFilter.hxx +++ b/Modules/Filtering/ImageCompare/include/itkSimilarityIndexImageFilter.hxx @@ -140,7 +140,7 @@ SimilarityIndexImageFilter::AfterThreadedGenerateDat template void SimilarityIndexImageFilter::ThreadedGenerateData(const RegionType & outputRegionForThread, - ThreadIdType threadId) + ThreadIdType threadId) { ImageRegionConstIterator it1(this->GetInput1(), outputRegionForThread); ImageRegionConstIterator it2(this->GetInput2(), outputRegionForThread); diff --git a/Modules/Filtering/ImageCompare/include/itkSquaredDifferenceImageFilter.h b/Modules/Filtering/ImageCompare/include/itkSquaredDifferenceImageFilter.h index 9874953594e..54c5e887171 100644 --- a/Modules/Filtering/ImageCompare/include/itkSquaredDifferenceImageFilter.h +++ b/Modules/Filtering/ImageCompare/include/itkSquaredDifferenceImageFilter.h @@ -68,8 +68,8 @@ class SquaredDifference2 inline TOutput operator()(const TInput1 & A, const TInput2 & B) const { - const auto dA = static_cast(A); - const auto dB = static_cast(B); + const auto dA = static_cast(A); + const auto dB = static_cast(B); const double diff = dA - dB; return static_cast(diff * diff); diff --git a/Modules/Filtering/ImageCompare/test/itkSTAPLEImageFilterTest.cxx b/Modules/Filtering/ImageCompare/test/itkSTAPLEImageFilterTest.cxx index 9aa4e85d469..82a8c23a44a 100644 --- a/Modules/Filtering/ImageCompare/test/itkSTAPLEImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompare/test/itkSTAPLEImageFilterTest.cxx @@ -94,7 +94,7 @@ class StaplerBase protected: std::vector m_Files; - std::string m_OutputFile; + std::string m_OutputFile; }; template @@ -184,7 +184,7 @@ template int Stapler::Execute() { - typename itk::ImageFileReader::Pointer reader; + typename itk::ImageFileReader::Pointer reader; const typename itk::ImageFileWriter::Pointer writer = itk::ImageFileWriter::New(); const size_t numberOfFiles = m_Files.size(); diff --git a/Modules/Filtering/ImageCompare/test/itkSimilarityIndexImageFilterTest.cxx b/Modules/Filtering/ImageCompare/test/itkSimilarityIndexImageFilterTest.cxx index f64c0bd50ed..fbd013be022 100644 --- a/Modules/Filtering/ImageCompare/test/itkSimilarityIndexImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompare/test/itkSimilarityIndexImageFilterTest.cxx @@ -47,12 +47,12 @@ itkSimilarityIndexImageFilterTest(int, char *[]) const unsigned long numOfPixels = image1->GetBufferedRegion().GetNumberOfPixels(); const unsigned long upper1 = static_cast(static_cast(numOfPixels) * 0.75) - 1; - const auto lower2 = static_cast(static_cast(numOfPixels) * 0.25); + const auto lower2 = static_cast(static_cast(numOfPixels) * 0.25); const unsigned long upper2 = numOfPixels - 1; itk::ImageRegionIterator it1(image1, image1->GetBufferedRegion()); itk::ImageRegionIterator it2(image2, image2->GetBufferedRegion()); - unsigned long count = 0; + unsigned long count = 0; while (!it1.IsAtEnd() || !it2.IsAtEnd()) { @@ -100,7 +100,7 @@ itkSimilarityIndexImageFilterTest(int, char *[]) // check results constexpr FilterType::RealType trueOverlap = 0.5 / 0.75; - const FilterType::RealType overlap = filter->GetSimilarityIndex(); + const FilterType::RealType overlap = filter->GetSimilarityIndex(); std::cout << " True index: " << trueOverlap << std::endl; std::cout << " Computed index: " << overlap << std::endl; diff --git a/Modules/Filtering/ImageCompose/include/itkJoinSeriesImageFilter.hxx b/Modules/Filtering/ImageCompose/include/itkJoinSeriesImageFilter.hxx index c7c76b12e1b..298a1483c33 100644 --- a/Modules/Filtering/ImageCompose/include/itkJoinSeriesImageFilter.hxx +++ b/Modules/Filtering/ImageCompose/include/itkJoinSeriesImageFilter.hxx @@ -81,7 +81,7 @@ JoinSeriesImageFilter::GenerateOutputInformation() // this filter allows the input the output to be of different dimensions // Get pointers to the input and output - const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); + const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); const typename Superclass::InputImageConstPointer inputPtr = this->GetInput(); if (!outputPtr || !inputPtr) @@ -108,12 +108,12 @@ JoinSeriesImageFilter::GenerateOutputInformation() // Copy what we can from the image from spacing and origin of the input // This logic needs to be augmented with logic that select which // dimensions to copy - unsigned int ii; + unsigned int ii; const typename InputImageType::SpacingType & inputSpacing = inputPtr->GetSpacing(); - const typename InputImageType::PointType & inputOrigin = inputPtr->GetOrigin(); + const typename InputImageType::PointType & inputOrigin = inputPtr->GetOrigin(); typename OutputImageType::SpacingType outputSpacing; - typename OutputImageType::PointType outputOrigin; + typename OutputImageType::PointType outputOrigin; // Copy the input to the output and fill the rest of the // output with zeros. @@ -140,9 +140,9 @@ JoinSeriesImageFilter::GenerateOutputInformation() // On join, the output dim is always >= input dim using InputDirectionType = typename InputImageType::DirectionType; using OutputDirectionType = typename OutputImageType::DirectionType; - InputDirectionType inputDir = inputPtr->GetDirection(); - const unsigned int inputdim = InputImageType::GetImageDimension(); - const unsigned int outputdim = OutputImageType::GetImageDimension(); + InputDirectionType inputDir = inputPtr->GetDirection(); + const unsigned int inputdim = InputImageType::GetImageDimension(); + const unsigned int outputdim = OutputImageType::GetImageDimension(); OutputDirectionType outputDir = outputPtr->GetDirection(); for (unsigned int i = 0; i < outputdim; ++i) { @@ -186,8 +186,8 @@ JoinSeriesImageFilter::GenerateInputRequestedRegion() return; } const OutputImageRegionType outputRegion = this->GetOutput()->GetRequestedRegion(); - const IndexValueType begin = outputRegion.GetIndex(InputImageDimension); - const IndexValueType end = begin + outputRegion.GetSize(InputImageDimension); + const IndexValueType begin = outputRegion.GetIndex(InputImageDimension); + const IndexValueType end = begin + outputRegion.GetSize(InputImageDimension); for (IndexValueType idx = 0; idx < this->GetNumberOfIndexedInputs(); ++idx) { const InputImagePointer inputPtr = const_cast(this->GetInput(idx)); diff --git a/Modules/Filtering/ImageCompose/test/itkImageToVectorImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkImageToVectorImageFilterTest.cxx index 92450c0d64d..c9aa928770f 100644 --- a/Modules/Filtering/ImageCompose/test/itkImageToVectorImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkImageToVectorImageFilterTest.cxx @@ -44,7 +44,7 @@ itkImageToVectorImageFilterTest(int argc, char * argv[]) } auto filter = FilterType::New(); - int f = 0; + int f = 0; for (int i = 1; i < argc - 1; ++i) { auto reader = ReaderType::New(); diff --git a/Modules/Filtering/ImageCompose/test/itkJoinImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkJoinImageFilterTest.cxx index 09c0388ea41..951f6dcd672 100644 --- a/Modules/Filtering/ImageCompose/test/itkJoinImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkJoinImageFilterTest.cxx @@ -160,7 +160,7 @@ itkJoinImageFilterTest(int, char *[]) // Create an iterator for going through the image #1#2 const myFilterType::OutputImageType::Pointer outputImage = filter->GetOutput(); - myOutputIteratorType it3(outputImage, outputImage->GetRequestedRegion()); + myOutputIteratorType it3(outputImage, outputImage->GetRequestedRegion()); // Print the content of the result image std::cout << std::endl; @@ -173,7 +173,7 @@ itkJoinImageFilterTest(int, char *[]) // Create an iterator for going through the image #1#2#3 const myFilterType3::OutputImageType::Pointer outputImage123 = filter123->GetOutput(); - myOutputIteratorType3 it123(outputImage123, outputImage123->GetRequestedRegion()); + myOutputIteratorType3 it123(outputImage123, outputImage123->GetRequestedRegion()); // Print the content of the result image std::cout << std::endl; @@ -196,7 +196,7 @@ itkJoinImageFilterTest(int, char *[]) // Create an iterator for going through the image output const myFilterType1::OutputImageType::Pointer outputImage1 = filter1->GetOutput(); - myOutputIteratorType1 it4(outputImage1, outputImage1->GetRequestedRegion()); + myOutputIteratorType1 it4(outputImage1, outputImage1->GetRequestedRegion()); // Print the content of the result image std::cout << std::endl; @@ -219,7 +219,7 @@ itkJoinImageFilterTest(int, char *[]) // Create an iterator for going through the image output const myFilterType2::OutputImageType::Pointer outputImage2 = filter2->GetOutput(); - myOutputIteratorType2 it5(outputImage2, outputImage2->GetRequestedRegion()); + myOutputIteratorType2 it5(outputImage2, outputImage2->GetRequestedRegion()); // Print the content of the result image std::cout << "Joining #1 and #1 image " << std::endl; @@ -241,7 +241,7 @@ itkJoinImageFilterTest(int, char *[]) // Create an iterator for going through the image output const myFilterType4::OutputImageType::Pointer outputImage4 = filter4->GetOutput(); - myOutputIteratorType4 it6(outputImage4, outputImage4->GetRequestedRegion()); + myOutputIteratorType4 it6(outputImage4, outputImage4->GetRequestedRegion()); // Print the content of the result image std::cout << "Joining #2 and #2 image " << std::endl; diff --git a/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx index cbd9707bc27..b85ad2b5591 100644 --- a/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx @@ -46,9 +46,9 @@ itkJoinSeriesImageFilterTest(int, char *[]) // Expected result constexpr OutputImageType::IndexType expectedIndex = { { 1, 2, 0, 0 } }; - constexpr OutputImageType::SizeType expectedSize = { { 8, 5, 4, 1 } }; - const OutputImageType::RegionType expectedRegion{ expectedIndex, expectedSize }; - OutputImageType::SpacingType expectedSpacing; + constexpr OutputImageType::SizeType expectedSize = { { 8, 5, 4, 1 } }; + const OutputImageType::RegionType expectedRegion{ expectedIndex, expectedSize }; + OutputImageType::SpacingType expectedSpacing; expectedSpacing[0] = 1.1; expectedSpacing[1] = 1.2; expectedSpacing[2] = 1.3; @@ -60,15 +60,15 @@ itkJoinSeriesImageFilterTest(int, char *[]) expectedOrigin[3] = 0.0; // Create the input images - constexpr int numInputs = 4; + constexpr int numInputs = 4; constexpr InputImageType::IndexType index = { { 1, 2 } }; - constexpr InputImageType::SizeType size = { { 8, 5 } }; - const InputImageType::RegionType region{ index, size }; - constexpr double spacingValue = 1.3; - InputImageType::SpacingType spacing; + constexpr InputImageType::SizeType size = { { 8, 5 } }; + const InputImageType::RegionType region{ index, size }; + constexpr double spacingValue = 1.3; + InputImageType::SpacingType spacing; spacing[0] = 1.1; spacing[1] = 1.2; - constexpr double originValue = 0.3; + constexpr double originValue = 0.3; InputImageType::PointType origin; origin[0] = 0.1; origin[1] = 0.2; @@ -177,7 +177,7 @@ itkJoinSeriesImageFilterTest(int, char *[]) // Check the contents bool passed = true; - PixelType counter2 = 0; + PixelType counter2 = 0; itk::ImageRegionIterator outputIter(output, output->GetBufferedRegion()); while (!outputIter.IsAtEnd()) { diff --git a/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.h b/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.h index 911f81fe14f..175e5be044f 100644 --- a/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.h @@ -223,13 +223,13 @@ class ITK_TEMPLATE_EXPORT BilateralImageFilter : public ImageToImageFilter m_RangeGaussianTable{}; }; } // end namespace itk diff --git a/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.hxx index d24057379b9..bef23026788 100644 --- a/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.hxx @@ -72,7 +72,7 @@ BilateralImageFilter::GenerateInputRequestedRegion() // Pad the image by 2.5*sigma in all directions typename TInputImage::SizeType radius; - unsigned int i; + unsigned int i; if (m_AutomaticKernelSize) { @@ -136,7 +136,7 @@ BilateralImageFilter::BeforeThreadedGenerateData() const InputImageType * inputImage = this->GetInput(); const typename InputImageType::SpacingType inputSpacing = inputImage->GetSpacing(); - const typename InputImageType::PointType inputOrigin = inputImage->GetOrigin(); + const typename InputImageType::PointType inputOrigin = inputImage->GetOrigin(); if (m_AutomaticKernelSize) { @@ -156,7 +156,7 @@ BilateralImageFilter::BeforeThreadedGenerateData() } } - typename GaussianImageSource::Pointer gaussianImage; + typename GaussianImageSource::Pointer gaussianImage; typename GaussianImageSource::ArrayType mean; typename GaussianImageSource::ArrayType sigma; @@ -180,10 +180,10 @@ BilateralImageFilter::BeforeThreadedGenerateData() // copy this small Gaussian image into a neighborhood m_GaussianKernel.SetRadius(radius); - KernelIteratorType kernel_it; + KernelIteratorType kernel_it; ImageRegionIterator git(gaussianImage->GetOutput(), gaussianImage->GetOutput()->GetBufferedRegion()); - double norm = 0.0; + double norm = 0.0; for (git.GoToBegin(); !git.IsAtEnd(); ++git) { norm += git.Get(); @@ -236,12 +236,12 @@ BilateralImageFilter::DynamicThreadedGenerateData( const OutputImageRegionType & outputRegionForThread) { const typename TInputImage::ConstPointer input = this->GetInput(); - const typename TOutputImage::Pointer output = this->GetOutput(); + const typename TOutputImage::Pointer output = this->GetOutput(); const double rangeDistanceThreshold = m_DynamicRangeUsed; // Find the boundary "faces" - NeighborhoodAlgorithm::ImageBoundaryFacesCalculator fC; + NeighborhoodAlgorithm::ImageBoundaryFacesCalculator fC; const typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = fC(this->GetInput(), outputRegionForThread, m_GaussianKernel.GetRadius()); @@ -267,7 +267,7 @@ BilateralImageFilter::DynamicThreadedGenerateData( while (!b_iter.IsAtEnd()) { // Setup - const auto centerPixel = static_cast(b_iter.GetCenterPixel()); + const auto centerPixel = static_cast(b_iter.GetCenterPixel()); OutputPixelRealType val = 0.0; OutputPixelRealType normFactor = 0.0; diff --git a/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.h b/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.h index 8a1ebb27355..6c59fbf6aec 100644 --- a/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.h @@ -274,7 +274,7 @@ class ITK_TEMPLATE_EXPORT CannyEdgeDetectionImageFilter : public ImageToImageFil SizeValueType m_Center{}; typename ListNodeStorageType::Pointer m_NodeStore{}; - ListPointerType m_NodeList{}; + ListPointerType m_NodeList{}; OutputImageType * m_OutputImage{}; }; diff --git a/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.hxx index 3a72784f159..a52111ad9c0 100644 --- a/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.hxx @@ -109,7 +109,7 @@ CannyEdgeDetectionImageFilter::ThreadedCompute2ndDeri constexpr auto radius = Size::Filled(1); // Find the data-set boundary "faces" - NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; + NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; const typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = bC(input, outputRegionForThread, radius); @@ -273,7 +273,7 @@ CannyEdgeDetectionImageFilter::HysteresisThresholding // gradients of the image. HysteresisThresholding of this image should give // the Canny output. const typename OutputImageType::Pointer input = m_MultiplyImageFilter->GetOutput(); - float value; + float value; ListNodeType * node; @@ -306,7 +306,7 @@ CannyEdgeDetectionImageFilter::HysteresisThresholding template void -CannyEdgeDetectionImageFilter::FollowEdge(IndexType index, +CannyEdgeDetectionImageFilter::FollowEdge(IndexType index, const OutputImageType * multiplyImageFilterOutput) { // This is the Zero crossings of the Second derivative multiplied with the @@ -314,8 +314,8 @@ CannyEdgeDetectionImageFilter::FollowEdge(IndexType // the Canny output. const InputImageRegionType inputRegion = multiplyImageFilterOutput->GetRequestedRegion(); - IndexType nIndex; - IndexType cIndex; + IndexType nIndex; + IndexType cIndex; ListNodeType * node; // Assign iterator radius @@ -397,7 +397,7 @@ CannyEdgeDetectionImageFilter::ThreadedCompute2ndDeri constexpr auto radius = Size::Filled(1); // Find the data-set boundary "faces" - NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; + NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; const typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = bC(input, outputRegionForThread, radius); diff --git a/Modules/Filtering/ImageFeature/include/itkDiscreteGaussianDerivativeImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkDiscreteGaussianDerivativeImageFilter.hxx index 8c4be8c1148..37eb3a3124a 100644 --- a/Modules/Filtering/ImageFeature/include/itkDiscreteGaussianDerivativeImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkDiscreteGaussianDerivativeImageFilter.hxx @@ -44,7 +44,7 @@ DiscreteGaussianDerivativeImageFilter::GenerateInputR // Build an operator so that we can determine the kernel size GaussianDerivativeOperator oper; - typename TInputImage::SizeType radius; + typename TInputImage::SizeType radius; for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i) { @@ -216,7 +216,7 @@ DiscreteGaussianDerivativeImageFilter::GenerateData() lastFilter->ReleaseDataFlagOn(); if constexpr (ImageDimension > 2) { - const unsigned int max_dim = ImageDimension - 1; + const unsigned int max_dim = ImageDimension - 1; std::vector intermediateFilters; intermediateFilters.reserve(max_dim); for (unsigned int i = 1; i != max_dim; ++i) diff --git a/Modules/Filtering/ImageFeature/include/itkGradientVectorFlowImageFilter.h b/Modules/Filtering/ImageFeature/include/itkGradientVectorFlowImageFilter.h index 01c5b31ccaf..e5682f08756 100644 --- a/Modules/Filtering/ImageFeature/include/itkGradientVectorFlowImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkGradientVectorFlowImageFilter.h @@ -153,7 +153,7 @@ class ITK_TEMPLATE_EXPORT GradientVectorFlowImageFilter : public ImageToImageFil // image int m_IterationNum{}; // the iteration number - LaplacianFilterPointer m_LaplacianFilter{}; + LaplacianFilterPointer m_LaplacianFilter{}; typename Superclass::InputImagePointer m_IntermediateImage{}; InternalImagePointer m_InternalImages[Superclass::InputImageDimension]{}; diff --git a/Modules/Filtering/ImageFeature/include/itkGradientVectorFlowImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkGradientVectorFlowImageFilter.hxx index 787df72b050..97fff780798 100644 --- a/Modules/Filtering/ImageFeature/include/itkGradientVectorFlowImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkGradientVectorFlowImageFilter.hxx @@ -128,7 +128,7 @@ GradientVectorFlowImageFilter::InitIn /* Calculate b(x, y), c1(x, y), c2(x, y), etc.... (eqn 15) */ while (!inputIt.IsAtEnd()) { - double b = 0.0; + double b = 0.0; PixelType m_vec = inputIt.Get(); for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -193,7 +193,7 @@ GradientVectorFlowImageFilter::Update while (!outputIt.IsAtEnd()) { const double b = BIt.Get(); - PixelType c_vec = CIt.Get(); + PixelType c_vec = CIt.Get(); const double alpha = 1 - b * m_TimeStep; // first part of term 1, eqn 16 @@ -245,7 +245,7 @@ GradientVectorFlowImageFilter::Update template void GradientVectorFlowImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/ImageFeature/include/itkHessian3DToVesselnessMeasureImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkHessian3DToVesselnessMeasureImageFilter.hxx index 8db87d5903c..dcb3155e77e 100644 --- a/Modules/Filtering/ImageFeature/include/itkHessian3DToVesselnessMeasureImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkHessian3DToVesselnessMeasureImageFilter.hxx @@ -52,7 +52,7 @@ Hessian3DToVesselnessMeasureImageFilter::GenerateData() const typename EigenValueOutputImageType::ConstPointer eigenImage = m_SymmetricEigenValueFilter->GetOutput(); // walk the region of eigen values and get the vesselness measure - EigenValueArrayType eigenValue; + EigenValueArrayType eigenValue; ImageRegionConstIterator it = ImageRegionConstIterator(eigenImage, eigenImage->GetRequestedRegion()); ImageRegionIterator oit; diff --git a/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.h b/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.h index 43bea608ccf..0f5921ddc86 100644 --- a/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.h @@ -156,9 +156,9 @@ class ITK_TEMPLATE_EXPORT HessianRecursiveGaussianImageFilter : public ImageToIm EnlargeOutputRequestedRegion(DataObject * output) override; private: - GaussianFiltersArray m_SmoothingFilters{}; - DerivativeFilterAPointer m_DerivativeFilterA{}; - DerivativeFilterBPointer m_DerivativeFilterB{}; + GaussianFiltersArray m_SmoothingFilters{}; + DerivativeFilterAPointer m_DerivativeFilterA{}; + DerivativeFilterBPointer m_DerivativeFilterB{}; OutputImageAdaptorPointer m_ImageAdaptor{}; /** Normalize the image across scale space */ diff --git a/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.hxx index cec84b64025..cde4979c093 100644 --- a/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.hxx @@ -280,7 +280,7 @@ HessianRecursiveGaussianImageFilter::GenerateData() // Deal with the 2D case. if (numberOfSmoothingFilters > 0) { - const int temp_dim = static_cast(ImageDimension) - 3; + const int temp_dim = static_cast(ImageDimension) - 3; const GaussianFilterPointer lastFilter = m_SmoothingFilters[temp_dim]; lastFilter->UpdateLargestPossibleRegion(); derivativeImage = lastFilter->GetOutput(); diff --git a/Modules/Filtering/ImageFeature/include/itkHessianToObjectnessMeasureImageFilter.h b/Modules/Filtering/ImageFeature/include/itkHessianToObjectnessMeasureImageFilter.h index 450947ae454..d8a08e8b346 100644 --- a/Modules/Filtering/ImageFeature/include/itkHessianToObjectnessMeasureImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkHessianToObjectnessMeasureImageFilter.h @@ -155,12 +155,12 @@ class ITK_TEMPLATE_EXPORT HessianToObjectnessMeasureImageFilter : public ImageTo } }; - double m_Alpha{ 0.5 }; - double m_Beta{ 0.5 }; - double m_Gamma{ 5.0 }; + double m_Alpha{ 0.5 }; + double m_Beta{ 0.5 }; + double m_Gamma{ 5.0 }; unsigned int m_ObjectDimension{ 1 }; - bool m_BrightObject{ true }; - bool m_ScaleObjectnessMeasure{ true }; + bool m_BrightObject{ true }; + bool m_ScaleObjectnessMeasure{ true }; }; } // end namespace itk diff --git a/Modules/Filtering/ImageFeature/include/itkHessianToObjectnessMeasureImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkHessianToObjectnessMeasureImageFilter.hxx index a38ad9911cc..75a613f602c 100644 --- a/Modules/Filtering/ImageFeature/include/itkHessianToObjectnessMeasureImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkHessianToObjectnessMeasureImageFilter.hxx @@ -54,7 +54,7 @@ void HessianToObjectnessMeasureImageFilter::DynamicThreadedGenerateData( const OutputImageRegionType & outputRegionForThread) { - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); const InputImageType * input = this->GetInput(); TotalProgressReporter progress(this, output->GetRequestedRegion().GetNumberOfPixels(), 1000); @@ -65,7 +65,7 @@ HessianToObjectnessMeasureImageFilter::DynamicThreade // Walk the region of eigen values and get the objectness measure ImageRegionConstIterator it(input, outputRegionForThread); - ImageRegionIterator oit(output, outputRegionForThread); + ImageRegionIterator oit(output, outputRegionForThread); while (!it.IsAtEnd()) { diff --git a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.h b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.h index f12682fa9aa..8460deef49c 100644 --- a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.h @@ -213,13 +213,13 @@ class ITK_TEMPLATE_EXPORT HoughTransform2DCirclesImageFilter double m_GradientNormThreshold{ 1.0 }; double m_SigmaGradient{ 1.0 }; - RadiusImagePointer m_RadiusImage{}; - CirclesListType m_CirclesList{}; + RadiusImagePointer m_RadiusImage{}; + CirclesListType m_CirclesList{}; CirclesListSizeType m_NumberOfCircles{ 1 }; - double m_DiscRadiusRatio{ 1 }; - double m_Variance{ 10 }; - bool m_UseImageSpacing{ true }; - ModifiedTimeType m_OldModifiedTime{ 0 }; + double m_DiscRadiusRatio{ 1 }; + double m_Variance{ 10 }; + bool m_UseImageSpacing{ true }; + ModifiedTimeType m_OldModifiedTime{ 0 }; }; } // end namespace itk diff --git a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx index 6ec70c716eb..fb956a8518d 100644 --- a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx @@ -82,7 +82,7 @@ HoughTransform2DCirclesImageFilterGetInput(0); - const OutputImagePointer outputImage = this->GetOutput(0); + const OutputImagePointer outputImage = this->GetOutput(0); // Allocate the output this->AllocateOutputs(); @@ -112,7 +112,7 @@ HoughTransform2DCirclesImageFilter m_Threshold) { - const Index<2> inputIndex = image_it.GetIndex(); + const Index<2> inputIndex = image_it.GetIndex(); const typename DoGFunctionType::VectorType grad = DoGFunction->DoGFunctionType::EvaluateAtIndex(inputIndex); double Vx = grad[0]; @@ -161,7 +161,7 @@ HoughTransform2DCirclesImageFilter output_it(outputImage, outputImage->GetLargestPossibleRegion()); - ImageRegionIterator radius_it(m_RadiusImage, m_RadiusImage->GetLargestPossibleRegion()); + ImageRegionIterator radius_it(m_RadiusImage, m_RadiusImage->GetLargestPossibleRegion()); while (!output_it.IsAtEnd()) { if (output_it.Get() > 1) @@ -299,7 +299,7 @@ HoughTransform2DCirclesImageFilter::GenerateOut // Get pointers to the input and output const InputImageConstPointer input = this->GetInput(); - const OutputImagePointer output = this->GetOutput(); + const OutputImagePointer output = this->GetOutput(); if (!input || !output) { @@ -93,7 +93,7 @@ HoughTransform2DLinesImageFilter::GenerateDat { // Get the input and output pointers const InputImageConstPointer inputImage = this->GetInput(0); - const OutputImagePointer outputImage = this->GetOutput(0); + const OutputImagePointer outputImage = this->GetOutput(0); // Allocate the output this->AllocateOutputs(); @@ -137,7 +137,7 @@ HoughTransform2DLinesImageFilter::Simplify() { // Get the input and output pointers. const InputImageConstPointer inputImage = this->GetInput(0); - const OutputImagePointer outputImage = this->GetOutput(0); + const OutputImagePointer outputImage = this->GetOutput(0); if (!inputImage || !outputImage) { @@ -198,7 +198,7 @@ HoughTransform2DLinesImageFilter::Simplify() ImageRegionConstIteratorWithIndex accusimple_it(m_SimplifyAccumulator, m_SimplifyAccumulator->GetRequestedRegion()); - ImageRegionIteratorWithIndex accu_it(outputImage, outputImage->GetRequestedRegion()); + ImageRegionIteratorWithIndex accu_it(outputImage, outputImage->GetRequestedRegion()); while (!accusimple_it.IsAtEnd()) { @@ -250,7 +250,7 @@ HoughTransform2DLinesImageFilter::GetLines() const InternalImageType::Pointer postProcessImage = gaussianFilter->GetOutput(); using MinMaxCalculatorType = MinimumMaximumImageCalculator; - auto minMaxCalculator = MinMaxCalculatorType::New(); + auto minMaxCalculator = MinMaxCalculatorType::New(); itk::ImageRegionIterator it_input(postProcessImage, postProcessImage->GetLargestPossibleRegion()); @@ -287,8 +287,8 @@ HoughTransform2DLinesImageFilter::GetLines() const double Vx = radius * std::cos(teta); const double Vy = radius * std::sin(teta); const double norm = std::sqrt(Vx * Vx + Vy * Vy); - double VxNorm = Vx / norm; - double VyNorm = Vy / norm; + double VxNorm = Vx / norm; + double VyNorm = Vy / norm; if (teta <= 0 || teta >= Math::pi / 2) { @@ -368,7 +368,7 @@ HoughTransform2DLinesImageFilter::PrintSelf(s os << indent << "LinesList: " << std::endl; unsigned int i = 0; - auto it = m_LinesList.begin(); + auto it = m_LinesList.begin(); while (it != m_LinesList.end()) { os << indent << '[' << i << "]: " << *it << std::endl; diff --git a/Modules/Filtering/ImageFeature/include/itkLaplacianRecursiveGaussianImageFilter.h b/Modules/Filtering/ImageFeature/include/itkLaplacianRecursiveGaussianImageFilter.h index 7a8293f6f27..f4cd56ad144 100644 --- a/Modules/Filtering/ImageFeature/include/itkLaplacianRecursiveGaussianImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkLaplacianRecursiveGaussianImageFilter.h @@ -127,7 +127,7 @@ class ITK_TEMPLATE_EXPORT LaplacianRecursiveGaussianImageFilter : public ImageTo EnlargeOutputRequestedRegion(DataObject * output) override; private: - GaussianFilterPointer m_SmoothingFilters[NumberOfSmoothingFilters]{}; + GaussianFilterPointer m_SmoothingFilters[NumberOfSmoothingFilters]{}; DerivativeFilterPointer m_DerivativeFilter{}; /** Normalize the image across scale space */ diff --git a/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.hxx index e1c88222df4..3a670c0c60a 100644 --- a/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.hxx @@ -70,7 +70,7 @@ LaplacianSharpeningImageFilter::GenerateData() // Create the Laplacian operator LaplacianOperator oper; - double s[ImageDimension]; + double s[ImageDimension]; for (unsigned int i = 0; i < ImageDimension; ++i) { if (localInput->GetSpacing()[i] == 0.0) @@ -109,7 +109,7 @@ LaplacianSharpeningImageFilter::GenerateData() filteredMinMaxFilter->SetInput(laplacianFilter->GetOutput()); filteredMinMaxFilter->Update(); - const auto filteredShift = static_cast(filteredMinMaxFilter->GetMinimum()); + const auto filteredShift = static_cast(filteredMinMaxFilter->GetMinimum()); const RealType filteredScale = static_cast(filteredMinMaxFilter->GetMaximum()) - filteredShift; filteredMinMaxFilter = nullptr; @@ -120,7 +120,7 @@ LaplacianSharpeningImageFilter::GenerateData() binaryFilter->SetFunctor( - [filteredShift, inputScale, filteredScale, inputShift](const typename RealImageType::PixelType & filteredPixel, + [filteredShift, inputScale, filteredScale, inputShift](const typename RealImageType::PixelType & filteredPixel, const typename InputImageType::PixelType & inputPixel) { return inputPixel - ((filteredPixel - filteredShift) * (inputScale / filteredScale) + inputShift); }); diff --git a/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.h b/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.h index 4ebafc8aa97..abd2079eb4b 100644 --- a/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.h @@ -158,11 +158,11 @@ class ITK_TEMPLATE_EXPORT MaskFeaturePointSelectionFilter : public ImageToMeshFi ComputeConnectivityOffsets(); private: - unsigned int m_NonConnectivity{}; + unsigned int m_NonConnectivity{}; std::vector m_NonConnectivityOffsets{}; - SizeType m_BlockRadius{}; - double m_SelectFraction{}; - bool m_ComputeStructureTensors{}; + SizeType m_BlockRadius{}; + double m_SelectFraction{}; + bool m_ComputeStructureTensors{}; }; } // end namespace itk diff --git a/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.hxx b/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.hxx index a0e62b9a437..ab5e16ab943 100644 --- a/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.hxx @@ -101,8 +101,8 @@ MaskFeaturePointSelectionFilter::GenerateData() this->ComputeConnectivityOffsets(); // fill inputs / outputs / misc - const TImage * image = this->GetInput(); - RegionType region = image->GetLargestPossibleRegion(); + const TImage * image = this->GetInput(); + RegionType region = image->GetLargestPossibleRegion(); typename ImageType::SpacingType voxelSpacing = image->GetSpacing(); const FeaturePointsPointer pointSet = this->GetOutput(); @@ -137,7 +137,7 @@ MaskFeaturePointSelectionFilter::GenerateData() else { // copy mask into selectionMap - ImageRegionConstIterator maskItr(mask, region); + ImageRegionConstIterator maskItr(mask, region); ImageRegionIterator mapItr(selectionMap, region); for (maskItr.GoToBegin(), mapItr.GoToBegin(); !maskItr.IsAtEnd(); ++maskItr, ++mapItr) { @@ -147,7 +147,7 @@ MaskFeaturePointSelectionFilter::GenerateData() // set safe region for picking feature points depending on whether tensors are computed IndexType safeIndex = region.GetIndex(); - SizeType safeSize = region.GetSize(); + SizeType safeSize = region.GetSize(); if (m_ComputeStructureTensors) { @@ -170,7 +170,7 @@ MaskFeaturePointSelectionFilter::GenerateData() // iterators for variance computing loop ImageRegionIterator mapItr(selectionMap, region); - ConstNeighborhoodIterator imageItr(m_BlockRadius, image, region); + ConstNeighborhoodIterator imageItr(m_BlockRadius, image, region); using NeighborSizeType = typename ConstNeighborhoodIterator::NeighborIndexType; const NeighborSizeType numPixelsInNeighborhood = imageItr.Size(); @@ -208,9 +208,9 @@ MaskFeaturePointSelectionFilter::GenerateData() } // number of points to select - IndexValueType numberOfPointsInserted = -1; // initialize to -1 + IndexValueType numberOfPointsInserted = -1; // initialize to -1 const IndexValueType maxNumberPointsToInserted = Math::Floor(0.5 + pointMap.size() * m_SelectFraction); - constexpr double TRACE_EPSILON = 1e-8; + constexpr double TRACE_EPSILON = 1e-8; // pick points with highest variance first (inverse iteration) auto rit = pointMap.rbegin(); @@ -236,7 +236,7 @@ MaskFeaturePointSelectionFilter::GenerateData() center.SetSize(radius); center.SetIndex(indexOfPointToPick); - const SizeType neighborRadiusForTensor = m_BlockRadius + m_BlockRadius; + const SizeType neighborRadiusForTensor = m_BlockRadius + m_BlockRadius; ConstNeighborhoodIterator gradientItr(neighborRadiusForTensor, image, center); gradientItr.GoToBegin(); @@ -254,8 +254,8 @@ MaskFeaturePointSelectionFilter::GenerateData() OffsetType right = off; right[j] += 1; - const ImagePixelType leftPixelValue = image->GetPixel(gradientItr.GetIndex(left)); - const ImagePixelType rightPixelValue = image->GetPixel(gradientItr.GetIndex(right)); + const ImagePixelType leftPixelValue = image->GetPixel(gradientItr.GetIndex(left)); + const ImagePixelType rightPixelValue = image->GetPixel(gradientItr.GetIndex(right)); const SpacePrecisionType doubleSpacing = voxelSpacing[j] * 2.0; // using image GetPixel instead of iterator GetPixel since offsets might be outside of neighbourhood @@ -264,7 +264,7 @@ MaskFeaturePointSelectionFilter::GenerateData() // Compute tensor product of gradI with itself const vnl_matrix tnspose{ gradI.GetTranspose().as_matrix() }; - const StructureTensorType product(gradI * tnspose); + const StructureTensorType product(gradI * tnspose); tensor += product; } diff --git a/Modules/Filtering/ImageFeature/include/itkMultiScaleHessianBasedMeasureImageFilter.h b/Modules/Filtering/ImageFeature/include/itkMultiScaleHessianBasedMeasureImageFilter.h index 923ef1769d6..bd97c47e475 100644 --- a/Modules/Filtering/ImageFeature/include/itkMultiScaleHessianBasedMeasureImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkMultiScaleHessianBasedMeasureImageFilter.h @@ -236,7 +236,7 @@ class ITK_TEMPLATE_EXPORT MultiScaleHessianBasedMeasureImageFilter double m_SigmaMinimum{}; double m_SigmaMaximum{}; - unsigned int m_NumberOfSigmaSteps{}; + unsigned int m_NumberOfSigmaSteps{}; SigmaStepMethodEnum m_SigmaStepMethod{}; typename HessianToMeasureFilterType::Pointer m_HessianToMeasureFilter{}; diff --git a/Modules/Filtering/ImageFeature/include/itkMultiScaleHessianBasedMeasureImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkMultiScaleHessianBasedMeasureImageFilter.hxx index b54f0301f3d..1f89b6e6a01 100644 --- a/Modules/Filtering/ImageFeature/include/itkMultiScaleHessianBasedMeasureImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkMultiScaleHessianBasedMeasureImageFilter.hxx @@ -196,7 +196,7 @@ MultiScaleHessianBasedMeasureImageFilterGetOutput()->GetBufferedRegion(); + const OutputRegionType outputRegion = this->GetOutput()->GetBufferedRegion(); ImageRegionIterator it(m_UpdateBuffer, outputRegion); ImageRegionIterator oit(this->GetOutput(), outputRegion); @@ -244,7 +244,7 @@ MultiScaleHessianBasedMeasureImageFilter it(m_HessianToMeasureFilter->GetOutput(), outputRegion); - ImageRegionIterator hit(m_HessianFilter->GetOutput(), outputRegion); + ImageRegionIterator hit(m_HessianFilter->GetOutput(), outputRegion); while (!oit.IsAtEnd()) { diff --git a/Modules/Filtering/ImageFeature/include/itkSimpleContourExtractorImageFilter.h b/Modules/Filtering/ImageFeature/include/itkSimpleContourExtractorImageFilter.h index 47c58b7fcdf..c079b5b42d8 100644 --- a/Modules/Filtering/ImageFeature/include/itkSimpleContourExtractorImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkSimpleContourExtractorImageFilter.h @@ -147,8 +147,8 @@ class ITK_TEMPLATE_EXPORT SimpleContourExtractorImageFilter : public BoxImageFil private: - InputPixelType m_InputForegroundValue{}; - InputPixelType m_InputBackgroundValue{}; + InputPixelType m_InputForegroundValue{}; + InputPixelType m_InputBackgroundValue{}; OutputPixelType m_OutputForegroundValue{}; OutputPixelType m_OutputBackgroundValue{}; }; diff --git a/Modules/Filtering/ImageFeature/include/itkSimpleContourExtractorImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkSimpleContourExtractorImageFilter.hxx index af4b891ed0f..9e4278dc316 100644 --- a/Modules/Filtering/ImageFeature/include/itkSimpleContourExtractorImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkSimpleContourExtractorImageFilter.hxx @@ -48,14 +48,14 @@ SimpleContourExtractorImageFilter::DynamicThreadedGen ZeroFluxNeumannBoundaryCondition nbc; ConstNeighborhoodIterator bit; - ImageRegionIterator it; + ImageRegionIterator it; // Allocate output - const typename OutputImageType::Pointer output = this->GetOutput(); + const typename OutputImageType::Pointer output = this->GetOutput(); const typename InputImageType::ConstPointer input = this->GetInput(); // Find the data-set boundary "faces" - NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; + NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; const typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = bC(input, outputRegionForThread, this->GetRadius()); diff --git a/Modules/Filtering/ImageFeature/include/itkSobelEdgeDetectionImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkSobelEdgeDetectionImageFilter.hxx index 41278f7c21e..c07e8408276 100644 --- a/Modules/Filtering/ImageFeature/include/itkSobelEdgeDetectionImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkSobelEdgeDetectionImageFilter.hxx @@ -101,13 +101,13 @@ SobelEdgeDetectionImageFilter::GenerateData() // Create the Sobel operator SobelOperator opers[ImageDimension]; - ZeroFluxNeumannBoundaryCondition nbc; + ZeroFluxNeumannBoundaryCondition nbc; // Setup mini-pipelines along each axis. - typename OpFilter::Pointer opFilter[ImageDimension]; + typename OpFilter::Pointer opFilter[ImageDimension]; typename MultFilter::Pointer multFilter[ImageDimension]; - auto addFilter = AddFilter::New(); - auto sqrtFilter = SqrtFilter::New(); + auto addFilter = AddFilter::New(); + auto sqrtFilter = SqrtFilter::New(); for (i = 0; i < ImageDimension; ++i) { // Create the filters for this axis. diff --git a/Modules/Filtering/ImageFeature/include/itkUnsharpMaskImageFilter.h b/Modules/Filtering/ImageFeature/include/itkUnsharpMaskImageFilter.h index f40da643ad9..40d03ddc2a7 100644 --- a/Modules/Filtering/ImageFeature/include/itkUnsharpMaskImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkUnsharpMaskImageFilter.h @@ -165,8 +165,8 @@ class ITK_TEMPLATE_EXPORT UnsharpMaskImageFilter : public ImageToImageFilter class UnsharpMaskingFunctor @@ -174,7 +174,7 @@ class ITK_TEMPLATE_EXPORT UnsharpMaskImageFilter : public ImageToImageFilter::GenerateInputRequestedRegion Superclass::GenerateInputRequestedRegion(); // get pointers to the input and output - const typename Superclass::InputImagePointer inputPtr = const_cast(this->GetInput()); + const typename Superclass::InputImagePointer inputPtr = const_cast(this->GetInput()); const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) @@ -91,18 +91,18 @@ void ZeroCrossingImageFilter::DynamicThreadedGenerateData( const OutputImageRegionType & outputRegionForThread) { - const typename OutputImageType::Pointer output = this->GetOutput(); + const typename OutputImageType::Pointer output = this->GetOutput(); const typename InputImageType::ConstPointer input = this->GetInput(); // Calculate iterator radius static constexpr auto radius = Size::Filled(1); // Find the data-set boundary "faces" - NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; + NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = bC(input, outputRegionForThread, radius); - TotalProgressReporter progress(this, output->GetRequestedRegion().GetNumberOfPixels()); + TotalProgressReporter progress(this, output->GetRequestedRegion().GetNumberOfPixels()); constexpr InputImagePixelType zero{}; ConstNeighborhoodIterator bit = @@ -125,8 +125,8 @@ ZeroCrossingImageFilter::DynamicThreadedGenerateData( bit.OverrideBoundaryCondition(&nbc); bit.GoToBegin(); - static constexpr SizeValueType neighborhoodSize = Math::UnsignedPower(3, ImageDimension); - static constexpr SizeValueType center = neighborhoodSize / 2; + static constexpr SizeValueType neighborhoodSize = Math::UnsignedPower(3, ImageDimension); + static constexpr SizeValueType center = neighborhoodSize / 2; ImageRegionIterator it = ImageRegionIterator(output, face); while (!bit.IsAtEnd()) { diff --git a/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest.cxx index a15ffd51b11..4a4efba5c51 100644 --- a/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest.cxx @@ -37,7 +37,7 @@ itkBilateralImageFilterTest(int, char *[]) ITK_EXERCISE_BASIC_OBJECT_METHODS(filter, BilateralImageFilter, ImageToImageFilter); - double domainSigmaVal = 2.0; + double domainSigmaVal = 2.0; typename FilterType::ArrayType domainSigma = FilterType::ArrayType::Filled(domainSigmaVal); filter->SetDomainSigma(domainSigmaVal); ITK_TEST_SET_GET_VALUE(domainSigma, filter->GetDomainSigma()); @@ -62,7 +62,7 @@ itkBilateralImageFilterTest(int, char *[]) ITK_TEST_SET_GET_BOOLEAN(filter, AutomaticKernelSize, automaticKernelSize); constexpr typename FilterType::SizeType::SizeValueType radiusVal = 2; - constexpr typename FilterType::SizeType radius = FilterType::SizeType::Filled(radiusVal); + constexpr typename FilterType::SizeType radius = FilterType::SizeType::Filled(radiusVal); filter->SetRadius(radius); ITK_TEST_SET_GET_VALUE(radius, filter->GetRadius()); diff --git a/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest2.cxx b/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest2.cxx index 8ad022219dd..981b0bd7cac 100644 --- a/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest2.cxx +++ b/Modules/Filtering/ImageFeature/test/itkBilateralImageFilterTest2.cxx @@ -42,7 +42,7 @@ itkBilateralImageFilterTest2(int argc, char * argv[]) // Create a filter using FilterType = itk::BilateralImageFilter; - auto filter = FilterType::New(); + auto filter = FilterType::New(); const itk::SimpleFilterWatcher watcher(filter, "filter"); filter->SetInput(input->GetOutput()); diff --git a/Modules/Filtering/ImageFeature/test/itkDiscreteGaussianDerivativeImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkDiscreteGaussianDerivativeImageFilterTest.cxx index 91202b6d526..019728d5b64 100644 --- a/Modules/Filtering/ImageFeature/test/itkDiscreteGaussianDerivativeImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkDiscreteGaussianDerivativeImageFilterTest.cxx @@ -85,7 +85,7 @@ itkDiscreteGaussianDerivativeImageFilterTest(int argc, char * argv[]) const double sigma = std::stod(argv[5]); DerivativeFilterType::ArrayType::ValueType maxErrorVal = 0.001; - int maxKernelWidth = 100; + int maxKernelWidth = 100; if (argc > 7) { diff --git a/Modules/Filtering/ImageFeature/test/itkHessianRecursiveGaussianFilterScaleSpaceTest.cxx b/Modules/Filtering/ImageFeature/test/itkHessianRecursiveGaussianFilterScaleSpaceTest.cxx index 9e485841b47..85babce851c 100644 --- a/Modules/Filtering/ImageFeature/test/itkHessianRecursiveGaussianFilterScaleSpaceTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkHessianRecursiveGaussianFilterScaleSpaceTest.cxx @@ -61,7 +61,7 @@ itkHessianRecursiveGaussianFilterScaleSpaceTest(int, char *[]) using IteratorType = itk::ImageRegionIteratorWithIndex; constexpr unsigned int numberOfScales = 4; - double scales[numberOfScales]; + double scales[numberOfScales]; scales[0] = 1.0; scales[1] = 2.0; scales[2] = 3.0; @@ -120,7 +120,7 @@ itkHessianRecursiveGaussianFilterScaleSpaceTest(int, char *[]) { IteratorType it(inputImage, inputImage->GetRequestedRegion()); - PointType point; + PointType point; constexpr double objectSize = 5.0; spacing.Fill(scale / 5.0); diff --git a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx index 8feb5e8a528..2f718fac64a 100644 --- a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx @@ -55,12 +55,12 @@ Test_GetCircles_should_return_empty_list_when_NumberOfCircles_is_set_to_zero() using ImageType = itk::Image; // Create an image that has at least one circle. - const auto image = ImageType::New(); + const auto image = ImageType::New(); constexpr ImageType::SizeType size = { { 64, 64 } }; image->SetRegions(size); image->AllocateInitialized(); constexpr unsigned int center[] = { 16, 16 }; - constexpr double radius = 7.0; + constexpr double radius = 7.0; CreateCircle(image, center, radius); using FilterType = itk::HoughTransform2DCirclesImageFilter; @@ -92,7 +92,7 @@ Test_GetCircles_should_return_empty_list_when_input_image_is_uniform() const auto filter = FilterType::New(); // Create an input image for the filter. - const auto image = ImageType::New(); + const auto image = ImageType::New(); constexpr ImageType::SizeType size = { { 32, 32 } }; image->SetRegions(size); image->Allocate(); @@ -129,13 +129,13 @@ Test_RadiusImage_and_OutputImage_may_have_different_types() using InputImageType = itk::Image; // Create an image that has at least one circle. - const auto inputImage = InputImageType::New(); + const auto inputImage = InputImageType::New(); constexpr InputImageType::SizeType size = { { 64, 64 } }; inputImage->SetRegions(size); inputImage->Allocate(); inputImage->FillBuffer(1); constexpr unsigned int center[] = { 32, 32 }; - constexpr double radius = 8.5; + constexpr double radius = 8.5; CreateCircle(inputImage, center, radius); using OutputPixelType = unsigned long; @@ -163,7 +163,7 @@ Test_RadiusImage_and_OutputImage_may_have_different_types() // Note that GetBufferPointer() returns a different type for filter2 than for filter1. const OutputPixelType * const radiusBufferPointer1 = radiusImage1->GetBufferPointer(); - const double * const radiusBufferPointer2 = radiusImage2->GetBufferPointer(); + const double * const radiusBufferPointer2 = radiusImage2->GetBufferPointer(); if ((radiusBufferPointer1 == nullptr) || (radiusBufferPointer2 == nullptr)) { @@ -256,7 +256,7 @@ Test_Center_IsInside_SpatialObject_from_GetCircles() { using PixelType = unsigned int; using ImageType = itk::Image; - const auto image = ImageType::New(); + const auto image = ImageType::New(); constexpr ImageType::SizeType imageSize = { { 16, 32 } }; image->SetRegions(imageSize); image->AllocateInitialized(); @@ -330,7 +330,7 @@ itkHoughTransform2DCirclesImageTest(int, char *[]) constexpr unsigned int circles = 3; unsigned int center[circles][Dimension]; - double radius[circles]; + double radius[circles]; center[0][0] = 50; center[0][1] = 50; @@ -482,7 +482,7 @@ itkHoughTransform2DCirclesImageTest(int, char *[]) // Search for maxima unsigned int centerResult[circles][Dimension]; - double radiusResult[circles]; + double radiusResult[circles]; unsigned int foundCircles = 0; do { diff --git a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DLinesImageTest.cxx b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DLinesImageTest.cxx index 57daa469013..a05f3a7006c 100644 --- a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DLinesImageTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DLinesImageTest.cxx @@ -47,7 +47,7 @@ Test_GetLines_should_return_empty_list_when_input_image_is_entirely_black() using FilterType = itk::HoughTransform2DLinesImageFilter; // Create a black input image for the filter. - const auto image = ImageType::New(); + const auto image = ImageType::New(); constexpr ImageType::SizeType size = { { 32, 32 } }; image->SetRegions(size); image->AllocateInitialized(); @@ -152,8 +152,8 @@ itkHoughTransform2DLinesImageTest(int, char *[]) // Create a line constexpr unsigned int lines = 1; - constexpr double theta = 0.20; // radians - constexpr double radius = 50; + constexpr double theta = 0.20; // radians + constexpr double radius = 50; const double Vx = radius * std::cos(theta); const double Vy = radius * std::sin(theta); diff --git a/Modules/Filtering/ImageFeature/test/itkLaplacianRecursiveGaussianImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkLaplacianRecursiveGaussianImageFilterTest.cxx index 0679ab2f6cd..306bcc7b102 100644 --- a/Modules/Filtering/ImageFeature/test/itkLaplacianRecursiveGaussianImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkLaplacianRecursiveGaussianImageFilterTest.cxx @@ -73,9 +73,9 @@ itkLaplacianRecursiveGaussianImageFilterTest(int argc, char * argv[]) // Setting the ITK pipeline filter - auto lapFilter = LaplacianFilter::New(); + auto lapFilter = LaplacianFilter::New(); const itk::SimpleFilterWatcher watcher(lapFilter); - auto zeroFilter = ZeroCrossingFilter::New(); + auto zeroFilter = ZeroCrossingFilter::New(); reader->SetFileName(inputFilename); writer->SetFileName(outputFilename); diff --git a/Modules/Filtering/ImageFeature/test/itkMaskFeaturePointSelectionFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkMaskFeaturePointSelectionFilterTest.cxx index eb65461038c..2caea75df87 100644 --- a/Modules/Filtering/ImageFeature/test/itkMaskFeaturePointSelectionFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkMaskFeaturePointSelectionFilterTest.cxx @@ -141,7 +141,7 @@ itkMaskFeaturePointSelectionFilterTest(int argc, char * argv[]) // Highlight the feature points identified in the output image using PointIteratorType = PointSetType::PointsContainer::ConstIterator; - PointIteratorType pointItr = filter->GetOutput()->GetPoints()->Begin(); + PointIteratorType pointItr = filter->GetOutput()->GetPoints()->Begin(); const PointIteratorType pointEnd = filter->GetOutput()->GetPoints()->End(); OutputImageType::IndexType index; diff --git a/Modules/Filtering/ImageFeature/test/itkSimpleContourExtractorImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkSimpleContourExtractorImageFilterTest.cxx index fd4483af8af..1d5c4e454c2 100644 --- a/Modules/Filtering/ImageFeature/test/itkSimpleContourExtractorImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkSimpleContourExtractorImageFilterTest.cxx @@ -69,8 +69,8 @@ itkSimpleContourExtractorImageFilterTest(int argc, char * argv[]) filter->SetInput(reader->GetOutput()); writer->SetInput(filter->GetOutput()); - constexpr FilterType::InputPixelType inputForegroundValue = 255; - constexpr FilterType::InputPixelType inputBackgroundValue = 0; + constexpr FilterType::InputPixelType inputForegroundValue = 255; + constexpr FilterType::InputPixelType inputBackgroundValue = 0; constexpr FilterType::OutputPixelType outputForegroundValue = itk::NumericTraits::max(); constexpr FilterType::OutputPixelType outputBackgroundValue{}; diff --git a/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx index 6b2d64ff090..9a4f0de0e6c 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx @@ -134,7 +134,7 @@ template ::GenerateOutputInformation() { - const DataObject * input = nullptr; + const DataObject * input = nullptr; const Input1ImagePointer inputPtr1 = dynamic_cast(ProcessObject::GetInput(0)); const Input2ImagePointer inputPtr2 = dynamic_cast(ProcessObject::GetInput(1)); @@ -172,8 +172,8 @@ BinaryFunctorImageFilter::D // We use dynamic_cast since inputs are stored as DataObjects. The // ImageToImageFilter::GetInput(int) always returns a pointer to a // TInputImage1 so it cannot be used for the second input. - const auto * inputPtr1 = dynamic_cast(ProcessObject::GetInput(0)); - const auto * inputPtr2 = dynamic_cast(ProcessObject::GetInput(1)); + const auto * inputPtr1 = dynamic_cast(ProcessObject::GetInput(0)); + const auto * inputPtr2 = dynamic_cast(ProcessObject::GetInput(1)); TOutputImage * outputPtr = this->GetOutput(0); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); @@ -182,7 +182,7 @@ BinaryFunctorImageFilter::D { ImageScanlineConstIterator inputIt1(inputPtr1, outputRegionForThread); ImageScanlineConstIterator inputIt2(inputPtr2, outputRegionForThread); - ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); + ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); while (!inputIt1.IsAtEnd()) { @@ -203,7 +203,7 @@ BinaryFunctorImageFilter::D else if (inputPtr1) { ImageScanlineConstIterator inputIt1(inputPtr1, outputRegionForThread); - ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); + ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); const Input2ImagePixelType & input2Value = this->GetConstant2(); @@ -223,7 +223,7 @@ BinaryFunctorImageFilter::D else if (inputPtr2) { ImageScanlineConstIterator inputIt2(inputPtr2, outputRegionForThread); - ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); + ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); const Input1ImagePixelType & input1Value = this->GetConstant1(); diff --git a/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.hxx index f4d2945fd96..3fb13488b96 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.hxx @@ -132,8 +132,8 @@ BinaryGeneratorImageFilter::GenerateOu { const DataObject * input = nullptr; - const auto * inputPtr1 = dynamic_cast(ProcessObject::GetInput(0)); - const auto * inputPtr2 = dynamic_cast(ProcessObject::GetInput(1)); + const auto * inputPtr1 = dynamic_cast(ProcessObject::GetInput(0)); + const auto * inputPtr2 = dynamic_cast(ProcessObject::GetInput(1)); if (this->GetNumberOfInputs() >= 2) { @@ -174,14 +174,14 @@ template template void BinaryGeneratorImageFilter::DynamicThreadedGenerateDataWithFunctor( - const TFunctor & functor, + const TFunctor & functor, const OutputImageRegionType & outputRegionForThread) { // We use dynamic_cast since inputs are stored as DataObjects. The // ImageToImageFilter::GetInput(int) always returns a pointer to a // TInputImage1 so it cannot be used for the second input. - const auto * inputPtr1 = dynamic_cast(ProcessObject::GetInput(0)); - const auto * inputPtr2 = dynamic_cast(ProcessObject::GetInput(1)); + const auto * inputPtr1 = dynamic_cast(ProcessObject::GetInput(0)); + const auto * inputPtr2 = dynamic_cast(ProcessObject::GetInput(1)); TOutputImage * outputPtr = this->GetOutput(0); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); @@ -190,7 +190,7 @@ BinaryGeneratorImageFilter::DynamicThr { ImageScanlineConstIterator inputIt1(inputPtr1, outputRegionForThread); ImageScanlineConstIterator inputIt2(inputPtr2, outputRegionForThread); - ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); + ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); while (!inputIt1.IsAtEnd()) { @@ -211,7 +211,7 @@ BinaryGeneratorImageFilter::DynamicThr else if (inputPtr1) { ImageScanlineConstIterator inputIt1(inputPtr1, outputRegionForThread); - ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); + ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); const Input2ImagePixelType & input2Value = this->GetConstant2(); @@ -231,7 +231,7 @@ BinaryGeneratorImageFilter::DynamicThr else if (inputPtr2) { ImageScanlineConstIterator inputIt2(inputPtr2, outputRegionForThread); - ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); + ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); const Input1ImagePixelType & input1Value = this->GetConstant1(); diff --git a/Modules/Filtering/ImageFilterBase/include/itkBoxImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkBoxImageFilter.hxx index 705991a763d..1f4e0123d84 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkBoxImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkBoxImageFilter.hxx @@ -85,7 +85,7 @@ BoxImageFilter::GenerateInputRequestedRegion() // build an exception InvalidRequestedRegionError e(__FILE__, __LINE__); - std::ostringstream msg; + std::ostringstream msg; msg << static_cast(this->GetNameOfClass()) << "::GenerateInputRequestedRegion()"; e.SetLocation(msg.str().c_str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region."); diff --git a/Modules/Filtering/ImageFilterBase/include/itkCastImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkCastImageFilter.hxx index 8efeedc7c16..f050004700d 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkCastImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkCastImageFilter.hxx @@ -58,7 +58,7 @@ CastImageFilter::GenerateOutputInformation() // this filter allows the input the output to be of different dimensions // get pointers to the input and output - TOutputImage * outputPtr = this->GetOutput(); + TOutputImage * outputPtr = this->GetOutput(); const TInputImage * inputPtr = this->GetInput(); if (!outputPtr || !inputPtr) @@ -96,7 +96,7 @@ CastImageFilter::DynamicThreadedGenerateDataDispatche const OutputImageRegionType & outputRegionForThread) { const TInputImage * inputPtr = this->GetInput(); - TOutputImage * outputPtr = this->GetOutput(0); + TOutputImage * outputPtr = this->GetOutput(0); // Define the portion of the input to walk for this thread, using // the CallCopyOutputRegionToInputRegion method allows for the input @@ -130,7 +130,7 @@ CastImageFilter::DynamicThreadedGenerateDataDispatche return; } const TInputImage * inputPtr = this->GetInput(); - TOutputImage * outputPtr = this->GetOutput(0); + TOutputImage * outputPtr = this->GetOutput(0); // Define the portion of the input to walk for this thread, using // the CallCopyOutputRegionToInputRegion method allows for the input @@ -143,7 +143,7 @@ CastImageFilter::DynamicThreadedGenerateDataDispatche // Define the iterators ImageScanlineConstIterator inputIt(inputPtr, inputRegionForThread); - ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); + ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); OutputPixelType value{ outputIt.Get() }; while (!inputIt.IsAtEnd()) diff --git a/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.h b/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.h index f13e7e4f308..f2ff573586a 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.h +++ b/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.h @@ -178,7 +178,7 @@ class ITK_TEMPLATE_EXPORT MaskNeighborhoodOperatorImageFilter private: OutputPixelType m_DefaultValue{}; - bool m_UseDefaultValue{ true }; + bool m_UseDefaultValue{ true }; }; } // end namespace itk diff --git a/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.hxx index 9a152ed0477..958811d2989 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.hxx @@ -53,7 +53,7 @@ MaskNeighborhoodOperatorImageFilter(this->GetInput()); - const MaskImagePointer maskPtr = const_cast(this->GetMaskImage()); + const MaskImagePointer maskPtr = const_cast(this->GetMaskImage()); if (!inputPtr || !maskPtr) { @@ -91,9 +91,9 @@ void MaskNeighborhoodOperatorImageFilter:: DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) { - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); const InputImageType * input = this->GetInput(); - const MaskImageType * mask = this->GetMaskImage(); + const MaskImageType * mask = this->GetMaskImage(); // If mask is not specified, call the superclass... if (!mask) @@ -112,7 +112,7 @@ MaskNeighborhoodOperatorImageFilter; using FaceListType = typename BFC::FaceListType; - BFC faceCalculator; + BFC faceCalculator; const FaceListType faceList = faceCalculator(input, outputRegionForThread, this->GetOperator().GetRadius()); TotalProgressReporter progress(this, output->GetRequestedRegion().GetNumberOfPixels()); @@ -123,8 +123,8 @@ MaskNeighborhoodOperatorImageFilter bit; - ImageRegionIterator it; - ImageRegionConstIterator mit; + ImageRegionIterator it; + ImageRegionConstIterator mit; for (const auto & face : faceList) { @@ -158,7 +158,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); os << indent << "Default value : " << static_cast::PrintType>(m_DefaultValue) diff --git a/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilter.h b/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilter.h index 8016b9168f8..c1f7bb4b66e 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilter.h +++ b/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilter.h @@ -149,13 +149,13 @@ class ITK_TEMPLATE_EXPORT MovingHistogramImageFilter using HistogramType = THistogram; void - PushHistogram(HistogramType & histogram, + PushHistogram(HistogramType & histogram, const OffsetListType * addedList, const OffsetListType * removedList, - const RegionType & inputRegion, - const RegionType & kernRegion, + const RegionType & inputRegion, + const RegionType & kernRegion, const InputImageType * inputImage, - const IndexType currentIdx); + const IndexType currentIdx); }; // end of class } // end namespace itk diff --git a/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilter.hxx index 5c3129bd749..98571de311b 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilter.hxx @@ -45,9 +45,9 @@ MovingHistogramImageFilter::Dyna HistogramType histogram; this->ConfigureHistogram(histogram); - OutputImageType * outputImage = this->GetOutput(); + OutputImageType * outputImage = this->GetOutput(); const InputImageType * inputImage = this->GetInput(); - const RegionType inputRegion = inputImage->GetRequestedRegion(); + const RegionType inputRegion = inputImage->GetRequestedRegion(); TotalProgressReporter progress(this, outputImage->GetRequestedRegion().GetNumberOfPixels()); @@ -66,8 +66,8 @@ MovingHistogramImageFilter::Dyna } // now move the histogram - auto direction = MakeFilled>(1); - const int axis = ImageDimension - 1; + auto direction = MakeFilled>(1); + const int axis = ImageDimension - 1; OffsetType offset{}; RegionType stRegion; stRegion.SetSize(this->m_Kernel.GetSize()); @@ -145,10 +145,10 @@ MovingHistogramImageFilter::Dyna OffsetType Changes; this->GetDirAndOffset(LineStart, PrevLineStart, LineOffset, Changes, LineDirection); ++(Steps[LineDirection]); - const IndexType PrevLineStartHist = LineStart - LineOffset; + const IndexType PrevLineStartHist = LineStart - LineOffset; const OffsetListType * addedListLine = &this->m_AddedOffsets[LineOffset]; const OffsetListType * removedListLine = &this->m_RemovedOffsets[LineOffset]; - HistogramType & tmpHist = HistVec[LineDirection]; + HistogramType & tmpHist = HistVec[LineDirection]; stRegion.SetIndex(PrevLineStart - centerOffset); // Now move the histogram PushHistogram(tmpHist, addedListLine, removedListLine, inputRegion, stRegion, inputImage, PrevLineStartHist); @@ -172,13 +172,13 @@ MovingHistogramImageFilter::Dyna template void MovingHistogramImageFilter::PushHistogram( - HistogramType & histogram, + HistogramType & histogram, const OffsetListType * addedList, const OffsetListType * removedList, - const RegionType & inputRegion, - const RegionType & kernRegion, + const RegionType & inputRegion, + const RegionType & kernRegion, const InputImageType * inputImage, - const IndexType currentIdx) + const IndexType currentIdx) { if (inputRegion.IsInside(kernRegion)) { diff --git a/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilterBase.h b/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilterBase.h index f0e31fbccd5..402fc6f1c0e 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilterBase.h +++ b/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilterBase.h @@ -148,9 +148,9 @@ class ITK_TEMPLATE_EXPORT MovingHistogramImageFilterBase : public KernelImageFil void GetDirAndOffset(const IndexType LineStart, const IndexType PrevLineStart, - OffsetType & LineOffset, - OffsetType & Changes, - int & LineDirection); + OffsetType & LineOffset, + OffsetType & Changes, + int & LineDirection); // store the added and removed pixel offset in a list OffsetMapType m_AddedOffsets{}; diff --git a/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilterBase.hxx b/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilterBase.hxx index a7807879145..31c404623d5 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilterBase.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilterBase.hxx @@ -51,10 +51,10 @@ MovingHistogramImageFilterBase::SetKernel(co auto tmpSEImage = BoolImageType::New(); tmpSEImage->SetRegions(kernel.GetSize()); tmpSEImage->Allocate(); - const RegionType tmpSEImageRegion = tmpSEImage->GetRequestedRegion(); + const RegionType tmpSEImageRegion = tmpSEImage->GetRequestedRegion(); ImageRegionIteratorWithIndex kernelImageIt(tmpSEImage, tmpSEImageRegion); - KernelIteratorType kernel_it = kernel.Begin(); - OffsetListType kernelOffsets; + KernelIteratorType kernel_it = kernel.Begin(); + OffsetListType kernelOffsets; // create a center index to compute the offset IndexType centerIndex; @@ -186,9 +186,9 @@ template void MovingHistogramImageFilterBase::GetDirAndOffset(const IndexType LineStart, const IndexType PrevLineStart, - OffsetType & LineOffset, - OffsetType & Changes, - int & LineDirection) + OffsetType & LineOffset, + OffsetType & Changes, + int & LineDirection) { // when moving between lines in the same plane there should be only // 1 non zero (positive) entry in LineOffset. diff --git a/Modules/Filtering/ImageFilterBase/include/itkNeighborhoodOperatorImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkNeighborhoodOperatorImageFilter.hxx index 98a25377162..3b2269b89dd 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkNeighborhoodOperatorImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkNeighborhoodOperatorImageFilter.hxx @@ -82,9 +82,9 @@ NeighborhoodOperatorImageFilter:: using FaceListType = typename BFC::FaceListType; const NeighborhoodInnerProduct smartInnerProduct; - BFC faceCalculator; + BFC faceCalculator; - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); const InputImageType * input = this->GetInput(); // Break the input into a series of regions. The first region is free diff --git a/Modules/Filtering/ImageFilterBase/include/itkNoiseImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkNoiseImageFilter.hxx index 4af5d1454de..0cd980ba174 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkNoiseImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkNoiseImageFilter.hxx @@ -44,14 +44,14 @@ NoiseImageFilter::DynamicThreadedGenerateData( ZeroFluxNeumannBoundaryCondition nbc; ConstNeighborhoodIterator bit; - ImageRegionIterator it; + ImageRegionIterator it; // Allocate output - const typename OutputImageType::Pointer output = this->GetOutput(); + const typename OutputImageType::Pointer output = this->GetOutput(); const typename InputImageType::ConstPointer input = this->GetInput(); // Find the data-set boundary "faces" - NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; + NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; const typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = bC(input, outputRegionForThread, this->GetRadius()); diff --git a/Modules/Filtering/ImageFilterBase/include/itkNullImageToImageFilterDriver.hxx b/Modules/Filtering/ImageFilterBase/include/itkNullImageToImageFilterDriver.hxx index 185c648600c..8569a9d36a6 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkNullImageToImageFilterDriver.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkNullImageToImageFilterDriver.hxx @@ -98,7 +98,7 @@ protected: private: ImageToImageFilter * m_Filter; - ImageSizeType m_ImageSize; + ImageSizeType m_ImageSize; }; @@ -139,7 +139,7 @@ NullImageToImageFilterDriver::Execute() }; // Set up input images - auto ip = TInputImage::New(); + auto ip = TInputImage::New(); typename TOutputImage::IndexType index; for (unsigned int i = 0; i < ImageDimension; ++i) diff --git a/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.h b/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.h index e9508137d4d..fb8c959a3a0 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.h +++ b/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.h @@ -176,7 +176,7 @@ class ITK_TEMPLATE_EXPORT RecursiveSeparableImageFilter : public InPlaceImageFil template static inline void - MathEMAMAMAM(T1 & out, + MathEMAMAMAM(T1 & out, const T1 & a1, const T2 & b1, const T1 & a2, @@ -192,15 +192,15 @@ class ITK_TEMPLATE_EXPORT RecursiveSeparableImageFilter : public InPlaceImageFil template static inline void - MathEMAMAMAM(VariableLengthVector & out, + MathEMAMAMAM(VariableLengthVector & out, const VariableLengthVector & a1, - const T2 & b1, + const T2 & b1, const VariableLengthVector & a2, - const T2 & b2, + const T2 & b2, const VariableLengthVector & a3, - const T2 & b3, + const T2 & b3, const VariableLengthVector & a4, - const T2 & b4) + const T2 & b4) { const unsigned int sz = a1.GetSize(); if (sz != out.GetSize()) @@ -215,7 +215,7 @@ class ITK_TEMPLATE_EXPORT RecursiveSeparableImageFilter : public InPlaceImageFil template static inline void - MathSMAMAMAM(T1 & out, + MathSMAMAMAM(T1 & out, const T1 & a1, const T2 & b1, const T1 & a2, @@ -230,15 +230,15 @@ class ITK_TEMPLATE_EXPORT RecursiveSeparableImageFilter : public InPlaceImageFil template static inline void - MathSMAMAMAM(VariableLengthVector & out, + MathSMAMAMAM(VariableLengthVector & out, const VariableLengthVector & a1, - const T2 & b1, + const T2 & b1, const VariableLengthVector & a2, - const T2 & b2, + const T2 & b2, const VariableLengthVector & a3, - const T2 & b3, + const T2 & b3, const VariableLengthVector & a4, - const T2 & b4) + const T2 & b4) { const unsigned int sz = a1.GetSize(); if (sz != out.GetSize()) diff --git a/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.hxx index 8b6679bdb18..b15d3ce12fc 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.hxx @@ -80,10 +80,10 @@ RecursiveSeparableImageFilter::GetInputImage() */ template void -RecursiveSeparableImageFilter::FilterDataArray(RealType * const outs, +RecursiveSeparableImageFilter::FilterDataArray(RealType * const outs, const RealType * const data, - RealType * const scratch, - const SizeValueType ln) const + RealType * const scratch, + const SizeValueType ln) const { RealType * const scratch1 = outs; @@ -176,7 +176,7 @@ RecursiveSeparableImageFilter::EnlargeOutputRequested if (out) { - OutputImageRegionType outputRegion = out->GetRequestedRegion(); + OutputImageRegionType outputRegion = out->GetRequestedRegion(); const OutputImageRegionType & largestOutputRegion = out->GetLargestPossibleRegion(); // verify sane parameter @@ -201,7 +201,7 @@ RecursiveSeparableImageFilter::BeforeThreadedGenerate using RegionType = ImageRegion; const typename TInputImage::ConstPointer inputImage(this->GetInputImage()); - const typename TOutputImage::Pointer outputImage(this->GetOutput()); + const typename TOutputImage::Pointer outputImage(this->GetOutput()); const unsigned int imageDimension = inputImage->GetImageDimension(); @@ -242,7 +242,7 @@ RecursiveSeparableImageFilter::GenerateData() using RegionType = ImageRegion; const typename TOutputImage::Pointer outputImage(this->GetOutput()); - const RegionType region = outputImage->GetRequestedRegion(); + const RegionType region = outputImage->GetRequestedRegion(); this->GetMultiThreader()->SetNumberOfWorkUnits(this->GetNumberOfWorkUnits()); this->GetMultiThreader()->template ParallelizeImageRegionRestrictDirection( @@ -269,12 +269,12 @@ RecursiveSeparableImageFilter::DynamicThreadedGenerat using RegionType = ImageRegion; const typename TInputImage::ConstPointer inputImage(this->GetInputImage()); - const typename TOutputImage::Pointer outputImage(this->GetOutput()); + const typename TOutputImage::Pointer outputImage(this->GetOutput()); const RegionType region = outputRegionForThread; InputConstIteratorType inputIterator(inputImage, region); - OutputIteratorType outputIterator(outputImage, region); + OutputIteratorType outputIterator(outputImage, region); inputIterator.SetDirection(this->m_Direction); outputIterator.SetDirection(this->m_Direction); diff --git a/Modules/Filtering/ImageFilterBase/include/itkTernaryFunctorImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkTernaryFunctorImageFilter.hxx index 8601760e919..0268ff087bb 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkTernaryFunctorImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkTernaryFunctorImageFilter.hxx @@ -133,7 +133,7 @@ TernaryFunctorImageFilter(ProcessObject::GetInput(0)); - const auto * inputPtr2 = dynamic_cast(ProcessObject::GetInput(1)); - const auto * inputPtr3 = dynamic_cast(ProcessObject::GetInput(2)); + const auto * inputPtr1 = dynamic_cast(ProcessObject::GetInput(0)); + const auto * inputPtr2 = dynamic_cast(ProcessObject::GetInput(1)); + const auto * inputPtr3 = dynamic_cast(ProcessObject::GetInput(2)); if (this->GetNumberOfInputs() >= 3) { @@ -247,9 +247,9 @@ TernaryGeneratorImageFilter(ProcessObject::GetInput(0)); - const auto * inputPtr2 = dynamic_cast(ProcessObject::GetInput(1)); - const auto * inputPtr3 = dynamic_cast(ProcessObject::GetInput(2)); + const auto * inputPtr1 = dynamic_cast(ProcessObject::GetInput(0)); + const auto * inputPtr2 = dynamic_cast(ProcessObject::GetInput(1)); + const auto * inputPtr3 = dynamic_cast(ProcessObject::GetInput(2)); const OutputImagePointer outputPtr = this->GetOutput(0); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); @@ -257,7 +257,7 @@ TernaryGeneratorImageFilter> inputIt1; std::unique_ptr> inputIt2; std::unique_ptr> inputIt3; - ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); + ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); if (inputPtr1 && inputPtr2 && inputPtr3) { diff --git a/Modules/Filtering/ImageFilterBase/include/itkUnaryGeneratorImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkUnaryGeneratorImageFilter.hxx index d96e2bee98f..364cdb8728c 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkUnaryGeneratorImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkUnaryGeneratorImageFilter.hxx @@ -42,7 +42,7 @@ UnaryGeneratorImageFilter::GenerateOutputInformation( // this filter allows the input the output to be of different dimensions // get pointers to the input and output - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); const InputImageType * inputPtr = this->GetInput(); if (!outputPtr || !inputPtr) @@ -76,13 +76,13 @@ template template void UnaryGeneratorImageFilter::DynamicThreadedGenerateDataWithFunctor( - const TFunctor & functor, + const TFunctor & functor, const OutputImageRegionType & outputRegionForThread) { const typename OutputImageRegionType::SizeType & regionSize = outputRegionForThread.GetSize(); const TInputImage * inputPtr = this->GetInput(); - TOutputImage * outputPtr = this->GetOutput(0); + TOutputImage * outputPtr = this->GetOutput(0); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); @@ -95,7 +95,7 @@ UnaryGeneratorImageFilter::DynamicThreadedGenerateDat // Define the iterators ImageScanlineConstIterator inputIt(inputPtr, inputRegionForThread); - ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); + ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); while (!inputIt.IsAtEnd()) { diff --git a/Modules/Filtering/ImageFilterBase/include/itkVectorNeighborhoodOperatorImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkVectorNeighborhoodOperatorImageFilter.hxx index 20e728273c0..b2f100d44e6 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkVectorNeighborhoodOperatorImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkVectorNeighborhoodOperatorImageFilter.hxx @@ -81,10 +81,10 @@ VectorNeighborhoodOperatorImageFilter::DynamicThreade using FaceListType = typename BFC::FaceListType; const VectorNeighborhoodInnerProduct smartInnerProduct; - BFC faceCalculator; + BFC faceCalculator; // Allocate output - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); const InputImageType * input = this->GetInput(); // Break the input into a series of regions. The first region is free diff --git a/Modules/Filtering/ImageFilterBase/test/itkCastImageFilterTest.cxx b/Modules/Filtering/ImageFilterBase/test/itkCastImageFilterTest.cxx index c960a4f4507..f6440c19525 100644 --- a/Modules/Filtering/ImageFilterBase/test/itkCastImageFilterTest.cxx +++ b/Modules/Filtering/ImageFilterBase/test/itkCastImageFilterTest.cxx @@ -78,8 +78,8 @@ GetCastTypeName() std::string name; #ifdef GCC_USEDEMANGLE const char * mangledName = typeid(T).name(); - int status; - char * unmangled = abi::__cxa_demangle(mangledName, nullptr, nullptr, &status); + int status; + char * unmangled = abi::__cxa_demangle(mangledName, nullptr, nullptr, &status); name = unmangled; free(unmangled); #else @@ -184,7 +184,7 @@ TestCastFromTo() using InputIteratorType = itk::ImageRegionConstIterator; using OutputIteratorType = itk::ImageRegionConstIterator; - InputIteratorType it(randomValuesImageSource->GetOutput(), + InputIteratorType it(randomValuesImageSource->GetOutput(), randomValuesImageSource->GetOutput()->GetLargestPossibleRegion()); OutputIteratorType ot(filter->GetOutput(), filter->GetOutput()->GetLargestPossibleRegion()); @@ -197,9 +197,9 @@ TestCastFromTo() ot.GoToBegin(); while (!it.IsAtEnd()) { - const TInputPixelType inValue = it.Value(); + const TInputPixelType inValue = it.Value(); const TOutputPixelType outValue = ot.Value(); - const auto expectedValue = static_cast(inValue); + const auto expectedValue = static_cast(inValue); if (!static_cast_is_well_defined(inValue)) { @@ -283,7 +283,7 @@ TestVectorImageCast1() // Create a 1x3 image of 2D vectors auto image = FloatVectorImageType::New(); - constexpr itk::Size<2> size{ { 1, 3 } }; + constexpr itk::Size<2> size{ { 1, 3 } }; constexpr itk::Index<2> start{ { 0, 0 } }; const itk::ImageRegion<2> region(start, size); @@ -350,7 +350,7 @@ TestVectorImageCast2() // Create a 1x3 image of 2D vectors auto image = FloatVectorImageType::New(); - constexpr itk::Size<2> size{ { 1, 3 } }; + constexpr itk::Size<2> size{ { 1, 3 } }; constexpr itk::Index<2> start{ { 0, 0 } }; const itk::ImageRegion<2> region(start, size); diff --git a/Modules/Filtering/ImageFilterBase/test/itkMaskNeighborhoodOperatorImageFilterTest.cxx b/Modules/Filtering/ImageFilterBase/test/itkMaskNeighborhoodOperatorImageFilterTest.cxx index c2e3b4a6d68..0fa5a5866c8 100644 --- a/Modules/Filtering/ImageFilterBase/test/itkMaskNeighborhoodOperatorImageFilterTest.cxx +++ b/Modules/Filtering/ImageFilterBase/test/itkMaskNeighborhoodOperatorImageFilterTest.cxx @@ -46,11 +46,11 @@ itkMaskNeighborhoodOperatorImageFilterTest(int argc, char * argv[]) // create a mask the size of the input file using MaskImageType = itk::Image; - auto mask1 = MaskImageType::New(); - auto mask2 = MaskImageType::New(); + auto mask1 = MaskImageType::New(); + auto mask2 = MaskImageType::New(); MaskImageType::RegionType region; - MaskImageType::SizeType size; - MaskImageType::IndexType index; + MaskImageType::SizeType size; + MaskImageType::IndexType index; region = input->GetOutput()->GetBufferedRegion(); mask1->SetRegions(region); diff --git a/Modules/Filtering/ImageFrequency/include/itkFrequencyBandImageFilter.hxx b/Modules/Filtering/ImageFrequency/include/itkFrequencyBandImageFilter.hxx index 19c8814a0cc..c5c2df96322 100644 --- a/Modules/Filtering/ImageFrequency/include/itkFrequencyBandImageFilter.hxx +++ b/Modules/Filtering/ImageFrequency/include/itkFrequencyBandImageFilter.hxx @@ -126,11 +126,11 @@ template void FrequencyBandImageFilter::BandPass(FrequencyIteratorType & freqIt) { - FrequencyValueType scalarFrequency; + FrequencyValueType scalarFrequency; typename FrequencyIteratorType::FrequencyType vectorFrequency; - FrequencyValueType maxFrequency; - FrequencyValueType minFrequency; - bool freqIsNegative = false; + FrequencyValueType maxFrequency; + FrequencyValueType minFrequency; + bool freqIsNegative = false; if (this->m_RadialBand) { diff --git a/Modules/Filtering/ImageFrequency/include/itkFrequencyFFTLayoutImageRegionConstIteratorWithIndex.h b/Modules/Filtering/ImageFrequency/include/itkFrequencyFFTLayoutImageRegionConstIteratorWithIndex.h index 2075784a919..f0776232b36 100644 --- a/Modules/Filtering/ImageFrequency/include/itkFrequencyFFTLayoutImageRegionConstIteratorWithIndex.h +++ b/Modules/Filtering/ImageFrequency/include/itkFrequencyFFTLayoutImageRegionConstIteratorWithIndex.h @@ -207,7 +207,7 @@ class ITK_TEMPLATE_EXPORT FrequencyFFTLayoutImageRegionConstIteratorWithIndex GetFrequency() const { FrequencyType freq; - IndexType freqInd = this->GetFrequencyBin(); + IndexType freqInd = this->GetFrequencyBin(); for (unsigned int dim = 0; dim < TImage::ImageDimension; ++dim) { @@ -220,7 +220,7 @@ class ITK_TEMPLATE_EXPORT FrequencyFFTLayoutImageRegionConstIteratorWithIndex GetFrequencyModuloSquare() const { FrequencyValueType w2(0); - FrequencyType w(this->GetFrequency()); + FrequencyType w(this->GetFrequency()); for (unsigned int dim = 0; dim < TImage::ImageDimension; ++dim) { @@ -288,12 +288,12 @@ class ITK_TEMPLATE_EXPORT FrequencyFFTLayoutImageRegionConstIteratorWithIndex } } - IndexType m_LargestPositiveFrequencyIndex; - IndexType m_MinIndex; - IndexType m_MaxIndex; + IndexType m_LargestPositiveFrequencyIndex; + IndexType m_MinIndex; + IndexType m_MaxIndex; FrequencyType m_FrequencyOrigin; FrequencyType m_FrequencySpacing; - bool m_ActualXDimensionIsOdd; + bool m_ActualXDimensionIsOdd; }; } // end namespace itk #endif diff --git a/Modules/Filtering/ImageFrequency/include/itkFrequencyHalfHermitianFFTLayoutImageRegionConstIteratorWithIndex.h b/Modules/Filtering/ImageFrequency/include/itkFrequencyHalfHermitianFFTLayoutImageRegionConstIteratorWithIndex.h index ae3f32c03df..cc256ce5fb2 100644 --- a/Modules/Filtering/ImageFrequency/include/itkFrequencyHalfHermitianFFTLayoutImageRegionConstIteratorWithIndex.h +++ b/Modules/Filtering/ImageFrequency/include/itkFrequencyHalfHermitianFFTLayoutImageRegionConstIteratorWithIndex.h @@ -215,7 +215,7 @@ class FrequencyHalfHermitianFFTLayoutImageRegionConstIteratorWithIndex GetFrequency() const { FrequencyType freq; - IndexType freqInd = this->GetFrequencyBin(); + IndexType freqInd = this->GetFrequencyBin(); for (unsigned int dim = 0; dim < TImage::ImageDimension; ++dim) { @@ -228,7 +228,7 @@ class FrequencyHalfHermitianFFTLayoutImageRegionConstIteratorWithIndex GetFrequencyModuloSquare() const { FrequencyValueType w2(0); - FrequencyType w(this->GetFrequency()); + FrequencyType w(this->GetFrequency()); for (unsigned int dim = 0; dim < TImage::ImageDimension; ++dim) { @@ -273,7 +273,7 @@ class FrequencyHalfHermitianFFTLayoutImageRegionConstIteratorWithIndex { this->m_ActualXDimensionIsOdd = value; SizeType sizeImage = this->m_Image->GetLargestPossibleRegion().GetSize(); - auto size_estimated = 2 * (sizeImage[0] - 1); + auto size_estimated = 2 * (sizeImage[0] - 1); size_estimated += this->GetActualXDimensionIsOdd() ? 1 : 0; this->m_FrequencySpacing[0] = 1.0 / (this->m_Image->GetSpacing()[0] * size_estimated); } @@ -314,12 +314,12 @@ class FrequencyHalfHermitianFFTLayoutImageRegionConstIteratorWithIndex this->m_FrequencySpacing[0] = 1.0 / (this->m_Image->GetSpacing()[0] * size_estimated); } - IndexType m_LargestPositiveFrequencyIndex; - IndexType m_MinIndex; - IndexType m_MaxIndex; + IndexType m_LargestPositiveFrequencyIndex; + IndexType m_MinIndex; + IndexType m_MaxIndex; FrequencyType m_FrequencyOrigin; FrequencyType m_FrequencySpacing; - bool m_ActualXDimensionIsOdd{ false }; + bool m_ActualXDimensionIsOdd{ false }; }; } // end namespace itk #endif diff --git a/Modules/Filtering/ImageFrequency/include/itkFrequencyImageRegionConstIteratorWithIndex.h b/Modules/Filtering/ImageFrequency/include/itkFrequencyImageRegionConstIteratorWithIndex.h index 3ba2120eb4a..ed96fae7e2f 100644 --- a/Modules/Filtering/ImageFrequency/include/itkFrequencyImageRegionConstIteratorWithIndex.h +++ b/Modules/Filtering/ImageFrequency/include/itkFrequencyImageRegionConstIteratorWithIndex.h @@ -139,7 +139,7 @@ class ITK_TEMPLATE_EXPORT FrequencyImageRegionConstIteratorWithIndex : public Im GetFrequency() const { FrequencyType freq; - IndexType freqInd = this->GetFrequencyBin(); + IndexType freqInd = this->GetFrequencyBin(); // FrequencyType freq; for (unsigned int dim = 0; dim < TImage::ImageDimension; ++dim) { @@ -152,7 +152,7 @@ class ITK_TEMPLATE_EXPORT FrequencyImageRegionConstIteratorWithIndex : public Im GetFrequencyModuloSquare() const { FrequencyValueType w2(0); - FrequencyType w(this->GetFrequency()); + FrequencyType w(this->GetFrequency()); for (unsigned int dim = 0; dim < TImage::ImageDimension; ++dim) { diff --git a/Modules/Filtering/ImageFrequency/include/itkFrequencyShiftedFFTLayoutImageRegionConstIteratorWithIndex.h b/Modules/Filtering/ImageFrequency/include/itkFrequencyShiftedFFTLayoutImageRegionConstIteratorWithIndex.h index aa9528617fb..078a0d66b19 100644 --- a/Modules/Filtering/ImageFrequency/include/itkFrequencyShiftedFFTLayoutImageRegionConstIteratorWithIndex.h +++ b/Modules/Filtering/ImageFrequency/include/itkFrequencyShiftedFFTLayoutImageRegionConstIteratorWithIndex.h @@ -191,7 +191,7 @@ class ITK_TEMPLATE_EXPORT FrequencyShiftedFFTLayoutImageRegionConstIteratorWithI GetFrequency() const { FrequencyType freq; - IndexType freqInd = this->GetFrequencyBin(); + IndexType freqInd = this->GetFrequencyBin(); for (unsigned int dim = 0; dim < TImage::ImageDimension; ++dim) { @@ -204,7 +204,7 @@ class ITK_TEMPLATE_EXPORT FrequencyShiftedFFTLayoutImageRegionConstIteratorWithI GetFrequencyModuloSquare() const { FrequencyValueType w2(0); - FrequencyType w(this->GetFrequency()); + FrequencyType w(this->GetFrequency()); for (unsigned int dim = 0; dim < TImage::ImageDimension; ++dim) { @@ -248,7 +248,7 @@ class ITK_TEMPLATE_EXPORT FrequencyShiftedFFTLayoutImageRegionConstIteratorWithI Init() { IndexType minIndex = this->m_Image->GetLargestPossibleRegion().GetIndex(); - SizeType sizeImage = this->m_Image->GetLargestPossibleRegion().GetSize(); + SizeType sizeImage = this->m_Image->GetLargestPossibleRegion().GetSize(); for (unsigned int dim = 0; dim < ImageType::ImageDimension; ++dim) { this->m_ZeroFrequencyIndex[dim] = @@ -262,10 +262,10 @@ class ITK_TEMPLATE_EXPORT FrequencyShiftedFFTLayoutImageRegionConstIteratorWithI } } - IndexType m_ZeroFrequencyIndex; + IndexType m_ZeroFrequencyIndex; FrequencyType m_FrequencyOrigin; FrequencyType m_FrequencySpacing; - bool m_ActualXDimensionIsOdd; + bool m_ActualXDimensionIsOdd; }; } // end namespace itk #endif diff --git a/Modules/Filtering/ImageFrequency/include/itkUnaryFrequencyDomainFilter.hxx b/Modules/Filtering/ImageFrequency/include/itkUnaryFrequencyDomainFilter.hxx index 2d0735323ea..9c248bd1ac6 100644 --- a/Modules/Filtering/ImageFrequency/include/itkUnaryFrequencyDomainFilter.hxx +++ b/Modules/Filtering/ImageFrequency/include/itkUnaryFrequencyDomainFilter.hxx @@ -54,11 +54,11 @@ template template void UnaryFrequencyDomainFilter::DynamicThreadedGenerateDataWithFunctor( - const TFunctor & functor, + const TFunctor & functor, const ImageRegionType & outputRegionForThread) { const ImageType * inputPtr = this->GetInput(); - ImageType * outputPtr = this->GetOutput(); + ImageType * outputPtr = this->GetOutput(); // Define the portion of the input to walk for this thread ImageRegionType inputRegionForThread; diff --git a/Modules/Filtering/ImageFrequency/test/itkFrequencyBandImageFilterTest.cxx b/Modules/Filtering/ImageFrequency/test/itkFrequencyBandImageFilterTest.cxx index 58dca526165..c11c6c56ea6 100644 --- a/Modules/Filtering/ImageFrequency/test/itkFrequencyBandImageFilterTest.cxx +++ b/Modules/Filtering/ImageFrequency/test/itkFrequencyBandImageFilterTest.cxx @@ -56,13 +56,13 @@ template typename ImageType::Pointer createImage(typename ImageType::SizeType size) { - auto image = ImageType::New(); + auto image = ImageType::New(); typename ImageType::RegionType region; region.SetSize(size); image->SetRegions(region); image->Allocate(false); - typename ImageType::PixelType value = itk::NumericTraits::Zero; + typename ImageType::PixelType value = itk::NumericTraits::Zero; itk::ImageRegionIterator iter(image, region); while (!iter.IsAtEnd()) { @@ -86,7 +86,7 @@ itkFrequencyBandImageFilterTest(int argc, char * argv[]) } const std::string evenOrOddInput = argv[1]; - bool isOdd = false; + bool isOdd = false; if (evenOrOddInput == "Even") { isOdd = false; diff --git a/Modules/Filtering/ImageFrequency/test/itkFrequencyFFTLayoutImageRegionIteratorWithIndexTest.cxx b/Modules/Filtering/ImageFrequency/test/itkFrequencyFFTLayoutImageRegionIteratorWithIndexTest.cxx index 212bea65d18..d4ac4e7c785 100644 --- a/Modules/Filtering/ImageFrequency/test/itkFrequencyFFTLayoutImageRegionIteratorWithIndexTest.cxx +++ b/Modules/Filtering/ImageFrequency/test/itkFrequencyFFTLayoutImageRegionIteratorWithIndexTest.cxx @@ -243,11 +243,11 @@ class itkFrequencyFFTLayoutImageRegionIteratorWithIndexTester } private: - typename ImageType::Pointer m_Image; + typename ImageType::Pointer m_Image; typename ImageType::RegionType m_PositiveHalfRegion; typename ImageType::RegionType m_NegativeHalfRegion; - FrequencyType m_LargestFrequency; - bool m_ImageIsOdd; + FrequencyType m_LargestFrequency; + bool m_ImageIsOdd; }; int diff --git a/Modules/Filtering/ImageFrequency/test/itkFrequencyIteratorsGTest.cxx b/Modules/Filtering/ImageFrequency/test/itkFrequencyIteratorsGTest.cxx index 940797db615..56c57fc9419 100644 --- a/Modules/Filtering/ImageFrequency/test/itkFrequencyIteratorsGTest.cxx +++ b/Modules/Filtering/ImageFrequency/test/itkFrequencyIteratorsGTest.cxx @@ -83,7 +83,7 @@ CheckConstructedAtBegin() const RegionType imageRegion(IndexType::Filled(indexValue), SizeType::Filled(sizeValue)); const TIterator iterator(image, imageRegion); - TIterator iteratorThatGoesToBegin = iterator; + TIterator iteratorThatGoesToBegin = iterator; iteratorThatGoesToBegin.GoToBegin(); EXPECT_EQ(iterator, iteratorThatGoesToBegin); } @@ -241,7 +241,7 @@ compareAllTypesOfIterators(typename TImageType::Pointer image, double difference using FrequencyShiftedIteratorType = itk::FrequencyShiftedFFTLayoutImageRegionIteratorWithIndex; constexpr bool shifted = true; - auto filteredShiftedImage = + auto filteredShiftedImage = applyBandFilter(image, shifted); @@ -282,7 +282,7 @@ TEST_F(FrequencyIterators, Even3D) constexpr unsigned int ImageDimension = 3; using PixelType = float; using ImageType = itk::Image; - auto image = CreateImage(16); + auto image = CreateImage(16); constexpr double differenceHermitianThreshold = 0.00001; compareAllTypesOfIterators(image, differenceHermitianThreshold); } @@ -292,7 +292,7 @@ TEST_F(FrequencyIterators, Even2D) constexpr unsigned int ImageDimension = 2; using PixelType = float; using ImageType = itk::Image; - auto image = CreateImage(16); + auto image = CreateImage(16); constexpr double differenceHermitianThreshold = 0.00001; compareAllTypesOfIterators(image, differenceHermitianThreshold); } @@ -302,7 +302,7 @@ TEST_F(FrequencyIterators, Odd3D) constexpr unsigned int ImageDimension = 3; using PixelType = float; using ImageType = itk::Image; - auto image = CreateImage(15); + auto image = CreateImage(15); constexpr double differenceHermitianThreshold = 0.00001; compareAllTypesOfIterators(image, differenceHermitianThreshold); } @@ -312,7 +312,7 @@ TEST_F(FrequencyIterators, Odd2D) constexpr unsigned int ImageDimension = 2; using PixelType = float; using ImageType = itk::Image; - auto image = CreateImage(27); + auto image = CreateImage(27); constexpr double differenceHermitianThreshold = 0.0001; compareAllTypesOfIterators(image, differenceHermitianThreshold); } diff --git a/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.h b/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.h index 098dfa7e0bc..4e0406a6645 100644 --- a/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.h +++ b/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.h @@ -248,12 +248,12 @@ class ITK_TEMPLATE_EXPORT LabelMapContourOverlayImageFilter : public LabelMapFil } private: - double m_Opacity{}; - int m_Type{}; - int m_Priority{}; - SizeType m_ContourThickness{}; - SizeType m_DilationRadius{}; - int m_SliceDimension{}; + double m_Opacity{}; + int m_Type{}; + int m_Priority{}; + SizeType m_ContourThickness{}; + SizeType m_DilationRadius{}; + int m_SliceDimension{}; FunctorType m_Functor{}; LabelMapPointer m_TempImage{}; diff --git a/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.hxx b/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.hxx index 4ed5026ea32..fc7ad761690 100644 --- a/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.hxx +++ b/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.hxx @@ -219,8 +219,8 @@ void LabelMapContourOverlayImageFilter::DynamicThreadedGenerateData( const OutputImageRegionType & outputRegionForThread) { - OutputImageType * output = this->GetOutput(); - auto * input = const_cast(this->GetInput()); + OutputImageType * output = this->GetOutput(); + auto * input = const_cast(this->GetInput()); const FeatureImageType * input2 = this->GetFeatureImage(); FunctorType function(m_Functor); @@ -228,7 +228,7 @@ LabelMapContourOverlayImageFilter::Dynam function.SetOpacity(m_Opacity); ImageScanlineConstIterator featureIt(input2, outputRegionForThread); - ImageScanlineIterator outputIt(output, outputRegionForThread); + ImageScanlineIterator outputIt(output, outputRegionForThread); while (!featureIt.IsAtEnd()) { @@ -249,8 +249,8 @@ void LabelMapContourOverlayImageFilter::ThreadedProcessLabelObject( LabelObjectType * labelObject) { - OutputImageType * output = this->GetOutput(); - auto * input = const_cast(this->GetInput()); + OutputImageType * output = this->GetOutput(); + auto * input = const_cast(this->GetInput()); const FeatureImageType * input2 = this->GetFeatureImage(); FunctorType function(m_Functor); @@ -293,7 +293,7 @@ LabelMapContourOverlayImageFilter::Gener template void LabelMapContourOverlayImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/ImageFusion/include/itkLabelMapOverlayImageFilter.h b/Modules/Filtering/ImageFusion/include/itkLabelMapOverlayImageFilter.h index 4b5b0a155e8..8bb10317ba6 100644 --- a/Modules/Filtering/ImageFusion/include/itkLabelMapOverlayImageFilter.h +++ b/Modules/Filtering/ImageFusion/include/itkLabelMapOverlayImageFilter.h @@ -201,7 +201,7 @@ class ITK_TEMPLATE_EXPORT LabelMapOverlayImageFilter : public LabelMapFilter::DynamicThreadedGenerateData( const OutputImageRegionType & outputRegionForThread) { - OutputImageType * output = this->GetOutput(); - auto * input = const_cast(this->GetInput()); + OutputImageType * output = this->GetOutput(); + auto * input = const_cast(this->GetInput()); const FeatureImageType * input2 = this->GetFeatureImage(); FunctorType function(m_Functor); @@ -101,7 +101,7 @@ LabelMapOverlayImageFilter::DynamicThrea function.SetOpacity(m_Opacity); ImageScanlineConstIterator featureIt(input2, outputRegionForThread); - ImageScanlineIterator outputIt(output, outputRegionForThread); + ImageScanlineIterator outputIt(output, outputRegionForThread); while (!featureIt.IsAtEnd()) { @@ -122,8 +122,8 @@ void LabelMapOverlayImageFilter::ThreadedProcessLabelObject( LabelObjectType * labelObject) { - OutputImageType * output = this->GetOutput(); - auto * input = const_cast(this->GetInput()); + OutputImageType * output = this->GetOutput(); + auto * input = const_cast(this->GetInput()); const FeatureImageType * input2 = this->GetFeatureImage(); FunctorType function(m_Functor); diff --git a/Modules/Filtering/ImageFusion/include/itkLabelMapToRGBImageFilter.hxx b/Modules/Filtering/ImageFusion/include/itkLabelMapToRGBImageFilter.hxx index 796a8d4ef4b..cf8375b96a9 100644 --- a/Modules/Filtering/ImageFusion/include/itkLabelMapToRGBImageFilter.hxx +++ b/Modules/Filtering/ImageFusion/include/itkLabelMapToRGBImageFilter.hxx @@ -29,7 +29,7 @@ template void LabelMapToRGBImageFilter::BeforeThreadedGenerateData() { - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); const InputImageType * input = this->GetInput(); FunctorType function(m_Functor); @@ -45,13 +45,13 @@ void LabelMapToRGBImageFilter::ThreadedProcessLabelObject(LabelObjectType * labelObject) { const typename LabelObjectType::LabelType & label = labelObject->GetLabel(); - const InputImageType * input = this->GetInput(); + const InputImageType * input = this->GetInput(); FunctorType function(m_Functor); function.SetBackgroundValue(input->GetBackgroundValue()); typename LabelObjectType::ConstIndexIterator it(labelObject); - TOutputImage * outputImage = this->GetOutput(); + TOutputImage * outputImage = this->GetOutput(); while (!it.IsAtEnd()) { const IndexType idx = it.GetIndex(); diff --git a/Modules/Filtering/ImageFusion/include/itkLabelOverlayImageFilter.h b/Modules/Filtering/ImageFusion/include/itkLabelOverlayImageFilter.h index 766fe0d69db..60bed3f4c2b 100644 --- a/Modules/Filtering/ImageFusion/include/itkLabelOverlayImageFilter.h +++ b/Modules/Filtering/ImageFusion/include/itkLabelOverlayImageFilter.h @@ -148,8 +148,8 @@ class ITK_TEMPLATE_EXPORT LabelOverlayImageFilter GenerateOutputInformation() override; private: - FunctorType m_Functor{}; - double m_Opacity{}; + FunctorType m_Functor{}; + double m_Opacity{}; LabelPixelType m_BackgroundValue{}; }; } // end namespace itk diff --git a/Modules/Filtering/ImageFusion/include/itkLabelToRGBFunctor.h b/Modules/Filtering/ImageFusion/include/itkLabelToRGBFunctor.h index 110eca6b46b..43d2f024435 100644 --- a/Modules/Filtering/ImageFusion/include/itkLabelToRGBFunctor.h +++ b/Modules/Filtering/ImageFusion/include/itkLabelToRGBFunctor.h @@ -67,7 +67,7 @@ class LabelToRGBFunctor //"violet" "red4" // They are a good selection of distinct colors for plotting and // overlays. - constexpr size_t numColors = 30; + constexpr size_t numColors = 30; constexpr unsigned char colors[numColors][3] = { { 255, 0, 0 }, { 0, 205, 0 }, { 0, 0, 255 }, { 0, 255, 255 }, { 255, 0, 255 }, { 255, 127, 0 }, { 0, 100, 0 }, { 138, 43, 226 }, { 139, 35, 35 }, { 0, 0, 128 }, { 139, 139, 0 }, { 255, 62, 150 }, diff --git a/Modules/Filtering/ImageFusion/include/itkLabelToRGBImageFilter.h b/Modules/Filtering/ImageFusion/include/itkLabelToRGBImageFilter.h index 08cfa4a745c..b4c43e5e6c7 100644 --- a/Modules/Filtering/ImageFusion/include/itkLabelToRGBImageFilter.h +++ b/Modules/Filtering/ImageFusion/include/itkLabelToRGBImageFilter.h @@ -119,7 +119,7 @@ class ITK_TEMPLATE_EXPORT LabelToRGBImageFilter private: OutputPixelType m_BackgroundColor{}; - LabelPixelType m_BackgroundValue{}; + LabelPixelType m_BackgroundValue{}; }; } // end namespace itk diff --git a/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.h b/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.h index 5e97051e192..22d2916351c 100644 --- a/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.h +++ b/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.h @@ -92,7 +92,7 @@ class ITK_TEMPLATE_EXPORT ScalarToRGBPixelFunctor private: - bool m_UseMSBForHashing; + bool m_UseMSBForHashing; unsigned int m_ColorIndex[3]; }; } // end namespace Functor diff --git a/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.hxx b/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.hxx index 96866910f04..2ffa13f80b4 100644 --- a/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.hxx +++ b/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.hxx @@ -47,7 +47,7 @@ template auto ScalarToRGBPixelFunctor::operator()(const TScalar & v) const -> RGBPixelType { - TScalar buf = v; + TScalar buf = v; const auto * bytes = reinterpret_cast(&buf); if (this->m_UseMSBForHashing) diff --git a/Modules/Filtering/ImageFusion/test/itkScalarToRGBPixelFunctorTest.cxx b/Modules/Filtering/ImageFusion/test/itkScalarToRGBPixelFunctorTest.cxx index 3d877296a7f..598f087281a 100644 --- a/Modules/Filtering/ImageFusion/test/itkScalarToRGBPixelFunctorTest.cxx +++ b/Modules/Filtering/ImageFusion/test/itkScalarToRGBPixelFunctorTest.cxx @@ -60,7 +60,7 @@ itkScalarToRGBPixelFunctorTest(int, char *[]) // Test with float itk::Functor::ScalarToRGBPixelFunctor ff; - float f; + float f; std::cout << "Testing float in big endian mode" << std::endl; ff.SetBigEndian(); for (f = 0; f < 100; ++f) diff --git a/Modules/Filtering/ImageGradient/include/itkDifferenceOfGaussiansGradientImageFilter.hxx b/Modules/Filtering/ImageGradient/include/itkDifferenceOfGaussiansGradientImageFilter.hxx index 1964cab716a..5dcb3bf0a06 100644 --- a/Modules/Filtering/ImageGradient/include/itkDifferenceOfGaussiansGradientImageFilter.hxx +++ b/Modules/Filtering/ImageGradient/include/itkDifferenceOfGaussiansGradientImageFilter.hxx @@ -39,7 +39,7 @@ DifferenceOfGaussiansGradientImageFilter::GenerateData() itkDebugMacro("DifferenceOfGaussiansGradientImageFilter::GenerateData() called"); // Get the input and output pointers - const typename Superclass::InputImagePointer inputPtr = const_cast(this->GetInput(0)); + const typename Superclass::InputImagePointer inputPtr = const_cast(this->GetInput(0)); const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(0); // Make sure we're getting everything @@ -86,7 +86,7 @@ DifferenceOfGaussiansGradientImageFilter::GenerateData() for (unsigned int i = 0; i < NDimensions; ++i) { const auto width = static_cast(m_Width); - const int sizeDifference = static_cast(size.m_InternalArray[i]) - width; + const int sizeDifference = static_cast(size.m_InternalArray[i]) - width; if (!((outputIndex[i] < sizeDifference) && (outputIndex[i] >= width))) { diff --git a/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.hxx b/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.hxx index 2dbca3e9b33..489e7ed8240 100644 --- a/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.hxx +++ b/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.hxx @@ -53,7 +53,7 @@ GradientImageFilter(this->GetInput()); + const InputImagePointer inputPtr = const_cast(this->GetInput()); const OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) @@ -100,7 +100,7 @@ GradientImageFilter SIP; - OutputImageType * outputImage = this->GetOutput(); + OutputImageType * outputImage = this->GetOutput(); const InputImageType * inputImage = this->GetInput(); // Set up operators @@ -134,7 +134,7 @@ GradientImageFilter::Filled(1); // Find the data-set boundary "faces" - NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; + NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = bC(inputImage, outputRegionForThread, radius); diff --git a/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.hxx b/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.hxx index a20f4bf909c..3a27e31bd9a 100644 --- a/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.hxx +++ b/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.hxx @@ -54,7 +54,7 @@ GradientMagnitudeImageFilter::GenerateInputRequestedR Superclass::GenerateInputRequestedRegion(); // get pointers to the input and output - const InputImagePointer inputPtr = const_cast(this->GetInput()); + const InputImagePointer inputPtr = const_cast(this->GetInput()); const OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) @@ -104,11 +104,11 @@ GradientMagnitudeImageFilter::DynamicThreadedGenerate ConstNeighborhoodIterator nit; ConstNeighborhoodIterator bit; - ImageRegionIterator it; + ImageRegionIterator it; const NeighborhoodInnerProduct SIP; - const typename OutputImageType::Pointer output = this->GetOutput(); + const typename OutputImageType::Pointer output = this->GetOutput(); const typename InputImageType::ConstPointer input = this->GetInput(); // Set up operators @@ -137,7 +137,7 @@ GradientMagnitudeImageFilter::DynamicThreadedGenerate static constexpr auto radius = Size::Filled(1); // Find the data-set boundary "faces" - NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; + NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = bC(input, outputRegionForThread, radius); diff --git a/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.h b/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.h index 7b5726819c8..a11bc7476d9 100644 --- a/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.h +++ b/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.h @@ -163,10 +163,10 @@ class ITK_TEMPLATE_EXPORT GradientMagnitudeRecursiveGaussianImageFilter using SqrSpacingFilterType = BinaryGeneratorImageFilter; using SqrSpacingFilterPointer = typename SqrSpacingFilterType::Pointer; - GaussianFilterPointer m_SmoothingFilters[ImageDimension - 1]{}; + GaussianFilterPointer m_SmoothingFilters[ImageDimension - 1]{}; DerivativeFilterPointer m_DerivativeFilter{}; SqrSpacingFilterPointer m_SqrSpacingFilter{}; - SqrtFilterPointer m_SqrtFilter{}; + SqrtFilterPointer m_SqrtFilter{}; /** Normalize the image across scale space */ bool m_NormalizeAcrossScale{}; diff --git a/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.hxx b/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.hxx index ea9b43b7f10..4266b603898 100644 --- a/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.hxx +++ b/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.hxx @@ -67,7 +67,7 @@ GradientMagnitudeRecursiveGaussianImageFilter void GradientMagnitudeRecursiveGaussianImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.h b/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.h index 96eee733692..8a53f29de85 100644 --- a/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.h +++ b/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.h @@ -204,7 +204,7 @@ class ITK_TEMPLATE_EXPORT GradientRecursiveGaussianImageFilter : public ImageToI // To transform Variable length vector we need to convert to and // fro the CovariantVectorType const CovariantVectorType gradient(it.Get().GetDataPointer()); - CovariantVectorType physicalGradient; + CovariantVectorType physicalGradient; it.GetImage()->TransformLocalVectorToPhysicalVector(gradient, physicalGradient); it.Set(OutputPixelType(physicalGradient.GetDataPointer(), ImageDimension, false)); } @@ -213,7 +213,7 @@ class ITK_TEMPLATE_EXPORT GradientRecursiveGaussianImageFilter : public ImageToI void TransformOutputPixel(ImageRegionIterator & it) { - OutputPixelType correctedGradient{}; + OutputPixelType correctedGradient{}; const OutputPixelType & gradient = it.Get(); const unsigned int nComponents = NumericTraits::GetLength(gradient) / ImageDimension; @@ -248,8 +248,8 @@ class ITK_TEMPLATE_EXPORT GradientRecursiveGaussianImageFilter : public ImageToI std::vector m_SmoothingFilters{}; - DerivativeFilterPointer m_DerivativeFilter{}; - OutputImageAdaptorPointer m_ImageAdaptor{}; + DerivativeFilterPointer m_DerivativeFilter{}; + OutputImageAdaptorPointer m_ImageAdaptor{}; /** Normalize the image across scale space */ bool m_NormalizeAcrossScale{}; diff --git a/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.hxx b/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.hxx index d6b9ae99563..b4d98af03c6 100644 --- a/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.hxx +++ b/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.hxx @@ -185,7 +185,7 @@ GradientRecursiveGaussianImageFilter::GenerateData() progress->RegisterInternalFilter(m_DerivativeFilter, weight); const typename TInputImage::ConstPointer inputImage(this->GetInput()); - const typename TOutputImage::Pointer outputImage(this->GetOutput()); + const typename TOutputImage::Pointer outputImage(this->GetOutput()); unsigned int nComponents = inputImage->GetNumberOfComponentsPerPixel(); /* An Image of VariableLengthVectors will return 0 */ @@ -217,7 +217,7 @@ GradientRecursiveGaussianImageFilter::GenerateData() for (unsigned int dim = 0; dim < ImageDimension; ++dim) { unsigned int i = 0; - int j = 0; + int j = 0; while (i != imageDimensionMinus1) { if (i == dim) @@ -234,7 +234,7 @@ GradientRecursiveGaussianImageFilter::GenerateData() typename RealImageType::Pointer derivativeImage; if constexpr (ImageDimension > 1) { - const auto imageDimensionMinus2 = static_cast(ImageDimension - 2); + const auto imageDimensionMinus2 = static_cast(ImageDimension - 2); const GaussianFilterPointer lastFilter = m_SmoothingFilters[imageDimensionMinus2]; lastFilter->UpdateLargestPossibleRegion(); derivativeImage = lastFilter->GetOutput(); @@ -285,7 +285,7 @@ GradientRecursiveGaussianImageFilter::GenerateData() if (this->m_UseImageDirection) { - OutputImageType * gradientImage = outputImage; + OutputImageType * gradientImage = outputImage; ImageRegionIterator itr(gradientImage, gradientImage->GetRequestedRegion()); while (!itr.IsAtEnd()) @@ -306,7 +306,7 @@ GradientRecursiveGaussianImageFilter::GenerateOutputI Superclass::GenerateOutputInformation(); - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); const typename TInputImage::ConstPointer inputImage(this->GetInput()); const unsigned int nComponents = inputImage->GetNumberOfComponentsPerPixel() * ImageDimension; diff --git a/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h b/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h index 4f41cf89cdf..27d408b8920 100644 --- a/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h +++ b/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h @@ -319,9 +319,9 @@ class ITK_TEMPLATE_EXPORT VectorGradientMagnitudeImageFilter : public ImageToIma { unsigned int i; unsigned int j; - TRealType dx; - TRealType sum; - auto accum = TRealType{}; + TRealType dx; + TRealType sum; + auto accum = TRealType{}; for (i = 0; i < ImageDimension; ++i) { sum = TRealType{}; @@ -341,11 +341,11 @@ class ITK_TEMPLATE_EXPORT VectorGradientMagnitudeImageFilter : public ImageToIma // WARNING: ONLY CALL THIS METHOD WHEN PROCESSING A 3D IMAGE unsigned int i; unsigned int j; - double Lambda[3]; - double CharEqn[3]; - double ans; + double Lambda[3]; + double CharEqn[3]; + double ans; - vnl_matrix g(ImageDimension, ImageDimension); + vnl_matrix g(ImageDimension, ImageDimension); vnl_vector_fixed d_phi_du[TInputImage::ImageDimension]; // Calculate the directional derivatives for each vector component using @@ -456,7 +456,7 @@ class ITK_TEMPLATE_EXPORT VectorGradientMagnitudeImageFilter : public ImageToIma unsigned int i; unsigned int j; - vnl_matrix g(ImageDimension, ImageDimension); + vnl_matrix g(ImageDimension, ImageDimension); vnl_vector_fixed d_phi_du[TInputImage::ImageDimension]; // Calculate the directional derivatives for each vector component using diff --git a/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.hxx b/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.hxx index 4d92e7b23d2..6118c4fdfc3 100644 --- a/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.hxx +++ b/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.hxx @@ -42,7 +42,7 @@ VectorGradientMagnitudeImageFilter::Vector template void VectorGradientMagnitudeImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { using namespace print_helper; @@ -89,7 +89,7 @@ VectorGradientMagnitudeImageFilter::Genera Superclass::GenerateInputRequestedRegion(); // get pointers to the input and output - const InputImagePointer inputPtr = const_cast(this->GetInput()); + const InputImagePointer inputPtr = const_cast(this->GetInput()); const OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) @@ -189,12 +189,12 @@ VectorGradientMagnitudeImageFilter::Dynami const OutputImageRegionType & outputRegionForThread) { ZeroFluxNeumannBoundaryCondition nbc; - ConstNeighborhoodIteratorType bit; - ImageRegionIterator it; + ConstNeighborhoodIteratorType bit; + ImageRegionIterator it; // Find the data-set boundary "faces" NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; - auto r1 = MakeFilled(1); + auto r1 = MakeFilled(1); const typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = bC(m_RealValuedInputImage.GetPointer(), outputRegionForThread, r1); @@ -256,8 +256,8 @@ VectorGradientMagnitudeImageFilter::CubicS // coefficients of the polynomial: x^3 + c[2]x^2 + c[1]x^1 + c[0]. The roots // s are not necessarily sorted, and int is the number of distinct roots // found in s. - int num; - const double dpi = itk::Math::pi; + int num; + const double dpi = itk::Math::pi; constexpr double epsilon = 1.0e-11; // Substitution of x = y - c[2]/3 eliminate the quadric term x^3 +px + q = 0 diff --git a/Modules/Filtering/ImageGradient/test/itkDifferenceOfGaussiansGradientTest.cxx b/Modules/Filtering/ImageGradient/test/itkDifferenceOfGaussiansGradientTest.cxx index 6d77a9ec47e..ea9482e58aa 100644 --- a/Modules/Filtering/ImageGradient/test/itkDifferenceOfGaussiansGradientTest.cxx +++ b/Modules/Filtering/ImageGradient/test/itkDifferenceOfGaussiansGradientTest.cxx @@ -44,9 +44,9 @@ itkDifferenceOfGaussiansGradientTest(int, char *[]) //-----------------Create a new input image-------------------- // Image size and spacing parameters - TImageType::SizeValueType sourceImageSize[] = { 20, 20, 20 }; + TImageType::SizeValueType sourceImageSize[] = { 20, 20, 20 }; TImageType::SpacingValueType sourceImageSpacing[] = { 1.0, 1.0, 1.0 }; - TImageType::PointValueType sourceImageOrigin[] = { 0, 0, 0 }; + TImageType::PointValueType sourceImageOrigin[] = { 0, 0, 0 }; // Creates the sourceImage (but doesn't set the size or allocate memory) auto sourceImage = TImageType::New(); @@ -100,7 +100,7 @@ itkDifferenceOfGaussiansGradientTest(int, char *[]) printf("Sphere spatial function created\n"); //---------Create and initialize a spatial function iterator----------- - TImageType::IndexType seedPos; + TImageType::IndexType seedPos; constexpr TImageType::IndexValueType pos[] = { 10, 10, 10 }; seedPos.SetIndex(pos); @@ -148,7 +148,7 @@ itkDifferenceOfGaussiansGradientTest(int, char *[]) // Create a differennce of gaussians gradient filter using TDOGFilterType = itk::DifferenceOfGaussiansGradientImageFilter; - auto DOGFilter = TDOGFilterType::New(); + auto DOGFilter = TDOGFilterType::New(); const itk::SimpleFilterWatcher watcher(DOGFilter); // We're filtering the output of the binomial filter diff --git a/Modules/Filtering/ImageGradient/test/itkGradientMagnitudeRecursiveGaussianFilterTest.cxx b/Modules/Filtering/ImageGradient/test/itkGradientMagnitudeRecursiveGaussianFilterTest.cxx index 08df64b47e5..1a2986b06c1 100644 --- a/Modules/Filtering/ImageGradient/test/itkGradientMagnitudeRecursiveGaussianFilterTest.cxx +++ b/Modules/Filtering/ImageGradient/test/itkGradientMagnitudeRecursiveGaussianFilterTest.cxx @@ -71,8 +71,8 @@ itkGradientMagnitudeRecursiveGaussianFilterTest(int argc, char * argv[]) inputImage->AllocateInitialized(); // Set the metadata for the image - myImageType::PointType origin; - myImageType::SpacingType spacing; + myImageType::PointType origin; + myImageType::SpacingType spacing; myImageType::DirectionType direction; origin[0] = 1.0; diff --git a/Modules/Filtering/ImageGradient/test/itkGradientRecursiveGaussianFilterSpeedTest.cxx b/Modules/Filtering/ImageGradient/test/itkGradientRecursiveGaussianFilterSpeedTest.cxx index 829dad9d280..256ae727723 100644 --- a/Modules/Filtering/ImageGradient/test/itkGradientRecursiveGaussianFilterSpeedTest.cxx +++ b/Modules/Filtering/ImageGradient/test/itkGradientRecursiveGaussianFilterSpeedTest.cxx @@ -88,7 +88,7 @@ itkGradientRecursiveGaussianFilterSpeedTest(int argc, char * argv[]) // Create one iterator for an internal region const myRegionType innerRegion{ start, size }; - myIteratorType itb(inputImage, innerRegion); + myIteratorType itb(inputImage, innerRegion); // Initialize the content the internal region while (!itb.IsAtEnd()) diff --git a/Modules/Filtering/ImageGradient/test/itkGradientRecursiveGaussianFilterTest.cxx b/Modules/Filtering/ImageGradient/test/itkGradientRecursiveGaussianFilterTest.cxx index 3f62b03510f..5cd2d415dc8 100644 --- a/Modules/Filtering/ImageGradient/test/itkGradientRecursiveGaussianFilterTest.cxx +++ b/Modules/Filtering/ImageGradient/test/itkGradientRecursiveGaussianFilterTest.cxx @@ -87,7 +87,7 @@ itkGradientRecursiveGaussianFilterTest(int argc, char * argv[]) // Create one iterator for an internal region const myRegionType innerRegion{ start, size }; - myIteratorType itb(inputImage, innerRegion); + myIteratorType itb(inputImage, innerRegion); // Initialize the content the internal region while (!itb.IsAtEnd()) diff --git a/Modules/Filtering/ImageGradient/test/itkGradientRecursiveGaussianFilterTest3.cxx b/Modules/Filtering/ImageGradient/test/itkGradientRecursiveGaussianFilterTest3.cxx index 3ca7500f434..0f2a4fe6eec 100644 --- a/Modules/Filtering/ImageGradient/test/itkGradientRecursiveGaussianFilterTest3.cxx +++ b/Modules/Filtering/ImageGradient/test/itkGradientRecursiveGaussianFilterTest3.cxx @@ -33,10 +33,10 @@ template int -itkGradientRecursiveGaussianFilterTest3Run(typename TImageType::PixelType & myPixelBorder, - typename TImageType::PixelType & myPixelFill, +itkGradientRecursiveGaussianFilterTest3Run(typename TImageType::PixelType & myPixelBorder, + typename TImageType::PixelType & myPixelFill, typename TGradImageType::Pointer & outputImage, - char * outputFilename) + char * outputFilename) { using myImageType = TImageType; using myGradImageType = TGradImageType; @@ -142,11 +142,11 @@ itkGradientRecursiveGaussianFilterTest3Run(typename TImageType::PixelType & my template int -itkGradientRecursiveGaussianFilterTest3Compare(typename TGradImage1DType::Pointer scalarPixelGradImage, +itkGradientRecursiveGaussianFilterTest3Compare(typename TGradImage1DType::Pointer scalarPixelGradImage, typename TGradImageVectorType::Pointer vectorPixelGradImage, - unsigned int numDimensions) + unsigned int numDimensions) { - itk::ImageRegionIteratorWithIndex scalarIt(scalarPixelGradImage, + itk::ImageRegionIteratorWithIndex scalarIt(scalarPixelGradImage, scalarPixelGradImage->GetBufferedRegion()); itk::ImageRegionIteratorWithIndex vector2DIt(vectorPixelGradImage, vectorPixelGradImage->GetBufferedRegion()); @@ -156,7 +156,7 @@ itkGradientRecursiveGaussianFilterTest3Compare(typename TGradImage1DType::Pointe while (!scalarIt.IsAtEnd() && !vector2DIt.IsAtEnd()) { - typename TGradImage1DType::PixelType scalar = scalarIt.Value(); + typename TGradImage1DType::PixelType scalar = scalarIt.Value(); typename TGradImageVectorType::PixelType vector = vector2DIt.Value(); for (unsigned int d = 0; d < numDimensions; ++d) { @@ -204,8 +204,8 @@ itkGradientRecursiveGaussianFilterTest3(int argc, char * argv[]) using myImageVector1DType = itk::Image; myGradImage1DType::Pointer vector1DGradImage = nullptr; - myVector1DType vector1Dborder; - myVector1DType vector1Dfill; + myVector1DType vector1Dborder; + myVector1DType vector1Dfill; vector1Dborder.Fill(0.0); vector1Dfill.Fill(100.0); int runResult = itkGradientRecursiveGaussianFilterTest3Run( @@ -221,8 +221,8 @@ itkGradientRecursiveGaussianFilterTest3(int argc, char * argv[]) using myImageScalarType = itk::Image; myGradImage1DType::Pointer scalarPixelGradImage = nullptr; - auto pixelBorder = myScalarPixelType{}; - auto pixelFill = static_cast(100.0); + auto pixelBorder = myScalarPixelType{}; + auto pixelFill = static_cast(100.0); runResult = itkGradientRecursiveGaussianFilterTest3Run( pixelBorder, pixelFill, scalarPixelGradImage, argv[2]); if (runResult == EXIT_FAILURE) @@ -241,8 +241,8 @@ itkGradientRecursiveGaussianFilterTest3(int argc, char * argv[]) using myImageVar2DType = itk::Image; myGradImage2DType::Pointer vector2DGradImage = nullptr; - myVector2DType vector2Dborder; - myVector2DType vector2Dfill; + myVector2DType vector2Dborder; + myVector2DType vector2Dfill; vector2Dborder.Fill(pixelBorder); vector2Dfill[0] = pixelFill; vector2Dfill[1] = pixelFill / 2.0; @@ -265,8 +265,8 @@ itkGradientRecursiveGaussianFilterTest3(int argc, char * argv[]) // Test with Image of 2D VariableLengthVector myGradImage2DType::Pointer varVector2DGradImage = nullptr; - myVarVector2DType varVector2Dborder; - myVarVector2DType varVector2Dfill; + myVarVector2DType varVector2Dborder; + myVarVector2DType varVector2Dfill; varVector2Dborder.SetSize(myComponents2D); varVector2Dfill.SetSize(myComponents2D); varVector2Dborder.Fill(0.0); @@ -299,8 +299,8 @@ itkGradientRecursiveGaussianFilterTest3(int argc, char * argv[]) using myImage3DType = itk::Image; myGradImage3DType::Pointer vector3DGradImage = nullptr; - myVector3DType vector3Dborder; - myVector3DType vector3Dfill; + myVector3DType vector3Dborder; + myVector3DType vector3Dfill; vector3Dborder.Fill(pixelBorder); vector3Dfill[0] = pixelFill; vector3Dfill[1] = pixelFill / 2.0; @@ -326,8 +326,8 @@ itkGradientRecursiveGaussianFilterTest3(int argc, char * argv[]) using myVecImageType = itk::VectorImage; using myVarVector3DType = itk::VariableLengthVector; myGradImage3DType::Pointer vectorImage3DGradImage = nullptr; - myVarVector3DType varVector3Dborder; - myVarVector3DType varVector3Dfill; + myVarVector3DType varVector3Dborder; + myVarVector3DType varVector3Dfill; varVector3Dborder.SetSize(myComponents3D); varVector3Dborder.Fill(vector3Dborder[0]); varVector3Dfill.SetSize(myComponents3D); diff --git a/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest2.cxx b/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest2.cxx index 6f1d6ba9e3c..ba1ab378989 100644 --- a/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest2.cxx +++ b/Modules/Filtering/ImageGradient/test/itkVectorGradientMagnitudeImageFilterTest2.cxx @@ -83,7 +83,7 @@ itkVectorGradientMagnitudeImageFilterTest2(int argc, char * argv[]) extractedRegion.SetSize(2, 1); extractedRegion.SetIndex(2, std::stoi(argv[4])); - auto extractedImage = CharImage2Type::New(); + auto extractedImage = CharImage2Type::New(); CharImage2Type::RegionType reg; reg.SetSize(0, extractedRegion.GetSize()[0]); reg.SetSize(1, extractedRegion.GetSize()[1]); diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineCenteredResampleImageFilterBase.h b/Modules/Filtering/ImageGrid/include/itkBSplineCenteredResampleImageFilterBase.h index c75fc7d9f5f..d26f26496c5 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineCenteredResampleImageFilterBase.h +++ b/Modules/Filtering/ImageGrid/include/itkBSplineCenteredResampleImageFilterBase.h @@ -92,15 +92,15 @@ class ITK_TEMPLATE_EXPORT BSplineCenteredResampleImageFilterBase void Reduce1DImage(const std::vector & in, - OutputImageIterator & out, - unsigned int inTraverseSize, - ProgressReporter & progress) override; + OutputImageIterator & out, + unsigned int inTraverseSize, + ProgressReporter & progress) override; void Expand1DImage(const std::vector & in, - OutputImageIterator & out, - unsigned int inTraverseSize, - ProgressReporter & progress) override; + OutputImageIterator & out, + unsigned int inTraverseSize, + ProgressReporter & progress) override; protected: BSplineCenteredResampleImageFilterBase() = default; diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineCenteredResampleImageFilterBase.hxx b/Modules/Filtering/ImageGrid/include/itkBSplineCenteredResampleImageFilterBase.hxx index 1c7fc8b0336..be4ef09ccc0 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineCenteredResampleImageFilterBase.hxx +++ b/Modules/Filtering/ImageGrid/include/itkBSplineCenteredResampleImageFilterBase.hxx @@ -225,8 +225,8 @@ BSplineCenteredResampleImageFilterBase::InitializePyr template void BSplineCenteredResampleImageFilterBase::Reduce1DImage(const std::vector & in, - OutputImageIterator & out, - unsigned int inTraverseSize, + OutputImageIterator & out, + unsigned int inTraverseSize, ProgressReporter & progress) { const SizeValueType outTraverseSize = inTraverseSize / 2; @@ -273,7 +273,7 @@ BSplineCenteredResampleImageFilterBase::Reduce1DImage for (SizeValueType outK = 0; outK < outTraverseSize; ++outK) { const IndexValueType i1 = 2 * outK; - const double outVal = (temp[i1] + temp[i1 + 1]) / 2.0; + const double outVal = (temp[i1] + temp[i1 + 1]) / 2.0; out.Set(static_cast(outVal)); ++out; progress.CompletedPixel(); @@ -287,14 +287,14 @@ BSplineCenteredResampleImageFilterBase::Reduce1DImage template void BSplineCenteredResampleImageFilterBase::Expand1DImage(const std::vector & in, - OutputImageIterator & out, - unsigned int inTraverseSize, + OutputImageIterator & out, + unsigned int inTraverseSize, ProgressReporter & progress) { IndexValueType i1; IndexValueType i2; - IndexValueType inK; + IndexValueType inK; const SizeValueType outTraverseSize = inTraverseSize * 2; // inTraverseSize = outTraverseSize/2; // ensures that an even number is used. IndexValueType inModK; // number for modulus math of in diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.h b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.h index 582af608a72..136d94e7e3a 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.h @@ -236,21 +236,21 @@ class ITK_TEMPLATE_EXPORT BSplineControlPointImageFilter : public ImageToImageFi void SetNumberOfLevels(ArrayType); /** Parameters for the output image. */ - SizeType m_Size{}; - SpacingType m_Spacing{}; - OriginType m_Origin{}; + SizeType m_Size{}; + SpacingType m_Spacing{}; + OriginType m_Origin{}; DirectionType m_Direction{}; - bool m_DoMultilevel{ false }; + bool m_DoMultilevel{ false }; unsigned int m_MaximumNumberOfLevels{ 1 }; - ArrayType m_NumberOfControlPoints{}; - ArrayType m_CloseDimension{}; - ArrayType m_SplineOrder{}; - ArrayType m_NumberOfLevels{}; + ArrayType m_NumberOfControlPoints{}; + ArrayType m_CloseDimension{}; + ArrayType m_SplineOrder{}; + ArrayType m_NumberOfLevels{}; vnl_matrix m_RefinedLatticeCoefficients[ImageDimension]{}; - typename KernelType::Pointer m_Kernel[ImageDimension]{}; + typename KernelType::Pointer m_Kernel[ImageDimension]{}; typename KernelOrder0Type::Pointer m_KernelOrder0{}; typename KernelOrder1Type::Pointer m_KernelOrder1{}; typename KernelOrder2Type::Pointer m_KernelOrder2{}; diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.hxx index c89f2e76cad..df78b622dfc 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.hxx @@ -151,7 +151,7 @@ void BSplineControlPointImageFilter::BeforeThreadedGenerateData() { const TInputImage * inputPtr = this->GetInput(); - TOutputImage * outputPtr = this->GetOutput(); + TOutputImage * outputPtr = this->GetOutput(); for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -178,7 +178,7 @@ BSplineControlPointImageFilter::DynamicThreadedGenera const OutputImageRegionType & region) { const TInputImage * inputPtr = this->GetInput(); - TOutputImage * outputPtr = this->GetOutput(); + TOutputImage * outputPtr = this->GetOutput(); typename PointDataImageType::Pointer collapsedPhiLattices[ImageDimension + 1]; for (unsigned int i = 0; i < ImageDimension; ++i) @@ -214,9 +214,9 @@ BSplineControlPointImageFilter::DynamicThreadedGenera } } FixedArray U; - auto currentU = MakeFilled>(-1); + auto currentU = MakeFilled>(-1); - typename OutputImageType::IndexType startIndex = outputPtr->GetRequestedRegion().GetIndex(); + typename OutputImageType::IndexType startIndex = outputPtr->GetRequestedRegion().GetIndex(); const typename PointDataImageType::IndexType startPhiIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); RealArrayType epsilon; @@ -270,15 +270,15 @@ template void BSplineControlPointImageFilter::CollapsePhiLattice(PointDataImageType * lattice, PointDataImageType * collapsedLattice, - const RealType u, - const unsigned int dimension) + const RealType u, + const unsigned int dimension) { for (ImageRegionIteratorWithIndex It(collapsedLattice, collapsedLattice->GetLargestPossibleRegion()); !It.IsAtEnd(); ++It) { - PointDataType data{}; + PointDataType data{}; typename PointDataImageType::IndexType idx = It.GetIndex(); for (unsigned int i = 0; i < this->m_SplineOrder[dimension] + 1; ++i) { @@ -326,8 +326,8 @@ BSplineControlPointImageFilter::CollapsePhiLattice(Po template unsigned int -BSplineControlPointImageFilter::SplitRequestedRegion(unsigned int i, - unsigned int num, +BSplineControlPointImageFilter::SplitRequestedRegion(unsigned int i, + unsigned int num, OutputImageRegionType & splitRegion) { // Get the output pointer @@ -335,9 +335,9 @@ BSplineControlPointImageFilter::SplitRequestedRegion( const SizeType requestedRegionSize = outputPtr->GetRequestedRegion().GetSize(); - int splitAxis; + int splitAxis; typename TOutputImage::IndexType splitIndex; - typename TOutputImage::SizeType splitSize; + typename TOutputImage::SizeType splitSize; // Initialize the splitRegion to the output requested region splitRegion = outputPtr->GetRequestedRegion(); @@ -422,12 +422,12 @@ BSplineControlPointImageFilter::RefineControlPoi constexpr PixelType data{}; refinedLattice->FillBuffer(data); - typename ControlPointLatticeType::IndexType idx; - typename ControlPointLatticeType::IndexType idxPsi; - typename ControlPointLatticeType::IndexType tmp; - typename ControlPointLatticeType::IndexType tmpPsi; - typename ControlPointLatticeType::IndexType off; - typename ControlPointLatticeType::IndexType offPsi; + typename ControlPointLatticeType::IndexType idx; + typename ControlPointLatticeType::IndexType idxPsi; + typename ControlPointLatticeType::IndexType tmp; + typename ControlPointLatticeType::IndexType tmpPsi; + typename ControlPointLatticeType::IndexType off; + typename ControlPointLatticeType::IndexType offPsi; typename ControlPointLatticeType::RegionType::SizeType sizePsi; size.Fill(2); @@ -542,7 +542,7 @@ BSplineControlPointImageFilter::RefineControlPoi // Specify the pose parameters of the control point lattice - typename PointDataImageType::PointType origin; + typename PointDataImageType::PointType origin; typename PointDataImageType::SpacingType spacing; for (unsigned int i = 0; i < ImageDimension; ++i) diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.h b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.h index a2a2854506c..e1152b9709f 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.h +++ b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.h @@ -288,9 +288,9 @@ class ITK_TEMPLATE_EXPORT BSplineControlPointImageFunction private: /** Parameters for the B-spline object domain */ - SizeType m_Size{}; + SizeType m_Size{}; SpacingType m_Spacing{}; - OriginType m_Origin{}; + OriginType m_Origin{}; ArrayType m_NumberOfControlPoints{}; ArrayType m_CloseDimension{}; @@ -298,7 +298,7 @@ class ITK_TEMPLATE_EXPORT BSplineControlPointImageFunction RealImagePointer m_NeighborhoodWeightImage{}; - typename KernelType::Pointer m_Kernel[ImageDimension]{}; + typename KernelType::Pointer m_Kernel[ImageDimension]{}; typename KernelOrder0Type::Pointer m_KernelOrder0{}; typename KernelOrder1Type::Pointer m_KernelOrder1{}; typename KernelOrder2Type::Pointer m_KernelOrder2{}; diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.hxx b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.hxx index 2d6a03b4fb5..28acf47e211 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.hxx +++ b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.hxx @@ -243,7 +243,7 @@ BSplineControlPointImageFunction::Evaluate(const Point !ItW.IsAtEnd(); ++ItW) { - CoordinateType B = 1.0; + CoordinateType B = 1.0; typename RealImageType::IndexType idx = ItW.GetIndex(); for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -403,7 +403,7 @@ BSplineControlPointImageFunction::EvaluateGradient(con for (ItW.GoToBegin(); !ItW.IsAtEnd(); ++ItW) { - CoordinateType B = 1.0; + CoordinateType B = 1.0; typename RealImageType::IndexType idx = ItW.GetIndex(); for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -433,7 +433,7 @@ BSplineControlPointImageFunction::EvaluateGradient(con template auto BSplineControlPointImageFunction::EvaluateHessianAtParametricPoint( - const PointType & point, + const PointType & point, const unsigned int component) const -> HessianComponentType { PointType params; @@ -448,7 +448,7 @@ BSplineControlPointImageFunction::EvaluateHessianAtPar template auto -BSplineControlPointImageFunction::EvaluateHessianAtIndex(const IndexType & idx, +BSplineControlPointImageFunction::EvaluateHessianAtIndex(const IndexType & idx, const unsigned int component) const -> HessianComponentType { @@ -465,7 +465,7 @@ template auto BSplineControlPointImageFunction::EvaluateHessianAtContinuousIndex( const ContinuousIndexType & idx, - const unsigned int component) const -> HessianComponentType + const unsigned int component) const -> HessianComponentType { PointType params; for (unsigned int i = 0; i < ImageDimension; ++i) @@ -478,7 +478,7 @@ BSplineControlPointImageFunction::EvaluateHessianAtCon template auto -BSplineControlPointImageFunction::EvaluateHessian(const PointType & params, +BSplineControlPointImageFunction::EvaluateHessian(const PointType & params, const unsigned int component) const -> HessianComponentType { @@ -507,7 +507,7 @@ BSplineControlPointImageFunction::EvaluateHessian(cons p[i] = static_cast(p[i]) * numberOfSpans; } - CoordinateType val; + CoordinateType val; HessianComponentType hessian; hessian.SetSize(ImageDimension, ImageDimension); hessian.Fill(0.0); @@ -578,7 +578,7 @@ BSplineControlPointImageFunction::EvaluateHessian(cons } for (ItW.GoToBegin(); !ItW.IsAtEnd(); ++ItW) { - CoordinateType B = 1.0; + CoordinateType B = 1.0; typename RealImageType::IndexType idx = ItW.GetIndex(); for (unsigned int i = 0; i < ImageDimension; ++i) { diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineDownsampleImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkBSplineDownsampleImageFilter.hxx index 4fc9c06ffb1..290db708fc0 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineDownsampleImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkBSplineDownsampleImageFilter.hxx @@ -37,7 +37,7 @@ BSplineDownsampleImageFilter::Generate itkDebugMacro("Actually executing"); // Get the input and output pointers - const InputImagePointer inputPtr = const_cast(this->GetInput()); + const InputImagePointer inputPtr = const_cast(this->GetInput()); const OutputImagePointer outputPtr = this->GetOutput(); // Since we are providing a GenerateData() method, we need to allocate the @@ -65,7 +65,7 @@ BSplineDownsampleImageFilter::Generate Superclass::GenerateInputRequestedRegion(); // get pointers to the input and output - const InputImagePointer inputPtr = const_cast(this->GetInput()); + const InputImagePointer inputPtr = const_cast(this->GetInput()); const OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) @@ -76,11 +76,11 @@ BSplineDownsampleImageFilter::Generate inputPtr->SetRequestedRegionToLargestPossibleRegion(); // we need to compute the input requested region (size and start index) - unsigned int i; - const typename TOutputImage::SizeType & outputRequestedRegionSize = outputPtr->GetRequestedRegion().GetSize(); + unsigned int i; + const typename TOutputImage::SizeType & outputRequestedRegionSize = outputPtr->GetRequestedRegion().GetSize(); const typename TOutputImage::IndexType & outputRequestedRegionStartIndex = outputPtr->GetRequestedRegion().GetIndex(); - typename TInputImage::SizeType inputRequestedRegionSize; + typename TInputImage::SizeType inputRequestedRegionSize; typename TInputImage::IndexType inputRequestedRegionStartIndex; for (i = 0; i < TInputImage::ImageDimension; ++i) @@ -116,14 +116,14 @@ BSplineDownsampleImageFilter::Generate // we need to compute the output spacing, the output image size, and the // output image start index - unsigned int i; + unsigned int i; const typename TInputImage::SpacingType & inputSpacing = inputPtr->GetSpacing(); - const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); - const typename TInputImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); + const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename TInputImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); typename TOutputImage::SpacingType outputSpacing; - typename TOutputImage::SizeType outputSize; - typename TOutputImage::IndexType outputStartIndex; + typename TOutputImage::SizeType outputSize; + typename TOutputImage::IndexType outputStartIndex; for (i = 0; i < TOutputImage::ImageDimension; ++i) { diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.h b/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.h index 3e2a185c01a..ef59e7fd14c 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.h +++ b/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.h @@ -153,9 +153,9 @@ class ITK_TEMPLATE_EXPORT BSplineResampleImageFilterBase : public ImageToImageFi */ virtual void Reduce1DImage(const std::vector & in, - OutputImageIterator & out, - unsigned int inTraverseSize, - ProgressReporter & progress); + OutputImageIterator & out, + unsigned int inTraverseSize, + ProgressReporter & progress); /** Expand the input data vector by a factor of 2 and writes the results to the location specified by the output * Iterator @@ -164,9 +164,9 @@ class ITK_TEMPLATE_EXPORT BSplineResampleImageFilterBase : public ImageToImageFi */ virtual void Expand1DImage(const std::vector & in, - OutputImageIterator & out, - unsigned int inTraverseSize, - ProgressReporter & progress); + OutputImageIterator & out, + unsigned int inTraverseSize, + ProgressReporter & progress); BSplineResampleImageFilterBase(); ~BSplineResampleImageFilterBase() override = default; diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.hxx b/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.hxx index 2d99cdebad7..58e4ffbc23e 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.hxx +++ b/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.hxx @@ -187,9 +187,9 @@ BSplineResampleImageFilterBase::SetSplineOrder(int sp template void BSplineResampleImageFilterBase::Reduce1DImage(const std::vector & in, - OutputImageIterator & out, - unsigned int inTraverseSize, - ProgressReporter & progress) + OutputImageIterator & out, + unsigned int inTraverseSize, + ProgressReporter & progress) { const unsigned int outTraverseSize = inTraverseSize / 2; @@ -202,7 +202,7 @@ BSplineResampleImageFilterBase::Reduce1DImage(const s for (unsigned int outK = 0; outK < outTraverseSize; ++outK) { const unsigned int inK = 2 * outK; - int i2 = inK + 1; + int i2 = inK + 1; if (i2 > static_cast(inModK)) { // Original was @@ -260,9 +260,9 @@ BSplineResampleImageFilterBase::Reduce1DImage(const s template void BSplineResampleImageFilterBase::Expand1DImage(const std::vector & in, - OutputImageIterator & out, - unsigned int inTraverseSize, - ProgressReporter & progress) + OutputImageIterator & out, + unsigned int inTraverseSize, + ProgressReporter & progress) { const unsigned int outTraverseSize = inTraverseSize * 2; // inTraverseSize = outTraverseSize/2; // ensures that an even number is used. @@ -325,14 +325,14 @@ BSplineResampleImageFilterBase::ReduceNDImage(OutputI { // Does not support streaming const typename Superclass::InputImagePointer inputPtr = const_cast(this->GetInput()); - SizeType startSize = inputPtr->GetBufferedRegion().GetSize(); + SizeType startSize = inputPtr->GetBufferedRegion().GetSize(); // Initialize scratchImage space and allocate memory InitializeScratch(startSize); auto scratchImage = TOutputImage::New(); scratchImage->CopyInformation(inputPtr); RegionType scratchRegion = inputPtr->GetBufferedRegion(); - SizeType currentSize = startSize; + SizeType currentSize = startSize; // scratchImage only needs the 1/2 the space of the original // image for the first dimension. // TODO: Is dividing by 2 correct or do I need something more complicated for @@ -362,11 +362,11 @@ BSplineResampleImageFilterBase::ReduceNDImage(OutputI const typename TInputImage::ConstPointer workingImage = inputPtr; const unsigned int count = scratchRegion.GetNumberOfPixels() * ImageDimension; - ProgressReporter progress(this, 0, count, 10); + ProgressReporter progress(this, 0, count, 10); for (unsigned int n = 0; n < ImageDimension; ++n) { // Setup iterators for input image. - ConstInputImageIterator inIterator1(workingImage, validRegion); + ConstInputImageIterator inIterator1(workingImage, validRegion); ConstOutputImageIterator inIterator2(scratchImage, scratchRegion); if (n == 0) @@ -434,14 +434,14 @@ BSplineResampleImageFilterBase::ExpandNDImage(OutputI // Set up variables for waking the image regions. // Does not support streaming const typename Superclass::InputImagePointer inputPtr = const_cast(this->GetInput()); - SizeType startSize = inputPtr->GetBufferedRegion().GetSize(); + SizeType startSize = inputPtr->GetBufferedRegion().GetSize(); // Initialize scratchImage space and allocate memory InitializeScratch(startSize); auto scratchImage = TOutputImage::New(); scratchImage->CopyInformation(inputPtr); RegionType scratchRegion = inputPtr->GetBufferedRegion(); - SizeType currentSize = startSize; + SizeType currentSize = startSize; // scratchImage 2 times the space of the original image . @@ -474,11 +474,11 @@ BSplineResampleImageFilterBase::ExpandNDImage(OutputI const RegionType workingRegion = validRegion; const unsigned int count = scratchRegion.GetNumberOfPixels() * ImageDimension; - ProgressReporter progress(this, 0, count, 10); + ProgressReporter progress(this, 0, count, 10); for (unsigned int n = 0; n < ImageDimension; ++n) { // Setup iterators for input image. - ConstInputImageIterator inIterator1(workingImage, workingRegion); + ConstInputImageIterator inIterator1(workingImage, workingRegion); ConstOutputImageIterator inIterator2(scratchImage, validRegion); if (n == 0) { diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineScatteredDataPointSetToImageFilter.h b/Modules/Filtering/ImageGrid/include/itkBSplineScatteredDataPointSetToImageFilter.h index ebd678ed654..af1b8f209ef 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineScatteredDataPointSetToImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkBSplineScatteredDataPointSetToImageFilter.h @@ -351,16 +351,16 @@ class ITK_TEMPLATE_EXPORT BSplineScatteredDataPointSetToImageFilter IndexType NumberToIndex(const unsigned int, const SizeType); - bool m_DoMultilevel{ false }; - bool m_GenerateOutputImage{ true }; - bool m_UsePointWeights{ false }; + bool m_DoMultilevel{ false }; + bool m_GenerateOutputImage{ true }; + bool m_UsePointWeights{ false }; unsigned int m_MaximumNumberOfLevels{ 1 }; unsigned int m_CurrentLevel{ 0 }; - ArrayType m_NumberOfControlPoints{}; - ArrayType m_CurrentNumberOfControlPoints{}; - ArrayType m_CloseDimension{}; - ArrayType m_SplineOrder{}; - ArrayType m_NumberOfLevels{}; + ArrayType m_NumberOfControlPoints{}; + ArrayType m_CurrentNumberOfControlPoints{}; + ArrayType m_CloseDimension{}; + ArrayType m_SplineOrder{}; + ArrayType m_NumberOfLevels{}; typename WeightsContainerType::Pointer m_PointWeights{}; @@ -378,12 +378,12 @@ class ITK_TEMPLATE_EXPORT BSplineScatteredDataPointSetToImageFilter typename KernelOrder2Type::Pointer m_KernelOrder2{}; typename KernelOrder3Type::Pointer m_KernelOrder3{}; - std::vector m_OmegaLatticePerThread{}; + std::vector m_OmegaLatticePerThread{}; std::vector m_DeltaLatticePerThread{}; RealType m_BSplineEpsilon{ static_cast(1e-3) }; - bool m_IsFittingComplete{ false }; - bool m_DoUpdateResidualValues{ false }; + bool m_IsFittingComplete{ false }; + bool m_DoUpdateResidualValues{ false }; }; } // end namespace itk diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineScatteredDataPointSetToImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkBSplineScatteredDataPointSetToImageFilter.hxx index a65f2edf88b..516671dcc49 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineScatteredDataPointSetToImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkBSplineScatteredDataPointSetToImageFilter.hxx @@ -180,7 +180,7 @@ template void BSplineScatteredDataPointSetToImageFilter::GenerateData() { - TOutputImage * output = this->GetOutput(); + TOutputImage * output = this->GetOutput(); const TInputPointSet * inputPointSet = this->GetInput(); // Create the output image @@ -408,7 +408,7 @@ template void BSplineScatteredDataPointSetToImageFilter::ThreadedGenerateDataForFitting( const RegionType & itkNotUsed(region), - ThreadIdType threadId) + ThreadIdType threadId) { const TInputPointSet * input = this->GetInput(); @@ -444,7 +444,7 @@ BSplineScatteredDataPointSetToImageFilter::Threade auto numberOfPointsPerThread = static_cast(input->GetNumberOfPoints() / numberOfWorkUnits); const unsigned int start = threadId * numberOfPointsPerThread; - unsigned int end = start + numberOfPointsPerThread; + unsigned int end = start + numberOfPointsPerThread; if (threadId == this->GetNumberOfWorkUnits() - 1) { end = input->GetNumberOfPoints(); @@ -481,7 +481,7 @@ BSplineScatteredDataPointSetToImageFilter::Threade RealType w2Sum = 0.0; for (ItW.GoToBegin(); !ItW.IsAtEnd(); ++ItW) { - RealType B = 1.0; + RealType B = 1.0; typename RealImageType::IndexType idx = ItW.GetIndex(); for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -521,7 +521,7 @@ BSplineScatteredDataPointSetToImageFilter::Threade w2Sum += B * B; } - RealImageType * currentThreadOmegaLattice = this->m_OmegaLatticePerThread[threadId]; + RealImageType * currentThreadOmegaLattice = this->m_OmegaLatticePerThread[threadId]; PointDataImageType * currentThreadDeltaLattice = this->m_DeltaLatticePerThread[threadId]; for (ItW.GoToBegin(); !ItW.IsAtEnd(); ++ItW) @@ -549,7 +549,7 @@ template void BSplineScatteredDataPointSetToImageFilter::ThreadedGenerateDataForReconstruction( const RegionType & region, - ThreadIdType itkNotUsed(threadId)) + ThreadIdType itkNotUsed(threadId)) { typename PointDataImageType::Pointer collapsedPhiLattices[ImageDimension + 1]; for (unsigned int i = 0; i < ImageDimension; ++i) @@ -599,9 +599,9 @@ BSplineScatteredDataPointSetToImageFilter::Threade } FixedArray U; - auto currentU = MakeFilled>(-1); + auto currentU = MakeFilled>(-1); - typename ImageType::IndexType startIndex = this->GetOutput()->GetRequestedRegion().GetIndex(); + typename ImageType::IndexType startIndex = this->GetOutput()->GetRequestedRegion().GetIndex(); const typename PointDataImageType::IndexType startPhiIndex = this->m_PhiLattice->GetLargestPossibleRegion().GetIndex(); @@ -656,14 +656,14 @@ BSplineScatteredDataPointSetToImageFilter::AfterTh ImageRegionIterator ItD(this->m_DeltaLatticePerThread[0], this->m_DeltaLatticePerThread[0]->GetLargestPossibleRegion()); - ImageRegionIterator ItO(this->m_OmegaLatticePerThread[0], + ImageRegionIterator ItO(this->m_OmegaLatticePerThread[0], this->m_OmegaLatticePerThread[0]->GetLargestPossibleRegion()); for (ThreadIdType n = 1; n < this->GetNumberOfWorkUnits(); ++n) { ImageRegionIterator Itd(this->m_DeltaLatticePerThread[n], this->m_DeltaLatticePerThread[n]->GetLargestPossibleRegion()); - ImageRegionIterator Ito(this->m_OmegaLatticePerThread[n], + ImageRegionIterator Ito(this->m_OmegaLatticePerThread[n], this->m_OmegaLatticePerThread[n]->GetLargestPossibleRegion()); ItD.GoToBegin(); @@ -754,12 +754,12 @@ BSplineScatteredDataPointSetToImageFilter::RefineC constexpr PointDataType data{}; refinedLattice->FillBuffer(data); - typename PointDataImageType::IndexType idx; - typename PointDataImageType::IndexType idxPsi; - typename PointDataImageType::IndexType tmp; - typename PointDataImageType::IndexType tmpPsi; - typename PointDataImageType::IndexType off; - typename PointDataImageType::IndexType offPsi; + typename PointDataImageType::IndexType idx; + typename PointDataImageType::IndexType idxPsi; + typename PointDataImageType::IndexType tmp; + typename PointDataImageType::IndexType tmpPsi; + typename PointDataImageType::IndexType off; + typename PointDataImageType::IndexType offPsi; typename PointDataImageType::RegionType::SizeType sizePsi; size.Fill(2); @@ -873,10 +873,10 @@ template void BSplineScatteredDataPointSetToImageFilter::ThreadedGenerateDataForUpdatingResidualValues( const RegionType & itkNotUsed(region), - ThreadIdType threadId) + ThreadIdType threadId) { const TInputPointSet * input = this->GetInput(); - PointDataImagePointer collapsedPhiLattices[ImageDimension + 1]; + PointDataImagePointer collapsedPhiLattices[ImageDimension + 1]; for (unsigned int i = 0; i < ImageDimension; ++i) { collapsedPhiLattices[i] = PointDataImageType::New(); @@ -920,7 +920,7 @@ BSplineScatteredDataPointSetToImageFilter::Threade } FixedArray U; - auto currentU = MakeFilled>(-1); + auto currentU = MakeFilled>(-1); const typename PointDataImageType::IndexType startPhiIndex = this->m_PhiLattice->GetLargestPossibleRegion().GetIndex(); @@ -931,7 +931,7 @@ BSplineScatteredDataPointSetToImageFilter::Threade auto numberOfPointsPerThread = static_cast(input->GetNumberOfPoints() / numberOfWorkUnits); const unsigned int start = threadId * numberOfPointsPerThread; - unsigned int end = start + numberOfPointsPerThread; + unsigned int end = start + numberOfPointsPerThread; if (threadId == this->GetNumberOfWorkUnits() - 1) { end = input->GetNumberOfPoints(); @@ -986,15 +986,15 @@ void BSplineScatteredDataPointSetToImageFilter::CollapsePhiLattice( PointDataImageType * lattice, PointDataImageType * collapsedLattice, - const RealType u, - const unsigned int dimension) + const RealType u, + const unsigned int dimension) { for (ImageRegionIteratorWithIndex It(collapsedLattice, collapsedLattice->GetLargestPossibleRegion()); !It.IsAtEnd(); ++It) { - PointDataType data{}; + PointDataType data{}; typename PointDataImageType::IndexType idx = It.GetIndex(); for (unsigned int i = 0; i < this->m_SplineOrder[dimension] + 1; ++i) { @@ -1044,7 +1044,7 @@ template void BSplineScatteredDataPointSetToImageFilter::SetPhiLatticeParametricDomainParameters() { - typename PointDataImageType::PointType origin; + typename PointDataImageType::PointType origin; typename PointDataImageType::SpacingType spacing; for (unsigned int i = 0; i < ImageDimension; ++i) @@ -1102,7 +1102,7 @@ BSplineScatteredDataPointSetToImageFilter::NumberT template void BSplineScatteredDataPointSetToImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { using namespace print_helper; diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineUpsampleImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkBSplineUpsampleImageFilter.hxx index 367e97bd9f8..9d1d2ffa304 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineUpsampleImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkBSplineUpsampleImageFilter.hxx @@ -48,7 +48,7 @@ BSplineUpsampleImageFilter::GenerateDa itkDebugMacro("Actually executing"); // Get the input and output pointers - const InputImagePointer inputPtr = const_cast(this->GetInput()); + const InputImagePointer inputPtr = const_cast(this->GetInput()); const OutputImagePointer outputPtr = this->GetOutput(); // Since we are providing a GenerateData() method, we need to allocate the @@ -76,7 +76,7 @@ BSplineUpsampleImageFilter::GenerateIn Superclass::GenerateInputRequestedRegion(); // get pointers to the input and output - const InputImagePointer inputPtr = const_cast(this->GetInput()); + const InputImagePointer inputPtr = const_cast(this->GetInput()); const OutputImagePointer outputPtr = this->GetOutput(); if (!outputPtr || !inputPtr) @@ -87,11 +87,11 @@ BSplineUpsampleImageFilter::GenerateIn inputPtr->SetRequestedRegionToLargestPossibleRegion(); // Compute the input requested region (size and start index) - unsigned int i; - const typename TOutputImage::SizeType & outputRequestedRegionSize = outputPtr->GetRequestedRegion().GetSize(); + unsigned int i; + const typename TOutputImage::SizeType & outputRequestedRegionSize = outputPtr->GetRequestedRegion().GetSize(); const typename TOutputImage::IndexType & outputRequestedRegionStartIndex = outputPtr->GetRequestedRegion().GetIndex(); - typename TInputImage::SizeType inputRequestedRegionSize; + typename TInputImage::SizeType inputRequestedRegionSize; typename TInputImage::IndexType inputRequestedRegionStartIndex; for (i = 0; i < TInputImage::ImageDimension; ++i) @@ -116,7 +116,7 @@ BSplineUpsampleImageFilter::GenerateOu Superclass::GenerateOutputInformation(); // get pointers to the input and output - const InputImagePointer inputPtr = const_cast(this->GetInput()); + const InputImagePointer inputPtr = const_cast(this->GetInput()); const OutputImagePointer outputPtr = this->GetOutput(); if (!outputPtr || !inputPtr) @@ -126,14 +126,14 @@ BSplineUpsampleImageFilter::GenerateOu // we need to compute the output spacing, the output image size, and the // output image start index - unsigned int i; + unsigned int i; const typename TInputImage::SpacingType & inputSpacing = inputPtr->GetSpacing(); - const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); - const typename TInputImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); + const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename TInputImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); typename TOutputImage::SpacingType outputSpacing; - typename TOutputImage::SizeType outputSize; - typename TOutputImage::IndexType outputStartIndex; + typename TOutputImage::SizeType outputSize; + typename TOutputImage::IndexType outputStartIndex; for (i = 0; i < TOutputImage::ImageDimension; ++i) { diff --git a/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.hxx index 6c3def7d4c6..d635d7b6946 100644 --- a/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.hxx @@ -100,7 +100,7 @@ BinShrinkImageFilter::DynamicThreadedGenerateData( itkDebugMacro("BinShrinkImageFilter executing on region:" << outputRegionForThread); const InputImageType * inputPtr = this->GetInput(); - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); using InputPixelType = typename InputImageType::PixelType; using OutputPixelType = typename OutputImageType::PixelType; @@ -120,7 +120,7 @@ BinShrinkImageFilter::DynamicThreadedGenerateData( } std::vector offsets; - OutputOffsetType iOffset = negativeOffset; + OutputOffsetType iOffset = negativeOffset; while (iOffset[TInputImage::ImageDimension - 1] <= positiveOffset[TInputImage::ImageDimension - 1]) { offsets.push_back(iOffset); @@ -137,7 +137,7 @@ BinShrinkImageFilter::DynamicThreadedGenerateData( // allocate accumulate line const size_t ln = outputRegionForThread.GetSize(0); - const auto accBuffer = make_unique_for_overwrite(ln); + const auto accBuffer = make_unique_for_overwrite(ln); // convert the shrink factor for convenient multiplication typename TOutputImage::SizeType factorSize; @@ -157,7 +157,7 @@ BinShrinkImageFilter::DynamicThreadedGenerateData( { const OutputIndexType outputIndex = outputIterator.GetIndex(); - auto offset = offsets.begin(); + auto offset = offsets.begin(); const InputIndexType startInputIndex = outputIndex * factorSize; inputIterator.SetIndex(startInputIndex + *offset); @@ -215,7 +215,7 @@ BinShrinkImageFilter::GenerateInputRequestedRegion() Superclass::GenerateInputRequestedRegion(); // get pointers to the input and output - auto * inputPtr = const_cast(this->GetInput()); + auto * inputPtr = const_cast(this->GetInput()); const OutputImageType * outputPtr = this->GetOutput(); itkAssertInDebugAndIgnoreInReleaseMacro(inputPtr != nullptr); @@ -224,11 +224,11 @@ BinShrinkImageFilter::GenerateInputRequestedRegion() // Compute the input requested region (size and start index) // Use the image transformations to insure an input requested region // that will provide the proper range - const typename TOutputImage::SizeType & outputRequestedRegionSize = outputPtr->GetRequestedRegion().GetSize(); + const typename TOutputImage::SizeType & outputRequestedRegionSize = outputPtr->GetRequestedRegion().GetSize(); const typename TOutputImage::IndexType & outputRequestedRegionStartIndex = outputPtr->GetRequestedRegion().GetIndex(); typename TInputImage::IndexType inputIndex0; - typename TInputImage::SizeType inputSize; + typename TInputImage::SizeType inputSize; for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i) { inputIndex0[i] = outputRequestedRegionStartIndex[i] * m_ShrinkFactors[i]; @@ -259,7 +259,7 @@ BinShrinkImageFilter::GenerateOutputInformation() // Get pointers to the input and output const InputImageType * inputPtr = this->GetInput(); - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); itkAssertInDebugAndIgnoreInReleaseMacro(inputPtr); itkAssertInDebugAndIgnoreInReleaseMacro(outputPtr != nullptr); @@ -267,15 +267,15 @@ BinShrinkImageFilter::GenerateOutputInformation() // Compute the output spacing, the output image size, and the // output image start index const typename TInputImage::SpacingType & inputSpacing = inputPtr->GetSpacing(); - const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); - const typename TInputImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); + const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename TInputImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); ContinuousIndex inputIndexOutputOrigin; typename TOutputImage::SpacingType outputSpacing(inputSpacing); - typename TOutputImage::SizeType outputSize; - typename TOutputImage::PointType outputOrigin; - typename TOutputImage::IndexType outputStartIndex; + typename TOutputImage::SizeType outputSize; + typename TOutputImage::PointType outputOrigin; + typename TOutputImage::IndexType outputStartIndex; for (unsigned int i = 0; i < TOutputImage::ImageDimension; ++i) { diff --git a/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.h b/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.h index 6cf0eee6b34..256db2fdb53 100644 --- a/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.h @@ -248,8 +248,8 @@ class ITK_TEMPLATE_EXPORT ChangeInformationImageFilter : public ImageToImageFilt bool m_ChangeRegion{ false }; bool m_UseReferenceImage{ false }; - SpacingType m_OutputSpacing{ MakeFilled(1.0) }; - PointType m_OutputOrigin{}; + SpacingType m_OutputSpacing{ MakeFilled(1.0) }; + PointType m_OutputOrigin{}; DirectionType m_OutputDirection{ DirectionType::GetIdentity() }; OutputImageOffsetType m_OutputOffset{}; diff --git a/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.hxx index 3cbdf7b4ef9..0f4620a1e26 100644 --- a/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.hxx @@ -34,19 +34,19 @@ ChangeInformationImageFilter::GenerateOutputInformation() unsigned int i; typename TInputImage::RegionType outputRegion; - typename TInputImage::SizeType inputSize; - typename TInputImage::SizeType outputSize; - typename TInputImage::IndexType outputIndex; - typename TInputImage::IndexType inputIndex; - PointType origin; - SpacingType spacing; - DirectionType direction; + typename TInputImage::SizeType inputSize; + typename TInputImage::SizeType outputSize; + typename TInputImage::IndexType outputIndex; + typename TInputImage::IndexType inputIndex; + PointType origin; + SpacingType spacing; + DirectionType direction; itkDebugMacro("GenerateOutputInformation Start"); // Get pointers to the input and output const typename Superclass::OutputImagePointer output = this->GetOutput(); - const typename Superclass::InputImagePointer input = const_cast(this->GetInput()); + const typename Superclass::InputImagePointer input = const_cast(this->GetInput()); if (!output || !input) { @@ -108,7 +108,7 @@ ChangeInformationImageFilter::GenerateOutputInformation() // both images and oriented images. if (m_CenterImage) { - typename TInputImage::PointType centerPoint; + typename TInputImage::PointType centerPoint; ContinuousIndex centerIndex; for (i = 0; i < ImageDimension; ++i) @@ -158,7 +158,7 @@ void ChangeInformationImageFilter::GenerateData() { // Get pointers to the input and output - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); const InputImageType * input = this->GetInput(); auto * nonConstInput = const_cast(input); diff --git a/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.h b/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.h index f09b260b6bc..ebaef00cda9 100644 --- a/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.h +++ b/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.h @@ -134,7 +134,7 @@ class ITK_TEMPLATE_EXPORT CoxDeBoorBSplineKernelFunction : public KernelFunction PolynomialType CoxDeBoor(const unsigned short, const VectorType, const unsigned int, const unsigned int); - MatrixType m_BSplineShapeFunctions{}; + MatrixType m_BSplineShapeFunctions{}; unsigned int m_SplineOrder{}; }; } // end namespace itk diff --git a/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.hxx b/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.hxx index f335e522aab..029008615e8 100644 --- a/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.hxx +++ b/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.hxx @@ -66,13 +66,13 @@ CoxDeBoorBSplineKernelFunction::GenerateBSplineSha template auto CoxDeBoorBSplineKernelFunction::CoxDeBoor(const unsigned short order, - const VectorType knots, - const unsigned int whichBasisFunction, + const VectorType knots, + const unsigned int whichBasisFunction, const unsigned int whichPiece) -> PolynomialType { - VectorType tmp(2); - PolynomialType poly1(TRealValueType{ 0.0 }); - PolynomialType poly2(TRealValueType{ 0.0 }); + VectorType tmp(2); + PolynomialType poly1(TRealValueType{ 0.0 }); + PolynomialType poly2(TRealValueType{ 0.0 }); const unsigned short p = order - 1; const unsigned short i = whichBasisFunction; @@ -119,7 +119,7 @@ template auto CoxDeBoorBSplineKernelFunction::GetShapeFunctionsInZeroToOneInterval() -> MatrixType { - const int order = this->m_SplineOrder + 1; + const int order = this->m_SplineOrder + 1; const auto numberOfPieces = static_cast(order); MatrixType shapeFunctions(numberOfPieces, order); @@ -182,7 +182,7 @@ CoxDeBoorBSplineKernelFunction::EvaluateDerivative template TRealValueType CoxDeBoorBSplineKernelFunction::EvaluateNthDerivative(const TRealValueType & u, - const unsigned int n) const + const unsigned int n) const { const TRealValueType absValue = itk::Math::abs(u); diff --git a/Modules/Filtering/ImageGrid/include/itkCropImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkCropImageFilter.hxx index 7f43618d533..582c486e255 100644 --- a/Modules/Filtering/ImageGrid/include/itkCropImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkCropImageFilter.hxx @@ -33,10 +33,10 @@ CropImageFilter::GenerateOutputInformation() } // Compute the new region size - SizeType sz; + SizeType sz; OutputImageIndexType idx; - InputImageSizeType input_sz = inputPtr->GetLargestPossibleRegion().GetSize(); + InputImageSizeType input_sz = inputPtr->GetLargestPossibleRegion().GetSize(); InputImageIndexType input_idx = inputPtr->GetLargestPossibleRegion().GetIndex(); for (unsigned int i = 0; i < InputImageDimension; ++i) diff --git a/Modules/Filtering/ImageGrid/include/itkCyclicShiftImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkCyclicShiftImageFilter.hxx index 4fd9ab6bde6..3bcfc4fe6e3 100644 --- a/Modules/Filtering/ImageGrid/include/itkCyclicShiftImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkCyclicShiftImageFilter.hxx @@ -58,7 +58,7 @@ CyclicShiftImageFilter::DynamicThreadedGenerateData( // The index and size of the image needed to compute the shift const IndexType outIdx = this->GetOutput()->GetLargestPossibleRegion().GetIndex(); - const SizeType outSize = this->GetOutput()->GetLargestPossibleRegion().GetSize(); + const SizeType outSize = this->GetOutput()->GetLargestPossibleRegion().GetSize(); TotalProgressReporter progress(this, this->GetOutput()->GetRequestedRegion().GetNumberOfPixels()); diff --git a/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.h b/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.h index d4e15e2f89b..95eaeb5a87a 100644 --- a/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.h @@ -161,7 +161,7 @@ class ITK_TEMPLATE_EXPORT ExpandImageFilter : public ImageToImageFilter::GenerateInputRequestedRegion() Superclass::GenerateInputRequestedRegion(); // Get pointers to the input and output - auto * inputPtr = const_cast(this->GetInput()); + auto * inputPtr = const_cast(this->GetInput()); const OutputImageType * outputPtr = this->GetOutput(); itkAssertInDebugAndIgnoreInReleaseMacro(inputPtr != nullptr); itkAssertInDebugAndIgnoreInReleaseMacro(outputPtr); // We need to compute the input requested region (size and start index) - unsigned int i; - const typename TOutputImage::SizeType & outputRequestedRegionSize = outputPtr->GetRequestedRegion().GetSize(); + unsigned int i; + const typename TOutputImage::SizeType & outputRequestedRegionSize = outputPtr->GetRequestedRegion().GetSize(); const typename TOutputImage::IndexType & outputRequestedRegionStartIndex = outputPtr->GetRequestedRegion().GetIndex(); - typename TInputImage::SizeType inputRequestedRegionSize; + typename TInputImage::SizeType inputRequestedRegionSize; typename TInputImage::IndexType inputRequestedRegionStartIndex; /** @@ -212,7 +212,7 @@ ExpandImageFilter::GenerateOutputInformation() // Get pointers to the input and output const InputImageType * inputPtr = this->GetInput(); - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); itkAssertInDebugAndIgnoreInReleaseMacro(inputPtr); itkAssertInDebugAndIgnoreInReleaseMacro(outputPtr != nullptr); @@ -220,14 +220,14 @@ ExpandImageFilter::GenerateOutputInformation() // We need to compute the output spacing, the output image size, and the // output image start index const typename TInputImage::SpacingType & inputSpacing = inputPtr->GetSpacing(); - const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); - const typename TInputImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); - const typename TInputImage::PointType & inputOrigin = inputPtr->GetOrigin(); + const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename TInputImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); + const typename TInputImage::PointType & inputOrigin = inputPtr->GetOrigin(); typename TOutputImage::SpacingType outputSpacing; - typename TOutputImage::SizeType outputSize; - typename TOutputImage::IndexType outputStartIndex; - typename TOutputImage::PointType outputOrigin; + typename TOutputImage::SizeType outputSize; + typename TOutputImage::IndexType outputStartIndex; + typename TOutputImage::PointType outputOrigin; typename TInputImage::SpacingType inputOriginShift; @@ -241,7 +241,7 @@ ExpandImageFilter::GenerateOutputInformation() } const typename TInputImage::DirectionType inputDirection = inputPtr->GetDirection(); - const typename TOutputImage::SpacingType outputOriginShift = inputDirection * inputOriginShift; + const typename TOutputImage::SpacingType outputOriginShift = inputDirection * inputOriginShift; outputOrigin = inputOrigin + outputOriginShift; diff --git a/Modules/Filtering/ImageGrid/include/itkFlipImageFilter.h b/Modules/Filtering/ImageGrid/include/itkFlipImageFilter.h index 7d651cbd3c2..32700becac0 100644 --- a/Modules/Filtering/ImageGrid/include/itkFlipImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkFlipImageFilter.h @@ -137,7 +137,7 @@ class ITK_TEMPLATE_EXPORT FlipImageFilter : public ImageToImageFilter::GenerateOutputInformation() Superclass::GenerateOutputInformation(); // Get pointers to the input and output - const InputImagePointer inputPtr = const_cast(this->GetInput()); + const InputImagePointer inputPtr = const_cast(this->GetInput()); const OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) @@ -50,8 +50,8 @@ FlipImageFilter::GenerateOutputInformation() } const typename TImage::DirectionType & inputDirection = inputPtr->GetDirection(); - const typename TImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); - const typename TImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); + const typename TImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename TImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); typename TImage::PointType outputOrigin; typename TImage::IndexType newIndex = inputStartIndex; @@ -115,7 +115,7 @@ FlipImageFilter::GenerateInputRequestedRegion() Superclass::GenerateInputRequestedRegion(); // Get pointers to the input and output - const InputImagePointer inputPtr = const_cast(this->GetInput()); + const InputImagePointer inputPtr = const_cast(this->GetInput()); const OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) @@ -123,10 +123,10 @@ FlipImageFilter::GenerateInputRequestedRegion() return; } - const typename TImage::SizeType & outputRequestedSize = outputPtr->GetRequestedRegion().GetSize(); + const typename TImage::SizeType & outputRequestedSize = outputPtr->GetRequestedRegion().GetSize(); const typename TImage::IndexType & outputRequestedIndex = outputPtr->GetRequestedRegion().GetIndex(); - const typename TImage::SizeType & outputLargestPossibleSize = outputPtr->GetLargestPossibleRegion().GetSize(); + const typename TImage::SizeType & outputLargestPossibleSize = outputPtr->GetLargestPossibleRegion().GetSize(); const typename TImage::IndexType & outputLargestPossibleIndex = outputPtr->GetLargestPossibleRegion().GetIndex(); IndexType inputRequestedIndex(outputRequestedIndex); @@ -151,9 +151,9 @@ void FlipImageFilter::DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) { const InputImageConstPointer inputPtr = this->GetInput(); - const OutputImagePointer outputPtr = this->GetOutput(); + const OutputImagePointer outputPtr = this->GetOutput(); - const typename TImage::SizeType & outputLargestPossibleSize = outputPtr->GetLargestPossibleRegion().GetSize(); + const typename TImage::SizeType & outputLargestPossibleSize = outputPtr->GetLargestPossibleRegion().GetSize(); const typename TImage::IndexType & outputLargestPossibleIndex = outputPtr->GetLargestPossibleRegion().GetIndex(); // Compute the input region the output region maps to diff --git a/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx index fe1bf147560..cf037e5e026 100644 --- a/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx @@ -104,7 +104,7 @@ InterpolateImageFilter::BeforeThreadedGenerateData() intermediateRegion.SetIndex(ImageDimension, 0); intermediateRegion.SetSize(ImageDimension, 1); - ImageRegionConstIteratorWithIndex inIter(this->GetInput1(), outputRegion); + ImageRegionConstIteratorWithIndex inIter(this->GetInput1(), outputRegion); ImageRegionIteratorWithIndex outIter(m_IntermediateImage, intermediateRegion); while (!inIter.IsAtEnd()) @@ -153,7 +153,7 @@ InterpolateImageFilter::DynamicThreadedGenerateData( using IndexType = typename TOutputImage::IndexType; using ContinuousIndexType = typename InterpolatorType::ContinuousIndexType; - IndexType outputIndex; // Index to current output pixel + IndexType outputIndex; // Index to current output pixel ContinuousIndexType intermediateIndex; // Coordinates of current intermediate image pixel TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); diff --git a/Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.h b/Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.h index 45c6b3e768a..4e87df15fb6 100644 --- a/Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.h @@ -189,8 +189,8 @@ class ITK_TEMPLATE_EXPORT InterpolateImagePointsFilter : public ImageToImageFilt using CoordImageRegionType = typename CoordImageType::RegionType; InterpolatorPointer m_Interpolator{}; - PixelType m_DefaultPixelValue{}; // default pixel value if the - // point is outside the image + PixelType m_DefaultPixelValue{}; // default pixel value if the + // point is outside the image }; } // namespace itk diff --git a/Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.hxx b/Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.hxx index 7adfa8240cd..7dd5e632908 100644 --- a/Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.hxx @@ -59,7 +59,7 @@ template ::SetInterpolationCoordinate( const CoordImageType * coordinate, - unsigned int setDimension) + unsigned int setDimension) { // Set each coordinate as an input. Note that Input '0' is for the image. this->SetInput(setDimension + 1, coordinate); // This is a data filter input @@ -75,7 +75,7 @@ InterpolateImagePointsFilter(this->GetInput(1)); - const OutputImagePointer outputPtr = this->GetOutput(); + const OutputImagePointer outputPtr = this->GetOutput(); // We need to compute the output spacing, the output image size, and the // output image start index. This is all determined by the coordinate data const typename TOutputImage::SpacingType & outputSpacing = xCoordPtr->GetSpacing(); - const typename TOutputImage::SizeType & outputSize = xCoordPtr->GetLargestPossibleRegion().GetSize(); - const typename TOutputImage::IndexType & outputStartIndex = xCoordPtr->GetLargestPossibleRegion().GetIndex(); + const typename TOutputImage::SizeType & outputSize = xCoordPtr->GetLargestPossibleRegion().GetSize(); + const typename TOutputImage::IndexType & outputStartIndex = xCoordPtr->GetLargestPossibleRegion().GetIndex(); outputPtr->SetSpacing(outputSpacing); diff --git a/Modules/Filtering/ImageGrid/include/itkMirrorPadImageFilter.h b/Modules/Filtering/ImageGrid/include/itkMirrorPadImageFilter.h index df9f631ca31..4963a2bb9f1 100644 --- a/Modules/Filtering/ImageGrid/include/itkMirrorPadImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkMirrorPadImageFilter.h @@ -111,20 +111,20 @@ class ITK_TEMPLATE_EXPORT MirrorPadImageFilter : public PadImageFilter * indices, - std::vector * sizes, + GenerateNextInputRegion(long * regIndices, + const long * regLimit, + std::vector * indices, + std::vector * sizes, InputImageRegionType & inputRegion); /** Given an n dimensional list of output region breakpoints in indices * and size (where the current region and maximum region for each dimension * is encoded in regIndices and regLimit), choose the next output region. */ int - GenerateNextOutputRegion(long * regIndices, - const long * regLimit, - std::vector * indices, - std::vector * sizes, + GenerateNextOutputRegion(long * regIndices, + const long * regLimit, + std::vector * indices, + std::vector * sizes, OutputImageRegionType & outputRegion); /** Given the start and end indices of a region, determine how many @@ -183,12 +183,12 @@ class ITK_TEMPLATE_EXPORT MirrorPadImageFilter : public PadImageFilter & outputRegionStart, std::vector & inputRegionSizes, std::vector & outputRegionSizes, - long inputIndex, - long outputIndex, - long inputSize, - long outputSize, - int numRegs, - int & regCtr); + long inputIndex, + long outputIndex, + long inputSize, + long outputSize, + int numRegs, + int & regCtr); /** Generate region 1 (pre-region) information. Based on the indices * of the input and the output for this dimension, decide what are the @@ -203,12 +203,12 @@ class ITK_TEMPLATE_EXPORT MirrorPadImageFilter : public PadImageFilter & outputRegionStart, std::vector & inputRegionSizes, std::vector & outputRegionSizes, - long inputIndex, - long outputIndex, - long inputSize, - long outputSize, - int numRegs, - int & regCtr); + long inputIndex, + long outputIndex, + long inputSize, + long outputSize, + int numRegs, + int & regCtr); /** Generate region 2 (post-region) information. Based on the indices * of the input and the output for this dimension, decide what are the @@ -223,12 +223,12 @@ class ITK_TEMPLATE_EXPORT MirrorPadImageFilter : public PadImageFilter & outputRegionStart, std::vector & inputRegionSizes, std::vector & outputRegionSizes, - long inputIndex, - long outputIndex, - long inputSize, - long outputSize, - int numRegs, - int & regCtr); + long inputIndex, + long outputIndex, + long inputSize, + long outputSize, + int numRegs, + int & regCtr); /** MirrorPadImageFilter needs a different input requested region than * output requested region. As such, MirrorPadImageFilter needs to diff --git a/Modules/Filtering/ImageGrid/include/itkMirrorPadImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkMirrorPadImageFilter.hxx index 3c39aba9252..25ec1ae5486 100644 --- a/Modules/Filtering/ImageGrid/include/itkMirrorPadImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkMirrorPadImageFilter.hxx @@ -33,16 +33,16 @@ namespace itk */ template int -MirrorPadImageFilter::GenerateNextOutputRegion(long * regIndices, - const long * regLimit, - std::vector * indices, - std::vector * sizes, +MirrorPadImageFilter::GenerateNextOutputRegion(long * regIndices, + const long * regLimit, + std::vector * indices, + std::vector * sizes, OutputImageRegionType & outputRegion) { - unsigned int ctr; - int done = 0; + unsigned int ctr; + int done = 0; OutputImageIndexType nextIndex = outputRegion.GetIndex(); - OutputImageSizeType nextSize = outputRegion.GetSize(); + OutputImageSizeType nextSize = outputRegion.GetSize(); // // Starting at the first dimension, increment the counter and set a new @@ -90,16 +90,16 @@ MirrorPadImageFilter::GenerateNextOutputRegion(long * */ template int -MirrorPadImageFilter::GenerateNextInputRegion(long * regIndices, - const long * regLimit, - std::vector * indices, - std::vector * sizes, +MirrorPadImageFilter::GenerateNextInputRegion(long * regIndices, + const long * regLimit, + std::vector * indices, + std::vector * sizes, InputImageRegionType & inputRegion) { - unsigned int ctr; - int done = 0; + unsigned int ctr; + int done = 0; InputImageIndexType nextIndex = inputRegion.GetIndex(); - InputImageSizeType nextSize = inputRegion.GetSize(); + InputImageSizeType nextSize = inputRegion.GetSize(); // // Starting at the first dimension, increment the counter and set a new @@ -150,7 +150,7 @@ template int MirrorPadImageFilter::FindRegionsInArea(long start, long end, long size, long offset) { - int result = 1; + int result = 1; const long regionsize = end - start; if (regionsize > 0) // Find out home many regions we have, { @@ -174,16 +174,16 @@ MirrorPadImageFilter::FindRegionsInArea(long start, l */ template void -MirrorPadImageFilter::ConvertOutputIndexToInputIndex(OutputImageIndexType & outputIndex, - InputImageIndexType & inputIndex, +MirrorPadImageFilter::ConvertOutputIndexToInputIndex(OutputImageIndexType & outputIndex, + InputImageIndexType & inputIndex, OutputImageRegionType & outputRegion, - InputImageRegionType & inputRegion, - const int * oddRegionArray, - double & outDecayFactor) + InputImageRegionType & inputRegion, + const int * oddRegionArray, + double & outDecayFactor) { OutputImageIndexType outputRegionStart = outputRegion.GetIndex(); - InputImageIndexType inputRegionStart = inputRegion.GetIndex(); - InputImageSizeType inputSizes = inputRegion.GetSize(); + InputImageIndexType inputRegionStart = inputRegion.GetIndex(); + InputImageSizeType inputSizes = inputRegion.GetSize(); for (unsigned int dimCtr = 0; dimCtr < ImageDimension; ++dimCtr) { @@ -257,12 +257,12 @@ MirrorPadImageFilter::BuildInterRegions(std::vector & outputRegionStart, std::vector & inputRegionSizes, std::vector & outputRegionSizes, - long inputIndex, - long outputIndex, - long inputSize, - long outputSize, - int numRegs, - int & regCtr) + long inputIndex, + long outputIndex, + long inputSize, + long outputSize, + int numRegs, + int & regCtr) { // Region 0 is between, which has a starting index equal to // the input region starting index, unless that would be @@ -312,12 +312,12 @@ MirrorPadImageFilter::BuildPreRegions(std::vector & outputRegionStart, std::vector & inputRegionSizes, std::vector & outputRegionSizes, - long inputIndex, - long outputIndex, - long inputSize, - long outputSize, - int numRegs, - int & regCtr) + long inputIndex, + long outputIndex, + long inputSize, + long outputSize, + int numRegs, + int & regCtr) { // Handle the pre-region. Within the pre-region, the first and last // groups may be truncated and only contain the back part of the input @@ -382,12 +382,12 @@ MirrorPadImageFilter::BuildPostRegions(std::vector & outputRegionStart, std::vector & inputRegionSizes, std::vector & outputRegionSizes, - long inputIndex, - long outputIndex, - long inputSize, - long outputSize, - int numRegs, - int & regCtr) + long inputIndex, + long outputIndex, + long inputSize, + long outputSize, + int numRegs, + int & regCtr) { // Handle the post region. The post region has a number of // areas of size equal to the input region, followed by one @@ -454,7 +454,7 @@ MirrorPadImageFilter::GenerateInputRequestedRegion() // Superclass::GenerateInputRequestedRegion(); // get pointers to the input and output - const typename Superclass::InputImagePointer inputPtr = const_cast(this->GetInput()); + const typename Superclass::InputImagePointer inputPtr = const_cast(this->GetInput()); const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) @@ -465,9 +465,9 @@ MirrorPadImageFilter::GenerateInputRequestedRegion() // Define a few indices that will be used to translate from an input pixel // to an output pixel OutputImageIndexType outputIndex = outputPtr->GetRequestedRegion().GetIndex(); - InputImageIndexType inputIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); - OutputImageSizeType outputSize = outputPtr->GetRequestedRegion().GetSize(); - InputImageSizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + InputImageIndexType inputIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); + OutputImageSizeType outputSize = outputPtr->GetRequestedRegion().GetSize(); + InputImageSizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); // For n dimensions, there are k^n combinations of before, between, and // after on these regions. We are keeping this flexible so that we @@ -479,11 +479,11 @@ MirrorPadImageFilter::GenerateInputRequestedRegion() std::vector outputRegionSizes[ImageDimension]; std::vector inputRegionStart[ImageDimension]; std::vector inputRegionSizes[ImageDimension]; - long inRegLimit[ImageDimension]; - long outRegLimit[ImageDimension]; - int numPre[ImageDimension]; - int numPost[ImageDimension]; - int numIn[ImageDimension]; + long inRegLimit[ImageDimension]; + long outRegLimit[ImageDimension]; + int numPre[ImageDimension]; + int numPost[ImageDimension]; + int numIn[ImageDimension]; for (unsigned int dimCtr = 0; dimCtr < ImageDimension; ++dimCtr) { numIn[dimCtr] = 1; // Always assume exactly one inter region. @@ -592,7 +592,7 @@ MirrorPadImageFilter::GenerateInputRequestedRegion() } } - typename TInputImage::SizeType inputRequestedRegionSize; + typename TInputImage::SizeType inputRequestedRegionSize; typename TInputImage::IndexType inputRequestedRegionStartIndex; for (unsigned int dimCtr = 0; dimCtr < ImageDimension; ++dimCtr) { @@ -618,28 +618,28 @@ MirrorPadImageFilter::DynamicThreadedGenerateData( // Get the input and output pointers const InputImageType * inputPtr = this->GetInput(); - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); // Define a few indices that will be used to translate from an input pixel // to an output pixel OutputImageIndexType outputIndex = outputRegionForThread.GetIndex(); - InputImageIndexType inputIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); - OutputImageSizeType outputSize = outputRegionForThread.GetSize(); - InputImageSizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + InputImageIndexType inputIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); + OutputImageSizeType outputSize = outputRegionForThread.GetSize(); + InputImageSizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); OutputImageRegionType outputRegion; - InputImageRegionType inputRegion; + InputImageRegionType inputRegion; // For n dimensions, there are k^n combinations of before, between, and // after on these regions. We are keeping this flexible so that we // can handle other blockings imposed by the mirror and wrap algorithms. - long inRegIndices[ImageDimension]; - long inRegLimit[ImageDimension]; - long outRegIndices[ImageDimension]; - long outRegLimit[ImageDimension]; - int numPre[ImageDimension]; - int numPost[ImageDimension]; - int numIn[ImageDimension]; + long inRegIndices[ImageDimension]; + long inRegLimit[ImageDimension]; + long outRegIndices[ImageDimension]; + long outRegLimit[ImageDimension]; + int numPre[ImageDimension]; + int numPost[ImageDimension]; + int numIn[ImageDimension]; std::vector outputRegionStart[ImageDimension]; std::vector outputRegionSizes[ImageDimension]; std::vector inputRegionStart[ImageDimension]; @@ -756,7 +756,7 @@ MirrorPadImageFilter::DynamicThreadedGenerateData( // Do the actual copy of the input pixels to the output pixels here. InputImageIndexType currentInputIndex; - InputIterator inIt(inputPtr, inputRegion); + InputIterator inIt(inputPtr, inputRegion); for (OutputIterator outIt(outputPtr, outputRegion); !outIt.IsAtEnd(); ++outIt, i++, ++inIt) { OutputImageIndexType currentOutputIndex = outIt.GetIndex(); diff --git a/Modules/Filtering/ImageGrid/include/itkOrientImageFilter.h b/Modules/Filtering/ImageGrid/include/itkOrientImageFilter.h index 1698b032d2f..2cd3f63258a 100644 --- a/Modules/Filtering/ImageGrid/include/itkOrientImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkOrientImageFilter.h @@ -252,7 +252,7 @@ class ITK_TEMPLATE_EXPORT OrientImageFilter : public ImageToImageFilter::GenerateInputRequestedRegion() Superclass::GenerateInputRequestedRegion(); // Get pointers to the input and output - const InputImagePointer inputPtr = const_cast(this->GetInput()); + const InputImagePointer inputPtr = const_cast(this->GetInput()); const OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) @@ -107,8 +107,8 @@ OrientImageFilter::DeterminePermutationsAndFlips( constexpr unsigned int NumDims = 3; // InputImageDimension is // regarded as 3. constexpr unsigned int CodeAxisIncreasingField = 1; - auto fixed_codes = fixed_orient.GetTerms(); - auto moving_codes = moving_orient.GetTerms(); + auto fixed_codes = fixed_orient.GetTerms(); + auto moving_codes = moving_orient.GetTerms(); // i, j, k will be the indexes in the Majorness code of the axes to flip; @@ -395,8 +395,8 @@ OrientImageFilter::GenerateData() progress->RegisterInternalFilter(cast, .3333333f); const InputImagePointer permuteInput = const_cast(this->GetInput()); - InputImagePointer flipInput = permuteInput; - InputImagePointer castInput = permuteInput; + InputImagePointer flipInput = permuteInput; + InputImagePointer castInput = permuteInput; // Only run those filters that will do something if (NeedToPermute()) @@ -454,7 +454,7 @@ OrientImageFilter::GenerateOutputInformation() // Get pointers to the input and output const InputImageConstPointer inputPtr = this->GetInput(); - const OutputImagePointer outputPtr = this->GetOutput(); + const OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) { diff --git a/Modules/Filtering/ImageGrid/include/itkPadImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkPadImageFilter.hxx index 53667640e16..a5367570875 100644 --- a/Modules/Filtering/ImageGrid/include/itkPadImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkPadImageFilter.hxx @@ -91,7 +91,7 @@ PadImageFilter::GenerateOutputInformation() // get pointers to the input and output const typename Superclass::InputImageConstPointer inputPtr = this->GetInput(); - const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); + const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); if (!outputPtr || !inputPtr) { @@ -100,11 +100,11 @@ PadImageFilter::GenerateOutputInformation() // we need to compute the output image size, and the // output image start index - unsigned int i; - typename TOutputImage::SizeType outputSize; + unsigned int i; + typename TOutputImage::SizeType outputSize; typename TOutputImage::IndexType outputStartIndex; - typename TInputImage::SizeType inputSize; - typename TInputImage::IndexType inputStartIndex; + typename TInputImage::SizeType inputSize; + typename TInputImage::IndexType inputStartIndex; inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); diff --git a/Modules/Filtering/ImageGrid/include/itkPadImageFilterBase.hxx b/Modules/Filtering/ImageGrid/include/itkPadImageFilterBase.hxx index 63bc4b622b1..bf084d0c28c 100644 --- a/Modules/Filtering/ImageGrid/include/itkPadImageFilterBase.hxx +++ b/Modules/Filtering/ImageGrid/include/itkPadImageFilterBase.hxx @@ -59,10 +59,10 @@ void PadImageFilterBase::GenerateInputRequestedRegion() { // Get pointers to the input and output. - const typename Superclass::InputImagePointer inputPtr = const_cast(this->GetInput()); + const typename Superclass::InputImagePointer inputPtr = const_cast(this->GetInput()); const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); - const InputImageRegionType & inputLargestPossibleRegion = inputPtr->GetLargestPossibleRegion(); + const InputImageRegionType & inputLargestPossibleRegion = inputPtr->GetLargestPossibleRegion(); const OutputImageRegionType & outputRequestedRegion = outputPtr->GetRequestedRegion(); // Ask the boundary condition for the input requested region. @@ -82,7 +82,7 @@ PadImageFilterBase::DynamicThreadedGenerateData( const OutputImageRegionType & outputRegionForThread) { - const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); + const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); const typename Superclass::InputImageConstPointer inputPtr = this->GetInput(); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); @@ -90,7 +90,7 @@ PadImageFilterBase::DynamicThreadedGenerateData( // Use the region copy method to copy the input image values to the // output image. OutputImageRegionType copyRegion(outputRegionForThread); - const bool regionOverlaps = copyRegion.Crop(inputPtr->GetLargestPossibleRegion()); + const bool regionOverlaps = copyRegion.Crop(inputPtr->GetLargestPossibleRegion()); if (regionOverlaps) { // Do a block copy for the overlapping region. diff --git a/Modules/Filtering/ImageGrid/include/itkPasteImageFilter.h b/Modules/Filtering/ImageGrid/include/itkPasteImageFilter.h index 451d2148bd0..360242fa7c7 100644 --- a/Modules/Filtering/ImageGrid/include/itkPasteImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkPasteImageFilter.h @@ -201,7 +201,7 @@ class ITK_TEMPLATE_EXPORT PasteImageFilter : public InPlaceImageFilter= SourceImageDimension, diff --git a/Modules/Filtering/ImageGrid/include/itkPasteImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkPasteImageFilter.hxx index 0e9a7bb0cd6..81d3e3b4c9d 100644 --- a/Modules/Filtering/ImageGrid/include/itkPasteImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkPasteImageFilter.hxx @@ -56,7 +56,7 @@ PasteImageFilter::GenerateInputRequeste Superclass::GenerateInputRequestedRegion(); // Get the pointers for the inputs and output - const InputImagePointer destPtr = const_cast(this->GetInput()); + const InputImagePointer destPtr = const_cast(this->GetInput()); const SourceImagePointer sourcePtr = const_cast(this->GetSourceImage()); const OutputImagePointer outputPtr = this->GetOutput(); @@ -117,9 +117,9 @@ PasteImageFilter::DynamicThreadedGenera const OutputImageRegionType & outputRegionForThread) { // Get the input and output pointers - const InputImageType * destPtr = this->GetInput(); + const InputImageType * destPtr = this->GetInput(); const SourceImageType * sourcePtr = this->GetSourceImage(); - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); @@ -160,7 +160,7 @@ PasteImageFilter::DynamicThreadedGenera // Transform the cropped index back into the source image SourceImageIndexType sourceIndexInSourceImageCropped; - SourceImageSizeType sourceSizeCropped; + SourceImageSizeType sourceSizeCropped; for (unsigned int d = 0, s = 0; s < SourceImageDimension; ++d, ++s) { diff --git a/Modules/Filtering/ImageGrid/include/itkPermuteAxesImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkPermuteAxesImageFilter.hxx index 16a6c2057eb..80c492e48b9 100644 --- a/Modules/Filtering/ImageGrid/include/itkPermuteAxesImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkPermuteAxesImageFilter.hxx @@ -110,24 +110,24 @@ PermuteAxesImageFilter::GenerateOutputInformation() // get pointers to the input and output const typename Superclass::InputImageConstPointer inputPtr = this->GetInput(); - const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); + const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) { return; } - const typename TImage::SpacingType & inputSpacing = inputPtr->GetSpacing(); - const typename TImage::PointType & inputOrigin = inputPtr->GetOrigin(); + const typename TImage::SpacingType & inputSpacing = inputPtr->GetSpacing(); + const typename TImage::PointType & inputOrigin = inputPtr->GetOrigin(); const typename TImage::DirectionType & inputDirection = inputPtr->GetDirection(); - const typename TImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); - const typename TImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); + const typename TImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename TImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); - typename TImage::SpacingType outputSpacing; - typename TImage::PointType outputOrigin; + typename TImage::SpacingType outputSpacing; + typename TImage::PointType outputOrigin; typename TImage::DirectionType outputDirection; - typename TImage::SizeType outputSize; - typename TImage::IndexType outputStartIndex; + typename TImage::SizeType outputSize; + typename TImage::IndexType outputStartIndex; for (unsigned int j = 0; j < ImageDimension; ++j) { // origin does not change by a Permute. But spacing, directions, @@ -159,7 +159,7 @@ PermuteAxesImageFilter::GenerateInputRequestedRegion() Superclass::GenerateInputRequestedRegion(); // get pointers to the input and output - const InputImagePointer inputPtr = const_cast(this->GetInput()); + const InputImagePointer inputPtr = const_cast(this->GetInput()); const OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) @@ -167,10 +167,10 @@ PermuteAxesImageFilter::GenerateInputRequestedRegion() return; } - const typename TImage::SizeType & outputSize = outputPtr->GetRequestedRegion().GetSize(); + const typename TImage::SizeType & outputSize = outputPtr->GetRequestedRegion().GetSize(); const typename TImage::IndexType & outputIndex = outputPtr->GetRequestedRegion().GetIndex(); - typename TImage::SizeType inputSize; + typename TImage::SizeType inputSize; typename TImage::IndexType inputIndex; for (unsigned int j = 0; j < ImageDimension; ++j) @@ -190,7 +190,7 @@ PermuteAxesImageFilter::DynamicThreadedGenerateData(const OutputImageReg { // Get the input and output pointers const typename Superclass::InputImageConstPointer inputPtr = this->GetInput(); - const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); + const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); diff --git a/Modules/Filtering/ImageGrid/include/itkRegionOfInterestImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkRegionOfInterestImageFilter.hxx index dce4712e170..eb6c62a9b01 100644 --- a/Modules/Filtering/ImageGrid/include/itkRegionOfInterestImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkRegionOfInterestImageFilter.hxx @@ -69,7 +69,7 @@ RegionOfInterestImageFilter::GenerateOutputInformatio // this filter allows the input the output to be of different dimensions // Get pointers to the input and output - const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); + const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); const typename Superclass::InputImageConstPointer inputPtr = this->GetInput(); if (!outputPtr || !inputPtr) @@ -87,7 +87,7 @@ RegionOfInterestImageFilter::GenerateOutputInformatio outputPtr->SetLargestPossibleRegion(region); // Correct origin of the extracted region. - const IndexType roiStart(m_RegionOfInterest.GetIndex()); + const IndexType roiStart(m_RegionOfInterest.GetIndex()); typename Superclass::OutputImageType::PointType outputOrigin; inputPtr->TransformIndexToPhysicalPoint(roiStart, outputOrigin); outputPtr->SetOrigin(outputOrigin); @@ -101,7 +101,7 @@ RegionOfInterestImageFilter::DynamicThreadedGenerateD // Get the input and output pointers const TInputImage * inputPtr = this->GetInput(); - TOutputImage * outputPtr = this->GetOutput(); + TOutputImage * outputPtr = this->GetOutput(); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); diff --git a/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.h b/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.h index 7a689bf79e9..06a95076e09 100644 --- a/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.h @@ -346,8 +346,8 @@ class ITK_TEMPLATE_EXPORT ResampleImageFilter : public ImageToImageFilter::PixelType ResampleImageFilter:: CastPixelWithBoundsChecking(const InterpolatorOutputType value, - const ComponentType minComponent, - const ComponentType maxComponent) const + const ComponentType minComponent, + const ComponentType maxComponent) const { const unsigned int nComponents = InterpolatorConvertType::GetNumberOfComponents(value); - PixelType outputValue; + PixelType outputValue; NumericTraits::SetLength(outputValue, nComponents); @@ -348,7 +348,7 @@ ResampleImageFilter::SetLength(outputValue, nComponents); @@ -370,9 +370,9 @@ void ResampleImageFilter:: NonlinearThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) { - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); const InputImageType * inputPtr = this->GetInput(); - const TransformType * transformPtr = this->GetTransform(); + const TransformType * transformPtr = this->GetTransform(); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); @@ -399,7 +399,7 @@ ResampleImageFilterTransformPoint(outputPoint); ContinuousInputIndexType inputIndex; - const bool isInsideInput = inputPtr->TransformPhysicalPointToContinuousIndex(inputPoint, inputIndex); + const bool isInsideInput = inputPtr->TransformPhysicalPointToContinuousIndex(inputPoint, inputIndex); OutputType value; // Evaluate input at right position and copy to the output @@ -432,9 +432,9 @@ void ResampleImageFilter:: LinearThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) { - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); const InputImageType * inputPtr = this->GetInput(); - const TransformType * transformPtr = this->GetTransform(); + const TransformType * transformPtr = this->GetTransform(); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); @@ -657,7 +657,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.hxx index 665dfcc4e13..3110bf76bf4 100644 --- a/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.hxx @@ -109,7 +109,7 @@ ShrinkImageFilter::DynamicThreadedGenerateData( { // Get the input and output pointers const InputImageConstPointer inputPtr = this->GetInput(); - const OutputImagePointer outputPtr = this->GetOutput(); + const OutputImagePointer outputPtr = this->GetOutput(); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); @@ -124,8 +124,8 @@ ShrinkImageFilter::DynamicThreadedGenerateData( // Define a few indices that will be used to transform from an input pixel // to an output pixel - OutputIndexType outputIndex; - InputIndexType inputIndex; + OutputIndexType outputIndex; + InputIndexType inputIndex; OutputOffsetType offsetIndex; typename TOutputImage::PointType tempPoint; @@ -181,7 +181,7 @@ ShrinkImageFilter::GenerateInputRequestedRegion() Superclass::GenerateInputRequestedRegion(); // Get pointers to the input and output - auto * inputPtr = const_cast(this->GetInput()); + auto * inputPtr = const_cast(this->GetInput()); const OutputImageType * outputPtr = this->GetOutput(); itkAssertInDebugAndIgnoreInReleaseMacro(inputPtr != nullptr); @@ -190,8 +190,8 @@ ShrinkImageFilter::GenerateInputRequestedRegion() // Compute the input requested region (size and start index) // Use the image transformations to insure an input requested region // that will provide the proper range - unsigned int i; - const typename TOutputImage::SizeType & outputRequestedRegionSize = outputPtr->GetRequestedRegion().GetSize(); + unsigned int i; + const typename TOutputImage::SizeType & outputRequestedRegionSize = outputPtr->GetRequestedRegion().GetSize(); const typename TOutputImage::IndexType & outputRequestedRegionStartIndex = outputPtr->GetRequestedRegion().GetIndex(); // Convert the factor for convenient multiplication @@ -201,12 +201,12 @@ ShrinkImageFilter::GenerateInputRequestedRegion() factorSize[i] = m_ShrinkFactors[i]; } - OutputIndexType outputIndex; - InputIndexType inputIndex; - InputIndexType inputRequestedRegionIndex; + OutputIndexType outputIndex; + InputIndexType inputIndex; + InputIndexType inputRequestedRegionIndex; OutputOffsetType offsetIndex; - typename TInputImage::SizeType inputRequestedRegionSize; + typename TInputImage::SizeType inputRequestedRegionSize; typename TOutputImage::PointType tempPoint; // Use this index to compute the offset everywhere in this class @@ -258,21 +258,21 @@ ShrinkImageFilter::GenerateOutputInformation() // Get pointers to the input and output const InputImageType * inputPtr = this->GetInput(); - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); itkAssertInDebugAndIgnoreInReleaseMacro(inputPtr); itkAssertInDebugAndIgnoreInReleaseMacro(outputPtr != nullptr); // Compute the output spacing, the output image size, and the // output image start index - unsigned int i; + unsigned int i; const typename TInputImage::SpacingType & inputSpacing = inputPtr->GetSpacing(); - const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); - const typename TInputImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); + const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename TInputImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); typename TOutputImage::SpacingType outputSpacing; - typename TOutputImage::SizeType outputSize; - typename TOutputImage::IndexType outputStartIndex; + typename TOutputImage::SizeType outputSize; + typename TOutputImage::IndexType outputStartIndex; for (i = 0; i < TOutputImage::ImageDimension; ++i) { @@ -311,7 +311,7 @@ ShrinkImageFilter::GenerateOutputInformation() outputPtr->TransformContinuousIndexToPhysicalPoint(outputCenterIndex, outputCenterPoint); const typename TOutputImage::PointType & inputOrigin = inputPtr->GetOrigin(); - const typename TOutputImage::PointType outputOrigin = inputOrigin + (inputCenterPoint - outputCenterPoint); + const typename TOutputImage::PointType outputOrigin = inputOrigin + (inputCenterPoint - outputCenterPoint); outputPtr->SetOrigin(outputOrigin); // Set region diff --git a/Modules/Filtering/ImageGrid/include/itkSliceBySliceImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkSliceBySliceImageFilter.hxx index 546395ecaa6..24399b94b70 100644 --- a/Modules/Filtering/ImageGrid/include/itkSliceBySliceImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkSliceBySliceImageFilter.hxx @@ -96,7 +96,7 @@ SliceBySliceImageFilter(it.GetInput()); + auto * input = dynamic_cast(it.GetInput()); const RegionType & requestedInputRegion = input->GetRequestedRegion(); @@ -226,8 +226,8 @@ SliceBySliceImageFilterAllocateOutputs(); const RegionType requestedRegion = this->GetOutput(0)->GetRequestedRegion(); - const IndexType requestedIndex = requestedRegion.GetIndex(); - const SizeType requestedSize = requestedRegion.GetSize(); + const IndexType requestedIndex = requestedRegion.GetIndex(); + const SizeType requestedSize = requestedRegion.GetSize(); InternalRegionType internalOutputRegion; InternalRegionType internalInputRegion; @@ -258,7 +258,7 @@ SliceBySliceImageFilterm_Dimension) @@ -297,7 +297,7 @@ SliceBySliceImageFilterGetInput(i)->TransformIndexToPhysicalPoint(originIndex, inputOrigin); InternalPointType internalInputOrigin; - unsigned int internalDim = 0; + unsigned int internalDim = 0; for (unsigned int dim = 0; internalDim < InternalImageDimension; ++dim, ++internalDim) { if (dim == this->m_Dimension) diff --git a/Modules/Filtering/ImageGrid/include/itkSliceImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkSliceImageFilter.hxx index 96673a9322c..8e1a21d2e23 100644 --- a/Modules/Filtering/ImageGrid/include/itkSliceImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkSliceImageFilter.hxx @@ -119,11 +119,11 @@ SliceImageFilter::DynamicThreadedGenerateData( const OutputImageRegionType & outputRegionForThread) { const InputImageConstPointer inputPtr = this->GetInput(); - const OutputImagePointer outputPtr = this->GetOutput(); + const OutputImagePointer outputPtr = this->GetOutput(); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); - const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); const typename TInputImage::IndexType & inputIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); // clamp start @@ -137,7 +137,7 @@ SliceImageFilter::DynamicThreadedGenerateData( using OutputIterator = ImageRegionIteratorWithIndex; OutputIndexType destIndex; - InputIndexType srcIndex; + InputIndexType srcIndex; for (OutputIterator outIt(outputPtr, outputRegionForThread); !outIt.IsAtEnd(); ++outIt) { @@ -163,13 +163,13 @@ SliceImageFilter::GenerateInputRequestedRegion() // Get pointers to the input and output - const InputImagePointer inputPtr = const_cast(this->GetInput()); + const InputImagePointer inputPtr = const_cast(this->GetInput()); const OutputImagePointer outputPtr = this->GetOutput(); - const typename TOutputImage::SizeType & outputRequestedRegionSize = outputPtr->GetRequestedRegion().GetSize(); + const typename TOutputImage::SizeType & outputRequestedRegionSize = outputPtr->GetRequestedRegion().GetSize(); const typename TOutputImage::IndexType & outputRequestedRegionStartIndex = outputPtr->GetRequestedRegion().GetIndex(); - const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); const typename TInputImage::IndexType & inputIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); // clamp start @@ -227,17 +227,17 @@ SliceImageFilter::GenerateOutputInformation() // Get pointers to the input and output const InputImageConstPointer inputPtr = this->GetInput(); - const OutputImagePointer outputPtr = this->GetOutput(); + const OutputImagePointer outputPtr = this->GetOutput(); // Compute the output spacing, the output image size, and the // output image start index const typename TInputImage::SpacingType & inputSpacing = inputPtr->GetSpacing(); - const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); - const typename TInputImage::IndexType & inputIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); - typename TInputImage::IndexType inputStartIndex; + const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename TInputImage::IndexType & inputIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); + typename TInputImage::IndexType inputStartIndex; typename TOutputImage::SpacingType outputSpacing; - typename TOutputImage::SizeType outputSize; + typename TOutputImage::SizeType outputSize; for (unsigned int i = 0; i < TOutputImage::ImageDimension; ++i) { @@ -275,7 +275,7 @@ SliceImageFilter::GenerateOutputInformation() } const typename TInputImage::DirectionType & inputDirection = inputPtr->GetDirection(); - typename TInputImage::DirectionType flipMatrix; + typename TInputImage::DirectionType flipMatrix; // Need a matrix to model the reversing of directions, this should // maintain the physical location of the pixels diff --git a/Modules/Filtering/ImageGrid/include/itkTileImageFilter.h b/Modules/Filtering/ImageGrid/include/itkTileImageFilter.h index 544aa347bd5..6eb171fcadc 100644 --- a/Modules/Filtering/ImageGrid/include/itkTileImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkTileImageFilter.h @@ -94,7 +94,7 @@ class ITK_TEMPLATE_EXPORT TileImageFilter : public ImageToImageFilter::GenerateData() if (NumericTraits::GetLength(defaultPixelValue) == 0) { constexpr OutputPixelComponentType zeroComponent{}; - const unsigned int nComponents = output->GetNumberOfComponentsPerPixel(); + const unsigned int nComponents = output->GetNumberOfComponentsPerPixel(); NumericTraits::SetLength(defaultPixelValue, nComponents); for (unsigned int n = 0; n < nComponents; ++n) { @@ -96,7 +96,7 @@ TileImageFilter::GenerateData() auto tempImage = TempImageType::New(); tempImage->CopyInformation(output); - OutputSizeType tempSize; + OutputSizeType tempSize; OutputIndexType tempIndex; for (unsigned int i = 0; i < InputImageDimension; ++i) { @@ -157,7 +157,7 @@ TileImageFilter::GenerateOutputInformation() // region and destination index for multiple invocations of the // PasteImageFilter. TOutputImage * outputPtr = this->GetOutput(); - auto * inputPtr = const_cast(this->GetInput()); + auto * inputPtr = const_cast(this->GetInput()); if (!outputPtr || !inputPtr) { @@ -234,7 +234,7 @@ TileImageFilter::GenerateOutputInformation() ImageRegionIteratorWithIndex it(m_TileImage, m_TileImage->GetBufferedRegion()); unsigned int input = 0; - TileInfo info; + TileInfo info; while (!it.IsAtEnd()) { if (input < this->GetNumberOfIndexedInputs()) @@ -319,7 +319,7 @@ TileImageFilter::GenerateOutputInformation() { typename TileImageType::IndexType tileIndex2 = it.GetIndex(); - OutputSizeType regionSize; + OutputSizeType regionSize; OutputIndexType regionIndex; for (unsigned int i = 0; i < OutputImageDimension; ++i) { diff --git a/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.h b/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.h index eb179b7e2d1..a47f30baca3 100644 --- a/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.h @@ -272,23 +272,23 @@ class ITK_TEMPLATE_EXPORT WarpImageFilter : public ImageToImageFilter::AfterThreadedGen template void WarpImageFilter::EvaluateDisplacementAtPhysicalPoint( - const PointType & point, + const PointType & point, DisplacementType & output) { this->EvaluateDisplacementAtPhysicalPoint(point, this->GetDisplacementField(), output); @@ -179,9 +179,9 @@ WarpImageFilter::EvaluateDisplace template void WarpImageFilter::EvaluateDisplacementAtPhysicalPoint( - const PointType & point, + const PointType & point, const DisplacementFieldType * fieldPtr, - DisplacementType & output) + DisplacementType & output) { const ContinuousIndex index = fieldPtr->template TransformPhysicalPointToContinuousIndex(point); @@ -192,7 +192,7 @@ WarpImageFilter::EvaluateDisplace */ IndexType baseIndex; IndexType neighIndex; - double distance[ImageDimension]; + double distance[ImageDimension]; for (dim = 0; dim < ImageDimension; ++dim) { @@ -224,12 +224,12 @@ WarpImageFilter::EvaluateDisplace */ output.Fill(0); - double totalOverlap = 0.0; + double totalOverlap = 0.0; const unsigned int numNeighbors(1 << TInputImage::ImageDimension); for (unsigned int counter = 0; counter < numNeighbors; ++counter) { - double overlap = 1.0; // fraction overlap + double overlap = 1.0; // fraction overlap unsigned int upper = counter; // each bit indicates upper/lower neighbour // get neighbor index and overlap fraction @@ -253,7 +253,7 @@ WarpImageFilter::EvaluateDisplace if (overlap) { const DisplacementType input = fieldPtr->GetPixel(neighIndex); - const unsigned int displacementComponent = NumericTraits::GetLength(input); + const unsigned int displacementComponent = NumericTraits::GetLength(input); for (unsigned int k = 0; k < displacementComponent; ++k) { output[k] += overlap * static_cast(input[k]); @@ -277,16 +277,16 @@ void WarpImageFilter::DynamicThreadedGenerateData( const OutputImageRegionType & outputRegionForThread) { - OutputImageType * outputPtr = this->GetOutput(); + OutputImageType * outputPtr = this->GetOutput(); const DisplacementFieldType * fieldPtr = this->GetDisplacementField(); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); // iterator for the output image ImageRegionIteratorWithIndex outputIt(outputPtr, outputRegionForThread); - IndexType index; - PointType point; - DisplacementType displacement; + IndexType index; + PointType point; + DisplacementType displacement; NumericTraits::SetLength(displacement, ImageDimension); static_assert(PointType::Dimension == ImageDimension, "ERROR: Point type and ImageDimension must be the same!"); if (this->m_DefFieldSameInformation) @@ -376,7 +376,7 @@ WarpImageFilter::GenerateInputReq // the smallest region of the deformation field that fully // contains the physical space covered by the output's requested // region, se we do the easy thing and request the largest possible region - auto * fieldPtr = const_cast(this->GetDisplacementField()); + auto * fieldPtr = const_cast(this->GetDisplacementField()); const OutputImageType * outputPtr = this->GetOutput(); if (fieldPtr != nullptr) { diff --git a/Modules/Filtering/ImageGrid/include/itkWarpVectorImageFilter.h b/Modules/Filtering/ImageGrid/include/itkWarpVectorImageFilter.h index 1f70717528c..7568c4fa680 100644 --- a/Modules/Filtering/ImageGrid/include/itkWarpVectorImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkWarpVectorImageFilter.h @@ -233,9 +233,9 @@ class ITK_TEMPLATE_EXPORT WarpVectorImageFilter : public ImageToImageFilter::DynamicThreadedGenerateData( const OutputImageRegionType & outputRegionForThread) { - const InputImageConstPointer inputPtr = this->GetInput(); - const OutputImagePointer outputPtr = this->GetOutput(); + const InputImageConstPointer inputPtr = this->GetInput(); + const OutputImagePointer outputPtr = this->GetOutput(); const DisplacementFieldPointer fieldPtr = this->GetDisplacementField(); ImageRegionIteratorWithIndex outputIt(outputPtr, outputRegionForThread); - TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); + TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); ImageRegionIterator fieldIt(fieldPtr, outputRegionForThread); - IndexType index; - PointType point; + IndexType index; + PointType point; DisplacementType displacement; - PixelType outputValue; + PixelType outputValue; while (!outputIt.IsAtEnd()) { @@ -208,7 +208,7 @@ WarpVectorImageFilter::GenerateIn // just propagate up the output requested region for the // displacement field. const DisplacementFieldPointer fieldPtr = this->GetDisplacementField(); - const OutputImagePointer outputPtr = this->GetOutput(); + const OutputImagePointer outputPtr = this->GetOutput(); if (fieldPtr) { fieldPtr->SetRequestedRegion(outputPtr->GetRequestedRegion()); diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineControlPointImageFunctionTest.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineControlPointImageFunctionTest.cxx index 15a755e676e..1c9258608ff 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineControlPointImageFunctionTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineControlPointImageFunctionTest.cxx @@ -35,9 +35,9 @@ itkBSplineControlPointImageFunctionTest(int, char *[]) auto phiLattice = VectorImageType::New(); - VectorImageType::SizeType size; + VectorImageType::SizeType size; VectorImageType::SpacingType spacing; - VectorImageType::PointType origin; + VectorImageType::PointType origin; size.Fill(4); spacing.Fill(1.0); @@ -108,10 +108,10 @@ itkBSplineControlPointImageFunctionTest(int, char *[]) bspliner->SetInputImage(phiLattice); - BSplinerType::PointType point; + BSplinerType::PointType point; BSplinerType::GradientType gradient; BSplinerType::GradientType hessianComponent; - BSplinerType::OutputType data; + BSplinerType::OutputType data; // f(0) = 1/6; // f'(u) = u - 0.5 so f'(0) should be -0.5. diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineResampleImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineResampleImageFilterTest.cxx index 22909b157fa..b50afff4151 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineResampleImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineResampleImageFilterTest.cxx @@ -93,7 +93,7 @@ void set2DData(ImageType2D::Pointer imgPtr) { constexpr SizeType2D size = { { 4, 4 } }; - const double mydata[49] = { 0, 1, 2, 3, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 3, 2 }; + const double mydata[49] = { 0, 1, 2, 3, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 3, 2 }; ImageType2D::RegionType region; region.SetSize(size); @@ -123,7 +123,7 @@ void setInt2DData(IntImageType2D::Pointer imgPtr) { constexpr IntSizeType2D size = { { 4, 4 } }; - const int mydata[49] = { 0, 1, 2, 3, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 3, 2 }; + const int mydata[49] = { 0, 1, 2, 3, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 3, 2 }; IntImageType2D::RegionType region; region.SetSize(size); @@ -155,7 +155,7 @@ VerifyResultsHigherOrderSpline(ImageTypePtr2D ActualResults, double * ExpectedRe double * ERptr = ExpectedResults; InputIterator ActualResultsIter(ActualResults, ActualResults->GetLargestPossibleRegion()); - double percentErr = 0; + double percentErr = 0; while (!ActualResultsIter.IsAtEnd()) { @@ -203,7 +203,7 @@ VerifyResults2ndOrderSpline(ImageTypePtr2D ActualResults, double * ExpectedResul double * ERptr = ExpectedResults; InputIterator ActualResultsIter(ActualResults, ActualResults->GetLargestPossibleRegion()); - double percentErr = 0; + double percentErr = 0; while (!ActualResultsIter.IsAtEnd()) { @@ -231,7 +231,7 @@ VerifyResultsLowerOrderSpline(ImageTypePtr2D ActualResults, double * ExpectedRes double * ERptr = ExpectedResults; InputIterator ActualResultsIter(ActualResults, ActualResults->GetLargestPossibleRegion()); - double percentErr = 0; + double percentErr = 0; while (!ActualResultsIter.IsAtEnd()) { @@ -269,10 +269,10 @@ test2D_Standard_l2_NthOrderSpline_filter(unsigned int splineOrder) using DownsamplerType2D = itk::BSplineDownsampleImageFilter; using UpsamplerType2D = itk::BSplineUpsampleImageFilter; - auto downSampler = DownsamplerType2D::New(); + auto downSampler = DownsamplerType2D::New(); const itk::SimpleFilterWatcher downWatcher(downSampler, "test2D_Standard_l2_filter"); - auto upSampler = UpsamplerType2D::New(); + auto upSampler = UpsamplerType2D::New(); const itk::SimpleFilterWatcher upWatcher(upSampler, "test2D_Standard_l2_filter"); downSampler->SetSplineOrder(splineOrder); @@ -339,10 +339,10 @@ test2D_Standard_L2_NthOrderSpline_filter(unsigned int splineOrder) using DownsamplerType2D = itk::BSplineDownsampleImageFilter; using UpsamplerType2D = itk::BSplineUpsampleImageFilter; - auto downSampler = DownsamplerType2D::New(); + auto downSampler = DownsamplerType2D::New(); const itk::SimpleFilterWatcher downWatcher(downSampler, "test2D_Standard_L2_filter"); - auto upSampler = UpsamplerType2D::New(); + auto upSampler = UpsamplerType2D::New(); const itk::SimpleFilterWatcher upWatcher(upSampler, "test2D_Standard_L2_filter"); downSampler->SetSplineOrder(splineOrder); @@ -408,9 +408,9 @@ test2D_Centered_l2_NthOrderSpline_filter(unsigned int splineOrder) using DownsamplerType2D = itk::BSplineDownsampleImageFilter; using UpsamplerType2D = itk::BSplineUpsampleImageFilter; - auto downSampler = DownsamplerType2D::New(); + auto downSampler = DownsamplerType2D::New(); const itk::SimpleFilterWatcher downWatcher(downSampler, "test2D_Centered_l2_filter"); - auto upSampler = UpsamplerType2D::New(); + auto upSampler = UpsamplerType2D::New(); const itk::SimpleFilterWatcher upWatcher(upSampler, "test2D_Centered_l2_filter"); downSampler->SetSplineOrder(splineOrder); upSampler->SetSplineOrder(splineOrder); @@ -482,8 +482,8 @@ testIntInputDoubleOutput() using UpsamplerType2D = itk::BSplineUpsampleImageFilter; - auto downSampler = DownsamplerType2D::New(); - auto upSampler = UpsamplerType2D::New(); + auto downSampler = DownsamplerType2D::New(); + auto upSampler = UpsamplerType2D::New(); constexpr int splineOrder = 3; downSampler->SetSplineOrder(splineOrder); upSampler->SetSplineOrder(splineOrder); @@ -532,9 +532,9 @@ test2D_Centered_L2_NthOrderSpline_filter(unsigned int splineOrder) using DownsamplerType2D = itk::BSplineDownsampleImageFilter; using UpsamplerType2D = itk::BSplineUpsampleImageFilter; - auto downSampler = DownsamplerType2D::New(); + auto downSampler = DownsamplerType2D::New(); const itk::SimpleFilterWatcher downWatcher(downSampler, "test2D_Centered_L2_filter"); - auto upSampler = UpsamplerType2D::New(); + auto upSampler = UpsamplerType2D::New(); const itk::SimpleFilterWatcher upWatcher(upSampler, "test2D_Centered_L2_filter"); // int splineOrder = 2; downSampler->SetSplineOrder(splineOrder); diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest2.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest2.cxx index 2fbb503f8de..bcd76886c60 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest2.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest2.cxx @@ -77,8 +77,8 @@ itkBSplineScatteredDataPointSetToImageFilterTest2(int argc, char * argv[]) ITK_EXERCISE_BASIC_OBJECT_METHODS(filter, BSplineScatteredDataPointSetToImageFilter, PointSetToImageFilter); // Define the parametric domain - auto spacing = itk::MakeFilled(0.01); - auto size = ImageType::SizeType::Filled(101); + auto spacing = itk::MakeFilled(0.01); + auto size = ImageType::SizeType::Filled(101); constexpr ImageType::PointType origin{}; filter->SetSize(size); diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest3.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest3.cxx index 7f3854b86cc..9259c276a62 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest3.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest3.cxx @@ -94,7 +94,7 @@ itkBSplineScatteredDataPointSetToImageFilterTest3(int argc, char * argv[]) ITK_EXERCISE_BASIC_OBJECT_METHODS(filter, BSplineScatteredDataPointSetToImageFilter, PointSetToImageFilter); // Define the parametric domain - auto spacing = itk::MakeFilled(0.001); + auto spacing = itk::MakeFilled(0.001); ImageType::SizeType size; // Adding 0.5 to avoid rounding errors size.Fill(static_cast(1.0 / spacing[0] + .5) + 1); diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest4.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest4.cxx index bd1d3f71ff6..720247d5d5c 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest4.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest4.cxx @@ -47,10 +47,10 @@ itkBSplineScatteredDataPointSetToImageFilterTest4(int, char *[]) using FilterType = itk::BSplineScatteredDataPointSetToImageFilter; - auto size = VectorImageType::SizeType::Filled(100); + auto size = VectorImageType::SizeType::Filled(100); constexpr VectorImageType::PointType origin{}; - auto spacing = itk::MakeFilled(1); - VectorImageType::DirectionType direction; + auto spacing = itk::MakeFilled(1); + VectorImageType::DirectionType direction; direction.SetIdentity(); // Instantiate example corresponding points with relative weighting @@ -204,7 +204,7 @@ itkBSplineScatteredDataPointSetToImageFilterTest4(int, char *[]) VectorImageType::PointType testPoint; testPoint.CastFrom(inputPoint); - VectorType vector = interpolator->Evaluate(testPoint); + VectorType vector = interpolator->Evaluate(testPoint); const RealType testDistance = vector.GetNorm(); const RealType approximateDistance = inputPoint.EuclideanDistanceTo(outputPoint); diff --git a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest5.cxx b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest5.cxx index 519f2e73d7d..3c114d0ab9d 100644 --- a/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest5.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBSplineScatteredDataPointSetToImageFilterTest5.cxx @@ -166,7 +166,7 @@ itkBSplineScatteredDataPointSetToImageFilterTest5(int argc, char * argv[]) ITK_TRY_EXPECT_NO_EXCEPTION(filter->Update()); const std::string outputFilename = argv[1]; - auto phiLatticeImage = filter->GetPhiLattice(); + auto phiLatticeImage = filter->GetPhiLattice(); ITK_TRY_EXPECT_NO_EXCEPTION(makeTestableScalarImage(phiLatticeImage, outputFilename)); return EXIT_SUCCESS; diff --git a/Modules/Filtering/ImageGrid/test/itkBasicArchitectureTest.cxx b/Modules/Filtering/ImageGrid/test/itkBasicArchitectureTest.cxx index 80c32ae8aa3..06452f0cb88 100644 --- a/Modules/Filtering/ImageGrid/test/itkBasicArchitectureTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBasicArchitectureTest.cxx @@ -137,7 +137,7 @@ itkBasicArchitectureTest(int, char *[]) shrink->SetShrinkFactors(2); // Create a command to call ShowProgress when progress event is triggered - ShowProgressObject progressWatch(shrink); + ShowProgressObject progressWatch(shrink); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); @@ -145,7 +145,7 @@ itkBasicArchitectureTest(int, char *[]) ITK_TEST_EXPECT_TRUE(shrink->HasObserver(itk::ProgressEvent())); // Create a command to call StartEndEvent when start event is triggered - StartEndEvent startEndWatch; + StartEndEvent startEndWatch; const itk::SimpleMemberCommand::Pointer start = itk::SimpleMemberCommand::New(); start->SetCallbackFunction(&startEndWatch, &StartEndEvent::Start); shrink->AddObserver(itk::StartEvent(), start); @@ -158,7 +158,7 @@ itkBasicArchitectureTest(int, char *[]) ITK_TEST_EXPECT_TRUE(shrink->HasObserver(itk::EndEvent())); // Create a command that to call AnyEvent when event is fired - AllEvents allWatch; + AllEvents allWatch; const itk::MemberCommand::Pointer allEvents = itk::MemberCommand::New(); allEvents->SetCallbackFunction(&allWatch, &AllEvents::WatchEvents); const unsigned long anyEventObserverTag = shrink->AddObserver(itk::AnyEvent(), allEvents); diff --git a/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest1.cxx b/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest1.cxx index 9068c52e142..782a37e3766 100644 --- a/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest1.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest1.cxx @@ -32,8 +32,8 @@ itkBinShrinkImageFilterTest1(int, char *[]) auto sourceImage = InputImageType::New(); // fill in an image - InputImageType::IndexType index = { { 100, 100 } }; - InputImageType::SizeType size = { { 12, 20 } }; + InputImageType::IndexType index = { { 100, 100 } }; + InputImageType::SizeType size = { { 12, 20 } }; InputImageType::RegionType region{ index, size }; sourceImage->SetRegions(region); sourceImage->Allocate(); diff --git a/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest2.cxx b/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest2.cxx index d350a58ac5d..9fff155b277 100644 --- a/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest2.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest2.cxx @@ -82,7 +82,7 @@ itkBinShrinkImageFilterTest2(int, char *[]) source->SetOrigin(origin); unsigned int factors[] = { 1, 1 }; - bool pass = true; + bool pass = true; for (unsigned int xf = 1; xf < 5; ++xf) { diff --git a/Modules/Filtering/ImageGrid/test/itkChangeInformationImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkChangeInformationImageFilterTest.cxx index a147dffc227..2bdf019af98 100644 --- a/Modules/Filtering/ImageGrid/test/itkChangeInformationImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkChangeInformationImageFilterTest.cxx @@ -115,8 +115,8 @@ itkChangeInformationImageFilterTest(int, char *[]) auto referenceImage = ImageType::New(); auto filter = FilterType::New(); - itk::SpacePrecisionType spacing[ImageDimension] = { 1, 2, 3 }; - itk::SpacePrecisionType origin[ImageDimension] = { -100, -200, -300 }; + itk::SpacePrecisionType spacing[ImageDimension] = { 1, 2, 3 }; + itk::SpacePrecisionType origin[ImageDimension] = { -100, -200, -300 }; ImageType::DirectionType direction; direction[0][0] = 1.0; direction[1][0] = 0.0; @@ -160,7 +160,7 @@ itkChangeInformationImageFilterTest(int, char *[]) inputImage->SetOrigin(origin); constexpr itk::SpacePrecisionType newOrigin[ImageDimension] = { 1000.0, 2000.0, 3000.0 }; - itk::SpacePrecisionType newSpacing[ImageDimension] = { 10.0, 20.0, 30.0 }; + itk::SpacePrecisionType newSpacing[ImageDimension] = { 10.0, 20.0, 30.0 }; ImageType::OffsetValueType newOffset[ImageDimension] = { 10, 20, 30 }; diff --git a/Modules/Filtering/ImageGrid/test/itkConstantPadImageTest.cxx b/Modules/Filtering/ImageGrid/test/itkConstantPadImageTest.cxx index 104b07d9b93..458d36f14cf 100644 --- a/Modules/Filtering/ImageGrid/test/itkConstantPadImageTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkConstantPadImageTest.cxx @@ -33,8 +33,8 @@ itkConstantPadImageTest(int, char *[]) auto image = ShortImage::New(); // fill in an image - ShortImage::IndexType index = { { 0, 0 } }; - ShortImage::SizeType size = { { 8, 12 } }; + ShortImage::IndexType index = { { 0, 0 } }; + ShortImage::SizeType size = { { 8, 12 } }; ShortImage::RegionType region; region.SetSize(size); region.SetIndex(index); @@ -51,7 +51,7 @@ itkConstantPadImageTest(int, char *[]) // Create a filter using PadFilterType = itk::ConstantPadImageFilter; - auto constantPad = PadFilterType::New(); + auto constantPad = PadFilterType::New(); const itk::SimpleFilterWatcher watch(constantPad); constantPad->SetInput(image); diff --git a/Modules/Filtering/ImageGrid/test/itkCropImageFilter3DTest.cxx b/Modules/Filtering/ImageGrid/test/itkCropImageFilter3DTest.cxx index 9441209fd90..d56d20c5256 100644 --- a/Modules/Filtering/ImageGrid/test/itkCropImageFilter3DTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkCropImageFilter3DTest.cxx @@ -33,9 +33,9 @@ itkCropImageFilter3DTest(int, char *[]) // Declare the types of the images using ImageType = itk::Image; - ImageType::RegionType region; - constexpr unsigned int dimSize(8); - constexpr ImageType::RegionType::SizeType size = { { dimSize, dimSize, dimSize } }; + ImageType::RegionType region; + constexpr unsigned int dimSize(8); + constexpr ImageType::RegionType::SizeType size = { { dimSize, dimSize, dimSize } }; constexpr ImageType::RegionType::IndexType index = { { 0, 0, 0 } }; region.SetSize(size); region.SetIndex(index); @@ -84,8 +84,8 @@ itkCropImageFilter3DTest(int, char *[]) return EXIT_FAILURE; } } - ImageType::RegionType subRegion; - constexpr ImageType::RegionType::SizeType subSize = { { dimSize - 2, dimSize - 2, dimSize - 2 } }; + ImageType::RegionType subRegion; + constexpr ImageType::RegionType::SizeType subSize = { { dimSize - 2, dimSize - 2, dimSize - 2 } }; constexpr ImageType::RegionType::IndexType subIndex = { { 1, 1, 1 } }; subRegion.SetSize(subSize); subRegion.SetIndex(subIndex); diff --git a/Modules/Filtering/ImageGrid/test/itkCropImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkCropImageFilterTest.cxx index 9f067009493..009de202b46 100644 --- a/Modules/Filtering/ImageGrid/test/itkCropImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkCropImageFilterTest.cxx @@ -38,8 +38,8 @@ itkCropImageFilterTest(int, char *[]) // Fill in the image constexpr ImageType::IndexType index = { { 0, 0 } }; - constexpr ImageType::SizeType size = { { 8, 12 } }; - ImageType::RegionType region; + constexpr ImageType::SizeType size = { { 8, 12 } }; + ImageType::RegionType region; region.SetSize(size); region.SetIndex(index); diff --git a/Modules/Filtering/ImageGrid/test/itkCyclicReferences.cxx b/Modules/Filtering/ImageGrid/test/itkCyclicReferences.cxx index c994e999331..e4d76a03636 100644 --- a/Modules/Filtering/ImageGrid/test/itkCyclicReferences.cxx +++ b/Modules/Filtering/ImageGrid/test/itkCyclicReferences.cxx @@ -56,8 +56,8 @@ itkCyclicReferences(int, char *[]) // Test the deletion of an image with native type. // (scope operators cause automatic smart pointer destruction) { // image - const itk::Image::Pointer if2 = itk::Image::New(); - DeleteEvent deleteEvent; + const itk::Image::Pointer if2 = itk::Image::New(); + DeleteEvent deleteEvent; const itk::MemberCommand::Pointer deleteCommand = itk::MemberCommand::New(); deleteCommand->SetCallbackFunction(&deleteEvent, &DeleteEvent::Delete); if2->AddObserver(itk::DeleteEvent(), deleteCommand); @@ -76,7 +76,7 @@ itkCyclicReferences(int, char *[]) const itk::RandomImageSource::Pointer random = itk::RandomImageSource::New(); random->SetMin(0.0); random->SetMax(1.0); - DeleteEvent deleteRandom; + DeleteEvent deleteRandom; const itk::MemberCommand::Pointer deleteRandomCommand = itk::MemberCommand::New(); deleteRandomCommand->SetCallbackFunction(&deleteRandom, &DeleteEvent::Delete); random->AddObserver(itk::DeleteEvent(), deleteRandomCommand); @@ -90,7 +90,7 @@ itkCyclicReferences(int, char *[]) itk::ShrinkImageFilter::New(); shrink->SetInput(random->GetOutput()); shrink->SetShrinkFactors(2); - DeleteEvent deleteShrink; + DeleteEvent deleteShrink; const itk::MemberCommand::Pointer deleteShrinkCommand = itk::MemberCommand::New(); deleteShrinkCommand->SetCallbackFunction(&deleteShrink, &DeleteEvent::Delete); shrink->AddObserver(itk::DeleteEvent(), deleteShrinkCommand); diff --git a/Modules/Filtering/ImageGrid/test/itkCyclicShiftImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkCyclicShiftImageFilterTest.cxx index b12a5fc3138..15dc577ecaa 100644 --- a/Modules/Filtering/ImageGrid/test/itkCyclicShiftImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkCyclicShiftImageFilterTest.cxx @@ -75,15 +75,15 @@ itkCyclicShiftImageFilterTest(int argc, char * argv[]) shiftFilter->UpdateLargestPossibleRegion(); itk::ImageRegionConstIteratorWithIndex inputIter(reader->GetOutput(), reader->GetOutput()->GetLargestPossibleRegion()); - const ImageType::RegionType imageRegion = reader->GetOutput()->GetLargestPossibleRegion(); - ImageType::SizeType imageSize = imageRegion.GetSize(); - bool success = true; + const ImageType::RegionType imageRegion = reader->GetOutput()->GetLargestPossibleRegion(); + ImageType::SizeType imageSize = imageRegion.GetSize(); + bool success = true; const ImageType * shiftFilterOutput = shiftFilter->GetOutput(); for (; !inputIter.IsAtEnd(); ++inputIter) { - const ImageType::IndexType inputIndex = inputIter.GetIndex(); + const ImageType::IndexType inputIndex = inputIter.GetIndex(); CyclicShiftFilterType::IndexType outputIndex(inputIndex); for (unsigned int i = 0; i < Dimension; ++i) diff --git a/Modules/Filtering/ImageGrid/test/itkExpandImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkExpandImageFilterTest.cxx index 2df0b31ddea..1a812a038bb 100644 --- a/Modules/Filtering/ImageGrid/test/itkExpandImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkExpandImageFilterTest.cxx @@ -82,7 +82,7 @@ itkExpandImageFilterTest(int, char *[]) int testPassed = EXIT_SUCCESS; std::cout << "Create the input image pattern." << std::endl; - ImageType::RegionType region; + ImageType::RegionType region; constexpr ImageType::SizeType size = { { 64, 64 } }; region.SetSize(size); @@ -119,14 +119,14 @@ itkExpandImageFilterTest(int, char *[]) expander->SetExpandFactors(5); - unsigned int factors[ImageDimension] = { 2, 3 }; + unsigned int factors[ImageDimension] = { 2, 3 }; constexpr ImageType::PixelType padValue = 4.0; expander->SetInput(input); expander->SetExpandFactors(factors); // TEST_RMV20100728 expander->SetEdgePaddingValue( padValue ); - ShowProgressObject progressWatch(expander); + ShowProgressObject progressWatch(expander); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); @@ -139,7 +139,7 @@ itkExpandImageFilterTest(int, char *[]) Iterator outIter(expander->GetOutput(), expander->GetOutput()->GetBufferedRegion()); // compute non-padded output region - ImageType::RegionType validRegion = expander->GetOutput()->GetLargestPossibleRegion(); + ImageType::RegionType validRegion = expander->GetOutput()->GetLargestPossibleRegion(); const ImageType::SizeType validSize = validRegion.GetSize(); validRegion.SetSize(validSize); @@ -149,7 +149,7 @@ itkExpandImageFilterTest(int, char *[]) while (!outIter.IsAtEnd()) { const ImageType::IndexType index = outIter.GetIndex(); - const double value = outIter.Get(); + const double value = outIter.Get(); if (validRegion.IsInside(index)) { @@ -157,7 +157,7 @@ itkExpandImageFilterTest(int, char *[]) ImageType::PointType point; expanderOutput->TransformIndexToPhysicalPoint(outIter.GetIndex(), point); const ImageType::IndexType inputIndex = input->TransformPhysicalPointToIndex(point); - const double trueValue = pattern.Evaluate(inputIndex); + const double trueValue = pattern.Evaluate(inputIndex); constexpr double epsilon = 1e-4; if (itk::Math::abs(trueValue - value) > epsilon) diff --git a/Modules/Filtering/ImageGrid/test/itkExpandImageFilterTest2.cxx b/Modules/Filtering/ImageGrid/test/itkExpandImageFilterTest2.cxx index 93f05707b40..2e024463fc6 100644 --- a/Modules/Filtering/ImageGrid/test/itkExpandImageFilterTest2.cxx +++ b/Modules/Filtering/ImageGrid/test/itkExpandImageFilterTest2.cxx @@ -39,11 +39,11 @@ using VectorImage3D = itk::VectorImage; template typename TVectorImage::PixelType GetPattern(const typename TVectorImage::IndexType & index, - const typename TVectorImage::SizeType & size, - unsigned int nImages) + const typename TVectorImage::SizeType & size, + unsigned int nImages) { typename TVectorImage::PixelType ans(nImages); - const int d = TVectorImage::SizeType::Dimension; + const int d = TVectorImage::SizeType::Dimension; int volume = 1; for (int j = 0; j < d; ++j) @@ -51,7 +51,7 @@ GetPattern(const typename TVectorImage::IndexType & index, volume *= size[j]; } - int x = index[0] + 1; + int x = index[0] + 1; double coeff = size[0]; for (int j = 1; j < d; ++j) { @@ -79,8 +79,8 @@ template std::string PrintTestImage1D(const TVectorImage * img) { - std::string ans = ""; - const unsigned int nImages = img->GetVectorLength(); + std::string ans = ""; + const unsigned int nImages = img->GetVectorLength(); typename TVectorImage::SizeType size = img->GetLargestPossibleRegion().GetSize(); for (unsigned int i = 0; i < nImages; ++i) @@ -107,8 +107,8 @@ template std::string PrintTestImage3D(const TVectorImage * img) { - std::string ans = ""; - const unsigned int nImages = img->GetVectorLength(); + std::string ans = ""; + const unsigned int nImages = img->GetVectorLength(); typename TVectorImage::SizeType size = img->GetLargestPossibleRegion().GetSize(); for (unsigned int i = 0; i < nImages; ++i) @@ -146,10 +146,10 @@ PrintTestImage3D(const VectorImage3D *); /// template typename TVectorImage::Pointer -GetVectorTestImage(const typename TVectorImage::SizeType & size, +GetVectorTestImage(const typename TVectorImage::SizeType & size, const typename TVectorImage::VectorLengthType & nImages) { - auto ans = TVectorImage::New(); + auto ans = TVectorImage::New(); typename TVectorImage::RegionType region; region.SetSize(size); @@ -219,9 +219,9 @@ itkExpandImageFilterTest2(int, char *[]) ITK_TEST_EXPECT_EQUAL(s1, 10); - double slice1[10] = { 6, 6, 7, 7, 8, 8, 9, 9, 10, 10 }; - double sliceOut1[10] = {}; - bool b1 = true; + double slice1[10] = { 6, 6, 7, 7, 8, 8, 9, 9, 10, 10 }; + double sliceOut1[10] = {}; + bool b1 = true; VectorImage1D::IndexType idx1 = VectorImage1D::IndexType::Filled(0); for (int i = 0; i < 10; ++i) { @@ -241,7 +241,7 @@ itkExpandImageFilterTest2(int, char *[]) // Test 3D: a 3 x 3 4-channel image. Like above, incremental pixel values along each channel, dim 0, dim 1, dim 2. // Channel 1 values are 1-27, Channel 2 is 28-54, etc. Expanding by 2 along dim 1. constexpr VectorImage3D::SizeType size3D = { { 3, 3, 3 } }; - const VectorImage3D::Pointer input3D = GetVectorTestImage(size3D, 4); + const VectorImage3D::Pointer input3D = GetVectorTestImage(size3D, 4); std::cout << "Output input3D:" << std::endl; std::cout << PrintTestImage3D(input3D) << std::endl; @@ -264,9 +264,9 @@ itkExpandImageFilterTest2(int, char *[]) std::cout << PrintTestImage3D(output3D) << std::endl; VectorImage3D::SizeType s2 = output3D->GetLargestPossibleRegion().GetSize(); - double d3[3] = { 3, 6, 3 }; - double d4[3] = {}; - bool b2 = true; + double d3[3] = { 3, 6, 3 }; + double d4[3] = {}; + bool b2 = true; for (int i = 0; i < 3; ++i) { d4[i] = s2[i]; @@ -281,8 +281,8 @@ itkExpandImageFilterTest2(int, char *[]) statusValue = EXIT_FAILURE; } - double slice3[6] = { 38, 38, 41, 41, 44, 44 }; - double slice3Out[6] = {}; + double slice3[6] = { 38, 38, 41, 41, 44, 44 }; + double slice3Out[6] = {}; VectorImage3D::IndexType idx2; idx2[0] = 1; idx2[2] = 1; diff --git a/Modules/Filtering/ImageGrid/test/itkFlipImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkFlipImageFilterTest.cxx index 8e330fe41d1..02ac3ffd04f 100644 --- a/Modules/Filtering/ImageGrid/test/itkFlipImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkFlipImageFilterTest.cxx @@ -42,8 +42,8 @@ itkFlipImageFilterTest(int argc, char * argv[]) // Define a small input image constexpr ImageType::IndexType index = { { 10, 20, 30 } }; - constexpr ImageType::SizeType size = { { 5, 4, 3 } }; - const ImageType::RegionType region{ index, size }; + constexpr ImageType::SizeType size = { { 5, 4, 3 } }; + const ImageType::RegionType region{ index, size }; ImageType::SpacingType spacing; spacing[0] = 1.1; @@ -81,7 +81,7 @@ itkFlipImageFilterTest(int argc, char * argv[]) const itk::SimpleFilterWatcher watcher(flipper, "FlipImageFilter"); - bool bArray[ImageDimension] = { true, false, true }; + bool bArray[ImageDimension] = { true, false, true }; FlipperType::FlipAxesArrayType flipAxes(bArray); flipper->SetFlipAxes(flipAxes); @@ -98,9 +98,9 @@ itkFlipImageFilterTest(int argc, char * argv[]) const ImageType::Pointer outputImage = flipper->GetOutput(); const ImageType::SpacingType & inputSpacing = inputImage->GetSpacing(); - const ImageType::PointType & inputOrigin = inputImage->GetOrigin(); + const ImageType::PointType & inputOrigin = inputImage->GetOrigin(); const ImageType::SpacingType & outputSpacing = outputImage->GetSpacing(); - const ImageType::PointType & outputOrigin = outputImage->GetOrigin(); + const ImageType::PointType & outputOrigin = outputImage->GetOrigin(); using IndexType = ImageType::IndexType; using IndexValueType = IndexType::IndexValueType; diff --git a/Modules/Filtering/ImageGrid/test/itkInterpolateImagePointsFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkInterpolateImagePointsFilterTest.cxx index c3a2d9410a1..49279e60548 100644 --- a/Modules/Filtering/ImageGrid/test/itkInterpolateImagePointsFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkInterpolateImagePointsFilterTest.cxx @@ -100,7 +100,7 @@ test2DInterpolateImagePointsFilter() image->SetSpacing(spacing); // Initialize the sample data - constexpr int NPOINTS2 = 4; // number of points + constexpr int NPOINTS2 = 4; // number of points constexpr double DEFAULTPIXELVALUE = 1.23; // Arbitrary value to test setting constexpr double xcoord[NPOINTS2] = { 0.1, 3.4, 4.0, 2.0 }; @@ -112,7 +112,7 @@ test2DInterpolateImagePointsFilter() const CoordImageType2DPointer index2 = CoordImageType2D::New(); constexpr CoordImage2DSizeType size = { { 2, 2 } }; - CoordImageType2D::RegionType region; + CoordImageType2D::RegionType region; region.SetSize(size); // x coordinates @@ -162,9 +162,9 @@ test2DInterpolateImagePointsFilter() // Get results and compare for accuracy const ImageType2DPointer outputImage = resamp->GetOutput(); - InputIterator outIter(outputImage, region); - int i = 0; - constexpr double epsilon = 1e-9; + InputIterator outIter(outputImage, region); + int i = 0; + constexpr double epsilon = 1e-9; while (!outIter.IsAtEnd()) { const double value = outIter.Get(); @@ -208,8 +208,8 @@ test3DInterpolateImagePointsFilter() resamp->SetInputImage(image); // Generate coordinates at original index locations - SizeType3D size = image->GetLargestPossibleRegion().GetSize(); - CoordImageType3DPointer coord[ImageDimension3D]; // = CoordImageType2D::New(); + SizeType3D size = image->GetLargestPossibleRegion().GetSize(); + CoordImageType3DPointer coord[ImageDimension3D]; // = CoordImageType2D::New(); CoordImageType3D::RegionType region; region.SetSize(size); for (auto & i : coord) @@ -251,9 +251,9 @@ test3DInterpolateImagePointsFilter() // First set up iterators using InputIterator = itk::ImageRegionIterator; using OutputIterator = itk::ImageRegionIterator; - InputIterator inIter(image, region); + InputIterator inIter(image, region); OutputIterator outIter(outputImage, region); - double rmse = 0.0; + double rmse = 0.0; while (!outIter.IsAtEnd()) { const double temp = inIter.Get() - outIter.Get(); @@ -312,7 +312,7 @@ void set2DInterpolateImagePointsFilterData(ImageType2D::Pointer imgPtr) { constexpr ImageType2DSizeType size = { { 7, 7 } }; - constexpr double mydata[49] = { + constexpr double mydata[49] = { 154.5000, 82.4000, 30.9000, 0, -10.3000, 0, 30.9000, 117.0000, 62.4000, 23.4000, 0, -7.8000, 0, 23.4000, 18.0000, 9.6000, 3.6000, 0, -1.2000, 0, 3.6000, -120.0000, -64.0000, -24.0000, 0, 8.0000, 0, -24.0000, -274.5000, -146.4000, -54.9000, 0, 18.3000, 0, -54.9000, -423.0000, -225.6000, -84.6000, 0, 28.2000, 0, -84.6000, @@ -347,9 +347,9 @@ set3DData() using GaussianSourceType = itk::GaussianImageSource; auto pSource = GaussianSourceType::New(); - ImageType3D::SpacingValueType spacing[] = { 1.2f, 1.3f, 1.4f }; + ImageType3D::SpacingValueType spacing[] = { 1.2f, 1.3f, 1.4f }; constexpr ImageType3D::PointValueType origin[] = { 1.0f, 4.0f, 2.0f }; - ImageType3D::SizeValueType size[] = { 65, 75, 60 }; + ImageType3D::SizeValueType size[] = { 65, 75, 60 }; GaussianSourceType::ArrayType mean; mean[0] = size[0] / 2.0f + origin[0]; diff --git a/Modules/Filtering/ImageGrid/test/itkMirrorPadImageTest.cxx b/Modules/Filtering/ImageGrid/test/itkMirrorPadImageTest.cxx index 8147ff68c16..48b0b22d926 100644 --- a/Modules/Filtering/ImageGrid/test/itkMirrorPadImageTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkMirrorPadImageTest.cxx @@ -94,8 +94,8 @@ itkMirrorPadImageTest(int, char *[]) auto if2 = ShortImage::New(); // fill in an image - ShortImage::IndexType index = { { 0, 0 } }; - ShortImage::SizeType size = { { 8, 12 } }; + ShortImage::IndexType index = { { 0, 0 } }; + ShortImage::SizeType size = { { 8, 12 } }; ShortImage::RegionType region; region.SetSize(size); region.SetIndex(index); diff --git a/Modules/Filtering/ImageGrid/test/itkOrientImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkOrientImageFilterTest.cxx index 233ebe0e32e..9bc258b6ecb 100644 --- a/Modules/Filtering/ImageGrid/test/itkOrientImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkOrientImageFilterTest.cxx @@ -26,10 +26,10 @@ using ImageType = itk::Image; ImageType::Pointer CreateRandomImage() { - constexpr ImageType::SizeType imageSize = { { 4, 4, 4 } }; + constexpr ImageType::SizeType imageSize = { { 4, 4, 4 } }; constexpr ImageType::IndexType imageIndex = { { 0, 0, 0 } }; - const ImageType::RegionType region{ imageIndex, imageSize }; - auto img = ImageType::New(); + const ImageType::RegionType region{ imageIndex, imageSize }; + auto img = ImageType::New(); img->SetRegions(region); img->Allocate(); itk::ImageRegionIterator ri(img, region); diff --git a/Modules/Filtering/ImageGrid/test/itkOrientImageFilterTest2.cxx b/Modules/Filtering/ImageGrid/test/itkOrientImageFilterTest2.cxx index 4516be8bbad..6fe13d3ceb6 100644 --- a/Modules/Filtering/ImageGrid/test/itkOrientImageFilterTest2.cxx +++ b/Modules/Filtering/ImageGrid/test/itkOrientImageFilterTest2.cxx @@ -51,9 +51,9 @@ ImageType::Pointer CreateAxialImage() { constexpr ImageType::SizeType imageSize = { { 4, 4, 4 } }; - ImageType::IndexType imageIndex = { { 0, 0, 0 } }; - const ImageType::RegionType region{ imageIndex, imageSize }; - auto img = ImageType::New(); + ImageType::IndexType imageIndex = { { 0, 0, 0 } }; + const ImageType::RegionType region{ imageIndex, imageSize }; + auto img = ImageType::New(); img->SetRegions(region); img->Allocate(); @@ -103,9 +103,9 @@ ImageType::Pointer CreateCoronalImage() { constexpr ImageType::SizeType imageSize = { { 4, 4, 4 } }; - ImageType::IndexType imageIndex = { { 0, 0, 0 } }; - const ImageType::RegionType region{ imageIndex, imageSize }; - auto img = ImageType::New(); + ImageType::IndexType imageIndex = { { 0, 0, 0 } }; + const ImageType::RegionType region{ imageIndex, imageSize }; + auto img = ImageType::New(); img->SetRegions(region); img->Allocate(); diff --git a/Modules/Filtering/ImageGrid/test/itkPadImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkPadImageFilterTest.cxx index dd73afef1b7..e8808d87268 100644 --- a/Modules/Filtering/ImageGrid/test/itkPadImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkPadImageFilterTest.cxx @@ -29,10 +29,10 @@ itkPadImageFilterTest(int, char *[]) using FilterType = itk::PadImageFilter; auto padFilter = FilterType::New(); - SizeType lowerBound = { { 1, 2 } }; + SizeType lowerBound = { { 1, 2 } }; constexpr SizeType upperBound = { { 3, 4 } }; - SizeValueType lowerBoundArray[2] = { 1, 2 }; - SizeValueType upperBoundArray[2] = { 3, 4 }; + SizeValueType lowerBoundArray[2] = { 1, 2 }; + SizeValueType upperBoundArray[2] = { 3, 4 }; padFilter->SetPadLowerBound(lowerBound); if (padFilter->GetPadLowerBound() != lowerBound) @@ -98,9 +98,9 @@ itkPadImageFilterTest(int, char *[]) } // Fill in a test image - auto inputImage = ShortImage::New(); + auto inputImage = ShortImage::New(); constexpr ShortImage::SizeType inputSize = { { 1, 1 } }; - const ShortImage::RegionType inputRegion(inputSize); + const ShortImage::RegionType inputRegion(inputSize); inputImage->SetRegions(inputRegion); inputImage->Allocate(); inputImage->FillBuffer(1); diff --git a/Modules/Filtering/ImageGrid/test/itkPasteImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkPasteImageFilterTest.cxx index 761d7641fd5..b40818ffbe1 100644 --- a/Modules/Filtering/ImageGrid/test/itkPasteImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkPasteImageFilterTest.cxx @@ -64,8 +64,8 @@ itkPasteImageFilterTest(int argc, char * argv[]) filter->SetDestinationIndex(destIndex); ITK_TEST_SET_GET_VALUE(destIndex, filter->GetDestinationIndex()); - FilterType::InputImageIndexType srcIndex; - FilterType::InputImageSizeType srcSize; + FilterType::InputImageIndexType srcIndex; + FilterType::InputImageSizeType srcSize; FilterType::InputImageRegionType srcRegion; srcIndex[0] = 20; diff --git a/Modules/Filtering/ImageGrid/test/itkPermuteAxesImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkPermuteAxesImageFilterTest.cxx index d326d8a4114..33036ebfa0c 100644 --- a/Modules/Filtering/ImageGrid/test/itkPermuteAxesImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkPermuteAxesImageFilterTest.cxx @@ -52,8 +52,8 @@ itkPermuteAxesImageFilterTest(int, char *[]) // define a small input test constexpr ImageType::IndexType index = { { 10, 20, 30, 40 } }; - constexpr ImageType::SizeType size = { { 5, 4, 3, 2 } }; - const ImageType::RegionType region{ index, size }; + constexpr ImageType::SizeType size = { { 5, 4, 3, 2 } }; + const ImageType::RegionType region{ index, size }; double spacing[ImageDimension] = { 1.1, 1.2, 1.3, 1.4 }; double origin[ImageDimension] = { 0.5, 0.4, 0.3, 0.2 }; @@ -86,7 +86,7 @@ itkPermuteAxesImageFilterTest(int, char *[]) permuter->SetInput(inputImage); - ShowProgressObject progressWatch(permuter); + ShowProgressObject progressWatch(permuter); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); diff --git a/Modules/Filtering/ImageGrid/test/itkPushPopTileImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkPushPopTileImageFilterTest.cxx index 7860e54972d..9b848454061 100644 --- a/Modules/Filtering/ImageGrid/test/itkPushPopTileImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkPushPopTileImageFilterTest.cxx @@ -59,7 +59,7 @@ itkPushPopTileImageFilterTest(int argc, char * argv[]) auto tiler4 = TilerType::New(); auto tiler = TilerType::New(); - unsigned char yellow[3] = { 255, 255, 127 }; + unsigned char yellow[3] = { 255, 255, 127 }; const itk::RGBPixel fillPixel = yellow; tiler1->SetDefaultPixelValue(fillPixel); diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageFilterGTest.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageFilterGTest.cxx index 68c42f12698..15c1a85fe61 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageFilterGTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageFilterGTest.cxx @@ -41,7 +41,7 @@ GetFirstPixelFromFilterOutput(const TPixel inputPixel) { using ImageType = itk::Image; - const auto image = ImageType::New(); + const auto image = ImageType::New(); const typename ImageType::SizeType imageSize = { { 1, 1 } }; image->SetRegions(imageSize); image->Allocate(); @@ -65,7 +65,7 @@ TestThrowErrorOnEmptyResampleSpace(const TPixel inputPixel, const bool setUseRef { using ImageType = itk::Image; - const auto image = ImageType::New(); + const auto image = ImageType::New(); const typename ImageType::SizeType imageSize = { { 1, 1 } }; image->SetRegions(imageSize); image->Allocate(); diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest.cxx index ab210189bee..dfe04ce3954 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest.cxx @@ -43,17 +43,17 @@ itkResampleImageTest(int, char *[]) // Create and configure an image - const ImagePointerType image = ImageType::New(); - ImageIndexType index = { { 0, 0 } }; + const ImagePointerType image = ImageType::New(); + ImageIndexType index = { { 0, 0 } }; constexpr ImageSizeType size = { { 18, 12 } }; - const ImageRegionType region{ index, size }; + const ImageRegionType region{ index, size }; image->SetLargestPossibleRegion(region); image->SetBufferedRegion(region); image->Allocate(); // Fill image with a ramp itk::ImageRegionIteratorWithIndex iter(image, region); - PixelType value; + PixelType value; for (iter.GoToBegin(); !iter.IsAtEnd(); ++iter) { index = iter.GetIndex(); @@ -95,16 +95,16 @@ itkResampleImageTest(int, char *[]) resample->Update(); // Check if desired results were obtained - bool passed = true; - const ImageType::RegionType region2 = resample->GetOutput()->GetRequestedRegion(); + bool passed = true; + const ImageType::RegionType region2 = resample->GetOutput()->GetRequestedRegion(); itk::ImageRegionIteratorWithIndex iter2(resample->GetOutput(), region2); - constexpr double tolerance = 1e-30; + constexpr double tolerance = 1e-30; for (iter2.GoToBegin(); !iter2.IsAtEnd(); ++iter2) { index = iter2.GetIndex(); value = iter2.Get(); const PixelType pixval = value; - auto expectedValue = static_cast((index[0] + index[1]) / 2.0); + auto expectedValue = static_cast((index[0] + index[1]) / 2.0); if (!itk::Math::FloatAlmostEqual(expectedValue, pixval, 10, tolerance)) { std::cout << "Error in resampled image: Pixel " << index << "value = " << value << " " diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest2.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest2.cxx index b7d56a09002..6c5e0c6d606 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest2.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest2.cxx @@ -165,7 +165,7 @@ itkResampleImageTest2(int argc, char * argv[]) outputSpacing[i] = outputSpacingValue; } - const typename ImageType::SizeType & inputSize = resample->GetInput()->GetLargestPossibleRegion().GetSize(); + const typename ImageType::SizeType & inputSize = resample->GetInput()->GetLargestPossibleRegion().GetSize(); const typename ImageType::SpacingType & inputSpacing = resample->GetInput()->GetSpacing(); typename ImageType::SizeType outputSize; diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest3.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest3.cxx index 237b10e9978..476dfbd28f1 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest3.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest3.cxx @@ -74,7 +74,7 @@ itkResampleImageTest3(int argc, char * argv[]) direction[1][0] = 0.0; direction[1][1] = -1.0; const ImageType::RegionType inputRegion = reader1->GetOutput()->GetLargestPossibleRegion(); - ImageType::PointType origin; + ImageType::PointType origin; origin[0] = inputRegion.GetSize()[0]; origin[1] = inputRegion.GetSize()[1]; diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest4.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest4.cxx index 90ed88e8480..5b89b19d156 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest4.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest4.cxx @@ -52,13 +52,13 @@ itkResampleImageTest4(int argc, char * argv[]) // Create and configure an image const ImagePointerType image = ImageType::New(); - ImageIndexType index = { { 0, 0 } }; - ImageSizeType size = { { 64, 64 } }; - const ImageRegionType region{ index, size }; + ImageIndexType index = { { 0, 0 } }; + ImageSizeType size = { { 64, 64 } }; + const ImageRegionType region{ index, size }; image->SetRegions(region); image->Allocate(); - auto newDims = static_cast(64 * scaling); + auto newDims = static_cast(64 * scaling); ImageSizeType osize = { { newDims, newDims } }; ImageType::SpacingType spacing; diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest5.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest5.cxx index 6acf0abab5f..390beeaf0e3 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest5.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest5.cxx @@ -57,14 +57,14 @@ itkResampleImageTest5(int argc, char * argv[]) // Create and configure an image const ImagePointerType image = ImageType::New(); - ImageIndexType index = { { 0, 0 } }; - ImageSizeType size = { { 64, 64 } }; - const ImageRegionType region{ index, size }; + ImageIndexType index = { { 0, 0 } }; + ImageSizeType size = { { 64, 64 } }; + const ImageRegionType region{ index, size }; image->SetLargestPossibleRegion(region); image->SetBufferedRegion(region); image->Allocate(); - auto newDims = static_cast(64 * scaling); + auto newDims = static_cast(64 * scaling); ImageSizeType osize = { { newDims, newDims } }; ImageType::SpacingType spacing; diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest6.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest6.cxx index 314f3a54444..0cb08cb8472 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest6.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest6.cxx @@ -60,15 +60,15 @@ itkResampleImageTest6(int argc, char * argv[]) // Create and configure an image const ImagePointerType image = ImageType::New(); - ImageIndexType index = { { 0, 0 } }; - ImageSizeType size = { { 64, 64 } }; - const ImageRegionType region{ index, size }; + ImageIndexType index = { { 0, 0 } }; + ImageSizeType size = { { 64, 64 } }; + const ImageRegionType region{ index, size }; image->SetLargestPossibleRegion(region); image->SetBufferedRegion(region); image->SetVectorLength(3); image->Allocate(); - auto newDims = static_cast(64 * scaling); + auto newDims = static_cast(64 * scaling); ImageSizeType osize = { { newDims, newDims } }; ImageType::SpacingType spacing; @@ -78,7 +78,7 @@ itkResampleImageTest6(int argc, char * argv[]) // Fill image with a ramp std::cout << "init image..." << std::flush; itk::ImageRegionIteratorWithIndex iter(image, region); - PixelType value; + PixelType value; value.SetSize(3); for (iter.GoToBegin(); !iter.IsAtEnd(); ++iter) diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest7.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest7.cxx index f134d64d2dd..9d331ab31f4 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest7.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest7.cxx @@ -48,10 +48,10 @@ itkResampleImageTest7(int, char *[]) using InterpolatorType = itk::LinearInterpolateImageFunction; // Create and configure an image - const ImagePointerType image = ImageType::New(); - ImageIndexType index = { { 0, 0 } }; + const ImagePointerType image = ImageType::New(); + ImageIndexType index = { { 0, 0 } }; constexpr ImageSizeType size = { { 64, 64 } }; - const ImageRegionType region{ index, size }; + const ImageRegionType region{ index, size }; image->SetRegions(region); image->Allocate(); diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest8.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest8.cxx index 1a3da25c0c7..73a2b6c391f 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest8.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest8.cxx @@ -75,7 +75,7 @@ class ProjectTransform : public itk::Transform } OutputVectorPixelType TransformVector(const InputVectorPixelType & itkNotUsed(inputPixel), - const InputPointType & itkNotUsed(inputPoint)) const override + const InputPointType & itkNotUsed(inputPoint)) const override { return OutputVectorPixelType(); } @@ -141,17 +141,17 @@ itkResampleImageTest8(int, char *[]) std::cout << "Input Image Type\n"; // Create and configure an image - const InputImagePointerType inputImage = InputImageType::New(); - InputImageIndexType inputIndex = { { 0, 0 } }; + const InputImagePointerType inputImage = InputImageType::New(); + InputImageIndexType inputIndex = { { 0, 0 } }; constexpr InputImageSizeType inputSize = { { 18, 12 } }; - const InputImageRegionType inputRegion{ inputIndex, inputSize }; + const InputImageRegionType inputRegion{ inputIndex, inputSize }; inputImage->SetLargestPossibleRegion(inputRegion); inputImage->SetBufferedRegion(inputRegion); inputImage->Allocate(); // Fill input image with a ramp itk::ImageRegionIteratorWithIndex iter(inputImage, inputRegion); - PixelType value; + PixelType value; for (iter.GoToBegin(); !iter.IsAtEnd(); ++iter) { inputIndex = iter.GetIndex(); @@ -163,7 +163,7 @@ itkResampleImageTest8(int, char *[]) auto tform = TransformType::New(); // OutputImagePointerType outputImage = OutputImageType::New(); - OutputImageIndexType outputIndex = { { 0, 0, 0 } }; + OutputImageIndexType outputIndex = { { 0, 0, 0 } }; constexpr OutputImageSizeType outputSize = { { 18, 12, 5 } }; // Create a linear interpolation image function @@ -197,16 +197,16 @@ itkResampleImageTest8(int, char *[]) resample->Update(); // Check if desired results were obtained - bool passed = true; - const OutputImageType::RegionType region2 = resample->GetOutput()->GetRequestedRegion(); + bool passed = true; + const OutputImageType::RegionType region2 = resample->GetOutput()->GetRequestedRegion(); itk::ImageRegionIteratorWithIndex iter2(resample->GetOutput(), region2); - constexpr double tolerance = 1e-30; + constexpr double tolerance = 1e-30; for (iter2.GoToBegin(); !iter2.IsAtEnd(); ++iter2) { outputIndex = iter2.GetIndex(); value = iter2.Get(); const PixelType pixval = value; - auto expectedValue = static_cast((outputIndex[0] + outputIndex[1]) / 2.0); + auto expectedValue = static_cast((outputIndex[0] + outputIndex[1]) / 2.0); if (!itk::Math::FloatAlmostEqual(expectedValue, pixval, 10, tolerance)) { std::cout << "Error in resampled image: Pixel " << outputIndex << "value = " << value << " " diff --git a/Modules/Filtering/ImageGrid/test/itkResamplePhasedArray3DSpecialCoordinatesImageTest.cxx b/Modules/Filtering/ImageGrid/test/itkResamplePhasedArray3DSpecialCoordinatesImageTest.cxx index 427283f8946..29d4340614e 100644 --- a/Modules/Filtering/ImageGrid/test/itkResamplePhasedArray3DSpecialCoordinatesImageTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResamplePhasedArray3DSpecialCoordinatesImageTest.cxx @@ -45,9 +45,9 @@ itkResamplePhasedArray3DSpecialCoordinatesImageTest(int, char *[]) { // Create and configure an image const InputImagePointerType image = InputImageType::New(); - ImageIndexType index = { { 0, 0, 0 } }; - ImageSizeType size = { { 13, 13, 9 } }; - const ImageRegionType region{ index, size }; + ImageIndexType index = { { 0, 0, 0 } }; + ImageSizeType size = { { 13, 13, 9 } }; + const ImageRegionType region{ index, size }; image->SetLargestPossibleRegion(region); image->SetBufferedRegion(region); image->SetAzimuthAngularSeparation(5.0 * 2.0 * itk::Math::pi / 360.0); @@ -59,7 +59,7 @@ itkResamplePhasedArray3DSpecialCoordinatesImageTest(int, char *[]) // Fill image with isoshells std::cout << "\nOriginal 3D Phased Array Data" << std::endl; itk::ImageRegionIteratorWithIndex iter(image, region); - PixelType value; + PixelType value; for (; !iter.IsAtEnd(); ++iter) { index = iter.GetIndex(); diff --git a/Modules/Filtering/ImageGrid/test/itkShrinkImageStreamingTest.cxx b/Modules/Filtering/ImageGrid/test/itkShrinkImageStreamingTest.cxx index 660a8f55965..21d69a9afd0 100644 --- a/Modules/Filtering/ImageGrid/test/itkShrinkImageStreamingTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkShrinkImageStreamingTest.cxx @@ -37,8 +37,8 @@ itkShrinkImageStreamingTest(int, char *[]) // fill in an image constexpr ShortImage::IndexType index = { { 100, 100 } }; - constexpr ShortImage::SizeType size = { { 8, 12 } }; - const ShortImage::RegionType region{ index, size }; + constexpr ShortImage::SizeType size = { { 8, 12 } }; + const ShortImage::RegionType region{ index, size }; sourceImage->SetRegions(region); sourceImage->Allocate(); diff --git a/Modules/Filtering/ImageGrid/test/itkShrinkImageTest.cxx b/Modules/Filtering/ImageGrid/test/itkShrinkImageTest.cxx index 33817b041fb..6ca6a87693b 100644 --- a/Modules/Filtering/ImageGrid/test/itkShrinkImageTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkShrinkImageTest.cxx @@ -45,8 +45,8 @@ itkShrinkImageTest(int, char *[]) // fill in an image constexpr ShortImage::IndexType index = { { 0, 0 } }; - constexpr ShortImage::SizeType size = { { 8, 12 } }; - const ShortImage::RegionType region{ index, size }; + constexpr ShortImage::SizeType size = { { 8, 12 } }; + const ShortImage::RegionType region{ index, size }; if2->SetLargestPossibleRegion(region); if2->SetBufferedRegion(region); if2->Allocate(); @@ -136,7 +136,7 @@ itkShrinkImageTest(int, char *[]) // ask for an invalid requested region to force an exception std::cout << "Assign an invalid requested region which should throw an exception." << std::endl; std::cout << std::flush; - itk::Index<2> foo; + itk::Index<2> foo; itk::ImageRegion<2>::IndexValueType fooindex[] = { 100, 100 }; foo.SetIndex(fooindex); itk::ImageRegion<2> fooregion; diff --git a/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx index 7572af4b38f..e02ed3a2727 100644 --- a/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx @@ -102,7 +102,7 @@ itkSliceBySliceImageFilterTest(int argc, char * argv[]) writer->SetInput(filter->GetOutput()); writer->SetFileName(argv[2]); - unsigned int slicingDimension; + unsigned int slicingDimension; std::istringstream istrm(argv[3]); istrm >> slicingDimension; filter->SetDimension(slicingDimension); @@ -173,7 +173,7 @@ itkSliceBySliceImageFilterTest(int argc, char * argv[]) } ImageType::SpacingType spacing; - ImageType::PointType origin; + ImageType::PointType origin; for (unsigned int i = 0; i < ImageType::ImageDimension; ++i) { spacing[i] = i + 0.1; @@ -186,7 +186,7 @@ itkSliceBySliceImageFilterTest(int argc, char * argv[]) filter->Update(); FilterType::InternalInputImageType::SpacingType expectedInternalSpacing; - FilterType::InternalInputImageType::PointType expectedInternalOrigin; + FilterType::InternalInputImageType::PointType expectedInternalOrigin; for (unsigned int i = 0, internal_i = 0; internal_i < FilterType::InternalImageDimension; ++i, ++internal_i) { if (i == slicingDimension) diff --git a/Modules/Filtering/ImageGrid/test/itkSliceImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkSliceImageFilterTest.cxx index 3005f8dd76c..328d7ee8cf1 100644 --- a/Modules/Filtering/ImageGrid/test/itkSliceImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkSliceImageFilterTest.cxx @@ -63,10 +63,10 @@ CheckValueIsPhysicalPoint(const TImageType * img) template typename TImageType::Pointer -RunFilter(const TImageType * img, +RunFilter(const TImageType * img, typename TImageType::IndexType start, typename TImageType::IndexType stop, - int step[TImageType::ImageDimension]) + int step[TImageType::ImageDimension]) { using FilterType = itk::SliceImageFilter; auto sliceFilter = FilterType::New(); @@ -101,7 +101,7 @@ TEST(SliceImageFilterTests, PhysicalPoint1) source->SetOrigin(origin); - int step[ImageDimension]; + int step[ImageDimension]; ImageType::IndexType start; ImageType::IndexType stop; stop[0] = size[0]; @@ -141,7 +141,7 @@ TEST(SliceImageFilterTests, PhysicalPoint2) source->SetOrigin(origin); - int step[ImageDimension] = { 3, 4 }; + int step[ImageDimension] = { 3, 4 }; ImageType::IndexType start; ImageType::IndexType stop; @@ -182,7 +182,7 @@ TEST(SliceImageFilterTests, PhysicalPoint3) float origin[] = { 3.33f, 4.4444f }; source->SetOrigin(origin); - int step[ImageDimension] = { -2, -2 }; + int step[ImageDimension] = { -2, -2 }; ImageType::IndexType start; ImageType::IndexType stop; @@ -217,7 +217,7 @@ TEST(SliceImageFilterTests, Empty) SourceType::SizeValueType size[] = { 32, 32 }; source->SetSize(size); - int step[ImageDimension] = { 1, 1 }; + int step[ImageDimension] = { 1, 1 }; auto start = ImageType::IndexType::Filled(10); auto stop = ImageType::IndexType::Filled(10); diff --git a/Modules/Filtering/ImageGrid/test/itkTileImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkTileImageFilterTest.cxx index 28baa9ac013..b094a4e6d95 100644 --- a/Modules/Filtering/ImageGrid/test/itkTileImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkTileImageFilterTest.cxx @@ -56,9 +56,9 @@ itkTileImageFilterTest(int argc, char * argv[]) layout[2] = std::stoi(argv[3]); // Tile the input images - auto tiler = TilerType::New(); + auto tiler = TilerType::New(); const itk::SimpleFilterWatcher tileWatcher(tiler, "Tiler"); - int f = 0; + int f = 0; for (int i = 4; i < argc - 1; ++i) { auto reader = ImageReaderType::New(); @@ -67,7 +67,7 @@ itkTileImageFilterTest(int argc, char * argv[]) tiler->SetInput(f++, reader->GetOutput()); } tiler->SetLayout(layout); - unsigned char yellow[3] = { 255, 255, 127 }; + unsigned char yellow[3] = { 255, 255, 127 }; const itk::RGBPixel fillPixel = yellow; tiler->SetDefaultPixelValue(fillPixel); tiler->Update(); diff --git a/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest.cxx index e511750fb55..7e717c2d8f3 100644 --- a/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest.cxx @@ -105,7 +105,7 @@ itkWarpImageFilterTest(int, char *[]) std::cout << "Create the input image pattern." << std::endl; ImageType::RegionType region; - ImageType::SizeType size = { { 64, 64 } }; + ImageType::SizeType size = { { 64, 64 } }; region.SetSize(size); auto input = ImageType::New(); @@ -136,7 +136,7 @@ itkWarpImageFilterTest(int, char *[]) constexpr unsigned int factors[ImageDimension] = { 2, 3 }; ImageType::RegionType fieldRegion; - ImageType::SizeType fieldSize; + ImageType::SizeType fieldSize; for (unsigned int j = 0; j < ImageDimension; ++j) { fieldSize[j] = size[j] * factors[j] + 5; @@ -153,7 +153,7 @@ itkWarpImageFilterTest(int, char *[]) for (FieldIterator fieldIter(field, fieldRegion); !fieldIter.IsAtEnd(); ++fieldIter) { ImageType::IndexType index = fieldIter.GetIndex(); - VectorType displacement; + VectorType displacement; for (unsigned int j = 0; j < ImageDimension; ++j) { displacement[j] = static_cast(index[j]) * ((1.0 / factors[j]) - 1.0); @@ -210,13 +210,13 @@ itkWarpImageFilterTest(int, char *[]) ITK_TEST_SET_GET_VALUE(outputStartIndex, warper->GetOutputStartIndex()); constexpr typename WarperType::SizeType::value_type outputSizeVal = 0; - auto outputSize = WarperType::SizeType::Filled(outputSizeVal); + auto outputSize = WarperType::SizeType::Filled(outputSizeVal); warper->SetOutputSize(outputSize); ITK_TEST_SET_GET_VALUE(outputSize, warper->GetOutputSize()); warper->SetInput(input); - ShowProgressObject progressWatch(warper); + ShowProgressObject progressWatch(warper); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); @@ -229,7 +229,7 @@ itkWarpImageFilterTest(int, char *[]) // compute non-padded output region ImageType::RegionType validRegion; - ImageType::SizeType validSize; + ImageType::SizeType validSize; // Needed to deal with incompatibility of various IsInside()s & // nearest-neighbour type interpolation on half-band at perimeter of diff --git a/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest2.cxx b/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest2.cxx index 3ac19f158dd..f0766f6c8a2 100644 --- a/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest2.cxx +++ b/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest2.cxx @@ -45,11 +45,11 @@ MakeCheckerboard() { using IteratorType = itk::ImageRegionIterator; constexpr ImageType::SizeType size = { { 16, 16, 16 } }; - ImageType::SpacingType spacing; + ImageType::SpacingType spacing; spacing[0] = spacing[1] = spacing[2] = 1.0; constexpr ImageType::IndexType index = { { 0, 0, 0 } }; - const ImageType::RegionType region{ index, size }; - ImageType::Pointer image; + const ImageType::RegionType region{ index, size }; + ImageType::Pointer image; AllocateImageFromRegionAndSpacing(ImageType, image, region, spacing); image->FillBuffer(0.0); for (IteratorType it(image, image->GetLargestPossibleRegion()); !it.IsAtEnd(); ++it) @@ -59,7 +59,7 @@ MakeCheckerboard() const int x = ind[0] / 4; const int y = ind[1] / 4; const int z = ind[2] / 4; - bool black(((x & 1) + (y & 1)) & 1); + bool black(((x & 1) + (y & 1)) & 1); if (z & 1) { black = !black; @@ -75,11 +75,11 @@ MakeDisplacementField() { using IteratorType = itk::ImageRegionIterator; const DisplacementFieldType::SizeType size = { { TImageIndexSpaceSize, TImageIndexSpaceSize, TImageIndexSpaceSize } }; - DisplacementFieldType::SpacingType spacing; + DisplacementFieldType::SpacingType spacing; spacing[0] = spacing[1] = spacing[2] = 16.0 / static_cast(TImageIndexSpaceSize); constexpr DisplacementFieldType::IndexType index = { { 0, 0, 0 } }; - const DisplacementFieldType::RegionType region{ index, size }; - DisplacementFieldType::Pointer image; + const DisplacementFieldType::RegionType region{ index, size }; + DisplacementFieldType::Pointer image; AllocateImageFromRegionAndSpacing(DisplacementFieldType, image, region, spacing); for (IteratorType it(image, image->GetLargestPossibleRegion()); !it.IsAtEnd(); ++it) { @@ -124,7 +124,7 @@ itkWarpImageFilterTest2(int, char *[]) // Enforce re-execution just to be sure filter->Modified(); filter->Update(); - const ImageType::Pointer result2 = filter->GetOutput(); + const ImageType::Pointer result2 = filter->GetOutput(); itk::ImageRegionIterator it1(result1, result1->GetLargestPossibleRegion()); itk::ImageRegionIterator it2(result2, result1->GetLargestPossibleRegion()); for (it1.GoToBegin(), it2.GoToBegin(); !it1.IsAtEnd() && !it2.IsAtEnd(); ++it1, ++it2) diff --git a/Modules/Filtering/ImageGrid/test/itkWarpVectorImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkWarpVectorImageFilterTest.cxx index a9677fa55fb..ff7578450d9 100644 --- a/Modules/Filtering/ImageGrid/test/itkWarpVectorImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkWarpVectorImageFilterTest.cxx @@ -104,7 +104,7 @@ itkWarpVectorImageFilterTest(int, char *[]) std::cout << "Create the input image pattern." << std::endl; ImageType::RegionType region; - ImageType::SizeType size = { { 64, 64 } }; + ImageType::SizeType size = { { 64, 64 } }; region.SetSize(size); auto input = ImageType::New(); @@ -113,7 +113,7 @@ itkWarpVectorImageFilterTest(int, char *[]) input->Allocate(); - unsigned int j; + unsigned int j; ImagePattern pattern; pattern.m_Offset = 64; for (j = 0; j < ImageDimension; ++j) @@ -135,7 +135,7 @@ itkWarpVectorImageFilterTest(int, char *[]) constexpr unsigned int factors[ImageDimension] = { 2, 3 }; ImageType::RegionType fieldRegion; - ImageType::SizeType fieldSize; + ImageType::SizeType fieldSize; for (j = 0; j < ImageDimension; ++j) { fieldSize[j] = size[j] * factors[j] + 5; @@ -151,7 +151,7 @@ itkWarpVectorImageFilterTest(int, char *[]) for (FieldIterator fieldIter(field, fieldRegion); !fieldIter.IsAtEnd(); ++fieldIter) { - IndexType index = fieldIter.GetIndex(); + IndexType index = fieldIter.GetIndex(); VectorType displacement; for (j = 0; j < ImageDimension; ++j) { @@ -174,7 +174,7 @@ itkWarpVectorImageFilterTest(int, char *[]) warper->SetEdgePaddingValue(PixelType(padValue)); ITK_TEST_SET_GET_VALUE(PixelType(padValue), warper->GetEdgePaddingValue()); - ShowProgressObject progressWatch(warper); + ShowProgressObject progressWatch(warper); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); @@ -208,7 +208,7 @@ itkWarpVectorImageFilterTest(int, char *[]) // compute non-padded output region ImageType::RegionType validRegion; - ImageType::SizeType validSize = validRegion.GetSize(); + ImageType::SizeType validSize = validRegion.GetSize(); // Needed to deal with incompatibility of various IsInside()s & // nearest-neighbour type interpolation on half-band at perimeter of // image. Evaluate() now has logic for this outer half-band. @@ -257,7 +257,7 @@ itkWarpVectorImageFilterTest(int, char *[]) while (!outIter.IsAtEnd()) { const IndexType index = outIter.GetIndex(); - PixelType value = outIter.Get(); + PixelType value = outIter.Get(); if (validRegion.IsInside(index)) { diff --git a/Modules/Filtering/ImageGrid/test/itkWrapPadImageTest.cxx b/Modules/Filtering/ImageGrid/test/itkWrapPadImageTest.cxx index e814834439a..3d85caff3f0 100644 --- a/Modules/Filtering/ImageGrid/test/itkWrapPadImageTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkWrapPadImageTest.cxx @@ -75,9 +75,9 @@ itkWrapPadImageTest(int, char *[]) using VectorImage = itk::VectorImage; // Test the creation of an image with native type - auto image = ShortImage::New(); - ShortImage::IndexType index = { { 0, 0 } }; - ShortImage::SizeType size = { { 8, 12 } }; + auto image = ShortImage::New(); + ShortImage::IndexType index = { { 0, 0 } }; + ShortImage::SizeType size = { { 8, 12 } }; const ShortImage::RegionType region(index, size); image->SetRegions(region); image->Allocate(); @@ -87,7 +87,7 @@ itkWrapPadImageTest(int, char *[]) vectorImage->SetNumberOfComponentsPerPixel(3); vectorImage->Allocate(); - itk::ImageRegionIterator it(image, region); + itk::ImageRegionIterator it(image, region); itk::ImageRegionIterator vit(vectorImage, region); ShortImage::PixelType i = 0; @@ -128,7 +128,7 @@ itkWrapPadImageTest(int, char *[]) << wrapPad->GetOutput()->GetSpacing()[1] << std::endl; ShortImage::RegionType requestedRegion; - bool passed; + bool passed; // CASE 1 lowerBound[0] = 1; @@ -145,7 +145,7 @@ itkWrapPadImageTest(int, char *[]) requestedRegion = wrapPad->GetOutput()->GetRequestedRegion(); - itk::ImageRegionIterator itIn1(wrapPad->GetOutput(), requestedRegion); + itk::ImageRegionIterator itIn1(wrapPad->GetOutput(), requestedRegion); itk::ImageRegionIterator vitIn1(vectorWrapPad->GetOutput(), requestedRegion); passed = true; @@ -160,8 +160,8 @@ itkWrapPadImageTest(int, char *[]) { for (; !itIn1.IsAtEnd(); ++itIn1, ++vitIn1) { - const int row = itIn1.GetIndex()[0]; - const int column = itIn1.GetIndex()[1]; + const int row = itIn1.GetIndex()[0]; + const int column = itIn1.GetIndex()[1]; FloatImage::PixelType expected = 0.0f; if (!VerifyPixel(row, column, static_cast(itIn1.Get()), expected)) @@ -210,7 +210,7 @@ itkWrapPadImageTest(int, char *[]) vectorWrapPad->UpdateLargestPossibleRegion(); requestedRegion = wrapPad->GetOutput()->GetRequestedRegion(); - itk::ImageRegionIterator itIn2(wrapPad->GetOutput(), requestedRegion); + itk::ImageRegionIterator itIn2(wrapPad->GetOutput(), requestedRegion); itk::ImageRegionIterator vitIn2(vectorWrapPad->GetOutput(), requestedRegion); passed = true; @@ -225,8 +225,8 @@ itkWrapPadImageTest(int, char *[]) { for (; !itIn2.IsAtEnd(); ++itIn2, ++vitIn2) { - const int row = itIn2.GetIndex()[0]; - const int column = itIn2.GetIndex()[1]; + const int row = itIn2.GetIndex()[0]; + const int column = itIn2.GetIndex()[1]; FloatImage::PixelType expected = 0.0f; if (!VerifyPixel(row, column, static_cast(itIn2.Get()), expected)) @@ -287,7 +287,7 @@ itkWrapPadImageTest(int, char *[]) vectorStream->UpdateLargestPossibleRegion(); requestedRegion = stream->GetOutput()->GetRequestedRegion(); - itk::ImageRegionIterator itIn3(stream->GetOutput(), requestedRegion); + itk::ImageRegionIterator itIn3(stream->GetOutput(), requestedRegion); itk::ImageRegionIterator vitIn3(vectorStream->GetOutput(), requestedRegion); passed = true; @@ -302,8 +302,8 @@ itkWrapPadImageTest(int, char *[]) { for (; !itIn3.IsAtEnd(); ++itIn3, ++vitIn3) { - const int row = itIn3.GetIndex()[0]; - const int column = itIn3.GetIndex()[1]; + const int row = itIn3.GetIndex()[0]; + const int column = itIn3.GetIndex()[1]; FloatImage::PixelType expected = 0.0f; if (!VerifyPixel(row, column, static_cast(itIn3.Get()), expected)) diff --git a/Modules/Filtering/ImageGrid/test/itkZeroFluxNeumannPadImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkZeroFluxNeumannPadImageFilterTest.cxx index 70f19586355..e9e2920b59c 100644 --- a/Modules/Filtering/ImageGrid/test/itkZeroFluxNeumannPadImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkZeroFluxNeumannPadImageFilterTest.cxx @@ -34,10 +34,10 @@ static bool VerifyFilterOutput(const ShortImage * inputImage, const FloatImage * outputImage) { const ShortImage::RegionType inputRegion = inputImage->GetLargestPossibleRegion(); - ShortImage::IndexType inputIndex = inputRegion.GetIndex(); - ShortImage::SizeType inputSize = inputRegion.GetSize(); + ShortImage::IndexType inputIndex = inputRegion.GetIndex(); + ShortImage::SizeType inputSize = inputRegion.GetSize(); - const ShortImage::RegionType outputRegion = outputImage->GetLargestPossibleRegion(); + const ShortImage::RegionType outputRegion = outputImage->GetLargestPossibleRegion(); itk::ImageRegionConstIteratorWithIndex outputIterator(outputImage, outputRegion); // Check pixel values @@ -75,8 +75,8 @@ VerifyFilterOutput(const ShortImage * inputImage, const FloatImage * outputImage } static bool -VerifyFilter(const ShortImage * inputImage, - FilterType * padFilter, +VerifyFilter(const ShortImage * inputImage, + FilterType * padFilter, const SizeValueType * lowerBound, const SizeValueType * upperBound) { @@ -101,15 +101,15 @@ VerifyFilter(const ShortImage * inputImage, } const ShortImage::RegionType outputRegion = padFilter->GetOutput()->GetLargestPossibleRegion(); - const ShortImage::IndexType outputIndex = outputRegion.GetIndex(); - const ShortImage::SizeType outputSize = outputRegion.GetSize(); + const ShortImage::IndexType outputIndex = outputRegion.GetIndex(); + const ShortImage::SizeType outputSize = outputRegion.GetSize(); const ShortImage::RegionType inputRegion = inputImage->GetLargestPossibleRegion(); - ShortImage::IndexType inputIndex = inputRegion.GetIndex(); - ShortImage::SizeType inputSize = inputRegion.GetSize(); + ShortImage::IndexType inputIndex = inputRegion.GetIndex(); + ShortImage::SizeType inputSize = inputRegion.GetSize(); ShortImage::IndexType expectedIndex; - ShortImage::SizeType expectedSize; + ShortImage::SizeType expectedSize; for (unsigned int i = 0; i < ShortImage::ImageDimension; ++i) { @@ -171,8 +171,8 @@ itkZeroFluxNeumannPadImageFilterTest(int, char *[]) // Fill in a test image constexpr ShortImage::IndexType inputIndex = { { 0, 0 } }; - constexpr ShortImage::SizeType inputSize = { { 8, 12 } }; - const ShortImage::RegionType inputRegion{ inputIndex, inputSize }; + constexpr ShortImage::SizeType inputSize = { { 8, 12 } }; + const ShortImage::RegionType inputRegion{ inputIndex, inputSize }; inputImage->SetLargestPossibleRegion(inputRegion); inputImage->SetBufferedRegion(inputRegion); inputImage->Allocate(); diff --git a/Modules/Filtering/ImageIntensity/include/itkArithmeticOpsFunctors.h b/Modules/Filtering/ImageIntensity/include/itkArithmeticOpsFunctors.h index 1c9f772301f..804a1f54f37 100644 --- a/Modules/Filtering/ImageIntensity/include/itkArithmeticOpsFunctors.h +++ b/Modules/Filtering/ImageIntensity/include/itkArithmeticOpsFunctors.h @@ -193,7 +193,7 @@ class ITK_TEMPLATE_EXPORT DivideOrZeroOut return static_cast(n) / static_cast(d); } TDenominator m_Threshold; - TOutput m_Constant; + TOutput m_Constant; }; diff --git a/Modules/Filtering/ImageIntensity/include/itkConstrainedValueAdditionImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkConstrainedValueAdditionImageFilter.h index baf65606ced..e16065bd1a5 100644 --- a/Modules/Filtering/ImageIntensity/include/itkConstrainedValueAdditionImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkConstrainedValueAdditionImageFilter.h @@ -45,8 +45,8 @@ class ConstrainedValueAddition inline TOutput operator()(const TInput1 & A, const TInput2 & B) const { - const auto dA = static_cast(A); - const auto dB = static_cast(B); + const auto dA = static_cast(A); + const auto dB = static_cast(B); const double add = dA + dB; const double cadd1 = (add < NumericTraits::max()) ? add : NumericTraits::max(); const double cadd2 = diff --git a/Modules/Filtering/ImageIntensity/include/itkConstrainedValueDifferenceImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkConstrainedValueDifferenceImageFilter.h index 2d9cb48f882..e2f48424a2d 100644 --- a/Modules/Filtering/ImageIntensity/include/itkConstrainedValueDifferenceImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkConstrainedValueDifferenceImageFilter.h @@ -69,8 +69,8 @@ class ConstrainedValueDifference inline TOutput operator()(const TInput1 & A, const TInput2 & B) const { - const auto dA = static_cast(A); - const auto dB = static_cast(B); + const auto dA = static_cast(A); + const auto dB = static_cast(B); const double diff = dA - dB; const double cdiff1 = diff > NumericTraits::NonpositiveMin() ? diff : NumericTraits::NonpositiveMin(); diff --git a/Modules/Filtering/ImageIntensity/include/itkDiscreteGaussianDerivativeImageFunction.hxx b/Modules/Filtering/ImageIntensity/include/itkDiscreteGaussianDerivativeImageFunction.hxx index 0901b38a948..5af5810b14e 100644 --- a/Modules/Filtering/ImageIntensity/include/itkDiscreteGaussianDerivativeImageFunction.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkDiscreteGaussianDerivativeImageFunction.hxx @@ -201,13 +201,13 @@ DiscreteGaussianDerivativeImageFunction::EvaluateAtContinu { using NumberOfNeighborsType = unsigned int; - unsigned int dim; // index over dimension + unsigned int dim; // index over dimension constexpr NumberOfNeighborsType numberOfNeighbors = 1 << ImageDimension2; // Compute base index = closet index below point // Compute distance from point to base index IndexType baseIndex; - double distance[ImageDimension2]; + double distance[ImageDimension2]; for (dim = 0; dim < ImageDimension2; ++dim) { @@ -223,9 +223,9 @@ DiscreteGaussianDerivativeImageFunction::EvaluateAtContinu for (NumberOfNeighborsType counter = 0; counter < numberOfNeighbors; ++counter) { - double overlap = 1.0; // fraction overlap + double overlap = 1.0; // fraction overlap NumberOfNeighborsType upper = counter; // each bit indicates upper/lower neighbour - IndexType neighIndex; + IndexType neighIndex; // get neighbor index and overlap fraction for (dim = 0; dim < ImageDimension2; ++dim) diff --git a/Modules/Filtering/ImageIntensity/include/itkDiscreteGradientMagnitudeGaussianImageFunction.hxx b/Modules/Filtering/ImageIntensity/include/itkDiscreteGradientMagnitudeGaussianImageFunction.hxx index 609e6c1be65..d4bbd584f74 100644 --- a/Modules/Filtering/ImageIntensity/include/itkDiscreteGradientMagnitudeGaussianImageFunction.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkDiscreteGradientMagnitudeGaussianImageFunction.hxx @@ -235,13 +235,13 @@ DiscreteGradientMagnitudeGaussianImageFunction::EvaluateAt { using NumberOfNeighborsType = unsigned int; - unsigned int dim; // index over dimension + unsigned int dim; // index over dimension constexpr NumberOfNeighborsType neighbors = 1 << ImageDimension2; // Compute base index = closet index below point // Compute distance from point to base index IndexType baseIndex; - double distance[ImageDimension2]; + double distance[ImageDimension2]; for (dim = 0; dim < ImageDimension2; ++dim) { @@ -257,9 +257,9 @@ DiscreteGradientMagnitudeGaussianImageFunction::EvaluateAt for (NumberOfNeighborsType counter = 0; counter < neighbors; ++counter) { - double overlap = 1.0; // fraction overlap + double overlap = 1.0; // fraction overlap NumberOfNeighborsType upper = counter; // each bit indicates upper/lower neighbour - IndexType neighIndex; + IndexType neighIndex; // get neighbor index and overlap fraction for (dim = 0; dim < ImageDimension2; ++dim) diff --git a/Modules/Filtering/ImageIntensity/include/itkDiscreteHessianGaussianImageFunction.hxx b/Modules/Filtering/ImageIntensity/include/itkDiscreteHessianGaussianImageFunction.hxx index 9fccd9a68f9..0e8b724d762 100644 --- a/Modules/Filtering/ImageIntensity/include/itkDiscreteHessianGaussianImageFunction.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkDiscreteHessianGaussianImageFunction.hxx @@ -232,13 +232,13 @@ DiscreteHessianGaussianImageFunction::EvaluateAtContinuous { using NumberOfNeighborsType = unsigned int; - unsigned int dim; // index over dimension + unsigned int dim; // index over dimension constexpr NumberOfNeighborsType neighbors = 1 << ImageDimension2; // Compute base index = closet index below point // Compute distance from point to base index IndexType baseIndex; - double distance[ImageDimension2]; + double distance[ImageDimension2]; for (dim = 0; dim < ImageDimension2; ++dim) { @@ -250,13 +250,13 @@ DiscreteHessianGaussianImageFunction::EvaluateAtContinuous // neighbors. The weight for each neighbor is the fraction overlap // of the neighbor pixel with respect to a pixel centered on point. OutputType hessian, currentHessian; - TOutput totalOverlap{}; + TOutput totalOverlap{}; for (NumberOfNeighborsType counter = 0; counter < neighbors; ++counter) { - double overlap = 1.0; // fraction overlap + double overlap = 1.0; // fraction overlap NumberOfNeighborsType upper = counter; // each bit indicates upper/lower neighbour - IndexType neighIndex; + IndexType neighIndex; // get neighbor index and overlap fraction for (dim = 0; dim < ImageDimension2; ++dim) diff --git a/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.h index 42c876d6c24..158134d328e 100644 --- a/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.h @@ -212,7 +212,7 @@ class ITK_TEMPLATE_EXPORT HistogramMatchingImageFilter : public ImageToImageFilt /** Compute min, max and mean of an image. */ void - ComputeMinMaxMean(const InputImageType * image, + ComputeMinMaxMean(const InputImageType * image, THistogramMeasurement & minValue, THistogramMeasurement & maxValue, THistogramMeasurement & meanValue); @@ -222,8 +222,8 @@ class ITK_TEMPLATE_EXPORT HistogramMatchingImageFilter : public ImageToImageFilt * Values outside that range are ignored. */ void - ConstructHistogramFromIntensityRange(const InputImageType * image, - HistogramType * histogram, + ConstructHistogramFromIntensityRange(const InputImageType * image, + HistogramType * histogram, const THistogramMeasurement minHistogramValidValue, const THistogramMeasurement maxHistogramValidValue, const THistogramMeasurement imageTrueMinValue, @@ -232,7 +232,7 @@ class ITK_TEMPLATE_EXPORT HistogramMatchingImageFilter : public ImageToImageFilt private: SizeValueType m_NumberOfHistogramLevels{ 256 }; SizeValueType m_NumberOfMatchPoints{ 1 }; - bool m_ThresholdAtMeanIntensity{ true }; + bool m_ThresholdAtMeanIntensity{ true }; THistogramMeasurement m_SourceMinValue{}; THistogramMeasurement m_SourceMaxValue{}; @@ -248,9 +248,9 @@ class ITK_TEMPLATE_EXPORT HistogramMatchingImageFilter : public ImageToImageFilt using GradientArrayType = vnl_vector; GradientArrayType m_Gradients{}; - double m_LowerGradient{ 0.0 }; - double m_UpperGradient{ 0.0 }; - bool m_GenerateReferenceHistogramFromImage{ true }; + double m_LowerGradient{ 0.0 }; + double m_UpperGradient{ 0.0 }; + bool m_GenerateReferenceHistogramFromImage{ true }; }; } // end namespace itk diff --git a/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.hxx index 41a81c77f99..5ca267bc07b 100644 --- a/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.hxx @@ -51,7 +51,7 @@ HistogramMatchingImageFilter:: template void HistogramMatchingImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -220,7 +220,7 @@ HistogramMatchingImageFilter:: m_QuantileTable[1][m_NumberOfMatchPoints + 1] = m_ReferenceMaxValue; { - const double delta = 1.0 / (static_cast(m_NumberOfMatchPoints) + 1.0); + const double delta = 1.0 / (static_cast(m_NumberOfMatchPoints) + 1.0); const HistogramType * const referenceHistogram = this->GetReferenceHistogram(); for (SizeValueType j = 1; j < m_NumberOfMatchPoints + 1; ++j) { @@ -317,18 +317,18 @@ HistogramMatchingImageFilter:: const OutputImageRegionType & outputRegionForThread) { const InputImageConstPointer input = this->GetSourceImage(); - const OutputImagePointer output = this->GetOutput(); + const OutputImagePointer output = this->GetOutput(); // Transform the source image and write to output. using InputConstIterator = ImageRegionConstIterator; using OutputIterator = ImageRegionIterator; InputConstIterator inIter(input, outputRegionForThread); - OutputIterator outIter(output, outputRegionForThread); + OutputIterator outIter(output, outputRegionForThread); for (SizeValueType i = 0; !outIter.IsAtEnd(); ++inIter, ++outIter, i++) { - const auto srcValue = static_cast(inIter.Get()); + const auto srcValue = static_cast(inIter.Get()); SizeValueType j = 0; for (; j < m_NumberOfMatchPoints + 2; ++j) { @@ -365,7 +365,7 @@ HistogramMatchingImageFilter:: template void HistogramMatchingImageFilter::ComputeMinMaxMean( - const InputImageType * image, + const InputImageType * image, THistogramMeasurement & minValue, THistogramMeasurement & maxValue, THistogramMeasurement & meanValue) @@ -373,7 +373,7 @@ HistogramMatchingImageFilter:: using ConstIterator = ImageRegionConstIterator; ConstIterator iter(image, image->GetBufferedRegion()); - double sum = 0.0; + double sum = 0.0; SizeValueType count = 0; minValue = static_cast(iter.Get()); @@ -403,8 +403,8 @@ HistogramMatchingImageFilter:: template void HistogramMatchingImageFilter::ConstructHistogramFromIntensityRange( - const InputImageType * image, - HistogramType * histogram, + const InputImageType * image, + HistogramType * histogram, const THistogramMeasurement minHistogramValidValue, const THistogramMeasurement maxHistogramValidValue, const THistogramMeasurement imageTrueMinValue, @@ -412,7 +412,7 @@ HistogramMatchingImageFilter:: { { // allocate memory for the histogram - typename HistogramType::SizeType size; + typename HistogramType::SizeType size; typename HistogramType::MeasurementVectorType lowerBound; typename HistogramType::MeasurementVectorType upperBound; @@ -434,7 +434,7 @@ HistogramMatchingImageFilter:: histogram->SetToZero(); } - typename HistogramType::IndexType index(1); + typename HistogramType::IndexType index(1); typename HistogramType::MeasurementVectorType measurement(1); using MeasurementType = typename HistogramType::MeasurementType; measurement[0] = MeasurementType{}; diff --git a/Modules/Filtering/ImageIntensity/include/itkIntensityWindowingImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkIntensityWindowingImageFilter.h index 4187ffed753..64782bceb17 100644 --- a/Modules/Filtering/ImageIntensity/include/itkIntensityWindowingImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkIntensityWindowingImageFilter.h @@ -96,17 +96,17 @@ class ITK_TEMPLATE_EXPORT IntensityWindowingTransform return m_OutputMaximum; } const RealType value = static_cast(x) * m_Factor + m_Offset; - const auto result = static_cast(value); + const auto result = static_cast(value); return result; } private: RealType m_Factor; RealType m_Offset; - TOutput m_OutputMaximum; - TOutput m_OutputMinimum; - TInput m_WindowMaximum; - TInput m_WindowMinimum; + TOutput m_OutputMaximum; + TOutput m_OutputMinimum; + TInput m_WindowMaximum; + TInput m_WindowMinimum; }; } // end namespace Functor diff --git a/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h index d309b5a747c..05038a2b956 100644 --- a/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h @@ -105,7 +105,7 @@ class MaskInput return VariableLengthVector(0); } TOutput m_OutsideValue{ DefaultOutsideValue(static_cast(nullptr)) }; - TMask m_MaskingValue{}; + TMask m_MaskingValue{}; }; } // namespace Functor @@ -273,7 +273,7 @@ class ITK_TEMPLATE_EXPORT MaskImageFilter : public BinaryGeneratorImageFilter currentValue = this->GetFunctor().GetOutsideValue(); - VariableLengthVector zeroVector(currentValue.GetSize()); + VariableLengthVector zeroVector(currentValue.GetSize()); zeroVector.Fill(TValue{}); if (currentValue == zeroVector) diff --git a/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h index 2b28506f2de..11b5bb8b4ff 100644 --- a/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h @@ -103,7 +103,7 @@ class MaskNegatedInput return VariableLengthVector(0); } TOutput m_OutsideValue{ DefaultOutsideValue(static_cast(nullptr)) }; - TMask m_MaskingValue{}; + TMask m_MaskingValue{}; }; } // namespace Functor @@ -272,7 +272,7 @@ class ITK_TEMPLATE_EXPORT MaskNegatedImageFilter // outside value is the same as the number of components in the // output image. If not, throw an exception. const VariableLengthVector currentValue = this->GetFunctor().GetOutsideValue(); - VariableLengthVector zeroVector(currentValue.GetSize()); + VariableLengthVector zeroVector(currentValue.GetSize()); zeroVector.Fill(TValue{}); if (currentValue == zeroVector) diff --git a/Modules/Filtering/ImageIntensity/include/itkNaryFunctorImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkNaryFunctorImageFilter.hxx index da612e22c55..3ea536ff594 100644 --- a/Modules/Filtering/ImageIntensity/include/itkNaryFunctorImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkNaryFunctorImageFilter.hxx @@ -74,7 +74,7 @@ NaryFunctorImageFilter::DynamicThreadedGen const OutputImagePointer outputPtr = this->GetOutput(0); typename std::vector::iterator regionIterators; - const auto regionItEnd = inputItrVector.end(); + const auto regionItEnd = inputItrVector.end(); typename NaryArrayType::iterator arrayIt; diff --git a/Modules/Filtering/ImageIntensity/include/itkNormalizeToConstantImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkNormalizeToConstantImageFilter.hxx index 8d69db452dd..51355082876 100644 --- a/Modules/Filtering/ImageIntensity/include/itkNormalizeToConstantImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkNormalizeToConstantImageFilter.hxx @@ -55,7 +55,7 @@ NormalizeToConstantImageFilter::GenerateData() { this->AllocateOutputs(); const InputImageType * input0 = this->GetInput(0); - OutputImageType * output0 = this->GetOutput(0); + OutputImageType * output0 = this->GetOutput(0); // Create a process accumulator for tracking the progress of this minipipeline auto progress = ProgressAccumulator::New(); diff --git a/Modules/Filtering/ImageIntensity/include/itkPolylineMask2DImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkPolylineMask2DImageFilter.hxx index 5668b168c7a..8b77e9cc7c1 100644 --- a/Modules/Filtering/ImageIntensity/include/itkPolylineMask2DImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkPolylineMask2DImageFilter.hxx @@ -112,9 +112,9 @@ PolylineMask2DImageFilter::GenerateData() /* define background, foreground pixel values and unlabeled pixel value */ constexpr PixelType zero_val{}; - auto u_val = static_cast(0); - auto b_val = static_cast(2); - auto f_val = static_cast(255); + auto u_val = static_cast(0); + auto b_val = static_cast(2); + auto f_val = static_cast(255); outputImagePtr->FillBuffer(u_val); pstartVertex = piter.Value(); @@ -219,7 +219,7 @@ PolylineMask2DImageFilter::GenerateData() /* Mask the input image with the mask generated */ InputImageConstIteratorType inputI(inputImagePtr, inputImagePtr->GetLargestPossibleRegion()); - OutputImageIteratorType outputI(outputImagePtr, outputImagePtr->GetLargestPossibleRegion()); + OutputImageIteratorType outputI(outputImagePtr, outputImagePtr->GetLargestPossibleRegion()); while (!outputI.IsAtEnd()) { if (outputI.Get() == f_val) diff --git a/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx index c0f68f0b3d5..add090b9571 100644 --- a/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx @@ -175,7 +175,7 @@ PolylineMaskImageFilter::Generate outputImagePtr->AllocateInitialized(); InputImageConstIteratorType inputIt(inputImagePtr, inputImagePtr->GetLargestPossibleRegion()); - OutputImageIteratorType outputIt(outputImagePtr, outputImagePtr->GetLargestPossibleRegion()); + OutputImageIteratorType outputIt(outputImagePtr, outputImagePtr->GetLargestPossibleRegion()); using InterpolatorType = NearestNeighborInterpolateImageFunction; using InterpolatorPointType = typename InterpolatorType::PointType; @@ -185,7 +185,7 @@ PolylineMaskImageFilter::Generate // Generate input and output points InterpolatorPointType inputPoint; - ProjPlanePointType outputPoint; + ProjPlanePointType outputPoint; // Generate a 2D image with the viewing polygon as a mask using ProjectionImageType = Image; @@ -206,9 +206,9 @@ PolylineMaskImageFilter::Generate using BoundingBoxType = BoundingBox; using CornerPointProjectionContainer = BoundingBoxType::PointsContainer; - auto cornerPointProjectionlist = CornerPointProjectionContainer::New(); - CornerPointType cornerPoint; - CornerPointType originPoint; + auto cornerPointProjectionlist = CornerPointProjectionContainer::New(); + CornerPointType cornerPoint; + CornerPointType originPoint; CornerPointProjectionType cornerProjectionPoint; originPoint[0] = 0.0; @@ -294,7 +294,7 @@ PolylineMaskImageFilter::Generate projectionStart[1] = 0; ProjectionImageSizeType projectionSize; - const IndexValueType pad = 5; + const IndexValueType pad = 5; projectionSize[0] = (IndexValueType)(bounds[1] - bounds[0]) + pad; projectionSize[1] = (IndexValueType)(bounds[3] - bounds[2]) + pad; @@ -459,7 +459,7 @@ PolylineMaskImageFilter::Generate // demarcated by the polyline contour InputImageSpacingType inputImageSpacing; - InputImagePointType inputImageOrigin; + InputImagePointType inputImageOrigin; inputImageSpacing = inputImagePtr->GetSpacing(); inputImageOrigin = inputImagePtr->GetOrigin(); @@ -493,7 +493,7 @@ PolylineMaskImageFilter::Generate template void PolylineMaskImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/ImageIntensity/include/itkRescaleIntensityImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkRescaleIntensityImageFilter.h index bc6208edbdc..e2fc14bc2dc 100644 --- a/Modules/Filtering/ImageIntensity/include/itkRescaleIntensityImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkRescaleIntensityImageFilter.h @@ -75,7 +75,7 @@ class ITK_TEMPLATE_EXPORT IntensityLinearTransform operator()(const TInput & x) const { const RealType value = static_cast(x) * m_Factor + m_Offset; - auto result = static_cast(value); + auto result = static_cast(value); result = (result > m_Maximum) ? m_Maximum : result; result = (result < m_Minimum) ? m_Minimum : result; @@ -85,8 +85,8 @@ class ITK_TEMPLATE_EXPORT IntensityLinearTransform private: RealType m_Factor; RealType m_Offset; - TOutput m_Maximum; - TOutput m_Minimum; + TOutput m_Maximum; + TOutput m_Minimum; }; } // end namespace Functor diff --git a/Modules/Filtering/ImageIntensity/include/itkShiftScaleImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkShiftScaleImageFilter.hxx index ad9c078e87b..12d83052200 100644 --- a/Modules/Filtering/ImageIntensity/include/itkShiftScaleImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkShiftScaleImageFilter.hxx @@ -42,12 +42,12 @@ ShiftScaleImageFilter::DynamicThreadedGenerateData( { const TInputImage * inputPtr = this->GetInput(); - TOutputImage * outputPtr = this->GetOutput(); + TOutputImage * outputPtr = this->GetOutput(); SizeValueType underflow = 0; SizeValueType overflow = 0; - ImageScanlineIterator ot(outputPtr, outputRegion); + ImageScanlineIterator ot(outputPtr, outputRegion); ImageScanlineConstIterator it(inputPtr, outputRegion); // support progress methods/callbacks diff --git a/Modules/Filtering/ImageIntensity/include/itkSigmoidImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkSigmoidImageFilter.h index 728b0fdbd41..499671ae4c5 100644 --- a/Modules/Filtering/ImageIntensity/include/itkSigmoidImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkSigmoidImageFilter.h @@ -132,8 +132,8 @@ class Sigmoid } private: - double m_Alpha; - double m_Beta; + double m_Alpha; + double m_Beta; TOutput m_OutputMinimum; TOutput m_OutputMaximum; }; diff --git a/Modules/Filtering/ImageIntensity/include/itkSymmetricEigenAnalysisImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkSymmetricEigenAnalysisImageFilter.h index 825dc1ed92a..318bca90c6a 100644 --- a/Modules/Filtering/ImageIntensity/include/itkSymmetricEigenAnalysisImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkSymmetricEigenAnalysisImageFilter.h @@ -187,7 +187,7 @@ class SymmetricEigenAnalysisFixedDimensionFunction /** Define how to print enumerations */ extern ITKImageIntensity_EXPORT std::ostream & - operator<<(std::ostream & out, const EigenValueOrderEnum value); +operator<<(std::ostream & out, const EigenValueOrderEnum value); } // end namespace Functor diff --git a/Modules/Filtering/ImageIntensity/include/itkVectorExpandImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkVectorExpandImageFilter.h index e82cb4c862b..ed18b714481 100644 --- a/Modules/Filtering/ImageIntensity/include/itkVectorExpandImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkVectorExpandImageFilter.h @@ -188,7 +188,7 @@ class ITK_TEMPLATE_EXPORT VectorExpandImageFilter : public ImageToImageFilter::DynamicThreadedGenerateData( // Define a few indices that will be used to translate from an input // pixel to and output pixel - typename TOutputImage::IndexType outputIndex; + typename TOutputImage::IndexType outputIndex; typename InterpolatorType::ContinuousIndexType inputIndex; using InterpolatedType = typename InterpolatorType::OutputType; - OutputPixelType outputValue; + OutputPixelType outputValue; InterpolatedType interpolatedValue; // Walk the output region, and interpolate the input image @@ -167,7 +167,7 @@ VectorExpandImageFilter::GenerateInputRequestedRegion { Superclass::GenerateInputRequestedRegion(); - const InputImagePointer inputPtr = const_cast(this->GetInput()); + const InputImagePointer inputPtr = const_cast(this->GetInput()); const OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) @@ -176,11 +176,11 @@ VectorExpandImageFilter::GenerateInputRequestedRegion } // We need to compute the input requested region (size and start index) - unsigned int i; - const typename TOutputImage::SizeType & outputRequestedRegionSize = outputPtr->GetRequestedRegion().GetSize(); + unsigned int i; + const typename TOutputImage::SizeType & outputRequestedRegionSize = outputPtr->GetRequestedRegion().GetSize(); const typename TOutputImage::IndexType & outputRequestedRegionStartIndex = outputPtr->GetRequestedRegion().GetIndex(); - typename TInputImage::SizeType inputRequestedRegionSize; + typename TInputImage::SizeType inputRequestedRegionSize; typename TInputImage::IndexType inputRequestedRegionStartIndex; // inputRequestedSize = (outputRequestedSize / ExpandFactor) + 1) @@ -230,7 +230,7 @@ VectorExpandImageFilter::GenerateOutputInformation() { Superclass::GenerateOutputInformation(); - const InputImagePointer inputPtr = const_cast(this->GetInput()); + const InputImagePointer inputPtr = const_cast(this->GetInput()); const OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) @@ -241,14 +241,14 @@ VectorExpandImageFilter::GenerateOutputInformation() // We need to compute the output spacing, the output image size, and the // output image start index const typename InputImageType::SpacingType & inputSpacing = inputPtr->GetSpacing(); - const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); - const typename TInputImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); - const typename TInputImage::PointType & inputOrigin = inputPtr->GetOrigin(); + const typename TInputImage::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename TInputImage::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); + const typename TInputImage::PointType & inputOrigin = inputPtr->GetOrigin(); typename OutputImageType::SpacingType outputSpacing; - typename TOutputImage::SizeType outputSize; - typename TOutputImage::IndexType outputStartIndex; - typename TOutputImage::PointType outputOrigin; + typename TOutputImage::SizeType outputSize; + typename TOutputImage::IndexType outputStartIndex; + typename TOutputImage::PointType outputOrigin; typename TInputImage::SpacingType inputOriginShift; @@ -261,7 +261,7 @@ VectorExpandImageFilter::GenerateOutputInformation() inputOriginShift[i] = -(inputSpacing[i] / 2.0) * fraction; } const typename TInputImage::DirectionType inputDirection = inputPtr->GetDirection(); - const typename TOutputImage::SpacingType outputOriginShift = inputDirection * inputOriginShift; + const typename TOutputImage::SpacingType outputOriginShift = inputDirection * inputOriginShift; outputOrigin = inputOrigin + outputOriginShift; diff --git a/Modules/Filtering/ImageIntensity/include/itkVectorIndexSelectionCastImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkVectorIndexSelectionCastImageFilter.h index 35538ab12ad..bb79b2d2be6 100644 --- a/Modules/Filtering/ImageIntensity/include/itkVectorIndexSelectionCastImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkVectorIndexSelectionCastImageFilter.h @@ -139,7 +139,7 @@ class VectorIndexSelectionCastImageFilter void BeforeThreadedGenerateData() override { - const unsigned int index = this->GetIndex(); + const unsigned int index = this->GetIndex(); const TInputImage * image = this->GetInput(); const unsigned int numberOfRunTimeComponents = image->GetNumberOfComponentsPerPixel(); diff --git a/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.h index b9eca3c1f33..1b38423fb78 100644 --- a/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.h @@ -163,7 +163,7 @@ class ITK_TEMPLATE_EXPORT VectorRescaleIntensityImageFilter InputRealType m_Scale{}; InputRealType m_Shift{}; - InputRealType m_InputMaximumMagnitude{}; + InputRealType m_InputMaximumMagnitude{}; OutputRealType m_OutputMaximumMagnitude{}; }; } // end namespace itk diff --git a/Modules/Filtering/ImageIntensity/test/itkAbsImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkAbsImageFilterAndAdaptorTest.cxx index 3cba7f5fa79..9fb4b4f80ee 100644 --- a/Modules/Filtering/ImageIntensity/test/itkAbsImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkAbsImageFilterAndAdaptorTest.cxx @@ -115,7 +115,7 @@ itkAbsImageFilterAndAdaptorTest(int, char *[]) std::cout.precision(static_cast(itk::Math::abs(std::log10(epsilon)))); std::cout << ot.Get() << " = "; std::cout << itk::Math::abs(it.Get()) << std::endl; - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); const OutputImageType::PixelType absolute = itk::Math::abs(input); if (!itk::Math::FloatAlmostEqual(absolute, output, 10, epsilon)) diff --git a/Modules/Filtering/ImageIntensity/test/itkAcosImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkAcosImageFilterAndAdaptorTest.cxx index 7c193af76a5..83ceb5b409b 100644 --- a/Modules/Filtering/ImageIntensity/test/itkAcosImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkAcosImageFilterAndAdaptorTest.cxx @@ -116,7 +116,7 @@ itkAcosImageFilterAndAdaptorTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); const OutputImageType::PixelType arccosinus = std::acos(input); if (!itk::Math::FloatAlmostEqual(arccosinus, output, 10, epsilon)) diff --git a/Modules/Filtering/ImageIntensity/test/itkArithmeticOpsFunctorsTest.cxx b/Modules/Filtering/ImageIntensity/test/itkArithmeticOpsFunctorsTest.cxx index 03cc569dff0..c741e0a2ce6 100644 --- a/Modules/Filtering/ImageIntensity/test/itkArithmeticOpsFunctorsTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkArithmeticOpsFunctorsTest.cxx @@ -24,7 +24,7 @@ TEST(ArithmeticOpsTest, DivFloorFloat) { using OpType = itk::Functor::DivFloor; - OpType op1; + OpType op1; constexpr OpType op2; EXPECT_EQ(op1, op1); @@ -41,7 +41,7 @@ TEST(ArithmeticOpsTest, DivFloorShort) { using OpType = itk::Functor::DivFloor; - OpType op1; + OpType op1; constexpr OpType op2; EXPECT_EQ(op1, op1); @@ -59,7 +59,7 @@ TEST(ArithmeticOpsTest, DivReal) using OpType = itk::Functor::DivReal; - OpType op1; + OpType op1; constexpr OpType op2; EXPECT_EQ(op1, op1); @@ -78,7 +78,7 @@ TEST(ArithmeticOpsTest, UnaryMinus) using OpType = itk::Functor::UnaryMinus; - OpType op1; + OpType op1; constexpr OpType op2; EXPECT_EQ(op1, op1); diff --git a/Modules/Filtering/ImageIntensity/test/itkAsinImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkAsinImageFilterAndAdaptorTest.cxx index 311b5af9e9e..74db51d61c9 100644 --- a/Modules/Filtering/ImageIntensity/test/itkAsinImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkAsinImageFilterAndAdaptorTest.cxx @@ -112,7 +112,7 @@ itkAsinImageFilterAndAdaptorTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); const OutputImageType::PixelType arcsinus = std::asin(input); if (!itk::Math::FloatAlmostEqual(arcsinus, output, 10, epsilon)) diff --git a/Modules/Filtering/ImageIntensity/test/itkAtan2ImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkAtan2ImageFilterTest.cxx index 252cd3dbc11..3f6444a8772 100644 --- a/Modules/Filtering/ImageIntensity/test/itkAtan2ImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkAtan2ImageFilterTest.cxx @@ -131,8 +131,8 @@ itkAtan2ImageFilterTest(int, char *[]) while (!ot.IsAtEnd()) { - const InputImageType::PixelType input1 = it1.Get(); - const InputImageType::PixelType input2 = it2.Get(); + const InputImageType::PixelType input1 = it1.Get(); + const InputImageType::PixelType input2 = it2.Get(); const OutputImageType::PixelType output = ot.Get(); const OutputImageType::PixelType atan2 = std::atan2(input1, input2); if (!itk::Math::FloatAlmostEqual(atan2, output, 10, epsilon)) diff --git a/Modules/Filtering/ImageIntensity/test/itkAtanImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkAtanImageFilterAndAdaptorTest.cxx index 40afc42c3cc..a3e68efff20 100644 --- a/Modules/Filtering/ImageIntensity/test/itkAtanImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkAtanImageFilterAndAdaptorTest.cxx @@ -111,7 +111,7 @@ itkAtanImageFilterAndAdaptorTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); const OutputImageType::PixelType arctangent = std::atan(input); if (!itk::Math::FloatAlmostEqual(arctangent, output, 10, epsilon)) diff --git a/Modules/Filtering/ImageIntensity/test/itkBitwiseOpsFunctorsTest.cxx b/Modules/Filtering/ImageIntensity/test/itkBitwiseOpsFunctorsTest.cxx index 3a64805f5fb..53a6d2e6161 100644 --- a/Modules/Filtering/ImageIntensity/test/itkBitwiseOpsFunctorsTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkBitwiseOpsFunctorsTest.cxx @@ -24,7 +24,7 @@ TEST(BitwiseOpsTest, DivFloor) { using OpType = itk::Functor::BitwiseNot; - OpType op1; + OpType op1; constexpr OpType op2; EXPECT_EQ(op1, op1); diff --git a/Modules/Filtering/ImageIntensity/test/itkClampImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkClampImageFilterTest.cxx index 6ad798e3403..1063fb3b94d 100644 --- a/Modules/Filtering/ImageIntensity/test/itkClampImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkClampImageFilterTest.cxx @@ -43,8 +43,8 @@ GetClampTypeName() std::string name; #ifdef GCC_USEDEMANGLE const char * mangledName = typeid(T).name(); - int status; - char * unmangled = abi::__cxa_demangle(mangledName, nullptr, nullptr, &status); + int status; + char * unmangled = abi::__cxa_demangle(mangledName, nullptr, nullptr, &status); name = unmangled; free(unmangled); #else @@ -69,7 +69,7 @@ TestClampFromTo() const typename InputImageType::SizeType randomSize = { { 18, 17, 23 } }; source->SetSize(randomSize); source->UpdateLargestPossibleRegion(); - auto sourceCopy = InputImageType::New(); + auto sourceCopy = InputImageType::New(); typename InputImageType::RegionType region; region.SetSize(randomSize); sourceCopy->SetRegions(region); @@ -90,7 +90,7 @@ TestClampFromTo() using InputIteratorType = itk::ImageRegionConstIterator; using OutputIteratorType = itk::ImageRegionConstIterator; - InputIteratorType it(sourceCopy, sourceCopy->GetLargestPossibleRegion()); + InputIteratorType it(sourceCopy, sourceCopy->GetLargestPossibleRegion()); OutputIteratorType ot(filter->GetOutput(), filter->GetOutput()->GetLargestPossibleRegion()); bool success = true; @@ -104,7 +104,7 @@ TestClampFromTo() constexpr auto expectedMax = static_cast(itk::NumericTraits::max()); while (!it.IsAtEnd()) { - const TInputPixelType inValue = it.Value(); + const TInputPixelType inValue = it.Value(); const TOutputPixelType outValue = ot.Value(); const auto dInValue = static_cast(inValue); @@ -182,7 +182,7 @@ TestClampFromToWithCustomBounds() const typename InputImageType::SizeType randomSize = { { 18, 17, 23 } }; source->SetSize(randomSize); source->UpdateLargestPossibleRegion(); - auto sourceCopy = InputImageType::New(); + auto sourceCopy = InputImageType::New(); typename InputImageType::RegionType region; region.SetSize(randomSize); sourceCopy->SetRegions(region); @@ -203,7 +203,7 @@ TestClampFromToWithCustomBounds() using InputIteratorType = itk::ImageRegionConstIterator; using OutputIteratorType = itk::ImageRegionConstIterator; - InputIteratorType it(sourceCopy, sourceCopy->GetLargestPossibleRegion()); + InputIteratorType it(sourceCopy, sourceCopy->GetLargestPossibleRegion()); OutputIteratorType ot(filter->GetOutput(), filter->GetOutput()->GetLargestPossibleRegion()); bool success = true; @@ -215,11 +215,11 @@ TestClampFromToWithCustomBounds() ot.GoToBegin(); while (!it.IsAtEnd()) { - TInputPixelType inValue = it.Value(); + TInputPixelType inValue = it.Value(); TOutputPixelType outValue = ot.Value(); TOutputPixelType expectedValue; - auto dInValue = static_cast(inValue); + auto dInValue = static_cast(inValue); const double expectedMin = filter->GetLowerBound(); const double expectedMax = filter->GetUpperBound(); diff --git a/Modules/Filtering/ImageIntensity/test/itkComplexToImaginaryFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkComplexToImaginaryFilterAndAdaptorTest.cxx index 3c68e40be94..a3cc6d70efc 100644 --- a/Modules/Filtering/ImageIntensity/test/itkComplexToImaginaryFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkComplexToImaginaryFilterAndAdaptorTest.cxx @@ -108,7 +108,7 @@ itkComplexToImaginaryFilterAndAdaptorTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); const OutputImageType::PixelType imag = input.imag(); if (!itk::Math::FloatAlmostEqual(imag, output, 10, epsilon)) diff --git a/Modules/Filtering/ImageIntensity/test/itkComplexToModulusFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkComplexToModulusFilterAndAdaptorTest.cxx index d03b77c76fe..fd9c170dcfc 100644 --- a/Modules/Filtering/ImageIntensity/test/itkComplexToModulusFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkComplexToModulusFilterAndAdaptorTest.cxx @@ -112,7 +112,7 @@ itkComplexToModulusFilterAndAdaptorTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); const double normd = std::sqrt(input.real() * input.real() + input.imag() * input.imag()); diff --git a/Modules/Filtering/ImageIntensity/test/itkComplexToPhaseFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkComplexToPhaseFilterAndAdaptorTest.cxx index d5a33a4eac2..45966258c8a 100644 --- a/Modules/Filtering/ImageIntensity/test/itkComplexToPhaseFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkComplexToPhaseFilterAndAdaptorTest.cxx @@ -108,7 +108,7 @@ itkComplexToPhaseFilterAndAdaptorTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); const double phased = std::atan2(input.imag(), input.real()); diff --git a/Modules/Filtering/ImageIntensity/test/itkComplexToRealFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkComplexToRealFilterAndAdaptorTest.cxx index 46c031b4658..c83e01f766b 100644 --- a/Modules/Filtering/ImageIntensity/test/itkComplexToRealFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkComplexToRealFilterAndAdaptorTest.cxx @@ -108,7 +108,7 @@ itkComplexToRealFilterAndAdaptorTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); const OutputImageType::PixelType real = input.real(); if (!itk::Math::FloatAlmostEqual(real, output, 10, epsilon)) diff --git a/Modules/Filtering/ImageIntensity/test/itkCosImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkCosImageFilterAndAdaptorTest.cxx index f21fad55fce..4e5d3657791 100644 --- a/Modules/Filtering/ImageIntensity/test/itkCosImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkCosImageFilterAndAdaptorTest.cxx @@ -111,7 +111,7 @@ itkCosImageFilterAndAdaptorTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); const OutputImageType::PixelType cosinus = std::cos(input); if (!itk::Math::FloatAlmostEqual(cosinus, output, 10, epsilon)) diff --git a/Modules/Filtering/ImageIntensity/test/itkDiscreteGaussianDerivativeImageFunctionTest.cxx b/Modules/Filtering/ImageIntensity/test/itkDiscreteGaussianDerivativeImageFunctionTest.cxx index b9917cb79a9..2e551ff0f85 100644 --- a/Modules/Filtering/ImageIntensity/test/itkDiscreteGaussianDerivativeImageFunctionTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkDiscreteGaussianDerivativeImageFunctionTest.cxx @@ -60,8 +60,8 @@ itkDiscreteGaussianDerivativeImageFunctionTestND(int argc, char * argv[]) const double sigma = std::stod(argv[4]); - double maxError = 0.001; - unsigned int maxKernelWidth = 100; + double maxError = 0.001; + unsigned int maxKernelWidth = 100; typename GaussianDerivativeImageFunctionType::InterpolationModeEnum interpolationMode = GaussianDerivativeImageFunctionType::InterpolationModeEnum::NearestNeighbourInterpolation; @@ -137,9 +137,9 @@ itkDiscreteGaussianDerivativeImageFunctionTestND(int argc, char * argv[]) out.GoToBegin(); using PointType = typename GaussianDerivativeImageFunctionType::PointType; - PointType point; + PointType point; const unsigned long nop = inputImage->GetRequestedRegion().GetNumberOfPixels(); - unsigned long pixelNumber = 0; + unsigned long pixelNumber = 0; while (!it.IsAtEnd()) { // To test all available Evaluate functions, we split it in three parts. diff --git a/Modules/Filtering/ImageIntensity/test/itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx b/Modules/Filtering/ImageIntensity/test/itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx index 65ca196a33d..79ef31ffe8d 100644 --- a/Modules/Filtering/ImageIntensity/test/itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx @@ -54,8 +54,8 @@ itkDiscreteGradientMagnitudeGaussianImageFunctionTestND(int argc, char * argv[]) // Set up operator parameters const double sigma = std::stod(argv[3]); - double maxError = 0.001; - unsigned int maxKernelWidth = 100; + double maxError = 0.001; + unsigned int maxKernelWidth = 100; typename DiscreteGradientMagnitudeGaussianFunctionType::InterpolationModeEnum interpolationMode = DiscreteGradientMagnitudeGaussianFunctionType::InterpolationModeEnum::NearestNeighbourInterpolation; bool useImageSpacing = true; @@ -79,7 +79,7 @@ itkDiscreteGradientMagnitudeGaussianImageFunctionTestND(int argc, char * argv[]) } const double varianceValue = sigma * sigma; - auto varianceArray = + auto varianceArray = itk::MakeFilled(varianceValue); function->SetVariance(varianceArray); @@ -139,9 +139,9 @@ itkDiscreteGradientMagnitudeGaussianImageFunctionTestND(int argc, char * argv[]) out.GoToBegin(); using PointType = typename DiscreteGradientMagnitudeGaussianFunctionType::PointType; - PointType point; + PointType point; const unsigned long nop = inputImage->GetRequestedRegion().GetNumberOfPixels(); - unsigned long pixelNumber = 0; + unsigned long pixelNumber = 0; while (!it.IsAtEnd()) { // To test all available Evaluate functions, we split it in three parts. diff --git a/Modules/Filtering/ImageIntensity/test/itkDiscreteHessianGaussianImageFunctionTest.cxx b/Modules/Filtering/ImageIntensity/test/itkDiscreteHessianGaussianImageFunctionTest.cxx index ff39edc283d..3c998524eb1 100644 --- a/Modules/Filtering/ImageIntensity/test/itkDiscreteHessianGaussianImageFunctionTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkDiscreteHessianGaussianImageFunctionTest.cxx @@ -43,7 +43,7 @@ itkDiscreteHessianGaussianImageFunctionTestND(int argc, char * argv[]) // Create the itk::DiscreteHessianGaussianImageFunction using HessianGaussianImageFunctionType = itk::DiscreteHessianGaussianImageFunction; - typename HessianGaussianImageFunctionType::TensorType hessian; + typename HessianGaussianImageFunctionType::TensorType hessian; typename HessianGaussianImageFunctionType::TensorType::EigenValuesArrayType eigenValues; auto function = HessianGaussianImageFunctionType::New(); @@ -55,7 +55,7 @@ itkDiscreteHessianGaussianImageFunctionTestND(int argc, char * argv[]) // Set up operator parameters const double sigma = std::stod(argv[3]); - double maxError = 0.001; + double maxError = 0.001; unsigned int maxKernelWidth = 100; if (argc > 4) { @@ -134,7 +134,7 @@ itkDiscreteHessianGaussianImageFunctionTestND(int argc, char * argv[]) PointType point; using ContinuousIndexType = typename HessianGaussianImageFunctionType::ContinuousIndexType; const unsigned long nop = reader->GetOutput()->GetRequestedRegion().GetNumberOfPixels(); - unsigned long pixelNumber = 0; + unsigned long pixelNumber = 0; while (!it.IsAtEnd()) { if (pixelNumber < nop / 3) @@ -227,10 +227,10 @@ itkDiscreteHessianGaussianImageFunctionTestND(int argc, char * argv[]) // Exercise another interpolation mode: LinearInterpolation { function->SetInterpolationMode(HessianGaussianImageFunctionType::InterpolationModeEnum::LinearInterpolation); - const ImageType * inputImage = reader->GetOutput(); + const ImageType * inputImage = reader->GetOutput(); const typename ImageType::RegionType region = inputImage->GetBufferedRegion(); - typename ImageType::SizeType size = region.GetSize(); - typename ImageType::IndexType index = region.GetIndex(); + typename ImageType::SizeType size = region.GetSize(); + typename ImageType::IndexType index = region.GetIndex(); // Aim for the pixel at the center of the image for (unsigned int i = 0; i < Dimension; ++i) { diff --git a/Modules/Filtering/ImageIntensity/test/itkDivideImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkDivideImageFilterTest.cxx index 418dde743fa..6351cd2f880 100644 --- a/Modules/Filtering/ImageIntensity/test/itkDivideImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkDivideImageFilterTest.cxx @@ -111,7 +111,7 @@ itkDivideImageFilterTest(int, char *[]) // Check the content of the result image // - constexpr auto expectedValue = static_cast(valueA / valueB); + constexpr auto expectedValue = static_cast(valueA / valueB); constexpr OutputImageType::PixelType epsilon = 1e-6; while (!oIt.IsAtEnd()) { diff --git a/Modules/Filtering/ImageIntensity/test/itkDivideImageFilterTest2.cxx b/Modules/Filtering/ImageIntensity/test/itkDivideImageFilterTest2.cxx index 076a074379a..6045273e4ec 100644 --- a/Modules/Filtering/ImageIntensity/test/itkDivideImageFilterTest2.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkDivideImageFilterTest2.cxx @@ -79,7 +79,7 @@ itkDivideImageFilterTest2(int, char *[]) inputImageB->Allocate(); // Initialize the content of Image A - InputImageType1::PixelType valueA(inputImageA->GetNumberOfComponentsPerPixel()); + InputImageType1::PixelType valueA(inputImageA->GetNumberOfComponentsPerPixel()); constexpr InputImageType1::PixelType::ValueType elementValueA = 2.0; valueA.Fill(elementValueA); inputImageA->FillBuffer(valueA); diff --git a/Modules/Filtering/ImageIntensity/test/itkDivideOrZeroOutImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkDivideOrZeroOutImageFilterTest.cxx index 2dc90e37d0a..493bd9162e4 100644 --- a/Modules/Filtering/ImageIntensity/test/itkDivideOrZeroOutImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkDivideOrZeroOutImageFilterTest.cxx @@ -52,7 +52,7 @@ itkDivideOrZeroOutImageFilterTest(int, char *[]) divider->InPlaceOn(); divider->UpdateLargestPossibleRegion(); - const ImageType::RegionType region = divider->GetOutput()->GetLargestPossibleRegion(); + const ImageType::RegionType region = divider->GetOutput()->GetLargestPossibleRegion(); itk::ImageRegionConstIteratorWithIndex iter(divider->GetOutput(), region); for (; !iter.IsAtEnd(); ++iter) { diff --git a/Modules/Filtering/ImageIntensity/test/itkEdgePotentialImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkEdgePotentialImageFilterTest.cxx index 072611bd8a7..dba242dbe2c 100644 --- a/Modules/Filtering/ImageIntensity/test/itkEdgePotentialImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkEdgePotentialImageFilterTest.cxx @@ -89,7 +89,7 @@ itkEdgePotentialImageFilterTest(int, char *[]) // create an EdgePotentialImageFilter using FilterType = itk::EdgePotentialImageFilter; - auto filter = FilterType::New(); + auto filter = FilterType::New(); const itk::SimpleFilterWatcher watcher(filter); // Connect the input images @@ -111,7 +111,7 @@ itkEdgePotentialImageFilterTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); const OutputImageType::PixelType pot = std::exp(-1.0 * (it.Get().GetNorm())); std::cout << ot.Get() << " = "; diff --git a/Modules/Filtering/ImageIntensity/test/itkEqualTest.cxx b/Modules/Filtering/ImageIntensity/test/itkEqualTest.cxx index 9c44126d731..d543a2a7f5f 100644 --- a/Modules/Filtering/ImageIntensity/test/itkEqualTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkEqualTest.cxx @@ -203,7 +203,7 @@ itkEqualTest(int, char *[]) const PixelType FG = filter->GetFunctor().GetForegroundValue(); const PixelType BG = filter->GetFunctor().GetBackgroundValue(); const PixelType C = filter->GetConstant2(); - const int status2 = checkImOnConstRes>( + const int status2 = checkImOnConstRes>( inputImageA, C, outputImage, FG, BG); if (status2 == EXIT_FAILURE) { diff --git a/Modules/Filtering/ImageIntensity/test/itkExpImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkExpImageFilterAndAdaptorTest.cxx index 806f42f3cdd..aba14a5b4d5 100644 --- a/Modules/Filtering/ImageIntensity/test/itkExpImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkExpImageFilterAndAdaptorTest.cxx @@ -111,7 +111,7 @@ itkExpImageFilterAndAdaptorTest(int, char *[]) { std::cout << ot.Get() << " = "; std::cout << std::exp(it.Get()) << std::endl; - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); const OutputImageType::PixelType exponential = std::exp(input); if (itk::Math::abs(exponential - output) > epsilon) diff --git a/Modules/Filtering/ImageIntensity/test/itkExpNegativeImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkExpNegativeImageFilterAndAdaptorTest.cxx index 2590c61c8a6..8a2d376ac26 100644 --- a/Modules/Filtering/ImageIntensity/test/itkExpNegativeImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkExpNegativeImageFilterAndAdaptorTest.cxx @@ -110,7 +110,7 @@ itkExpNegativeImageFilterAndAdaptorTest(int, char *[]) while (!ot.IsAtEnd()) { std::cout << ot.Get() << " = "; - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); const OutputImageType::PixelType exponential = std::exp(-input); std::cout << exponential << std::endl; diff --git a/Modules/Filtering/ImageIntensity/test/itkGreaterEqualTest.cxx b/Modules/Filtering/ImageIntensity/test/itkGreaterEqualTest.cxx index a82b5ade690..75603e95689 100644 --- a/Modules/Filtering/ImageIntensity/test/itkGreaterEqualTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkGreaterEqualTest.cxx @@ -159,7 +159,7 @@ itkGreaterEqualTest(int, char *[]) const PixelType FG = filter->GetFunctor().GetForegroundValue(); const PixelType BG = filter->GetFunctor().GetBackgroundValue(); const PixelType C = filter->GetConstant2(); - const int status2 = checkImOnConstRes>( + const int status2 = checkImOnConstRes>( inputImageA, C, outputImage, FG, BG); if (status2 == EXIT_FAILURE) { diff --git a/Modules/Filtering/ImageIntensity/test/itkGreaterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkGreaterTest.cxx index d32cd926dec..2a4512f7b24 100644 --- a/Modules/Filtering/ImageIntensity/test/itkGreaterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkGreaterTest.cxx @@ -158,7 +158,7 @@ itkGreaterTest(int, char *[]) const PixelType FG = filter->GetFunctor().GetForegroundValue(); const PixelType BG = filter->GetFunctor().GetBackgroundValue(); const PixelType C = filter->GetConstant2(); - const int status2 = checkImOnConstRes>( + const int status2 = checkImOnConstRes>( inputImageA, C, outputImage, FG, BG); if (status2 == EXIT_FAILURE) { diff --git a/Modules/Filtering/ImageIntensity/test/itkHistogramMatchingImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkHistogramMatchingImageFilterTest.cxx index 7dc21ab66b2..862f7b914f7 100644 --- a/Modules/Filtering/ImageIntensity/test/itkHistogramMatchingImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkHistogramMatchingImageFilterTest.cxx @@ -128,10 +128,10 @@ PrintHistogramInfo(HistogramConstPointerType refHistogram) // If the reference histogram is provided, then extract summary statistics // directly from the histogram. - const auto & allReferenceMinsByDimension = refHistogram->GetMins(); // Array of dimensions - const auto & allReferenceMinsFirstDimension = allReferenceMinsByDimension.at(0); // Mins for dimension 0 - const auto & allReferenceMaxsByDimension = refHistogram->GetMaxs(); // Array of dimensions - const auto & allReferenceMaxsFirstDimension = allReferenceMaxsByDimension.at(0); // Maxes for dimension 0 + const auto & allReferenceMinsByDimension = refHistogram->GetMins(); // Array of dimensions + const auto & allReferenceMinsFirstDimension = allReferenceMinsByDimension.at(0); // Mins for dimension 0 + const auto & allReferenceMaxsByDimension = refHistogram->GetMaxs(); // Array of dimensions + const auto & allReferenceMaxsFirstDimension = allReferenceMaxsByDimension.at(0); // Maxes for dimension 0 constexpr int colWidth = 8; const std::ios_base::fmtflags initial_cout_state{ std::cout.flags() }; std::cout << std::left << std::setw(colWidth) << "INDEX" << std::left << std::setw(colWidth) << "FREQ" << std::left @@ -233,7 +233,7 @@ itkHistogramMatchingImageFilterTest() filterWithReferenceImage->SetNumberOfMatchPoints(numberOfMatchPoints); ITK_TEST_SET_GET_VALUE(numberOfMatchPoints, filterWithReferenceImage->GetNumberOfMatchPoints()); - ShowProgressObject progressWatch(filterWithReferenceImage); + ShowProgressObject progressWatch(filterWithReferenceImage); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); diff --git a/Modules/Filtering/ImageIntensity/test/itkIntensityWindowingImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkIntensityWindowingImageFilterTest.cxx index 1b855e3c9a2..a71d37c5f13 100644 --- a/Modules/Filtering/ImageIntensity/test/itkIntensityWindowingImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkIntensityWindowingImageFilterTest.cxx @@ -50,7 +50,7 @@ itkIntensityWindowingImageFilterTest(int, char *[]) // Generate a real image using SourceType = itk::RandomImageSource; - auto source = SourceType::New(); + auto source = SourceType::New(); TestInputImage::SizeValueType randomSize[3] = { 17, 8, 20 }; // Set up source diff --git a/Modules/Filtering/ImageIntensity/test/itkLessEqualTest.cxx b/Modules/Filtering/ImageIntensity/test/itkLessEqualTest.cxx index f0dd87189a3..d1857dc390a 100644 --- a/Modules/Filtering/ImageIntensity/test/itkLessEqualTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkLessEqualTest.cxx @@ -159,7 +159,7 @@ itkLessEqualTest(int, char *[]) const PixelType FG = filter->GetFunctor().GetForegroundValue(); const PixelType BG = filter->GetFunctor().GetBackgroundValue(); const PixelType C = filter->GetConstant2(); - const int status2 = checkImOnConstRes>( + const int status2 = checkImOnConstRes>( inputImageA, C, outputImage, FG, BG); if (status2 == EXIT_FAILURE) { diff --git a/Modules/Filtering/ImageIntensity/test/itkLessTest.cxx b/Modules/Filtering/ImageIntensity/test/itkLessTest.cxx index c92ce13d688..d2cd0ce2ab5 100644 --- a/Modules/Filtering/ImageIntensity/test/itkLessTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkLessTest.cxx @@ -156,7 +156,7 @@ itkLessTest(int, char *[]) const PixelType FG = filter->GetFunctor().GetForegroundValue(); const PixelType BG = filter->GetFunctor().GetBackgroundValue(); const PixelType C = filter->GetConstant2(); - const int status2 = checkImOnConstRes>( + const int status2 = checkImOnConstRes>( inputImageA, C, outputImage, FG, BG); if (status2 == EXIT_FAILURE) { diff --git a/Modules/Filtering/ImageIntensity/test/itkLog10ImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkLog10ImageFilterAndAdaptorTest.cxx index e2c02ba203f..6356dc413f3 100644 --- a/Modules/Filtering/ImageIntensity/test/itkLog10ImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkLog10ImageFilterAndAdaptorTest.cxx @@ -109,7 +109,7 @@ itkLog10ImageFilterAndAdaptorTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); const OutputImageType::PixelType naturallog = std::log10(input); if (!itk::Math::FloatAlmostEqual(naturallog, output, 10, epsilon)) diff --git a/Modules/Filtering/ImageIntensity/test/itkLogImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkLogImageFilterAndAdaptorTest.cxx index f3be69e3727..d99c425b9b2 100644 --- a/Modules/Filtering/ImageIntensity/test/itkLogImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkLogImageFilterAndAdaptorTest.cxx @@ -110,7 +110,7 @@ itkLogImageFilterAndAdaptorTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); const OutputImageType::PixelType logarithm = std::log(input); if (!itk::Math::FloatAlmostEqual(logarithm, output, 10, epsilon)) diff --git a/Modules/Filtering/ImageIntensity/test/itkLogicTestSupport.h b/Modules/Filtering/ImageIntensity/test/itkLogicTestSupport.h index 9be27146fb3..3416efbf379 100644 --- a/Modules/Filtering/ImageIntensity/test/itkLogicTestSupport.h +++ b/Modules/Filtering/ImageIntensity/test/itkLogicTestSupport.h @@ -30,9 +30,9 @@ template int -checkImOnImRes(typename InIm1Type::Pointer A, - typename InIm2Type::Pointer B, - typename ResImType::Pointer Res, +checkImOnImRes(typename InIm1Type::Pointer A, + typename InIm2Type::Pointer B, + typename ResImType::Pointer Res, typename ResImType::PixelType FG, typename ResImType::PixelType BG) { @@ -69,9 +69,9 @@ checkImOnImRes(typename InIm1Type::Pointer A, template int -checkImOnConstRes(typename InIm1Type::Pointer A, - ConstType B, - typename ResImType::Pointer Res, +checkImOnConstRes(typename InIm1Type::Pointer A, + ConstType B, + typename ResImType::Pointer Res, typename ResImType::PixelType FG, typename ResImType::PixelType BG) { @@ -106,9 +106,9 @@ checkImOnConstRes(typename InIm1Type::Pointer A, template int -checkConstOnImRes(ConstType A, - typename InIm1Type::Pointer B, - typename ResImType::Pointer Res, +checkConstOnImRes(ConstType A, + typename InIm1Type::Pointer B, + typename ResImType::Pointer Res, typename ResImType::PixelType FG, typename ResImType::PixelType BG) { diff --git a/Modules/Filtering/ImageIntensity/test/itkMaskImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkMaskImageFilterTest.cxx index 9763bd384f9..cbe0928fd2a 100644 --- a/Modules/Filtering/ImageIntensity/test/itkMaskImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkMaskImageFilterTest.cxx @@ -182,7 +182,7 @@ itkMaskImageFilterTest(int, char *[]) // Check that the outside value consists of three zeros. const myVectorImageType::PixelType outsideValue3 = vectorFilter->GetOutsideValue(); - myVectorImageType::PixelType threeZeros(3); + myVectorImageType::PixelType threeZeros(3); threeZeros.Fill(0.0f); if (outsideValue3 != threeZeros) { @@ -246,7 +246,7 @@ itkMaskImageFilterTest(int, char *[]) // Check updated outside value. const myVectorImageType::PixelType outsideValue5 = vectorFilter->GetOutsideValue(); - myVectorImageType::PixelType fiveZeros(5); + myVectorImageType::PixelType fiveZeros(5); fiveZeros.Fill(0.0f); if (outsideValue5 != fiveZeros) { diff --git a/Modules/Filtering/ImageIntensity/test/itkMaskNegatedImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkMaskNegatedImageFilterTest.cxx index 9d451c4725c..7c68ab3149d 100644 --- a/Modules/Filtering/ImageIntensity/test/itkMaskNegatedImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkMaskNegatedImageFilterTest.cxx @@ -183,7 +183,7 @@ itkMaskNegatedImageFilterTest(int, char *[]) // Check that the outside value consists of three zeros. const myVectorImageType::PixelType outsideValue3 = vectorFilter->GetOutsideValue(); - myVectorImageType::PixelType threeZeros(3); + myVectorImageType::PixelType threeZeros(3); threeZeros.Fill(0.0f); ITK_TEST_EXPECT_EQUAL(outsideValue3, threeZeros); diff --git a/Modules/Filtering/ImageIntensity/test/itkMatrixIndexSelectionImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkMatrixIndexSelectionImageFilterTest.cxx index 2fcb60d0666..2bba1704b4a 100644 --- a/Modules/Filtering/ImageIntensity/test/itkMatrixIndexSelectionImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkMatrixIndexSelectionImageFilterTest.cxx @@ -44,7 +44,7 @@ itkMatrixIndexSelectionImageFilterTest(int argc, char * argv[]) using OutputImageType = itk::Image; // Create a matrix image - auto image = InputImageType::New(); + auto image = InputImageType::New(); InputImageType::RegionType region; auto size = InputImageType::SizeType::Filled(100); diff --git a/Modules/Filtering/ImageIntensity/test/itkMultiplyImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkMultiplyImageFilterTest.cxx index 30bd3474a79..8cca68281c4 100644 --- a/Modules/Filtering/ImageIntensity/test/itkMultiplyImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkMultiplyImageFilterTest.cxx @@ -111,7 +111,7 @@ itkMultiplyImageFilterTest(int, char *[]) // Check the content of the result image // - constexpr auto expectedValue = static_cast(valueA * valueB); + constexpr auto expectedValue = static_cast(valueA * valueB); constexpr OutputImageType::PixelType epsilon = 1e-6; while (!oIt.IsAtEnd()) { diff --git a/Modules/Filtering/ImageIntensity/test/itkNaryAddImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkNaryAddImageFilterTest.cxx index 137754d4ab6..dbc0b4b694c 100644 --- a/Modules/Filtering/ImageIntensity/test/itkNaryAddImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkNaryAddImageFilterTest.cxx @@ -100,13 +100,13 @@ itkNaryAddImageFilterTest(int, char *[]) using InputImageIteratorType = itk::ImageRegionConstIterator; using OutputImageIteratorType = itk::ImageRegionConstIterator; - InputImageIteratorType iterA(inputImageA, inputImageA->GetRequestedRegion()); - InputImageIteratorType iterB(inputImageB, inputImageA->GetRequestedRegion()); - InputImageIteratorType iterC(inputImageC, inputImageA->GetRequestedRegion()); + InputImageIteratorType iterA(inputImageA, inputImageA->GetRequestedRegion()); + InputImageIteratorType iterB(inputImageB, inputImageA->GetRequestedRegion()); + InputImageIteratorType iterC(inputImageC, inputImageA->GetRequestedRegion()); OutputImageIteratorType oIt(outputImage, inputImageA->GetRequestedRegion()); constexpr OutputImageType::PixelType epsilon = 1e-9; - unsigned int failures = 0; + unsigned int failures = 0; while (!oIt.IsAtEnd()) { auto expectedValue = static_cast(iterA.Get() + iterB.Get() + iterC.Get()); @@ -174,15 +174,15 @@ itkNaryAddImageFilterTest(int, char *[]) auto vectorImageC = VectorImageType::New(); constexpr VectorImageType::PixelType::ValueType vectorValueA = 12; - auto vectorImageValueA = itk::MakeFilled(vectorValueA); + auto vectorImageValueA = itk::MakeFilled(vectorValueA); vectorImageValueA[0] = 5; constexpr VectorImageType::PixelType::ValueType vectorValueB = 17; - auto vectorImageValueB = itk::MakeFilled(vectorValueB); + auto vectorImageValueB = itk::MakeFilled(vectorValueB); vectorImageValueB[0] = 9; constexpr VectorImageType::PixelType::ValueType vectorValueC = -4; - auto vectorImageValueC = itk::MakeFilled(vectorValueC); + auto vectorImageValueC = itk::MakeFilled(vectorValueC); vectorImageValueC[0] = -80; InitializeImage(vectorImageA, vectorImageValueA); diff --git a/Modules/Filtering/ImageIntensity/test/itkNormalizeImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkNormalizeImageFilterTest.cxx index d08e144cbd6..0f95a15a4cd 100644 --- a/Modules/Filtering/ImageIntensity/test/itkNormalizeImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkNormalizeImageFilterTest.cxx @@ -33,7 +33,7 @@ itkNormalizeImageFilterTest(int, char *[]) // Generate a real image using SourceType = itk::RandomImageSource; - auto source = SourceType::New(); + auto source = SourceType::New(); ShortImage::SizeValueType randomSize[3] = { 18, 17, 67 }; source->SetSize(randomSize); @@ -44,7 +44,7 @@ itkNormalizeImageFilterTest(int, char *[]) source->SetMax(static_cast(maxValue)); using NormalizeType = itk::NormalizeImageFilter; - auto normalize = NormalizeType::New(); + auto normalize = NormalizeType::New(); const itk::SimpleFilterWatcher watch(normalize, "Streaming"); normalize->SetInput(source->GetOutput()); diff --git a/Modules/Filtering/ImageIntensity/test/itkNotEqualTest.cxx b/Modules/Filtering/ImageIntensity/test/itkNotEqualTest.cxx index c4d90a47c87..2d07ab1ff88 100644 --- a/Modules/Filtering/ImageIntensity/test/itkNotEqualTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkNotEqualTest.cxx @@ -158,7 +158,7 @@ itkNotEqualTest(int, char *[]) const PixelType FG = filter->GetFunctor().GetForegroundValue(); const PixelType BG = filter->GetFunctor().GetBackgroundValue(); const PixelType C = filter->GetConstant2(); - const int status2 = checkImOnConstRes>( + const int status2 = checkImOnConstRes>( inputImageA, C, outputImage, FG, BG); if (status2 == EXIT_FAILURE) { diff --git a/Modules/Filtering/ImageIntensity/test/itkNotImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkNotImageFilterTest.cxx index 3551d600073..d319324b360 100644 --- a/Modules/Filtering/ImageIntensity/test/itkNotImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkNotImageFilterTest.cxx @@ -116,7 +116,7 @@ itkNotImageFilterTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); ITK_TEST_EXPECT_EQUAL(input, !output); ++ot; diff --git a/Modules/Filtering/ImageIntensity/test/itkRGBToLuminanceImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkRGBToLuminanceImageFilterAndAdaptorTest.cxx index 2a6e4d88aab..96eb0e3d346 100644 --- a/Modules/Filtering/ImageIntensity/test/itkRGBToLuminanceImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkRGBToLuminanceImageFilterAndAdaptorTest.cxx @@ -119,9 +119,9 @@ itkRGBToLuminanceImageFilterAndAdaptorTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputPixelType input = it.Get(); + const InputPixelType input = it.Get(); const OutputPixelType output = ot.Get(); - const auto value = static_cast(input.GetLuminance()); + const auto value = static_cast(input.GetLuminance()); if (!itk::Math::FloatAlmostEqual(value, output, 10, epsilon)) { std::cerr.precision(static_cast(itk::Math::abs(std::log10(epsilon)))); diff --git a/Modules/Filtering/ImageIntensity/test/itkRGBToVectorAdaptImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkRGBToVectorAdaptImageFilterTest.cxx index 2ff50d08ab8..a2245e17640 100644 --- a/Modules/Filtering/ImageIntensity/test/itkRGBToVectorAdaptImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkRGBToVectorAdaptImageFilterTest.cxx @@ -112,7 +112,7 @@ itkRGBToVectorAdaptImageFilterTest(int, char *[]) it1.GoToBegin(); while (!it.IsAtEnd()) { - VectorPixelType v = it.Get(); + VectorPixelType v = it.Get(); const RGBPixelType c = it1.Get(); if (itk::Math::NotExactlyEquals(v[0], c.GetRed()) || itk::Math::NotExactlyEquals(v[1], c.GetGreen()) || diff --git a/Modules/Filtering/ImageIntensity/test/itkRoundImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkRoundImageFilterTest.cxx index 810908cc3be..3eaa79cf8f1 100644 --- a/Modules/Filtering/ImageIntensity/test/itkRoundImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkRoundImageFilterTest.cxx @@ -58,7 +58,7 @@ itkRoundImageFilterTest(int, char *[]) ITK_TRY_EXPECT_NO_EXCEPTION(roundImageFilter->Update()); - itk::ImageRegionIterator it1(randomImageSource->GetOutput(), + itk::ImageRegionIterator it1(randomImageSource->GetOutput(), randomImageSource->GetOutput()->GetLargestPossibleRegion()); itk::ImageRegionIterator it2(roundImageFilter->GetOutput(), roundImageFilter->GetOutput()->GetLargestPossibleRegion()); diff --git a/Modules/Filtering/ImageIntensity/test/itkShiftScaleImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkShiftScaleImageFilterTest.cxx index bf6f20c4dab..b9b8e0941f0 100644 --- a/Modules/Filtering/ImageIntensity/test/itkShiftScaleImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkShiftScaleImageFilterTest.cxx @@ -33,9 +33,9 @@ itkShiftScaleImageFilterTest(int, char *[]) using TestOutputImage = itk::Image; using RealType = itk::NumericTraits::RealType; - auto inputImage = TestInputImage::New(); - TestInputImage::RegionType region; - auto size = TestInputImage::SizeType::Filled(64); + auto inputImage = TestInputImage::New(); + TestInputImage::RegionType region; + auto size = TestInputImage::SizeType::Filled(64); constexpr TestInputImage::IndexType index{}; region.SetIndex(index); @@ -60,7 +60,7 @@ itkShiftScaleImageFilterTest(int, char *[]) // Now generate a real image using SourceType = itk::RandomImageSource; - auto source = SourceType::New(); + auto source = SourceType::New(); TestInputImage::SizeValueType randomSize[3] = { 17, 8, 20 }; // Set up Start, End and Progress callbacks diff --git a/Modules/Filtering/ImageIntensity/test/itkSigmoidImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkSigmoidImageFilterTest.cxx index d32f2747b1f..faf700a81e9 100644 --- a/Modules/Filtering/ImageIntensity/test/itkSigmoidImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkSigmoidImageFilterTest.cxx @@ -129,11 +129,11 @@ itkSigmoidImageFilterTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); - const double x1 = (input - beta) / alpha; - const double x2 = (maximum - minimum) * (1.0 / (1.0 + std::exp(-x1))) + minimum; - const auto sigmoid = static_cast(x2); + const double x1 = (input - beta) / alpha; + const double x2 = (maximum - minimum) * (1.0 / (1.0 + std::exp(-x1))) + minimum; + const auto sigmoid = static_cast(x2); if (!itk::Math::FloatAlmostEqual(sigmoid, output, 10, epsilon)) { std::cerr.precision(static_cast(itk::Math::abs(std::log10(epsilon)))); diff --git a/Modules/Filtering/ImageIntensity/test/itkSinImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkSinImageFilterAndAdaptorTest.cxx index 008e41f72ad..f60b6c328dc 100644 --- a/Modules/Filtering/ImageIntensity/test/itkSinImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkSinImageFilterAndAdaptorTest.cxx @@ -111,7 +111,7 @@ itkSinImageFilterAndAdaptorTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); const OutputImageType::PixelType sinus = std::sin(input); if (!itk::Math::FloatAlmostEqual(sinus, output, 10, epsilon)) diff --git a/Modules/Filtering/ImageIntensity/test/itkSqrtImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkSqrtImageFilterAndAdaptorTest.cxx index 586ae8f5672..1691b6d752f 100644 --- a/Modules/Filtering/ImageIntensity/test/itkSqrtImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkSqrtImageFilterAndAdaptorTest.cxx @@ -111,7 +111,7 @@ itkSqrtImageFilterAndAdaptorTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); const OutputImageType::PixelType sqroot = std::sqrt(input); if (!itk::Math::FloatAlmostEqual(sqroot, output, 10, epsilon)) diff --git a/Modules/Filtering/ImageIntensity/test/itkSquareImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkSquareImageFilterTest.cxx index 79d91588b25..3e72df6f70f 100644 --- a/Modules/Filtering/ImageIntensity/test/itkSquareImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkSquareImageFilterTest.cxx @@ -110,11 +110,11 @@ itkSquareImageFilterTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); - const double x1 = input; - const double x2 = x1 * x1; - const auto square = static_cast(x2); + const double x1 = input; + const double x2 = x1 * x1; + const auto square = static_cast(x2); if (!itk::Math::FloatAlmostEqual(square, output, 10, epsilon)) { std::cerr.precision(static_cast(itk::Math::abs(std::log10(epsilon)))); diff --git a/Modules/Filtering/ImageIntensity/test/itkSymmetricEigenAnalysisImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkSymmetricEigenAnalysisImageFilterTest.cxx index 81fd8a7bbf9..f901da693eb 100644 --- a/Modules/Filtering/ImageIntensity/test/itkSymmetricEigenAnalysisImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkSymmetricEigenAnalysisImageFilterTest.cxx @@ -347,7 +347,7 @@ itkSymmetricEigenAnalysisImageFilterTest(int argc, char * argv[]) using FilterFixedDimensionType = itk::SymmetricEigenAnalysisFixedDimensionImageFilter; - auto orderFixedDimension = static_cast(std::stoi(argv[2])); + auto orderFixedDimension = static_cast(std::stoi(argv[2])); const std::string outputFilenameFixedDimension = argv[3]; // Create an instance to exercise basic object methods auto filterFixedDimension = FilterFixedDimensionType::New(); diff --git a/Modules/Filtering/ImageIntensity/test/itkTanImageFilterAndAdaptorTest.cxx b/Modules/Filtering/ImageIntensity/test/itkTanImageFilterAndAdaptorTest.cxx index ceda49c615d..cf510e8b188 100644 --- a/Modules/Filtering/ImageIntensity/test/itkTanImageFilterAndAdaptorTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkTanImageFilterAndAdaptorTest.cxx @@ -110,7 +110,7 @@ itkTanImageFilterAndAdaptorTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputImageType::PixelType input = it.Get(); + const InputImageType::PixelType input = it.Get(); const OutputImageType::PixelType output = ot.Get(); const OutputImageType::PixelType tangent = std::tan(input); if (!itk::Math::FloatAlmostEqual(tangent, output, 10, epsilon)) diff --git a/Modules/Filtering/ImageIntensity/test/itkTernaryOperatorImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkTernaryOperatorImageFilterTest.cxx index b70ecae631b..2a69d5cc18a 100644 --- a/Modules/Filtering/ImageIntensity/test/itkTernaryOperatorImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkTernaryOperatorImageFilterTest.cxx @@ -68,8 +68,8 @@ itkTernaryOperatorImageFilterTest(int, char *[]) using GrayImageType = itk::Image; constexpr MaskImageType::IndexType origin{}; - auto size = MaskImageType::SizeType::Filled(20); - const MaskImageType::RegionType region(origin, size); + auto size = MaskImageType::SizeType::Filled(20); + const MaskImageType::RegionType region(origin, size); auto mask = MaskImageType::New(); mask->SetRegions(region); @@ -88,13 +88,13 @@ itkTernaryOperatorImageFilterTest(int, char *[]) } constexpr short val1 = 25; - auto image1 = GrayImageType::New(); + auto image1 = GrayImageType::New(); image1->SetRegions(region); image1->Allocate(); image1->FillBuffer(val1); constexpr short val2 = 123; - auto image2 = GrayImageType::New(); + auto image2 = GrayImageType::New(); image2->SetRegions(region); image2->Allocate(); image2->FillBuffer(val2); diff --git a/Modules/Filtering/ImageIntensity/test/itkVectorExpandImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkVectorExpandImageFilterTest.cxx index d0a13a8de95..fff4b6692ec 100644 --- a/Modules/Filtering/ImageIntensity/test/itkVectorExpandImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkVectorExpandImageFilterTest.cxx @@ -91,7 +91,7 @@ itkVectorExpandImageFilterTest(int, char *[]) std::cout << "Create the input image pattern." << std::endl; - ImageType::RegionType region; + ImageType::RegionType region; constexpr ImageType::SizeType size = { { 64, 64 } }; region.SetSize(size); @@ -100,7 +100,7 @@ itkVectorExpandImageFilterTest(int, char *[]) input->SetBufferedRegion(region); input->Allocate(); - int j, k; + int j, k; ImagePattern pattern; pattern.m_Offset = 64; for (j = 0; j < ImageDimension; ++j) @@ -117,7 +117,7 @@ itkVectorExpandImageFilterTest(int, char *[]) { const double value = pattern.Evaluate(inIter.GetIndex()); - PixelType pixel; + PixelType pixel; for (k = 0; k < VectorDimension; ++k) { pixel[k] = vectorCoeff[k] * value; @@ -150,11 +150,11 @@ itkVectorExpandImageFilterTest(int, char *[]) using PixelType = ImageType::PixelType; using ValueType = PixelType::ValueType; - ValueType padValueArray[VectorDimension] = { 2.0, 7.0, 9.0 }; + ValueType padValueArray[VectorDimension] = { 2.0, 7.0, 9.0 }; ImageType::PixelType padValue(padValueArray); // TEST_RMV20100728 expander->SetEdgePaddingValue( padValue ); - ShowProgressObject progressWatch(expander); + ShowProgressObject progressWatch(expander); itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); expander->AddObserver(itk::ProgressEvent(), command); @@ -169,7 +169,7 @@ itkVectorExpandImageFilterTest(int, char *[]) Iterator outIter(expanderOutput, expanderOutput->GetBufferedRegion()); // compute non-padded output region - ImageType::RegionType validRegion = expanderOutput->GetLargestPossibleRegion(); + ImageType::RegionType validRegion = expanderOutput->GetLargestPossibleRegion(); const ImageType::SizeType validSize = validRegion.GetSize(); validRegion.SetSize(validSize); @@ -177,7 +177,7 @@ itkVectorExpandImageFilterTest(int, char *[]) for (; !outIter.IsAtEnd(); ++outIter) { const ImageType::IndexType index = outIter.GetIndex(); - ImageType::PixelType value = outIter.Get(); + ImageType::PixelType value = outIter.Get(); if (validRegion.IsInside(index)) { @@ -185,7 +185,7 @@ itkVectorExpandImageFilterTest(int, char *[]) ImageType::PointType point; expanderOutput->TransformIndexToPhysicalPoint(outIter.GetIndex(), point); const ImageType::IndexType inputIndex = input->TransformPhysicalPointToIndex(point); - const double baseValue = pattern.Evaluate(inputIndex); + const double baseValue = pattern.Evaluate(inputIndex); for (k = 0; k < VectorDimension; ++k) { diff --git a/Modules/Filtering/ImageIntensity/test/itkVectorRescaleIntensityImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkVectorRescaleIntensityImageFilterTest.cxx index c0c8ebf4eef..70454fc9704 100644 --- a/Modules/Filtering/ImageIntensity/test/itkVectorRescaleIntensityImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkVectorRescaleIntensityImageFilterTest.cxx @@ -36,10 +36,10 @@ itkVectorRescaleIntensityImageFilterTest(int, char *[]) using InputImageType = itk::Image; using OutputImageType = itk::Image; - auto inputImage = InputImageType::New(); + auto inputImage = InputImageType::New(); InputImageType::RegionType region; - InputImageType::SizeType size; - InputImageType::IndexType index; + InputImageType::SizeType size; + InputImageType::IndexType index; size.Fill(20); index.Fill(0); diff --git a/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.h b/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.h index 0b332b93da0..369c7364ad1 100644 --- a/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.h +++ b/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.h @@ -176,7 +176,7 @@ class ITK_TEMPLATE_EXPORT BinaryContourImageFilter LineMapType m_ForegroundLineMap{}; LineMapType m_BackgroundLineMap{}; - InputImagePixelType m_ForegroundValue{}; + InputImagePixelType m_ForegroundValue{}; OutputImagePixelType m_BackgroundValue{}; }; } // end namespace itk diff --git a/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.hxx b/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.hxx index c564bf36249..2ab59a7c3c0 100644 --- a/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.hxx +++ b/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.hxx @@ -102,10 +102,10 @@ template void BinaryContourImageFilter::BeforeThreadedGenerateData() { - const OutputImagePointer output = this->GetOutput(); + const OutputImagePointer output = this->GetOutput(); const InputImageConstPointer input = this->GetInput(); - const RegionType & reqRegion = output->GetRequestedRegion(); + const RegionType & reqRegion = output->GetRequestedRegion(); const SizeValueType pixelcount = reqRegion.GetNumberOfPixels(); const SizeValueType xsize = reqRegion.GetSize()[0]; const SizeValueType linecount = (xsize > 0 ? pixelcount / xsize : 0); @@ -122,7 +122,7 @@ void BinaryContourImageFilter::DynamicThreadedGenerateData( const RegionType & outputRegionForThread) { - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); const InputImageType * input = this->GetInput(); ImageScanlineConstIterator inLineIt(input, outputRegionForThread); @@ -131,7 +131,7 @@ BinaryContourImageFilter::DynamicThreadedGenerateData for (inLineIt.GoToBegin(); !inLineIt.IsAtEnd(); inLineIt.NextLine(), outLineIt.NextLine()) { - SizeValueType lineId = this->IndexToLinearIndex(inLineIt.GetIndex()); + SizeValueType lineId = this->IndexToLinearIndex(inLineIt.GetIndex()); LineEncodingType fgLine; LineEncodingType bgLine; @@ -142,7 +142,7 @@ BinaryContourImageFilter::DynamicThreadedGenerateData if (Math::AlmostEquals(PVal, m_ForegroundValue)) { // We've hit the start of a run - SizeValueType length = 0; + SizeValueType length = 0; const IndexType thisIndex = inLineIt.GetIndex(); outLineIt.Set(m_BackgroundValue); @@ -164,7 +164,7 @@ BinaryContourImageFilter::DynamicThreadedGenerateData else { // We've hit the start of a run - SizeValueType length = 0; + SizeValueType length = 0; const IndexType thisIndex = inLineIt.GetIndex(); outLineIt.Set(PVal); diff --git a/Modules/Filtering/ImageLabel/include/itkChangeLabelImageFilter.hxx b/Modules/Filtering/ImageLabel/include/itkChangeLabelImageFilter.hxx index fb3e8c1a187..722512bb8db 100644 --- a/Modules/Filtering/ImageLabel/include/itkChangeLabelImageFilter.hxx +++ b/Modules/Filtering/ImageLabel/include/itkChangeLabelImageFilter.hxx @@ -36,7 +36,7 @@ namespace itk */ template void -ChangeLabelImageFilter::SetChange(const InputPixelType & original, +ChangeLabelImageFilter::SetChange(const InputPixelType & original, const OutputPixelType & result) { const OutputPixelType current = this->GetFunctor().GetChange(original); diff --git a/Modules/Filtering/ImageLabel/include/itkLabelContourImageFilter.hxx b/Modules/Filtering/ImageLabel/include/itkLabelContourImageFilter.hxx index 18d72c8ae95..6006474c36e 100644 --- a/Modules/Filtering/ImageLabel/include/itkLabelContourImageFilter.hxx +++ b/Modules/Filtering/ImageLabel/include/itkLabelContourImageFilter.hxx @@ -112,7 +112,7 @@ void LabelContourImageFilter::DynamicThreadedGenerateData( const OutputRegionType & outputRegionForThread) { - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); const InputImageType * input = this->GetInput(); ImageScanlineConstIterator inLineIt(input, outputRegionForThread); @@ -122,12 +122,12 @@ LabelContourImageFilter::DynamicThreadedGenerateData( for (inLineIt.GoToBegin(); !inLineIt.IsAtEnd(); inLineIt.NextLine(), outLineIt.NextLine()) { const SizeValueType lineId = this->IndexToLinearIndex(inLineIt.GetIndex()); - LineEncodingType thisLine; + LineEncodingType thisLine; while (!inLineIt.IsAtEndOfLine()) { const InputPixelType PVal = inLineIt.Get(); - SizeValueType length = 0; + SizeValueType length = 0; const InputIndexType thisIndex = inLineIt.GetIndex(); outLineIt.Set(m_BackgroundValue); ++length; @@ -156,8 +156,8 @@ LabelContourImageFilter::ThreadedIntegrateData( { OutputImageType * output = this->GetOutput(); - const SizeValueType pixelcount = output->GetRequestedRegion().GetNumberOfPixels(); - const SizeValueType xsize = output->GetRequestedRegion().GetSize()[0]; + const SizeValueType pixelcount = output->GetRequestedRegion().GetNumberOfPixels(); + const SizeValueType xsize = output->GetRequestedRegion().GetSize()[0]; const OffsetValueType linecount = pixelcount / xsize; itkAssertInDebugAndIgnoreInReleaseMacro(SizeValueType(linecount) == m_LineMap.size()); diff --git a/Modules/Filtering/ImageLabel/include/itkScanlineFilterCommon.h b/Modules/Filtering/ImageLabel/include/itkScanlineFilterCommon.h index a71a923325d..e8c4d84339e 100644 --- a/Modules/Filtering/ImageLabel/include/itkScanlineFilterCommon.h +++ b/Modules/Filtering/ImageLabel/include/itkScanlineFilterCommon.h @@ -113,9 +113,9 @@ class ScanlineFilterCommon struct RunLength { - SizeValueType length; + SizeValueType length; typename InputImageType::IndexType where; - InternalLabelType label; + InternalLabelType label; RunLength(SizeValueType iLength, const IndexType & iWhere, InternalLabelType iLabel = 0) : length(iLength) @@ -139,8 +139,8 @@ class ScanlineFilterCommon SizeValueType IndexToLinearIndex(const IndexType & index) const { - SizeValueType linearIndex = 0; - SizeValueType stride = 1; + SizeValueType linearIndex = 0; + SizeValueType stride = 1; const RegionType requestedRegion = m_EnclosingFilter->GetOutput()->GetRequestedRegion(); // ignore x axis, which is always full size for (unsigned int dim = 1; dim < ImageDimension; ++dim) @@ -157,8 +157,8 @@ class ScanlineFilterCommon { m_UnionFind = UnionFindType(numberOfLabels + 1); - const auto MapBegin = m_LineMap.begin(); - const auto MapEnd = m_LineMap.end(); + const auto MapBegin = m_LineMap.begin(); + const auto MapEnd = m_LineMap.end(); InternalLabelType label = 1; for (typename LineMapType::iterator LineIt = MapBegin; LineIt != MapEnd; ++LineIt) { @@ -186,8 +186,8 @@ class ScanlineFilterCommon LinkLabels(const InternalLabelType label1, const InternalLabelType label2) { const std::lock_guard lockGuard(m_Mutex); - const InternalLabelType E1 = this->LookupSet(label1); - const InternalLabelType E2 = this->LookupSet(label2); + const InternalLabelType E1 = this->LookupSet(label1); + const InternalLabelType E2 = this->LookupSet(label2); if (E1 < E2) { @@ -208,7 +208,7 @@ class ScanlineFilterCommon m_Consecutive[0] = backgroundValue; OutputPixelType consecutiveLabel = 0; - SizeValueType count = 0; + SizeValueType count = 0; for (size_t i = 1; i < N; ++i) { @@ -252,16 +252,16 @@ class ScanlineFilterCommon using CompareLinesCallback = std::function; + OffsetValueType oStart, + OffsetValueType oLast)>; void CompareLines(const LineEncodingType & current, const LineEncodingType & Neighbour, - bool sameLineOffset, - bool labelCompare, - OutputPixelType background, - CompareLinesCallback callback) + bool sameLineOffset, + bool labelCompare, + OutputPixelType background, + CompareLinesCallback callback) { bool sameLine = sameLineOffset; if (sameLineOffset) @@ -323,7 +323,7 @@ class ScanlineFilterCommon const OffsetValueType ee1 = nLast - offset; const OffsetValueType ee2 = nLast + offset; - bool eq = false; + bool eq = false; OffsetValueType oStart = 0; OffsetValueType oLast = 0; @@ -409,7 +409,7 @@ class ScanlineFilterCommon LineRegion.SetSize(PretendSize); fakeImage->SetRegions(LineRegion); - auto kernelRadius = PretendSizeType::Filled(1); + auto kernelRadius = PretendSizeType::Filled(1); LineNeighborhoodType lnit(kernelRadius, fakeImage, LineRegion); if (wholeNeighborhood) @@ -424,7 +424,7 @@ class ScanlineFilterCommon typename LineNeighborhoodType::IndexListType ActiveIndexes = lnit.GetActiveIndexList(); const PretendIndexType idx = LineRegion.GetIndex(); - const OffsetValueType offset = fakeImage->ComputeOffset(idx); + const OffsetValueType offset = fakeImage->ComputeOffset(idx); for (auto LI = ActiveIndexes.begin(); LI != ActiveIndexes.end(); ++LI) { @@ -462,8 +462,8 @@ class ScanlineFilterCommon ComputeEquivalence(const SizeValueType workUnitResultsIndex, bool strictlyLess) { const OffsetValueType linecount = m_LineMap.size(); - const WorkUnitData wud = m_WorkUnitResults[workUnitResultsIndex]; - SizeValueType lastLine = wud.lastLine; + const WorkUnitData wud = m_WorkUnitResults[workUnitResultsIndex]; + SizeValueType lastLine = wud.lastLine; if (!strictlyLess) { ++lastLine; @@ -503,15 +503,15 @@ class ScanlineFilterCommon } protected: - bool m_FullyConnected{ false }; - OffsetVectorType m_LineOffsets; - UnionFindType m_UnionFind; + bool m_FullyConnected{ false }; + OffsetVectorType m_LineOffsets; + UnionFindType m_UnionFind; ConsecutiveVectorType m_Consecutive; - std::mutex m_Mutex; + std::mutex m_Mutex; std::atomic m_NumberOfLabels; - std::deque m_WorkUnitResults; - LineMapType m_LineMap; + std::deque m_WorkUnitResults; + LineMapType m_LineMap; }; } // end namespace itk diff --git a/Modules/Filtering/ImageLabel/test/itkChangeLabelImageFilterTest.cxx b/Modules/Filtering/ImageLabel/test/itkChangeLabelImageFilterTest.cxx index 6b78bb5a54b..d932950cac7 100644 --- a/Modules/Filtering/ImageLabel/test/itkChangeLabelImageFilterTest.cxx +++ b/Modules/Filtering/ImageLabel/test/itkChangeLabelImageFilterTest.cxx @@ -90,7 +90,7 @@ itkChangeLabelImageFilterTest(int, char *[]) } // Create an iterator for going through the image output - InputIteratorType it(source->GetOutput(), source->GetOutput()->GetRequestedRegion()); + InputIteratorType it(source->GetOutput(), source->GetOutput()->GetRequestedRegion()); OutputIteratorType ot(outputImage, outputImage->GetRequestedRegion()); bool pass = true; @@ -102,7 +102,7 @@ itkChangeLabelImageFilterTest(int, char *[]) while (!ot.IsAtEnd()) { - const InputPixelType input = it.Get(); + const InputPixelType input = it.Get(); const OutputPixelType output = ot.Get(); std::cout << static_cast(input) << ' ' << static_cast(output) << std::endl; @@ -140,7 +140,7 @@ itkChangeLabelImageFilterTest(int, char *[]) } // Create an iterator for going through the image output - InputIteratorType ita(source->GetOutput(), source->GetOutput()->GetRequestedRegion()); + InputIteratorType ita(source->GetOutput(), source->GetOutput()->GetRequestedRegion()); OutputIteratorType ota(outputImage, outputImage->GetRequestedRegion()); @@ -152,7 +152,7 @@ itkChangeLabelImageFilterTest(int, char *[]) while (!ota.IsAtEnd()) { - const InputPixelType input = ita.Get(); + const InputPixelType input = ita.Get(); const OutputPixelType output = ota.Get(); std::cout << static_cast(input) << ' ' << static_cast(output) << std::endl; diff --git a/Modules/Filtering/ImageNoise/include/itkAdditiveGaussianNoiseImageFilter.hxx b/Modules/Filtering/ImageNoise/include/itkAdditiveGaussianNoiseImageFilter.hxx index 53e47232ca4..a389bc1dd2a 100644 --- a/Modules/Filtering/ImageNoise/include/itkAdditiveGaussianNoiseImageFilter.hxx +++ b/Modules/Filtering/ImageNoise/include/itkAdditiveGaussianNoiseImageFilter.hxx @@ -41,7 +41,7 @@ AdditiveGaussianNoiseImageFilter::ThreadedGenerateDat ThreadIdType) { const InputImageType * inputPtr = this->GetInput(); - OutputImageType * outputPtr = this->GetOutput(0); + OutputImageType * outputPtr = this->GetOutput(0); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); @@ -51,7 +51,7 @@ AdditiveGaussianNoiseImageFilter::ThreadedGenerateDat { indSeed += outputRegionForThread.GetIndex(d); } - auto randn = Statistics::NormalVariateGenerator::New(); + auto randn = Statistics::NormalVariateGenerator::New(); const uint32_t seed = Self::Hash(this->GetSeed(), uint32_t(indSeed)); // Convert the seed bit for bit to int32_t randn->Initialize(bit_cast(seed)); @@ -64,7 +64,7 @@ AdditiveGaussianNoiseImageFilter::ThreadedGenerateDat // Define the iterators ImageScanlineConstIterator inputIt(inputPtr, inputRegionForThread); - ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); + ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); while (!inputIt.IsAtEnd()) { diff --git a/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.h b/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.h index b51a45132dd..c9b917745d1 100644 --- a/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.h +++ b/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.h @@ -129,7 +129,7 @@ class ITK_TEMPLATE_EXPORT SaltAndPepperNoiseImageFilter : public NoiseBaseImageF ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override; private: - double m_Probability{ 0.01 }; + double m_Probability{ 0.01 }; OutputImagePixelType m_SaltValue{}; OutputImagePixelType m_PepperValue{}; }; diff --git a/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.hxx b/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.hxx index 8c94041a723..2e3c458998d 100644 --- a/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.hxx +++ b/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.hxx @@ -41,7 +41,7 @@ SaltAndPepperNoiseImageFilter::ThreadedGenerateData( ThreadIdType) { const InputImageType * inputPtr = this->GetInput(); - OutputImageType * outputPtr = this->GetOutput(0); + OutputImageType * outputPtr = this->GetOutput(0); // Create a random generator per thread IndexValueType indSeed = 0; @@ -49,7 +49,7 @@ SaltAndPepperNoiseImageFilter::ThreadedGenerateData( { indSeed += outputRegionForThread.GetIndex(d); } - auto rand = Statistics::MersenneTwisterRandomVariateGenerator::New(); + auto rand = Statistics::MersenneTwisterRandomVariateGenerator::New(); const uint32_t seed = Self::Hash(this->GetSeed(), uint32_t(indSeed)); rand->Initialize(seed); @@ -61,7 +61,7 @@ SaltAndPepperNoiseImageFilter::ThreadedGenerateData( // Define the iterators ImageScanlineConstIterator inputIt(inputPtr, inputRegionForThread); - ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); + ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); diff --git a/Modules/Filtering/ImageNoise/include/itkShotNoiseImageFilter.hxx b/Modules/Filtering/ImageNoise/include/itkShotNoiseImageFilter.hxx index 7ccf507fcac..8362c497822 100644 --- a/Modules/Filtering/ImageNoise/include/itkShotNoiseImageFilter.hxx +++ b/Modules/Filtering/ImageNoise/include/itkShotNoiseImageFilter.hxx @@ -42,7 +42,7 @@ ShotNoiseImageFilter::ThreadedGenerateData( ThreadIdType) { const InputImageType * inputPtr = this->GetInput(); - OutputImageType * outputPtr = this->GetOutput(0); + OutputImageType * outputPtr = this->GetOutput(0); // Create a random generator per thread IndexValueType indSeed = 0; @@ -50,7 +50,7 @@ ShotNoiseImageFilter::ThreadedGenerateData( { indSeed += outputRegionForThread.GetIndex(d); } - auto rand = Statistics::MersenneTwisterRandomVariateGenerator::New(); + auto rand = Statistics::MersenneTwisterRandomVariateGenerator::New(); const uint32_t seed = Self::Hash(this->GetSeed(), uint32_t(indSeed)); rand->Initialize(seed); auto randn = Statistics::NormalVariateGenerator::New(); @@ -64,7 +64,7 @@ ShotNoiseImageFilter::ThreadedGenerateData( // Define the iterators ImageScanlineConstIterator inputIt(inputPtr, inputRegionForThread); - ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); + ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); @@ -81,8 +81,8 @@ ShotNoiseImageFilter::ThreadedGenerateData( if (in < 50) { const double L = std::exp(-in); - long k = 0; - double p = 1.0; + long k = 0; + double p = 1.0; do { diff --git a/Modules/Filtering/ImageNoise/include/itkSpeckleNoiseImageFilter.hxx b/Modules/Filtering/ImageNoise/include/itkSpeckleNoiseImageFilter.hxx index 40d5c19ec9a..bf39ca1c653 100644 --- a/Modules/Filtering/ImageNoise/include/itkSpeckleNoiseImageFilter.hxx +++ b/Modules/Filtering/ImageNoise/include/itkSpeckleNoiseImageFilter.hxx @@ -41,7 +41,7 @@ SpeckleNoiseImageFilter::ThreadedGenerateData( ThreadIdType) { const InputImageType * inputPtr = this->GetInput(); - OutputImageType * outputPtr = this->GetOutput(0); + OutputImageType * outputPtr = this->GetOutput(0); // Create a random generator per thread IndexValueType indSeed = 0; @@ -49,7 +49,7 @@ SpeckleNoiseImageFilter::ThreadedGenerateData( { indSeed += outputRegionForThread.GetIndex(d); } - auto rand = Statistics::MersenneTwisterRandomVariateGenerator::New(); + auto rand = Statistics::MersenneTwisterRandomVariateGenerator::New(); const uint32_t seed = Self::Hash(this->GetSeed(), uint32_t(indSeed)); rand->Initialize(seed); @@ -61,7 +61,7 @@ SpeckleNoiseImageFilter::ThreadedGenerateData( // Define the iterators ImageScanlineConstIterator inputIt(inputPtr, inputRegionForThread); - ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); + ImageScanlineIterator outputIt(outputPtr, outputRegionForThread); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); @@ -70,7 +70,7 @@ SpeckleNoiseImageFilter::ThreadedGenerateData( const double theta = m_StandardDeviation * m_StandardDeviation; const double k = 1 / theta; - const auto floork = Math::Floor(k); + const auto floork = Math::Floor(k); const double delta = k - floork; const double v0 = Math::e / (Math::e + delta); diff --git a/Modules/Filtering/ImageNoise/test/itkPeakSignalToNoiseRatioCalculator.hxx b/Modules/Filtering/ImageNoise/test/itkPeakSignalToNoiseRatioCalculator.hxx index aa3725ec963..b08066e5c88 100644 --- a/Modules/Filtering/ImageNoise/test/itkPeakSignalToNoiseRatioCalculator.hxx +++ b/Modules/Filtering/ImageNoise/test/itkPeakSignalToNoiseRatioCalculator.hxx @@ -59,7 +59,7 @@ PeakSignalToNoiseRatioCalculator::Compute() ImageRegionConstIteratorWithIndex nIt(m_NoisyImage, m_NoisyImage->GetRequestedRegion()); // init the values - double mse = 0; + double mse = 0; InputPixelType max = NumericTraits::NonpositiveMin(); while (!iIt.IsAtEnd()) diff --git a/Modules/Filtering/ImageSources/include/itkGenerateImageSource.h b/Modules/Filtering/ImageSources/include/itkGenerateImageSource.h index 47790f584dc..8c5e378384d 100644 --- a/Modules/Filtering/ImageSources/include/itkGenerateImageSource.h +++ b/Modules/Filtering/ImageSources/include/itkGenerateImageSource.h @@ -134,12 +134,12 @@ class ITK_TEMPLATE_EXPORT GenerateImageSource : public ImageSource GenerateOutputInformation() override; private: - SizeType m_Size{}; // size of the output image - SpacingType m_Spacing{}; - PointType m_Origin{}; + SizeType m_Size{}; // size of the output image + SpacingType m_Spacing{}; + PointType m_Origin{}; DirectionType m_Direction{}; - IndexType m_StartIndex{}; - bool m_UseReferenceImage{ false }; + IndexType m_StartIndex{}; + bool m_UseReferenceImage{ false }; }; } // namespace itk diff --git a/Modules/Filtering/ImageSources/include/itkGridImageSource.hxx b/Modules/Filtering/ImageSources/include/itkGridImageSource.hxx index 682fb31565a..70b33c5ac07 100644 --- a/Modules/Filtering/ImageSources/include/itkGridImageSource.hxx +++ b/Modules/Filtering/ImageSources/include/itkGridImageSource.hxx @@ -95,7 +95,7 @@ GridImageSource::DynamicThreadedGenerateData(const ImageRegionType for (ImageRegionIteratorWithIndex It(output, outputRegionForThread); !It.IsAtEnd(); ++It) { - RealType val = 1.0; + RealType val = 1.0; typename ImageType::IndexType index = It.GetIndex(); for (unsigned int i = 0; i < ImageDimension; ++i) { diff --git a/Modules/Filtering/ImageSources/include/itkPhysicalPointImageSource.hxx b/Modules/Filtering/ImageSources/include/itkPhysicalPointImageSource.hxx index 2bad029c45a..6ca45ecabd0 100644 --- a/Modules/Filtering/ImageSources/include/itkPhysicalPointImageSource.hxx +++ b/Modules/Filtering/ImageSources/include/itkPhysicalPointImageSource.hxx @@ -52,8 +52,8 @@ PhysicalPointImageSource::DynamicThreadedGenerateData(const Region TotalProgressReporter progress(this, image->GetRequestedRegion().GetNumberOfPixels()); ImageRegionIteratorWithIndex it(image, outputRegionForThread); - PointType pt; - PixelType px; + PointType pt; + PixelType px; NumericTraits::SetLength(px, TOutputImage::ImageDimension); for (; !it.IsAtEnd(); ++it) diff --git a/Modules/Filtering/ImageSources/test/itkGaborKernelFunctionTest.cxx b/Modules/Filtering/ImageSources/test/itkGaborKernelFunctionTest.cxx index 8f4041af5e1..17fd80cc39e 100644 --- a/Modules/Filtering/ImageSources/test/itkGaborKernelFunctionTest.cxx +++ b/Modules/Filtering/ImageSources/test/itkGaborKernelFunctionTest.cxx @@ -49,8 +49,8 @@ itkGaborKernelFunctionTest(int itkNotUsed(argc), char * itkNotUsed(argv)[]) constexpr double tolerance = 1e-12; constexpr double point = 2.86; - double expectedValue = -0.13297125073713259; - double result = gabor->Evaluate(point); + double expectedValue = -0.13297125073713259; + double result = gabor->Evaluate(point); if (!itk::Math::FloatAlmostEqual(expectedValue, result, 10, tolerance)) { std::cerr.precision(static_cast(itk::Math::abs(std::log10(tolerance)))); diff --git a/Modules/Filtering/ImageSources/test/itkGaussianImageSourceTest.cxx b/Modules/Filtering/ImageSources/test/itkGaussianImageSourceTest.cxx index 649afe49a5b..9f8b7565146 100644 --- a/Modules/Filtering/ImageSources/test/itkGaussianImageSourceTest.cxx +++ b/Modules/Filtering/ImageSources/test/itkGaussianImageSourceTest.cxx @@ -41,9 +41,9 @@ itkGaussianImageSourceTest(int argc, char * argv[]) auto gaussianImage = GaussianSourceType::New(); ImageType::SpacingValueType spacing[] = { 1.2f, 1.3f, 1.4f }; - ImageType::PointValueType origin[] = { 1.0f, 4.0f, 2.0f }; - ImageType::SizeValueType size[] = { 130, 150, 120 }; - ImageType::DirectionType direction; + ImageType::PointValueType origin[] = { 1.0f, 4.0f, 2.0f }; + ImageType::SizeValueType size[] = { 130, 150, 120 }; + ImageType::DirectionType direction; direction.SetIdentity(); GaussianSourceType::ArrayType mean; @@ -78,9 +78,9 @@ itkGaussianImageSourceTest(int argc, char * argv[]) ITK_TEST_SET_GET_VALUE(direction, gaussianImage->GetDirection()); // Test SetReferenceImage from GenerateImageSource base class. - auto referenceImage = ImageType::New(); + auto referenceImage = ImageType::New(); constexpr ImageType::IndexType startIndex{}; - ImageType::SizeType referenceSize; + ImageType::SizeType referenceSize; referenceSize.SetSize(size); const ImageType::RegionType region(startIndex, referenceSize); referenceImage->SetRegions(region); diff --git a/Modules/Filtering/ImageSources/test/itkPhysicalPointImageSourceTest.cxx b/Modules/Filtering/ImageSources/test/itkPhysicalPointImageSourceTest.cxx index 00bb6ddbf56..a6cebdbdedf 100644 --- a/Modules/Filtering/ImageSources/test/itkPhysicalPointImageSourceTest.cxx +++ b/Modules/Filtering/ImageSources/test/itkPhysicalPointImageSourceTest.cxx @@ -29,10 +29,10 @@ namespace { template int -itkPhysicalPointImageSourceTest(const std::string & fname, - typename TImageType::SizeType & size, - typename TImageType::SpacingType & spacing, - typename TImageType::PointType & origin, +itkPhysicalPointImageSourceTest(const std::string & fname, + typename TImageType::SizeType & size, + typename TImageType::SpacingType & spacing, + typename TImageType::PointType & origin, typename TImageType::DirectionType & direction) { @@ -100,8 +100,8 @@ itkPhysicalPointImageSourceTest(int argc, char * argv[]) ITK_EXERCISE_BASIC_OBJECT_METHODS(physicalPointImageSource, PhysicalPointImageSource, GenerateImageSource); - int testStatus = EXIT_SUCCESS; - auto spacing = itk::MakeFilled(1.0); + int testStatus = EXIT_SUCCESS; + auto spacing = itk::MakeFilled(1.0); ImageType::PointType origin{}; if (std::stoi(argv[2]) == 0) { @@ -123,7 +123,7 @@ itkPhysicalPointImageSourceTest(int argc, char * argv[]) else { const itk::SpacePrecisionType theta = (argc >= 4) ? std::stod(argv[3]) : 0; - itk::SpacePrecisionType M[] = { std::cos(theta), -std::sin(theta), std::sin(theta), std::cos(theta) }; + itk::SpacePrecisionType M[] = { std::cos(theta), -std::sin(theta), std::sin(theta), std::cos(theta) }; direction = vnl_matrix(M, 2, 2); testStatus = itkPhysicalPointImageSourceTest>( diff --git a/Modules/Filtering/ImageStatistics/include/itkAccumulateImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkAccumulateImageFilter.h index 835d0c2d58b..b8a6a60c5ba 100644 --- a/Modules/Filtering/ImageStatistics/include/itkAccumulateImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkAccumulateImageFilter.h @@ -129,7 +129,7 @@ class ITK_TEMPLATE_EXPORT AccumulateImageFilter : public ImageToImageFilter::GenerateOutputInformation() { itkDebugMacro("GenerateOutputInformation Start"); - typename TInputImage::IndexType inputIndex; - typename TInputImage::SizeType inputSize; - typename TOutputImage::SizeType outputSize; - typename TOutputImage::IndexType outputIndex; - typename TInputImage::SpacingType inSpacing; - typename TInputImage::PointType inOrigin; - typename TOutputImage::SpacingType outSpacing; + typename TInputImage::IndexType inputIndex; + typename TInputImage::SizeType inputSize; + typename TOutputImage::SizeType outputSize; + typename TOutputImage::IndexType outputIndex; + typename TInputImage::SpacingType inSpacing; + typename TInputImage::PointType inOrigin; + typename TOutputImage::SpacingType outSpacing; typename TOutputImage::DirectionType outDirection; - typename TOutputImage::PointType outOrigin; + typename TOutputImage::PointType outOrigin; // Get pointers to the input and output const typename Superclass::OutputImagePointer output = this->GetOutput(); - const typename Superclass::InputImagePointer input = const_cast(this->GetInput()); + const typename Superclass::InputImagePointer input = const_cast(this->GetInput()); if (!input || !output) { @@ -99,11 +99,11 @@ AccumulateImageFilter::GenerateInputRequestedRegion() if (this->GetInput()) { - typename TInputImage::SizeType inputSize; - typename TInputImage::IndexType inputIndex; - typename TInputImage::SizeType inputLargSize; - typename TInputImage::IndexType inputLargIndex; - typename TOutputImage::SizeType outputSize; + typename TInputImage::SizeType inputSize; + typename TInputImage::IndexType inputIndex; + typename TInputImage::SizeType inputLargSize; + typename TInputImage::IndexType inputLargIndex; + typename TOutputImage::SizeType outputSize; typename TOutputImage::IndexType outputIndex = this->GetOutput()->GetRequestedRegion().GetIndex(); outputSize = this->GetOutput()->GetRequestedRegion().GetSize(); inputLargSize = this->GetInput()->GetLargestPossibleRegion().GetSize(); @@ -124,7 +124,7 @@ AccumulateImageFilter::GenerateInputRequestedRegion() } const typename TInputImage::RegionType RequestedRegion(inputIndex, inputSize); - const InputImagePointer input = const_cast(this->GetInput()); + const InputImagePointer input = const_cast(this->GetInput()); input->SetRequestedRegion(RequestedRegion); } @@ -145,7 +145,7 @@ AccumulateImageFilter::GenerateData() using AccumulateType = typename NumericTraits::AccumulateType; const typename Superclass::InputImageConstPointer inputImage = this->GetInput(); - const typename TOutputImage::Pointer outputImage = this->GetOutput(); + const typename TOutputImage::Pointer outputImage = this->GetOutput(); outputImage->SetBufferedRegion(outputImage->GetRequestedRegion()); outputImage->Allocate(); @@ -155,7 +155,7 @@ AccumulateImageFilter::GenerateData() outputIterType outputIter(outputImage, outputImage->GetBufferedRegion()); using inputIterType = ImageRegionConstIterator; - typename TInputImage::SizeType AccumulatedSize = inputImage->GetLargestPossibleRegion().GetSize(); + typename TInputImage::SizeType AccumulatedSize = inputImage->GetLargestPossibleRegion().GetSize(); typename TInputImage::IndexType AccumulatedIndex = inputImage->GetLargestPossibleRegion().GetIndex(); const typename TInputImage::SizeValueType SizeAccumulateDimension = AccumulatedSize[m_AccumulateDimension]; @@ -183,7 +183,7 @@ AccumulateImageFilter::GenerateData() } } const typename TInputImage::RegionType AccumulatedRegion(AccumulatedIndex, AccumulatedSize); - inputIterType inputIter(inputImage, AccumulatedRegion); + inputIterType inputIter(inputImage, AccumulatedRegion); inputIter.GoToBegin(); AccumulateType Value{}; while (!inputIter.IsAtEnd()) diff --git a/Modules/Filtering/ImageStatistics/include/itkAdaptiveEqualizationHistogram.h b/Modules/Filtering/ImageStatistics/include/itkAdaptiveEqualizationHistogram.h index f12ca8eb841..88a62982b58 100644 --- a/Modules/Filtering/ImageStatistics/include/itkAdaptiveEqualizationHistogram.h +++ b/Modules/Filtering/ImageStatistics/include/itkAdaptiveEqualizationHistogram.h @@ -76,13 +76,13 @@ class AdaptiveEqualizationHistogram // float, but use double for accumulate and temporaries. const double iscale = static_cast(m_Maximum) - m_Minimum; - double sum = 0.0; - auto itMap = m_Map.begin(); + double sum = 0.0; + auto itMap = m_Map.begin(); const RealType u = (static_cast(pixel) - m_Minimum) / iscale - 0.5; while (itMap != m_Map.end()) { const RealType v = (static_cast(itMap->first) - m_Minimum) / iscale - 0.5; - const double ikernel = m_KernelSize - m_BoundaryCount; + const double ikernel = m_KernelSize - m_BoundaryCount; sum += itMap->second * CumulativeFunction(u, v) / ikernel; ++itMap; @@ -153,7 +153,7 @@ class AdaptiveEqualizationHistogram MapType m_Map; - size_t m_BoundaryCount{ 0 }; + size_t m_BoundaryCount{ 0 }; }; } // end namespace Function diff --git a/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.h b/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.h index cabadee149b..3b4ecb07e95 100644 --- a/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.h +++ b/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.h @@ -217,16 +217,16 @@ class ITK_TEMPLATE_EXPORT ImageMomentsCalculator : public Object PrintSelf(std::ostream & os, Indent indent) const override; private: - bool m_Valid{}; // Have moments been computed yet? - ScalarType m_M0{}; // Zeroth moment - VectorType m_M1{}; // First moments about origin - MatrixType m_M2{}; // Second moments about origin - VectorType m_Cg{}; // Center of gravity (physical units) - MatrixType m_Cm{}; // Second central moments (physical) - VectorType m_Pm{}; // Principal moments (physical) - MatrixType m_Pa{}; // Principal axes (physical) - - ImageConstPointer m_Image{}; + bool m_Valid{}; // Have moments been computed yet? + ScalarType m_M0{}; // Zeroth moment + VectorType m_M1{}; // First moments about origin + MatrixType m_M2{}; // Second moments about origin + VectorType m_Cg{}; // Center of gravity (physical units) + MatrixType m_Cm{}; // Second central moments (physical) + VectorType m_Pm{}; // Principal moments (physical) + MatrixType m_Pa{}; // Principal axes (physical) + + ImageConstPointer m_Image{}; SpatialObjectConstPointer m_SpatialObjectMask{}; }; // class ImageMomentsCalculator } // end namespace itk diff --git a/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx b/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx index 0a44ece3a96..e8d2a665abf 100644 --- a/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx +++ b/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx @@ -148,7 +148,7 @@ ImageMomentsCalculator::Compute() // Compute principal moments and axes const vnl_symmetric_eigensystem eigen{ m_Cm.GetVnlMatrix().as_matrix() }; - vnl_diag_matrix pm{ eigen.D }; + vnl_diag_matrix pm{ eigen.D }; for (unsigned int i = 0; i < ImageDimension; ++i) { m_Pm[i] = pm(i) * m_M0; @@ -157,9 +157,9 @@ ImageMomentsCalculator::Compute() // Add a final reflection if needed for a proper rotation, // by multiplying the last row by the determinant - const vnl_real_eigensystem eigenrot{ m_Pa.GetVnlMatrix().as_matrix() }; + const vnl_real_eigensystem eigenrot{ m_Pa.GetVnlMatrix().as_matrix() }; vnl_diag_matrix> eigenval{ eigenrot.D }; - std::complex det(1.0, 0.0); + std::complex det(1.0, 0.0); for (unsigned int i = 0; i < ImageDimension; ++i) { diff --git a/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.h b/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.h index ca95a43691f..28e1cb8c6cf 100644 --- a/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.h +++ b/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.h @@ -148,15 +148,15 @@ class ITK_TEMPLATE_EXPORT ImagePCADecompositionCalculator : public Object private: using BasisSizeType = typename BasisImageType::SizeType; - BasisVectorType m_Projection{}; - BasisVectorType m_ImageAsVector{}; + BasisVectorType m_Projection{}; + BasisVectorType m_ImageAsVector{}; BasisImagePointerVector m_BasisImages{}; - BasisImageConstPointer m_MeanImage{}; - BasisSizeType m_Size{}; - InputImageConstPointer m_Image{}; - BasisMatrixType m_BasisMatrix{}; - bool m_BasisMatrixCalculated{}; - SizeValueType m_NumPixels{}; + BasisImageConstPointer m_MeanImage{}; + BasisSizeType m_Size{}; + InputImageConstPointer m_Image{}; + BasisMatrixType m_BasisMatrix{}; + bool m_BasisMatrixCalculated{}; + SizeValueType m_NumPixels{}; }; } // end namespace itk diff --git a/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.hxx b/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.hxx index 55d3642d424..039cadf3b36 100644 --- a/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.hxx +++ b/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.hxx @@ -83,7 +83,7 @@ ImagePCADecompositionCalculator::CalculateBasisMatrix( } ImageRegionConstIterator image_it(*basis_it, (*basis_it)->GetRequestedRegion()); - int j = 0; + int j = 0; for (image_it.GoToBegin(); !image_it.IsAtEnd(); ++image_it) { m_BasisMatrix(i, j++) = image_it.Get(); @@ -104,7 +104,7 @@ ImagePCADecompositionCalculator::CalculateRecenteredIm } ImageRegionConstIterator image_it(m_Image, m_Image->GetRequestedRegion()); - typename BasisVectorType::iterator vector_it; + typename BasisVectorType::iterator vector_it; for (image_it.GoToBegin(), vector_it = m_ImageAsVector.begin(); !image_it.IsAtEnd(); ++image_it, ++vector_it) { *vector_it = static_cast(image_it.Get()); @@ -125,7 +125,7 @@ void ImagePCADecompositionCalculator::SetBasisFromModel(ModelPointerType model) { BasisImagePointerVector images; - unsigned int nImages = model->GetNumberOfPrincipalComponentsRequired(); + unsigned int nImages = model->GetNumberOfPrincipalComponentsRequired(); images.reserve(nImages); for (unsigned int i = 1; i <= nImages; ++i) diff --git a/Modules/Filtering/ImageStatistics/include/itkImagePCAShapeModelEstimator.hxx b/Modules/Filtering/ImageStatistics/include/itkImagePCAShapeModelEstimator.hxx index f42170d4206..534bda39f8e 100644 --- a/Modules/Filtering/ImageStatistics/include/itkImagePCAShapeModelEstimator.hxx +++ b/Modules/Filtering/ImageStatistics/include/itkImagePCAShapeModelEstimator.hxx @@ -115,7 +115,7 @@ ImagePCAShapeModelEstimator::GenerateData() auto numberOfOutputs = static_cast(this->GetNumberOfIndexedOutputs()); const InputImagePointer input = const_cast(this->GetInput(0)); - unsigned int j; + unsigned int j; for (j = 0; j < numberOfOutputs; ++j) { const OutputImagePointer output = this->GetOutput(j); @@ -130,7 +130,7 @@ ImagePCAShapeModelEstimator::GenerateData() // Fill the mean image first typename OutputImageType::RegionType region = this->GetOutput(0)->GetRequestedRegion(); - OutputIterator outIter(this->GetOutput(0), region); + OutputIterator outIter(this->GetOutput(0), region); unsigned int i = 0; while (!outIter.IsAtEnd()) @@ -141,7 +141,7 @@ ImagePCAShapeModelEstimator::GenerateData() } // Now fill the principal component outputs - unsigned int kthLargestPrincipalComp = m_NumberOfTrainingImages; + unsigned int kthLargestPrincipalComp = m_NumberOfTrainingImages; const unsigned int numberOfValidOutputs = std::min(numberOfOutputs, m_NumberOfTrainingImages + 1); for (j = 1; j < numberOfValidOutputs; ++j) @@ -199,7 +199,7 @@ ImagePCAShapeModelEstimator::SetNumberOfPrincipalComp // Modify the required number of outputs ( 1 extra for the mean image ) this->SetNumberOfRequiredOutputs(m_NumberOfPrincipalComponentsRequired + 1); - auto numberOfOutputs = static_cast(this->GetNumberOfIndexedOutputs()); + auto numberOfOutputs = static_cast(this->GetNumberOfIndexedOutputs()); unsigned int idx; if (numberOfOutputs < m_NumberOfPrincipalComponentsRequired + 1) @@ -369,7 +369,7 @@ ImagePCAShapeModelEstimator::EstimatePCAShapeModelPar m_EigenVectors.set_size(m_NumberOfPixels, m_NumberOfTrainingImages); m_EigenVectors.fill(0); - double pix_value; + double pix_value; InputImageConstIterator tempImageItA; for (unsigned int img_number = 0; img_number < m_NumberOfTrainingImages; ++img_number) diff --git a/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.h index 39e33b8f9c8..4ca34dd706c 100644 --- a/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.h @@ -172,7 +172,7 @@ class ITK_TEMPLATE_EXPORT LabelStatisticsImageFilter : public ImageSink::LabelStatisticsImageFilter template void LabelStatisticsImageFilter::SetHistogramParameters(const int numBins, - RealType lowerBound, - RealType upperBound) + RealType lowerBound, + RealType upperBound) { m_NumBins[0] = numBins; m_LowerBound = lowerBound; @@ -126,8 +126,8 @@ LabelStatisticsImageFilter::AfterStreamedGenerateData( { // unbiased estimate of variance LabelStatistics & ls = mapValue.second; - const RealType sumSquared = ls.m_Sum * ls.m_Sum; - const auto count = static_cast(ls.m_Count); + const RealType sumSquared = ls.m_Sum * ls.m_Sum; + const auto count = static_cast(ls.m_Count); ls.m_Variance = (ls.m_SumOfSquares - sumSquared / count) / (count - 1.0); } @@ -163,7 +163,7 @@ LabelStatisticsImageFilter::ThreadedStreamedGenerateDa MapType localStatistics; - typename HistogramType::IndexType histogramIndex(1); + typename HistogramType::IndexType histogramIndex(1); typename HistogramType::MeasurementVectorType histogramMeasurement(1); const SizeValueType size0 = outputRegionForThread.GetSize(0); @@ -395,8 +395,8 @@ LabelStatisticsImageFilter::GetRegion(LabelPixelType l else { BoundingBoxType bbox = this->GetBoundingBox(label); - IndexType index; - SizeType size; + IndexType index; + SizeType size; for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -429,7 +429,7 @@ template auto LabelStatisticsImageFilter::GetMedian(LabelPixelType label) const -> RealType { - RealType median = 0.0; + RealType median = 0.0; const auto mapIt = m_LabelStatistics.find(label); if (mapIt == m_LabelStatistics.end() || !m_UseHistograms) { diff --git a/Modules/Filtering/ImageStatistics/include/itkMeanProjectionImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkMeanProjectionImageFilter.h index fee3ceb34da..7a18d52bdab 100644 --- a/Modules/Filtering/ImageStatistics/include/itkMeanProjectionImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkMeanProjectionImageFilter.h @@ -73,7 +73,7 @@ class MeanAccumulator return ((RealType)m_Sum) / m_Size; } - TAccumulate m_Sum; + TAccumulate m_Sum; SizeValueType m_Size; }; } // namespace Functor diff --git a/Modules/Filtering/ImageStatistics/include/itkProjectionImageFilter.hxx b/Modules/Filtering/ImageStatistics/include/itkProjectionImageFilter.hxx index 3ecfb0eb0cd..274f81ec735 100644 --- a/Modules/Filtering/ImageStatistics/include/itkProjectionImageFilter.hxx +++ b/Modules/Filtering/ImageStatistics/include/itkProjectionImageFilter.hxx @@ -45,20 +45,20 @@ ProjectionImageFilter::GenerateOutputIn << m_ProjectionDimension << " but input ImageDimension is " << TInputImage::ImageDimension); } - typename TInputImage::IndexType inputIndex; - typename TInputImage::SizeType inputSize; - typename TInputImage::DirectionType inDirection; - typename TOutputImage::SizeType outputSize; - typename TOutputImage::IndexType outputIndex; - typename TInputImage::SpacingType inSpacing; - typename TInputImage::PointType inOrigin; - typename TOutputImage::SpacingType outSpacing; - typename TOutputImage::PointType outOrigin; + typename TInputImage::IndexType inputIndex; + typename TInputImage::SizeType inputSize; + typename TInputImage::DirectionType inDirection; + typename TOutputImage::SizeType outputSize; + typename TOutputImage::IndexType outputIndex; + typename TInputImage::SpacingType inSpacing; + typename TInputImage::PointType inOrigin; + typename TOutputImage::SpacingType outSpacing; + typename TOutputImage::PointType outOrigin; typename TOutputImage::DirectionType outDirection; // Get pointers to the input and output const typename Superclass::OutputImagePointer output = this->GetOutput(); - const typename Superclass::InputImagePointer input = const_cast(this->GetInput()); + const typename Superclass::InputImagePointer input = const_cast(this->GetInput()); inputIndex = input->GetLargestPossibleRegion().GetIndex(); inputSize = input->GetLargestPossibleRegion().GetSize(); @@ -139,11 +139,11 @@ ProjectionImageFilter::GenerateInputReq if (this->GetInput()) { - typename TInputImage::SizeType inputSize; - typename TInputImage::IndexType inputIndex; - typename TInputImage::SizeType inputLargSize; - typename TInputImage::IndexType inputLargIndex; - typename TOutputImage::SizeType outputSize; + typename TInputImage::SizeType inputSize; + typename TInputImage::IndexType inputIndex; + typename TInputImage::SizeType inputLargSize; + typename TInputImage::IndexType inputLargIndex; + typename TOutputImage::SizeType outputSize; typename TOutputImage::IndexType outputIndex = this->GetOutput()->GetRequestedRegion().GetIndex(); outputSize = this->GetOutput()->GetRequestedRegion().GetSize(); inputLargSize = this->GetInput()->GetLargestPossibleRegion().GetSize(); @@ -187,7 +187,7 @@ ProjectionImageFilter::GenerateInputReq } const typename TInputImage::RegionType RequestedRegion(inputIndex, inputSize); - const InputImagePointer input = const_cast(this->GetInput()); + const InputImagePointer input = const_cast(this->GetInput()); input->SetRequestedRegion(RequestedRegion); } @@ -215,18 +215,18 @@ ProjectionImageFilter::DynamicThreadedG const typename TInputImage::RegionType inputRegion = inputImage->GetLargestPossibleRegion(); - typename TInputImage::SizeType inputSize = inputRegion.GetSize(); + typename TInputImage::SizeType inputSize = inputRegion.GetSize(); typename TInputImage::IndexType inputIndex = inputRegion.GetIndex(); const typename TOutputImage::Pointer outputImage = this->GetOutput(); - typename TOutputImage::SizeType outputSizeForThread = outputRegionForThread.GetSize(); + typename TOutputImage::SizeType outputSizeForThread = outputRegionForThread.GetSize(); typename TOutputImage::IndexType outputIndexForThread = outputRegionForThread.GetIndex(); // compute the input region for this thread typename TInputImage::RegionType inputRegionForThread = inputRegion; - typename TInputImage::SizeType inputSizeForThread = inputSize; - typename TInputImage::IndexType inputIndexForThread = inputIndex; + typename TInputImage::SizeType inputSizeForThread = inputSize; + typename TInputImage::IndexType inputIndexForThread = inputIndex; if (static_cast(InputImageDimension) == static_cast(OutputImageDimension)) { @@ -289,7 +289,7 @@ ProjectionImageFilter::DynamicThreadedG // move the output iterator and set the output value typename TOutputImage::IndexType oIdx; - typename TInputImage::IndexType iIdx = iIt.GetIndex(); + typename TInputImage::IndexType iIdx = iIt.GetIndex(); if (static_cast(InputImageDimension) == static_cast(OutputImageDimension)) { diff --git a/Modules/Filtering/ImageStatistics/include/itkStandardDeviationProjectionImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkStandardDeviationProjectionImageFilter.h index b0dd43f2fec..6cc3bb6c8e4 100644 --- a/Modules/Filtering/ImageStatistics/include/itkStandardDeviationProjectionImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkStandardDeviationProjectionImageFilter.h @@ -84,8 +84,8 @@ class StandardDeviationAccumulator } const typename NumericTraits::RealType mean = ((RealType)m_Sum) / m_Size; - typename std::vector::iterator it; - RealType squaredSum{}; + typename std::vector::iterator it; + RealType squaredSum{}; for (it = m_Values.begin(); it != m_Values.end(); ++it) { squaredSum += itk::Math::sqr(*it - mean); @@ -93,8 +93,8 @@ class StandardDeviationAccumulator return std::sqrt(squaredSum / (m_Size - 1)); } - TAccumulate m_Sum; - SizeValueType m_Size; + TAccumulate m_Sum; + SizeValueType m_Size; std::vector m_Values; }; } // namespace Functor diff --git a/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.h index 5588d7eb243..8193adba490 100644 --- a/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.h @@ -168,8 +168,8 @@ class ITK_TEMPLATE_EXPORT StatisticsImageFilter : public ImageSink CompensatedSummation m_SumOfSquares{ 1 }; SizeValueType m_Count{ 1 }; - PixelType m_ThreadMin{ 1 }; - PixelType m_ThreadMax{ 1 }; + PixelType m_ThreadMin{ 1 }; + PixelType m_ThreadMax{ 1 }; std::mutex m_Mutex{}; }; // end of class diff --git a/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.hxx b/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.hxx index d48b35fb693..6240d5992b6 100644 --- a/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.hxx +++ b/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.hxx @@ -74,10 +74,10 @@ StatisticsImageFilter::AfterStreamedGenerateData() Superclass::AfterStreamedGenerateData(); const SizeValueType count = m_Count; - const RealType sumOfSquares(m_SumOfSquares); - const PixelType minimum = m_ThreadMin; - const PixelType maximum = m_ThreadMax; - const RealType sum(m_ThreadSum); + const RealType sumOfSquares(m_SumOfSquares); + const PixelType minimum = m_ThreadMin; + const PixelType maximum = m_ThreadMax; + const RealType sum(m_ThreadSum); const RealType mean = sum / static_cast(count); const RealType variance = @@ -101,9 +101,9 @@ StatisticsImageFilter::ThreadedStreamedGenerateData(const RegionTyp CompensatedSummation sum = RealType{}; CompensatedSummation sumOfSquares = RealType{}; - SizeValueType count{}; - PixelType min = NumericTraits::max(); - PixelType max = NumericTraits::NonpositiveMin(); + SizeValueType count{}; + PixelType min = NumericTraits::max(); + PixelType max = NumericTraits::NonpositiveMin(); ImageScanlineConstIterator it(this->GetInput(), regionForThread); @@ -113,7 +113,7 @@ StatisticsImageFilter::ThreadedStreamedGenerateData(const RegionTyp while (!it.IsAtEndOfLine()) { const PixelType & value = it.Get(); - const auto realValue = static_cast(value); + const auto realValue = static_cast(value); min = std::min(min, value); max = std::max(max, value); diff --git a/Modules/Filtering/ImageStatistics/test/itkImageMomentsTest.cxx b/Modules/Filtering/ImageStatistics/test/itkImageMomentsTest.cxx index b74e210e2f4..dede722f1d5 100644 --- a/Modules/Filtering/ImageStatistics/test/itkImageMomentsTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkImageMomentsTest.cxx @@ -54,11 +54,11 @@ itkImageMomentsTest(int argc, char * argv[]) /* Define the image size and physical coordinates */ constexpr itk::Size<3> size = { { 20, 40, 80 } }; - constexpr double origin[3] = { 0.5, 0.5, 0.5 }; - constexpr double spacing[3] = { 0.1, 0.05, 0.025 }; + constexpr double origin[3] = { 0.5, 0.5, 0.5 }; + constexpr double spacing[3] = { 0.1, 0.05, 0.025 }; /* Define positions of the test masses in index coordinates */ - constexpr unsigned short mass = 1; // Test mass + constexpr unsigned short mass = 1; // Test mass itk::Index<3>::IndexValueType point[8][3] = { { 10 + 8, 20 + 12, 40 + 0 }, { 10 - 8, 20 - 12, 40 - 0 }, { 10 + 3, 20 - 8, 40 + 0 }, { 10 - 3, 20 + 8, 40 - 0 }, { 10 + 0, 20 + 0, 40 + 10 }, { 10 - 0, 20 - 0, 40 - 10 }, @@ -66,7 +66,7 @@ itkImageMomentsTest(int argc, char * argv[]) /* Define the expected (true) results for comparison */ constexpr double ttm = 6.0; // Total mass - double pad[3][3] = { + double pad[3][3] = { // Principal axes { 0.0, 0.0, 1.0 }, { 0.6, -0.8, 0.0 }, @@ -145,9 +145,9 @@ itkImageMomentsTest(int argc, char * argv[]) moments->Print(std::cout); const double ctm = moments->GetTotalMass(); - VectorType ccg = moments->GetCenterOfGravity(); - VectorType cpm = moments->GetPrincipalMoments(); - MatrixType cpa = moments->GetPrincipalAxes(); + VectorType ccg = moments->GetCenterOfGravity(); + VectorType cpm = moments->GetPrincipalMoments(); + MatrixType cpa = moments->GetPrincipalAxes(); /* Flip the principal axes if necessary. @@ -218,9 +218,9 @@ itkImageMomentsTest(int argc, char * argv[]) /* Compute and report max abs error in computed */ const double tmerr = itk::Math::abs(ttm - ctm); // Error in total mass - double cgerr = 0.0; // Error in center of gravity - double pmerr = 0.0; // Error in moments - double paerr = 0.0; // Error in axes + double cgerr = 0.0; // Error in center of gravity + double pmerr = 0.0; // Error in moments + double paerr = 0.0; // Error in axes for (int i = 0; i < 3; ++i) { diff --git a/Modules/Filtering/ImageStatistics/test/itkImagePCADecompositionCalculatorTest.cxx b/Modules/Filtering/ImageStatistics/test/itkImagePCADecompositionCalculatorTest.cxx index c633724f2d1..5bd1084bb21 100644 --- a/Modules/Filtering/ImageStatistics/test/itkImagePCADecompositionCalculatorTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkImagePCADecompositionCalculatorTest.cxx @@ -78,7 +78,7 @@ itkImagePCADecompositionCalculatorTest(int, char *[]) constexpr InputImageType::SizeType inputImageSize = { { IMGWIDTH, IMGHEIGHT } }; constexpr InputImageType::IndexType index{}; - InputImageType::RegionType region; + InputImageType::RegionType region; region.SetSize(inputImageSize); region.SetIndex(index); diff --git a/Modules/Filtering/ImageStatistics/test/itkImagePCAShapeModelEstimatorTest.cxx b/Modules/Filtering/ImageStatistics/test/itkImagePCAShapeModelEstimatorTest.cxx index 825e1d6cbf2..1caef955022 100644 --- a/Modules/Filtering/ImageStatistics/test/itkImagePCAShapeModelEstimatorTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkImagePCAShapeModelEstimatorTest.cxx @@ -48,9 +48,9 @@ itkImagePCAShapeModelEstimatorTest(int, char *[]) // Data definitions constexpr itk::Size<2u>::SizeValueType IMGWIDTH = 2; constexpr itk::Size<2u>::SizeValueType IMGHEIGHT = 2; - constexpr unsigned int NDIMENSION = 2; - constexpr unsigned int NUMTRAINIMAGES = 3; - constexpr unsigned int NUMLARGESTPC = 2; + constexpr unsigned int NDIMENSION = 2; + constexpr unsigned int NUMTRAINIMAGES = 3; + constexpr unsigned int NUMLARGESTPC = 2; itk::OutputWindow::SetInstance(itk::TextOutput::New().GetPointer()); @@ -70,7 +70,7 @@ itkImagePCAShapeModelEstimatorTest(int, char *[]) constexpr InputImageType::SizeType inputImageSize = { { IMGWIDTH, IMGHEIGHT } }; constexpr InputImageType::IndexType index{}; - InputImageType::RegionType region; + InputImageType::RegionType region; region.SetSize(inputImageSize); region.SetIndex(index); @@ -175,7 +175,7 @@ itkImagePCAShapeModelEstimatorTest(int, char *[]) // Print the MeanImage const OutputImageType::Pointer outImage = applyPCAShapeEstimator->GetOutput(0); - OutputImageIterator outImageIt(outImage, outImage->GetBufferedRegion()); + OutputImageIterator outImageIt(outImage, outImage->GetBufferedRegion()); outImageIt.GoToBegin(); std::cout << "The mean image is:" << std::endl; @@ -190,7 +190,7 @@ itkImagePCAShapeModelEstimatorTest(int, char *[]) for (unsigned int j = 1; j < NUMLARGESTPC + 1; ++j) { const OutputImageType::Pointer outImage2 = applyPCAShapeEstimator->GetOutput(j); - OutputImageIterator outImage2It(outImage2, outImage2->GetBufferedRegion()); + OutputImageIterator outImage2It(outImage2, outImage2->GetBufferedRegion()); outImage2It.GoToBegin(); std::cout << "" << std::endl; diff --git a/Modules/Filtering/ImageStatistics/test/itkLabelOverlapMeasuresImageFilterGTest.cxx b/Modules/Filtering/ImageStatistics/test/itkLabelOverlapMeasuresImageFilterGTest.cxx index eddd1960e08..7ad74eac45f 100644 --- a/Modules/Filtering/ImageStatistics/test/itkLabelOverlapMeasuresImageFilterGTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkLabelOverlapMeasuresImageFilterGTest.cxx @@ -49,7 +49,7 @@ class LabelOverlapMeasuresImageFilterFixture : public ::testing::Test { auto image = ImageType::New(); - auto imageSize = ImageType::SizeType::Filled(m_ImageSize); + auto imageSize = ImageType::SizeType::Filled(m_ImageSize); const typename ImageType::RegionType region(imageSize); image->SetRegions(region); image->Allocate(); diff --git a/Modules/Filtering/ImageStatistics/test/itkLabelOverlapMeasuresImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkLabelOverlapMeasuresImageFilterTest.cxx index 4a7c317d543..27ee1c908c1 100644 --- a/Modules/Filtering/ImageStatistics/test/itkLabelOverlapMeasuresImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkLabelOverlapMeasuresImageFilterTest.cxx @@ -64,9 +64,9 @@ LabelOverlapMeasures(int, char * argv[]) << std::setw(17) << "Mean (dice)" << std::setw(17) << "Volume sim." << std::setw(17) << "False negative" << std::setw(17) << "False positive" << std::setw(17) << "False discovery" << std::endl; - typename FilterType::MapType labelMap = filter->GetLabelSetMeasures(); + typename FilterType::MapType labelMap = filter->GetLabelSetMeasures(); typename FilterType::MapType::const_iterator it; - int label = 0; + int label = 0; for (it = labelMap.begin(); it != labelMap.end(); ++it) { if (it->first == 0) @@ -95,7 +95,7 @@ LabelOverlapMeasures(int, char * argv[]) label = itk::NumericTraits::max(); const typename FilterType::RealType expectedValue = 0.0; - typename FilterType::RealType result = filter->GetTargetOverlap(label); + typename FilterType::RealType result = filter->GetTargetOverlap(label); if (itk::Math::NotAlmostEquals(expectedValue, result)) { std::cout << "Error in label " << static_cast::PrintType>(label) << ": "; diff --git a/Modules/Filtering/ImageStatistics/test/itkLabelStatisticsImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkLabelStatisticsImageFilterTest.cxx index 13f0c8a6d7d..80fa8cadba2 100644 --- a/Modules/Filtering/ImageStatistics/test/itkLabelStatisticsImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkLabelStatisticsImageFilterTest.cxx @@ -144,15 +144,15 @@ itkLabelStatisticsImageFilterTest(int argc, char * argv[]) } - const RealType min = filter->GetMinimum(labelValue); - const RealType max = filter->GetMaximum(labelValue); - const RealType median = filter->GetMedian(labelValue); - const RealType mean = filter->GetMean(labelValue); - const RealType sigma = filter->GetSigma(labelValue); - const RealType variance = filter->GetVariance(labelValue); - const RealType sum = filter->GetSum(labelValue); + const RealType min = filter->GetMinimum(labelValue); + const RealType max = filter->GetMaximum(labelValue); + const RealType median = filter->GetMedian(labelValue); + const RealType mean = filter->GetMean(labelValue); + const RealType sigma = filter->GetSigma(labelValue); + const RealType variance = filter->GetVariance(labelValue); + const RealType sum = filter->GetSum(labelValue); const BoundingBoxType box = filter->GetBoundingBox(labelValue); - const RegionType region = filter->GetRegion(labelValue); + const RegionType region = filter->GetRegion(labelValue); std::cout << "Minimum = " << min << std::endl; std::cout << "Maximum = " << max << std::endl; diff --git a/Modules/Filtering/ImageStatistics/test/itkMinimumMaximumImageFilterGTest.cxx b/Modules/Filtering/ImageStatistics/test/itkMinimumMaximumImageFilterGTest.cxx index 55592a3baf9..f3141252a7f 100644 --- a/Modules/Filtering/ImageStatistics/test/itkMinimumMaximumImageFilterGTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkMinimumMaximumImageFilterGTest.cxx @@ -54,7 +54,7 @@ class MinimumMaximumFixture : public ::testing::Test auto image = ImageType::New(); - auto imageSize = ImageType::SizeType::Filled(m_ImageSize); + auto imageSize = ImageType::SizeType::Filled(m_ImageSize); const typename ImageType::RegionType region(imageSize); image->SetRegions(region); image->Allocate(); @@ -117,7 +117,7 @@ class MinimumMaximumFixture : public ::testing::Test return m_Source->GetOutput(); } - Utils::ImageType::Pointer m_Image; + Utils::ImageType::Pointer m_Image; Utils::SourceType::Pointer m_Source; static constexpr itk::SizeValueType m_ImageSize{ 128 }; diff --git a/Modules/Filtering/ImageStatistics/test/itkMinimumMaximumImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkMinimumMaximumImageFilterTest.cxx index 553837c2301..ec9f7d8faf2 100644 --- a/Modules/Filtering/ImageStatistics/test/itkMinimumMaximumImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkMinimumMaximumImageFilterTest.cxx @@ -38,15 +38,15 @@ itkMinimumMaximumImageFilterTest(int argc, char * argv[]) /* Define the image size and physical coordinates */ constexpr SizeType size = { { 20, 20, 20 } }; - constexpr double origin[3] = { 0.0, 0.0, 0.0 }; - constexpr double spacing[3] = { 1, 1, 1 }; + constexpr double origin[3] = { 0.0, 0.0, 0.0 }; + constexpr double spacing[3] = { 1, 1, 1 }; int flag = 0; /* Did this test program work? */ std::cout << "Testing Minimum and Maximum Image Calulator:\n"; // Allocate a simple test image - auto image = ImageType::New(); + auto image = ImageType::New(); ImageType::RegionType region; region.SetSize(size); image->SetRegions(region); diff --git a/Modules/Filtering/ImageStatistics/test/itkStatisticsImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkStatisticsImageFilterTest.cxx index 60ce9060159..e935b42e24d 100644 --- a/Modules/Filtering/ImageStatistics/test/itkStatisticsImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkStatisticsImageFilterTest.cxx @@ -46,9 +46,9 @@ itkStatisticsImageFilterTest(int argc, char * argv[]) itk::Statistics::MersenneTwisterRandomVariateGenerator::GetInstance()->SetSeed(987); - auto image = FloatImage::New(); - FloatImage::RegionType region; - auto size = FloatImage::SizeType::Filled(64); + auto image = FloatImage::New(); + FloatImage::RegionType region; + auto size = FloatImage::SizeType::Filled(64); constexpr FloatImage::IndexType index{}; region.SetIndex(index); @@ -130,7 +130,7 @@ itkStatisticsImageFilterTest(int argc, char * argv[]) filter->SetNumberOfStreamDivisions(numberOfStreamDivisions); ITK_TRY_EXPECT_NO_EXCEPTION(filter->UpdateLargestPossibleRegion()); - const double expectedSigma = std::sqrt((maxValue - minValue) * (maxValue - minValue) / 12.0); + const double expectedSigma = std::sqrt((maxValue - minValue) * (maxValue - minValue) / 12.0); constexpr double epsilon = (maxValue - minValue) * .001; if (itk::Math::abs(filter->GetSigma() - expectedSigma) > epsilon) @@ -145,9 +145,9 @@ itkStatisticsImageFilterTest(int argc, char * argv[]) constexpr double knownVariance = 10.0; using DoubleImage = itk::Image; - auto dImage = DoubleImage::New(); - DoubleImage::SizeType dsize; - DoubleImage::IndexType dindex; + auto dImage = DoubleImage::New(); + DoubleImage::SizeType dsize; + DoubleImage::IndexType dindex; DoubleImage::RegionType dregion; dsize.Fill(50); dindex.Fill(0); @@ -168,7 +168,7 @@ itkStatisticsImageFilterTest(int argc, char * argv[]) ITK_TRY_EXPECT_NO_EXCEPTION(dfilter->UpdateLargestPossibleRegion()); const double testMean = dfilter->GetMean(); const double testVariance = dfilter->GetVariance(); - double diff = itk::Math::abs(testMean - knownMean); + double diff = itk::Math::abs(testMean - knownMean); if ((diff != 0.0 && knownMean != 0.0) && diff / itk::Math::abs(knownMean) > .01) { std::cout << "Expected mean is " << knownMean << ", computed mean is " << testMean << std::endl; diff --git a/Modules/Filtering/LabelMap/include/itkAggregateLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkAggregateLabelMapFilter.hxx index 43d62aff07d..42ef98a5ed4 100644 --- a/Modules/Filtering/LabelMap/include/itkAggregateLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkAggregateLabelMapFilter.hxx @@ -41,7 +41,7 @@ AggregateLabelMapFilter::GenerateData() ++it; while (!it.IsAtEnd()) { - LabelObjectType * lo = it.GetLabelObject(); + LabelObjectType * lo = it.GetLabelObject(); typename LabelObjectType::ConstLineIterator lit(lo); while (!lit.IsAtEnd()) { diff --git a/Modules/Filtering/LabelMap/include/itkAttributeKeepNObjectsLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkAttributeKeepNObjectsLabelMapFilter.h index faa5471243f..bd233c0fc48 100644 --- a/Modules/Filtering/LabelMap/include/itkAttributeKeepNObjectsLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkAttributeKeepNObjectsLabelMapFilter.h @@ -142,7 +142,7 @@ class ITK_TEMPLATE_EXPORT AttributeKeepNObjectsLabelMapFilter : public InPlaceLa }; private: - bool m_ReverseOrdering{}; + bool m_ReverseOrdering{}; SizeValueType m_NumberOfObjects{}; }; // end of class diff --git a/Modules/Filtering/LabelMap/include/itkAttributeOpeningLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkAttributeOpeningLabelMapFilter.h index dde0999ccbe..3e8cfac0a24 100644 --- a/Modules/Filtering/LabelMap/include/itkAttributeOpeningLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkAttributeOpeningLabelMapFilter.h @@ -114,7 +114,7 @@ class ITK_TEMPLATE_EXPORT AttributeOpeningLabelMapFilter : public InPlaceLabelMa private: AttributeValueType m_Lambda{}; - bool m_ReverseOrdering{}; + bool m_ReverseOrdering{}; }; // end of class diff --git a/Modules/Filtering/LabelMap/include/itkAttributeOpeningLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkAttributeOpeningLabelMapFilter.hxx index a1ea7b09d69..2a06a856abe 100644 --- a/Modules/Filtering/LabelMap/include/itkAttributeOpeningLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkAttributeOpeningLabelMapFilter.hxx @@ -56,7 +56,7 @@ AttributeOpeningLabelMapFilter::GenerateData() while (!it.IsAtEnd()) { const typename LabelObjectType::LabelType label = it.GetLabel(); - LabelObjectType * labelObject = it.GetLabelObject(); + LabelObjectType * labelObject = it.GetLabelObject(); if ((!m_ReverseOrdering && accessor(labelObject) < m_Lambda) || (m_ReverseOrdering && accessor(labelObject) > m_Lambda)) diff --git a/Modules/Filtering/LabelMap/include/itkAttributePositionLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkAttributePositionLabelMapFilter.hxx index 7c24d263c37..aadc926c3fc 100644 --- a/Modules/Filtering/LabelMap/include/itkAttributePositionLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkAttributePositionLabelMapFilter.hxx @@ -61,7 +61,7 @@ AttributePositionLabelMapFilter:: template void AttributePositionLabelMapFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); } diff --git a/Modules/Filtering/LabelMap/include/itkAttributeSelectionLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkAttributeSelectionLabelMapFilter.h index 531ace18267..a3fcf0821ae 100644 --- a/Modules/Filtering/LabelMap/include/itkAttributeSelectionLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkAttributeSelectionLabelMapFilter.h @@ -158,7 +158,7 @@ class ITK_TEMPLATE_EXPORT AttributeSelectionLabelMapFilter : public InPlaceLabel private: AttributeSetType m_AttributeSet{}; - bool m_Exclude{}; + bool m_Exclude{}; }; // end of class diff --git a/Modules/Filtering/LabelMap/include/itkAttributeSelectionLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkAttributeSelectionLabelMapFilter.hxx index 5926bf6a6fc..65abe97de09 100644 --- a/Modules/Filtering/LabelMap/include/itkAttributeSelectionLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkAttributeSelectionLabelMapFilter.hxx @@ -53,10 +53,10 @@ AttributeSelectionLabelMapFilter::GenerateData() while (!it.IsAtEnd()) { const typename LabelObjectType::LabelType label = it.GetLabel(); - LabelObjectType * labelObject = it.GetLabelObject(); + LabelObjectType * labelObject = it.GetLabelObject(); AttributeAccessorType accessor; // NOLINT(misc-const-correctness) - const bool notInSet = m_AttributeSet.find(accessor(labelObject)) == m_AttributeSet.end(); + const bool notInSet = m_AttributeSet.find(accessor(labelObject)) == m_AttributeSet.end(); if (m_Exclude != notInSet) // no xor in c++, use != instead { // must increment the iterator before removing the object to avoid invalidating the iterator diff --git a/Modules/Filtering/LabelMap/include/itkAttributeUniqueLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkAttributeUniqueLabelMapFilter.h index 9379ec979d3..c486645294c 100644 --- a/Modules/Filtering/LabelMap/include/itkAttributeUniqueLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkAttributeUniqueLabelMapFilter.h @@ -121,7 +121,7 @@ class ITK_TEMPLATE_EXPORT AttributeUniqueLabelMapFilter : public InPlaceLabelMap this->line = l; this->labelObject = lo; } - LineType line; + LineType line; LabelObjectType * labelObject; }; diff --git a/Modules/Filtering/LabelMap/include/itkAttributeUniqueLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkAttributeUniqueLabelMapFilter.hxx index 27f795d524d..221e2d5aa92 100644 --- a/Modules/Filtering/LabelMap/include/itkAttributeUniqueLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkAttributeUniqueLabelMapFilter.hxx @@ -43,7 +43,7 @@ AttributeUniqueLabelMapFilter::GenerateData() typename std::priority_queue, LineOfLabelObjectComparator>; PriorityQueueType pq; - auto labelMap = this->GetLabelMap(); + auto labelMap = this->GetLabelMap(); IdentifierType numberOfLines = 0; ProgressReporter progress(this, 0, labelMap->GetNumberOfLabelObjects(), 100, 0.0f, 0.3f); @@ -83,7 +83,7 @@ AttributeUniqueLabelMapFilter::GenerateData() lines.push_back(pq.top()); LineOfLabelObject prev = lines.back(); - IndexType prevIdx = prev.line.GetIndex(); + IndexType prevIdx = prev.line.GetIndex(); pq.pop(); const AttributeAccessorType accessor; @@ -91,13 +91,13 @@ AttributeUniqueLabelMapFilter::GenerateData() while (!pq.empty()) { LineOfLabelObject l = pq.top(); - IndexType idx = l.line.GetIndex(); + IndexType idx = l.line.GetIndex(); // NOTE: VS 7,8,9 seem to contain a bug where if the next line is // accessed with l.labelObject, the results will be erroneous. I // have not been able to find any reason for this. // // EXERCISE EXTREME CAUTION WHEN EDITING THE NEXT 2 LINES - const typename LabelObjectType::LabelType lLabel = pq.top().labelObject->GetLabel(); + const typename LabelObjectType::LabelType lLabel = pq.top().labelObject->GetLabel(); const typename TAttributeAccessor::AttributeValueType attr = accessor(l.labelObject); pq.pop(); @@ -120,7 +120,7 @@ AttributeUniqueLabelMapFilter::GenerateData() } else { - OffsetValueType prevLength = prev.line.GetLength(); + OffsetValueType prevLength = prev.line.GetLength(); const OffsetValueType length = l.line.GetLength(); if (prevIdx[0] + prevLength > idx[0]) @@ -131,9 +131,9 @@ AttributeUniqueLabelMapFilter::GenerateData() // which line to keep. This is necessary to avoid the case where a // part of a label is over // a second label, and below in another part of the image. - bool keepCurrent; + bool keepCurrent; const typename TAttributeAccessor::AttributeValueType prevAttr = accessor(prev.labelObject); - const typename LabelObjectType::LabelType prevLabel = prev.labelObject->GetLabel(); + const typename LabelObjectType::LabelType prevLabel = prev.labelObject->GetLabel(); // this may be changed to a single boolean expression, but may become // quite difficult to read if (attr == prevAttr) @@ -245,7 +245,7 @@ AttributeUniqueLabelMapFilter::GenerateData() while (it.IsAtEnd()) { const typename LabelObjectType::LabelType label = it.GetLabel(); - LabelObjectType * labelObject = it.GetLabelObject(); + LabelObjectType * labelObject = it.GetLabelObject(); if (labelObject->Empty()) { diff --git a/Modules/Filtering/LabelMap/include/itkAutoCropLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkAutoCropLabelMapFilter.hxx index 8d2608e1f5b..37eb8f030be 100644 --- a/Modules/Filtering/LabelMap/include/itkAutoCropLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkAutoCropLabelMapFilter.hxx @@ -63,11 +63,11 @@ AutoCropLabelMapFilter::GenerateOutputInformation() while (!loit.IsAtEnd()) { - const LabelObjectType * labelObject = loit.GetLabelObject(); + const LabelObjectType * labelObject = loit.GetLabelObject(); typename LabelObjectType::ConstLineIterator lit(labelObject); while (!lit.IsAtEnd()) { - const IndexType & idx = lit.GetLine().GetIndex(); + const IndexType & idx = lit.GetLine().GetIndex(); const typename TInputImage::IndexValueType length = lit.GetLine().GetLength(); // update the mins and maxs @@ -94,7 +94,7 @@ AutoCropLabelMapFilter::GenerateOutputInformation() // final computation - SizeType regionSize; + SizeType regionSize; InputImageRegionType cropRegion; for (unsigned int i = 0; i < ImageDimension; ++i) diff --git a/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.h index 81b68309a51..8fcc0adaa04 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.h @@ -180,8 +180,8 @@ class ITK_TEMPLATE_EXPORT BinaryImageToLabelMapFilter private: OutputPixelType m_OutputBackgroundValue{}; - InputPixelType m_InputForegroundValue{}; - SizeValueType m_NumberOfObjects{}; + InputPixelType m_InputForegroundValue{}; + SizeValueType m_NumberOfObjects{}; }; } // end namespace itk diff --git a/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.hxx index 4833f185e2e..1cb4e9174d3 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.hxx @@ -72,7 +72,7 @@ BinaryImageToLabelMapFilter::GenerateData() output->SetBackgroundValue(this->m_OutputBackgroundValue); const typename OutputImageType::RegionType & requestedRegion = output->GetRequestedRegion(); - const typename OutputImageType::SizeType & requestedSize = requestedRegion.GetSize(); + const typename OutputImageType::SizeType & requestedSize = requestedRegion.GetSize(); const SizeValueType pixelcount = requestedRegion.GetNumberOfPixels(); const SizeValueType xsize = requestedSize[0]; @@ -128,13 +128,13 @@ BinaryImageToLabelMapFilter::GenerateData() for (SizeValueType thisIdx = 0; thisIdx < linecount; ++thisIdx) { // now fill the labelled sections - auto cIt = this->m_LineMap[thisIdx].begin(); + auto cIt = this->m_LineMap[thisIdx].begin(); const auto cEnd = this->m_LineMap[thisIdx].end(); while (cIt != cEnd) { const InternalLabelType Ilab = this->LookupSet(cIt->label); - const OutputPixelType lab = this->m_Consecutive[Ilab]; + const OutputPixelType lab = this->m_Consecutive[Ilab]; output->SetLine(cIt->where, cIt->length, lab); ++cIt; } @@ -155,7 +155,7 @@ BinaryImageToLabelMapFilter::DynamicThreadedGenerateD const TInputImage * input = this->GetInput(); const WorkUnitData workUnitData = this->CreateWorkUnitData(outputRegionForThread); - SizeValueType lineId = workUnitData.firstLine; + SizeValueType lineId = workUnitData.firstLine; SizeValueType nbOfLabels = 0; for (ImageScanlineConstIterator inLineIt(input, outputRegionForThread); !inLineIt.IsAtEnd(); inLineIt.NextLine()) @@ -167,7 +167,7 @@ BinaryImageToLabelMapFilter::DynamicThreadedGenerateD if (pixelValue == this->m_InputForegroundValue) { // We've hit the start of a run - SizeValueType length = 0; + SizeValueType length = 0; const IndexType thisIndex = inLineIt.GetIndex(); ++length; ++inLineIt; diff --git a/Modules/Filtering/LabelMap/include/itkBinaryImageToShapeLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryImageToShapeLabelMapFilter.h index 6f7d2694b2d..4c4755e613b 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryImageToShapeLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryImageToShapeLabelMapFilter.h @@ -176,12 +176,12 @@ class ITK_TEMPLATE_EXPORT BinaryImageToShapeLabelMapFilter : public ImageToImage GenerateData() override; private: - bool m_FullyConnected{}; + bool m_FullyConnected{}; OutputImagePixelType m_OutputBackgroundValue{}; - InputImagePixelType m_InputForegroundValue{}; - bool m_ComputeFeretDiameter{}; - bool m_ComputePerimeter{}; - bool m_ComputeOrientedBoundingBox{}; + InputImagePixelType m_InputForegroundValue{}; + bool m_ComputeFeretDiameter{}; + bool m_ComputePerimeter{}; + bool m_ComputeOrientedBoundingBox{}; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/LabelMap/include/itkBinaryImageToStatisticsLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryImageToStatisticsLabelMapFilter.h index ee981e09ff1..5aad3123582 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryImageToStatisticsLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryImageToStatisticsLabelMapFilter.h @@ -201,13 +201,13 @@ class ITK_TEMPLATE_EXPORT BinaryImageToStatisticsLabelMapFilter : public ImageTo GenerateData() override; private: - bool m_FullyConnected{}; + bool m_FullyConnected{}; OutputImagePixelType m_OutputBackgroundValue{}; - InputImagePixelType m_InputForegroundValue{}; - bool m_ComputeFeretDiameter{}; - bool m_ComputePerimeter{}; - unsigned int m_NumberOfBins{}; - bool m_ComputeHistogram{}; + InputImagePixelType m_InputForegroundValue{}; + bool m_ComputeFeretDiameter{}; + bool m_ComputePerimeter{}; + unsigned int m_NumberOfBins{}; + bool m_ComputeHistogram{}; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/LabelMap/include/itkBinaryImageToStatisticsLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkBinaryImageToStatisticsLabelMapFilter.hxx index a5a52c8e2c1..669e611379d 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryImageToStatisticsLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkBinaryImageToStatisticsLabelMapFilter.hxx @@ -96,7 +96,7 @@ BinaryImageToStatisticsLabelMapFilter: template void BinaryImageToStatisticsLabelMapFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/LabelMap/include/itkBinaryReconstructionByDilationImageFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryReconstructionByDilationImageFilter.h index 15540506c09..83ac1b653eb 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryReconstructionByDilationImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryReconstructionByDilationImageFilter.h @@ -157,7 +157,7 @@ class ITK_TEMPLATE_EXPORT BinaryReconstructionByDilationImageFilter GenerateData() override; private: - bool m_FullyConnected{}; + bool m_FullyConnected{}; OutputImagePixelType m_BackgroundValue{}; OutputImagePixelType m_ForegroundValue{}; }; // end of class diff --git a/Modules/Filtering/LabelMap/include/itkBinaryReconstructionByErosionImageFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryReconstructionByErosionImageFilter.h index f65092e7e7d..a12bd5eb36d 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryReconstructionByErosionImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryReconstructionByErosionImageFilter.h @@ -157,7 +157,7 @@ class ITK_TEMPLATE_EXPORT BinaryReconstructionByErosionImageFilter : public Imag GenerateData() override; private: - bool m_FullyConnected{}; + bool m_FullyConnected{}; OutputImagePixelType m_BackgroundValue{}; OutputImagePixelType m_ForegroundValue{}; }; // end of class diff --git a/Modules/Filtering/LabelMap/include/itkBinaryReconstructionLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkBinaryReconstructionLabelMapFilter.hxx index d28bd085f41..a155b059109 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryReconstructionLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkBinaryReconstructionLabelMapFilter.hxx @@ -45,7 +45,7 @@ BinaryReconstructionLabelMapFilter::Th typename LabelObjectType::ConstIndexIterator it(labelObject); while (!it.IsAtEnd()) { - const IndexType & idx = it.GetIndex(); + const IndexType & idx = it.GetIndex(); const MarkerImagePixelType & v = maskImage->GetPixel(idx); if (v == m_ForegroundValue) { @@ -64,7 +64,7 @@ BinaryReconstructionLabelMapFilter::Th template void BinaryReconstructionLabelMapFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/LabelMap/include/itkBinaryShapeKeepNObjectsImageFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryShapeKeepNObjectsImageFilter.h index 4b44d5d1ba5..44bc0c98ca7 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryShapeKeepNObjectsImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryShapeKeepNObjectsImageFilter.h @@ -170,12 +170,12 @@ class ITK_TEMPLATE_EXPORT BinaryShapeKeepNObjectsImageFilter : public ImageToIma GenerateData() override; private: - bool m_FullyConnected{ false }; + bool m_FullyConnected{ false }; OutputImagePixelType m_BackgroundValue{}; OutputImagePixelType m_ForegroundValue{}; - SizeValueType m_NumberOfObjects{ 0 }; - bool m_ReverseOrdering{ false }; - AttributeType m_Attribute{}; + SizeValueType m_NumberOfObjects{ 0 }; + bool m_ReverseOrdering{ false }; + AttributeType m_Attribute{}; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/LabelMap/include/itkBinaryShapeOpeningImageFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryShapeOpeningImageFilter.h index 04b1f154918..920a9a03cab 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryShapeOpeningImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryShapeOpeningImageFilter.h @@ -170,12 +170,12 @@ class ITK_TEMPLATE_EXPORT BinaryShapeOpeningImageFilter : public ImageToImageFil GenerateData() override; private: - bool m_FullyConnected{}; + bool m_FullyConnected{}; OutputImagePixelType m_BackgroundValue{}; OutputImagePixelType m_ForegroundValue{}; - double m_Lambda{}; - bool m_ReverseOrdering{}; - AttributeType m_Attribute{}; + double m_Lambda{}; + bool m_ReverseOrdering{}; + AttributeType m_Attribute{}; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/LabelMap/include/itkBinaryStatisticsKeepNObjectsImageFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryStatisticsKeepNObjectsImageFilter.h index fc8fbc32f17..95e931b710b 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryStatisticsKeepNObjectsImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryStatisticsKeepNObjectsImageFilter.h @@ -202,12 +202,12 @@ class ITK_TEMPLATE_EXPORT BinaryStatisticsKeepNObjectsImageFilter : public Image GenerateData() override; private: - bool m_FullyConnected{ false }; + bool m_FullyConnected{ false }; OutputImagePixelType m_BackgroundValue{}; OutputImagePixelType m_ForegroundValue{}; - SizeValueType m_NumberOfObjects{ 0 }; - bool m_ReverseOrdering{ false }; - AttributeType m_Attribute{}; + SizeValueType m_NumberOfObjects{ 0 }; + bool m_ReverseOrdering{ false }; + AttributeType m_Attribute{}; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/LabelMap/include/itkBinaryStatisticsOpeningImageFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryStatisticsOpeningImageFilter.h index b629276480c..8a0e31a68e9 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryStatisticsOpeningImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryStatisticsOpeningImageFilter.h @@ -206,12 +206,12 @@ class ITK_TEMPLATE_EXPORT BinaryStatisticsOpeningImageFilter : public ImageToIma GenerateData() override; private: - bool m_FullyConnected{}; + bool m_FullyConnected{}; OutputImagePixelType m_BackgroundValue{}; OutputImagePixelType m_ForegroundValue{}; - double m_Lambda{}; - bool m_ReverseOrdering{}; - AttributeType m_Attribute{}; + double m_Lambda{}; + bool m_ReverseOrdering{}; + AttributeType m_Attribute{}; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/LabelMap/include/itkChangeLabelLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkChangeLabelLabelMapFilter.hxx index 1da19fe6768..d626a725bf2 100644 --- a/Modules/Filtering/LabelMap/include/itkChangeLabelLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkChangeLabelLabelMapFilter.hxx @@ -134,7 +134,7 @@ ChangeLabelLabelMapFilter::GenerateData() while (labelObjectItr != labelObjectsToBeRelabeled.end()) { LabelObjectType * labelObjectSource = *labelObjectItr; - const PixelType newLabel = m_MapOfLabelToBeReplaced[labelObjectSource->GetLabel()]; + const PixelType newLabel = m_MapOfLabelToBeReplaced[labelObjectSource->GetLabel()]; // Ignore the label if it is the background if (newLabel != output->GetBackgroundValue()) diff --git a/Modules/Filtering/LabelMap/include/itkChangeRegionLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkChangeRegionLabelMapFilter.hxx index ea7440372fe..e8c78c11d7b 100644 --- a/Modules/Filtering/LabelMap/include/itkChangeRegionLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkChangeRegionLabelMapFilter.hxx @@ -90,7 +90,7 @@ ChangeRegionLabelMapFilter::ThreadedProcessLabelObject(LabelObjectT labelObject->Clear(); const IndexType idxMin = m_Region.GetIndex(); - IndexType idxMax; + IndexType idxMax; for (unsigned int i = 0; i < ImageDimension; ++i) { idxMax[i] = idxMin[i] + m_Region.GetSize()[i] - 1; @@ -99,7 +99,7 @@ ChangeRegionLabelMapFilter::ThreadedProcessLabelObject(LabelObjectT typename LabelObjectType::ConstLineIterator lit(tmp); while (!lit.IsAtEnd()) { - const IndexType idx = lit.GetLine().GetIndex(); + const IndexType idx = lit.GetLine().GetIndex(); const IndexValueType length = lit.GetLine().GetLength(); bool outside = false; @@ -116,7 +116,7 @@ ChangeRegionLabelMapFilter::ThreadedProcessLabelObject(LabelObjectT const IndexValueType lastIdx0 = idx[0] + length - 1; if (!((idx[0] < idxMin[0] && lastIdx0 < idxMin[0]) || (idx[0] > idxMax[0] && lastIdx0 > idxMax[0]))) { - IndexType newIdx = idx; + IndexType newIdx = idx; IndexValueType newLength = length; if (idx[0] < idxMin[0]) { diff --git a/Modules/Filtering/LabelMap/include/itkConvertLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkConvertLabelMapFilter.hxx index 062c5e1a1cd..dae31821d27 100644 --- a/Modules/Filtering/LabelMap/include/itkConvertLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkConvertLabelMapFilter.hxx @@ -30,7 +30,7 @@ ConvertLabelMapFilter::GenerateData() { this->AllocateOutputs(); - TOutputImage * outputImage = this->GetOutput(); + TOutputImage * outputImage = this->GetOutput(); const TInputImage * inputImage = this->GetInput(); outputImage->SetBackgroundValue(inputImage->GetBackgroundValue()); @@ -40,7 +40,7 @@ ConvertLabelMapFilter::GenerateData() for (typename TInputImage::ConstIterator it(inputImage); !it.IsAtEnd(); ++it) { const LabelObjectType * labelObject = it.GetLabelObject(); - auto newLabelObject = OutputLabelObjectType::New(); + auto newLabelObject = OutputLabelObjectType::New(); newLabelObject->template CopyAllFrom(labelObject); outputImage->AddLabelObject(newLabelObject); progress.CompletedPixel(); diff --git a/Modules/Filtering/LabelMap/include/itkCropLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkCropLabelMapFilter.hxx index 1cb8dda8161..be5d11d983a 100644 --- a/Modules/Filtering/LabelMap/include/itkCropLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkCropLabelMapFilter.hxx @@ -43,10 +43,10 @@ CropLabelMapFilter::GenerateOutputInformation() } // Compute the new region size. - SizeType size; + SizeType size; IndexType index; - const SizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const SizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); const IndexType inputIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); const SizeType originalCropSize = m_UpperBoundaryCropSize + m_LowerBoundaryCropSize; diff --git a/Modules/Filtering/LabelMap/include/itkInPlaceLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkInPlaceLabelMapFilter.hxx index 091606ae759..1590f74ff8b 100644 --- a/Modules/Filtering/LabelMap/include/itkInPlaceLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkInPlaceLabelMapFilter.hxx @@ -85,7 +85,7 @@ InPlaceLabelMapFilter::AllocateOutputs() Superclass::AllocateOutputs(); // copy the content of the input image to the output image const TInputImage * input = this->GetInput(); - TOutputImage * output = this->GetOutput(); + TOutputImage * output = this->GetOutput(); itkAssertInDebugAndIgnoreInReleaseMacro(input != nullptr); itkAssertInDebugAndIgnoreInReleaseMacro(output != nullptr); diff --git a/Modules/Filtering/LabelMap/include/itkLabelImageToLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkLabelImageToLabelMapFilter.hxx index 652bac1fae1..084c155d074 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelImageToLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkLabelImageToLabelMapFilter.hxx @@ -83,7 +83,7 @@ template void LabelImageToLabelMapFilter::ThreadedGenerateData( const OutputImageRegionType & regionForThread, - ThreadIdType threadId) + ThreadIdType threadId) { TotalProgressReporter progress(this, this->GetInput()->GetRequestedRegion().GetNumberOfPixels()); @@ -104,7 +104,7 @@ LabelImageToLabelMapFilter::ThreadedGenerateData( { // We've hit the start of a run const IndexType idx = it.GetIndex(); - LengthType length = 1; + LengthType length = 1; ++it; while (!it.IsAtEndOfLine() && it.Get() == value) { @@ -140,7 +140,7 @@ LabelImageToLabelMapFilter::AfterThreadedGenerateData if (output->HasLabel(labelObject->GetLabel())) { // merge the lines in the output's object - LabelObjectType * lo = output->GetLabelObject(labelObject->GetLabel()); + LabelObjectType * lo = output->GetLabelObject(labelObject->GetLabel()); typename LabelObjectType::ConstLineIterator lit(labelObject); while (!lit.IsAtEnd()) { diff --git a/Modules/Filtering/LabelMap/include/itkLabelImageToShapeLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkLabelImageToShapeLabelMapFilter.h index 4e8313d0d49..559c782af0c 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelImageToShapeLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelImageToShapeLabelMapFilter.h @@ -150,9 +150,9 @@ class ITK_TEMPLATE_EXPORT LabelImageToShapeLabelMapFilter : public ImageToImageF private: OutputImagePixelType m_BackgroundValue{}; - bool m_ComputeFeretDiameter{}; - bool m_ComputePerimeter{}; - bool m_ComputeOrientedBoundingBox{}; + bool m_ComputeFeretDiameter{}; + bool m_ComputePerimeter{}; + bool m_ComputeOrientedBoundingBox{}; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/LabelMap/include/itkLabelImageToStatisticsLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkLabelImageToStatisticsLabelMapFilter.h index a84791491e5..b32c57ebbff 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelImageToStatisticsLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelImageToStatisticsLabelMapFilter.h @@ -186,10 +186,10 @@ class ITK_TEMPLATE_EXPORT LabelImageToStatisticsLabelMapFilter : public ImageToI private: OutputImagePixelType m_BackgroundValue{}; - bool m_ComputeFeretDiameter{}; - bool m_ComputePerimeter{}; - unsigned int m_NumberOfBins{}; - bool m_ComputeHistogram{}; + bool m_ComputeFeretDiameter{}; + bool m_ComputePerimeter{}; + unsigned int m_NumberOfBins{}; + bool m_ComputeHistogram{}; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/LabelMap/include/itkLabelImageToStatisticsLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkLabelImageToStatisticsLabelMapFilter.hxx index a2e602e12bf..680ec404fe2 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelImageToStatisticsLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkLabelImageToStatisticsLabelMapFilter.hxx @@ -92,7 +92,7 @@ LabelImageToStatisticsLabelMapFilter:: template void LabelImageToStatisticsLabelMapFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/LabelMap/include/itkLabelMap.h b/Modules/Filtering/LabelMap/include/itkLabelMap.h index f0b1a33c342..4049c7aba10 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMap.h +++ b/Modules/Filtering/LabelMap/include/itkLabelMap.h @@ -469,7 +469,7 @@ class ITK_TEMPLATE_EXPORT LabelMap : public ImageBase::AddPixel(const IndexType & idx, const LabelType & label) template void LabelMap::AddPixel(const LabelObjectContainerIterator & it, - const IndexType & idx, - const LabelType & label) + const IndexType & idx, + const LabelType & label) { if (label == m_BackgroundValue) { @@ -280,8 +280,8 @@ LabelMap::AddPixel(const LabelObjectContainerIterator & it, template void LabelMap::RemovePixel(const LabelObjectContainerIterator & it, - const IndexType & idx, - bool iEmitModifiedEvent) + const IndexType & idx, + bool iEmitModifiedEvent) { if (it != m_LabelObjectContainer.end()) { @@ -412,7 +412,7 @@ LabelMap::PushLabelObject(LabelObjectType * labelObject) else { // search for an unused label - LabelType label = firstLabel; + LabelType label = firstLabel; LabelObjectContainerConstIterator it; for (it = m_LabelObjectContainer.begin(); it != m_LabelObjectContainer.end(); it++, label++) { diff --git a/Modules/Filtering/LabelMap/include/itkLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkLabelMapFilter.hxx index aaa7ebb668f..810a238061a 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkLabelMapFilter.hxx @@ -82,7 +82,7 @@ template void LabelMapFilter::DynamicThreadedGenerateData(const OutputImageRegionType &) { - const auto numberOfLabelObjects = this->GetLabelMap()->GetNumberOfLabelObjects(); + const auto numberOfLabelObjects = this->GetLabelMap()->GetNumberOfLabelObjects(); TotalProgressReporter progress(this, numberOfLabelObjects, numberOfLabelObjects); while (true) { diff --git a/Modules/Filtering/LabelMap/include/itkLabelMapMaskImageFilter.h b/Modules/Filtering/LabelMap/include/itkLabelMapMaskImageFilter.h index 0289c06aba3..28b7623f5fc 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMapMaskImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelMapMaskImageFilter.h @@ -186,11 +186,11 @@ class ITK_TEMPLATE_EXPORT LabelMapMaskImageFilter : public LabelMapFilter::GenerateOutputInformation() while (!lit.IsAtEnd()) { const IndexType & idx = lit.GetLine().GetIndex(); - const LengthType length = lit.GetLine().GetLength(); + const LengthType length = lit.GetLine().GetLength(); // Update the mins and maxs for (unsigned int i = 0; i < ImageDimension; ++i) @@ -166,14 +166,14 @@ LabelMapMaskImageFilter::GenerateOutputInformation() // Just find the bounding box of the object with that label const LabelObjectType * labelObject = input->GetLabelObject(m_Label); - auto mins = IndexType::Filled(NumericTraits::max()); - auto maxs = IndexType::Filled(NumericTraits::NonpositiveMin()); + auto mins = IndexType::Filled(NumericTraits::max()); + auto maxs = IndexType::Filled(NumericTraits::NonpositiveMin()); // Iterate over all the lines typename LabelObjectType::ConstLineIterator lit(labelObject); while (!lit.IsAtEnd()) { const IndexType & idx = lit.GetLine().GetIndex(); - const LengthType length = lit.GetLine().GetLength(); + const LengthType length = lit.GetLine().GetLength(); // Update the mins and maxs for (unsigned int i = 0; i < ImageDimension; ++i) @@ -262,7 +262,7 @@ LabelMapMaskImageFilter::GenerateData() { const LabelObjectType * labelObject = this->GetLabelMap()->GetLabelObject(m_Label); const OutputImageType * input2 = this->GetFeatureImage(); - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); if (!m_Negated) { @@ -279,7 +279,7 @@ LabelMapMaskImageFilter::GenerateData() // And mark the label object as background // Should we take care to not write outside the image ? - const bool testIdxIsInside = m_Crop && (inImage->GetBackgroundValue() == m_Label) ^ m_Negated; + const bool testIdxIsInside = m_Crop && (inImage->GetBackgroundValue() == m_Label) ^ m_Negated; const RegionType outputRegion = output->GetLargestPossibleRegion(); typename LabelObjectType::ConstIndexIterator it(labelObject); @@ -305,8 +305,8 @@ void LabelMapMaskImageFilter::DynamicThreadedGenerateData( const OutputImageRegionType & outputRegionForThread) { - OutputImageType * output = this->GetOutput(); - auto * input = const_cast(this->GetInput()); + OutputImageType * output = this->GetOutput(); + auto * input = const_cast(this->GetInput()); const OutputImageType * input2 = this->GetFeatureImage(); // Keep the values from the feature image if the same pixel in the label image @@ -334,8 +334,8 @@ template void LabelMapMaskImageFilter::ThreadedProcessLabelObject(LabelObjectType * labelObject) { - OutputImageType * output = this->GetOutput(); - auto * input = const_cast(this->GetInput()); + OutputImageType * output = this->GetOutput(); + auto * input = const_cast(this->GetInput()); const OutputImageType * input2 = this->GetFeatureImage(); if (!m_Negated) @@ -344,7 +344,7 @@ LabelMapMaskImageFilter::ThreadedProcessLabelObject(L // equals the label given by the user. The other pixels are set to the background value. // Should we take care to not write outside the image ? - const bool testIdxIsInside = m_Crop && (input->GetBackgroundValue() == m_Label) ^ m_Negated; + const bool testIdxIsInside = m_Crop && (input->GetBackgroundValue() == m_Label) ^ m_Negated; const RegionType outputRegion = output->GetLargestPossibleRegion(); // The user wants the mask to be the background of the label collection image diff --git a/Modules/Filtering/LabelMap/include/itkLabelMapToAttributeImageFilter.hxx b/Modules/Filtering/LabelMap/include/itkLabelMapToAttributeImageFilter.hxx index abc41f78b72..000827ae926 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMapToAttributeImageFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkLabelMapToAttributeImageFilter.hxx @@ -63,9 +63,9 @@ LabelMapToAttributeImageFilter::G { // Allocate the output this->AllocateOutputs(); - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); const InputImageType * input = this->GetInput(); - ProgressReporter progress(this, 0, output->GetRequestedRegion().GetNumberOfPixels()); + ProgressReporter progress(this, 0, output->GetRequestedRegion().GetNumberOfPixels()); const AttributeAccessorType accessor; @@ -74,7 +74,7 @@ LabelMapToAttributeImageFilter::G for (typename InputImageType::ConstIterator loit(input); !loit.IsAtEnd(); ++loit) { using LabelObjectType = typename InputImageType::LabelObjectType; - const LabelObjectType * labelObject = loit.GetLabelObject(); + const LabelObjectType * labelObject = loit.GetLabelObject(); const AttributeValueType & attribute = accessor(labelObject); typename LabelObjectType::ConstIndexIterator it(labelObject); @@ -92,7 +92,7 @@ LabelMapToAttributeImageFilter::G template void LabelMapToAttributeImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/LabelMap/include/itkLabelMapToBinaryImageFilter.hxx b/Modules/Filtering/LabelMap/include/itkLabelMapToBinaryImageFilter.hxx index 0553691ffd5..8926fcf5efc 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMapToBinaryImageFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkLabelMapToBinaryImageFilter.hxx @@ -99,7 +99,7 @@ LabelMapToBinaryImageFilter::DynamicThreadedGenerateD { // fill the background with the background values from the background image ImageRegionConstIterator bgIt(this->GetBackgroundImage(), outputRegionForThread); - ImageRegionIterator oIt(output, outputRegionForThread); + ImageRegionIterator oIt(output, outputRegionForThread); bgIt.GoToBegin(); oIt.GoToBegin(); @@ -137,7 +137,7 @@ template void LabelMapToBinaryImageFilter::ThreadedProcessLabelObject(LabelObjectType * labelObject) { - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); typename LabelObjectType::ConstIndexIterator it(labelObject); while (!it.IsAtEnd()) { diff --git a/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.hxx b/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.hxx index c97994be5e7..057483653d8 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.hxx @@ -30,7 +30,7 @@ template void LabelMapToLabelImageFilter::BeforeThreadedGenerateData() { - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); const InputImageType * input = this->GetInput(); output->FillBuffer(input->GetBackgroundValue()); @@ -42,8 +42,8 @@ template void LabelMapToLabelImageFilter::ThreadedProcessLabelObject(LabelObjectType * labelObject) { - OutputImageType * output = this->GetOutput(); - const typename LabelObjectType::LabelType & label = labelObject->GetLabel(); + OutputImageType * output = this->GetOutput(); + const typename LabelObjectType::LabelType & label = labelObject->GetLabel(); typename LabelObjectType::ConstIndexIterator it(labelObject); while (!it.IsAtEnd()) diff --git a/Modules/Filtering/LabelMap/include/itkLabelObject.h b/Modules/Filtering/LabelMap/include/itkLabelObject.h index bfc5b9df944..f8241a90e9c 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelObject.h +++ b/Modules/Filtering/LabelMap/include/itkLabelObject.h @@ -395,7 +395,7 @@ class ITK_TEMPLATE_EXPORT LabelObject : public LightObject InternalIteratorType m_Iterator; InternalIteratorType m_Begin; InternalIteratorType m_End; - IndexType m_Index; + IndexType m_Index; }; protected: @@ -407,7 +407,7 @@ class ITK_TEMPLATE_EXPORT LabelObject : public LightObject using LineContainerType = typename std::deque; LineContainerType m_LineContainer{}; - LabelType m_Label{}; + LabelType m_Label{}; }; } // end namespace itk diff --git a/Modules/Filtering/LabelMap/include/itkLabelObject.hxx b/Modules/Filtering/LabelMap/include/itkLabelObject.hxx index 8bf62f3d4b0..c389a5e45a0 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelObject.hxx +++ b/Modules/Filtering/LabelMap/include/itkLabelObject.hxx @@ -104,7 +104,7 @@ LabelObject::RemoveIndex(const IndexType & idx) { if (it->HasIndex(idx)) { - IndexType orgLineIndex = it->GetIndex(); + IndexType orgLineIndex = it->GetIndex(); const LengthType orgLineLength = it->GetLength(); if (orgLineLength == 1) @@ -315,7 +315,7 @@ LabelObject::Optimize() // then check the lines consistency // we'll proceed line index by line index - IndexType currentIdx = lineContainer.begin()->GetIndex(); + IndexType currentIdx = lineContainer.begin()->GetIndex(); LengthType currentLength = lineContainer.begin()->GetLength(); auto it = lineContainer.begin(); @@ -323,7 +323,7 @@ LabelObject::Optimize() while (it != lineContainer.end()) { const LineType & line = *it; - IndexType idx = line.GetIndex(); + IndexType idx = line.GetIndex(); const LengthType length = line.GetLength(); // check the index to be sure that we are still in the same line idx diff --git a/Modules/Filtering/LabelMap/include/itkLabelObjectLine.h b/Modules/Filtering/LabelMap/include/itkLabelObjectLine.h index 25e63b7f9bb..7b399ac0a78 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelObjectLine.h +++ b/Modules/Filtering/LabelMap/include/itkLabelObjectLine.h @@ -100,7 +100,7 @@ class ITK_TEMPLATE_EXPORT LabelObjectLine PrintTrailer(std::ostream & os, Indent indent) const; private: - IndexType m_Index{}; + IndexType m_Index{}; LengthType m_Length{}; }; } // end namespace itk diff --git a/Modules/Filtering/LabelMap/include/itkLabelShapeKeepNObjectsImageFilter.h b/Modules/Filtering/LabelMap/include/itkLabelShapeKeepNObjectsImageFilter.h index 99275f7b8f7..55400732be0 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelShapeKeepNObjectsImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelShapeKeepNObjectsImageFilter.h @@ -156,9 +156,9 @@ class ITK_TEMPLATE_EXPORT LabelShapeKeepNObjectsImageFilter : public ImageToImag private: OutputImagePixelType m_BackgroundValue{}; - SizeValueType m_NumberOfObjects{}; - bool m_ReverseOrdering{}; - AttributeType m_Attribute{}; + SizeValueType m_NumberOfObjects{}; + bool m_ReverseOrdering{}; + AttributeType m_Attribute{}; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/LabelMap/include/itkLabelShapeOpeningImageFilter.h b/Modules/Filtering/LabelMap/include/itkLabelShapeOpeningImageFilter.h index 4f574a438fa..a27531eb967 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelShapeOpeningImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelShapeOpeningImageFilter.h @@ -153,9 +153,9 @@ class ITK_TEMPLATE_EXPORT LabelShapeOpeningImageFilter : public ImageToImageFilt private: OutputImagePixelType m_BackgroundValue{}; - double m_Lambda{}; - bool m_ReverseOrdering{}; - AttributeType m_Attribute{}; + double m_Lambda{}; + bool m_ReverseOrdering{}; + AttributeType m_Attribute{}; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/LabelMap/include/itkLabelStatisticsKeepNObjectsImageFilter.h b/Modules/Filtering/LabelMap/include/itkLabelStatisticsKeepNObjectsImageFilter.h index 9551773509b..768095c277e 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelStatisticsKeepNObjectsImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelStatisticsKeepNObjectsImageFilter.h @@ -184,9 +184,9 @@ class ITK_TEMPLATE_EXPORT LabelStatisticsKeepNObjectsImageFilter : public ImageT private: OutputImagePixelType m_BackgroundValue{}; - SizeValueType m_NumberOfObjects{}; - bool m_ReverseOrdering{}; - AttributeType m_Attribute{}; + SizeValueType m_NumberOfObjects{}; + bool m_ReverseOrdering{}; + AttributeType m_Attribute{}; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/LabelMap/include/itkLabelStatisticsOpeningImageFilter.h b/Modules/Filtering/LabelMap/include/itkLabelStatisticsOpeningImageFilter.h index 8883c25b5bc..a26ba401369 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelStatisticsOpeningImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelStatisticsOpeningImageFilter.h @@ -185,9 +185,9 @@ class ITK_TEMPLATE_EXPORT LabelStatisticsOpeningImageFilter : public ImageToImag private: OutputImagePixelType m_BackgroundValue{}; - double m_Lambda{}; - bool m_ReverseOrdering{}; - AttributeType m_Attribute{}; + double m_Lambda{}; + bool m_ReverseOrdering{}; + AttributeType m_Attribute{}; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.h index 15661b49d70..58608e8e7b7 100644 --- a/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.h @@ -48,7 +48,7 @@ class MergeLabelMapFilterEnums }; // Define how to print enumeration extern ITKLabelMap_EXPORT std::ostream & - operator<<(std::ostream & out, const MergeLabelMapFilterEnums::ChoiceMethod value); +operator<<(std::ostream & out, const MergeLabelMapFilterEnums::ChoiceMethod value); using ChoiceMethodEnum = MergeLabelMapFilterEnums::ChoiceMethod; #if !defined(ITK_LEGACY_REMOVE) diff --git a/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.hxx index 2130a9b2d36..6ac145bf208 100644 --- a/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.hxx @@ -81,7 +81,7 @@ MergeLabelMapFilter::MergeWithKeep() typename ImageType::ConstIterator it2(this->GetInput(i)); while (!it2.IsAtEnd()) { - const LabelObjectType * lo = it2.GetLabelObject(); + const LabelObjectType * lo = it2.GetLabelObject(); const LabelObjectPointer newLo = LabelObjectType::New(); newLo->template CopyAllFrom(lo); @@ -124,7 +124,7 @@ MergeLabelMapFilter::MergeWithStrict() typename ImageType::ConstIterator it2(this->GetInput(i)); while (!it2.IsAtEnd()) { - const LabelObjectType * lo = it2.GetLabelObject(); + const LabelObjectType * lo = it2.GetLabelObject(); const LabelObjectPointer newLo = LabelObjectType::New(); newLo->template CopyAllFrom(lo); @@ -184,7 +184,7 @@ MergeLabelMapFilter::MergeWithAggregate() if (hasLabel) { // add the lines of that object to the one already in the output - LabelObjectType * mainLo = output->GetLabelObject(lo->GetLabel()); + LabelObjectType * mainLo = output->GetLabelObject(lo->GetLabel()); typename LabelObjectType::ConstLineIterator lit(lo); while (!lit.IsAtEnd()) { @@ -235,7 +235,7 @@ MergeLabelMapFilter::MergeWithPack() typename ImageType::ConstIterator it2(this->GetInput(i)); while (!it2.IsAtEnd()) { - const LabelObjectType * lo = it2.GetLabelObject(); + const LabelObjectType * lo = it2.GetLabelObject(); const LabelObjectPointer newLo = LabelObjectType::New(); newLo->template CopyAllFrom(lo); output->PushLabelObject(newLo); diff --git a/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.h index 66cc2eeb419..6154f7375a7 100644 --- a/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.h @@ -212,9 +212,9 @@ class ITK_TEMPLATE_EXPORT ObjectByObjectLabelMapFilter : public LabelMapFilter; typename BI2LMType::Pointer m_BI2LM{}; - typename InputFilterType::Pointer m_InputFilter{}; + typename InputFilterType::Pointer m_InputFilter{}; typename OutputFilterType::Pointer m_OutputFilter{}; diff --git a/Modules/Filtering/LabelMap/include/itkPadLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkPadLabelMapFilter.hxx index f52da600d22..e068482aa39 100644 --- a/Modules/Filtering/LabelMap/include/itkPadLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkPadLabelMapFilter.hxx @@ -42,10 +42,10 @@ PadLabelMapFilter::GenerateOutputInformation() } // Compute the new region size. - SizeType size; + SizeType size; IndexType index; - const SizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const SizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); const IndexType inputIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); const SizeType originalPadSize = m_UpperBoundaryPadSize + m_LowerBoundaryPadSize; diff --git a/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.h index cba15d1d589..2ec0a6f54b8 100644 --- a/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.h @@ -148,9 +148,9 @@ class ITK_TEMPLATE_EXPORT ShapeLabelMapFilter : public InPlaceLabelMapFilter::ThreadedProcessLabelObject(LabelObject } // Init the vars - SizeValueType nbOfPixels = 0; + SizeValueType nbOfPixels = 0; ContinuousIndex centroid{}; - auto mins = IndexType::Filled(NumericTraits::max()); - auto maxs = IndexType::Filled(NumericTraits::NonpositiveMin()); - SizeValueType nbOfPixelsOnBorder = 0; - double perimeterOnBorder = 0; - MatrixType centralMoments{}; + auto mins = IndexType::Filled(NumericTraits::max()); + auto maxs = IndexType::Filled(NumericTraits::NonpositiveMin()); + SizeValueType nbOfPixelsOnBorder = 0; + double perimeterOnBorder = 0; + MatrixType centralMoments{}; using LengthType = typename LabelObjectType::LengthType; @@ -109,7 +109,7 @@ ShapeLabelMapFilter::ThreadedProcessLabelObject(LabelObject while (!lit.IsAtEnd()) { const IndexType & idx = lit.GetLine().GetIndex(); - const LengthType length = lit.GetLine().GetLength(); + const LengthType length = lit.GetLine().GetLength(); // Update the nbOfPixels nbOfPixels += length; @@ -259,7 +259,7 @@ ShapeLabelMapFilter::ThreadedProcessLabelObject(LabelObject output->TransformIndexToPhysicalPoint(idx, physicalPosition); const typename ImageType::DirectionType & direction = output->GetDirection(); - auto scale = MakeFilled(output->GetSpacing()[0]); + auto scale = MakeFilled(output->GetSpacing()[0]); for (unsigned int i = 0; i < ImageDimension; ++i) { scale[i] *= direction(i, 0); @@ -301,7 +301,7 @@ ShapeLabelMapFilter::ThreadedProcessLabelObject(LabelObject } } const typename LabelObjectType::RegionType boundingBox(mins, boundingBoxSize); - typename LabelObjectType::CentroidType physicalCentroid; + typename LabelObjectType::CentroidType physicalCentroid; output->TransformContinuousIndexToPhysicalPoint(centroid, physicalCentroid); // Center the second order moments @@ -314,9 +314,9 @@ ShapeLabelMapFilter::ThreadedProcessLabelObject(LabelObject } // Compute principal moments and axes - VectorType principalMoments; + VectorType principalMoments; const vnl_symmetric_eigensystem eigen{ centralMoments.GetVnlMatrix().as_matrix() }; - vnl_diag_matrix pm = eigen.D; + vnl_diag_matrix pm = eigen.D; for (unsigned int i = 0; i < ImageDimension; ++i) { principalMoments[i] = pm(i); @@ -325,9 +325,9 @@ ShapeLabelMapFilter::ThreadedProcessLabelObject(LabelObject // Add a final reflection if needed for a proper rotation, // by multiplying the last row by the determinant - const vnl_real_eigensystem eigenrot{ principalAxes.GetVnlMatrix().as_matrix() }; + const vnl_real_eigensystem eigenrot{ principalAxes.GetVnlMatrix().as_matrix() }; vnl_diag_matrix> eigenval{ eigenrot.D }; - std::complex det(1.0, 0.0); + std::complex det(1.0, 0.0); for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -374,7 +374,7 @@ ShapeLabelMapFilter::ThreadedProcessLabelObject(LabelObject // Compute equivalent ellipsoid radius VectorType ellipsoidDiameter; - double edet = 1.0; + double edet = 1.0; for (unsigned int i = 0; i < ImageDimension; ++i) { edet *= principalMoments[i]; @@ -430,8 +430,8 @@ ShapeLabelMapFilter::ComputeFeretDiameter(LabelObjectType * IndexListType idxList; using NeighborIteratorType = typename itk::ConstNeighborhoodIterator; - auto neighborHoodRadius = SizeType::Filled(1); - NeighborIteratorType it(neighborHoodRadius, m_LabelImage, m_LabelImage->GetBufferedRegion()); + auto neighborHoodRadius = SizeType::Filled(1); + NeighborIteratorType it(neighborHoodRadius, m_LabelImage, m_LabelImage->GetBufferedRegion()); ConstantBoundaryCondition lcbc; // Use label + 1 to have a label different of the current label on the border lcbc.SetConstant(label + 1); @@ -497,10 +497,10 @@ ShapeLabelMapFilter::ComputePerimeter(LabelObjectType * lab // store the lines in a N-1D image of vectors using VectorLineType = std::deque; using LineImageType = itk::Image; - auto lineImage = LineImageType::New(); + auto lineImage = LineImageType::New(); typename LineImageType::IndexType lIdx; - typename LineImageType::SizeType lSize; - const RegionType boundingBox = labelObject->GetBoundingBox(); + typename LineImageType::SizeType lSize; + const RegionType boundingBox = labelObject->GetBoundingBox(); for (unsigned int i = 0; i < ImageDimension - 1; ++i) { lIdx[i] = boundingBox.GetIndex()[i + 1]; @@ -596,8 +596,8 @@ ShapeLabelMapFilter::ComputePerimeter(LabelObjectType * lab auto ni = ns.begin(); constexpr IndexValueType lZero = 0; - IndexValueType lMin = 0; - IndexValueType lMax = 0; + IndexValueType lMin = 0; + IndexValueType lMax = 0; IndexValueType nMin = NumericTraits::NonpositiveMin() + 1; IndexValueType nMax = ni->GetIndex()[0] - 1; @@ -657,13 +657,13 @@ ShapeLabelMapFilter::ComputePerimeter(LabelObjectType * lab template template double -ShapeLabelMapFilter::PerimeterFromInterceptCount(TMapIntercept & intercepts, +ShapeLabelMapFilter::PerimeterFromInterceptCount(TMapIntercept & intercepts, const TSpacing & spacing) { // std::cout << "PerimeterFromInterceptCount<>" << std::endl; double perimeter = 0.0; double pixelSize = 1.0; - int dim = TSpacing::GetVectorDimension(); + int dim = TSpacing::GetVectorDimension(); for (int i = 0; i < dim; ++i) { pixelSize *= spacing[i]; @@ -686,7 +686,7 @@ ShapeLabelMapFilter::PerimeterFromInterceptCount(TMapInterc template double ShapeLabelMapFilter::PerimeterFromInterceptCount(MapIntercept2Type & intercepts, - const Spacing2Type spacing) + const Spacing2Type spacing) { // std::cout << "PerimeterFromInterceptCount2" << std::endl; const double dx = spacing[0]; @@ -711,7 +711,7 @@ ShapeLabelMapFilter::PerimeterFromInterceptCount(MapInterce template double ShapeLabelMapFilter::PerimeterFromInterceptCount(MapIntercept3Type & intercepts, - const Spacing3Type spacing) + const Spacing3Type spacing) { // std::cout << "PerimeterFromInterceptCount3" << std::endl; const double dx = spacing[0]; @@ -778,7 +778,7 @@ ShapeLabelMapFilter::ComputeOrientedBoundingBox(LabelObject VNLMatrixType principalAxesBasisMatrix{ labelObject->GetPrincipalAxes().GetVnlMatrix().as_matrix() }; const typename LabelObjectType::CentroidType centroid = labelObject->GetCentroid(); - const unsigned int numLines = labelObject->GetNumberOfLines(); + const unsigned int numLines = labelObject->GetNumberOfLines(); // Create a matrix where the columns are the physical points of the // start and end of each RLE line from the label map, relative to @@ -789,7 +789,7 @@ ShapeLabelMapFilter::ComputeOrientedBoundingBox(LabelObject const typename LabelObjectType::LineType line = labelObject->GetLine(l); // add start index of line as physical point relative to centroid - IndexType idx = line.GetIndex(); + IndexType idx = line.GetIndex(); typename ImageType::PointType pt; output->TransformIndexToPhysicalPoint(idx, pt); for (unsigned int j = 0; j < ImageDimension; ++j) @@ -852,7 +852,7 @@ ShapeLabelMapFilter::ComputeOrientedBoundingBox(LabelObject } } - const auto physicalOffset = output->TransformLocalVectorToPhysicalVector(spacingAxis); + const auto physicalOffset = output->TransformLocalVectorToPhysicalVector(spacingAxis); VNLVectorType paOffset = principalAxesBasisMatrix * physicalOffset.GetVnlVector(); for (unsigned int i = 0; i < ImageDimension; ++i) @@ -882,7 +882,7 @@ ShapeLabelMapFilter::ComputeOrientedBoundingBox(LabelObject principalAxesBasisMatrix.inplace_transpose(); typename LabelObjectType::OrientedBoundingBoxPointType origin; - VNLVectorType min = principalAxesBasisMatrix * minimumPrincipalAxis; + VNLVectorType min = principalAxesBasisMatrix * minimumPrincipalAxis; for (unsigned int i = 0; i < ImageDimension; ++i) { diff --git a/Modules/Filtering/LabelMap/include/itkShapeLabelObject.h b/Modules/Filtering/LabelMap/include/itkShapeLabelObject.h index 28fbc050d93..62cad065b9f 100644 --- a/Modules/Filtering/LabelMap/include/itkShapeLabelObject.h +++ b/Modules/Filtering/LabelMap/include/itkShapeLabelObject.h @@ -604,7 +604,7 @@ class ITK_TEMPLATE_EXPORT ShapeLabelObject : public LabelObject offset; for (unsigned int j = 0; j < ImageDimension; ++j) { @@ -773,25 +773,25 @@ class ITK_TEMPLATE_EXPORT ShapeLabelObject : public LabelObject m_Lambda)) diff --git a/Modules/Filtering/LabelMap/include/itkShapeRelabelImageFilter.h b/Modules/Filtering/LabelMap/include/itkShapeRelabelImageFilter.h index 5dc7f4e060b..0a35fb35056 100644 --- a/Modules/Filtering/LabelMap/include/itkShapeRelabelImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkShapeRelabelImageFilter.h @@ -144,8 +144,8 @@ class ITK_TEMPLATE_EXPORT ShapeRelabelImageFilter : public ImageToImageFilterClearLabels(); PixelType label{}; - auto it2 = labelObjects.begin(); + auto it2 = labelObjects.begin(); while (it2 != labelObjects.end()) { // Avoid the background label if it is used diff --git a/Modules/Filtering/LabelMap/include/itkShapeUniqueLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkShapeUniqueLabelMapFilter.h index 70bbebf3e0a..6ad5588070b 100644 --- a/Modules/Filtering/LabelMap/include/itkShapeUniqueLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkShapeUniqueLabelMapFilter.h @@ -158,13 +158,13 @@ class ITK_TEMPLATE_EXPORT ShapeUniqueLabelMapFilter : public InPlaceLabelMapFilt lines.push_back(priorityQueue.top()); LineOfLabelObject prev = lines.back(); - IndexType prevIdx = prev.line.GetIndex(); + IndexType prevIdx = prev.line.GetIndex(); priorityQueue.pop(); while (!priorityQueue.empty()) { LineOfLabelObject l = priorityQueue.top(); - IndexType idx = l.line.GetIndex(); + IndexType idx = l.line.GetIndex(); priorityQueue.pop(); bool newMainLine = false; @@ -186,7 +186,7 @@ class ITK_TEMPLATE_EXPORT ShapeUniqueLabelMapFilter : public InPlaceLabelMapFilt } else { - OffsetValueType prevLength = prev.line.GetLength(); + OffsetValueType prevLength = prev.line.GetLength(); const OffsetValueType length = l.line.GetLength(); if (prevIdx[0] + prevLength > idx[0]) @@ -197,7 +197,7 @@ class ITK_TEMPLATE_EXPORT ShapeUniqueLabelMapFilter : public InPlaceLabelMapFilt // which line to keep. This is necessary to avoid the case where a // part of a label is over // a second label, and below in another part of the image. - bool keepCurrent; + bool keepCurrent; const typename TAttributeAccessor::AttributeValueType prevAttr = accessor(prev.labelObject); const typename TAttributeAccessor::AttributeValueType attr = accessor(l.labelObject); // this may be changed to a single boolean expression, but may become @@ -306,7 +306,7 @@ class ITK_TEMPLATE_EXPORT ShapeUniqueLabelMapFilter : public InPlaceLabelMapFilt while (!it.IsAtEnd()) { const typename LabelObjectType::LabelType label = it.GetLabel(); - LabelObjectType * labelObject = it.GetLabelObject(); + LabelObjectType * labelObject = it.GetLabelObject(); if (labelObject->Empty()) { @@ -338,7 +338,7 @@ class ITK_TEMPLATE_EXPORT ShapeUniqueLabelMapFilter : public InPlaceLabelMapFilt this->labelObject = _lo; } - LineType line; + LineType line; LabelObjectType * labelObject; }; diff --git a/Modules/Filtering/LabelMap/include/itkShiftScaleLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkShiftScaleLabelMapFilter.hxx index e9fed26246d..4c6445ae544 100644 --- a/Modules/Filtering/LabelMap/include/itkShiftScaleLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkShiftScaleLabelMapFilter.hxx @@ -57,7 +57,7 @@ ShiftScaleLabelMapFilter::GenerateData() while (it != labelObjects.end()) { LabelObjectType * lo = *it; - auto label = static_cast(m_Scale * lo->GetLabel() + m_Shift); + auto label = static_cast(m_Scale * lo->GetLabel() + m_Shift); lo->SetLabel(label); output->AddLabelObject(lo); diff --git a/Modules/Filtering/LabelMap/include/itkStatisticsLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkStatisticsLabelMapFilter.h index 4476f394329..2450eeb71ff 100644 --- a/Modules/Filtering/LabelMap/include/itkStatisticsLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkStatisticsLabelMapFilter.h @@ -158,8 +158,8 @@ class ITK_TEMPLATE_EXPORT StatisticsLabelMapFilter private: FeatureImagePixelType m_Minimum{}; FeatureImagePixelType m_Maximum{}; - unsigned int m_NumberOfBins{ GetDefaultNumberOfBins() }; - bool m_ComputeHistogram{ true }; + unsigned int m_NumberOfBins{ GetDefaultNumberOfBins() }; + bool m_ComputeHistogram{ true }; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/LabelMap/include/itkStatisticsLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkStatisticsLabelMapFilter.hxx index e87aca32665..c7ab01c0079 100644 --- a/Modules/Filtering/LabelMap/include/itkStatisticsLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkStatisticsLabelMapFilter.hxx @@ -56,14 +56,14 @@ StatisticsLabelMapFilter::ThreadedProcessLabelObject(Labe { Superclass::ThreadedProcessLabelObject(labelObject); - ImageType * output = this->GetOutput(); + ImageType * output = this->GetOutput(); const FeatureImageType * featureImage = this->GetFeatureImage(); using HistogramType = typename LabelObjectType::HistogramType; - typename HistogramType::IndexType histogramIndex(1); + typename HistogramType::IndexType histogramIndex(1); typename HistogramType::MeasurementVectorType mv(1); - typename HistogramType::SizeType histogramSize(1); + typename HistogramType::SizeType histogramSize(1); histogramSize.Fill(m_NumberOfBins); typename HistogramType::MeasurementVectorType featureImageMin(1); @@ -92,23 +92,23 @@ StatisticsLabelMapFilter::ThreadedProcessLabelObject(Labe FeatureImagePixelType min = NumericTraits::max(); FeatureImagePixelType max = NumericTraits::NonpositiveMin(); - double sum = 0; - double sum2 = 0; - double sum3 = 0; - double sum4 = 0; - IndexType minIdx{}; - IndexType maxIdx{}; - PointType centerOfGravity{}; - MatrixType centralMoments{}; - MatrixType principalAxes{}; - VectorType principalMoments{}; + double sum = 0; + double sum2 = 0; + double sum3 = 0; + double sum4 = 0; + IndexType minIdx{}; + IndexType maxIdx{}; + PointType centerOfGravity{}; + MatrixType centralMoments{}; + MatrixType principalAxes{}; + VectorType principalMoments{}; // iterate over all the indexes typename LabelObjectType::ConstIndexIterator it(labelObject); while (!it.IsAtEnd()) { - const IndexType & idx = it.GetIndex(); + const IndexType & idx = it.GetIndex(); const FeatureImagePixelType & v = featureImage->GetPixel(idx); mv[0] = v; histogram->GetIndex(mv, histogramIndex); @@ -151,13 +151,13 @@ StatisticsLabelMapFilter::ThreadedProcessLabelObject(Labe // final computations const typename HistogramType::AbsoluteFrequencyType & totalFreq = histogram->GetTotalFrequency(); - const double mean = sum / totalFreq; + const double mean = sum / totalFreq; // Note that totalFreq could be 1. Stats on a population of size 1 are not useful. // We protect against dividing by 0 in that case. const double variance = (totalFreq > 1) ? (sum2 - (std::pow(sum, 2) / totalFreq)) / (totalFreq - 1) : 0; const double sigma = std::sqrt(variance); const double mean2 = mean * mean; - double skewness; + double skewness; if (itk::Math::abs(variance * sigma) > itk::NumericTraits::min()) { skewness = ((sum3 - 3.0 * mean * sum2) / totalFreq + 2.0 * mean * mean2) / (variance * sigma); @@ -236,7 +236,7 @@ StatisticsLabelMapFilter::ThreadedProcessLabelObject(Labe // Compute principal moments and axes const vnl_symmetric_eigensystem eigen{ centralMoments.GetVnlMatrix().as_matrix() }; - vnl_diag_matrix pm{ eigen.D }; + vnl_diag_matrix pm{ eigen.D }; for (unsigned int i = 0; i < ImageDimension; ++i) { // principalMoments[i] = 4 * std::sqrt( pm(i,i) ); @@ -246,9 +246,9 @@ StatisticsLabelMapFilter::ThreadedProcessLabelObject(Labe // Add a final reflection if needed for a proper rotation, // by multiplying the last row by the determinant - const vnl_real_eigensystem eigenrot{ principalAxes.GetVnlMatrix().as_matrix() }; + const vnl_real_eigensystem eigenrot{ principalAxes.GetVnlMatrix().as_matrix() }; vnl_diag_matrix> eigenval{ eigenrot.D }; - std::complex det(1.0, 0.0); + std::complex det(1.0, 0.0); for (unsigned int i = 0; i < ImageDimension; ++i) { diff --git a/Modules/Filtering/LabelMap/include/itkStatisticsLabelObject.h b/Modules/Filtering/LabelMap/include/itkStatisticsLabelObject.h index cb1a69e3353..318c25cb5ad 100644 --- a/Modules/Filtering/LabelMap/include/itkStatisticsLabelObject.h +++ b/Modules/Filtering/LabelMap/include/itkStatisticsLabelObject.h @@ -585,22 +585,22 @@ class ITK_TEMPLATE_EXPORT StatisticsLabelObject : public ShapeLabelObject; - auto l2i = L2IType::New(); + auto l2i = L2IType::New(); const itk::SimpleFilterWatcher watcher2(l2i); l2i->SetInput(i2l->GetOutput()); diff --git a/Modules/Filtering/LabelMap/test/itkBinaryImageToStatisticsLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkBinaryImageToStatisticsLabelMapFilterTest1.cxx index 2e8e6bfe01a..5b28765985e 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryImageToStatisticsLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryImageToStatisticsLabelMapFilterTest1.cxx @@ -53,7 +53,7 @@ itkBinaryImageToStatisticsLabelMapFilterTest1(int argc, char * argv[]) // converting binary image to Statistics label map // don't set the output type to test the default value of the template parameter using I2LType = itk::BinaryImageToStatisticsLabelMapFilter; - auto i2l = I2LType::New(); + auto i2l = I2LType::New(); const itk::SimpleFilterWatcher watcher1(i2l); i2l->SetInput(reader->GetOutput()); @@ -128,7 +128,7 @@ itkBinaryImageToStatisticsLabelMapFilterTest1(int argc, char * argv[]) ITK_TEST_SET_GET_VALUE(numberOfBins, i2l->GetNumberOfBins()); using L2IType = itk::LabelMapToLabelImageFilter; - auto l2i = L2IType::New(); + auto l2i = L2IType::New(); const itk::SimpleFilterWatcher watcher2(l2i); l2i->SetInput(i2l->GetOutput()); diff --git a/Modules/Filtering/LabelMap/test/itkBinaryReconstructionLabelMapFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkBinaryReconstructionLabelMapFilterTest.cxx index 97ff2b55db3..8afcdc948a1 100644 --- a/Modules/Filtering/LabelMap/test/itkBinaryReconstructionLabelMapFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkBinaryReconstructionLabelMapFilterTest.cxx @@ -89,7 +89,7 @@ itkBinaryReconstructionLabelMapFilterTest(int argc, char * argv[]) std::set attributeSet; attributeSet.insert(attribute); opening->SetAttributeSet(attributeSet); - auto obtainedAttributeSet = opening->GetAttributeSet(); + auto obtainedAttributeSet = opening->GetAttributeSet(); std::vector diff; std::set_difference(attributeSet.begin(), attributeSet.end(), diff --git a/Modules/Filtering/LabelMap/test/itkChangeLabelLabelMapFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkChangeLabelLabelMapFilterTest.cxx index 2cc0cbf76ba..a9636da5ebe 100644 --- a/Modules/Filtering/LabelMap/test/itkChangeLabelLabelMapFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkChangeLabelLabelMapFilterTest.cxx @@ -63,7 +63,7 @@ itkChangeLabelLabelMapFilterTest(int argc, char * argv[]) changeFilter->SetInput(i2l->GetOutput()); constexpr unsigned int numberOfArgumentsBeforeLabels = 3; - const unsigned int numberOfArguments = argc; + const unsigned int numberOfArguments = argc; using LabelPrintType = itk::NumericTraits::PrintType; diff --git a/Modules/Filtering/LabelMap/test/itkConvertLabelMapFilterTest2.cxx b/Modules/Filtering/LabelMap/test/itkConvertLabelMapFilterTest2.cxx index e4d4a231b9a..26df84c07a0 100644 --- a/Modules/Filtering/LabelMap/test/itkConvertLabelMapFilterTest2.cxx +++ b/Modules/Filtering/LabelMap/test/itkConvertLabelMapFilterTest2.cxx @@ -74,7 +74,7 @@ itkConvertLabelMapFilterTest2(int argc, char * argv[]) for (InputShapeLabelMapType::ConstIterator it(l2s->GetOutput()); !it.IsAtEnd(); ++it) { const InputShapeLabelMapType::LabelObjectType * labelObject = it.GetLabelObject(); - const InputShapeLabelMapType::LabelType label = labelObject->GetLabel(); + const InputShapeLabelMapType::LabelType label = labelObject->GetLabel(); if (!castShape->GetOutput()->HasLabel(label)) // verify label first { @@ -158,7 +158,7 @@ itkConvertLabelMapFilterTest2(int argc, char * argv[]) for (InputStatisticsLabelMapType::ConstIterator it(l2stat->GetOutput()); !it.IsAtEnd(); ++it) { const InputStatisticsLabelMapType::LabelObjectType * labelObject = it.GetLabelObject(); - const InputStatisticsLabelMapType::LabelType label = labelObject->GetLabel(); + const InputStatisticsLabelMapType::LabelType label = labelObject->GetLabel(); if (!castStatistics->GetOutput()->HasLabel(label)) // verify label first { diff --git a/Modules/Filtering/LabelMap/test/itkLabelImageToStatisticsLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkLabelImageToStatisticsLabelMapFilterTest1.cxx index b128e077900..1cc11c83429 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelImageToStatisticsLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelImageToStatisticsLabelMapFilterTest1.cxx @@ -53,7 +53,7 @@ itkLabelImageToStatisticsLabelMapFilterTest1(int argc, char * argv[]) // converting Label image to Statistics label map // don't set the output type to test the default value of the template parameter using I2LType = itk::LabelImageToStatisticsLabelMapFilter; - auto i2l = I2LType::New(); + auto i2l = I2LType::New(); const itk::SimpleFilterWatcher watcher1(i2l); i2l->SetInput(reader->GetOutput()); @@ -111,7 +111,7 @@ itkLabelImageToStatisticsLabelMapFilterTest1(int argc, char * argv[]) ITK_TEST_SET_GET_VALUE(numberOfBins, i2l->GetNumberOfBins()); using L2IType = itk::LabelMapToLabelImageFilter; - auto l2i = L2IType::New(); + auto l2i = L2IType::New(); const itk::SimpleFilterWatcher watcher2(l2i); l2i->SetInput(i2l->GetOutput()); diff --git a/Modules/Filtering/LabelMap/test/itkLabelObjectTest.cxx b/Modules/Filtering/LabelMap/test/itkLabelObjectTest.cxx index 3c534705f54..d15c335e1e6 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelObjectTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelObjectTest.cxx @@ -113,7 +113,7 @@ itkLabelObjectTest(int argc, char * argv[]) using IteratorType = LabelObjectType::ConstLineIterator; - auto it1 = IteratorType(ref); + auto it1 = IteratorType(ref); IteratorType it2(lo); lo->Print(std::cerr); diff --git a/Modules/Filtering/LabelMap/test/itkShapeLabelMapFilterGTest.cxx b/Modules/Filtering/LabelMap/test/itkShapeLabelMapFilterGTest.cxx index 8b5f75f6514..daa5e5a0fd3 100644 --- a/Modules/Filtering/LabelMap/test/itkShapeLabelMapFilterGTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkShapeLabelMapFilterGTest.cxx @@ -84,8 +84,8 @@ class ShapeLabelMapFixture : public ::testing::Test static bool TestListHasPoint(const typename LabelObjectType::OrientedBoundingBoxVerticesType & obbList, - const typename LabelObjectType::OrientedBoundingBoxPointType & pt, - double tolerance = 1e-8) + const typename LabelObjectType::OrientedBoundingBoxPointType & pt, + double tolerance = 1e-8) { for (auto & v : obbList) { diff --git a/Modules/Filtering/LabelMap/test/itkShapeLabelObjectAccessorsTest1.cxx b/Modules/Filtering/LabelMap/test/itkShapeLabelObjectAccessorsTest1.cxx index f08a6a97f0e..5a193e1eba5 100644 --- a/Modules/Filtering/LabelMap/test/itkShapeLabelObjectAccessorsTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkShapeLabelObjectAccessorsTest1.cxx @@ -252,7 +252,7 @@ itkShapeLabelObjectAccessorsTest1(int argc, char * argv[]) for (unsigned int n = 0; n < labelMap->GetNumberOfLabelObjects(); ++n) { constexpr itk::Functor::LabelLabelObjectAccessor accessorLabel; - ShapeLabelObjectType * l = labelMap->GetNthLabelObject(n); + ShapeLabelObjectType * l = labelMap->GetNthLabelObject(n); if (l->GetLabel() != accessorLabel(l)) { std::cout << "l->GetLabel2() != accessorLabel(l)" << std::endl; @@ -377,7 +377,7 @@ itkShapeLabelObjectAccessorsTest1(int argc, char * argv[]) // Check transforms for (unsigned int n = 0; n < labelMap->GetNumberOfLabelObjects(); ++n) { - ShapeLabelObjectType * l = labelMap->GetNthLabelObject(n); + ShapeLabelObjectType * l = labelMap->GetNthLabelObject(n); const ShapeLabelObjectType::AffineTransformPointer principleToPhysical = l->GetPrincipalAxesToPhysicalAxesTransform(); std::cout << "Print principleToPhysical " << n << std::endl; diff --git a/Modules/Filtering/LabelMap/test/itkShiftScaleLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkShiftScaleLabelMapFilterTest1.cxx index 6cd5bc811af..5dd8eff0cb2 100644 --- a/Modules/Filtering/LabelMap/test/itkShiftScaleLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkShiftScaleLabelMapFilterTest1.cxx @@ -74,9 +74,9 @@ itkShiftScaleLabelMapFilterTest1(int argc, char * argv[]) ITK_TEST_SET_GET_VALUE(std::stod(argv[4]), change->GetScale()); - const std::string shouldChangBackgroundBoolean{ argv[5] }; + const std::string shouldChangBackgroundBoolean{ argv[5] }; static const std::string trueString{ "true" }; - const bool changeBackground = (shouldChangBackgroundBoolean == trueString) ? true : false; + const bool changeBackground = (shouldChangBackgroundBoolean == trueString) ? true : false; change->SetChangeBackgroundValue(changeBackground); ITK_TEST_SET_GET_VALUE(changeBackground, change->GetChangeBackgroundValue()); diff --git a/Modules/Filtering/LabelMap/test/itkStatisticsLabelMapFilterGTest.cxx b/Modules/Filtering/LabelMap/test/itkStatisticsLabelMapFilterGTest.cxx index 7e69f12c4a9..bc698fd766b 100644 --- a/Modules/Filtering/LabelMap/test/itkStatisticsLabelMapFilterGTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkStatisticsLabelMapFilterGTest.cxx @@ -107,9 +107,9 @@ class StatisticsLabelMapFixture : public ::testing::Test static typename LabelObjectType::ConstPointer ComputeLabelObject(const LabelImageType * labelImage, - const ImageType * image, - const PixelType label = 1, - const size_t numberOfBins = 0) + const ImageType * image, + const PixelType label = 1, + const size_t numberOfBins = 0) { auto l2s = itk::LabelImageToStatisticsLabelMapFilter::New(); @@ -130,7 +130,7 @@ class StatisticsLabelMapFixture : public ::testing::Test static double ComputeExactMedian(const LabelObjectType * labelObject, const ImageType * image) { - std::vector values; + std::vector values; typename LabelObjectType::ConstIndexIterator it(labelObject); while (!it.IsAtEnd()) @@ -190,7 +190,7 @@ TEST_F(StatisticsLabelMapFixture, 2D_ones_with_outliers) using Utils = FixtureUtilities<2, short>; using namespace itk::GTest::TypedefsAndConstructors::Dimension2; - auto image = Utils::CreateImage(); + auto image = Utils::CreateImage(); constexpr Utils::PixelType value = 1; image->FillBuffer(value); @@ -199,7 +199,7 @@ TEST_F(StatisticsLabelMapFixture, 2D_ones_with_outliers) image->SetPixel(itk::MakeIndex(0, 1), -32000); - auto labelImage = Utils ::CreateLabelImage(); + auto labelImage = Utils ::CreateLabelImage(); constexpr Utils::LabelPixelType label = 1; labelImage->FillBuffer(label); labelImage->SetPixel(itk::MakeIndex(0, 0), 0); diff --git a/Modules/Filtering/LabelMap/test/itkStatisticsUniqueLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkStatisticsUniqueLabelMapFilterTest1.cxx index 12d97f48a81..8a93aae5e60 100644 --- a/Modules/Filtering/LabelMap/test/itkStatisticsUniqueLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkStatisticsUniqueLabelMapFilterTest1.cxx @@ -74,10 +74,10 @@ itkStatisticsUniqueLabelMapFilterTest1(int argc, char * argv[]) std::cerr << std::endl; return EXIT_FAILURE; } - const char * inputImage = argv[1]; - const char * featureImage = argv[2]; - const char * outputImage = argv[3]; - const bool reverseOrdering = std::stoi(argv[4]); + const char * inputImage = argv[1]; + const char * featureImage = argv[2]; + const char * outputImage = argv[3]; + const bool reverseOrdering = std::stoi(argv[4]); const unsigned int attribute = std::stoi(argv[5]); constexpr unsigned int Dimension = 2; diff --git a/Modules/Filtering/LabelMap/test/itkUniqueLabelMapFiltersGTest.cxx b/Modules/Filtering/LabelMap/test/itkUniqueLabelMapFiltersGTest.cxx index 798f713f0e1..993f05b8ebc 100644 --- a/Modules/Filtering/LabelMap/test/itkUniqueLabelMapFiltersGTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkUniqueLabelMapFiltersGTest.cxx @@ -78,7 +78,7 @@ class UniqueLabelMapFixture : public ::testing::Test CreateLabelImage(const std::vector & indices) { constexpr size_t size = 25; - auto image = LabelImageType::New(); + auto image = LabelImageType::New(); auto imageSize = LabelImageType::SizeType::Filled(size); image->SetRegions(typename LabelImageType::RegionType(imageSize)); @@ -186,7 +186,7 @@ class UniqueLabelMapFixture : public ::testing::Test TEST_F(UniqueLabelMapFixture, EmptyImage) { const std::vector::IndexType> indices = {}; - auto image = FixtureUtilities<2>::CreateLabelImage(indices); + auto image = FixtureUtilities<2>::CreateLabelImage(indices); auto labelMap = FixtureUtilities<2>::LabelMapFromLabelImage(image.GetPointer(), 15); auto filter = itk::LabelUniqueLabelMapFilter::New(); @@ -205,7 +205,7 @@ TEST_F(UniqueLabelMapFixture, EmptyImage) TEST_F(UniqueLabelMapFixture, OneLabel) { const std::vector::IndexType> indices = { { 10, 10 } }; - auto image = FixtureUtilities<2>::CreateLabelImage(indices); + auto image = FixtureUtilities<2>::CreateLabelImage(indices); auto labelMap = FixtureUtilities<2>::LabelMapFromLabelImage(image.GetPointer(), 0); auto filter = itk::LabelUniqueLabelMapFilter::New(); @@ -225,7 +225,7 @@ TEST_F(UniqueLabelMapFixture, OnesLabel) { const std::vector::IndexType> indices = { { 0, 0 }, { 1, 0 }, { 2, 0 }, { 3, 0 }, { 0, 4 }, { 2, 4 }, { 0, 5 } }; - auto image = FixtureUtilities<2>::CreateLabelImage(indices); + auto image = FixtureUtilities<2>::CreateLabelImage(indices); auto labelMap = FixtureUtilities<2>::LabelMapFromLabelImage(image.GetPointer(), 0); auto filter = itk::LabelUniqueLabelMapFilter::New(); @@ -245,7 +245,7 @@ TEST_F(UniqueLabelMapFixture, Dilate1) { const std::vector::IndexType> indices = { { 0, 0 }, { 1, 0 }, { 2, 0 }, { 3, 0 }, { 0, 4 }, { 2, 4 }, { 0, 10 } }; - auto image = FixtureUtilities<2>::CreateLabelImage(indices); + auto image = FixtureUtilities<2>::CreateLabelImage(indices); auto labelMap = FixtureUtilities<2>::LabelMapFromLabelImage(image.GetPointer(), 1); auto filter = itk::LabelUniqueLabelMapFilter::New(); @@ -277,7 +277,7 @@ TEST_F(UniqueLabelMapFixture, Dilate2) { const std::vector::IndexType> indices = { { 0, 0 }, { 1, 0 }, { 2, 0 }, { 3, 0 }, { 0, 4 }, { 2, 4 }, { 0, 5 } }; - auto image = FixtureUtilities<2>::CreateLabelImage(indices); + auto image = FixtureUtilities<2>::CreateLabelImage(indices); auto labelMap = FixtureUtilities<2>::LabelMapFromLabelImage(image.GetPointer(), 2); auto filter = itk::LabelUniqueLabelMapFilter::New(); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateImageFilter.hxx index 98b69a9f106..f489b4e4a01 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateImageFilter.hxx @@ -79,11 +79,11 @@ AnchorErodeDilateImageFilter::DynamicThreadedGenera // iterate over all the structuring elements typename KernelType::DecompType decomposition = this->GetKernel().GetLines(); - BresType BresLine; + BresType BresLine; for (unsigned int i = 0; i < decomposition.size(); ++i) { - const typename KernelType::LType ThisLine = decomposition[i]; + const typename KernelType::LType ThisLine = decomposition[i]; const typename BresType::OffsetArray TheseOffsets = BresLine.BuildLine(ThisLine, bufflength); using KernelLType = typename KernelType::LType; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateLine.h b/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateLine.h index ff385bd19e4..747f6c5dc84 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateLine.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateLine.h @@ -63,22 +63,22 @@ class ITK_TEMPLATE_EXPORT AnchorErodeDilateLine bool StartLine(std::vector & buffer, std::vector & inbuffer, - InputImagePixelType & Extreme, - int & outLeftP, - int & outRightP, - int & inLeftP, - int & inRightP, - int middle); + InputImagePixelType & Extreme, + int & outLeftP, + int & outRightP, + int & inLeftP, + int & inRightP, + int middle); void FinishLine(std::vector & buffer, std::vector & inbuffer, - InputImagePixelType & Extreme, - int & outLeftP, - int & outRightP, - int & inLeftP, - int & inRightP, - int middle); + InputImagePixelType & Extreme, + int & outLeftP, + int & outRightP, + int & inLeftP, + int & inRightP, + int middle); bool UseVectorBasedHistogram() diff --git a/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateLine.hxx b/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateLine.hxx index ea25e0cea03..07c3accce81 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateLine.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateLine.hxx @@ -31,7 +31,7 @@ template void AnchorErodeDilateLine::DoLine(std::vector & buffer, std::vector & inbuffer, - unsigned int bufflength) + unsigned int bufflength) { // TCompare will be < for erosions // TFunction2 will be <= @@ -64,10 +64,10 @@ AnchorErodeDilateLine::DoLine(std::vector & buff const int middle = static_cast(m_Size) / 2; - int outLeftP = 0; - int outRightP = static_cast(bufflength) - 1; - int inLeftP = 0; - int inRightP = static_cast(bufflength) - 1; + int outLeftP = 0; + int outRightP = static_cast(bufflength) - 1; + int inLeftP = 0; + int inRightP = static_cast(bufflength) - 1; HistogramType histo; if (bufflength <= m_Size) { @@ -163,12 +163,12 @@ template bool AnchorErodeDilateLine::StartLine(std::vector & buffer, std::vector & inbuffer, - InputImagePixelType & Extreme, - int & outLeftP, - int & itkNotUsed(outRightP), - int & inLeftP, - int & inRightP, - int itkNotUsed(middle)) + InputImagePixelType & Extreme, + int & outLeftP, + int & itkNotUsed(outRightP), + int & inLeftP, + int & inRightP, + int itkNotUsed(middle)) { // This returns true to indicate return to startLine label in pseudo // code, and false to indicate finishLine @@ -266,12 +266,12 @@ template void AnchorErodeDilateLine::FinishLine(std::vector & buffer, std::vector & inbuffer, - InputImagePixelType & Extreme, - int & outLeftP, - int & outRightP, - int & itkNotUsed(inLeftP), - int & inRightP, - int middle) + InputImagePixelType & Extreme, + int & outLeftP, + int & outRightP, + int & itkNotUsed(inLeftP), + int & inRightP, + int middle) { // Handles the right border. // First half of the structuring element diff --git a/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseImageFilter.h index 53175a5fe5a..ac9a4a5fb61 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseImageFilter.h @@ -112,15 +112,15 @@ class ITK_TEMPLATE_EXPORT AnchorOpenCloseImageFilter : public KernelImageFilter< using AnchorLineDilateType = AnchorErodeDilateLine; void - DoFaceOpen(InputImageConstPointer input, - InputImagePointer output, - InputImagePixelType border, - KernelLType line, - AnchorLineOpenType & AnchorLineOpen, - const BresOffsetArray LineOffsets, + DoFaceOpen(InputImageConstPointer input, + InputImagePointer output, + InputImagePixelType border, + KernelLType line, + AnchorLineOpenType & AnchorLineOpen, + const BresOffsetArray LineOffsets, std::vector & outbuffer, - const InputImageRegionType AllImage, - const InputImageRegionType face); + const InputImageRegionType AllImage, + const InputImageRegionType face); }; // end of class } // end namespace itk diff --git a/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseImageFilter.hxx index 0602a3f2a5b..efb910649f7 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseImageFilter.hxx @@ -51,7 +51,7 @@ AnchorOpenCloseImageFilter::DynamicThread // will improve cache performance when working along non raster // directions. - AnchorLineErodeType AnchorLineErode; + AnchorLineErodeType AnchorLineErode; AnchorLineDilateType AnchorLineDilate; AnchorLineOpenType AnchorLineOpen; @@ -88,14 +88,14 @@ AnchorOpenCloseImageFilter::DynamicThread // iterate over all the structuring elements typename KernelType::DecompType decomposition = this->GetKernel().GetLines(); - BresType BresLine; + BresType BresLine; // first stage -- all of the erosions if we are doing an opening for (unsigned int i = 0; i < decomposition.size() - 1; ++i) { - const KernelLType ThisLine = decomposition[i]; + const KernelLType ThisLine = decomposition[i]; const BresOffsetArray TheseOffsets = BresLine.BuildLine(ThisLine, bufflength); - unsigned int SELength = GetLinePixels(ThisLine); + unsigned int SELength = GetLinePixels(ThisLine); // want lines to be odd if (!(SELength % 2)) { @@ -112,10 +112,10 @@ AnchorOpenCloseImageFilter::DynamicThread } // now do the opening in the middle of the chain { - const unsigned int i = static_cast(decomposition.size()) - 1; - const KernelLType ThisLine = decomposition[i]; + const unsigned int i = static_cast(decomposition.size()) - 1; + const KernelLType ThisLine = decomposition[i]; const typename BresType::OffsetArray TheseOffsets = BresLine.BuildLine(ThisLine, bufflength); - unsigned int SELength = GetLinePixels(ThisLine); + unsigned int SELength = GetLinePixels(ThisLine); // want lines to be odd if (!(SELength % 2)) { @@ -134,9 +134,9 @@ AnchorOpenCloseImageFilter::DynamicThread // Now for the rest of the dilations -- note that i needs to be signed for (int i = static_cast(decomposition.size()) - 2; i >= 0; --i) { - const KernelLType ThisLine = decomposition[i]; + const KernelLType ThisLine = decomposition[i]; const typename BresType::OffsetArray TheseOffsets = BresLine.BuildLine(ThisLine, bufflength); - unsigned int SELength = GetLinePixels(ThisLine); + unsigned int SELength = GetLinePixels(ThisLine); // want lines to be odd if (!(SELength % 2)) { @@ -163,15 +163,15 @@ AnchorOpenCloseImageFilter::DynamicThread template void AnchorOpenCloseImageFilter::DoFaceOpen( - InputImageConstPointer input, - InputImagePointer output, - InputImagePixelType border, - KernelLType line, - AnchorLineOpenType & AnchorLineOpen, - const BresOffsetArray LineOffsets, + InputImageConstPointer input, + InputImagePointer output, + InputImagePixelType border, + KernelLType line, + AnchorLineOpenType & AnchorLineOpen, + const BresOffsetArray LineOffsets, std::vector & outbuffer, - const InputImageRegionType AllImage, - const InputImageRegionType face) + const InputImageRegionType AllImage, + const InputImageRegionType face) { // iterate over the face @@ -196,8 +196,8 @@ AnchorOpenCloseImageFilter::DoFaceOpen( for (unsigned int it = 0; it < face.GetNumberOfPixels(); ++it) { const typename TImage::IndexType Ind = dumbImg->ComputeIndex(it); - unsigned int start; - unsigned int end; + unsigned int start; + unsigned int end; if (FillLineBuffer( input, Ind, NormLine, tol, LineOffsets, AllImage, outbuffer, start, end)) { diff --git a/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseLine.h b/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseLine.h index 81e4f01644c..3294784d079 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseLine.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseLine.h @@ -62,15 +62,15 @@ class ITK_TEMPLATE_EXPORT AnchorOpenCloseLine bool StartLine(std::vector & buffer, - InputImagePixelType & Extreme, - unsigned int & outLeftP, - unsigned int & outRightP); + InputImagePixelType & Extreme, + unsigned int & outLeftP, + unsigned int & outRightP); void FinishLine(std::vector & buffer, - InputImagePixelType & Extreme, - unsigned int & outLeftP, - unsigned int & outRightP); + InputImagePixelType & Extreme, + unsigned int & outLeftP, + unsigned int & outRightP); inline bool Compare1(const InputImagePixelType & a, const InputImagePixelType & b) diff --git a/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseLine.hxx b/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseLine.hxx index 328ee809f19..5cea8ae58ca 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseLine.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseLine.hxx @@ -113,9 +113,9 @@ AnchorOpenCloseLine::DoLine(std::vector bool AnchorOpenCloseLine::StartLine(std::vector & buffer, - InputImagePixelType & Extreme, - unsigned int & outLeftP, - unsigned int & outRightP) + InputImagePixelType & Extreme, + unsigned int & outLeftP, + unsigned int & outRightP) { // This returns true to indicate return to startLine label in pseudo // code, and false to indicate finishLine @@ -226,9 +226,9 @@ AnchorOpenCloseLine::StartLine(std::vector void AnchorOpenCloseLine::FinishLine(std::vector & buffer, - InputImagePixelType & Extreme, - unsigned int & outLeftP, - unsigned int & outRightP) + InputImagePixelType & Extreme, + unsigned int & outLeftP, + unsigned int & outRightP) { while (outLeftP < outRightP) { diff --git a/Modules/Filtering/MathematicalMorphology/include/itkAnchorUtilities.h b/Modules/Filtering/MathematicalMorphology/include/itkAnchorUtilities.h index 9e209fcffc9..6f620f70287 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkAnchorUtilities.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkAnchorUtilities.h @@ -33,26 +33,26 @@ namespace itk */ template int -ComputeStartEnd(const typename TImage::IndexType StartIndex, - const TLine line, - const float tol, +ComputeStartEnd(const typename TImage::IndexType StartIndex, + const TLine line, + const float tol, const typename TBres::OffsetArray LineOffsets, const typename TImage::RegionType AllImage, - unsigned int & start, - unsigned int & end); + unsigned int & start, + unsigned int & end); template void -DoAnchorFace(const TImage * input, - TImage * output, - typename TImage::PixelType border, - TLine line, - TAnchor & AnchorLine, - typename TBres::OffsetArray LineOffsets, +DoAnchorFace(const TImage * input, + TImage * output, + typename TImage::PixelType border, + TLine line, + TAnchor & AnchorLine, + typename TBres::OffsetArray LineOffsets, std::vector & inbuffer, std::vector & outbuffer, - const typename TImage::RegionType AllImage, - const typename TImage::RegionType face); + const typename TImage::RegionType AllImage, + const typename TImage::RegionType face); } // namespace itk diff --git a/Modules/Filtering/MathematicalMorphology/include/itkAnchorUtilities.hxx b/Modules/Filtering/MathematicalMorphology/include/itkAnchorUtilities.hxx index 70fec7c4d72..49293709fa3 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkAnchorUtilities.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkAnchorUtilities.hxx @@ -32,16 +32,16 @@ namespace itk **/ template void -DoAnchorFace(const TImage * input, - TImage * output, - typename TImage::PixelType border, - TLine line, - TAnchor & AnchorLine, - const typename TBres::OffsetArray LineOffsets, +DoAnchorFace(const TImage * input, + TImage * output, + typename TImage::PixelType border, + TLine line, + TAnchor & AnchorLine, + const typename TBres::OffsetArray LineOffsets, std::vector & inbuffer, std::vector & outbuffer, - const typename TImage::RegionType AllImage, - const typename TImage::RegionType face) + const typename TImage::RegionType AllImage, + const typename TImage::RegionType face) { // iterate over the face @@ -66,8 +66,8 @@ DoAnchorFace(const TImage * input, for (unsigned int it = 0; it < face.GetNumberOfPixels(); ++it) { const typename TImage::IndexType Ind = dumbImg->ComputeIndex(it); - unsigned int start; - unsigned int end; + unsigned int start; + unsigned int end; if (FillLineBuffer(input, Ind, NormLine, tol, LineOffsets, AllImage, inbuffer, start, end)) { const unsigned int len = end - start + 1; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkBasicDilateImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkBasicDilateImageFilter.h index b12d60fef7e..a9ad551da87 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkBasicDilateImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkBasicDilateImageFilter.h @@ -107,8 +107,8 @@ class ITK_TEMPLATE_EXPORT BasicDilateImageFilter : public MorphologyImageFilter< * Evaluate is used for non-boundary pixels. */ PixelType Evaluate(const NeighborhoodIteratorType & nit, - const KernelIteratorType kernelBegin, - const KernelIteratorType kernelEnd) override; + const KernelIteratorType kernelBegin, + const KernelIteratorType kernelEnd) override; private: // Default boundary condition for dilation filter, defaults to diff --git a/Modules/Filtering/MathematicalMorphology/include/itkBasicDilateImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkBasicDilateImageFilter.hxx index 686eaed214e..9bd6a586d09 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkBasicDilateImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkBasicDilateImageFilter.hxx @@ -31,12 +31,12 @@ BasicDilateImageFilter::BasicDilateImageFilt template auto BasicDilateImageFilter::Evaluate(const NeighborhoodIteratorType & nit, - const KernelIteratorType kernelBegin, + const KernelIteratorType kernelBegin, const KernelIteratorType kernelEnd) -> PixelType { unsigned int i; - PixelType max = NumericTraits::NonpositiveMin(); - PixelType temp; + PixelType max = NumericTraits::NonpositiveMin(); + PixelType temp; KernelIteratorType kernel_it; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkBasicErodeImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkBasicErodeImageFilter.h index 7693fef26a9..e0deec2db82 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkBasicErodeImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkBasicErodeImageFilter.h @@ -105,8 +105,8 @@ class ITK_TEMPLATE_EXPORT BasicErodeImageFilter : public MorphologyImageFilter::BasicErodeImageFilter template auto BasicErodeImageFilter::Evaluate(const NeighborhoodIteratorType & nit, - const KernelIteratorType kernelBegin, + const KernelIteratorType kernelBegin, const KernelIteratorType kernelEnd) -> PixelType { unsigned int i; - PixelType min = NumericTraits::max(); - PixelType temp; + PixelType min = NumericTraits::max(); + PixelType temp; KernelIteratorType kernel_it; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkClosingByReconstructionImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkClosingByReconstructionImageFilter.h index 62eefd0c58a..daef80afdc9 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkClosingByReconstructionImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkClosingByReconstructionImageFilter.h @@ -138,8 +138,8 @@ class ITK_TEMPLATE_EXPORT ClosingByReconstructionImageFilter : public ImageToIma private: /** kernel or structuring element to use. */ KernelType m_Kernel{}; - bool m_FullyConnected{}; - bool m_PreserveIntensities{}; + bool m_FullyConnected{}; + bool m_PreserveIntensities{}; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/MathematicalMorphology/include/itkClosingByReconstructionImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkClosingByReconstructionImageFilter.hxx index 6330cae129d..7b1f2757bcd 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkClosingByReconstructionImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkClosingByReconstructionImageFilter.hxx @@ -95,7 +95,7 @@ ClosingByReconstructionImageFilter::Generate ImageRegionConstIterator inputIt(this->GetInput(), dilate->GetOutput()->GetBufferedRegion()); ImageRegionConstIterator dilateIt(dilate->GetOutput(), erode->GetOutput()->GetBufferedRegion()); ImageRegionConstIterator erodeIt(erode->GetOutput(), erode->GetOutput()->GetBufferedRegion()); - ImageRegionIterator tempIt(tempImage, dilate->GetOutput()->GetBufferedRegion()); + ImageRegionIterator tempIt(tempImage, dilate->GetOutput()->GetBufferedRegion()); while (!dilateIt.IsAtEnd()) { if (dilateIt.Get() == erodeIt.Get()) @@ -133,7 +133,7 @@ ClosingByReconstructionImageFilter::Generate template void ClosingByReconstructionImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx b/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx index cd91aaf4913..91380503bdb 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx @@ -57,8 +57,8 @@ FlatStructuringElement::GeneratePolygon(TStructuringElement &, TRadi template void FlatStructuringElement::GeneratePolygon(itk::FlatStructuringElement<2> & res, - itk::Size<2> radius, - unsigned int lines) + itk::Size<2> radius, + unsigned int lines) { // radial decomposition method from "Radial Decomposition of Discs // and Spheres" - CVGIP: Graphical Models and Image Processing @@ -98,7 +98,7 @@ FlatStructuringElement::GeneratePolygon(itk::FlatStructuringElement< const double k1((Math::pi * static_cast(radius[0])) / (static_cast(lines))); const double k2((Math::pi * static_cast(radius[1])) / (static_cast(lines))); const double step(Math::pi / lines); - double theta(0.0); + double theta(0.0); // just to ensure that we get the last one while (theta <= Math::pi / 2.0 + 0.0001) @@ -129,16 +129,16 @@ FlatStructuringElement::GeneratePolygon(itk::FlatStructuringElement< template void FlatStructuringElement::GeneratePolygon(itk::FlatStructuringElement<3> & res, - itk::Size<3> radius, - unsigned int lines) + itk::Size<3> radius, + unsigned int lines) { res.SetRadius(radius); res.SetDecomposable(true); // std::cout << "3 dimensions" << std::endl; unsigned int rr = 0; - int iterations = 1; - const int faces = lines * 2; + int iterations = 1; + const int faces = lines * 2; for (unsigned int i = 0; i < 3; ++i) { if (radius[i] > rr) @@ -151,9 +151,9 @@ FlatStructuringElement::GeneratePolygon(itk::FlatStructuringElement< case 12: { // dodecahedron - const float phi = (1.0 + std::sqrt(5.0)) / 2.0; - float b = 1.0 / phi; - float c = 2.0 - phi; + const float phi = (1.0 + std::sqrt(5.0)) / 2.0; + float b = 1.0 / phi; + float c = 2.0 - phi; constexpr unsigned int facets = 12; using FacetArrayType = std::vector; FacetArrayType FacetArray; @@ -161,7 +161,7 @@ FlatStructuringElement::GeneratePolygon(itk::FlatStructuringElement< // set up vectors normal to the faces - only put in 3 points for // each face: // face 1 - LType3 PP{}; + LType3 PP{}; FacetType3 Fc; b /= 2.0; c /= 2.0; @@ -406,9 +406,9 @@ FlatStructuringElement::GeneratePolygon(itk::FlatStructuringElement< case 20: { // Icosahedron - const float phi = (1.0 + std::sqrt(5.0)) / 2.0; - const float a = 0.5; - const float b = 1.0 / (2.0 * phi); + const float phi = (1.0 + std::sqrt(5.0)) / 2.0; + const float a = 0.5; + const float b = 1.0 / (2.0 * phi); constexpr unsigned int facets = 20; using FacetArrayType = std::vector; FacetArrayType FacetArray; @@ -416,7 +416,7 @@ FlatStructuringElement::GeneratePolygon(itk::FlatStructuringElement< // set up vectors normal to the faces - only put in 3 points for // each face: // face 1 - LType3 PP{}; + LType3 PP{}; FacetType3 Fc; PP[0] = 0; @@ -728,7 +728,7 @@ FlatStructuringElement::GeneratePolygon(itk::FlatStructuringElement< // unit sphere // total number of facets is 8 * (4^iterations) const unsigned int facets = 8 * static_cast(std::pow(4.0, iterations)); - const double sqrt2 = std::sqrt(2.0); + const double sqrt2 = std::sqrt(2.0); using FacetArrayType = std::vector; FacetArrayType FacetArray; @@ -936,7 +936,7 @@ FlatStructuringElement::Ball(RadiusType radius, bool radiusIsParamet // Create an image to hold the ellipsoid // - auto sourceImage = ImageType::New(); + auto sourceImage = ImageType::New(); RadiusType size = radius; for (i = 0; i < static_cast(VDimension); ++i) { @@ -1028,10 +1028,10 @@ FlatStructuringElement::Ball(RadiusType radius, bool radiusIsParamet template FlatStructuringElement -FlatStructuringElement::Annulus(RadiusType radius, +FlatStructuringElement::Annulus(RadiusType radius, unsigned int thickness, - bool includeCenter, - bool radiusIsParametric) + bool includeCenter, + bool radiusIsParametric) { Self result{}; @@ -1041,7 +1041,7 @@ FlatStructuringElement::Annulus(RadiusType radius, // Create an image to hold the ellipsoid // - auto kernelImage = ImageType::New(); + auto kernelImage = ImageType::New(); RadiusType size = radius; for (unsigned int i = 0; i < VDimension; ++i) { @@ -1203,7 +1203,7 @@ FlatStructuringElement::ComputeBufferFromLines() // Create an image to hold the ellipsoid // - auto sourceImage = ImageType::New(); + auto sourceImage = ImageType::New(); RadiusType size = this->GetRadius(); for (int i = 0; i < static_cast(VDimension); ++i) { @@ -1282,8 +1282,8 @@ template FlatStructuringElement FlatStructuringElement::FromImage(const typename FlatStructuringElement::ImageType * image) { - Self res{}; - RadiusType size = res.CheckImageSize(image); + Self res{}; + RadiusType size = res.CheckImageSize(image); Index centerIdx; for (unsigned int i = 0; i < VDimension; ++i) diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedClosingImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedClosingImageFilter.h index 130ba7b1b64..c8631fdcec3 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedClosingImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedClosingImageFilter.h @@ -120,7 +120,7 @@ class ITK_TEMPLATE_EXPORT GrayscaleConnectedClosingImageFilter : public ImageToI GenerateData() override; private: - unsigned long m_NumberOfIterationsUsed{ 1 }; + unsigned long m_NumberOfIterationsUsed{ 1 }; InputImageIndexType m_Seed{}; bool m_FullyConnected{}; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedClosingImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedClosingImageFilter.hxx index 879db0439ec..97293f9534c 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedClosingImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedClosingImageFilter.hxx @@ -63,7 +63,7 @@ GrayscaleConnectedClosingImageFilter::GenerateData() this->AllocateOutputs(); - OutputImageType * outputImage = this->GetOutput(); + OutputImageType * outputImage = this->GetOutput(); const InputImageType * inputImage = this->GetInput(); // construct a marker image to manipulate using reconstruction by diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedOpeningImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedOpeningImageFilter.h index e87a8d4a2f1..dbb454e08a9 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedOpeningImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedOpeningImageFilter.h @@ -121,7 +121,7 @@ class ITK_TEMPLATE_EXPORT GrayscaleConnectedOpeningImageFilter : public ImageToI GenerateData() override; private: - unsigned long m_NumberOfIterationsUsed{ 1 }; + unsigned long m_NumberOfIterationsUsed{ 1 }; InputImageIndexType m_Seed{}; bool m_FullyConnected{}; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedOpeningImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedOpeningImageFilter.hxx index 9d1e0e3d2fa..0e6ea8c3b1e 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedOpeningImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedOpeningImageFilter.hxx @@ -63,7 +63,7 @@ GrayscaleConnectedOpeningImageFilter::GenerateData() this->AllocateOutputs(); - OutputImageType * outputImage = this->GetOutput(); + OutputImageType * outputImage = this->GetOutput(); const InputImageType * inputImage = this->GetInput(); // construct a marker image to manipulate using reconstruction by diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionDilateImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionDilateImageFilter.h index be11218bed5..9607d9e0b74 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionDilateImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionDilateImageFilter.h @@ -113,8 +113,8 @@ class ITK_TEMPLATE_EXPORT GrayscaleFunctionDilateImageFilter * for non-boundary pixels. */ PixelType Evaluate(const NeighborhoodIteratorType & nit, - const KernelIteratorType kernelBegin, - const KernelIteratorType kernelEnd) override; + const KernelIteratorType kernelBegin, + const KernelIteratorType kernelEnd) override; private: // Default boundary condition for dilation filter, defaults to diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionDilateImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionDilateImageFilter.hxx index 97dd6505c4c..a90f11718af 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionDilateImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionDilateImageFilter.hxx @@ -36,8 +36,8 @@ GrayscaleFunctionDilateImageFilter::Evaluate -> PixelType { unsigned int i; - PixelType max = NumericTraits::NonpositiveMin(); - PixelType temp; + PixelType max = NumericTraits::NonpositiveMin(); + PixelType temp; KernelIteratorType kernel_it; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionErodeImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionErodeImageFilter.h index 85c1f41aea4..23f59961bb2 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionErodeImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionErodeImageFilter.h @@ -113,8 +113,8 @@ class ITK_TEMPLATE_EXPORT GrayscaleFunctionErodeImageFilter * for non-boundary pixels. */ PixelType Evaluate(const NeighborhoodIteratorType & nit, - const KernelIteratorType kernelBegin, - const KernelIteratorType kernelEnd) override; + const KernelIteratorType kernelBegin, + const KernelIteratorType kernelEnd) override; private: // Default boundary condition for erosion filter, defaults to diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionErodeImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionErodeImageFilter.hxx index b545f75de68..4cb71c62282 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionErodeImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionErodeImageFilter.hxx @@ -36,8 +36,8 @@ GrayscaleFunctionErodeImageFilter::Evaluate( -> PixelType { unsigned int i; - PixelType min = NumericTraits::max(); - PixelType temp; + PixelType min = NumericTraits::max(); + PixelType temp; KernelIteratorType kernel_it; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicDilateImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicDilateImageFilter.h index e38644d1a0d..f914e1cf335 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicDilateImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicDilateImageFilter.h @@ -187,9 +187,9 @@ class ITK_TEMPLATE_EXPORT GrayscaleGeodesicDilateImageFilter : public ImageToIma private: - bool m_RunOneIteration{}; + bool m_RunOneIteration{}; unsigned long m_NumberOfIterationsUsed{}; - bool m_FullyConnected{}; + bool m_FullyConnected{}; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicDilateImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicDilateImageFilter.hxx index 3dc8c02afb9..ed74535b5ec 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicDilateImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicDilateImageFilter.hxx @@ -205,7 +205,7 @@ GrayscaleGeodesicDilateImageFilter::GenerateData() // iteration of the algorithm with the current marker image. ImageRegionConstIterator singleInIt(singleIteration->GetMarkerImage(), singleIteration->GetOutput()->GetRequestedRegion()); - ImageRegionIterator singleOutIt(singleIteration->GetOutput(), + ImageRegionIterator singleOutIt(singleIteration->GetOutput(), singleIteration->GetOutput()->GetRequestedRegion()); done = true; @@ -286,7 +286,7 @@ GrayscaleGeodesicDilateImageFilter::DynamicThreadedGe // Find the boundary "faces". Structuring element is elementary // (face connected neighbors within a radius of 1). NeighborhoodAlgorithm::ImageBoundaryFacesCalculator fC; - auto kernelRadius = + auto kernelRadius = MakeFilled::RadiusType>(1); const typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = fC(this->GetMarkerImage(), outputRegionForThread, kernelRadius); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicErodeImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicErodeImageFilter.h index b046b092556..d76e8923855 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicErodeImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicErodeImageFilter.h @@ -188,9 +188,9 @@ class ITK_TEMPLATE_EXPORT GrayscaleGeodesicErodeImageFilter : public ImageToImag private: - bool m_RunOneIteration{}; + bool m_RunOneIteration{}; unsigned long m_NumberOfIterationsUsed{}; - bool m_FullyConnected{}; + bool m_FullyConnected{}; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicErodeImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicErodeImageFilter.hxx index 3320d07e3a4..7e7fd616f00 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicErodeImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicErodeImageFilter.hxx @@ -205,7 +205,7 @@ GrayscaleGeodesicErodeImageFilter::GenerateData() // iteration of the algorithm with the current marker image. ImageRegionConstIterator singleInIt(singleIteration->GetMarkerImage(), singleIteration->GetOutput()->GetRequestedRegion()); - ImageRegionIterator singleOutIt(singleIteration->GetOutput(), + ImageRegionIterator singleOutIt(singleIteration->GetOutput(), singleIteration->GetOutput()->GetRequestedRegion()); done = true; @@ -282,7 +282,7 @@ GrayscaleGeodesicErodeImageFilter::DynamicThreadedGen // Find the boundary "faces". Structuring element is elementary // (face connected neighbors within a radius of 1). NeighborhoodAlgorithm::ImageBoundaryFacesCalculator fC; - auto kernelRadius = + auto kernelRadius = MakeFilled::RadiusType>(1); const typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = fC(this->GetMarkerImage(), outputRegionForThread, kernelRadius); @@ -291,9 +291,9 @@ GrayscaleGeodesicErodeImageFilter::DynamicThreadedGen // for (const auto & face : faceList) { - NeighborhoodIteratorType markerIt(kernelRadius, this->GetMarkerImage(), face); + NeighborhoodIteratorType markerIt(kernelRadius, this->GetMarkerImage(), face); ImageRegionConstIterator maskIt(this->GetMaskImage(), face); - ImageRegionIterator oIt(this->GetOutput(), face); + ImageRegionIterator oIt(this->GetOutput(), face); markerIt.OverrideBoundaryCondition(&BC); markerIt.GoToBegin(); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.hxx index c259e5a4c49..ab8ed8f95df 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.hxx @@ -325,7 +325,7 @@ GrayscaleMorphologicalClosingImageFilter::Mo template void GrayscaleMorphologicalClosingImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.hxx index e3518da0ad5..6f630d3d349 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.hxx @@ -328,7 +328,7 @@ GrayscaleMorphologicalOpeningImageFilter::Mo template void GrayscaleMorphologicalOpeningImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkHConcaveImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkHConcaveImageFilter.h index 65859323eeb..289fca0d53c 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkHConcaveImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkHConcaveImageFilter.h @@ -123,8 +123,8 @@ class ITK_TEMPLATE_EXPORT HConcaveImageFilter : public ImageToImageFilterConfigureHistogram(histogram); - OutputImageType * outputImage = this->GetOutput(); - MaskImageType * outputMask = this->GetOutputMask(); + OutputImageType * outputImage = this->GetOutput(); + MaskImageType * outputMask = this->GetOutputMask(); const InputImageType * inputImage = this->GetInput(); - const MaskImageType * maskImage = this->GetMaskImage(); + const MaskImageType * maskImage = this->GetMaskImage(); const RegionType inputRegion = inputImage->GetRequestedRegion(); @@ -158,8 +158,8 @@ MaskedMovingHistogramImageFilter>(1); - const int axis = ImageDimension - 1; + auto direction = MakeFilled>(1); + const int axis = ImageDimension - 1; OffsetType offset{}; RegionType stRegion; stRegion.SetSize(this->m_Kernel.GetSize()); @@ -253,10 +253,10 @@ MaskedMovingHistogramImageFilterGetDirAndOffset(LineStart, PrevLineStart, LineOffset, Changes, LineDirection); ++(Steps[LineDirection]); - const IndexType PrevLineStartHist = LineStart - LineOffset; + const IndexType PrevLineStartHist = LineStart - LineOffset; const OffsetListType * addedListLine = &this->m_AddedOffsets[LineOffset]; const OffsetListType * removedListLine = &this->m_RemovedOffsets[LineOffset]; - HistogramType & tmpHist = HistVec[LineDirection]; + HistogramType & tmpHist = HistVec[LineDirection]; stRegion.SetIndex(PrevLineStart - centerOffset); // Now move the histogram pushHistogram( @@ -280,14 +280,14 @@ MaskedMovingHistogramImageFilter void MaskedMovingHistogramImageFilter::pushHistogram( - HistogramType & histogram, + HistogramType & histogram, const OffsetListType * addedList, const OffsetListType * removedList, - const RegionType & inputRegion, - const RegionType & kernRegion, + const RegionType & inputRegion, + const RegionType & kernRegion, const InputImageType * inputImage, - const MaskImageType * maskImage, - const IndexType currentIdx) + const MaskImageType * maskImage, + const IndexType currentIdx) { if (inputRegion.IsInside(kernRegion)) { @@ -352,7 +352,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMorphologyHistogram.h b/Modules/Filtering/MathematicalMorphology/include/itkMorphologyHistogram.h index ae9b6a482d8..5a4f9c50407 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMorphologyHistogram.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkMorphologyHistogram.h @@ -111,7 +111,7 @@ class MorphologyHistogram return false; } - MapType m_Map; + MapType m_Map; TInputPixel m_Boundary; }; @@ -196,11 +196,11 @@ class VectorMorphologyHistogram } std::vector m_Vector; - TInputPixel m_InitValue; - TInputPixel m_CurrentValue; - TCompare m_Compare; - int m_Direction; - TInputPixel m_Boundary; + TInputPixel m_InitValue; + TInputPixel m_CurrentValue; + TCompare m_Compare; + int m_Direction; + TInputPixel m_Boundary; }; /// \cond HIDE_SPECIALIZATION_DOCUMENTATION diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMorphologyImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkMorphologyImageFilter.h index a61a6c20d09..bbee63a9156 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMorphologyImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkMorphologyImageFilter.h @@ -148,8 +148,8 @@ class ITK_TEMPLATE_EXPORT MorphologyImageFilter : public KernelImageFilter::DynamicThreadedGenera NeighborhoodIteratorType b_iter; // Find the boundary "faces" - NeighborhoodAlgorithm::ImageBoundaryFacesCalculator fC; + NeighborhoodAlgorithm::ImageBoundaryFacesCalculator fC; const typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = fC(this->GetInput(), outputRegionForThread, this->GetKernel().GetRadius()); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramMorphologicalGradientImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramMorphologicalGradientImageFilter.h index 1b166e0a8d2..d1a8e83d0e3 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramMorphologicalGradientImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramMorphologicalGradientImageFilter.h @@ -190,9 +190,9 @@ class VectorMorphologicalGradientHistogram } std::vector m_Vector; - TInputPixel m_Min; - TInputPixel m_Max; - SizeValueType m_Count; + TInputPixel m_Min; + TInputPixel m_Max; + SizeValueType m_Count; }; /// \cond HIDE_SPECIALIZATION_DOCUMENTATION diff --git a/Modules/Filtering/MathematicalMorphology/include/itkOpeningByReconstructionImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkOpeningByReconstructionImageFilter.h index f7dc1d665c7..e7cd2a157fe 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkOpeningByReconstructionImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkOpeningByReconstructionImageFilter.h @@ -140,8 +140,8 @@ class ITK_TEMPLATE_EXPORT OpeningByReconstructionImageFilter : public ImageToIma private: /** kernel or structuring element to use. */ KernelType m_Kernel{}; - bool m_FullyConnected{}; - bool m_PreserveIntensities{}; + bool m_FullyConnected{}; + bool m_PreserveIntensities{}; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/MathematicalMorphology/include/itkOpeningByReconstructionImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkOpeningByReconstructionImageFilter.hxx index 0f925f76130..c416032ff92 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkOpeningByReconstructionImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkOpeningByReconstructionImageFilter.hxx @@ -96,7 +96,7 @@ OpeningByReconstructionImageFilter::Generate ImageRegionConstIterator inputIt(this->GetInput(), erode->GetOutput()->GetBufferedRegion()); ImageRegionConstIterator erodeIt(erode->GetOutput(), erode->GetOutput()->GetBufferedRegion()); ImageRegionConstIterator dilateIt(dilate->GetOutput(), erode->GetOutput()->GetBufferedRegion()); - ImageRegionIterator tempIt(tempImage, erode->GetOutput()->GetBufferedRegion()); + ImageRegionIterator tempIt(tempImage, erode->GetOutput()->GetBufferedRegion()); while (!erodeIt.IsAtEnd()) { if (erodeIt.Get() == dilateIt.Get()) @@ -133,7 +133,7 @@ OpeningByReconstructionImageFilter::Generate template void OpeningByReconstructionImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkRankHistogram.h b/Modules/Filtering/MathematicalMorphology/include/itkRankHistogram.h index 20c7c6e33e5..69e44892da2 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkRankHistogram.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkRankHistogram.h @@ -156,13 +156,13 @@ class RankHistogram GetValue(const TInputPixel &) { const SizeValueType target = (SizeValueType)(m_Rank * (m_Entries - 1)) + 1; - SizeValueType total = m_Below; - SizeValueType ThisBin; - bool eraseFlag = false; + SizeValueType total = m_Below; + SizeValueType ThisBin; + bool eraseFlag = false; if (total < target) { - auto searchIt = m_RankIt; + auto searchIt = m_RankIt; typename MapType::iterator eraseIt; while (searchIt != m_Map.end()) @@ -197,7 +197,7 @@ class RankHistogram } else { - auto searchIt = m_RankIt; + auto searchIt = m_RankIt; typename MapType::iterator eraseIt; while (searchIt != m_Map.begin()) @@ -257,13 +257,13 @@ class RankHistogram private: using MapType = typename std::map; - MapType m_Map; + MapType m_Map; SizeValueType m_Below; SizeValueType m_Entries; - TInputPixel m_RankValue; - TInputPixel m_InitVal; - Compare m_Compare; - bool m_Initialized; + TInputPixel m_RankValue; + TInputPixel m_InitVal; + Compare m_Compare; + bool m_Initialized; // This iterator will point at the desired rank value typename MapType::iterator m_RankIt; @@ -305,7 +305,7 @@ class VectorRankHistogram TInputPixel GetValueBruteForce() { - SizeValueType count = 0; + SizeValueType count = 0; const SizeValueType target = (SizeValueType)(m_Rank * (m_Entries - 1)) + 1; for (SizeValueType i = 0; i < m_Size; ++i) { @@ -382,13 +382,13 @@ class VectorRankHistogram private: using VecType = typename std::vector; - VecType m_Vec; + VecType m_Vec; SizeValueType m_Size; - Compare m_Compare; - TInputPixel m_RankValue; - TInputPixel m_InitVal; - int m_Below; - int m_Entries; + Compare m_Compare; + TInputPixel m_RankValue; + TInputPixel m_InitVal; + int m_Below; + int m_Entries; }; // now create MorphologicalGradientHistogram specializations using the VectorMorphologicalGradientHistogram diff --git a/Modules/Filtering/MathematicalMorphology/include/itkReconstructionImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkReconstructionImageFilter.hxx index cbb0512282e..919218b8c3f 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkReconstructionImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkReconstructionImageFilter.hxx @@ -80,8 +80,8 @@ ReconstructionImageFilter::GenerateData() TCompare compare; const MarkerImageConstPointer markerImage = this->GetMarkerImage(); - const MaskImageConstPointer maskImage = this->GetMaskImage(); - const OutputImagePointer output = this->GetOutput(); + const MaskImageConstPointer maskImage = this->GetMaskImage(); + const OutputImagePointer output = this->GetOutput(); // mask and marker must have the same size if (this->GetMarkerImage()->GetRequestedRegion().GetSize() != this->GetMaskImage()->GetRequestedRegion().GetSize()) @@ -93,7 +93,7 @@ ReconstructionImageFilter::GenerateData() using PadType = typename itk::ConstantPadImageFilter; MarkerImageConstPointer markerImageP; - MaskImageConstPointer maskImageP; + MaskImageConstPointer maskImageP; ISizeType padSize; @@ -121,7 +121,7 @@ ReconstructionImageFilter::GenerateData() else { maskImageP = this->GetMaskImage(); - InputIteratorType inIt(markerImage, output->GetRequestedRegion()); + InputIteratorType inIt(markerImage, output->GetRequestedRegion()); OutputIteratorType outIt(output, output->GetRequestedRegion()); // copy marker to output - isn't there a better way? while (!outIt.IsAtEnd()) @@ -138,10 +138,10 @@ ReconstructionImageFilter::GenerateData() using FifoType = typename std::queue; FifoType IndexFifo; - NOutputIterator outNIt; + NOutputIterator outNIt; InputIteratorType mskIt; - CNInputIterator mskNIt; - auto kernelRadius = ISizeType::Filled(1); + CNInputIterator mskNIt; + auto kernelRadius = ISizeType::Filled(1); if (m_UseInternalCopy) { FaceCalculatorType faceCalculator; @@ -182,7 +182,7 @@ ReconstructionImageFilter::GenerateData() for (outNIt.GoToBegin(), mskIt.GoToBegin(); !outNIt.IsAtEnd(); ++outNIt, ++mskIt) { InputImagePixelType V = outNIt.GetCenterPixel(); - auto iV = static_cast(mskIt.Get()); + auto iV = static_cast(mskIt.Get()); // be sure that the pixels in the images follow the preconditions if (compare(V, iV)) @@ -239,7 +239,7 @@ ReconstructionImageFilter::GenerateData() { --outNIt; --mskNIt; - InputImagePixelType V = outNIt.GetCenterPixel(); + InputImagePixelType V = outNIt.GetCenterPixel(); typename NOutputIterator::ConstIterator sIt; for (sIt = outNIt.Begin(); !sIt.IsAtEnd(); ++sIt) { @@ -293,7 +293,7 @@ ReconstructionImageFilter::GenerateData() outNIt += I - outNIt.GetIndex(); mskNIt += I - mskNIt.GetIndex(); const InputImagePixelType V = outNIt.GetCenterPixel(); - auto mLIt = mIndexList.begin(); + auto mLIt = mIndexList.begin(); for (auto oLIt = oIndexList.begin(); oLIt != oIndexList.end(); ++oLIt, ++mLIt) { const InputImagePixelType VN = outNIt.GetPixel(*oLIt); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkRegionalMaximaImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkRegionalMaximaImageFilter.h index a8667e6cd0a..3485c0f7433 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkRegionalMaximaImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkRegionalMaximaImageFilter.h @@ -145,8 +145,8 @@ class ITK_TEMPLATE_EXPORT RegionalMaximaImageFilter : public ImageToImageFilter< GenerateData() override; private: - bool m_FullyConnected{ false }; - bool m_FlatIsMaxima{ true }; + bool m_FullyConnected{ false }; + bool m_FlatIsMaxima{ true }; OutputImagePixelType m_ForegroundValue{}; OutputImagePixelType m_BackgroundValue{}; }; // end of class diff --git a/Modules/Filtering/MathematicalMorphology/include/itkRegionalMaximaImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkRegionalMaximaImageFilter.hxx index 4b94c404599..6f8d7a88666 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkRegionalMaximaImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkRegionalMaximaImageFilter.hxx @@ -73,7 +73,7 @@ RegionalMaximaImageFilter::GenerateData() this->AllocateOutputs(); const InputImageType * input = this->GetInput(); - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); // Delegate to the valued filter to find the minima auto regionalMax = ValuedRegionalMaximaImageFilter::New(); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkRegionalMinimaImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkRegionalMinimaImageFilter.h index 1474470439f..ffba0dcca54 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkRegionalMinimaImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkRegionalMinimaImageFilter.h @@ -143,8 +143,8 @@ class ITK_TEMPLATE_EXPORT RegionalMinimaImageFilter : public ImageToImageFilter< GenerateData() override; private: - bool m_FullyConnected{ false }; - bool m_FlatIsMinima{ true }; + bool m_FullyConnected{ false }; + bool m_FlatIsMinima{ true }; OutputImagePixelType m_ForegroundValue{}; OutputImagePixelType m_BackgroundValue{}; }; // end of class diff --git a/Modules/Filtering/MathematicalMorphology/include/itkRegionalMinimaImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkRegionalMinimaImageFilter.hxx index 1b6d1e00c98..3de6964be0f 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkRegionalMinimaImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkRegionalMinimaImageFilter.hxx @@ -74,7 +74,7 @@ RegionalMinimaImageFilter::GenerateData() this->AllocateOutputs(); const InputImageType * input = this->GetInput(); - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); // Delegate to the valued filter to find the minima auto regionalMin = ValuedRegionalMinimaImageFilter::New(); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkSharedMorphologyUtilities.h b/Modules/Filtering/MathematicalMorphology/include/itkSharedMorphologyUtilities.h index fc565b49ae9..b5b9bfc826d 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkSharedMorphologyUtilities.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkSharedMorphologyUtilities.h @@ -29,34 +29,34 @@ NeedToDoFace(const TRegion AllImage, const TRegion face, const TLine line); template int -ComputeStartEnd(const typename TImage::IndexType StartIndex, - const TLine line, - const float tol, +ComputeStartEnd(const typename TImage::IndexType StartIndex, + const TLine line, + const float tol, const typename TBres::OffsetArray LineOffsets, const typename TImage::RegionType AllImage, - unsigned int & start, - unsigned int & end); + unsigned int & start, + unsigned int & end); template int -FillLineBuffer(typename TImage::ConstPointer input, - const typename TImage::IndexType StartIndex, - const TLine line, - const float tol, - const typename TBres::OffsetArray LineOffsets, - const typename TImage::RegionType AllImage, +FillLineBuffer(typename TImage::ConstPointer input, + const typename TImage::IndexType StartIndex, + const TLine line, + const float tol, + const typename TBres::OffsetArray LineOffsets, + const typename TImage::RegionType AllImage, std::vector & inbuffer, - unsigned int & start, - unsigned int & end); + unsigned int & start, + unsigned int & end); template void -CopyLineToImage(const typename TImage::Pointer output, - const typename TImage::IndexType StartIndex, - const typename TBres::OffsetArray LineOffsets, +CopyLineToImage(const typename TImage::Pointer output, + const typename TImage::IndexType StartIndex, + const typename TBres::OffsetArray LineOffsets, std::vector & outbuffer, - const unsigned int start, - const unsigned int end); + const unsigned int start, + const unsigned int end); // This returns a face with a normal between +/- 45 degrees of the // line. The face is enlarged so that AllImage is entirely filled by diff --git a/Modules/Filtering/MathematicalMorphology/include/itkSharedMorphologyUtilities.hxx b/Modules/Filtering/MathematicalMorphology/include/itkSharedMorphologyUtilities.hxx index 00f41b7938f..a73a53b00a6 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkSharedMorphologyUtilities.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkSharedMorphologyUtilities.hxx @@ -45,7 +45,7 @@ NeedToDoFace(const TRegion AllImage, const TRegion face, const TLine line) // find the small dimension of the face - should only be one typename TRegion::IndexType ISt = AllImage.GetIndex(); - typename TRegion::SizeType FSz = face.GetSize(); + typename TRegion::SizeType FSz = face.GetSize(); typename TRegion::IndexType FSt = face.GetIndex(); unsigned int smallDim = 0; @@ -81,20 +81,20 @@ NeedToDoFace(const TRegion AllImage, const TRegion face, const TLine line) template int -ComputeStartEnd(const typename TImage::IndexType StartIndex, - const TLine line, - const float tol, +ComputeStartEnd(const typename TImage::IndexType StartIndex, + const TLine line, + const float tol, const typename TBres::OffsetArray LineOffsets, const typename TImage::RegionType AllImage, - unsigned int & start, - unsigned int & end) + unsigned int & start, + unsigned int & end) { // compute intersection between ray and box typename TImage::IndexType ImStart = AllImage.GetIndex(); - typename TImage::SizeType ImSize = AllImage.GetSize(); - float Tfar = NumericTraits::max(); - float Tnear = NumericTraits::NonpositiveMin(); - float domdir = NumericTraits::NonpositiveMin(); + typename TImage::SizeType ImSize = AllImage.GetSize(); + float Tfar = NumericTraits::max(); + float Tnear = NumericTraits::NonpositiveMin(); + float domdir = NumericTraits::NonpositiveMin(); unsigned int perpdir = 0; for (unsigned int i = 0; i < TImage::RegionType::ImageDimension; ++i) @@ -109,8 +109,8 @@ ComputeStartEnd(const typename TImage::IndexType StartIndex, { const float P1{ static_cast(ImStart[i] - StartIndex[i]) }; const float P2{ P1 + static_cast(ImSize[i]) - 1.0F }; - float T1 = P1 / line[i]; - float T2 = P2 / line[i]; + float T1 = P1 / line[i]; + float T2 = P2 / line[i]; if (T1 > T2) { @@ -145,7 +145,7 @@ ComputeStartEnd(const typename TImage::IndexType StartIndex, if (Tfar < Tnear) // seems to need some margin { // in theory, no intersection, but search between them - bool intersection = false; + bool intersection = false; unsigned int inside = 0; // initialize to avoid warning if (Tnear - Tfar < 10) { @@ -270,12 +270,12 @@ ComputeStartEnd(const typename TImage::IndexType StartIndex, template void -CopyLineToImage(const typename TImage::Pointer output, - const typename TImage::IndexType StartIndex, - const typename TBres::OffsetArray LineOffsets, +CopyLineToImage(const typename TImage::Pointer output, + const typename TImage::IndexType StartIndex, + const typename TBres::OffsetArray LineOffsets, std::vector & outbuffer, - const unsigned int start, - const unsigned int end) + const unsigned int start, + const unsigned int end) { const unsigned int size = end - start + 1; @@ -290,8 +290,8 @@ CopyLineToImage(const typename TImage::Pointer output, template typename TInputImage::RegionType MakeEnlargedFace(const typename TInputImage::ConstPointer itkNotUsed(input), - const typename TInputImage::RegionType AllImage, - const TLine line) + const typename TInputImage::RegionType AllImage, + const TLine line) { // the face list calculator strategy fails in multithreaded mode // with 1D kernels @@ -305,7 +305,7 @@ MakeEnlargedFace(const typename TInputImage::ConstPointer itkNotUsed(input), for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i) { - SizeType S1 = AllImage.GetSize(); + SizeType S1 = AllImage.GetSize(); IndexType I2 = AllImage.GetIndex(); S1[i] = 1; @@ -325,8 +325,8 @@ MakeEnlargedFace(const typename TInputImage::ConstPointer itkNotUsed(input), } auto fit = faceList.begin(); - bool foundFace = false; - float MaxComp = NumericTraits::NonpositiveMin(); + bool foundFace = false; + float MaxComp = NumericTraits::NonpositiveMin(); unsigned int DomDir = 0; // std::cout << "------------" << std::endl; // figure out the dominant direction of the line @@ -384,9 +384,9 @@ MakeEnlargedFace(const typename TInputImage::ConstPointer itkNotUsed(input), } // figure out how much extra each other dimension needs to be extended - typename TInputImage::SizeType NewSize = RelevantRegion.GetSize(); + typename TInputImage::SizeType NewSize = RelevantRegion.GetSize(); typename TInputImage::IndexType NewStart = RelevantRegion.GetIndex(); - const unsigned int NonFaceLen = AllImage.GetSize()[NonFaceDim]; + const unsigned int NonFaceLen = AllImage.GetSize()[NonFaceDim]; for (unsigned int i = 0; i < TInputImage::RegionType::ImageDimension; ++i) { if (i != NonFaceDim) @@ -418,15 +418,15 @@ MakeEnlargedFace(const typename TInputImage::ConstPointer itkNotUsed(input), template int -FillLineBuffer(typename TImage::ConstPointer input, - const typename TImage::IndexType StartIndex, - const TLine line, // unit vector - const float tol, - const typename TBres::OffsetArray LineOffsets, - const typename TImage::RegionType AllImage, +FillLineBuffer(typename TImage::ConstPointer input, + const typename TImage::IndexType StartIndex, + const TLine line, // unit vector + const float tol, + const typename TBres::OffsetArray LineOffsets, + const typename TImage::RegionType AllImage, std::vector & inbuffer, - unsigned int & start, - unsigned int & end) + unsigned int & start, + unsigned int & end) { const int status = ComputeStartEnd(StartIndex, line, tol, LineOffsets, AllImage, start, end); if (!status) diff --git a/Modules/Filtering/MathematicalMorphology/include/itkValuedRegionalExtremaImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkValuedRegionalExtremaImageFilter.hxx index 2eea01d1fcc..e01ef5a65e7 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkValuedRegionalExtremaImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkValuedRegionalExtremaImageFilter.hxx @@ -69,7 +69,7 @@ ValuedRegionalExtremaImageFilterAllocateOutputs(); const InputImageType * input = this->GetInput(); - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); // 2 phases ProgressReporter progress(this, 0, this->GetOutput()->GetRequestedRegion().GetNumberOfPixels() * 2); @@ -78,7 +78,7 @@ ValuedRegionalExtremaImageFilter; using OutputIterator = ImageRegionIterator; - InputIterator inIt(input, output->GetRequestedRegion()); + InputIterator inIt(input, output->GetRequestedRegion()); OutputIterator outIt(output, output->GetRequestedRegion()); const InputImagePixelType firstValue = inIt.Get(); @@ -106,7 +106,7 @@ ValuedRegionalExtremaImageFilterGetRequestedRegion()); setConnectivity(&outNIt, m_FullyConnected); @@ -126,7 +126,7 @@ ValuedRegionalExtremaImageFilter::DynamicThre std::vector reverse(bufflength); // iterate over all the structuring elements typename KernelType::DecompType decomposition = this->GetKernel().GetLines(); - BresType BresLine; + BresType BresLine; using KernelLType = typename KernelType::LType; for (unsigned int i = 0; i < decomposition.size(); ++i) { - const typename KernelType::LType ThisLine = decomposition[i]; + const typename KernelType::LType ThisLine = decomposition[i]; const typename BresType::OffsetArray TheseOffsets = BresLine.BuildLine(ThisLine, bufflength); - unsigned int SELength = GetLinePixels(ThisLine); + unsigned int SELength = GetLinePixels(ThisLine); // want lines to be odd if (!(SELength % 2)) { diff --git a/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanUtilities.h b/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanUtilities.h index 01afc3213fe..5142b5e7631 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanUtilities.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanUtilities.h @@ -35,29 +35,29 @@ template void FillReverseExt(std::vector & pixbuffer, std::vector & rExtBuffer, - const unsigned int KernLen, - unsigned int len); + const unsigned int KernLen, + unsigned int len); template void FillForwardExt(std::vector & pixbuffer, std::vector & fExtBuffer, - const unsigned int KernLen, - unsigned int len); + const unsigned int KernLen, + unsigned int len); template void -DoFace(typename TImage::ConstPointer input, - typename TImage::Pointer output, - typename TImage::PixelType border, - TLine line, - const typename TBres::OffsetArray LineOffsets, - const unsigned int KernLen, +DoFace(typename TImage::ConstPointer input, + typename TImage::Pointer output, + typename TImage::PixelType border, + TLine line, + const typename TBres::OffsetArray LineOffsets, + const unsigned int KernLen, std::vector & pixbuffer, std::vector & fExtBuffer, std::vector & rExtBuffer, - const typename TImage::RegionType AllImage, - const typename TImage::RegionType face); + const typename TImage::RegionType AllImage, + const typename TImage::RegionType face); } // namespace itk #ifndef ITK_MANUAL_INSTANTIATION diff --git a/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanUtilities.hxx b/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanUtilities.hxx index 16d9a85fa30..8e747a8095b 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanUtilities.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanUtilities.hxx @@ -40,13 +40,13 @@ template void FillForwardExt(std::vector & pixbuffer, std::vector & fExtBuffer, - const unsigned int KernLen, - unsigned int len) + const unsigned int KernLen, + unsigned int len) { const unsigned int size = len; const unsigned int blocks = size / KernLen; - unsigned int i = 0; - TFunction m_TF; + unsigned int i = 0; + TFunction m_TF; for (unsigned int j = 0; j < blocks; ++j) { @@ -79,13 +79,13 @@ template void FillReverseExt(std::vector & pixbuffer, std::vector & rExtBuffer, - const unsigned int KernLen, - unsigned int len) + const unsigned int KernLen, + unsigned int len) { - auto size = (IndexValueType)(len); + auto size = (IndexValueType)(len); const IndexValueType blocks = size / static_cast(KernLen); - IndexValueType i = size - 1; - TFunction m_TF; + IndexValueType i = size - 1; + TFunction m_TF; if (i > blocks * static_cast(KernLen) - 1) { @@ -114,17 +114,17 @@ FillReverseExt(std::vector & pixbuffer, template void -DoFace(typename TImage::ConstPointer input, - typename TImage::Pointer output, - typename TImage::PixelType border, - TLine line, - const typename TBres::OffsetArray LineOffsets, - const unsigned int KernLen, +DoFace(typename TImage::ConstPointer input, + typename TImage::Pointer output, + typename TImage::PixelType border, + TLine line, + const typename TBres::OffsetArray LineOffsets, + const unsigned int KernLen, std::vector & pixbuffer, std::vector & fExtBuffer, std::vector & rExtBuffer, - const typename TImage::RegionType AllImage, - const typename TImage::RegionType face) + const typename TImage::RegionType AllImage, + const typename TImage::RegionType face) { // iterate over the face @@ -146,12 +146,12 @@ DoFace(typename TImage::ConstPointer input, NormLine.Normalize(); // set a generous tolerance const float tol = 1.0 / LineOffsets.size(); - TFunction m_TF; + TFunction m_TF; for (unsigned int it = 0; it < face.GetNumberOfPixels(); ++it) { const typename TImage::IndexType Ind = dumbImg->ComputeIndex(it); - unsigned int start; /*one-line-declaration*/ - unsigned int end; /*one-line-declaration*/ + unsigned int start; /*one-line-declaration*/ + unsigned int end; /*one-line-declaration*/ if (FillLineBuffer(input, Ind, NormLine, tol, LineOffsets, AllImage, pixbuffer, start, end)) { const unsigned int len = end - start + 1; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest.cxx index 5258c774a1b..8bc94d46d10 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest.cxx @@ -27,8 +27,8 @@ ComputeAreaError(const SEType & k, unsigned int thickness = 0); int itkFlatStructuringElementTest(int, char *[]) { - constexpr int scalarRadius = 5; - constexpr int scalarThickness = 2; + constexpr int scalarRadius = 5; + constexpr int scalarThickness = 2; constexpr bool radiusIsParametric = true; using SE2Type = itk::FlatStructuringElement<2>; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest2.cxx b/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest2.cxx index 3b52b03f46b..b5db28239d8 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest2.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest2.cxx @@ -38,10 +38,10 @@ GetImage(const itk::FlatStructuringElement & flatElement) using ConstIterator = typename FlatStructuringElement<2U>::ConstIterator; using PixelType = unsigned char; - auto image = ImageType::New(); + auto image = ImageType::New(); typename ImageType::RegionType region; - RadiusType size = flatElement.GetRadius(); - Index centerIdx; + RadiusType size = flatElement.GetRadius(); + Index centerIdx; for (unsigned int i = 0; i < VDimension; ++i) { @@ -53,7 +53,7 @@ GetImage(const itk::FlatStructuringElement & flatElement) image->Allocate(); ImageRegionIterator img_it(image, region); - ConstIterator kernel_it; + ConstIterator kernel_it; for (img_it.GoToBegin(), kernel_it = flatElement.Begin(); !img_it.IsAtEnd(); ++img_it, ++kernel_it) { if (*kernel_it) @@ -112,7 +112,7 @@ itkFlatStructuringElementTest2(int argc, char * argv[]) cast->Update(); const ImageBoolType::Pointer testImgBool = cast->GetOutput(); - const FSEType flatStructure = FSEType::FromImage(testImgBool); + const FSEType flatStructure = FSEType::FromImage(testImgBool); const ImageUCType::Pointer imgFromStructure = GetImage(flatStructure); // Write result from GetImage for comparison with input image diff --git a/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest3.cxx b/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest3.cxx index e99d2fbc74e..5d8eb347977 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest3.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkFlatStructuringElementTest3.cxx @@ -45,7 +45,7 @@ SEToFile(const TSEType & e, const std::string & fname) img->Allocate(); img->FillBuffer(0); - typename TSEType::ConstIterator SEIt; + typename TSEType::ConstIterator SEIt; itk::ImageRegionIterator it(img, region); for (SEIt = e.Begin(); SEIt != e.End(); ++SEIt, ++it) @@ -72,10 +72,10 @@ itkFlatStructuringElementTest3(int argc, char * argv[]) return EXIT_FAILURE; } - int dimension = 2; + int dimension = 2; const std::string outputImage = argv[1]; - const int radius = std::stoi(argv[2]); - const int lines = std::stoi(argv[3]); + const int radius = std::stoi(argv[2]); + const int lines = std::stoi(argv[3]); if (argc > 4) { dimension = std::stoi(argv[4]); @@ -85,7 +85,7 @@ itkFlatStructuringElementTest3(int argc, char * argv[]) { using SE2Type = itk::FlatStructuringElement<2>; - auto r2 = itk::MakeFilled(radius); + auto r2 = itk::MakeFilled(radius); const SE2Type P = SE2Type::Polygon(r2, lines); SEToFile(P, outputImage); } @@ -93,7 +93,7 @@ itkFlatStructuringElementTest3(int argc, char * argv[]) { using SE3Type = itk::FlatStructuringElement<3>; - auto r3 = itk::MakeFilled(radius); + auto r3 = itk::MakeFilled(radius); const SE3Type P = SE3Type::Polygon(r3, lines); SEToFile(P, outputImage); } diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionDilateImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionDilateImageFilterTest.cxx index 67054cd6e89..1394fc76da7 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionDilateImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionDilateImageFilterTest.cxx @@ -125,7 +125,7 @@ itkGrayscaleFunctionDilateImageFilterTest(int argc, char * argv[]) const itk::SimpleFilterWatcher filterWatcher(filter); // Create the structuring element - myKernelType ball; + myKernelType ball; myKernelType::SizeType ballSize; ballSize[0] = 1; ballSize[1] = 4; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionErodeImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionErodeImageFilterTest.cxx index 4a756e55d01..0734499a2ca 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionErodeImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionErodeImageFilterTest.cxx @@ -125,7 +125,7 @@ itkGrayscaleFunctionErodeImageFilterTest(int argc, char * argv[]) const itk::SimpleFilterWatcher watcher(filter, "filter"); // Create the structuring element - myKernelType ball; + myKernelType ball; myKernelType::SizeType ballSize; ballSize[0] = 1; ballSize[1] = 4; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest.cxx index 224c8f9e6c5..fe301fa34c0 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalClosingImageFilterTest.cxx @@ -76,7 +76,7 @@ itkGrayscaleMorphologicalClosingImageFilterTest(int argc, char * argv[]) writer->SetInput(filter->GetOutput()); // Create the structuring element - KernelType ball; + KernelType ball; KernelType::SizeType ballSize; ballSize[0] = 2; ballSize[1] = 2; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest.cxx index 22811fa9b1b..620cd820186 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleMorphologicalOpeningImageFilterTest.cxx @@ -76,7 +76,7 @@ itkGrayscaleMorphologicalOpeningImageFilterTest(int argc, char * argv[]) writer->SetInput(filter->GetOutput()); // Create the structuring element - KernelType ball; + KernelType ball; KernelType::SizeType ballSize; ballSize[0] = 2; ballSize[1] = 2; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMapMaskedRankImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMapMaskedRankImageFilterTest.cxx index 048459ff17a..958e1106488 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMapMaskedRankImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMapMaskedRankImageFilterTest.cxx @@ -49,7 +49,7 @@ itkMapMaskedRankImageFilterTest(int argc, char * argv[]) // Create a filter using SEType = itk::FlatStructuringElement<2>; using FilterType = itk::MaskedRankImageFilter; - auto filter = FilterType::New(); + auto filter = FilterType::New(); const itk::SimpleFilterWatcher filterWatch(filter); using RadiusType = FilterType::RadiusType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMapRankImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMapRankImageFilterTest.cxx index 206c08e8973..2c2d7ed0c74 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMapRankImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMapRankImageFilterTest.cxx @@ -46,7 +46,7 @@ itkMapRankImageFilterTest(int argc, char * argv[]) using SEType = itk::FlatStructuringElement<2>; using FilterType = itk::RankImageFilter; - auto filter = FilterType::New(); + auto filter = FilterType::New(); const itk::SimpleFilterWatcher filterWatch(filter); using RadiusType = FilterType::RadiusType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMaskedRankImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMaskedRankImageFilterTest.cxx index ca750771f37..bf57e0de9b2 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMaskedRankImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMaskedRankImageFilterTest.cxx @@ -48,7 +48,7 @@ itkMaskedRankImageFilterTest(int argc, char * argv[]) // Create a filter using FilterType = itk::MaskedRankImageFilter; - auto filter = FilterType::New(); + auto filter = FilterType::New(); const itk::SimpleFilterWatcher filterWatch(filter); using RadiusType = FilterType::RadiusType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkMorphologicalGradientImageFilterTest2.cxx b/Modules/Filtering/MathematicalMorphology/test/itkMorphologicalGradientImageFilterTest2.cxx index 18d22f7b28f..918f2cee950 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkMorphologicalGradientImageFilterTest2.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkMorphologicalGradientImageFilterTest2.cxx @@ -76,7 +76,7 @@ itkMorphologicalGradientImageFilterTest2(int argc, char * argv[]) using SRType = itk::FlatStructuringElement; - auto elementRadius = itk::MakeFilled(4); + auto elementRadius = itk::MakeFilled(4); const SRType structuringElement2 = SRType::Box(elementRadius); using Gradient1Type = itk::MorphologicalGradientImageFilter; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkObjectMorphologyImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkObjectMorphologyImageFilterTest.cxx index 4b28f27bda1..bbe8482d64e 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkObjectMorphologyImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkObjectMorphologyImageFilterTest.cxx @@ -126,7 +126,7 @@ itkObjectMorphologyImageFilterTest(int, char *[]) auto binErodeFilter = binErodeFilterType::New(); // Create the structuring element - myKernelType ball; + myKernelType ball; myKernelType::SizeType ballSize; ballSize[0] = 5; ballSize[1] = 4; @@ -141,7 +141,7 @@ itkObjectMorphologyImageFilterTest(int, char *[]) myImageType::Pointer outputImage = dilateFilter->GetOutput(); clock_t start, end; - double elapsedTime; + double elapsedTime; // Execute the filter std::cout << "Object Dilate..." << std::endl; @@ -194,7 +194,7 @@ itkObjectMorphologyImageFilterTest(int, char *[]) { std::cerr << "Error: Dilated images differ!" << std::endl; std::cerr << " Slice = " << count / (size[1] * size[0]) << std::endl; - unsigned int x, y; + unsigned int x, y; itk::Index<3> i; i[2] = count / (size[1] * size[0]); for (y = 0; y < size[1]; ++y) @@ -282,7 +282,7 @@ itkObjectMorphologyImageFilterTest(int, char *[]) std::cout << " Please see documentation - ErodeObject and BinaryErode"; std::cout << std::endl << " produce different results" << std::endl; std::cout << " Slice = " << count / (size[1] * size[0]) << std::endl; - unsigned int x, y; + unsigned int x, y; itk::Index<3> i; i[2] = count / (size[1] * size[0]); for (y = 0; y < size[1]; ++y) diff --git a/Modules/Filtering/MathematicalMorphology/test/itkOpeningByReconstructionImageFilterTest2.cxx b/Modules/Filtering/MathematicalMorphology/test/itkOpeningByReconstructionImageFilterTest2.cxx index 13736aed272..8776ec1ae80 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkOpeningByReconstructionImageFilterTest2.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkOpeningByReconstructionImageFilterTest2.cxx @@ -56,8 +56,8 @@ itkOpeningByReconstructionImageFilterTest2(int argc, char * argv[]) auto inputImage = InputImageType::New(); // Define regions of input image - RegionType region; - auto size = SizeType::Filled(std::stoi(argv[2])); + RegionType region; + auto size = SizeType::Filled(std::stoi(argv[2])); constexpr IndexType index{}; region.SetSize(size); region.SetIndex(index); diff --git a/Modules/Filtering/MathematicalMorphology/test/itkRankImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkRankImageFilterTest.cxx index 30ad90d06e8..c750673617d 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkRankImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkRankImageFilterTest.cxx @@ -44,7 +44,7 @@ itkRankImageFilterTest(int argc, char * argv[]) // Create a filter using FilterType = itk::RankImageFilter; - auto filter = FilterType::New(); + auto filter = FilterType::New(); const itk::SimpleFilterWatcher filterWatch(filter); using RadiusType = FilterType::RadiusType; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkRegionalMaximaImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkRegionalMaximaImageFilterTest.cxx index 6ba052747a0..58639c1869e 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkRegionalMaximaImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkRegionalMaximaImageFilterTest.cxx @@ -30,8 +30,8 @@ int RegionalMaximaImageFilterTestHelper(std::string inputImageFile, std::string outputImageFile, std::string outputImageFile2, - bool fullyConnected, - bool flatIsMaxima) + bool fullyConnected, + bool flatIsMaxima) { using InputImageType = TInputImage; using OutputImageType = TInputImage; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkRegionalMinimaImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkRegionalMinimaImageFilterTest.cxx index 2d8152ca3e6..9f75c0a9586 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkRegionalMinimaImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkRegionalMinimaImageFilterTest.cxx @@ -30,8 +30,8 @@ int RegionalMinimaImageFilterTestHelper(std::string inputImageFile, std::string outputImageFile, std::string outputImageFile2, - bool fullyConnected, - bool flatIsMinima) + bool fullyConnected, + bool flatIsMinima) { using InputImageType = TInputImage; using OutputImageType = TInputImage; diff --git a/Modules/Filtering/MathematicalMorphology/test/itkTopHatImageFilterTest.cxx b/Modules/Filtering/MathematicalMorphology/test/itkTopHatImageFilterTest.cxx index 15fc22ceeea..8909c7ef0dc 100644 --- a/Modules/Filtering/MathematicalMorphology/test/itkTopHatImageFilterTest.cxx +++ b/Modules/Filtering/MathematicalMorphology/test/itkTopHatImageFilterTest.cxx @@ -28,13 +28,13 @@ template int -itkTopHatImageFilterTestHelper(TKernelImageFilter * filter, - typename TKernelImageFilter::KernelType ball, - const bool safeBorder, +itkTopHatImageFilterTestHelper(TKernelImageFilter * filter, + typename TKernelImageFilter::KernelType ball, + const bool safeBorder, const itk::MathematicalMorphologyEnums::Algorithm algorithm, - const bool forceAlgorithm, - const char * inputFileName, - const char * outputFileName) + const bool forceAlgorithm, + const char * inputFileName, + const char * outputFileName) { // Declare the reader and writer using ReaderType = itk::ImageFileReader; @@ -106,16 +106,16 @@ itkTopHatImageFilterTest(int argc, char * argv[]) const char * outputFileName = argv[2]; // Create the structuring element - KernelType ball; + KernelType ball; KernelType::SizeType ballSize; ballSize[0] = std::stoi(argv[4]); ballSize[1] = std::stoi(argv[4]); ball.SetRadius(ballSize); ball.CreateStructuringElement(); - auto safeBorder = static_cast(std::stoi(argv[5])); + auto safeBorder = static_cast(std::stoi(argv[5])); itk::MathematicalMorphologyEnums::Algorithm algorithm; - auto forceAlgorithm = static_cast(std::stoi(argv[7])); + auto forceAlgorithm = static_cast(std::stoi(argv[7])); int testStatus = EXIT_SUCCESS; diff --git a/Modules/Filtering/Path/include/itkChainCodePath.h b/Modules/Filtering/Path/include/itkChainCodePath.h index 01fc0582372..4632f6d18e7 100644 --- a/Modules/Filtering/Path/include/itkChainCodePath.h +++ b/Modules/Filtering/Path/include/itkChainCodePath.h @@ -157,7 +157,7 @@ class ITK_TEMPLATE_EXPORT ChainCodePath : public Path void ChainCodeToFourierSeriesPathFilter::GenerateData() { - IndexType index; - VectorType indexVector; - VectorType cosCoefficient; - VectorType sinCoefficient; + IndexType index; + VectorType indexVector; + VectorType cosCoefficient; + VectorType sinCoefficient; OutputPathInputType theta; - size_t numSteps; + size_t numSteps; unsigned int numHarmonics = m_NumberOfHarmonics; // private copy - const int dimension = OffsetType::GetOffsetDimension(); + const int dimension = OffsetType::GetOffsetDimension(); const typename Superclass::InputPathConstPointer inputPtr = this->GetInput(); - const typename Superclass::OutputPathPointer outputPtr = this->GetOutput(0); + const typename Superclass::OutputPathPointer outputPtr = this->GetOutput(0); // outputPtr->SetRequestedRegion( inputPtr->GetRequestedRegion() ); // outputPtr->SetBufferedRegion( inputPtr->GetBufferedRegion() ); diff --git a/Modules/Filtering/Path/include/itkContourExtractor2DImageFilter.h b/Modules/Filtering/Path/include/itkContourExtractor2DImageFilter.h index 8f089fd3939..1c01d6759cb 100644 --- a/Modules/Filtering/Path/include/itkContourExtractor2DImageFilter.h +++ b/Modules/Filtering/Path/include/itkContourExtractor2DImageFilter.h @@ -214,11 +214,11 @@ class ITK_TEMPLATE_EXPORT ContourExtractor2DImageFilter using LabelsConstIterator = typename LabelsContainer::const_iterator; using LabelsIterator = typename LabelsContainer::iterator; - InputRealType m_ContourValue{}; - bool m_ReverseContourOrientation{}; - bool m_VertexConnectHighPixels{}; - bool m_LabelContours{}; - bool m_UseCustomRegion{}; + InputRealType m_ContourValue{}; + bool m_ReverseContourOrientation{}; + bool m_VertexConnectHighPixels{}; + bool m_LabelContours{}; + bool m_UseCustomRegion{}; InputRegionType m_RequestedRegion{}; // Represent each contour as deque of vertices to facilitate addition of @@ -278,10 +278,10 @@ class ITK_TEMPLATE_EXPORT ContourExtractor2DImageFilter // Subroutine to create contours for a single label. void - CreateSingleContour(InputPixelType label, + CreateSingleContour(InputPixelType label, const InputImageType * input, - const InputRegionType usableRegion, - SizeValueType totalNumberOfPixels, + const InputRegionType usableRegion, + SizeValueType totalNumberOfPixels, ContourContainerType & contoursOutput); // Subroutine to handle the case that the supplied values are @@ -290,24 +290,24 @@ class ITK_TEMPLATE_EXPORT ContourExtractor2DImageFilter GenerateDataForLabels(); VertexType - InterpolateContourPosition(InputPixelType fromValue, - InputPixelType toValue, - InputIndexType fromIndex, + InterpolateContourPosition(InputPixelType fromValue, + InputPixelType toValue, + InputIndexType fromIndex, InputOffsetType toOffset); struct ContourData { - ContourContainerType m_Contours; + ContourContainerType m_Contours; VertexToContourContainerIteratorMap m_ContourStarts; VertexToContourContainerIteratorMap m_ContourEnds; - SizeValueType m_NumberOfContoursCreated = 0; + SizeValueType m_NumberOfContoursCreated = 0; }; void AddSegment(const VertexType from, const VertexType to, ContourData & contourData); void - FillOutputs(const std::vector & allLabels, + FillOutputs(const std::vector & allLabels, std::unordered_map & labelsContoursOutput); InputPixelType m_UnusedLabel{}; diff --git a/Modules/Filtering/Path/include/itkContourExtractor2DImageFilter.hxx b/Modules/Filtering/Path/include/itkContourExtractor2DImageFilter.hxx index 192de338669..26dcacbb292 100644 --- a/Modules/Filtering/Path/include/itkContourExtractor2DImageFilter.hxx +++ b/Modules/Filtering/Path/include/itkContourExtractor2DImageFilter.hxx @@ -53,18 +53,18 @@ ContourExtractor2DImageFilter::GenerateData() else // simple case of a single iso-value { const InputImageType * const input{ this->GetInput() }; - const InputRegionType region{ input->GetRequestedRegion() }; + const InputRegionType region{ input->GetRequestedRegion() }; // Compute a shrunkRegion: we don't want the 3-by-3 SquareIterator // to be centered in the bottom row or right column because then // its lower-right 2-by-2 sub-square won't be wholly within the // region. - const InputSizeType shrunkSize{ { region.GetSize()[0] - 1, region.GetSize()[1] - 1 } }; + const InputSizeType shrunkSize{ { region.GetSize()[0] - 1, region.GetSize()[1] - 1 } }; const InputRegionType shrunkRegion{ region.GetIndex(), shrunkSize }; // Since we are comparing to m_ContourValue, we don't care what label is supplied // as the first argument of CreateSingleContour. const InputPixelType label{ NumericTraits::Zero }; - LabelsContainer allLabels; + LabelsContainer allLabels; allLabels.push_back(label); std::unordered_map labelsContoursOutput; labelsContoursOutput[label] = ContourContainerType{}; @@ -77,10 +77,10 @@ ContourExtractor2DImageFilter::GenerateData() template void -ContourExtractor2DImageFilter::CreateSingleContour(InputPixelType label, +ContourExtractor2DImageFilter::CreateSingleContour(InputPixelType label, const InputImageType * input, - const InputRegionType usableRegion, - SizeValueType totalNumberOfPixels, + const InputRegionType usableRegion, + SizeValueType totalNumberOfPixels, ContourContainerType & contoursOutput) { TotalProgressReporter progress(this, totalNumberOfPixels); @@ -147,7 +147,7 @@ ContourExtractor2DImageFilter::CreateSingleContour(InputPixelType // 01 is numbered as 45 // 23 78 - unsigned char squareCase{ 0 }; + unsigned char squareCase{ 0 }; InputPixelType v0; InputPixelType v1; InputPixelType v2; @@ -278,9 +278,9 @@ ContourExtractor2DImageFilter::GenerateDataForLabels() // We want to make use of ConstantBoundaryCondition, which works // with *images*, but use it with the input *region*. So, we copy // the region to be its own image if necessary. - InputImagePointer inputGC{ nullptr }; + InputImagePointer inputGC{ nullptr }; const InputImageType * input{ this->GetInput() }; - const InputRegionType inputRegion{ input->GetRequestedRegion() }; + const InputRegionType inputRegion{ input->GetRequestedRegion() }; // We can remove this if statement and its contents once a Policy (e.g., // itk::ConstantBoundaryImageNeighborhoodPixelAccessPolicy) can support constant values outside of the // region (rather than merely outside of the image). @@ -289,7 +289,7 @@ ContourExtractor2DImageFilter::GenerateDataForLabels() inputGC = InputImageType::New(); inputGC->SetRegions(inputRegion); inputGC->Allocate(); - const RegionRange inputRange{ *inputGC, inputRegion }; + const RegionRange inputRange{ *inputGC, inputRegion }; const RegionConstRange originalRange{ *this->GetInput(), inputRegion }; std::copy(originalRange.cbegin(), originalRange.cend(), inputRange.begin()); input = static_cast(inputGC); @@ -297,7 +297,7 @@ ContourExtractor2DImageFilter::GenerateDataForLabels() // Find all the distinct labels in the input region. const RegionConstRange inputRange{ *input, inputRegion }; - LabelsContainer allLabels; + LabelsContainer allLabels; { allLabels.assign(inputRange.cbegin(), inputRange.cend()); std::sort(allLabels.begin(), allLabels.end()); @@ -332,9 +332,9 @@ ContourExtractor2DImageFilter::GenerateDataForLabels() // ranges in each coordinate, not [inclusive, exclusive). Then we will convert // them to regions with the usual conventions. We will also create space for the // threads to return their contours. - std::unordered_map labelsRegions; + std::unordered_map labelsRegions; std::unordered_map labelsContoursOutput; - SizeValueType totalPixelCount{ 0 }; + SizeValueType totalPixelCount{ 0 }; { struct BoundingBoxType { @@ -372,9 +372,9 @@ ContourExtractor2DImageFilter::GenerateDataForLabels() // the region; for example, a label that exists at only one pixel location // will need its 3-by-3 SquareIterator to traverse 4 pixels rather than // all 9 pixels of the extended region. - const InputIndexType extendedIndex{ { bbox.min[0] - 1, bbox.min[1] - 1 } }; - const InputSizeType extendedSize{ { static_cast(bbox.max[0] - bbox.min[0]) + 2, - static_cast(bbox.max[1] - bbox.min[1]) + 2 } }; + const InputIndexType extendedIndex{ { bbox.min[0] - 1, bbox.min[1] - 1 } }; + const InputSizeType extendedSize{ { static_cast(bbox.max[0] - bbox.min[0]) + 2, + static_cast(bbox.max[1] - bbox.min[1]) + 2 } }; const InputRegionType extendedRegion{ extendedIndex, extendedSize }; totalPixelCount += extendedRegion.GetNumberOfPixels(); labelsRegions[label] = extendedRegion; @@ -398,9 +398,9 @@ ContourExtractor2DImageFilter::GenerateDataForLabels() template inline auto -ContourExtractor2DImageFilter::InterpolateContourPosition(InputPixelType fromValue, - InputPixelType toValue, - InputIndexType fromIndex, +ContourExtractor2DImageFilter::InterpolateContourPosition(InputPixelType fromValue, + InputPixelType toValue, + InputIndexType fromIndex, InputOffsetType toOffset) -> VertexType { // Now calculate the fraction of the way from 'from' to 'to' that the contour @@ -417,7 +417,7 @@ ContourExtractor2DImageFilter::InterpolateContourPosition(InputPixe const double x{ m_LabelContours ? 0.5 : (m_ContourValue - static_cast(fromValue)) / (toValue - static_cast(fromValue)) }; - VertexType output; + VertexType output; output[0] = fromIndex[0] + x * toOffset[0]; output[1] = fromIndex[1] + x * toOffset[1]; return output; @@ -561,7 +561,7 @@ ContourExtractor2DImageFilter::AddSegment(VertexType from, VertexTy template void ContourExtractor2DImageFilter::FillOutputs( - const LabelsContainer & allLabels, + const LabelsContainer & allLabels, std::unordered_map & labelsContoursOutput) { ContourContainerType allContours; diff --git a/Modules/Filtering/Path/include/itkExtractOrthogonalSwath2DImageFilter.h b/Modules/Filtering/Path/include/itkExtractOrthogonalSwath2DImageFilter.h index 1fac25b1f0b..69ef1cd1d47 100644 --- a/Modules/Filtering/Path/include/itkExtractOrthogonalSwath2DImageFilter.h +++ b/Modules/Filtering/Path/include/itkExtractOrthogonalSwath2DImageFilter.h @@ -166,9 +166,9 @@ class ITK_TEMPLATE_EXPORT ExtractOrthogonalSwath2DImageFilter private: ImagePixelType m_DefaultPixelValue{}; - SizeType m_Size{}; - double m_Origin[ImageDimension]{}; - double m_Spacing[ImageDimension]{}; + SizeType m_Size{}; + double m_Origin[ImageDimension]{}; + double m_Spacing[ImageDimension]{}; }; } // end namespace itk diff --git a/Modules/Filtering/Path/include/itkExtractOrthogonalSwath2DImageFilter.hxx b/Modules/Filtering/Path/include/itkExtractOrthogonalSwath2DImageFilter.hxx index 9a8d127e8c1..eb1151ddcfc 100644 --- a/Modules/Filtering/Path/include/itkExtractOrthogonalSwath2DImageFilter.hxx +++ b/Modules/Filtering/Path/include/itkExtractOrthogonalSwath2DImageFilter.hxx @@ -150,8 +150,8 @@ void ExtractOrthogonalSwath2DImageFilter::GenerateData() { const ImageConstPointer inputImagePtr = this->GetImageInput(); - const PathConstPointer inputPathPtr = this->GetPathInput(); - const ImagePointer outputPtr = this->GetOutput(0); + const PathConstPointer inputPathPtr = this->GetPathInput(); + const ImagePointer outputPtr = this->GetOutput(0); // Generate the output image const ImageRegionType outputRegion = outputPtr->GetRequestedRegion(); @@ -165,11 +165,11 @@ ExtractOrthogonalSwath2DImageFilter::GenerateData() using OutputIterator = ImageRegionIteratorWithIndex; using InterpolatorType = LinearInterpolateImageFunction; - ImageIndexType index; - double orthogonalOffset; - PathInputType pathInput; + ImageIndexType index; + double orthogonalOffset; + PathInputType pathInput; ContinuousIndex continousIndex; - PathVectorType pathDerivative; + PathVectorType pathDerivative; auto interpolator = InterpolatorType::New(); interpolator->SetInputImage(inputImagePtr); diff --git a/Modules/Filtering/Path/include/itkFourierSeriesPath.hxx b/Modules/Filtering/Path/include/itkFourierSeriesPath.hxx index e01633d5f0f..d383e025bd8 100644 --- a/Modules/Filtering/Path/include/itkFourierSeriesPath.hxx +++ b/Modules/Filtering/Path/include/itkFourierSeriesPath.hxx @@ -26,9 +26,9 @@ template auto FourierSeriesPath::Evaluate(const InputType & input) const -> OutputType { - InputType theta; + InputType theta; OutputType output; - const int numHarmonics = m_CosCoefficients->Size(); + const int numHarmonics = m_CosCoefficients->Size(); output.Fill(0); const double PI = 4.0 * std::atan(1.0); @@ -53,9 +53,9 @@ template auto FourierSeriesPath::EvaluateDerivative(const InputType & input) const -> VectorType { - InputType theta; + InputType theta; VectorType output; - const int numHarmonics = m_CosCoefficients->Size(); + const int numHarmonics = m_CosCoefficients->Size(); output.Fill(0); const double PI = 4.0 * std::atan(1.0); diff --git a/Modules/Filtering/Path/include/itkHilbertPath.h b/Modules/Filtering/Path/include/itkHilbertPath.h index d8e2e08bbbd..1b1657af67c 100644 --- a/Modules/Filtering/Path/include/itkHilbertPath.h +++ b/Modules/Filtering/Path/include/itkHilbertPath.h @@ -202,7 +202,7 @@ class ITK_TEMPLATE_EXPORT HilbertPath : public Path::TransformPathIndexToMultiDimensionalIndex( for (PathIndexType i = 0; i < this->m_HilbertOrder; ++i) { const PathIndexType w = this->GetBitRange(id, Dimension * this->m_HilbertOrder, i * Dimension, (i + 1) * Dimension); - PathIndexType l = this->GetGrayCode(w); + PathIndexType l = this->GetGrayCode(w); l = this->GetInverseTransform(e, d, Dimension, l); for (PathIndexType j = 0; j < Dimension; ++j) { diff --git a/Modules/Filtering/Path/include/itkOrthogonalSwath2DPathFilter.hxx b/Modules/Filtering/Path/include/itkOrthogonalSwath2DPathFilter.hxx index e5b90084bc7..3d33aff60ac 100644 --- a/Modules/Filtering/Path/include/itkOrthogonalSwath2DPathFilter.hxx +++ b/Modules/Filtering/Path/include/itkOrthogonalSwath2DPathFilter.hxx @@ -115,8 +115,8 @@ OrthogonalSwath2DPathFilter::GenerateData() // end of triple for-loop covering x & F & L // Find the best starting and ending points (F & L) for the path - int bestF = 0; - int bestL = 0; + int bestF = 0; + int bestL = 0; double meritMax = NumericTraits::NonpositiveMin(); for (unsigned int F = 0; F < m_SwathSize[1]; ++F) { diff --git a/Modules/Filtering/Path/include/itkOrthogonallyCorrected2DParametricPath.h b/Modules/Filtering/Path/include/itkOrthogonallyCorrected2DParametricPath.h index 0d74f852ebb..c8e17a1e7cc 100644 --- a/Modules/Filtering/Path/include/itkOrthogonallyCorrected2DParametricPath.h +++ b/Modules/Filtering/Path/include/itkOrthogonallyCorrected2DParametricPath.h @@ -121,7 +121,7 @@ class ITK_TEMPLATE_EXPORT OrthogonallyCorrected2DParametricPath : public Paramet PrintSelf(std::ostream & os, Indent indent) const override; private: - OriginalPathConstPointer m_OriginalPath{}; + OriginalPathConstPointer m_OriginalPath{}; OrthogonalCorrectionTablePointer m_OrthogonalCorrectionTable{}; }; } // namespace itk diff --git a/Modules/Filtering/Path/include/itkParametricPath.hxx b/Modules/Filtering/Path/include/itkParametricPath.hxx index a158723fb33..0008511071a 100644 --- a/Modules/Filtering/Path/include/itkParametricPath.hxx +++ b/Modules/Filtering/Path/include/itkParametricPath.hxx @@ -34,7 +34,7 @@ auto ParametricPath::EvaluateToIndex(const InputType & input) const -> IndexType { ContinuousIndexType continuousIndex; - IndexType index; + IndexType index; continuousIndex = this->Evaluate(input); @@ -51,15 +51,15 @@ template auto ParametricPath::IncrementInput(InputType & input) const -> OffsetType { - int iterationCount; - bool tooSmall; - bool tooBig; - InputType inputStepSize; - InputType finalInputValue; + int iterationCount; + bool tooSmall; + bool tooBig; + InputType inputStepSize; + InputType finalInputValue; OffsetType offset; - IndexType currentImageIndex; - IndexType nextImageIndex; - IndexType finalImageIndex; + IndexType currentImageIndex; + IndexType nextImageIndex; + IndexType finalImageIndex; iterationCount = 0; inputStepSize = m_DefaultInputStepSize; diff --git a/Modules/Filtering/Path/include/itkPath.h b/Modules/Filtering/Path/include/itkPath.h index 30f3e936bad..234f1682804 100644 --- a/Modules/Filtering/Path/include/itkPath.h +++ b/Modules/Filtering/Path/include/itkPath.h @@ -128,7 +128,7 @@ class ITK_TEMPLATE_EXPORT Path : public DataObject private: // These "constants" are initialized in the constructor OffsetType m_ZeroOffset{}; // = 0 for all dimensions - IndexType m_ZeroIndex{}; // = 0 for all dimensions + IndexType m_ZeroIndex{}; // = 0 for all dimensions }; } // namespace itk diff --git a/Modules/Filtering/Path/include/itkPathFunctions.h b/Modules/Filtering/Path/include/itkPathFunctions.h index 819316aa953..1b6fb5f3c49 100644 --- a/Modules/Filtering/Path/include/itkPathFunctions.h +++ b/Modules/Filtering/Path/include/itkPathFunctions.h @@ -76,9 +76,9 @@ MakeChainCodeTracePath(TChainCodePath & chainPath, const TPathInput & inPath, bo * 2 harmonics will be calculated. */ template void -MakeFourierSeriesPathTraceChainCode(TFourierSeriesPath & FSPath, +MakeFourierSeriesPathTraceChainCode(TFourierSeriesPath & FSPath, const TChainCodePath & chainPath, - unsigned int numHarmonics = 8) + unsigned int numHarmonics = 8) { using IndexType = typename TFourierSeriesPath::IndexType; using OffsetType = typename TFourierSeriesPath::OffsetType; @@ -87,7 +87,7 @@ MakeFourierSeriesPathTraceChainCode(TFourierSeriesPath & FSPath, using FSInputType = typename TFourierSeriesPath::InputType; using ChainInputType = typename TChainCodePath::InputType; - const int dimension = OffsetType::GetOffsetDimension(); + const int dimension = OffsetType::GetOffsetDimension(); const size_t numSteps = chainPath.NumberOfSteps(); const double PI = 4.0 * std::atan(1.0); @@ -106,7 +106,7 @@ MakeFourierSeriesPathTraceChainCode(TFourierSeriesPath & FSPath, for (unsigned int n = 0; n < numHarmonics; ++n) { - IndexType index = chainPath.GetStart(); + IndexType index = chainPath.GetStart(); VectorType cosCoefficient{}; VectorType sinCoefficient{}; diff --git a/Modules/Filtering/Path/include/itkPathToChainCodePathFilter.hxx b/Modules/Filtering/Path/include/itkPathToChainCodePathFilter.hxx index 93bbde85ce2..e09060ff205 100644 --- a/Modules/Filtering/Path/include/itkPathToChainCodePathFilter.hxx +++ b/Modules/Filtering/Path/include/itkPathToChainCodePathFilter.hxx @@ -33,8 +33,8 @@ template void PathToChainCodePathFilter::GenerateData() { - OffsetType offset; - OffsetType tempOffset; + OffsetType offset; + OffsetType tempOffset; constexpr OffsetType zeroOffset{}; InputPathInputType inputPathInput; @@ -42,7 +42,7 @@ PathToChainCodePathFilter::GenerateData() const int dimension = OffsetType::GetOffsetDimension(); const typename Superclass::InputPathConstPointer inputPtr = this->GetInput(); - const typename Superclass::OutputPathPointer outputPtr = this->GetOutput(0); + const typename Superclass::OutputPathPointer outputPtr = this->GetOutput(0); // outputPtr->SetRequestedRegion( inputPtr->GetRequestedRegion() ); // outputPtr->SetBufferedRegion( inputPtr->GetBufferedRegion() ); diff --git a/Modules/Filtering/Path/include/itkPathToImageFilter.h b/Modules/Filtering/Path/include/itkPathToImageFilter.h index f2081bb181a..4866087b627 100644 --- a/Modules/Filtering/Path/include/itkPathToImageFilter.h +++ b/Modules/Filtering/Path/include/itkPathToImageFilter.h @@ -125,9 +125,9 @@ class ITK_TEMPLATE_EXPORT PathToImageFilter : public ImageSource void GenerateData() override; - SizeType m_Size{}; - double m_Spacing[OutputImageDimension]{}; - double m_Origin[OutputImageDimension]{}; + SizeType m_Size{}; + double m_Spacing[OutputImageDimension]{}; + double m_Origin[OutputImageDimension]{}; ValueType m_PathValue{}; ValueType m_BackgroundValue{}; diff --git a/Modules/Filtering/Path/include/itkPathToImageFilter.hxx b/Modules/Filtering/Path/include/itkPathToImageFilter.hxx index 11755443d54..57527876d11 100644 --- a/Modules/Filtering/Path/include/itkPathToImageFilter.hxx +++ b/Modules/Filtering/Path/include/itkPathToImageFilter.hxx @@ -189,11 +189,11 @@ PathToImageFilter::GenerateData() itkDebugMacro("PathToImageFilter::GenerateData() called"); // Get the input and output pointers - const InputPathType * InputPath = this->GetInput(); + const InputPathType * InputPath = this->GetInput(); const OutputImagePointer OutputImage = this->GetOutput(); // Generate the image - double origin[OutputImageDimension]; + double origin[OutputImageDimension]; SizeType size; for (i = 0; i < OutputImageDimension; ++i) diff --git a/Modules/Filtering/Path/include/itkPolyLineParametricPath.hxx b/Modules/Filtering/Path/include/itkPolyLineParametricPath.hxx index 09826e07e29..0db67c43927 100644 --- a/Modules/Filtering/Path/include/itkPolyLineParametricPath.hxx +++ b/Modules/Filtering/Path/include/itkPolyLineParametricPath.hxx @@ -88,13 +88,13 @@ PolyLineParametricPath::IncrementInput(InputType & input) const -> O const IndexType originalIndex = this->EvaluateToIndex(input); InputType potentialTimestep{}; - bool timeStepSmallEnough = false; + bool timeStepSmallEnough = false; while (!timeStepSmallEnough) { if (Math::ExactlyEquals(input, this->EndOfInput())) { const IndexType finalIndex = this->EvaluateToIndex(this->EndOfInput()); - OffsetType finalOffset; + OffsetType finalOffset; for (unsigned int i = 0; i < VDimension; ++i) { finalOffset[i] = finalIndex[i] - originalIndex[i]; diff --git a/Modules/Filtering/Path/src/itkOrthogonallyCorrected2DParametricPath.cxx b/Modules/Filtering/Path/src/itkOrthogonallyCorrected2DParametricPath.cxx index d70659acef7..1d232fec570 100644 --- a/Modules/Filtering/Path/src/itkOrthogonallyCorrected2DParametricPath.cxx +++ b/Modules/Filtering/Path/src/itkOrthogonallyCorrected2DParametricPath.cxx @@ -38,7 +38,7 @@ OrthogonallyCorrected2DParametricPath::Evaluate(const InputType & inputValue) co const InputType inputRange = m_OriginalPath->EndOfInput() - m_OriginalPath->StartOfInput(); const InputType normalizedInput = (input - m_OriginalPath->StartOfInput()) / inputRange; - OutputType output{}; + OutputType output{}; // Find the linearly interpolated offset error value for this exact time. const double softOrthogonalCorrectionTableIndex = normalizedInput * numOrthogonalCorrections; diff --git a/Modules/Filtering/Path/test/itkChainCodePath2DTest.cxx b/Modules/Filtering/Path/test/itkChainCodePath2DTest.cxx index 5eec9bf6623..87f68db64ed 100644 --- a/Modules/Filtering/Path/test/itkChainCodePath2DTest.cxx +++ b/Modules/Filtering/Path/test/itkChainCodePath2DTest.cxx @@ -29,7 +29,7 @@ itkChainCodePath2DTest(int, char *[]) bool passed = true; - IndexType index; + IndexType index; OffsetType offset; auto path = PathType::New(); diff --git a/Modules/Filtering/Path/test/itkChainCodePathTest.cxx b/Modules/Filtering/Path/test/itkChainCodePathTest.cxx index b5f79e78213..a84e0679984 100644 --- a/Modules/Filtering/Path/test/itkChainCodePathTest.cxx +++ b/Modules/Filtering/Path/test/itkChainCodePathTest.cxx @@ -31,7 +31,7 @@ itkChainCodePathTest(int, char *[]) bool passed = true; - IndexType index; + IndexType index; OffsetType offset; auto path = PathType::New(); diff --git a/Modules/Filtering/Path/test/itkContourExtractor2DImageFilterTest.cxx b/Modules/Filtering/Path/test/itkContourExtractor2DImageFilterTest.cxx index af6a9f2299e..11f74b86582 100644 --- a/Modules/Filtering/Path/test/itkContourExtractor2DImageFilterTest.cxx +++ b/Modules/Filtering/Path/test/itkContourExtractor2DImageFilterTest.cxx @@ -456,7 +456,7 @@ static itkContourExtractor2DImageFilterTestNamespace::MyVertexListList expected_ void ShowExtractorAsVariables(itkContourExtractor2DImageFilterTestNamespace::ExtractorType::Pointer extractor, - std::string name) + std::string name) { for (unsigned long i = 0; i < extractor->GetNumberOfIndexedOutputs(); ++i) { @@ -493,8 +493,8 @@ showRegion(const itkContourExtractor2DImageFilterTestNamespace::ImageType::Const using SizeValueType = itkContourExtractor2DImageFilterTestNamespace::ImageType::RegionType::SizeType::SizeValueType; using RegionConstIterator = itk::ImageRegionConstIterator; - const RegionType toshowRegion{ toshowImage->GetRequestedRegion() }; - const SizeType toshowSize = toshowRegion.GetSize(); + const RegionType toshowRegion{ toshowImage->GetRequestedRegion() }; + const SizeType toshowSize = toshowRegion.GetSize(); RegionConstIterator it{ toshowImage, toshowRegion }; std::cout << " --> "; @@ -517,7 +517,7 @@ showRegion(const itkContourExtractor2DImageFilterTestNamespace::ImageType::Const bool HasCorrectOutput(itkContourExtractor2DImageFilterTestNamespace::ExtractorType::Pointer extractor, - itkContourExtractor2DImageFilterTestNamespace::MyVertexListList & correct) + itkContourExtractor2DImageFilterTestNamespace::MyVertexListList & correct) { if (extractor->GetNumberOfIndexedOutputs() != correct.size()) { diff --git a/Modules/Filtering/Path/test/itkExtractOrthogonalSwath2DImageFilterTest.cxx b/Modules/Filtering/Path/test/itkExtractOrthogonalSwath2DImageFilterTest.cxx index 56ec6d84aaf..bed52b4ca81 100644 --- a/Modules/Filtering/Path/test/itkExtractOrthogonalSwath2DImageFilterTest.cxx +++ b/Modules/Filtering/Path/test/itkExtractOrthogonalSwath2DImageFilterTest.cxx @@ -54,7 +54,7 @@ itkExtractOrthogonalSwath2DImageFilterTest(int argc, char * argv[]) // Set up the image std::cout << "Making a 64x64 white square centered in a 128x128 black image" << std::endl; - auto inputImage = ImageType::New(); + auto inputImage = ImageType::New(); IndexType start; start[0] = 0; start[1] = 0; diff --git a/Modules/Filtering/Path/test/itkFourierSeriesPathTest.cxx b/Modules/Filtering/Path/test/itkFourierSeriesPathTest.cxx index 272337a4fdb..5c1f53868a7 100644 --- a/Modules/Filtering/Path/test/itkFourierSeriesPathTest.cxx +++ b/Modules/Filtering/Path/test/itkFourierSeriesPathTest.cxx @@ -35,7 +35,7 @@ itkFourierSeriesPathTest(int, char *[]) ITK_EXERCISE_BASIC_OBJECT_METHODS(path, FourierSeriesPath, ParametricPath); // Average value is (5,5) - auto cosV = itk::MakeFilled(5); + auto cosV = itk::MakeFilled(5); VectorType sinV{}; path->AddHarmonic(cosV, sinV); cosV.Fill(2.7); @@ -74,7 +74,7 @@ itkFourierSeriesPathTest(int, char *[]) passed = false; } - InputType input = 0; + InputType input = 0; OffsetType offset = path->IncrementInput(input); std::cout << "Incrementing the input from 0 to " << input << ": " << offset << std::endl; diff --git a/Modules/Filtering/Path/test/itkOrthogonalSwath2DPathFilterTest.cxx b/Modules/Filtering/Path/test/itkOrthogonalSwath2DPathFilterTest.cxx index 76fb6ea6c46..78e3884b93a 100644 --- a/Modules/Filtering/Path/test/itkOrthogonalSwath2DPathFilterTest.cxx +++ b/Modules/Filtering/Path/test/itkOrthogonalSwath2DPathFilterTest.cxx @@ -98,7 +98,7 @@ itkOrthogonalSwath2DPathFilterTest(int, char *[]) // Set up the image std::cout << "Making a 64x64 black square centered in a 128x128 white image" << std::endl; - auto inputImage = UCharImageType::New(); + auto inputImage = UCharImageType::New(); IndexType start; start[0] = 0; start[1] = 0; diff --git a/Modules/Filtering/Path/test/itkOrthogonallyCorrected2DParametricPathTest.cxx b/Modules/Filtering/Path/test/itkOrthogonallyCorrected2DParametricPathTest.cxx index b18d931e3d4..4dc0df851f4 100644 --- a/Modules/Filtering/Path/test/itkOrthogonallyCorrected2DParametricPathTest.cxx +++ b/Modules/Filtering/Path/test/itkOrthogonallyCorrected2DParametricPathTest.cxx @@ -83,7 +83,7 @@ itkOrthogonallyCorrected2DParametricPathTest(int, char *[]) passed = false; } - InputType input = 0; + InputType input = 0; OffsetType offset = path->IncrementInput(input); std::cout << "Incrementing the input from 0 to " << input << ": " << offset << std::endl; diff --git a/Modules/Filtering/Path/test/itkPathFunctionsTest.cxx b/Modules/Filtering/Path/test/itkPathFunctionsTest.cxx index aaabea00db8..2c8b765b9c2 100644 --- a/Modules/Filtering/Path/test/itkPathFunctionsTest.cxx +++ b/Modules/Filtering/Path/test/itkPathFunctionsTest.cxx @@ -91,9 +91,9 @@ itkPathFunctionsTest(int, char *[]) // Set up the path std::cout << "Making a square Path with v0 at (30,30) and v2 at (33,33)" << std::endl; VertexType v; - auto inPath = PolyLineParametricPathType::New(); - auto chainPath = ChainPathType::New(); - auto path = FourierSeriesPathType::New(); + auto inPath = PolyLineParametricPathType::New(); + auto chainPath = ChainPathType::New(); + auto path = FourierSeriesPathType::New(); v.Fill(30); inPath->AddVertex(v); v[0] = 33; diff --git a/Modules/Filtering/Path/test/itkPathIteratorTest.cxx b/Modules/Filtering/Path/test/itkPathIteratorTest.cxx index dc074ef817e..5a40ec8ede4 100644 --- a/Modules/Filtering/Path/test/itkPathIteratorTest.cxx +++ b/Modules/Filtering/Path/test/itkPathIteratorTest.cxx @@ -86,7 +86,7 @@ itkPathIteratorTest(int, char *[]) // Set up the path std::cout << "Making a square Path with v0 at (30,30) and v2 at (33,33)" << std::endl; VertexType v; - auto path = PathType::New(); + auto path = PathType::New(); v.Fill(30); path->AddVertex(v); v[0] = 33; diff --git a/Modules/Filtering/Path/test/itkPolyLineParametricPathTest.cxx b/Modules/Filtering/Path/test/itkPolyLineParametricPathTest.cxx index 82a27434f00..6f0ee6fde02 100644 --- a/Modules/Filtering/Path/test/itkPolyLineParametricPathTest.cxx +++ b/Modules/Filtering/Path/test/itkPolyLineParametricPathTest.cxx @@ -70,7 +70,7 @@ itkPolyLineParametricPathTest(int, char *[]) passed = false; } - InputType input = 0; + InputType input = 0; OffsetType offset = path->IncrementInput(input); std::cout << "Incrementing the input from 0 to " << input << ": " << offset << std::endl; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.h index 92f930aebc5..489c8d0e937 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.h @@ -182,7 +182,7 @@ class ITK_TEMPLATE_EXPORT BorderQuadEdgeMeshFilter : public QuadEdgeMeshToQuadEd PrintSelf(std::ostream & os, Indent indent) const override; BorderTransformEnum m_TransformType{}; - BorderPickEnum m_BorderPick{}; + BorderPickEnum m_BorderPick{}; InputCoordinateType m_Radius{}; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx index 33756cf31e4..5f4c4c52166 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx @@ -66,8 +66,8 @@ BorderQuadEdgeMeshFilter::ComputeBoundary() break; } - InputPointIdentifier i = 0; - InputIteratorGeom it = bdryEdge->BeginGeomLnext(); + InputPointIdentifier i = 0; + InputIteratorGeom it = bdryEdge->BeginGeomLnext(); const InputIteratorGeom end = bdryEdge->EndGeomLnext(); while (it != end) @@ -108,7 +108,7 @@ BorderQuadEdgeMeshFilter::ComputeLongestBorder() -> Inp } InputCoordinateType max_length(0.0); - auto oborder_it = list->begin(); + auto oborder_it = list->begin(); for (auto b_it = list->begin(); b_it != list->end(); ++b_it) { InputCoordinateType length(0.0); @@ -198,7 +198,7 @@ BorderQuadEdgeMeshFilter::DiskTransform() const InputCoordinateType inv_two_r = 1.0 / two_r; InputPointIdentifier id = this->m_BoundaryPtMap.begin()->first; - InputPointType pt1 = input->GetPoint(id); + InputPointType pt1 = input->GetPoint(id); id = (--m_BoundaryPtMap.end())->first; InputPointType pt2 = input->GetPoint(id); @@ -287,7 +287,7 @@ BorderQuadEdgeMeshFilter::GetMeshBarycentre() -> InputP const InputPointsContainer * points = input->GetPoints(); InputPointType pt; - unsigned int i; + unsigned int i; InputPointsContainerConstIterator PointIterator = points->Begin(); while (PointIterator != points->End()) diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.h index f55de89508a..61fc5ebe68b 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.h @@ -128,8 +128,8 @@ class ITK_TEMPLATE_EXPORT CleanQuadEdgeMeshFilter : public QuadEdgeMeshToQuadEdg InputCoordinateType m_RelativeTolerance{}; BoundingBoxPointer m_BoundingBox{}; - CriterionPointer m_Criterion{}; - DecimationPointer m_Decimation{}; + CriterionPointer m_Criterion{}; + DecimationPointer m_Decimation{}; }; } // end namespace itk diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.hxx index 2a308caa6e5..cda98fce861 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.hxx @@ -74,7 +74,7 @@ CleanQuadEdgeMeshFilter::MergePoints(const InputCoordin const InputMeshPointer decimatedMesh = this->m_Decimation->GetOutput(); - InputPointsContainerIterator pointsIt = decimatedMesh->GetPoints()->Begin(); + InputPointsContainerIterator pointsIt = decimatedMesh->GetPoints()->Begin(); const InputPointsContainerIterator pointsItEnd = decimatedMesh->GetPoints()->End(); OutputPointType outputPoint; @@ -89,8 +89,8 @@ CleanQuadEdgeMeshFilter::MergePoints(const InputCoordin // Copy Edge Cells InputCellsContainerIterator cellIt = decimatedMesh->GetEdgeCells()->Begin(); InputCellsContainerIterator cellItEnd = decimatedMesh->GetEdgeCells()->End(); - InputEdgeCellType * qeCell; - InputQEPrimal * qeGeometry; + InputEdgeCellType * qeCell; + InputQEPrimal * qeGeometry; while (cellIt != cellItEnd) { @@ -131,9 +131,9 @@ CleanQuadEdgeMeshFilter::CleanPoints() { const OutputMeshPointer output = this->GetOutput(); - OutputPointsContainerIterator p_it = output->GetPoints()->Begin(); + OutputPointsContainerIterator p_it = output->GetPoints()->Begin(); const OutputPointsContainerIterator p_end = output->GetPoints()->End(); - OutputPointIdentifier id(0); + OutputPointIdentifier id(0); while (p_it != p_end) { diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDecimationQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDecimationQuadEdgeMeshFilter.h index c1068891933..71315c411a9 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDecimationQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDecimationQuadEdgeMeshFilter.h @@ -66,7 +66,7 @@ class ITK_TEMPLATE_EXPORT DecimationQuadEdgeMeshFilter : public QuadEdgeMeshToQu ~DecimationQuadEdgeMeshFilter() override = default; CriterionPointer m_Criterion{}; - SizeValueType m_Iteration{}; + SizeValueType m_Iteration{}; void GenerateData() override diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.h index 00707712dfd..eb5ccb34f40 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.h @@ -137,10 +137,10 @@ class ITK_TEMPLATE_EXPORT DelaunayConformingQuadEdgeMeshFilter PrintSelf(std::ostream & os, Indent indent) const override; OutputEdgeCellListType m_ListOfConstrainedEdges{}; - PriorityQueuePointer m_PriorityQueue{}; - QueueMapType m_QueueMapper{}; + PriorityQueuePointer m_PriorityQueue{}; + QueueMapType m_QueueMapper{}; - SizeValueType m_NumberOfEdgeFlips{}; + SizeValueType m_NumberOfEdgeFlips{}; FlipEdgeFunctionPointer m_FlipEdge{}; void diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.hxx index f5bfcae4cdc..2e2f0658fd6 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.hxx @@ -126,12 +126,12 @@ DelaunayConformingQuadEdgeMeshFilter::Process() m_FlipEdge->SetInput(output); - typename std::vector list_qe(5); + typename std::vector list_qe(5); typename std::vector::iterator it; OutputEdgeCellType * edge; - OutputQEType * qe; - OutputQEType * e_it; + OutputQEType * qe; + OutputQEType * e_it; CriterionValueType value; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteCurvatureQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteCurvatureQuadEdgeMeshFilter.h index c4c66bc3ffa..95c7f97971a 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteCurvatureQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteCurvatureQuadEdgeMeshFilter.h @@ -106,7 +106,7 @@ class ITK_TEMPLATE_EXPORT DiscreteCurvatureQuadEdgeMeshFilter const OutputMeshPointer output = this->GetOutput(); const OutputPointsContainerPointer points = output->GetPoints(); - OutputPointsContainerIterator p_it = points->Begin(); + OutputPointsContainerIterator p_it = points->Begin(); OutputCurvatureType curvature; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteGaussianCurvatureQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteGaussianCurvatureQuadEdgeMeshFilter.h index a24dacdc010..0b9238ff19a 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteGaussianCurvatureQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteGaussianCurvatureQuadEdgeMeshFilter.h @@ -96,7 +96,7 @@ class ITK_TEMPLATE_EXPORT DiscreteGaussianCurvatureQuadEdgeMeshFilter do { // cell_id = qe_it->GetLeft(); - OutputQEType * qe_it2 = qe_it->GetOnext(); + OutputQEType * qe_it2 = qe_it->GetOnext(); const OutputPointType q0 = output->GetPoint(qe_it->GetDestination()); const OutputPointType q1 = output->GetPoint(qe_it2->GetDestination()); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMeanCurvatureQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMeanCurvatureQuadEdgeMeshFilter.h index 7711298bbc8..a18ce5de1c1 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMeanCurvatureQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMeanCurvatureQuadEdgeMeshFilter.h @@ -92,7 +92,7 @@ class ITK_TEMPLATE_EXPORT DiscreteMeanCurvatureQuadEdgeMeshFilter OutputVectorType Laplace{}; OutputCurvatureType area(0.); - OutputVectorType normal{}; + OutputVectorType normal{}; if (qe != nullptr) { @@ -104,7 +104,7 @@ class ITK_TEMPLATE_EXPORT DiscreteMeanCurvatureQuadEdgeMeshFilter do { - OutputQEType * qe_it2 = qe_it->GetOnext(); + OutputQEType * qe_it2 = qe_it->GetOnext(); const OutputPointType q0 = output->GetPoint(qe_it->GetDestination()); const OutputPointType q1 = output->GetPoint(qe_it2->GetDestination()); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter.h index 2d6d39d5224..cedcf2593f0 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter.h @@ -103,11 +103,11 @@ class DiscretePrincipalCurvaturesQuadEdgeMeshFilter { qe_it = qe; - OutputVectorType normal{}; + OutputVectorType normal{}; const CoefficientType coefficent; do { - OutputQEType * qe_it2 = qe_it->GetOnext(); + OutputQEType * qe_it2 = qe_it->GetOnext(); const OutputPointType q0 = output->GetPoint(qe_it->GetDestination()); const OutputPointType q1 = output->GetPoint(qe_it2->GetDestination()); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.h index be0afa16086..925deb21351 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.h @@ -94,10 +94,10 @@ class ITK_TEMPLATE_EXPORT EdgeDecimationQuadEdgeMeshFilter bool m_CheckOrientation{ false }; PriorityQueuePointer m_PriorityQueue{}; - QueueMapType m_QueueMapper{}; - OutputQEType * m_Element{}; - PriorityType m_Priority{}; - OperatorPointer m_JoinVertexFunction{}; + QueueMapType m_QueueMapper{}; + OutputQEType * m_Element{}; + PriorityType m_Priority{}; + OperatorPointer m_JoinVertexFunction{}; /** * \brief Compute the measure value for iEdge @@ -218,7 +218,7 @@ class ITK_TEMPLATE_EXPORT EdgeDecimationQuadEdgeMeshFilter bool CheckOrientation(OutputQEType * iEdge, const OutputPointIdentifier & iId, const OutputPointType & iPt) { - OutputMeshPointer output = this->GetOutput(); + OutputMeshPointer output = this->GetOutput(); OutputCellsContainerPointer cells = output->GetCells(); OutputQEType * qe = iEdge; @@ -252,13 +252,13 @@ class ITK_TEMPLATE_EXPORT EdgeDecimationQuadEdgeMeshFilter using TriangleType = TriangleHelper; - bool orientation_ok(true); - OutputCellIdentifier c_id(0); - OutputPolygonType * poly; + bool orientation_ok(true); + OutputCellIdentifier c_id(0); + OutputPolygonType * poly; OutputPointIdentifier p_id; - int k(0); - int replace_k(0); + int k(0); + int replace_k(0); OutputPointType pt[3]; while ((it != elements_to_be_tested.end()) && orientation_ok) diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.hxx index eed9fbe9f79..7e9a2a7005e 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.hxx @@ -55,7 +55,7 @@ EdgeDecimationQuadEdgeMeshFilter::FillPriorityQueue m_JoinVertexFunction->SetInput(output); - OutputCellsContainerIterator it = output->GetEdgeCells()->Begin(); + OutputCellsContainerIterator it = output->GetEdgeCells()->Begin(); const OutputCellsContainerIterator end = output->GetEdgeCells()->End(); OutputEdgeCellType * edge; @@ -82,7 +82,7 @@ EdgeDecimationQuadEdgeMeshFilter::PushElement(Outpu const OutputPointIdentifier id_org = iEdge->GetOrigin(); const OutputPointIdentifier id_dest = iEdge->GetDestination(); - OutputQEType * temp = (id_org < id_dest) ? iEdge : iEdge->GetSym(); + OutputQEType * temp = (id_org < id_dest) ? iEdge : iEdge->GetSym(); const MeasureType measure = MeasureEdge(temp); auto * qi = new PriorityQueueItemType(temp, PriorityType(false, measure)); @@ -311,7 +311,7 @@ EdgeDecimationQuadEdgeMeshFilter::ProcessWithoutAny } std::list list_qe_to_be_deleted; - OutputQEType * temp = m_Element->GetOnext(); + OutputQEType * temp = m_Element->GetOnext(); while (temp != m_Element) { diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.h index 2f06d1c8f14..aca5154e16f 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.h @@ -230,14 +230,14 @@ class ITK_TEMPLATE_EXPORT LaplacianDeformationQuadEdgeMeshFilter using RowConstIterator = typename RowType::const_iterator; OutputMapPointIdentifier m_InternalMap{}; - ConstraintMapType m_Constraints{}; - CoefficientMapType m_CoefficientMap{}; - AreaMapType m_MixedAreaMap{}; + ConstraintMapType m_Constraints{}; + CoefficientMapType m_CoefficientMap{}; + AreaMapType m_MixedAreaMap{}; CoefficientsComputationType * m_CoefficientsMethod{}; unsigned int m_Order{ 1 }; - AreaEnum m_AreaComputationType{ AreaEnum::NONE }; + AreaEnum m_AreaComputationType{ AreaEnum::NONE }; void PrintSelf(std::ostream & os, Indent indent) const override; @@ -280,9 +280,9 @@ class ITK_TEMPLATE_EXPORT LaplacianDeformationQuadEdgeMeshFilter const VectorType & iBx, const VectorType & iBy, const VectorType & iBz, - VectorType & oX, - VectorType & oY, - VectorType & oZ); + VectorType & oX, + VectorType & oY, + VectorType & oZ); private: @@ -296,8 +296,8 @@ class ITK_TEMPLATE_EXPORT LaplacianDeformationQuadEdgeMeshFilter {} OutputPointIdentifier m_Id; - OutputCoordinateType m_Weight; - unsigned int m_Degree; + OutputCoordinateType m_Weight; + unsigned int m_Degree; }; }; } // end namespace itk diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.hxx index d4844d00ece..bc3e81fe4dd 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.hxx @@ -33,9 +33,9 @@ LaplacianDeformationQuadEdgeMeshFilter:: const VectorType & iBx, const VectorType & iBy, const VectorType & iBz, - VectorType & oX, - VectorType & oY, - VectorType & oZ) + VectorType & oX, + VectorType & oY, + VectorType & oZ) { SolverTraits::Solve(iM, iBx, iBy, iBz, oX, oY, oZ); } @@ -110,7 +110,7 @@ LaplacianDeformationQuadEdgeMeshFilter:: typename OutputMeshType::PointsContainer * points = output->GetPoints(); - typename OutputMeshType::PointsContainerIterator pIt = points->Begin(); + typename OutputMeshType::PointsContainerIterator pIt = points->Begin(); const typename OutputMeshType::PointsContainerIterator pEnd = points->End(); OutputPointIdentifier k = 0; @@ -125,11 +125,11 @@ LaplacianDeformationQuadEdgeMeshFilter:: template void LaplacianDeformationQuadEdgeMeshFilter::SetConstrainedNode( - OutputPointIdentifier vId, + OutputPointIdentifier vId, const OutputPointType & iP) { const InputMeshType * input = this->GetInput(); - InputPointType pOrg = input->GetPoint(vId); + InputPointType pOrg = input->GetPoint(vId); this->SetDisplacement(vId, iP - pOrg); } @@ -137,7 +137,7 @@ LaplacianDeformationQuadEdgeMeshFilter:: template void LaplacianDeformationQuadEdgeMeshFilter::SetDisplacement( - OutputPointIdentifier vId, + OutputPointIdentifier vId, const OutputVectorType & iV) { m_Constraints[vId] = iV; @@ -147,9 +147,9 @@ template bool LaplacianDeformationQuadEdgeMeshFilter::GetDisplacement( OutputPointIdentifier vId, - OutputVectorType & oV) const + OutputVectorType & oV) const { - ConstraintMapConstIterator it = m_Constraints.find(vId); + ConstraintMapConstIterator it = m_Constraints.find(vId); const ConstraintMapConstIterator end = m_Constraints.end(); if (it != end) @@ -182,9 +182,9 @@ template void LaplacianDeformationQuadEdgeMeshFilter::FillMatrixRow( OutputPointIdentifier iId, - unsigned int iDegree, - OutputCoordinateType iWeight, - RowType & ioRow) + unsigned int iDegree, + OutputCoordinateType iWeight, + RowType & ioRow) { OutputMeshType * output = this->GetOutput(); @@ -199,7 +199,7 @@ LaplacianDeformationQuadEdgeMeshFilter:: todo.pop_back(); const OutputPointIdentifier vId = t.m_Id; - const unsigned int degree = t.m_Degree; + const unsigned int degree = t.m_Degree; if (degree == 0) { @@ -242,7 +242,7 @@ LaplacianDeformationQuadEdgeMeshFilter:: { if (m_AreaComputationType != AreaEnum::NONE) { - const auto mixedIt = m_MixedAreaMap.find(vId); + const auto mixedIt = m_MixedAreaMap.find(vId); OutputCoordinateType mixedArea = NumericTraits::OneValue(); if (mixedIt != m_MixedAreaMap.end()) @@ -278,7 +278,7 @@ LaplacianDeformationQuadEdgeMeshFilter:: template void LaplacianDeformationQuadEdgeMeshFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); } diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraints.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraints.hxx index 023b826f242..2e638bd1e32 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraints.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraints.hxx @@ -32,7 +32,7 @@ LaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsGetPoints(); using PointsContainerIterator = typename OutputMeshType::PointsContainerIterator; - PointsContainerIterator pIt = points->Begin(); + PointsContainerIterator pIt = points->Begin(); const PointsContainerIterator pEnd = points->End(); OutputPointIdentifier k = 0; @@ -57,24 +57,24 @@ LaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsm_InternalMap.begin(); + auto it = this->m_InternalMap.begin(); const auto end = this->m_InternalMap.end(); while (it != end) { const OutputPointIdentifier vId1 = it->first; - const auto internalId1 = static_cast(it->second); + const auto internalId1 = static_cast(it->second); RowType row; this->FillMatrixRow(vId1, this->m_Order, NumericTraits::OneValue(), row); - auto rIt = row.begin(); + auto rIt = row.begin(); const auto rEnd = row.end(); while (rIt != rEnd) { const OutputPointIdentifier vId2 = rIt->first; - const OutputCoordinateType weight = rIt->second; + const OutputCoordinateType weight = rIt->second; const auto cIt = this->m_Constraints.find(vId2); if (cIt != this->m_Constraints.end()) @@ -137,13 +137,13 @@ LaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsGetPoints(); - auto it = this->m_InternalMap.begin(); + auto it = this->m_InternalMap.begin(); const auto end = this->m_InternalMap.end(); while (it != end) { const OutputPointIdentifier vId = it->first; - const auto internalId = static_cast(it->second); + const auto internalId = static_cast(it->second); OutputPointType & p = points->ElementAt(vId); @@ -159,13 +159,13 @@ LaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsm_Constraints.begin(); + auto cIt = this->m_Constraints.begin(); const auto cEnd = this->m_Constraints.end(); while (cIt != cEnd) { const OutputPointIdentifier vId = cIt->first; - OutputPointType & p = points->ElementAt(vId); + OutputPointType & p = points->ElementAt(vId); p += cIt->second; ++cIt; } @@ -176,7 +176,7 @@ template void LaplacianDeformationQuadEdgeMeshFilterWithHardConstraints::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); } diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints.hxx index 2ca62b39300..25cee876031 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints.hxx @@ -38,7 +38,7 @@ LaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsGetPoints(); - typename OutputMeshType::PointsContainerIterator pIt = points->Begin(); + typename OutputMeshType::PointsContainerIterator pIt = points->Begin(); const typename OutputMeshType::PointsContainerIterator pEnd = points->End(); OutputPointIdentifier k = 0; @@ -54,7 +54,7 @@ template void LaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints::SetLocalLambda( OutputPointIdentifier vId, - OutputCoordinateType iL) + OutputCoordinateType iL) { m_LocalLambdaSquare[vId] = iL * iL; } @@ -70,24 +70,24 @@ LaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsGetOutput(); - auto it = this->m_InternalMap.begin(); + auto it = this->m_InternalMap.begin(); const auto end = this->m_InternalMap.end(); while (it != end) { const OutputPointIdentifier vId1 = it->first; - const auto internalId1 = static_cast(it->second); + const auto internalId1 = static_cast(it->second); RowType row; this->FillMatrixRow(vId1, this->m_Order, NumericTraits::OneValue(), row); - auto rIt = row.begin(); + auto rIt = row.begin(); const auto rEnd = row.end(); while (rIt != rEnd) { const OutputPointIdentifier vId2 = rIt->first; - const OutputCoordinateType weight = rIt->second; + const OutputCoordinateType weight = rIt->second; const OutputPointType p = output->GetPoint(vId2); iBx[internalId1] += weight * p[0]; @@ -151,7 +151,7 @@ LaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsm_Constraints.begin(); cIt != this->m_Constraints.end(); ++cIt) { const OutputPointIdentifier vId = cIt->first; - OutputPointType p = points->GetElement(vId); + OutputPointType p = points->GetElement(vId); p += cIt->second; const OutputPointIdentifier index = this->m_InternalMap[vId]; @@ -182,13 +182,13 @@ LaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsSolveLinearSystems(A, Cx, Cy, Cz, X, Y, Z); - auto it = this->m_InternalMap.begin(); + auto it = this->m_InternalMap.begin(); const auto end = this->m_InternalMap.end(); while (it != end) { const OutputPointIdentifier vId = it->first; - const auto internalId = static_cast(it->second); + const auto internalId = static_cast(it->second); OutputPointType & p = points->ElementAt(vId); @@ -210,7 +210,7 @@ template void LaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); } diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.hxx index bc34c670425..a38c678d3ba 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.hxx @@ -35,7 +35,7 @@ NormalQuadEdgeMeshFilter::ComputeFaceNormal(OutputPolyg const OutputMeshPointer output = this->GetOutput(); OutputPointType pt[3]; - int k(0); + int k(0); OutputQEType * edge = iPoly->GetEdgeRingEntry(); OutputQEType * temp = edge; @@ -54,7 +54,7 @@ void NormalQuadEdgeMeshFilter::ComputeAllFaceNormals() { const OutputMeshPointer output = this->GetOutput(); - OutputPolygonType * poly; + OutputPolygonType * poly; for (OutputCellsContainerConstIterator cell_it = output->GetCells()->Begin(); cell_it != output->GetCells()->End(); ++cell_it) @@ -75,9 +75,9 @@ template void NormalQuadEdgeMeshFilter::ComputeAllVertexNormals() { - const OutputMeshPointer output = this->GetOutput(); + const OutputMeshPointer output = this->GetOutput(); const OutputPointsContainerPointer points = output->GetPoints(); - OutputPointIdentifier id; + OutputPointIdentifier id; OutputMeshType * outputMesh = this->GetOutput(); @@ -91,16 +91,16 @@ NormalQuadEdgeMeshFilter::ComputeAllVertexNormals() template auto NormalQuadEdgeMeshFilter::ComputeVertexNormal(const OutputPointIdentifier & iId, - OutputMeshType * outputMesh) + OutputMeshType * outputMesh) -> OutputVertexNormalType { - OutputQEType * edge = outputMesh->FindEdge(iId); - OutputQEType * temp = edge; + OutputQEType * edge = outputMesh->FindEdge(iId); + OutputQEType * temp = edge; OutputCellIdentifier cell_id(0); OutputVertexNormalType n(0.); - OutputFaceNormalType face_normal(0.); + OutputFaceNormalType face_normal(0.); do { @@ -120,8 +120,8 @@ NormalQuadEdgeMeshFilter::ComputeVertexNormal(const Out template auto NormalQuadEdgeMeshFilter::Weight(const OutputPointIdentifier & iPId, - const OutputCellIdentifier & iCId, - OutputMeshType * outputMesh) + const OutputCellIdentifier & iCId, + OutputMeshType * outputMesh) -> OutputVertexNormalComponentType { if (m_Weight == WeightEnum::GOURAUD) @@ -137,11 +137,11 @@ NormalQuadEdgeMeshFilter::Weight(const OutputPointIdent // this test should be removed... if (poly->GetNumberOfPoints() == 3) { - OutputQEType * edge = poly->GetEdgeRingEntry(); - OutputQEType * temp = edge; + OutputQEType * edge = poly->GetEdgeRingEntry(); + OutputQEType * temp = edge; OutputPointType pt[3]; - int internal_id(0); - int k(0); + int internal_id(0); + int k(0); do { pt[k] = outputMesh->GetPoint(temp->GetOrigin()); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.h index 779df453d62..40dc7b52cd5 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.h @@ -198,8 +198,8 @@ class ITK_TEMPLATE_EXPORT ParameterizationQuadEdgeMeshFilter SolveLinearSystems(const MatrixType & iM, const VectorType & iBx, const VectorType & iBy, - VectorType & oX, - VectorType & oY); + VectorType & oX, + VectorType & oY); void GenerateData() override; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.hxx index d0a0ae8007c..e95b2c7840c 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.hxx @@ -73,8 +73,8 @@ void ParameterizationQuadEdgeMeshFilter::SolveLinearSystems(const MatrixType & iM, const VectorType & iBx, const VectorType & iBy, - VectorType & oX, - VectorType & oY) + VectorType & oX, + VectorType & oY) { SolverTraits::Solve(iM, iBx, iBy, oX, oY); } @@ -87,25 +87,25 @@ ParameterizationQuadEdgeMeshFilter::Fill VectorType & ioBy) { const InputMeshConstPointer input = this->GetInput(); - const OutputMeshPointer output = this->GetOutput(); + const OutputMeshPointer output = this->GetOutput(); for (auto InternalPtIterator = m_InternalPtMap.begin(); InternalPtIterator != m_InternalPtMap.end(); ++InternalPtIterator) { const InputPointIdentifier id1 = InternalPtIterator->first; const InputPointIdentifier InternalId1 = InternalPtIterator->second; - ValueType k[2]{}; + ValueType k[2]{}; InputQEType * edge = input->FindEdge(id1); InputQEType * temp = edge; do { const InputPointIdentifier id2 = temp->GetDestination(); - const auto it = m_BoundaryPtMap.find(id2); + const auto it = m_BoundaryPtMap.find(id2); if (it != m_BoundaryPtMap.end()) { const InputCoordinateType value = (*m_CoefficientsMethod)(input, temp); - OutputPointType pt2 = output->GetPoint(it->first); + OutputPointType pt2 = output->GetPoint(it->first); SolverTraits::AddToMatrix(iM, InternalId1, InternalId1, value); k[0] += static_cast(pt2[0] * value); k[1] += static_cast(pt2[1] * value); @@ -139,7 +139,7 @@ ParameterizationQuadEdgeMeshFilter::Gene this->CopyInputMeshToOutputMesh(); const InputMeshConstPointer input = this->GetInput(); - OutputMeshType * output = this->GetOutput(); + OutputMeshType * output = this->GetOutput(); if (m_BorderTransform.IsNotNull()) { @@ -185,7 +185,7 @@ ParameterizationQuadEdgeMeshFilter::Gene template void ParameterizationQuadEdgeMeshFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationCriteria.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationCriteria.h index afcbabc89ab..7f9d36497f4 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationCriteria.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationCriteria.h @@ -180,7 +180,7 @@ class ITK_TEMPLATE_EXPORT NumberOfFacesCriterion using typename Superclass::PriorityType; bool - is_satisfied(MeshType * iMesh, + is_satisfied(MeshType * iMesh, const ElementType & itkNotUsed(iElement), const MeasureType & itkNotUsed(iValue)) const override { @@ -227,7 +227,7 @@ class MaxMeasureBoundCriterion using typename Superclass::PriorityType; bool - is_satisfied(MeshType * itkNotUsed(iMesh), + is_satisfied(MeshType * itkNotUsed(iMesh), const ElementType & itkNotUsed(iElement), const MeasureType & iValue) const override { diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationQuadricElementHelper.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationQuadricElementHelper.h index ae766b8e891..659b8dab5ff 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationQuadricElementHelper.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationQuadricElementHelper.h @@ -182,7 +182,7 @@ class QuadEdgeMeshDecimationQuadricElementHelper void AddPoint(const PointType & iP, const VectorType & iN, const CoordType & iWeight = static_cast(1.)) { - unsigned int k(0); /*one-line-declaration*/ + unsigned int k(0); /*one-line-declaration*/ const CoordType d = -iN * iP.GetVectorFromOrigin(); for (unsigned int dim1 = 0; dim1 < PointDimension; ++dim1) { @@ -251,11 +251,11 @@ class QuadEdgeMeshDecimationQuadricElementHelper protected: CoefficientVectorType m_Coefficients; - VNLMatrixType m_A; - VNLVectorType m_B; - unsigned int m_Rank; - CoordType m_SVDAbsoluteThreshold; - CoordType m_SVDRelativeThreshold; + VNLMatrixType m_A; + VNLVectorType m_B; + unsigned int m_Rank; + CoordType m_SVDAbsoluteThreshold; + CoordType m_SVDRelativeThreshold; // bool m_MatrixFilled; void diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshParamMatrixCoefficients.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshParamMatrixCoefficients.h index cddc68329e3..fd6c0012997 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshParamMatrixCoefficients.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshParamMatrixCoefficients.h @@ -162,21 +162,21 @@ class ITK_TEMPLATE_EXPORT ConformalMatrixCoefficients : public MatrixCoefficient { const InputPointIdentifier id1 = iEdge->GetOrigin(); const InputPointIdentifier id2 = iEdge->GetDestination(); - const InputPointType pt1 = iMesh->GetPoint(id1); - const InputPointType pt2 = iMesh->GetPoint(id2); + const InputPointType pt1 = iMesh->GetPoint(id1); + const InputPointType pt2 = iMesh->GetPoint(id2); InputCoordinateType oValue(0.0); if (iEdge->IsLeftSet()) { const InputPointIdentifier idA = iEdge->GetLnext()->GetDestination(); - const InputPointType ptA = iMesh->GetPoint(idA); + const InputPointType ptA = iMesh->GetPoint(idA); oValue += TriangleHelper::Cotangent(pt1, ptA, pt2); } if (iEdge->IsRightSet()) { const InputPointIdentifier idB = iEdge->GetRnext()->GetOrigin(); - const InputPointType ptB = iMesh->GetPoint(idB); + const InputPointType ptB = iMesh->GetPoint(idB); oValue += TriangleHelper::Cotangent(pt1, ptB, pt2); } @@ -220,24 +220,24 @@ class ITK_TEMPLATE_EXPORT AuthalicMatrixCoefficients : public MatrixCoefficients operator()(const InputMeshType * iMesh, InputQEType * iEdge) const override { const InputPointIdentifier id1 = iEdge->GetOrigin(); - const InputPointType pt1 = iMesh->GetPoint(id1); + const InputPointType pt1 = iMesh->GetPoint(id1); const InputPointIdentifier id2 = iEdge->GetDestination(); - const InputPointType pt2 = iMesh->GetPoint(id2); + const InputPointType pt2 = iMesh->GetPoint(id2); InputCoordinateType oValue{}; if (iEdge->IsLeftSet()) { const InputPointIdentifier idA = iEdge->GetLnext()->GetDestination(); - const InputPointType ptA = iMesh->GetPoint(idA); + const InputPointType ptA = iMesh->GetPoint(idA); oValue += TriangleHelper::Cotangent(pt1, pt2, ptA); } if (iEdge->IsRightSet()) { const InputPointIdentifier idB = iEdge->GetRnext()->GetOrigin(); - const InputPointType ptB = iMesh->GetPoint(idB); + const InputPointType ptB = iMesh->GetPoint(idB); oValue += TriangleHelper::Cotangent(pt1, pt2, ptB); } @@ -275,7 +275,7 @@ class ITK_TEMPLATE_EXPORT IntrinsicMatrixCoefficients : public MatrixCoefficient InputCoordinateType operator()(const InputMeshType * iMesh, InputQEType * iEdge) const { - const AuthalicMatrixCoefficients authalic; + const AuthalicMatrixCoefficients authalic; const ConformalMatrixCoefficients conformal; const InputCoordinateType oValue = m_Lambda * conformal(iMesh, iEdge) + (1.0 - m_Lambda) * authalic(iMesh, iEdge); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.h index 2dd570af54e..bb5b5ba4833 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.h @@ -122,7 +122,7 @@ class ITK_TEMPLATE_EXPORT QuadricDecimationQuadEdgeMeshFilter { const OutputPointIdentifier id_org = iEdge->GetOrigin(); const OutputPointIdentifier id_dest = iEdge->GetDestination(); - QuadricElementType Q = m_Quadric[id_org] + m_Quadric[id_dest]; + QuadricElementType Q = m_Quadric[id_org] + m_Quadric[id_dest]; const OutputPointType org = this->m_OutputMesh->GetPoint(id_org); const OutputPointType dest = this->m_OutputMesh->GetPoint(id_dest); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.hxx index 50c5e3d8d20..d40520bacef 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.hxx @@ -26,12 +26,12 @@ template void QuadricDecimationQuadEdgeMeshFilter::Initialize() { - const OutputMeshPointer output = this->GetOutput(); + const OutputMeshPointer output = this->GetOutput(); const OutputPointsContainerPointer points = output->GetPoints(); - OutputPointsContainerIterator it = points->Begin(); - OutputPointIdentifier p_id; - OutputQEType * qe; - OutputQEType * qe_it; + OutputPointsContainerIterator it = points->Begin(); + OutputPointIdentifier p_id; + OutputQEType * qe; + OutputQEType * qe_it; OutputMeshType * outputMesh = this->GetOutput(); while (it != points->End()) @@ -71,7 +71,7 @@ QuadricDecimationQuadEdgeMeshFilter::Relocate(Outpu { const OutputPointIdentifier id_org = iEdge->GetOrigin(); const OutputPointIdentifier id_dest = iEdge->GetDestination(); - QuadricElementType Q = m_Quadric[id_org] + m_Quadric[id_dest]; + QuadricElementType Q = m_Quadric[id_org] + m_Quadric[id_dest]; const OutputMeshPointer output = this->GetOutput(); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSmoothingQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSmoothingQuadEdgeMeshFilter.hxx index d2457a07bdb..7ec59e5c5c5 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSmoothingQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSmoothingQuadEdgeMeshFilter.hxx @@ -58,12 +58,12 @@ SmoothingQuadEdgeMeshFilter::GenerateData() const OutputPointsContainerPointer temp = OutputPointsContainer::New(); temp->Reserve(numberOfPoints); - OutputPointsContainerPointer points; + OutputPointsContainerPointer points; OutputPointsContainerIterator it; - OutputPointType p; - OutputPointType q; - OutputPointType r; + OutputPointType p; + OutputPointType q; + OutputPointType r; OutputVectorType v; OutputCoordType coeff; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.hxx index 741d212e501..301b3cb7970 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.hxx @@ -32,7 +32,7 @@ auto SquaredEdgeLengthDecimationQuadEdgeMeshFilter::Relocate(OutputQEType * iEdge) -> OutputPointType { - const OutputMeshPointer output = this->GetOutput(); + const OutputMeshPointer output = this->GetOutput(); const OutputPointIdentifier id_org = iEdge->GetOrigin(); const OutputPointIdentifier id_dest = iEdge->GetDestination(); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkAutomaticTopologyQuadEdgeMeshSourceTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkAutomaticTopologyQuadEdgeMeshSourceTest.cxx index 4ea1117569c..a937e607c39 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkAutomaticTopologyQuadEdgeMeshSourceTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkAutomaticTopologyQuadEdgeMeshSourceTest.cxx @@ -212,7 +212,7 @@ itkAutomaticTopologyQuadEdgeMeshSourceTest(int, char *[]) std::cout << mesh->GetNumberOfPoints() << " points:" << std::endl; for (i = 0; i < mesh->GetNumberOfPoints(); ++i) { - PointType point; + PointType point; const bool dummy = mesh->GetPoint(i, &point); if (dummy) { diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkCleanQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkCleanQuadEdgeMeshFilterTest.cxx index 6bedb77126c..4c96e12964b 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkCleanQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkCleanQuadEdgeMeshFilterTest.cxx @@ -54,7 +54,7 @@ itkCleanQuadEdgeMeshFilterTest(int argc, char * argv[]) const MeshType::Pointer mesh = reader->GetOutput(); - Coord tol; + Coord tol; std::stringstream ssout(argv[2]); ssout >> tol; @@ -72,7 +72,7 @@ itkCleanQuadEdgeMeshFilterTest(int argc, char * argv[]) filter->SetRelativeTolerance(tol); constexpr Coord epsilon = 1e-6; - const Coord obtainedValue = filter->GetRelativeTolerance(); + const Coord obtainedValue = filter->GetRelativeTolerance(); if (!itk::Math::FloatAlmostEqual(tol, obtainedValue, 10, epsilon)) { std::cerr.precision(static_cast(itk::Math::abs(std::log10(epsilon)))); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDelaunayConformingQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDelaunayConformingQuadEdgeMeshFilterTest.cxx index d77f96ec766..654a2182460 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDelaunayConformingQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkDelaunayConformingQuadEdgeMeshFilterTest.cxx @@ -27,7 +27,7 @@ int itkDelaunayConformingQuadEdgeMeshFilterTestHelper(const std::string & input, const std::string & output, - const bool cell_data) + const bool cell_data) { // ** TYPEDEF ** diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsTest.cxx index cc65ddceb31..73e32411d1e 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsTest.cxx @@ -121,8 +121,8 @@ itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsTest(int argc, char while (it != constraints.end()) { - const MeshType::PointType iPt = inputMesh->GetPoint(it->first); - const MeshType::PointType oPt = outputMesh->GetPoint(it->first); + const MeshType::PointType iPt = inputMesh->GetPoint(it->first); + const MeshType::PointType oPt = outputMesh->GetPoint(it->first); const MeshType::VectorType displacement = oPt - iPt; if ((displacement - it->second).GetNorm() > 1e-6) @@ -134,8 +134,8 @@ itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsTest(int argc, char ++it; } - const MeshType::PointType iPt = inputMesh->GetPoint(0); - const MeshType::PointType oPt = outputMesh->GetPoint(0); + const MeshType::PointType iPt = inputMesh->GetPoint(0); + const MeshType::PointType oPt = outputMesh->GetPoint(0); const MeshType::VectorType displacement = oPt - iPt; if (displacement.GetNorm() < 1e-6) { diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsTest.cxx index 75cc129c97b..c919a386016 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsTest.cxx @@ -130,8 +130,8 @@ itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsTest(int argc, char it = constraints.begin(); while (it != constraints.end()) { - const MeshType::PointType iPt = inputMesh->GetPoint(it->first); - const MeshType::PointType oPt = outputMesh->GetPoint(it->first); + const MeshType::PointType iPt = inputMesh->GetPoint(it->first); + const MeshType::PointType oPt = outputMesh->GetPoint(it->first); const MeshType::VectorType displacement = oPt - iPt; if (it->second.GetNorm() > 1e-6) diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkParameterizationQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkParameterizationQuadEdgeMeshFilterTest.cxx index c6fb739f58d..52e082ccf28 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkParameterizationQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkParameterizationQuadEdgeMeshFilterTest.cxx @@ -82,11 +82,11 @@ ParameterizationQuadEdgeMeshFilterTest(const char * inputFilename, std::cout << std::endl; // ** CHOOSE AND SET BARYCENTRIC WEIGHTS ** - itk::OnesMatrixCoefficients coeff0; + itk::OnesMatrixCoefficients coeff0; itk::InverseEuclideanDistanceMatrixCoefficients coeff1; - itk::ConformalMatrixCoefficients coeff2; - itk::AuthalicMatrixCoefficients coeff3; - itk::HarmonicMatrixCoefficients coeff4; + itk::ConformalMatrixCoefficients coeff2; + itk::AuthalicMatrixCoefficients coeff3; + itk::HarmonicMatrixCoefficients coeff4; using ParametrizationType = itk::ParameterizationQuadEdgeMeshFilter; auto param = ParametrizationType::New(); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkQuadricDecimationQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkQuadricDecimationQuadEdgeMeshFilterTest.cxx index ff572a2d0c8..0376a74fa52 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkQuadricDecimationQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkQuadricDecimationQuadEdgeMeshFilterTest.cxx @@ -60,7 +60,7 @@ itkQuadricDecimationQuadEdgeMeshFilterTest(int argc, char * argv[]) using CriterionType = itk::NumberOfFacesCriterion; using DecimationType = itk::QuadricDecimationQuadEdgeMeshFilter; - long N; + long N; std::stringstream ssout(argv[2]); ssout >> N; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkSmoothingQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkSmoothingQuadEdgeMeshFilterTest.cxx index b6559dd6c64..75a27acad12 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkSmoothingQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkSmoothingQuadEdgeMeshFilterTest.cxx @@ -48,15 +48,15 @@ itkSmoothingQuadEdgeMeshFilterTest(int argc, char * argv[]) reader->SetFileName(argv[1]); ITK_TRY_EXPECT_NO_EXCEPTION(reader->Update()); - unsigned int nb_iter; + unsigned int nb_iter; std::stringstream ssout(argv[2]); ssout >> nb_iter; - double relaxation_factor; + double relaxation_factor; std::stringstream ssout2(argv[3]); ssout2 >> relaxation_factor; - bool del_conf; + bool del_conf; std::stringstream ssout3(argv[4]); ssout3 >> del_conf; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilterTest.cxx b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilterTest.cxx index 172ec58b49d..508dd8910fb 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilterTest.cxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilterTest.cxx @@ -60,7 +60,7 @@ itkSquaredEdgeLengthDecimationQuadEdgeMeshFilterTest(int argc, char * argv[]) using CriterionType = itk::NumberOfFacesCriterion; using DecimationType = itk::SquaredEdgeLengthDecimationQuadEdgeMeshFilter; - long N; + long N; std::stringstream ssout(argv[2]); ssout >> N; diff --git a/Modules/Filtering/Smoothing/include/itkBinomialBlurImageFilter.hxx b/Modules/Filtering/Smoothing/include/itkBinomialBlurImageFilter.hxx index 75e0d1582f6..1bc3aa2d6ba 100644 --- a/Modules/Filtering/Smoothing/include/itkBinomialBlurImageFilter.hxx +++ b/Modules/Filtering/Smoothing/include/itkBinomialBlurImageFilter.hxx @@ -44,7 +44,7 @@ BinomialBlurImageFilter::GenerateInputRequestedRegion Superclass::GenerateInputRequestedRegion(); - const InputImagePointer inputPtr = const_cast(this->GetInput(0)); + const InputImagePointer inputPtr = const_cast(this->GetInput(0)); const OutputImagePointer outputPtr = this->GetOutput(0); if (!inputPtr || !outputPtr) @@ -52,9 +52,9 @@ BinomialBlurImageFilter::GenerateInputRequestedRegion return; } - typename TOutputImage::RegionType outputRegion; - typename TInputImage::RegionType inputRegion; - typename TInputImage::RegionType::SizeType inputSize; + typename TOutputImage::RegionType outputRegion; + typename TInputImage::RegionType inputRegion; + typename TInputImage::RegionType::SizeType inputSize; typename TInputImage::RegionType::IndexType inputIndex; outputRegion = outputPtr->GetRequestedRegion(); @@ -94,7 +94,7 @@ BinomialBlurImageFilter::GenerateData() // Get the input and output pointers const InputImageConstPointer inputPtr = this->GetInput(0); - const OutputImagePointer outputPtr = this->GetOutput(0); + const OutputImagePointer outputPtr = this->GetOutput(0); // Allocate the output outputPtr->SetBufferedRegion(outputPtr->GetRequestedRegion()); @@ -112,7 +112,7 @@ BinomialBlurImageFilter::GenerateData() tempPtr->Allocate(); // How big is the input image? - typename TInputImage::SizeType size = inputPtr->GetRequestedRegion().GetSize(); + typename TInputImage::SizeType size = inputPtr->GetRequestedRegion().GetSize(); typename TInputImage::IndexType startIndex = inputPtr->GetRequestedRegion().GetIndex(); // Iterator Typedefs for this routine @@ -126,7 +126,7 @@ BinomialBlurImageFilter::GenerateData() this, 0, (outputPtr->GetRequestedRegion().GetNumberOfPixels()) * m_Repetitions * 2 * NDimensions); // Copy the input image to the temporary image - TempIterator tempIt(tempPtr, tempPtr->GetRequestedRegion()); + TempIterator tempIt(tempPtr, tempPtr->GetRequestedRegion()); InputIterator inputIt(inputPtr, inputPtr->GetRequestedRegion()); for (inputIt.GoToBegin(), tempIt.GoToBegin(); !tempIt.IsAtEnd(); ++tempIt, ++inputIt) @@ -170,7 +170,7 @@ BinomialBlurImageFilter::GenerateData() } // Average the pixel of interest and shifted pixel - double pixelA = tempPtr->GetPixel(index); + double pixelA = tempPtr->GetPixel(index); const double pixelB = tempPtr->GetPixel(indexShift); pixelA += pixelB; @@ -211,7 +211,7 @@ BinomialBlurImageFilter::GenerateData() } // Average the pixel of interest and shifted pixel - double pixelA = tempPtr->GetPixel(index); + double pixelA = tempPtr->GetPixel(index); const double pixelB = tempPtr->GetPixel(indexShift); pixelA += pixelB; @@ -231,7 +231,7 @@ BinomialBlurImageFilter::GenerateData() using OutputIterator = ImageRegionIterator; OutputIterator outIt(outputPtr, outputPtr->GetRequestedRegion()); - TempIterator tempIt2(tempPtr, outputPtr->GetRequestedRegion()); + TempIterator tempIt2(tempPtr, outputPtr->GetRequestedRegion()); for (outIt.GoToBegin(), tempIt2.GoToBegin(); !outIt.IsAtEnd(); ++outIt, ++tempIt2) { diff --git a/Modules/Filtering/Smoothing/include/itkBoxMeanImageFilter.hxx b/Modules/Filtering/Smoothing/include/itkBoxMeanImageFilter.hxx index 62489ff6812..dcff22e6fc6 100644 --- a/Modules/Filtering/Smoothing/include/itkBoxMeanImageFilter.hxx +++ b/Modules/Filtering/Smoothing/include/itkBoxMeanImageFilter.hxx @@ -55,8 +55,8 @@ BoxMeanImageFilter::DynamicThreadedGenerateData( } const InputImageType * inputImage = this->GetInput(); - OutputImageType * outputImage = this->GetOutput(); - RegionType accumRegion = outputRegionForThread; + OutputImageType * outputImage = this->GetOutput(); + RegionType accumRegion = outputRegionForThread; accumRegion.PadByRadius(internalRadius); accumRegion.Crop(inputImage->GetRequestedRegion()); diff --git a/Modules/Filtering/Smoothing/include/itkBoxSigmaImageFilter.hxx b/Modules/Filtering/Smoothing/include/itkBoxSigmaImageFilter.hxx index debf9f2e9b3..87291bc17cc 100644 --- a/Modules/Filtering/Smoothing/include/itkBoxSigmaImageFilter.hxx +++ b/Modules/Filtering/Smoothing/include/itkBoxSigmaImageFilter.hxx @@ -57,8 +57,8 @@ BoxSigmaImageFilter::DynamicThreadedGenerateData( } const InputImageType * inputImage = this->GetInput(); - OutputImageType * outputImage = this->GetOutput(); - RegionType accumRegion = outputRegionForThread; + OutputImageType * outputImage = this->GetOutput(); + RegionType accumRegion = outputRegionForThread; accumRegion.PadByRadius(internalRadius); accumRegion.Crop(inputImage->GetRequestedRegion()); diff --git a/Modules/Filtering/Smoothing/include/itkBoxUtilities.h b/Modules/Filtering/Smoothing/include/itkBoxUtilities.h index 85db578e016..1ed23c29631 100644 --- a/Modules/Filtering/Smoothing/include/itkBoxUtilities.h +++ b/Modules/Filtering/Smoothing/include/itkBoxUtilities.h @@ -96,9 +96,9 @@ namespace itk template void -BoxAccumulateFunction(const TInputImage * inputImage, - const TOutputImage * outputImage, - typename TInputImage::RegionType inputRegion, +BoxAccumulateFunction(const TInputImage * inputImage, + const TOutputImage * outputImage, + typename TInputImage::RegionType inputRegion, typename TOutputImage::RegionType outputRegion) { // type alias @@ -111,7 +111,7 @@ BoxAccumulateFunction(const TInputImage * inputImage, using NOutputIterator = ShapedNeighborhoodIterator; InputIterator inIt(inputImage, inputRegion); - auto kernelRadius = TInputImage::SizeType::Filled(1); + auto kernelRadius = TInputImage::SizeType::Filled(1); NOutputIterator noutIt(kernelRadius, outputImage, outputRegion); // this iterator is fully connected @@ -129,12 +129,12 @@ BoxAccumulateFunction(const TInputImage * inputImage, // image being convolved so that the accumulation propagates // This should be implementable with neighborhood operators. - std::vector weights; + std::vector weights; typename NOutputIterator::ConstIterator sIt; for (auto idxIt = noutIt.GetActiveIndexList().begin(); idxIt != noutIt.GetActiveIndexList().end(); ++idxIt) { OffsetType offset = noutIt.GetOffset(*idxIt); - int w = -1; + int w = -1; for (unsigned int k = 0; k < InputImageType::ImageDimension; ++k) { if (offset[k] != 0) @@ -149,7 +149,7 @@ BoxAccumulateFunction(const TInputImage * inputImage, for (inIt.GoToBegin(), noutIt.GoToBegin(); !noutIt.IsAtEnd(); ++inIt, ++noutIt) { OutputPixelType sum = 0; - int k; + int k; for (k = 0, sIt = noutIt.Begin(); !sIt.IsAtEnd(); ++sIt, ++k) { sum += sIt.Get() * weights[k]; @@ -164,10 +164,10 @@ std::vector CornerOffsets(const TImage * im) { using NIterator = ShapedNeighborhoodIterator; - auto unitradius = TImage::SizeType::Filled(1); - const NIterator n1(unitradius, im, im->GetRequestedRegion()); - const unsigned int centerIndex = n1.GetCenterNeighborhoodIndex(); - typename NIterator::OffsetType offset; + auto unitradius = TImage::SizeType::Filled(1); + const NIterator n1(unitradius, im, im->GetRequestedRegion()); + const unsigned int centerIndex = n1.GetCenterNeighborhoodIndex(); + typename NIterator::OffsetType offset; std::vector result; for (unsigned int d = 0; d < centerIndex * 2 + 1; ++d) { @@ -192,11 +192,11 @@ CornerOffsets(const TImage * im) template void -BoxMeanCalculatorFunction(const TInputImage * accImage, - TOutputImage * outputImage, - typename TInputImage::RegionType inputRegion, +BoxMeanCalculatorFunction(const TInputImage * accImage, + TOutputImage * outputImage, + typename TInputImage::RegionType inputRegion, typename TOutputImage::RegionType outputRegion, - typename TInputImage::SizeType radius) + typename TInputImage::SizeType radius) { // type alias using InputImageType = TInputImage; @@ -235,7 +235,7 @@ BoxMeanCalculatorFunction(const TInputImage * accImage, // now compute the weights for (unsigned int k = 0; k < unitCorners.size(); ++k) { - int prod = 1; + int prod = 1; OffsetType thisCorner; for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i) { @@ -312,7 +312,7 @@ BoxMeanCalculatorFunction(const TInputImage * accImage, RegionType currentKernelRegion; currentKernelRegion.SetSize(kernelSize); // compute the region's index - IndexType kernelRegionIdx = oIt.GetIndex(); + IndexType kernelRegionIdx = oIt.GetIndex(); const IndexType centIndex = kernelRegionIdx; for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i) { @@ -321,7 +321,7 @@ BoxMeanCalculatorFunction(const TInputImage * accImage, currentKernelRegion.SetIndex(kernelRegionIdx); currentKernelRegion.Crop(inputRegion); const OffsetValueType edgepixelscount = currentKernelRegion.GetNumberOfPixels(); - AccPixType sum = 0; + AccPixType sum = 0; // rules are : for each corner, // for each dimension // if dimension offset is positive -> this is @@ -333,7 +333,7 @@ BoxMeanCalculatorFunction(const TInputImage * accImage, for (unsigned int k = 0; k < realCorners.size(); ++k) { IndexType thisCorner = centIndex + realCorners[k]; - bool includeCorner = true; + bool includeCorner = true; for (unsigned int j = 0; j < TInputImage::ImageDimension; ++j) { if (unitCorners[k][j] > 0) @@ -365,11 +365,11 @@ BoxMeanCalculatorFunction(const TInputImage * accImage, template void -BoxSigmaCalculatorFunction(const TInputImage * accImage, - TOutputImage * outputImage, - typename TInputImage::RegionType inputRegion, +BoxSigmaCalculatorFunction(const TInputImage * accImage, + TOutputImage * outputImage, + typename TInputImage::RegionType inputRegion, typename TOutputImage::RegionType outputRegion, - typename TInputImage::SizeType radius) + typename TInputImage::SizeType radius) { // type alias using InputImageType = TInputImage; @@ -389,9 +389,9 @@ BoxSigmaCalculatorFunction(const TInputImage * accImage, // this process is actually slightly asymmetric because we need to // subtract rectangles that are next to our kernel, not overlapping it - SizeType kernelSize; - SizeType internalRadius; - SizeType regionLimit; + SizeType kernelSize; + SizeType internalRadius; + SizeType regionLimit; IndexType regionStart = inputRegion.GetIndex(); for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i) { @@ -408,7 +408,7 @@ BoxSigmaCalculatorFunction(const TInputImage * accImage, // now compute the weights for (unsigned int k = 0; k < unitCorners.size(); ++k) { - int prod = 1; + int prod = 1; OffsetType thisCorner; for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i) { @@ -489,7 +489,7 @@ BoxSigmaCalculatorFunction(const TInputImage * accImage, RegionType currentKernelRegion; currentKernelRegion.SetSize(kernelSize); // compute the region's index - IndexType kernelRegionIdx = oIt.GetIndex(); + IndexType kernelRegionIdx = oIt.GetIndex(); const IndexType centIndex = kernelRegionIdx; for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i) { @@ -498,8 +498,8 @@ BoxSigmaCalculatorFunction(const TInputImage * accImage, currentKernelRegion.SetIndex(kernelRegionIdx); currentKernelRegion.Crop(inputRegion); const SizeValueType edgepixelscount = currentKernelRegion.GetNumberOfPixels(); - AccPixType sum = 0; - AccPixType squareSum = 0; + AccPixType sum = 0; + AccPixType squareSum = 0; // rules are : for each corner, // for each dimension // if dimension offset is positive -> this is @@ -511,7 +511,7 @@ BoxSigmaCalculatorFunction(const TInputImage * accImage, for (unsigned int k = 0; k < realCorners.size(); ++k) { IndexType thisCorner = centIndex + realCorners[k]; - bool includeCorner = true; + bool includeCorner = true; for (unsigned int j = 0; j < TInputImage::ImageDimension; ++j) { if (unitCorners[k][j] > 0) @@ -546,9 +546,9 @@ BoxSigmaCalculatorFunction(const TInputImage * accImage, template void -BoxSquareAccumulateFunction(const TInputImage * inputImage, - TOutputImage * outputImage, - typename TInputImage::RegionType inputRegion, +BoxSquareAccumulateFunction(const TInputImage * inputImage, + TOutputImage * outputImage, + typename TInputImage::RegionType inputRegion, typename TOutputImage::RegionType outputRegion) { // type alias @@ -563,7 +563,7 @@ BoxSquareAccumulateFunction(const TInputImage * inputImage, using NOutputIterator = ShapedNeighborhoodIterator; InputIterator inIt(inputImage, inputRegion); - auto kernelRadius = TInputImage::SizeType::Filled(1); + auto kernelRadius = TInputImage::SizeType::Filled(1); NOutputIterator noutIt(kernelRadius, outputImage, outputRegion); // this iterator is fully connected @@ -581,12 +581,12 @@ BoxSquareAccumulateFunction(const TInputImage * inputImage, // image being convolved so that the accumulation propagates // This should be implementable with neighborhood operators. - std::vector weights; + std::vector weights; typename NOutputIterator::ConstIterator sIt; for (auto idxIt = noutIt.GetActiveIndexList().begin(); idxIt != noutIt.GetActiveIndexList().end(); ++idxIt) { OffsetType offset = noutIt.GetOffset(*idxIt); - int w = -1; + int w = -1; for (unsigned int k = 0; k < InputImageType::ImageDimension; ++k) { if (offset[k] != 0) @@ -601,14 +601,14 @@ BoxSquareAccumulateFunction(const TInputImage * inputImage, { ValueType sum = 0; ValueType squareSum = 0; - int k; + int k; for (k = 0, sIt = noutIt.Begin(); !sIt.IsAtEnd(); ++sIt, ++k) { const OutputPixelType & v = sIt.Get(); sum += v[0] * weights[k]; squareSum += v[1] * weights[k]; } - OutputPixelType o; + OutputPixelType o; const InputPixelType & i = inIt.Get(); o[0] = sum + i; o[1] = squareSum + i * i; diff --git a/Modules/Filtering/Smoothing/include/itkDiscreteGaussianImageFilter.hxx b/Modules/Filtering/Smoothing/include/itkDiscreteGaussianImageFilter.hxx index 6fa8bb92785..ae309d5a6ae 100644 --- a/Modules/Filtering/Smoothing/include/itkDiscreteGaussianImageFilter.hxx +++ b/Modules/Filtering/Smoothing/include/itkDiscreteGaussianImageFilter.hxx @@ -29,7 +29,7 @@ namespace itk template void DiscreteGaussianImageFilter::GenerateKernel(const unsigned int dimension, - KernelType & oper) const + KernelType & oper) const { // Determine the size of the operator in this dimension. Note that the // Gaussian is built as a 1D operator in each of the specified directions. diff --git a/Modules/Filtering/Smoothing/include/itkFFTDiscreteGaussianImageFilter.hxx b/Modules/Filtering/Smoothing/include/itkFFTDiscreteGaussianImageFilter.hxx index 26761fe2551..5305c545bbd 100644 --- a/Modules/Filtering/Smoothing/include/itkFFTDiscreteGaussianImageFilter.hxx +++ b/Modules/Filtering/Smoothing/include/itkFFTDiscreteGaussianImageFilter.hxx @@ -89,7 +89,7 @@ FFTDiscreteGaussianImageFilter::GenerateKernelImage() // Set up kernel image const typename RealImageType::IndexType index{}; - typename RealImageType::RegionType region; + typename RealImageType::RegionType region; region.SetSize(kernelSize); region.SetIndex(index); m_KernelImage->SetRegions(region); @@ -100,7 +100,7 @@ FFTDiscreteGaussianImageFilter::GenerateKernelImage() itk::ImageRegionIteratorWithIndex kernelIt(m_KernelImage, region); while (!kernelIt.IsAtEnd()) { - auto imageIndex = kernelIt.GetIndex(); + auto imageIndex = kernelIt.GetIndex(); double val = 1; for (size_t dim = 0; dim < directionalOperators.GetSize(); ++dim) { diff --git a/Modules/Filtering/Smoothing/include/itkMeanImageFilter.h b/Modules/Filtering/Smoothing/include/itkMeanImageFilter.h index d2cf4e11bf0..58daca01863 100644 --- a/Modules/Filtering/Smoothing/include/itkMeanImageFilter.h +++ b/Modules/Filtering/Smoothing/include/itkMeanImageFilter.h @@ -110,17 +110,17 @@ class ITK_TEMPLATE_EXPORT MeanImageFilter : public BoxImageFilter static void - GenerateDataInSubregion(const TInputImage & inputImage, - TOutputImage & outputImage, - const ImageRegion & imageRegion, + GenerateDataInSubregion(const TInputImage & inputImage, + TOutputImage & outputImage, + const ImageRegion & imageRegion, const std::vector> & neighborhoodOffsets, const TPixelType *); template static void - GenerateDataInSubregion(const TInputImage & inputImage, - TOutputImage & outputImage, - const ImageRegion & imageRegion, + GenerateDataInSubregion(const TInputImage & inputImage, + TOutputImage & outputImage, + const ImageRegion & imageRegion, const std::vector> & neighborhoodOffsets, const VariableLengthVector *); }; diff --git a/Modules/Filtering/Smoothing/include/itkMeanImageFilter.hxx b/Modules/Filtering/Smoothing/include/itkMeanImageFilter.hxx index c54367e10ff..3aa42f17d17 100644 --- a/Modules/Filtering/Smoothing/include/itkMeanImageFilter.hxx +++ b/Modules/Filtering/Smoothing/include/itkMeanImageFilter.hxx @@ -40,7 +40,7 @@ void MeanImageFilter::DynamicThreadedGenerateData( const OutputImageRegionType & outputRegionForThread) { - const typename OutputImageType::Pointer output = this->GetOutput(); + const typename OutputImageType::Pointer output = this->GetOutput(); const typename InputImageType::ConstPointer input = this->GetInput(); const auto radius = this->GetRadius(); @@ -73,9 +73,9 @@ template template void MeanImageFilter::GenerateDataInSubregion( - const TInputImage & inputImage, - TOutputImage & outputImage, - const ImageRegion & imageRegion, + const TInputImage & inputImage, + TOutputImage & outputImage, + const ImageRegion & imageRegion, const std::vector> & neighborhoodOffsets, const TPixelType *) { @@ -106,9 +106,9 @@ template template void MeanImageFilter::GenerateDataInSubregion( - const TInputImage & inputImage, - TOutputImage & outputImage, - const ImageRegion & imageRegion, + const TInputImage & inputImage, + TOutputImage & outputImage, + const ImageRegion & imageRegion, const std::vector> & neighborhoodOffsets, const VariableLengthVector *) { @@ -121,7 +121,7 @@ MeanImageFilter::GenerateDataInSubregion( // These temp variable are needed outside the loop for // VariableLengthVectors to avoid memory allocations on a per-pixel // basis. - InputRealType sum(inputImage.GetNumberOfComponentsPerPixel()); + InputRealType sum(inputImage.GetNumberOfComponentsPerPixel()); OutputPixelType out(inputImage.GetNumberOfComponentsPerPixel()); for (const auto & index : ImageRegionIndexRange(imageRegion)) diff --git a/Modules/Filtering/Smoothing/include/itkMedianImageFilter.hxx b/Modules/Filtering/Smoothing/include/itkMedianImageFilter.hxx index e1374caf681..bc190113568 100644 --- a/Modules/Filtering/Smoothing/include/itkMedianImageFilter.hxx +++ b/Modules/Filtering/Smoothing/include/itkMedianImageFilter.hxx @@ -45,7 +45,7 @@ MedianImageFilter::DynamicThreadedGenerateData( const OutputImageRegionType & outputRegionForThread) { // Allocate output - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); const InputImageType * input = this->GetInput(); const auto radius = this->GetRadius(); @@ -60,7 +60,7 @@ MedianImageFilter::DynamicThreadedGenerateData( // All of our neighborhoods have an odd number of pixels, so there is // always a median. std::vector pixels(neighborhoodSize); - const auto medianIterator = pixels.begin() + (neighborhoodSize / 2); + const auto medianIterator = pixels.begin() + (neighborhoodSize / 2); TotalProgressReporter progress(this, output->GetRequestedRegion().GetNumberOfPixels()); diff --git a/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.h b/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.h index 22f3266bfcf..43aa3b6174e 100644 --- a/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.h +++ b/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.h @@ -44,7 +44,7 @@ second derivative of a gaussian. */ }; // Define how to print enumeration extern ITKSmoothing_EXPORT std::ostream & - operator<<(std::ostream & out, const RecursiveGaussianImageFilterEnums::GaussianOrder value); +operator<<(std::ostream & out, const RecursiveGaussianImageFilterEnums::GaussianOrder value); using GaussianOrderEnum = RecursiveGaussianImageFilterEnums::GaussianOrder; #if !defined(ITK_LEGACY_REMOVE) @@ -222,15 +222,15 @@ class ITK_TEMPLATE_EXPORT RecursiveGaussianImageFilter : public RecursiveSeparab private: /** Compute the N coefficients in the recursive filter. */ void - ComputeNCoefficients(ScalarRealType sigmad, - ScalarRealType A1, - ScalarRealType B1, - ScalarRealType W1, - ScalarRealType L1, - ScalarRealType A2, - ScalarRealType B2, - ScalarRealType W2, - ScalarRealType L2, + ComputeNCoefficients(ScalarRealType sigmad, + ScalarRealType A1, + ScalarRealType B1, + ScalarRealType W1, + ScalarRealType L1, + ScalarRealType A2, + ScalarRealType B2, + ScalarRealType W2, + ScalarRealType L2, ScalarRealType & N0, ScalarRealType & N1, ScalarRealType & N2, @@ -241,11 +241,11 @@ class ITK_TEMPLATE_EXPORT RecursiveGaussianImageFilter : public RecursiveSeparab /** Compute the D coefficients in the recursive filter. */ void - ComputeDCoefficients(ScalarRealType sigmad, - ScalarRealType W1, - ScalarRealType L1, - ScalarRealType W2, - ScalarRealType L2, + ComputeDCoefficients(ScalarRealType sigmad, + ScalarRealType W1, + ScalarRealType L1, + ScalarRealType W2, + ScalarRealType L2, ScalarRealType & SD, ScalarRealType & DD, ScalarRealType & ED); diff --git a/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.hxx b/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.hxx index 225b4e0537e..5b883778a5f 100644 --- a/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.hxx +++ b/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.hxx @@ -95,7 +95,7 @@ RecursiveGaussianImageFilter::SetUp(ScalarRealType sp } const ScalarRealType sigmad = m_Sigma / spacing; - ScalarRealType across_scale_normalization = 1.0; + ScalarRealType across_scale_normalization = 1.0; A1[0] = static_cast(1.3530); @@ -223,15 +223,15 @@ RecursiveGaussianImageFilter::SetUp(ScalarRealType sp */ template void -RecursiveGaussianImageFilter::ComputeNCoefficients(ScalarRealType sigmad, - ScalarRealType A1, - ScalarRealType B1, - ScalarRealType W1, - ScalarRealType L1, - ScalarRealType A2, - ScalarRealType B2, - ScalarRealType W2, - ScalarRealType L2, +RecursiveGaussianImageFilter::ComputeNCoefficients(ScalarRealType sigmad, + ScalarRealType A1, + ScalarRealType B1, + ScalarRealType W1, + ScalarRealType L1, + ScalarRealType A2, + ScalarRealType B2, + ScalarRealType W2, + ScalarRealType L2, ScalarRealType & N0, ScalarRealType & N1, ScalarRealType & N2, @@ -267,11 +267,11 @@ RecursiveGaussianImageFilter::ComputeNCoefficients(Sc */ template void -RecursiveGaussianImageFilter::ComputeDCoefficients(ScalarRealType sigmad, - ScalarRealType W1, - ScalarRealType L1, - ScalarRealType W2, - ScalarRealType L2, +RecursiveGaussianImageFilter::ComputeDCoefficients(ScalarRealType sigmad, + ScalarRealType W1, + ScalarRealType L1, + ScalarRealType W2, + ScalarRealType L2, ScalarRealType & SD, ScalarRealType & DD, ScalarRealType & ED) diff --git a/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.h b/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.h index afc687e7ecc..00b4ad5ab4b 100644 --- a/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.h +++ b/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.h @@ -170,8 +170,8 @@ class ITK_TEMPLATE_EXPORT SmoothingRecursiveGaussianImageFilter : public InPlace private: InternalGaussianFilterPointer m_SmoothingFilters[ImageDimension - 1]{}; - FirstGaussianFilterPointer m_FirstSmoothingFilter{}; - CastingFilterPointer m_CastingFilter{}; + FirstGaussianFilterPointer m_FirstSmoothingFilter{}; + CastingFilterPointer m_CastingFilter{}; bool m_NormalizeAcrossScale{ false }; diff --git a/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.hxx b/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.hxx index 29a493d1fba..f7c0fdb52c9 100644 --- a/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.hxx +++ b/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.hxx @@ -205,7 +205,7 @@ SmoothingRecursiveGaussianImageFilter::GenerateData() const typename TInputImage::ConstPointer inputImage(this->GetInput()); const typename TInputImage::RegionType region = inputImage->GetRequestedRegion(); - const typename TInputImage::SizeType size = region.GetSize(); + const typename TInputImage::SizeType size = region.GetSize(); for (unsigned int d = 0; d < ImageDimension; ++d) { diff --git a/Modules/Filtering/Smoothing/test/itkBoxMeanImageFilterTest.cxx b/Modules/Filtering/Smoothing/test/itkBoxMeanImageFilterTest.cxx index cd187b2f189..c6a31104b6f 100644 --- a/Modules/Filtering/Smoothing/test/itkBoxMeanImageFilterTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkBoxMeanImageFilterTest.cxx @@ -44,7 +44,7 @@ itkBoxMeanImageFilterTest(int argc, char * argv[]) // Create a filter using FilterType = itk::BoxMeanImageFilter; - auto filter = FilterType::New(); + auto filter = FilterType::New(); const itk::SimpleFilterWatcher filterWatch(filter); using RadiusType = FilterType::RadiusType; diff --git a/Modules/Filtering/Smoothing/test/itkBoxSigmaImageFilterTest.cxx b/Modules/Filtering/Smoothing/test/itkBoxSigmaImageFilterTest.cxx index 2d621b8b117..c77a06f78f7 100644 --- a/Modules/Filtering/Smoothing/test/itkBoxSigmaImageFilterTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkBoxSigmaImageFilterTest.cxx @@ -44,7 +44,7 @@ itkBoxSigmaImageFilterTest(int argc, char * argv[]) // Create a filter using FilterType = itk::BoxSigmaImageFilter; - auto filter = FilterType::New(); + auto filter = FilterType::New(); const itk::SimpleFilterWatcher filterWatch(filter); using RadiusType = FilterType::RadiusType; diff --git a/Modules/Filtering/Smoothing/test/itkDiscreteGaussianImageFilterTest.cxx b/Modules/Filtering/Smoothing/test/itkDiscreteGaussianImageFilterTest.cxx index 2301e0ec755..aa1b41fa6c1 100644 --- a/Modules/Filtering/Smoothing/test/itkDiscreteGaussianImageFilterTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkDiscreteGaussianImageFilterTest.cxx @@ -64,7 +64,7 @@ itkDiscreteGaussianImageFilterTest(int argc, char * argv[]) // Set the value of the standard deviation of the Gaussian used for smoothing constexpr FilterType::SigmaArrayType::ValueType sigmaValue = 1.0; - auto sigma = itk::MakeFilled(sigmaValue); + auto sigma = itk::MakeFilled(sigmaValue); filter->SetSigma(sigmaValue); ITK_TEST_SET_GET_VALUE(sigmaValue, filter->GetSigma()); @@ -85,12 +85,12 @@ itkDiscreteGaussianImageFilterTest(int argc, char * argv[]) // Set other filter properties constexpr FilterType::ArrayType::ValueType varianceValue = 1.0; - auto variance = itk::MakeFilled(varianceValue); + auto variance = itk::MakeFilled(varianceValue); filter->SetVariance(variance); ITK_TEST_SET_GET_VALUE(variance, filter->GetVariance()); constexpr FilterType::ArrayType::ValueType maximumErrorValue = 0.01; - auto maximumError = itk::MakeFilled(maximumErrorValue); + auto maximumError = itk::MakeFilled(maximumErrorValue); filter->SetMaximumError(maximumError); ITK_TEST_SET_GET_VALUE(maximumError, filter->GetMaximumError()); @@ -104,8 +104,8 @@ itkDiscreteGaussianImageFilterTest(int argc, char * argv[]) // Verify kernel radius matches expectations for test parameters filter->UseImageSpacingOff(); constexpr unsigned int EXPECTED_RADIUS = 3; - auto radius = filter->GetKernelRadius(); - auto kernelSize = filter->GetKernelSize(); + auto radius = filter->GetKernelRadius(); + auto kernelSize = filter->GetKernelSize(); for (unsigned int idx = 0; idx < Dimension; ++idx) { ITK_TEST_EXPECT_EQUAL(radius[idx], EXPECTED_RADIUS); diff --git a/Modules/Filtering/Smoothing/test/itkDiscreteGaussianImageFilterTest2.cxx b/Modules/Filtering/Smoothing/test/itkDiscreteGaussianImageFilterTest2.cxx index eb6830e8a21..093a27fc9ae 100644 --- a/Modules/Filtering/Smoothing/test/itkDiscreteGaussianImageFilterTest2.cxx +++ b/Modules/Filtering/Smoothing/test/itkDiscreteGaussianImageFilterTest2.cxx @@ -26,10 +26,10 @@ template int -itkDiscreteGaussianImageFilterTestA(const char * inputFilename, - const char * outputFilename, - const float sigma, - const float kernelError, +itkDiscreteGaussianImageFilterTestA(const char * inputFilename, + const char * outputFilename, + const float sigma, + const float kernelError, const unsigned int kernelWidth, const unsigned int filterDimensionality) { @@ -86,8 +86,8 @@ itkDiscreteGaussianImageFilterTest2(int argc, char * argv[]) return EXIT_FAILURE; } - const float sigma = (argc > 5) ? std::stof(argv[5]) : 0.0; - const float kernelError = (argc > 6) ? std::stof(argv[6]) : 0.01; + const float sigma = (argc > 5) ? std::stof(argv[5]) : 0.0; + const float kernelError = (argc > 6) ? std::stof(argv[6]) : 0.01; const unsigned int kernelWidth = (argc > 7) ? static_cast(std::stoi(argv[7])) : 32; const unsigned int filterDimensionality = (argc > 8) ? static_cast(std::stoi(argv[8])) : img_dim; diff --git a/Modules/Filtering/Smoothing/test/itkFFTDiscreteGaussianImageFilterTest.cxx b/Modules/Filtering/Smoothing/test/itkFFTDiscreteGaussianImageFilterTest.cxx index 90623e49351..d335ed250e8 100644 --- a/Modules/Filtering/Smoothing/test/itkFFTDiscreteGaussianImageFilterTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkFFTDiscreteGaussianImageFilterTest.cxx @@ -28,8 +28,8 @@ template int itkFFTDiscreteGaussianImageFilterTestProcedure(int argc, char ** argv) { - const float sigma = (argc > 4) ? std::stof(argv[4]) : 0.0; - const float kernelError = (argc > 5) ? std::stof(argv[5]) : 0.01; + const float sigma = (argc > 4) ? std::stof(argv[4]) : 0.0; + const float kernelError = (argc > 5) ? std::stof(argv[5]) : 0.01; const unsigned int kernelWidth = (argc > 6) ? std::stoi(argv[6]) : 32; const unsigned int filterDimensionality = (argc > 7) ? std::stoi(argv[7]) : ImageType::ImageDimension; const unsigned int kernelSource = (argc > 8) ? std::stoi(argv[8]) : 0; diff --git a/Modules/Filtering/Smoothing/test/itkMeanImageFilterGTest.cxx b/Modules/Filtering/Smoothing/test/itkMeanImageFilterGTest.cxx index a0de03cc6ef..f1d3ff74ea2 100644 --- a/Modules/Filtering/Smoothing/test/itkMeanImageFilterGTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkMeanImageFilterGTest.cxx @@ -34,7 +34,7 @@ template void Expect_output_pixels_have_same_value_as_input_when_input_image_is_uniform( const typename TImage::RegionType & imageRegion, - const typename TImage::PixelType & inputPixelValue) + const typename TImage::PixelType & inputPixelValue) { using PixelType = typename TImage::PixelType; @@ -77,7 +77,7 @@ CreateImageFilledWithSequenceOfNaturalNumbers(const typename TImage::RegionType template void Expect_output_has_specified_pixel_values_when_input_has_sequence_of_natural_numbers( - const typename TImage::RegionType & imageRegion, + const typename TImage::RegionType & imageRegion, const std::vector & expectedPixelValues) { using PixelType = typename TImage::PixelType; @@ -87,8 +87,8 @@ Expect_output_has_specified_pixel_values_when_input_has_sequence_of_natural_numb filter->SetInput(inputImage); filter->Update(); - const TImage * const outputImage = filter->GetOutput(); - const auto outputImageBufferRange = itk::MakeImageBufferRange(outputImage); + const TImage * const outputImage = filter->GetOutput(); + const auto outputImageBufferRange = itk::MakeImageBufferRange(outputImage); const std::vector outputPixelValues(outputImageBufferRange.cbegin(), outputImageBufferRange.cend()); EXPECT_EQ(outputPixelValues, expectedPixelValues); @@ -105,7 +105,7 @@ TEST(MeanImageFilter, OutputSameAsInputForUniformImage) Expect_output_pixels_have_same_value_as_input_when_input_image_is_uniform>( itk::Size<3>{ { 3, 4, 5 } }, 0.5f); - float array[] = { 3.14f, 2.71f, 1.41f }; + float array[] = { 3.14f, 2.71f, 1.41f }; const itk::VariableLengthVector v{ array, 3 }; Expect_output_pixels_have_same_value_as_input_when_input_image_is_uniform>( itk::Size<3>{ { 3, 4, 5 } }, v); diff --git a/Modules/Filtering/Smoothing/test/itkMedianImageFilterGTest.cxx b/Modules/Filtering/Smoothing/test/itkMedianImageFilterGTest.cxx index 0919e1fd968..cc06c46e55e 100644 --- a/Modules/Filtering/Smoothing/test/itkMedianImageFilterGTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkMedianImageFilterGTest.cxx @@ -33,7 +33,7 @@ template void Expect_output_pixels_have_same_value_as_input_when_input_image_is_uniform( const typename TImage::RegionType & imageRegion, - const typename TImage::PixelType & inputPixelValue) + const typename TImage::PixelType & inputPixelValue) { using PixelType = typename TImage::PixelType; @@ -75,7 +75,7 @@ CreateImageFilledWithSequenceOfNaturalNumbers(const typename TImage::RegionType template void Expect_output_has_specified_pixel_values_when_input_has_sequence_of_natural_numbers( - const typename TImage::RegionType & imageRegion, + const typename TImage::RegionType & imageRegion, const std::vector & expectedPixelValues) { using PixelType = typename TImage::PixelType; @@ -85,8 +85,8 @@ Expect_output_has_specified_pixel_values_when_input_has_sequence_of_natural_numb filter->SetInput(inputImage); filter->Update(); - const TImage * const outputImage = filter->GetOutput(); - const auto outputImageBufferRange = itk::MakeImageBufferRange(outputImage); + const TImage * const outputImage = filter->GetOutput(); + const auto outputImageBufferRange = itk::MakeImageBufferRange(outputImage); const std::vector outputPixelValues(outputImageBufferRange.cbegin(), outputImageBufferRange.cend()); EXPECT_EQ(outputPixelValues, expectedPixelValues); diff --git a/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFilterOnTensorsTest.cxx b/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFilterOnTensorsTest.cxx index 6827dfd1d44..9380b8efe65 100644 --- a/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFilterOnTensorsTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFilterOnTensorsTest.cxx @@ -27,13 +27,13 @@ itkRecursiveGaussianImageFilterOnTensorsTest(int, char *[]) // RecursiveGaussianImageFilter and compare a few filtered pixels. // constexpr unsigned int Dimension = 2; - constexpr double sigma = 1; - constexpr double tolerance = 0.001; + constexpr double sigma = 1; + constexpr double tolerance = 0.001; // Create ON and OFF tensors. using Double3DTensorType = itk::SymmetricSecondRankTensor; const Double3DTensorType tensor0(0.0); - Double3DTensorType tensor1; + Double3DTensorType tensor1; tensor1(0, 0) = 1.0; tensor1(0, 1) = 0.0; tensor1(0, 2) = 0.0; @@ -49,10 +49,10 @@ itkRecursiveGaussianImageFilterOnTensorsTest(int, char *[]) using ConstIteratorType = itk::ImageLinearConstIteratorWithIndex; // Create the 9x9 input image - auto size = ImageType::SizeType::Filled(9); - ImageType::IndexType index{}; + auto size = ImageType::SizeType::Filled(9); + ImageType::IndexType index{}; const ImageType::RegionType region{ index, size }; - auto inputImage = ImageType::New(); + auto inputImage = ImageType::New(); inputImage->SetRegions(region); inputImage->Allocate(); inputImage->FillBuffer(tensor0); @@ -93,7 +93,7 @@ itkRecursiveGaussianImageFilterOnTensorsTest(int, char *[]) // Test a few pixels of the fitlered image // const ImageType::Pointer filteredImage = filterY->GetOutput(); - ConstIteratorType cit(filteredImage, filteredImage->GetRequestedRegion()); + ConstIteratorType cit(filteredImage, filteredImage->GetRequestedRegion()); cit.SetDirection(0); /* Print out all Tensor values. diff --git a/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFilterOnVectorImageTest.cxx b/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFilterOnVectorImageTest.cxx index 1fbea297c93..c7896fffb7f 100644 --- a/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFilterOnVectorImageTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkRecursiveGaussianImageFilterOnVectorImageTest.cxx @@ -27,8 +27,8 @@ itkRecursiveGaussianImageFilterOnVectorImageTest(int, char *[]) // RecursiveGaussianImageFilter and compare a few filtered pixels. // constexpr unsigned int Dimension = 2; - constexpr double sigma = 1; - constexpr double tolerance = 0.001; + constexpr double sigma = 1; + constexpr double tolerance = 0.001; constexpr unsigned int NumberOfComponents = 4; using PixelComponentType = double; @@ -47,10 +47,10 @@ itkRecursiveGaussianImageFilterOnVectorImageTest(int, char *[]) vector1.Fill(1.0); // Create the 9x9 input image - auto size = ImageType::SizeType::Filled(9); - ImageType::IndexType index{}; + auto size = ImageType::SizeType::Filled(9); + ImageType::IndexType index{}; const ImageType::RegionType region{ index, size }; - auto inputImage = ImageType::New(); + auto inputImage = ImageType::New(); inputImage->SetRegions(region); inputImage->SetNumberOfComponentsPerPixel(NumberOfComponents); inputImage->Allocate(); @@ -92,7 +92,7 @@ itkRecursiveGaussianImageFilterOnVectorImageTest(int, char *[]) // Test a few pixels of the fitlered image // const ImageType::Pointer filteredImage = filterY->GetOutput(); - ConstIteratorType cit(filteredImage, filteredImage->GetRequestedRegion()); + ConstIteratorType cit(filteredImage, filteredImage->GetRequestedRegion()); cit.SetDirection(0); index[0] = 4; diff --git a/Modules/Filtering/Smoothing/test/itkRecursiveGaussianScaleSpaceTest1.cxx b/Modules/Filtering/Smoothing/test/itkRecursiveGaussianScaleSpaceTest1.cxx index 60a27d366d7..c6181133247 100644 --- a/Modules/Filtering/Smoothing/test/itkRecursiveGaussianScaleSpaceTest1.cxx +++ b/Modules/Filtering/Smoothing/test/itkRecursiveGaussianScaleSpaceTest1.cxx @@ -32,7 +32,7 @@ NormalizeSineWave(double frequencyPerImage, unsigned int order, double pixelSpac constexpr unsigned int ImageDimension = 1; constexpr unsigned int imageSize = 1024; - const double tol = std::pow(.000001, 1.0 / order); + const double tol = std::pow(.000001, 1.0 / order); const double frequency = frequencyPerImage * 2.0 * itk::Math::pi / (imageSize * pixelSpacing); diff --git a/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnImageAdaptorTest.cxx b/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnImageAdaptorTest.cxx index 87b661bc0be..b874164b470 100644 --- a/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnImageAdaptorTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnImageAdaptorTest.cxx @@ -115,7 +115,7 @@ itkSmoothingRecursiveGaussianImageFilterOnImageAdaptorTest(int, char *[]) // Create a Filter - auto filter = myFilterType::New(); + auto filter = myFilterType::New(); const itk::SimpleFilterWatcher watchit(filter); // Connect the input images diff --git a/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest.cxx b/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest.cxx index c2b59338cd2..69e0292cb28 100644 --- a/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest.cxx @@ -106,7 +106,7 @@ itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest(int, char *[]) // Create a Filter - auto filter = myFilterType::New(); + auto filter = myFilterType::New(); const itk::SimpleFilterWatcher watchit(filter); // Connect the input images diff --git a/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnVectorImageTest.cxx b/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnVectorImageTest.cxx index 4d651383dbd..bbb150ee025 100644 --- a/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnVectorImageTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterOnVectorImageTest.cxx @@ -104,7 +104,7 @@ itkSmoothingRecursiveGaussianImageFilterOnVectorImageTest(int, char *[]) // Create a Filter - auto filter = myFilterType::New(); + auto filter = myFilterType::New(); const itk::SimpleFilterWatcher watchit(filter); // Connect the input images diff --git a/Modules/Filtering/SpatialFunction/include/itkSpatialFunctionImageEvaluatorFilter.hxx b/Modules/Filtering/SpatialFunction/include/itkSpatialFunctionImageEvaluatorFilter.hxx index f91702c3eac..3c0e5606c55 100644 --- a/Modules/Filtering/SpatialFunction/include/itkSpatialFunctionImageEvaluatorFilter.hxx +++ b/Modules/Filtering/SpatialFunction/include/itkSpatialFunctionImageEvaluatorFilter.hxx @@ -72,7 +72,7 @@ SpatialFunctionImageEvaluatorFilter template void SpatialFunctionImageEvaluatorFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/SpatialFunction/test/itkSpatialFunctionImageEvaluatorFilterTest.cxx b/Modules/Filtering/SpatialFunction/test/itkSpatialFunctionImageEvaluatorFilterTest.cxx index b76d71413ba..749419462fe 100644 --- a/Modules/Filtering/SpatialFunction/test/itkSpatialFunctionImageEvaluatorFilterTest.cxx +++ b/Modules/Filtering/SpatialFunction/test/itkSpatialFunctionImageEvaluatorFilterTest.cxx @@ -30,9 +30,9 @@ itkSpatialFunctionImageEvaluatorFilterTest(int, char *[]) // Create a new input image // Image size and spacing parameters - ImageType::SizeValueType sourceImageSize[] = { 20, 20, 20 }; + ImageType::SizeValueType sourceImageSize[] = { 20, 20, 20 }; ImageType::SpacingValueType sourceImageSpacing[] = { 1.0, 1.0, 1.0 }; - ImageType::PointValueType sourceImageOrigin[] = { 0, 0, 0 }; + ImageType::PointValueType sourceImageOrigin[] = { 0, 0, 0 }; // Create the sourceImage auto sourceImage = ImageType::New(); diff --git a/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.h index 27334016f92..de3d047c66f 100644 --- a/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.h @@ -120,8 +120,8 @@ class ITK_TEMPLATE_EXPORT BinaryThreshold } private: - TInput m_LowerThreshold; - TInput m_UpperThreshold; + TInput m_LowerThreshold; + TInput m_UpperThreshold; TOutput m_InsideValue; TOutput m_OutsideValue; }; diff --git a/Modules/Filtering/Thresholding/include/itkBinaryThresholdProjectionImageFilter.h b/Modules/Filtering/Thresholding/include/itkBinaryThresholdProjectionImageFilter.h index ca4a5ad5669..73128b8763d 100644 --- a/Modules/Filtering/Thresholding/include/itkBinaryThresholdProjectionImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkBinaryThresholdProjectionImageFilter.h @@ -86,7 +86,7 @@ class BinaryThresholdAccumulator bool m_IsForeground; - TInputPixel m_ThresholdValue; + TInputPixel m_ThresholdValue; TOutputPixel m_ForegroundValue; TOutputPixel m_BackgroundValue; }; diff --git a/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.h index d2e9fb79676..f3609f7ce40 100644 --- a/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.h @@ -215,14 +215,14 @@ class ITK_TEMPLATE_EXPORT HistogramThresholdImageFilter : public ImageToImageFil void SetUpHistogramGenerator(HistogramGeneratorPointer histogramGenerator); - OutputPixelType m_InsideValue{}; - OutputPixelType m_OutsideValue{}; - InputPixelType m_Threshold{}; - MaskPixelType m_MaskValue{}; + OutputPixelType m_InsideValue{}; + OutputPixelType m_OutsideValue{}; + InputPixelType m_Threshold{}; + MaskPixelType m_MaskValue{}; CalculatorPointer m_Calculator{}; - unsigned int m_NumberOfHistogramBins{ 256 }; - bool m_AutoMinimumMaximum{}; - bool m_MaskOutput{ true }; + unsigned int m_NumberOfHistogramBins{ 256 }; + bool m_AutoMinimumMaximum{}; + bool m_MaskOutput{ true }; }; } // end namespace itk diff --git a/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.h index b7d319b40dd..afc725e1206 100644 --- a/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.h @@ -93,7 +93,7 @@ class ITK_TEMPLATE_EXPORT HuangThresholdCalculator : public HistogramThresholdCa private: InstanceIdentifier m_FirstBin{}; InstanceIdentifier m_LastBin{}; - SizeValueType m_Size{}; + SizeValueType m_Size{}; }; } // end namespace itk diff --git a/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.hxx index 20b266e7d72..cc315914907 100644 --- a/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.hxx @@ -74,7 +74,7 @@ HuangThresholdCalculator::GenerateData() } // precalculate the summands of the entropy given the absolute difference x - mu (integral) - auto C = static_cast(m_LastBin - m_FirstBin); + auto C = static_cast(m_LastBin - m_FirstBin); std::vector Smu(m_LastBin + 1 - m_FirstBin, 0); for (size_t i = 1; i < Smu.size(); ++i) @@ -96,17 +96,17 @@ HuangThresholdCalculator::GenerateData() // perhaps it is hidden by whatever java does when rounding a NaN to integer. InstanceIdentifier bestThreshold = 0; - double bestEntropy = itk::NumericTraits::max(); + double bestEntropy = itk::NumericTraits::max(); for (InstanceIdentifier threshold = m_FirstBin; threshold < m_LastBin; ++threshold) { double entropy = 0.; - auto mu = Math::Round(W[threshold] / S[threshold]); + auto mu = Math::Round(W[threshold] / S[threshold]); typename HistogramType::MeasurementVectorType v(1); v[0] = mu; - typename HistogramType::IndexType muFullIdx; + typename HistogramType::IndexType muFullIdx; typename HistogramType::IndexValueType muIdx; if (histogram->GetIndex(v, muFullIdx)) diff --git a/Modules/Filtering/Thresholding/include/itkIntermodesThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkIntermodesThresholdCalculator.h index e818eebe003..cbc3e66234f 100644 --- a/Modules/Filtering/Thresholding/include/itkIntermodesThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkIntermodesThresholdCalculator.h @@ -107,7 +107,7 @@ class ITK_TEMPLATE_EXPORT IntermodesThresholdCalculator : public HistogramThresh BimodalTest(const std::vector & h); SizeValueType m_MaximumSmoothingIterations{}; - bool m_UseInterMode{}; + bool m_UseInterMode{}; }; } // end namespace itk diff --git a/Modules/Filtering/Thresholding/include/itkIntermodesThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkIntermodesThresholdImageFilter.h index 32703ac4fcc..f431c945796 100644 --- a/Modules/Filtering/Thresholding/include/itkIntermodesThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkIntermodesThresholdImageFilter.h @@ -147,7 +147,7 @@ class ITK_TEMPLATE_EXPORT IntermodesThresholdImageFilter private: SizeValueType m_MaximumSmoothingIterations{ 1000 }; - bool m_UseInterMode{ true }; + bool m_UseInterMode{ true }; }; } // end namespace itk diff --git a/Modules/Filtering/Thresholding/include/itkIsoDataThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkIsoDataThresholdCalculator.hxx index 926630c0c6e..de467d7cbca 100644 --- a/Modules/Filtering/Thresholding/include/itkIsoDataThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkIsoDataThresholdCalculator.hxx @@ -36,7 +36,7 @@ IsoDataThresholdCalculator::GenerateData() itkExceptionMacro("Histogram is empty"); } const SizeValueType size = histogram->GetSize(0); - ProgressReporter progress(this, 0, size); + ProgressReporter progress(this, 0, size); if (size == 1) { this->GetOutput()->Set(static_cast(histogram->GetMeasurement(0, 0))); diff --git a/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.h b/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.h index 5bf5e3f2f5b..4bc54e481a4 100644 --- a/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.h @@ -119,14 +119,14 @@ class ITK_TEMPLATE_EXPORT KappaSigmaThresholdImageCalculator : public Object PrintSelf(std::ostream & os, Indent indent) const override; private: - bool m_Valid{ false }; // Have moments been computed yet? - MaskPixelType m_MaskValue{}; - double m_SigmaFactor{ 2 }; - unsigned int m_NumberOfIterations{ 2 }; + bool m_Valid{ false }; // Have moments been computed yet? + MaskPixelType m_MaskValue{}; + double m_SigmaFactor{ 2 }; + unsigned int m_NumberOfIterations{ 2 }; InputPixelType m_Output{}; InputImageConstPointer m_Image{}; - MaskImageConstPointer m_Mask{}; + MaskImageConstPointer m_Mask{}; }; } // end namespace itk diff --git a/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.hxx b/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.hxx index d53a29fece2..7ee56e08516 100644 --- a/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.hxx @@ -51,7 +51,7 @@ KappaSigmaThresholdImageCalculator::Compute() // Compute the mean iIt.GoToBegin(); SizeValueType count = 0; - double mean = 0; + double mean = 0; while (!iIt.IsAtEnd()) { if (!this->m_Mask || this->m_Mask->GetPixel(iIt.GetIndex()) == this->m_MaskValue) diff --git a/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageFilter.h index e0ed33e8810..cf044819059 100644 --- a/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageFilter.h @@ -169,10 +169,10 @@ class ITK_TEMPLATE_EXPORT KappaSigmaThresholdImageFilter : public ImageToImageFi static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension; private: - MaskPixelType m_MaskValue{}; - double m_SigmaFactor{ 2 }; - unsigned int m_NumberOfIterations{ 2 }; - InputPixelType m_Threshold{}; + MaskPixelType m_MaskValue{}; + double m_SigmaFactor{ 2 }; + unsigned int m_NumberOfIterations{ 2 }; + InputPixelType m_Threshold{}; OutputPixelType m_InsideValue{}; OutputPixelType m_OutsideValue{}; }; diff --git a/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.hxx index 1ac89544b1a..f826486e4a3 100644 --- a/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.hxx @@ -30,7 +30,7 @@ KittlerIllingworthThresholdCalculator::Mean() { const HistogramType * data = this->GetInput(); - auto tot = static_cast(data->GetTotalFrequency()); + auto tot = static_cast(data->GetTotalFrequency()); double sum = 0; for (InstanceIdentifier i = 0; i < data->GetSize(0); ++i) @@ -44,7 +44,7 @@ KittlerIllingworthThresholdCalculator::Mean() v[0] = mean; typename HistogramType::IndexType idx; - const bool status = data->GetIndex(v, idx); + const bool status = data->GetIndex(v, idx); itkAssertInDebugAndIgnoreInReleaseMacro(status); if (!status) { @@ -59,7 +59,7 @@ double KittlerIllingworthThresholdCalculator::A(InstanceIdentifier j) { const HistogramType * y = this->GetInput(); - double x = 0; + double x = 0; for (InstanceIdentifier i = 0; i <= j; ++i) { x += static_cast(y->GetFrequency(i, 0)); @@ -72,7 +72,7 @@ double KittlerIllingworthThresholdCalculator::B(InstanceIdentifier j) { const HistogramType * y = this->GetInput(); - double x = 0; + double x = 0; for (InstanceIdentifier i = 0; i <= j; ++i) { x += static_cast(y->GetMeasurement(i, 0)) * static_cast(y->GetFrequency(i, 0)); @@ -85,7 +85,7 @@ double KittlerIllingworthThresholdCalculator::C(InstanceIdentifier j) { const HistogramType * y = this->GetInput(); - double x = 0; + double x = 0; for (InstanceIdentifier i = 0; i <= j; ++i) { auto temp = static_cast(y->GetMeasurement(i, 0)); @@ -104,7 +104,7 @@ KittlerIllingworthThresholdCalculator::GenerateData() { itkExceptionMacro("Histogram is empty"); } - const SizeValueType size = histogram->GetSize(0); + const SizeValueType size = histogram->GetSize(0); const ProgressReporter progress(this, 0, size); if (size == 1) { @@ -183,7 +183,7 @@ KittlerIllingworthThresholdCalculator::GenerateData() const double temp = -w2 / w1; typename HistogramType::MeasurementVectorType v(1); - typename HistogramType::IndexType idx; + typename HistogramType::IndexType idx; v[0] = temp; const bool status = histogram->GetIndex(v, idx); itkAssertInDebugAndIgnoreInReleaseMacro(status); @@ -212,7 +212,7 @@ KittlerIllingworthThresholdCalculator::GenerateData() else { typename HistogramType::MeasurementVectorType v(1); - typename HistogramType::IndexType idx; + typename HistogramType::IndexType idx; v[0] = temp; const bool status = histogram->GetIndex(v, idx); itkAssertInDebugAndIgnoreInReleaseMacro(status); diff --git a/Modules/Filtering/Thresholding/include/itkLiThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkLiThresholdCalculator.hxx index 60e71e39937..77e5733ef07 100644 --- a/Modules/Filtering/Thresholding/include/itkLiThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkLiThresholdCalculator.hxx @@ -44,13 +44,13 @@ LiThresholdCalculator::GenerateData() const unsigned int size = histogram->GetSize(0); - long histthresh; - int ih; - int num_pixels; + long histthresh; + int ih; + int num_pixels; double sum_back; // sum of the background pixels at a given threshold double sum_obj; // sum of the object pixels at a given threshold - int num_back; // number of background pixels at a given threshold - int num_obj; // number of object pixels at a given threshold + int num_back; // number of background pixels at a given threshold + int num_obj; // number of object pixels at a given threshold double old_thresh; double new_thresh; double mean_back; // mean of the background pixels at a given threshold diff --git a/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdCalculator.hxx index 67fff1b31c2..ed3acacc238 100644 --- a/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdCalculator.hxx @@ -46,7 +46,7 @@ MaximumEntropyThresholdCalculator::GenerateData() typename HistogramType::InstanceIdentifier threshold = 0; constexpr double tolerance = itk::NumericTraits::epsilon(); - const int total = histogram->GetTotalFrequency(); + const int total = histogram->GetTotalFrequency(); std::vector norm_histo(size); // normalized histogram for (int ih = 0; static_cast(ih) < size; ++ih) diff --git a/Modules/Filtering/Thresholding/include/itkMomentsThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkMomentsThresholdCalculator.hxx index 57204d8138d..b456540283e 100644 --- a/Modules/Filtering/Thresholding/include/itkMomentsThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkMomentsThresholdCalculator.hxx @@ -43,7 +43,7 @@ MomentsThresholdCalculator::GenerateData() const unsigned int size = histogram->GetSize(0); - const double total = histogram->GetTotalFrequency(); + const double total = histogram->GetTotalFrequency(); typename HistogramType::InstanceIdentifier threshold = 0; std::vector histo(size); @@ -54,9 +54,9 @@ MomentsThresholdCalculator::GenerateData() // Calculate the first, second, and third order moments constexpr double m0 = 1.0; - double m1 = 0.0; - double m2 = 0.0; - double m3 = 0.0; + double m1 = 0.0; + double m2 = 0.0; + double m3 = 0.0; for (unsigned int i = 0; i < size; ++i) { const double m = histogram->GetMeasurement(i, 0); diff --git a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.h b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.h index d7f6e1a7ab8..634af03b01e 100644 --- a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.h @@ -110,15 +110,15 @@ class ITK_TEMPLATE_EXPORT OtsuMultipleThresholdsCalculator : public HistogramAlg /** Increment the thresholds of one position along the histogram. */ bool IncrementThresholds(InstanceIdentifierVectorType & thresholdIndexes, - MeanType globalMean, - MeanVectorType & classMean, - FrequencyVectorType & classFrequency); + MeanType globalMean, + MeanVectorType & classMean, + FrequencyVectorType & classFrequency); private: SizeValueType m_NumberOfThresholds{ 1 }; - OutputType m_Output{}; - bool m_ValleyEmphasis{ false }; - bool m_ReturnBinMidpoint{ false }; + OutputType m_Output{}; + bool m_ValleyEmphasis{ false }; + bool m_ReturnBinMidpoint{ false }; }; } // end of namespace itk diff --git a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx index 8c79401046b..b0b9521d9e0 100644 --- a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx @@ -40,17 +40,17 @@ OtsuMultipleThresholdsCalculator::GetOutput() -> const OutputTy template bool OtsuMultipleThresholdsCalculator::IncrementThresholds(InstanceIdentifierVectorType & thresholdIndexes, - MeanType globalMean, - MeanVectorType & classMean, - FrequencyVectorType & classFrequency) + MeanType globalMean, + MeanVectorType & classMean, + FrequencyVectorType & classFrequency) { const typename TInputHistogram::ConstPointer histogram = this->GetInputHistogram(); const SizeValueType numberOfHistogramBins = histogram->Size(); - const auto numberOfClasses = static_cast(classMean.size()); + const auto numberOfClasses = static_cast(classMean.size()); unsigned int k; - int j; + int j; // From the upper threshold down for (j = static_cast(m_NumberOfThresholds - 1); j >= 0; j--) @@ -63,7 +63,7 @@ OtsuMultipleThresholdsCalculator::IncrementThresholds(InstanceI // threshold ++thresholdIndexes[j]; - const MeanType meanOld = classMean[j]; + const MeanType meanOld = classMean[j]; const FrequencyType freqOld = classFrequency[j]; classFrequency[j] += histogram->GetFrequency(thresholdIndexes[j]); @@ -147,10 +147,10 @@ OtsuMultipleThresholdsCalculator::Compute() } // Compute global mean - typename TInputHistogram::ConstIterator iter = histogram->Begin(); + typename TInputHistogram::ConstIterator iter = histogram->Begin(); const typename TInputHistogram::ConstIterator end = histogram->End(); - MeanType globalMean{}; + MeanType globalMean{}; const FrequencyType globalFrequency = histogram->GetTotalFrequency(); while (iter != end) { @@ -173,7 +173,7 @@ OtsuMultipleThresholdsCalculator::Compute() InstanceIdentifierVectorType maxVarThresholdIndexes = thresholdIndexes; // Compute frequency and mean of initial classes - FrequencyType freqSum{}; + FrequencyType freqSum{}; FrequencyVectorType classFrequency(numberOfClasses); for (j = 0; j < numberOfClasses - 1; ++j) { @@ -184,13 +184,13 @@ OtsuMultipleThresholdsCalculator::Compute() // Convert the frequencies to probabilities (i.e. normalize the histogram). const SizeValueType histSize = histogram->GetSize()[0]; - WeightVectorType imgPDF(histSize); + WeightVectorType imgPDF(histSize); for (j = 0; j < histSize; ++j) { imgPDF[j] = (WeightType)histogram->GetFrequency(j) / (WeightType)globalFrequency; } - MeanType meanSum{}; + MeanType meanSum{}; MeanVectorType classMean(numberOfClasses); for (j = 0; j < numberOfClasses - 1; ++j) { diff --git a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsImageFilter.h b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsImageFilter.h index 4bc4165bf29..a86cea6874d 100644 --- a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsImageFilter.h @@ -150,12 +150,12 @@ class ITK_TEMPLATE_EXPORT OtsuMultipleThresholdsImageFilter : public ImageToImag GenerateData() override; private: - SizeValueType m_NumberOfHistogramBins{ 128 }; - SizeValueType m_NumberOfThresholds{ 1 }; - OutputPixelType m_LabelOffset{}; + SizeValueType m_NumberOfHistogramBins{ 128 }; + SizeValueType m_NumberOfThresholds{ 1 }; + OutputPixelType m_LabelOffset{}; ThresholdVectorType m_Thresholds{}; - bool m_ValleyEmphasis{ false }; - bool m_ReturnBinMidpoint{ false }; + bool m_ValleyEmphasis{ false }; + bool m_ReturnBinMidpoint{ false }; }; } // end namespace itk diff --git a/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.h index d5cb94e6609..1d8b1f699c7 100644 --- a/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.h @@ -90,7 +90,7 @@ class ITK_TEMPLATE_EXPORT OtsuThresholdCalculator : public HistogramThresholdCal private: typename OtsuMultipleThresholdsCalculator::Pointer m_OtsuMultipleThresholdsCalculator{}; - bool m_ReturnBinMidpoint{ false }; + bool m_ReturnBinMidpoint{ false }; }; } // end namespace itk diff --git a/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.h index 7425ba6747a..f66a3674fd1 100644 --- a/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.h @@ -90,19 +90,19 @@ class ITK_TEMPLATE_EXPORT RenyiEntropyThresholdCalculator : public HistogramThre using SizeValueType = typename HistogramType::SizeValueType; InstanceIdentifier - MaxEntropyThresholding(const HistogramType * histogram, + MaxEntropyThresholding(const HistogramType * histogram, const std::vector & normHisto, const std::vector & P1, const std::vector & P2); InstanceIdentifier - MaxEntropyThresholding2(const HistogramType * histogram, + MaxEntropyThresholding2(const HistogramType * histogram, const std::vector & normHisto, const std::vector & P1, const std::vector & P2); InstanceIdentifier - MaxEntropyThresholding3(const HistogramType * histogram, + MaxEntropyThresholding3(const HistogramType * histogram, const std::vector & normHisto, const std::vector & P1, const std::vector & P2); @@ -110,7 +110,7 @@ class ITK_TEMPLATE_EXPORT RenyiEntropyThresholdCalculator : public HistogramThre private: InstanceIdentifier m_FirstBin{}; InstanceIdentifier m_LastBin{}; - SizeValueType m_Size{}; + SizeValueType m_Size{}; }; } // end namespace itk diff --git a/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.hxx index f4201523429..9decf231b52 100644 --- a/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.hxx @@ -168,7 +168,7 @@ RenyiEntropyThresholdCalculator::GenerateData() template auto -RenyiEntropyThresholdCalculator::MaxEntropyThresholding(const HistogramType * histogram, +RenyiEntropyThresholdCalculator::MaxEntropyThresholding(const HistogramType * histogram, const std::vector & normHisto, const std::vector & P1, const std::vector & P2) @@ -223,7 +223,7 @@ RenyiEntropyThresholdCalculator::MaxEntropyThresholding(con template auto RenyiEntropyThresholdCalculator::MaxEntropyThresholding2( - const HistogramType * itkNotUsed(histogram), + const HistogramType * itkNotUsed(histogram), const std::vector & normHisto, const std::vector & P1, const std::vector & P2) -> InstanceIdentifier @@ -231,9 +231,9 @@ RenyiEntropyThresholdCalculator::MaxEntropyThresholding2( InstanceIdentifier threshold = 0; // was MIN_INT in original code, but if an empty image is processed it gives an error later on. - double max_ent = NumericTraits::min(); + double max_ent = NumericTraits::min(); constexpr double alpha = 0.5; - const double term = 1.0 / (1.0 - alpha); + const double term = 1.0 / (1.0 - alpha); for (InstanceIdentifier it = m_FirstBin; it <= m_LastBin; ++it) { @@ -253,7 +253,7 @@ RenyiEntropyThresholdCalculator::MaxEntropyThresholding2( // Total entropy const double product = ent_back * ent_obj; - double tot_ent = 0.; + double tot_ent = 0.; if (product > 0.0) { @@ -273,16 +273,16 @@ RenyiEntropyThresholdCalculator::MaxEntropyThresholding2( template auto RenyiEntropyThresholdCalculator::MaxEntropyThresholding3( - const HistogramType * itkNotUsed(histogram), + const HistogramType * itkNotUsed(histogram), const std::vector & normHisto, const std::vector & P1, const std::vector & P2) -> InstanceIdentifier { InstanceIdentifier threshold = 0; // was MIN_INT in original code, but if an empty image is processed it gives an error later on. - double max_ent = 0.0; + double max_ent = 0.0; constexpr double alpha = 2.0; - const double term = 1.0 / (1.0 - alpha); + const double term = 1.0 / (1.0 - alpha); for (InstanceIdentifier it = m_FirstBin; it <= m_LastBin; ++it) { // Entropy of the background pixels @@ -302,7 +302,7 @@ RenyiEntropyThresholdCalculator::MaxEntropyThresholding3( } // Total entropy - double tot_ent = 0.0; + double tot_ent = 0.0; const double product = ent_back * ent_obj; if (product > 0.0) { diff --git a/Modules/Filtering/Thresholding/include/itkShanbhagThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkShanbhagThresholdCalculator.hxx index 73b4831885b..fd366be814e 100644 --- a/Modules/Filtering/Thresholding/include/itkShanbhagThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkShanbhagThresholdCalculator.hxx @@ -43,7 +43,7 @@ ShanbhagThresholdCalculator::GenerateData() const unsigned int size = histogram->GetSize(0); - constexpr double tolerance = 2.220446049250313E-16; + constexpr double tolerance = 2.220446049250313E-16; typename HistogramType::InstanceIdentifier threshold = 0; std::vector norm_histo(size); // normalized histogram diff --git a/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.hxx b/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.hxx index 7575c59db63..f95bfba0c99 100644 --- a/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.hxx +++ b/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.hxx @@ -95,7 +95,7 @@ void ThresholdImageFilter::DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) { // Get the input and output pointers - const InputImagePointer inputPtr = this->GetInput(); + const InputImagePointer inputPtr = this->GetInput(); const OutputImagePointer outputPtr = this->GetOutput(0); TotalProgressReporter progress(this, outputPtr->GetRequestedRegion().GetNumberOfPixels()); @@ -103,7 +103,7 @@ ThresholdImageFilter::DynamicThreadedGenerateData(const OutputImageRegio // Define/declare an iterator that will walk the output region for this // thread. ImageScanlineConstIterator inIt(inputPtr, outputRegionForThread); - ImageScanlineIterator outIt(outputPtr, outputRegionForThread); + ImageScanlineIterator outIt(outputPtr, outputRegionForThread); // Walk the regions; threshold each pixel while (!outIt.IsAtEnd()) diff --git a/Modules/Filtering/Thresholding/include/itkThresholdLabelerImageFilter.h b/Modules/Filtering/Thresholding/include/itkThresholdLabelerImageFilter.h index 95f143fa3b0..f99c20e4d32 100644 --- a/Modules/Filtering/Thresholding/include/itkThresholdLabelerImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkThresholdLabelerImageFilter.h @@ -104,7 +104,7 @@ class ITK_TEMPLATE_EXPORT ThresholdLabeler private: RealThresholdVector m_Thresholds; - TOutput m_LabelOffset; + TOutput m_LabelOffset; }; } // namespace Functor @@ -212,9 +212,9 @@ class ITK_TEMPLATE_EXPORT ThresholdLabelerImageFilter BeforeThreadedGenerateData() override; private: - ThresholdVector m_Thresholds{}; + ThresholdVector m_Thresholds{}; RealThresholdVector m_RealThresholds{}; - OutputPixelType m_LabelOffset{}; + OutputPixelType m_LabelOffset{}; }; } // end namespace itk diff --git a/Modules/Filtering/Thresholding/include/itkTriangleThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkTriangleThresholdCalculator.hxx index e00a863425f..cb5afaebfc1 100644 --- a/Modules/Filtering/Thresholding/include/itkTriangleThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkTriangleThresholdCalculator.hxx @@ -51,7 +51,7 @@ TriangleThresholdCalculator::GenerateData() // Triangle method needs the maximum and minimum indexes // Minimum indexes for this purpose are poorly defined - can't just // take an index with zero entries. - double Mx = itk::NumericTraits::min(); + double Mx = itk::NumericTraits::min(); IndexValueType MxIdx = 0; for (SizeValueType j = 0; j < size; ++j) @@ -73,7 +73,7 @@ TriangleThresholdCalculator::GenerateData() onePC.Fill(histogram->Quantile(0, 0.01)); typename HistogramType::IndexType localIndex; histogram->GetIndex(onePC, localIndex); - const IndexValueType onePCIdx = localIndex[0]; + const IndexValueType onePCIdx = localIndex[0]; typename HistogramType::MeasurementVectorType nnPC(1); nnPC.Fill(histogram->Quantile(0, 0.99)); histogram->GetIndex(nnPC, localIndex); diff --git a/Modules/Filtering/Thresholding/include/itkYenThresholdCalculator.hxx b/Modules/Filtering/Thresholding/include/itkYenThresholdCalculator.hxx index 2bd17c809a9..8f4602b9163 100644 --- a/Modules/Filtering/Thresholding/include/itkYenThresholdCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkYenThresholdCalculator.hxx @@ -46,7 +46,7 @@ YenThresholdCalculator::GenerateData() typename HistogramType::InstanceIdentifier threshold = 0; std::vector norm_histo(size); // normalized histogram - const int total = histogram->GetTotalFrequency(); + const int total = histogram->GetTotalFrequency(); for (int ih = 0; static_cast(ih) < size; ++ih) { diff --git a/Modules/Filtering/Thresholding/test/itkBinaryThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkBinaryThresholdImageFilterTest.cxx index f702ea57a60..f950604c504 100644 --- a/Modules/Filtering/Thresholding/test/itkBinaryThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkBinaryThresholdImageFilterTest.cxx @@ -171,7 +171,7 @@ itkBinaryThresholdImageFilterTest(int, char *[]) const OutputImageType::Pointer outputImage = filter->GetOutput(); // Create an iterator for going through the image output - InputIteratorType it(source->GetOutput(), source->GetOutput()->GetRequestedRegion()); + InputIteratorType it(source->GetOutput(), source->GetOutput()->GetRequestedRegion()); OutputIteratorType ot(outputImage, outputImage->GetRequestedRegion()); // Check the content of the result image @@ -179,7 +179,7 @@ itkBinaryThresholdImageFilterTest(int, char *[]) it.GoToBegin(); while (!ot.IsAtEnd()) { - const InputPixelType input = it.Get(); + const InputPixelType input = it.Get(); const OutputPixelType output = ot.Get(); if (lower <= input && input <= upper) diff --git a/Modules/Filtering/Thresholding/test/itkBinaryThresholdSpatialFunctionTest.cxx b/Modules/Filtering/Thresholding/test/itkBinaryThresholdSpatialFunctionTest.cxx index ebaf334264a..2d842b8c0f9 100644 --- a/Modules/Filtering/Thresholding/test/itkBinaryThresholdSpatialFunctionTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkBinaryThresholdSpatialFunctionTest.cxx @@ -90,7 +90,7 @@ itkBinaryThresholdSpatialFunctionTest(int, char *[]) // Check results const CoordRep val = p * std::sqrt(2.0) - parameters[0]; - const bool expected = (lowerThreshold <= val && upperThreshold >= val); + const bool expected = (lowerThreshold <= val && upperThreshold >= val); if (output != expected) { std::cerr << "Test failed!" << std::endl; diff --git a/Modules/Filtering/Thresholding/test/itkHuangThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkHuangThresholdImageFilterTest.cxx index 730b6f8fb6c..4ce28224c2b 100644 --- a/Modules/Filtering/Thresholding/test/itkHuangThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkHuangThresholdImageFilterTest.cxx @@ -96,7 +96,7 @@ itkHuangThresholdImageFilterTest(int argc, char * argv[]) // Regression test: compare computed threshold - auto expectedThreshold = static_cast(std::stod(argv[5])); + auto expectedThreshold = static_cast(std::stod(argv[5])); const FilterType::InputPixelType resultThreshold = filter->GetThreshold(); if (itk::Math::NotAlmostEquals(expectedThreshold, resultThreshold)) { diff --git a/Modules/Filtering/Thresholding/test/itkIsoDataThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkIsoDataThresholdImageFilterTest.cxx index 4afe2c16e2b..51e909766bf 100644 --- a/Modules/Filtering/Thresholding/test/itkIsoDataThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkIsoDataThresholdImageFilterTest.cxx @@ -95,7 +95,7 @@ itkIsoDataThresholdImageFilterTest(int argc, char * argv[]) ITK_TRY_EXPECT_NO_EXCEPTION(filter->Update()); - auto expectedThreshold = static_cast(std::stod(argv[5])); + auto expectedThreshold = static_cast(std::stod(argv[5])); const FilterType::InputPixelType resultThreshold = filter->GetThreshold(); if (itk::Math::NotAlmostEquals(expectedThreshold, resultThreshold)) { diff --git a/Modules/Filtering/Thresholding/test/itkKappaSigmaThresholdImageCalculatorTest.cxx b/Modules/Filtering/Thresholding/test/itkKappaSigmaThresholdImageCalculatorTest.cxx index 95cdf004915..5c3dc6e4101 100644 --- a/Modules/Filtering/Thresholding/test/itkKappaSigmaThresholdImageCalculatorTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkKappaSigmaThresholdImageCalculatorTest.cxx @@ -74,7 +74,7 @@ itkKappaSigmaThresholdImageCalculatorTest(int argc, char * argv[]) // Regression test: compare computed threshold const CalculatorType::InputPixelType expectedThreshold = std::stod(argv[5]); const CalculatorType::InputPixelType resultThreshold = calculator->GetOutput(); - constexpr double tolerance = 1e-3; + constexpr double tolerance = 1e-3; if (!itk::Math::FloatAlmostEqual( static_cast(expectedThreshold), static_cast(resultThreshold), 10, tolerance)) { diff --git a/Modules/Filtering/Thresholding/test/itkKittlerIllingworthThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkKittlerIllingworthThresholdImageFilterTest.cxx index 9063fe180a6..1d0bcc99b20 100644 --- a/Modules/Filtering/Thresholding/test/itkKittlerIllingworthThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkKittlerIllingworthThresholdImageFilterTest.cxx @@ -95,7 +95,7 @@ itkKittlerIllingworthThresholdImageFilterTest(int argc, char * argv[]) ITK_TRY_EXPECT_NO_EXCEPTION(filter->Update()); // Regression test: compare computed threshold - auto expectedThreshold = static_cast(std::stod(argv[5])); + auto expectedThreshold = static_cast(std::stod(argv[5])); const FilterType::InputPixelType resultThreshold = filter->GetThreshold(); if (itk::Math::NotAlmostEquals(expectedThreshold, resultThreshold)) { diff --git a/Modules/Filtering/Thresholding/test/itkLiThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkLiThresholdImageFilterTest.cxx index 1bd7142f840..713312a09ce 100644 --- a/Modules/Filtering/Thresholding/test/itkLiThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkLiThresholdImageFilterTest.cxx @@ -95,7 +95,7 @@ itkLiThresholdImageFilterTest(int argc, char * argv[]) // Regression test: compare computed threshold - auto expectedThreshold = static_cast(std::stod(argv[5])); + auto expectedThreshold = static_cast(std::stod(argv[5])); const FilterType::InputPixelType resultThreshold = filter->GetThreshold(); if (itk::Math::NotAlmostEquals(expectedThreshold, resultThreshold)) { diff --git a/Modules/Filtering/Thresholding/test/itkMaximumEntropyThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkMaximumEntropyThresholdImageFilterTest.cxx index 9a1833ddb27..daf1e4fbfc5 100644 --- a/Modules/Filtering/Thresholding/test/itkMaximumEntropyThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkMaximumEntropyThresholdImageFilterTest.cxx @@ -96,7 +96,7 @@ itkMaximumEntropyThresholdImageFilterTest(int argc, char * argv[]) // Regression test: compare computed threshold - auto expectedThreshold = static_cast(std::stod(argv[5])); + auto expectedThreshold = static_cast(std::stod(argv[5])); const FilterType::InputPixelType resultThreshold = filter->GetThreshold(); if (itk::Math::NotAlmostEquals(expectedThreshold, resultThreshold)) { diff --git a/Modules/Filtering/Thresholding/test/itkMomentsThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkMomentsThresholdImageFilterTest.cxx index d789b4d3c9f..5259d109201 100644 --- a/Modules/Filtering/Thresholding/test/itkMomentsThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkMomentsThresholdImageFilterTest.cxx @@ -96,7 +96,7 @@ itkMomentsThresholdImageFilterTest(int argc, char * argv[]) // Regression test: compare computed threshold - auto expectedThreshold = static_cast(std::stod(argv[5])); + auto expectedThreshold = static_cast(std::stod(argv[5])); const FilterType::InputPixelType resultThreshold = filter->GetThreshold(); if (itk::Math::NotAlmostEquals(expectedThreshold, resultThreshold)) { diff --git a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest.cxx b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest.cxx index d37420916ca..1d1af6a44f9 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest.cxx @@ -37,7 +37,7 @@ itkOtsuMultipleThresholdsCalculatorTest(int argc, char * argv[]) auto histogram = HistogramType::New(); // Initialize histogram - HistogramType::SizeType size; + HistogramType::SizeType size; HistogramType::MeasurementVectorType lowerBound; HistogramType::MeasurementVectorType upperBound; lowerBound.SetSize(1); diff --git a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest2.cxx b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest2.cxx index 53be4bf5cfa..2a7eba76987 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest2.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest2.cxx @@ -25,12 +25,12 @@ itkOtsuMultipleThresholdsCalculatorTest2(int, char *[]) using HistogramType = itk::Statistics::Histogram; auto histogram = HistogramType::New(); - bool passed = true; + bool passed = true; constexpr unsigned int pixelCount = 4; for (unsigned int thresholdCount = 1; thresholdCount < pixelCount; ++thresholdCount) { // initialize histogram - HistogramType::SizeType size; + HistogramType::SizeType size; HistogramType::MeasurementVectorType lowerBound; HistogramType::MeasurementVectorType upperBound; lowerBound.SetSize(1); diff --git a/Modules/Filtering/Thresholding/test/itkOtsuThresholdCalculatorTest.cxx b/Modules/Filtering/Thresholding/test/itkOtsuThresholdCalculatorTest.cxx index 4c65e1179b1..6d8369e5a57 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuThresholdCalculatorTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuThresholdCalculatorTest.cxx @@ -37,7 +37,7 @@ itkOtsuThresholdCalculatorTest(int, char *[]) using CalculatorType = itk::OtsuThresholdCalculator; // Allocate a simple test image - auto image = ImageType::New(); + auto image = ImageType::New(); ImageType::RegionType region; // Define the image size and physical coordinates diff --git a/Modules/Filtering/Thresholding/test/itkOtsuThresholdCalculatorVersusOtsuMultipleThresholdsCalculatorTest.cxx b/Modules/Filtering/Thresholding/test/itkOtsuThresholdCalculatorVersusOtsuMultipleThresholdsCalculatorTest.cxx index 7d50676ba0f..0ff70a0eda7 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuThresholdCalculatorVersusOtsuMultipleThresholdsCalculatorTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuThresholdCalculatorVersusOtsuMultipleThresholdsCalculatorTest.cxx @@ -69,7 +69,7 @@ itkOtsuThresholdCalculatorVersusOtsuMultipleThresholdsCalculatorTest(int argc, c otsuMultipleCalculator->SetNumberOfThresholds(numberOfThresholds); static constexpr int binsArray[] = { 4, 8, 16, 32, 64, 128, 256, 512, 1024 }; - std::vector binsVector(binsArray, binsArray + sizeof(binsArray) / sizeof(binsArray[0])); + std::vector binsVector(binsArray, binsArray + sizeof(binsArray) / sizeof(binsArray[0])); for (const auto & binsIterator : binsVector) { histogramGenerator->SetNumberOfBins(binsIterator); diff --git a/Modules/Filtering/Thresholding/test/itkOtsuThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkOtsuThresholdImageFilterTest.cxx index 1fdaa6abf7a..c3f74a09fd0 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuThresholdImageFilterTest.cxx @@ -104,7 +104,7 @@ itkOtsuThresholdImageFilterTest(int argc, char * argv[]) // Regression test: compare computed threshold - auto expectedThreshold = static_cast(std::stod(argv[5])); + auto expectedThreshold = static_cast(std::stod(argv[5])); const FilterType::InputPixelType resultThreshold = filter->GetThreshold(); if (itk::Math::NotAlmostEquals(expectedThreshold, resultThreshold)) { diff --git a/Modules/Filtering/Thresholding/test/itkRenyiEntropyThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkRenyiEntropyThresholdImageFilterTest.cxx index 7a874e12b01..53a53dfe4eb 100644 --- a/Modules/Filtering/Thresholding/test/itkRenyiEntropyThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkRenyiEntropyThresholdImageFilterTest.cxx @@ -96,7 +96,7 @@ itkRenyiEntropyThresholdImageFilterTest(int argc, char * argv[]) // Regression test: compare computed threshold - auto expectedThreshold = static_cast(std::stod(argv[5])); + auto expectedThreshold = static_cast(std::stod(argv[5])); const FilterType::InputPixelType resultThreshold = filter->GetThreshold(); if (itk::Math::NotAlmostEquals(expectedThreshold, resultThreshold)) { diff --git a/Modules/Filtering/Thresholding/test/itkShanbhagThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkShanbhagThresholdImageFilterTest.cxx index d7826c02d8f..fcb3d3f2722 100644 --- a/Modules/Filtering/Thresholding/test/itkShanbhagThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkShanbhagThresholdImageFilterTest.cxx @@ -96,7 +96,7 @@ itkShanbhagThresholdImageFilterTest(int argc, char * argv[]) // Regression test: compare computed threshold - auto expectedThreshold = static_cast(std::stod(argv[5])); + auto expectedThreshold = static_cast(std::stod(argv[5])); const FilterType::InputPixelType resultThreshold = filter->GetThreshold(); if (itk::Math::NotAlmostEquals(expectedThreshold, resultThreshold)) { diff --git a/Modules/Filtering/Thresholding/test/itkThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkThresholdImageFilterTest.cxx index 38302401ec4..9e071d02aa3 100644 --- a/Modules/Filtering/Thresholding/test/itkThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkThresholdImageFilterTest.cxx @@ -137,13 +137,13 @@ itkThresholdImageFilterTest(int, char *[]) using PixelType = int; using IntImage1DType = itk::Image; - auto input = IntImage1DType::New(); + auto input = IntImage1DType::New(); IntImage1DType::SpacingValueType inputSpacing[1] = { 0.7 }; input->SetSpacing(inputSpacing); IntImage1DType::PointValueType inputOrigin[1] = { 15 }; input->SetOrigin(inputOrigin); constexpr IntImage1DType::SizeValueType inputSize = 1; - IntImage1DType::RegionType inputRegion; + IntImage1DType::RegionType inputRegion; inputRegion.SetSize(0, inputSize); input->SetRegions(inputRegion); input->Allocate(); diff --git a/Modules/Filtering/Thresholding/test/itkThresholdLabelerImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkThresholdLabelerImageFilterTest.cxx index b3cc73529e5..67c412b1cca 100644 --- a/Modules/Filtering/Thresholding/test/itkThresholdLabelerImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkThresholdLabelerImageFilterTest.cxx @@ -38,8 +38,8 @@ ThresholdLabelerImageFilterTestHelper(bool useRealTypeThresholds) using LabeledImageType = itk::Image; // Create an image with stripes to label - InputImageType::IndexType index = { { 0, 0 } }; - InputImageType::SizeType size = { { 32, 32 } }; + InputImageType::IndexType index = { { 0, 0 } }; + InputImageType::SizeType size = { { 32, 32 } }; InputImageType::RegionType region{ index, size }; auto inputImage = InputImageType::New(); @@ -77,7 +77,7 @@ ThresholdLabelerImageFilterTestHelper(bool useRealTypeThresholds) labels.push_back(3 + offset); // Fill in the image - unsigned int i; + unsigned int i; IndexValueVectorType::const_iterator indexIter; for (indexIter = yindexes.begin(), i = 0; indexIter != yindexes.end(); ++indexIter, ++i) { diff --git a/Modules/Filtering/Thresholding/test/itkTriangleThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkTriangleThresholdImageFilterTest.cxx index 0af102f0733..38ce4caf26a 100644 --- a/Modules/Filtering/Thresholding/test/itkTriangleThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkTriangleThresholdImageFilterTest.cxx @@ -94,7 +94,7 @@ itkTriangleThresholdImageFilterTest(int argc, char * argv[]) // Regression test: compare computed threshold - auto expectedThreshold = static_cast(std::stod(argv[5])); + auto expectedThreshold = static_cast(std::stod(argv[5])); const FilterType::InputPixelType resultThreshold = filter->GetThreshold(); if (itk::Math::NotAlmostEquals(expectedThreshold, resultThreshold)) { diff --git a/Modules/Filtering/Thresholding/test/itkYenThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkYenThresholdImageFilterTest.cxx index 6fbdcb14dab..9f8105758d0 100644 --- a/Modules/Filtering/Thresholding/test/itkYenThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkYenThresholdImageFilterTest.cxx @@ -95,7 +95,7 @@ itkYenThresholdImageFilterTest(int argc, char * argv[]) ITK_TRY_EXPECT_NO_EXCEPTION(filter->Update()); // Regression test: compare computed threshold - auto expectedThreshold = static_cast(std::stod(argv[5])); + auto expectedThreshold = static_cast(std::stod(argv[5])); const FilterType::InputPixelType resultThreshold = filter->GetThreshold(); if (itk::Math::NotAlmostEquals(expectedThreshold, resultThreshold)) { diff --git a/Modules/IO/BMP/include/itkBMPImageIO.h b/Modules/IO/BMP/include/itkBMPImageIO.h index 32546c77fe6..52713ad99ae 100644 --- a/Modules/IO/BMP/include/itkBMPImageIO.h +++ b/Modules/IO/BMP/include/itkBMPImageIO.h @@ -114,16 +114,16 @@ class ITKIOBMP_EXPORT BMPImageIO : public ImageIOBase RGBPixelType GetColorPaletteEntry(const unsigned char entry) const; - std::ifstream m_Ifstream{}; - std::ofstream m_Ofstream{}; - long m_BitMapOffset{ 0 }; - bool m_FileLowerLeft{ false }; - short m_Depth{ 8 }; + std::ifstream m_Ifstream{}; + std::ofstream m_Ofstream{}; + long m_BitMapOffset{ 0 }; + bool m_FileLowerLeft{ false }; + short m_Depth{ 8 }; unsigned short m_NumberOfColors{ 0 }; - unsigned int m_ColorPaletteSize{ 0 }; - long m_BMPCompression{ 0 }; - unsigned long m_BMPDataSize{ 0 }; - PaletteType m_ColorPalette{}; + unsigned int m_ColorPaletteSize{ 0 }; + long m_BMPCompression{ 0 }; + unsigned long m_BMPDataSize{ 0 }; + PaletteType m_ColorPalette{}; }; } // end namespace itk diff --git a/Modules/IO/BMP/src/itkBMPImageIO.cxx b/Modules/IO/BMP/src/itkBMPImageIO.cxx index 656d2359640..958409cbc6e 100644 --- a/Modules/IO/BMP/src/itkBMPImageIO.cxx +++ b/Modules/IO/BMP/src/itkBMPImageIO.cxx @@ -172,7 +172,7 @@ BMPImageIO::CanWriteFile(const char * name) void BMPImageIO::Read(void * buffer) { - auto * p = static_cast(buffer); + auto * p = static_cast(buffer); unsigned long l = 0; this->OpenFileForReading(m_Ifstream, m_FileName); @@ -283,8 +283,8 @@ BMPImageIO::Read(void * buffer) { // File is not compressed // Read one row at a time - const long streamRead = m_Dimensions[0] * m_Depth / 8; - long paddedStreamRead = streamRead; + const long streamRead = m_Dimensions[0] * m_Depth / 8; + long paddedStreamRead = streamRead; const unsigned long step = this->GetNumberOfComponents(); if (streamRead % 4) { @@ -384,8 +384,8 @@ BMPImageIO::ReadImageInformation() m_BitMapOffset = static_cast(itmp); } - int xsize; - int ysize; + int xsize; + int ysize; long infoSize; // get size of header if (sizeLong == 4) // if we are on a 32 bit machine @@ -760,14 +760,14 @@ BMPImageIO::Write(const void * buffer) m_Ofstream.write(&tmp, sizeof(char)); const unsigned int bpp = this->GetNumberOfComponents(); - long bytesPerRow = m_Dimensions[0] * bpp; + long bytesPerRow = m_Dimensions[0] * bpp; if (bytesPerRow % 4) { bytesPerRow = ((bytesPerRow / 4) + 1) * 4; } const unsigned long paddedBytes = bytesPerRow - (m_Dimensions[0] * bpp); - const auto rawImageDataSize = static_cast((bytesPerRow * m_Dimensions[1])); + const auto rawImageDataSize = static_cast((bytesPerRow * m_Dimensions[1])); unsigned int fileSize = (rawImageDataSize) + 54; if (bpp == 1) { @@ -874,7 +874,7 @@ BMPImageIO::Write(const void * buffer) for (unsigned int h = 0; h < m_Dimensions[1]; ++h) { constexpr char paddingValue = 0; - const auto * ptr = static_cast(buffer); + const auto * ptr = static_cast(buffer); ptr += (m_Dimensions[1] - (h + 1)) * m_Dimensions[0] * bpp; if (bpp == 1) { diff --git a/Modules/IO/BMP/test/itkBMPImageIOTestExtension.cxx b/Modules/IO/BMP/test/itkBMPImageIOTestExtension.cxx index c4587934d16..60f142f6670 100644 --- a/Modules/IO/BMP/test/itkBMPImageIOTestExtension.cxx +++ b/Modules/IO/BMP/test/itkBMPImageIOTestExtension.cxx @@ -71,8 +71,8 @@ itkBMPImageIOTestExtension(int argc, char * argv[]) ITK_TRY_EXPECT_NO_EXCEPTION(reader->Update()); const itk::ImageRegion<2> expected_region{ itk::Size<2>{ { 1, 1 } } }; - constexpr ComponentType expected_rgb[] = { 255, 0, 0 }; - const PixelType expected_pixel{ expected_rgb }; + constexpr ComponentType expected_rgb[] = { 255, 0, 0 }; + const PixelType expected_pixel{ expected_rgb }; // check that data has been actually read auto image = reader->GetOutput(); ITK_TEST_EXPECT_EQUAL(image->GetLargestPossibleRegion(), expected_region); diff --git a/Modules/IO/BioRad/src/itkBioRadImageIO.cxx b/Modules/IO/BioRad/src/itkBioRadImageIO.cxx index 6c8cd96ab8f..64eed3179b0 100644 --- a/Modules/IO/BioRad/src/itkBioRadImageIO.cxx +++ b/Modules/IO/BioRad/src/itkBioRadImageIO.cxx @@ -42,8 +42,8 @@ namespace itk union Aligned4ByteUnion { float localFloatMagFactor; - int localIntNoteNext; - char localChar4Array[4]; + int localIntNoteNext; + char localChar4Array[4]; }; struct bioradheader @@ -52,21 +52,21 @@ struct bioradheader // pixels unsigned short npic; // 4 2 number of images in file unsigned short ramp1_min, ramp1_max; // 6 2*2 LUT1 ramp min. and max. - char notes[4]; // 10 4 no notes=0; has notes=non + char notes[4]; // 10 4 no notes=0; has notes=non // zero - short byte_format; // 14 2 bytes=TRUE(1); words=FALSE(0) - short image_number; // 16 2 image number within file - char filename[32]; // 18 32 file name - short merged; // 50 2 merged format + short byte_format; // 14 2 bytes=TRUE(1); words=FALSE(0) + short image_number; // 16 2 image number within file + char filename[32]; // 18 32 file name + short merged; // 50 2 merged format unsigned short color1; // 52 2 LUT1 color status unsigned short file_id; // 54 2 valid .PIC file=12345 unsigned short ramp2_min, ramp2_max; // 56 2*2 LUT2 ramp min. and max. unsigned short color2; // 60 2 LUT2 color status - short edited; // 62 2 image has been edited=TRUE(1) - short lens; // 64 2 Integer part of lens + short edited; // 62 2 image has been edited=TRUE(1) + short lens; // 64 2 Integer part of lens // magnification - char mag_factor[4]; // 66 4 4 byte real mag. factor (old ver.) - unsigned char reserved[6]; // 70 6 NOT USED (old ver.=real lens mag.) + char mag_factor[4]; // 66 4 4 byte real mag. factor (old ver.) + unsigned char reserved[6]; // 70 6 NOT USED (old ver.=real lens mag.) }; enum biorad_notestatus @@ -97,19 +97,19 @@ enum biorad_notetype struct bioradnote { - short level; // 0 level of note -- no longer - // used - char next[4]; // 2 indicates there is a note - // after this one - short num; // 6 image number for the display - // of this note - short status; // 8 one of NOTE_STATUS_ALL, - // NOTE_STATUS_DISPLAY, - // NOTE_STATUS_POSITION - short type; // 10 type code for note - short x; // 12 x coordinate for note - short y; // 14 y coordinate for note - char text[80]; // 16 info, maybe not null terminated + short level; // 0 level of note -- no longer + // used + char next[4]; // 2 indicates there is a note + // after this one + short num; // 6 image number for the display + // of this note + short status; // 8 one of NOTE_STATUS_ALL, + // NOTE_STATUS_DISPLAY, + // NOTE_STATUS_POSITION + short type; // 10 type code for note + short x; // 12 x coordinate for note + short y; // 14 y coordinate for note + char text[80]; // 16 info, maybe not null terminated }; BioRadImageIO::BioRadImageIO() @@ -132,7 +132,7 @@ BioRadImageIO::~BioRadImageIO() = default; bool BioRadImageIO::CanReadFile(const char * filename) { - std::ifstream file; + std::ifstream file; const std::string fname(filename); if (fname.empty()) @@ -259,7 +259,7 @@ BioRadImageIO::InternalReadImageInformation(std::ifstream & file) // of the file in this case, since byte_format = 1 seems to be the default file.seekg(0, std::ios::end); const SizeValueType gcount = static_cast(file.tellg()) - BIORAD_HEADER_LENGTH; - const auto hsize = static_cast(h.nx * h.ny * h.npic); + const auto hsize = static_cast(h.nx * h.ny * h.npic); if (gcount == hsize) { itkWarningMacro("File is declared as two bytes but really is only one byte"); @@ -275,7 +275,7 @@ BioRadImageIO::InternalReadImageInformation(std::ifstream & file) itkExceptionMacro("Cannot read requested file"); } } - int punt(0); + int punt(0); unsigned int notes; memcpy(¬es, h.notes, sizeof(notes)); ByteSwapper::SwapFromSystemToLittleEndian(¬es); @@ -311,9 +311,9 @@ BioRadImageIO::InternalReadImageInformation(std::ifstream & file) if (note.type == NOTE_TYPE_VARIABLE) { punt = false; - const std::string note_text(note.text); + const std::string note_text(note.text); std::istringstream ss(note_text); - std::string label; + std::string label; ss >> label; short type; ss >> type; @@ -409,7 +409,7 @@ BioRadImageIO::Write(const void * buffer) } // Write the BioRad header information - bioradheader header{}; + bioradheader header{}; bioradheader * p = &header; if constexpr (sizeof(header) != BIORAD_HEADER_LENGTH) { diff --git a/Modules/IO/Bruker/src/itkBruker2dseqImageIO.cxx b/Modules/IO/Bruker/src/itkBruker2dseqImageIO.cxx index 61af5d50d72..0e7798d24d0 100644 --- a/Modules/IO/Bruker/src/itkBruker2dseqImageIO.cxx +++ b/Modules/IO/Bruker/src/itkBruker2dseqImageIO.cxx @@ -53,11 +53,11 @@ GetParameter(const itk::MetaDataDictionary & dict, const std::string & name) // Internal function to rescale pixel according to slope & intercept template void -Rescale(T * buffer, +Rescale(T * buffer, const std::vector & slopes, const std::vector & offsets, - const SizeType frameSize, - const SizeType frameCount) + const SizeType frameSize, + const SizeType frameCount) { SizeType i = 0; for (SizeType f = 0; f < frameCount; ++f) @@ -73,7 +73,7 @@ Rescale(T * buffer, // Internal function to swap slices and volumes template void -SwapSlicesAndVolumes(T * buffer, +SwapSlicesAndVolumes(T * buffer, const SizeType sizeX, const SizeType sizeY, const SizeType sizeZ, @@ -82,8 +82,8 @@ SwapSlicesAndVolumes(T * buffer, { const SizeType szSlice = sizeX * sizeY; std::vector tempBuffer(szSlice * sizeZ * sizeToSwap * sizeNoSwap); - T * toPixel = &(tempBuffer[0]); - T * fromNoSwapVol = buffer; + T * toPixel = &(tempBuffer[0]); + T * fromNoSwapVol = buffer; for (SizeType n = 0; n < sizeNoSwap; ++n) { T * fromSwapVol = fromNoSwapVol; @@ -120,8 +120,8 @@ void ReverseSliceOrder(T * buffer, const SizeType sizeX, const SizeType sizeY, const SizeType sz, const SizeType sizeToSwap) { const SizeType ss = sizeX * sizeY; - T * fromVol = buffer; - T temp; + T * fromVol = buffer; + T temp; for (SizeType v = 0; v < sizeToSwap; ++v) { T * fromSlice = fromVol; @@ -202,7 +202,7 @@ ReadJCAMPDX(const std::string & filename, MetaDataDictionary & dict) } const std::string parname = line.substr(3, epos - 3); - std::string par = line.substr(epos + 1); + std::string par = line.substr(epos + 1); if (par[0] == '(') { // Array value @@ -236,8 +236,8 @@ ReadJCAMPDX(const std::string & filename, MetaDataDictionary & dict) else { // An array of numbers - std::stringstream lineStream(lines); - double doubleValue; + std::stringstream lineStream(lines); + double doubleValue; std::vector doubleArray; while (lineStream >> doubleValue) { @@ -262,8 +262,8 @@ ReadJCAMPDX(const std::string & filename, MetaDataDictionary & dict) std::vector> stringArrayArray; while (leftBracket != std::string::npos) { - std::string::size_type stringStart = leftBracket + 1; - std::string::size_type stringEnd = lines.find(',', stringStart); + std::string::size_type stringStart = leftBracket + 1; + std::string::size_type stringEnd = lines.find(',', stringStart); std::vector stringArray; while (stringStart < rightBracket) { @@ -287,9 +287,9 @@ ReadJCAMPDX(const std::string & filename, MetaDataDictionary & dict) std::vector> doubleArrayArray; while (leftBracket != std::string::npos) { - std::istringstream arrayStream(lines.substr(leftBracket, rightBracket - leftBracket)); + std::istringstream arrayStream(lines.substr(leftBracket, rightBracket - leftBracket)); std::vector doubleArray; - double doubleValue; + double doubleValue; while (arrayStream >> doubleValue) { doubleArray.push_back(doubleValue); @@ -311,7 +311,7 @@ ReadJCAMPDX(const std::string & filename, MetaDataDictionary & dict) { // A single value std::istringstream streamPar(par); - double value; + double value; streamPar >> value; if (streamPar.fail()) { @@ -488,7 +488,7 @@ Bruker2dseqImageIO::Read(void * buffer) } std::vector dataFromDisk(numberOfBytesOnDisk); - char * dataFromDiskBuffer = &(dataFromDisk[0]); + char * dataFromDiskBuffer = &(dataFromDisk[0]); stream2Dseq.read(dataFromDiskBuffer, numberOfBytesOnDisk); if (stream2Dseq.fail()) { @@ -536,7 +536,7 @@ Bruker2dseqImageIO::Read(void * buffer) else { const auto numberOfBytesOnDisk = this->GetImageSizeInBytes(); - auto * charBuffer = static_cast(buffer); + auto * charBuffer = static_cast(buffer); stream2Dseq.read(charBuffer, numberOfBytesOnDisk); if (stream2Dseq.fail()) { @@ -546,11 +546,11 @@ Bruker2dseqImageIO::Read(void * buffer) } const MetaDataDictionary & dict = this->GetMetaDataDictionary(); - const auto slopes = GetParameter>(dict, "VisuCoreDataSlope"); - const auto offsets = GetParameter>(dict, "VisuCoreDataOffs"); - const SizeType frameCount = static_cast(GetParameter(dict, "VisuCoreFrameCount")); - const SizeType frameDim = static_cast(GetParameter(dict, "VisuCoreDim")); - SizeType frameSize = this->GetDimensions(0) * this->GetDimensions(1); + const auto slopes = GetParameter>(dict, "VisuCoreDataSlope"); + const auto offsets = GetParameter>(dict, "VisuCoreDataOffs"); + const SizeType frameCount = static_cast(GetParameter(dict, "VisuCoreFrameCount")); + const SizeType frameDim = static_cast(GetParameter(dict, "VisuCoreDim")); + SizeType frameSize = this->GetDimensions(0) * this->GetDimensions(1); if (frameDim == 3) { @@ -788,8 +788,8 @@ Bruker2dseqImageIO::ReadImageInformation() const SizeType brukerDim = static_cast(GetParameter(dict, "VisuCoreDim")); const SizeType frames = static_cast(GetParameter(dict, "VisuCoreFrameCount")); - const auto size = GetParameter>(dict, "VisuCoreSize"); - const auto FoV = GetParameter>(dict, "VisuCoreExtent"); + const auto size = GetParameter>(dict, "VisuCoreSize"); + const auto FoV = GetParameter>(dict, "VisuCoreExtent"); if (brukerDim == 1) { @@ -811,8 +811,8 @@ Bruker2dseqImageIO::ReadImageInformation() halfStep[1] = FoV[1] / (2 * size[1]); SizeType sizeZ = 1; SizeType sizeT = 1; - double spacingZ = 1; - double reverseZ = 1; + double spacingZ = 1; + double reverseZ = 1; if (brukerDim == 2) { // The obvious way to get number of slices is sum of SlicePacksSlices - but single-slice images do not store this! @@ -861,7 +861,7 @@ Bruker2dseqImageIO::ReadImageInformation() // changing. const vnl_vector corner1(&position[0], 3); const vnl_vector corner2(&position[3], 3); - vnl_vector diff = corner2 - corner1; + vnl_vector diff = corner2 - corner1; if (diff[1] != 0) { reverseZ = -1; @@ -911,7 +911,7 @@ Bruker2dseqImageIO::ReadImageInformation() // Now work out the correct ITK origin including the half-voxel offset const vnl_vector corner(&position[0], 3); - vnl_vector origin = corner + dirMatrix * halfStep; + vnl_vector origin = corner + dirMatrix * halfStep; this->SetOrigin(0, origin[0]); this->SetOrigin(1, origin[1]); diff --git a/Modules/IO/Bruker/test/itkBrukerImageTest.cxx b/Modules/IO/Bruker/test/itkBrukerImageTest.cxx index 874c5ac8f40..a41e22ee63a 100644 --- a/Modules/IO/Bruker/test/itkBrukerImageTest.cxx +++ b/Modules/IO/Bruker/test/itkBrukerImageTest.cxx @@ -47,7 +47,7 @@ itkBrukerImageTest(int argc, char * argv[]) ITK_EXERCISE_BASIC_OBJECT_METHODS(brukerImageIO, Bruker2dseqImageIO, ImageIOBase); const char * inputFilename = argv[1]; - const bool canReadFile = brukerImageIO->CanReadFile(inputFilename); + const bool canReadFile = brukerImageIO->CanReadFile(inputFilename); if (canReadFile) { using ReaderType = itk::ImageFileReader; diff --git a/Modules/IO/CSV/include/itkCSVArray2DDataObject.h b/Modules/IO/CSV/include/itkCSVArray2DDataObject.h index 9caa7ac6b1e..be3a5af5e54 100644 --- a/Modules/IO/CSV/include/itkCSVArray2DDataObject.h +++ b/Modules/IO/CSV/include/itkCSVArray2DDataObject.h @@ -176,11 +176,11 @@ class ITK_TEMPLATE_EXPORT CSVArray2DDataObject : public DataObject PrintSelf(std::ostream & os, Indent indent) const override; private: - MatrixType m_Matrix{}; + MatrixType m_Matrix{}; StringVectorType m_ColumnHeaders{}; StringVectorType m_RowHeaders{}; - bool m_HasRowHeaders{ false }; - bool m_HasColumnHeaders{ false }; + bool m_HasRowHeaders{ false }; + bool m_HasColumnHeaders{ false }; }; } // end namespace itk diff --git a/Modules/IO/CSV/include/itkCSVArray2DDataObject.hxx b/Modules/IO/CSV/include/itkCSVArray2DDataObject.hxx index ad0ae55db2e..7eb33877314 100644 --- a/Modules/IO/CSV/include/itkCSVArray2DDataObject.hxx +++ b/Modules/IO/CSV/include/itkCSVArray2DDataObject.hxx @@ -48,7 +48,7 @@ CSVArray2DDataObject::GetRowIndexByName(const std::string & row_name) con itkExceptionMacro("The dataset does not contain any row headers!"); } - const auto it = std::find(this->m_RowHeaders.begin(), this->m_RowHeaders.end(), row_name); + const auto it = std::find(this->m_RowHeaders.begin(), this->m_RowHeaders.end(), row_name); const unsigned int index = distance(this->m_RowHeaders.begin(), it); if (it == this->m_RowHeaders.end()) @@ -67,7 +67,7 @@ CSVArray2DDataObject::GetColumnIndexByName(const std::string & column_nam itkExceptionMacro("The dataset does not contain any column headers!"); } - const auto it = std::find(this->m_ColumnHeaders.begin(), this->m_ColumnHeaders.end(), column_name); + const auto it = std::find(this->m_ColumnHeaders.begin(), this->m_ColumnHeaders.end(), column_name); const unsigned int index = distance(this->m_ColumnHeaders.begin(), it); if (it == this->m_ColumnHeaders.end()) @@ -81,7 +81,7 @@ template auto CSVArray2DDataObject::GetRow(const unsigned int row_index) const -> NumericVectorType { - NumericVectorType row; + NumericVectorType row; const unsigned int max_rows = this->m_Matrix.rows() - 1; if (row_index > max_rows) { @@ -99,7 +99,7 @@ template auto CSVArray2DDataObject::GetRow(const std::string & row_name) const -> NumericVectorType { - NumericVectorType row; + NumericVectorType row; const unsigned int index = this->GetRowIndexByName(row_name); row = this->GetRow(index); return row; @@ -109,7 +109,7 @@ template auto CSVArray2DDataObject::GetColumn(const unsigned int column_index) const -> NumericVectorType { - NumericVectorType column; + NumericVectorType column; const unsigned int max_columns = this->m_Matrix.columns() - 1; if (column_index > max_columns) { @@ -127,7 +127,7 @@ template auto CSVArray2DDataObject::GetColumn(const std::string & column_name) const -> NumericVectorType { - NumericVectorType column; + NumericVectorType column; const unsigned int index = this->GetColumnIndexByName(column_name); column = this->GetColumn(index); return column; diff --git a/Modules/IO/CSV/include/itkCSVFileReaderBase.h b/Modules/IO/CSV/include/itkCSVFileReaderBase.h index 3b0485e64ef..7a71fbfd783 100644 --- a/Modules/IO/CSV/include/itkCSVFileReaderBase.h +++ b/Modules/IO/CSV/include/itkCSVFileReaderBase.h @@ -142,7 +142,7 @@ class ITKIOCSV_EXPORT CSVFileReaderBase : public LightProcessObject TData ConvertStringToValueType(const std::string str) { - TData value; + TData value; std::istringstream isstream(str); if ((isstream >> value).fail() || !(isstream >> std::ws).eof()) @@ -164,15 +164,15 @@ class ITKIOCSV_EXPORT CSVFileReaderBase : public LightProcessObject Parse() = 0; protected: - std::string m_FileName{}; - char m_FieldDelimiterCharacter{}; - char m_StringDelimiterCharacter{}; - bool m_UseStringDelimiterCharacter{}; - bool m_HasRowHeaders{}; - bool m_HasColumnHeaders{}; + std::string m_FileName{}; + char m_FieldDelimiterCharacter{}; + char m_StringDelimiterCharacter{}; + bool m_UseStringDelimiterCharacter{}; + bool m_HasRowHeaders{}; + bool m_HasColumnHeaders{}; std::ifstream m_InputStream{}; - int m_EndOfColumnHeadersLine{}; - std::string m_Line{}; + int m_EndOfColumnHeadersLine{}; + std::string m_Line{}; CSVFileReaderBase(); ~CSVFileReaderBase() override = default; diff --git a/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.h b/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.h index 44d71b3e8f3..e52fcc40598 100644 --- a/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.h +++ b/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.h @@ -130,11 +130,11 @@ class ITK_TEMPLATE_EXPORT CSVNumericObjectFileWriter : public LightProcessObject PrintSelf(std::ostream & os, Indent indent) const override; private: - std::string m_FileName{}; - TValue * m_InputObject{}; - char m_FieldDelimiterCharacter{}; - SizeValueType m_Rows{}; - SizeValueType m_Columns{}; + std::string m_FileName{}; + TValue * m_InputObject{}; + char m_FieldDelimiterCharacter{}; + SizeValueType m_Rows{}; + SizeValueType m_Columns{}; StringVectorType m_ColumnHeaders{}; StringVectorType m_RowHeaders{}; }; diff --git a/Modules/IO/CSV/src/itkCSVFileReaderBase.cxx b/Modules/IO/CSV/src/itkCSVFileReaderBase.cxx index 8b5f6a272c7..f85576591d9 100644 --- a/Modules/IO/CSV/src/itkCSVFileReaderBase.cxx +++ b/Modules/IO/CSV/src/itkCSVFileReaderBase.cxx @@ -79,7 +79,7 @@ CSVFileReaderBase::GetDataDimension(SizeValueType & rows, SizeValueType & cols) unsigned int prev_cols = 0; unsigned int current_cols = 0; unsigned int max_cols = 0; - bool isSame = true; + bool isSame = true; // If column headers exist, if (this->m_HasColumnHeaders) diff --git a/Modules/IO/CSV/test/itkCSVArray2DFileReaderWriterTest.cxx b/Modules/IO/CSV/test/itkCSVArray2DFileReaderWriterTest.cxx index 6e982ff4548..52b5f358455 100644 --- a/Modules/IO/CSV/test/itkCSVArray2DFileReaderWriterTest.cxx +++ b/Modules/IO/CSV/test/itkCSVArray2DFileReaderWriterTest.cxx @@ -71,7 +71,7 @@ itkCSVFileReaderWriterTest_Func(int argc, char * argv[], bool headers) using MatrixType = itk::Array2D; constexpr unsigned int ARows = 3; constexpr unsigned int ACols = 6; - MatrixType matrix(ARows, ACols); + MatrixType matrix(ARows, ACols); matrix[0][0] = nan; matrix[0][1] = 1e+09; matrix[0][2] = 5; @@ -158,7 +158,7 @@ itkCSVFileReaderWriterTest_Func(int argc, char * argv[], bool headers) using DataFrameObjectType = itk::CSVArray2DDataObject; const DataFrameObjectType::Pointer dfo = reader->GetOutput(); - const MatrixType test_matrix = dfo->GetMatrix(); + const MatrixType test_matrix = dfo->GetMatrix(); std::cout << "Actual array: " << std::endl; std::cout << matrix << std::endl; diff --git a/Modules/IO/CSV/test/itkCSVNumericObjectFileWriterTest.cxx b/Modules/IO/CSV/test/itkCSVNumericObjectFileWriterTest.cxx index b9e7932b13c..62c8b77944e 100644 --- a/Modules/IO/CSV/test/itkCSVNumericObjectFileWriterTest.cxx +++ b/Modules/IO/CSV/test/itkCSVNumericObjectFileWriterTest.cxx @@ -29,7 +29,7 @@ itkCSVNumericObjectFileWriterTest(int argc, char * argv[]) return EXIT_FAILURE; } - constexpr double nan = std::numeric_limits::quiet_NaN(); + constexpr double nan = std::numeric_limits::quiet_NaN(); constexpr unsigned int ARows = 3; constexpr unsigned int ACols = 6; diff --git a/Modules/IO/DCMTK/include/itkDCMTKFileReader.h b/Modules/IO/DCMTK/include/itkDCMTKFileReader.h index 299283c1f67..d45230bf7aa 100644 --- a/Modules/IO/DCMTK/include/itkDCMTKFileReader.h +++ b/Modules/IO/DCMTK/include/itkDCMTKFileReader.h @@ -70,8 +70,8 @@ class ITKIODCMTK_EXPORT DCMTKItem int GetElementSQ(const unsigned short group, const unsigned short entry, - DCMTKSequence & sequence, - const bool throwException = true) const; + DCMTKSequence & sequence, + const bool throwException = true) const; private: DcmItem * m_DcmItem{ nullptr }; @@ -90,32 +90,32 @@ class ITKIODCMTK_EXPORT DCMTKSequence int GetStack(const unsigned short group, const unsigned short element, - DcmStack & resultStack, - const bool throwException = true) const; + DcmStack & resultStack, + const bool throwException = true) const; int GetElementCS(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException = true) const; + std::string & target, + const bool throwException = true) const; int GetElementOB(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException = true) const; + std::string & target, + const bool throwException = true) const; int GetElementCSorOB(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException = true) const; + std::string & target, + const bool throwException = true) const; template int GetElementDSorOB(const unsigned short group, const unsigned short element, - TType & target, - const bool throwException = true) const + TType & target, + const bool throwException = true) const { if (this->GetElementDS(group, element, 1, &target, false) == EXIT_SUCCESS) { @@ -137,9 +137,9 @@ class ITKIODCMTK_EXPORT DCMTKSequence int GetElementDSorOB(const unsigned short group, const unsigned short element, - int count, - TType * target, - const bool throwException = true) const + int count, + TType * target, + const bool throwException = true) const { if (this->GetElementDS(group, element, count, target, false) == EXIT_SUCCESS) { @@ -164,24 +164,24 @@ class ITKIODCMTK_EXPORT DCMTKSequence int GetElementFD(const unsigned short group, const unsigned short element, - int count, - double * target, - const bool throwException = true) const; + int count, + double * target, + const bool throwException = true) const; int GetElementFD(const unsigned short group, const unsigned short element, - double & target, - const bool throwException = true) const; + double & target, + const bool throwException = true) const; int GetElementDS(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException = true) const; + std::string & target, + const bool throwException = true) const; int GetElementTM(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException = true) const; + std::string & target, + const bool throwException = true) const; /** Get an array of data values, as contained in a DICOM * DecimalString Item */ @@ -189,9 +189,9 @@ class ITKIODCMTK_EXPORT DCMTKSequence int GetElementDS(const unsigned short group, const unsigned short element, - unsigned short count, - TType * target, - const bool throwException = true) const + unsigned short count, + TType * target, + const bool throwException = true) const { DcmStack resultStack; if (this->GetStack(group, element, resultStack, throwException) != EXIT_SUCCESS) @@ -225,8 +225,8 @@ class ITKIODCMTK_EXPORT DCMTKSequence int GetElementSQ(const unsigned short group, const unsigned short element, - DCMTKSequence & target, - const bool throwException = true) const; + DCMTKSequence & target, + const bool throwException = true) const; int GetElementItem(unsigned short itemIndex, DCMTKItem & target, const bool throwException = true) const; @@ -260,13 +260,13 @@ class ITKIODCMTK_EXPORT DCMTKFileReader int GetElementLO(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException = true) const; + std::string & target, + const bool throwException = true) const; int - GetElementLO(const unsigned short group, - const unsigned short element, + GetElementLO(const unsigned short group, + const unsigned short element, std::vector & target, - const bool throwException = true) const; + const bool throwException = true) const; /** Get an array of data values, as contained in a DICOM * DecimalString Item @@ -275,11 +275,11 @@ class ITKIODCMTK_EXPORT DCMTKFileReader int GetElementDS(const unsigned short group, const unsigned short element, - unsigned short count, - TType * target, - const bool throwException = true) const + unsigned short count, + TType * target, + const bool throwException = true) const { - DcmTagKey tagkey(group, element); + DcmTagKey tagkey(group, element); DcmElement * el; if (this->m_Dataset->findAndGetElement(tagkey, el) != EC_Normal) { @@ -313,8 +313,8 @@ class ITKIODCMTK_EXPORT DCMTKFileReader int GetElementDSorOB(const unsigned short group, const unsigned short element, - TType & target, - const bool throwException = true) const + TType & target, + const bool throwException = true) const { if (this->GetElementDS(group, element, 1, &target, false) == EXIT_SUCCESS) { @@ -349,113 +349,113 @@ class ITKIODCMTK_EXPORT DCMTKFileReader int GetElementDS(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException = true) const; + std::string & target, + const bool throwException = true) const; int GetElementFD(const unsigned short group, const unsigned short element, - double & target, - const bool throwException = true) const; + double & target, + const bool throwException = true) const; int GetElementFD(const unsigned short group, const unsigned short element, - int count, - double * target, - const bool throwException = true) const; + int count, + double * target, + const bool throwException = true) const; int GetElementFL(const unsigned short group, const unsigned short element, - float & target, - const bool throwException = true) const; + float & target, + const bool throwException = true) const; int GetElementFLorOB(const unsigned short group, const unsigned short element, - float & target, - const bool throwException = true) const; + float & target, + const bool throwException = true) const; int GetElementUS(const unsigned short group, const unsigned short element, - unsigned short & target, - const bool throwException = true) const; + unsigned short & target, + const bool throwException = true) const; int GetElementUS(const unsigned short group, const unsigned short element, - unsigned short *& target, - const bool throwException = true) const; + unsigned short *& target, + const bool throwException = true) const; /** Get a DecimalString Item as a single string */ int GetElementCS(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException = true) const; + std::string & target, + const bool throwException = true) const; /** Get a PersonName Item as a single string */ int GetElementPN(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException = true) const; + std::string & target, + const bool throwException = true) const; /** get an IS (Integer String Item */ int GetElementIS(const unsigned short group, const unsigned short element, - itk::int32_t & target, - const bool throwException = true) const; + itk::int32_t & target, + const bool throwException = true) const; int GetElementSL(const unsigned short group, const unsigned short element, - itk::int32_t & target, - const bool throwException = true) const; + itk::int32_t & target, + const bool throwException = true) const; int GetElementISorOB(const unsigned short group, const unsigned short element, - itk::int32_t & target, - const bool throwException = true) const; + itk::int32_t & target, + const bool throwException = true) const; int GetElementCSorOB(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException = true) const; + std::string & target, + const bool throwException = true) const; /** get an OB OtherByte Item */ int GetElementOB(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException = true) const; + std::string & target, + const bool throwException = true) const; int GetElementSQ(const unsigned short group, - unsigned short entry, - DCMTKSequence & sequence, - const bool throwException = true) const; + unsigned short entry, + DCMTKSequence & sequence, + const bool throwException = true) const; int GetElementUI(const unsigned short group, - unsigned short entry, - std::string & target, - const bool throwException = true) const; + unsigned short entry, + std::string & target, + const bool throwException = true) const; int GetElementDA(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException = true) const; + std::string & target, + const bool throwException = true) const; int GetElementTM(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException = true) const; + std::string & target, + const bool throwException = true) const; int GetDirCosines(vnl_vector & dir1, vnl_vector & dir2, vnl_vector & dir3) const; @@ -499,12 +499,12 @@ class ITKIODCMTK_EXPORT DCMTKFileReader IsImageFile(const std::string & filename); private: - std::string m_FileName; - DcmFileFormat * m_DFile{ nullptr }; - DcmDataset * m_Dataset{ nullptr }; + std::string m_FileName; + DcmFileFormat * m_DFile{ nullptr }; + DcmDataset * m_Dataset{ nullptr }; E_TransferSyntax m_Xfer{ EXS_Unknown }; - Sint32 m_FrameCount{ 0 }; - long m_FileNumber{ -1L }; + Sint32 m_FrameCount{ 0 }; + long m_FileNumber{ -1L }; }; extern bool diff --git a/Modules/IO/DCMTK/include/itkDCMTKImageIO.h b/Modules/IO/DCMTK/include/itkDCMTKImageIO.h index 0fd3756e9d6..7e932b2fa27 100644 --- a/Modules/IO/DCMTK/include/itkDCMTKImageIO.h +++ b/Modules/IO/DCMTK/include/itkDCMTKImageIO.h @@ -57,7 +57,7 @@ class DCMTKImageIOEnums }; // Define how to print enumeration extern ITKIODCMTK_EXPORT std::ostream & - operator<<(std::ostream & out, const DCMTKImageIOEnums::LogLevel value); +operator<<(std::ostream & out, const DCMTKImageIOEnums::LogLevel value); /** * \class DCMTKImageIO @@ -163,7 +163,7 @@ class ITKIODCMTK_EXPORT DCMTKImageIO : public ImageIOBase void ReorderRGBValues(void * buffer, const void * data, size_t count, unsigned int voxel_size) { - auto * output_buffer = static_cast(buffer); + auto * output_buffer = static_cast(buffer); const auto ** input_buffer = static_cast(const_cast(data)); for (size_t pos = 0; pos < count; ++pos) { @@ -183,14 +183,14 @@ class ITKIODCMTK_EXPORT DCMTKImageIO : public ImageIOBase bool m_DicomImageSetByUser{}; - double m_RescaleSlope{}; - double m_RescaleIntercept{}; + double m_RescaleSlope{}; + double m_RescaleIntercept{}; std::string m_LastFileName{}; }; // Define how to print enumeration extern ITKIODCMTK_EXPORT std::ostream & - operator<<(std::ostream & out, DCMTKImageIO::LogLevelEnum value); +operator<<(std::ostream & out, DCMTKImageIO::LogLevelEnum value); } // end namespace itk diff --git a/Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx b/Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx index 3a1b0c9eac3..2b45fb9695a 100644 --- a/Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx +++ b/Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx @@ -60,11 +60,11 @@ DCMTKItem::SetDcmItem(DcmItem * item) int DCMTKItem::GetElementSQ(const unsigned short group, const unsigned short entry, - DCMTKSequence & sequence, - const bool throwException) const + DCMTKSequence & sequence, + const bool throwException) const { DcmSequenceOfItems * seq; - DcmTagKey tagKey(group, entry); + DcmTagKey tagKey(group, entry); // this->m_DcmItem->print(std::cerr); if (this->m_DcmItem->findAndGetSequence(tagKey, seq) != EC_Normal) { @@ -78,8 +78,8 @@ DCMTKItem::GetElementSQ(const unsigned short group, int DCMTKSequence::GetStack(const unsigned short group, const unsigned short element, - DcmStack & resultStack, - const bool throwException) const + DcmStack & resultStack, + const bool throwException) const { DcmTagKey tagkey(group, element); if (this->m_DcmSequenceOfItems->search(tagkey, resultStack) != EC_Normal) @@ -106,7 +106,7 @@ int DCMTKSequence::GetSequence(unsigned long index, DCMTKSequence & target, const bool throwException) const { DcmItem * item = this->m_DcmSequenceOfItems->getItem(index); - auto * sequence = dynamic_cast(item); + auto * sequence = dynamic_cast(item); if (sequence == nullptr) { DCMTKExceptionOrErrorReturn(<< "Can't find DCMTKSequence at index " << index); @@ -118,11 +118,11 @@ DCMTKSequence::GetSequence(unsigned long index, DCMTKSequence & target, const bo int DCMTKSequence::GetElementCS(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException) const + std::string & target, + const bool throwException) const { DcmTagKey tagkey(group, element); - DcmStack resultStack; + DcmStack resultStack; this->GetStack(group, element, resultStack, throwException); auto * codeStringElement = dynamic_cast(resultStack.top()); if (codeStringElement == nullptr) @@ -148,11 +148,11 @@ DCMTKSequence::GetElementCS(const unsigned short group, int DCMTKSequence::GetElementOB(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException) const + std::string & target, + const bool throwException) const { DcmTagKey tagkey(group, element); - DcmStack resultStack; + DcmStack resultStack; this->GetStack(group, element, resultStack, throwException); auto * obItem = dynamic_cast(resultStack.top()); @@ -163,7 +163,7 @@ DCMTKSequence::GetElementOB(const unsigned short group, } Uint8 * bytes; obItem->getUint8Array(bytes); - Uint32 length = obItem->getLength(); + Uint32 length = obItem->getLength(); std::string val; for (unsigned int i = 0; i < length; ++i) { @@ -176,8 +176,8 @@ DCMTKSequence::GetElementOB(const unsigned short group, int DCMTKSequence::GetElementCSorOB(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException) const + std::string & target, + const bool throwException) const { if (this->GetElementCS(group, element, target, false) == EXIT_SUCCESS) { @@ -193,9 +193,9 @@ DCMTKSequence::GetElementCSorOB(const unsigned short group, int DCMTKSequence::GetElementFD(const unsigned short group, const unsigned short element, - int count, - double * target, - const bool throwException) const + int count, + double * target, + const bool throwException) const { DcmStack resultStack; this->GetStack(group, element, resultStack); @@ -205,7 +205,7 @@ DCMTKSequence::GetElementFD(const unsigned short group, DCMTKExceptionOrErrorReturn(<< "Can't get CodeString Element at tag " << std::hex << group << ' ' << element << std::dec); } - double * tmp; + double * tmp; std::stringstream ss; ss << count; OFString vm(ss.str().c_str()); @@ -229,8 +229,8 @@ DCMTKSequence::GetElementFD(const unsigned short group, int DCMTKSequence::GetElementFD(const unsigned short group, const unsigned short element, - double & target, - const bool throwException) const + double & target, + const bool throwException) const { this->GetElementFD(group, element, 1, &target, throwException); return EXIT_SUCCESS; @@ -239,8 +239,8 @@ DCMTKSequence::GetElementFD(const unsigned short group, int DCMTKSequence::GetElementDS(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException) const + std::string & target, + const bool throwException) const { DcmStack resultStack; this->GetStack(group, element, resultStack); @@ -267,11 +267,11 @@ DCMTKSequence::GetElementDS(const unsigned short group, int DCMTKSequence::GetElementSQ(const unsigned short group, const unsigned short element, - DCMTKSequence & target, - const bool throwException) const + DCMTKSequence & target, + const bool throwException) const { DcmTagKey tagkey(group, element); - DcmStack resultStack; + DcmStack resultStack; this->GetStack(group, element, resultStack); auto * seqElement = dynamic_cast(resultStack.top()); @@ -298,11 +298,11 @@ DCMTKSequence::GetElementItem(unsigned short index, DCMTKItem & target, const bo int DCMTKSequence::GetElementTM(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException) const + std::string & target, + const bool throwException) const { DcmTagKey tagkey(group, element); - DcmStack resultStack; + DcmStack resultStack; this->GetStack(group, element, resultStack); auto * dcmTime = dynamic_cast(resultStack.top()); @@ -355,7 +355,7 @@ DCMTKFileReader::IsImageFile(const std::string & filename) return false; } - bool rval = false; + bool rval = false; auto * image = new DicomImage(filename.c_str()); if (image && image->getStatus() == EIS_Normal && image->getInterData()) { @@ -407,10 +407,10 @@ DCMTKFileReader::LoadFile() int DCMTKFileReader::GetElementLO(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException) const + std::string & target, + const bool throwException) const { - DcmTagKey tagkey(group, element); + DcmTagKey tagkey(group, element); DcmElement * el; if (this->m_Dataset->findAndGetElement(tagkey, el) != EC_Normal) { @@ -437,12 +437,12 @@ DCMTKFileReader::GetElementLO(const unsigned short group, } int -DCMTKFileReader::GetElementLO(const unsigned short group, - const unsigned short element, +DCMTKFileReader::GetElementLO(const unsigned short group, + const unsigned short element, std::vector & target, - const bool throwException) const + const bool throwException) const { - DcmTagKey tagkey(group, element); + DcmTagKey tagkey(group, element); DcmElement * el; if (this->m_Dataset->findAndGetElement(tagkey, el) != EC_Normal) { @@ -473,10 +473,10 @@ DCMTKFileReader::GetElementLO(const unsigned short group, int DCMTKFileReader::GetElementDS(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException) const + std::string & target, + const bool throwException) const { - DcmTagKey tagkey(group, element); + DcmTagKey tagkey(group, element); DcmElement * el; if (this->m_Dataset->findAndGetElement(tagkey, el) != EC_Normal) { @@ -505,11 +505,11 @@ DCMTKFileReader::GetElementDS(const unsigned short group, int DCMTKFileReader::GetElementFD(const unsigned short group, const unsigned short element, - int count, - double * target, - const bool throwException) const + int count, + double * target, + const bool throwException) const { - DcmTagKey tagkey(group, element); + DcmTagKey tagkey(group, element); DcmElement * el; if (this->m_Dataset->findAndGetElement(tagkey, el) != EC_Normal) { @@ -546,8 +546,8 @@ DCMTKFileReader::GetElementFD(const unsigned short group, int DCMTKFileReader::GetElementFD(const unsigned short group, const unsigned short element, - double & target, - const bool throwException) const + double & target, + const bool throwException) const { return this->GetElementFD(group, element, 1, &target, throwException); } @@ -555,10 +555,10 @@ DCMTKFileReader::GetElementFD(const unsigned short group, int DCMTKFileReader::GetElementFL(const unsigned short group, const unsigned short element, - float & target, - const bool throwException) const + float & target, + const bool throwException) const { - DcmTagKey tagkey(group, element); + DcmTagKey tagkey(group, element); DcmElement * el; if (this->m_Dataset->findAndGetElement(tagkey, el) != EC_Normal) { @@ -580,8 +580,8 @@ DCMTKFileReader::GetElementFL(const unsigned short group, int DCMTKFileReader::GetElementFLorOB(const unsigned short group, const unsigned short element, - float & target, - const bool throwException) const + float & target, + const bool throwException) const { if (this->GetElementFL(group, element, target, false) == EXIT_SUCCESS) { @@ -615,10 +615,10 @@ DCMTKFileReader::GetElementFLorOB(const unsigned short group, int DCMTKFileReader::GetElementUS(const unsigned short group, const unsigned short element, - unsigned short & target, - const bool throwException) const + unsigned short & target, + const bool throwException) const { - DcmTagKey tagkey(group, element); + DcmTagKey tagkey(group, element); DcmElement * el; if (this->m_Dataset->findAndGetElement(tagkey, el) != EC_Normal) { @@ -640,10 +640,10 @@ DCMTKFileReader::GetElementUS(const unsigned short group, int DCMTKFileReader::GetElementUS(const unsigned short group, const unsigned short element, - unsigned short *& target, - const bool throwException) const + unsigned short *& target, + const bool throwException) const { - DcmTagKey tagkey(group, element); + DcmTagKey tagkey(group, element); DcmElement * el; if (this->m_Dataset->findAndGetElement(tagkey, el) != EC_Normal) { @@ -667,10 +667,10 @@ DCMTKFileReader::GetElementUS(const unsigned short group, int DCMTKFileReader::GetElementCS(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException) const + std::string & target, + const bool throwException) const { - DcmTagKey tagkey(group, element); + DcmTagKey tagkey(group, element); DcmElement * el; if (this->m_Dataset->findAndGetElement(tagkey, el) != EC_Normal) { @@ -698,8 +698,8 @@ DCMTKFileReader::GetElementCS(const unsigned short group, int DCMTKFileReader::GetElementCSorOB(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException) const + std::string & target, + const bool throwException) const { if (this->GetElementCS(group, element, target, false) == EXIT_SUCCESS) { @@ -716,10 +716,10 @@ DCMTKFileReader::GetElementCSorOB(const unsigned short group, int DCMTKFileReader::GetElementPN(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException) const + std::string & target, + const bool throwException) const { - DcmTagKey tagkey(group, element); + DcmTagKey tagkey(group, element); DcmElement * el; if (this->m_Dataset->findAndGetElement(tagkey, el) != EC_Normal) { @@ -750,10 +750,10 @@ DCMTKFileReader::GetElementPN(const unsigned short group, int DCMTKFileReader::GetElementIS(const unsigned short group, const unsigned short element, - itk::int32_t & target, - const bool throwException) const + itk::int32_t & target, + const bool throwException) const { - DcmTagKey tagkey(group, element); + DcmTagKey tagkey(group, element); DcmElement * el; if (this->m_Dataset->findAndGetElement(tagkey, el) != EC_Normal) { @@ -779,10 +779,10 @@ DCMTKFileReader::GetElementIS(const unsigned short group, int DCMTKFileReader::GetElementSL(const unsigned short group, const unsigned short element, - itk::int32_t & target, - const bool throwException) const + itk::int32_t & target, + const bool throwException) const { - DcmTagKey tagkey(group, element); + DcmTagKey tagkey(group, element); DcmElement * el; if (this->m_Dataset->findAndGetElement(tagkey, el) != EC_Normal) { @@ -808,8 +808,8 @@ DCMTKFileReader::GetElementSL(const unsigned short group, int DCMTKFileReader::GetElementISorOB(const unsigned short group, const unsigned short element, - itk::int32_t & target, - const bool throwException) const + itk::int32_t & target, + const bool throwException) const { if (this->GetElementIS(group, element, target, false) == EXIT_SUCCESS) { @@ -845,10 +845,10 @@ DCMTKFileReader::GetElementISorOB(const unsigned short group, int DCMTKFileReader::GetElementOB(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException) const + std::string & target, + const bool throwException) const { - DcmTagKey tagkey(group, element); + DcmTagKey tagkey(group, element); DcmElement * el; if (this->m_Dataset->findAndGetElement(tagkey, el) != EC_Normal) { @@ -862,7 +862,7 @@ DCMTKFileReader::GetElementOB(const unsigned short group, } Uint8 * bytes; obItem->getUint8Array(bytes); - Uint32 length = obItem->getLength(); + Uint32 length = obItem->getLength(); std::string val; for (unsigned int i = 0; i < length; ++i) { @@ -874,12 +874,12 @@ DCMTKFileReader::GetElementOB(const unsigned short group, int DCMTKFileReader::GetElementSQ(const unsigned short group, - unsigned short entry, - DCMTKSequence & sequence, - const bool throwException) const + unsigned short entry, + DCMTKSequence & sequence, + const bool throwException) const { DcmSequenceOfItems * seq; - DcmTagKey tagKey(group, entry); + DcmTagKey tagKey(group, entry); if (this->m_Dataset->findAndGetSequence(tagKey, seq) != EC_Normal) { @@ -891,11 +891,11 @@ DCMTKFileReader::GetElementSQ(const unsigned short group, int DCMTKFileReader::GetElementUI(const unsigned short group, - unsigned short entry, - std::string & target, - const bool throwException) const + unsigned short entry, + std::string & target, + const bool throwException) const { - DcmTagKey tagKey(group, entry); + DcmTagKey tagKey(group, entry); DcmElement * el; if (this->m_Dataset->findAndGetElement(tagKey, el) != EC_Normal) { @@ -923,10 +923,10 @@ DCMTKFileReader::GetElementUI(const unsigned short group, int DCMTKFileReader::GetElementDA(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException) const + std::string & target, + const bool throwException) const { - DcmTagKey tagkey(group, element); + DcmTagKey tagkey(group, element); DcmElement * el; if (this->m_Dataset->findAndGetElement(tagkey, el) != EC_Normal) { @@ -946,11 +946,11 @@ DCMTKFileReader::GetElementDA(const unsigned short group, int DCMTKFileReader::GetElementTM(const unsigned short group, const unsigned short element, - std::string & target, - const bool throwException) const + std::string & target, + const bool throwException) const { - DcmTagKey tagkey(group, element); + DcmTagKey tagkey(group, element); DcmElement * el; if (this->m_Dataset->findAndGetElement(tagkey, el) != EC_Normal) { @@ -970,7 +970,7 @@ DCMTKFileReader::GetElementTM(const unsigned short group, int DCMTKFileReader::GetDirCosArray(double * const dircos) const { - int rval; + int rval; DCMTKSequence planeSeq; dircos[0] = 1; @@ -1029,7 +1029,7 @@ int DCMTKFileReader::GetDirCosines(vnl_vector & dir1, vnl_vector & dir2, vnl_vector & dir3) const { double dircos[6]; - int rval = this->GetDirCosArray(dircos); + int rval = this->GetDirCosArray(dircos); if (rval == EXIT_SUCCESS) { dir1[0] = dircos[0]; @@ -1084,10 +1084,10 @@ DCMTKFileReader::GetImagePixelType() const IOComponentEnum DCMTKFileReader::GetImageDataType() const { - unsigned short IsSigned; - unsigned short BitsAllocated; - unsigned short BitsStored; - unsigned short HighBit; + unsigned short IsSigned; + unsigned short BitsAllocated; + unsigned short BitsStored; + unsigned short HighBit; IOComponentEnum type = IOComponentEnum::UNKNOWNCOMPONENTTYPE; if (this->GetElementUS(0x0028, 0x0100, BitsAllocated, false) != EXIT_SUCCESS || @@ -1174,7 +1174,7 @@ DCMTKFileReader::GetSpacing(double * const spacing) const spacing[2] = 1.0; double _spacing[3] = { 1.0, 1.0, 1.0 }; - bool _have_val[3] = { false, false, false }; + bool _have_val[3] = { false, false, false }; // // There are several tags that can have spacing, and we're going // from most to least desirable, starting with PixelSpacing, which @@ -1301,7 +1301,7 @@ DCMTKFileReader::GetOrigin(double * const origin) const { std::fill(origin, origin + 3, 0.0); DCMTKSequence originSequence; - DCMTKItem item; + DCMTKItem item; DCMTKSequence subSequence; rval = this->GetElementDS(0x0020, 0x0032, 3, origin, false); @@ -1347,7 +1347,7 @@ bool DCMTKFileReader::HasPixelData() const { DcmTagKey tagkey(0x7fe0, 0x0010); - DcmStack resultStack; + DcmStack resultStack; return this->m_DFile->search(tagkey, resultStack) == EC_Normal; } diff --git a/Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx b/Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx index 65c2215b2b3..0da34bcd94a 100644 --- a/Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx +++ b/Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx @@ -89,7 +89,7 @@ isNoPreambleDicom(std::ifstream & file) // NOTE: Similar function is in itkGDCMI char vrcode[3] = { '\0', '\0', '\0' }; file.read(vrcode, 2); - long length = std::numeric_limits::max(); + long length = std::numeric_limits::max(); const std::string vr{ vrcode }; if (vr == "AE" || vr == "AS" || vr == "AT" || vr == "CS" || vr == "DA" || vr == "DS" || vr == "DT" || vr == "FL" || vr == "FD" || vr == "IS" || vr == "LO" || vr == "PN" || vr == "SH" || vr == "SL" || vr == "SS" || vr == "ST" || @@ -319,8 +319,8 @@ DCMTKImageIO::Read(void * buffer) } // get the image in the DCMTK buffer const DiPixel * const interData = m_DImage->getInterData(); - const void * data = interData->getData(); - size_t count = interData->getCount(); + const void * data = interData->getData(); + size_t count = interData->getCount(); if (this->m_PixelType == IOPixelEnum::RGB || this->m_PixelType == IOPixelEnum::RGBA) { ReorderRGBValues(buffer, data, count, this->GetNumberOfComponents()); diff --git a/Modules/IO/DCMTK/test/itkDCMTKImageIOMultiFrameImageTest.cxx b/Modules/IO/DCMTK/test/itkDCMTKImageIOMultiFrameImageTest.cxx index 095988c2b5e..cb8c2831f08 100644 --- a/Modules/IO/DCMTK/test/itkDCMTKImageIOMultiFrameImageTest.cxx +++ b/Modules/IO/DCMTK/test/itkDCMTKImageIOMultiFrameImageTest.cxx @@ -103,9 +103,9 @@ itkDCMTKImageIOMultiFrameImageTest(int argc, char * argv[]) ImageType::Pointer im = reader->GetOutput(); - DirectionType dir = im->GetDirection(); - SpacingType spacing = im->GetSpacing(); - PointType origin = im->GetOrigin(); + DirectionType dir = im->GetDirection(); + SpacingType spacing = im->GetSpacing(); + PointType origin = im->GetOrigin(); std::cerr << "Direction " << dir << std::endl << "Spacing " << spacing << std::endl diff --git a/Modules/IO/DCMTK/test/itkDCMTKImageIOSlopeInterceptTest.cxx b/Modules/IO/DCMTK/test/itkDCMTKImageIOSlopeInterceptTest.cxx index 5c39880c837..b5008f416c8 100644 --- a/Modules/IO/DCMTK/test/itkDCMTKImageIOSlopeInterceptTest.cxx +++ b/Modules/IO/DCMTK/test/itkDCMTKImageIOSlopeInterceptTest.cxx @@ -69,7 +69,7 @@ itkDCMTKImageIOSlopeInterceptTest(int argc, char * argv[]) ItType it2(images[1], images[1]->GetLargestPossibleRegion()); for (it1.GoToBegin(), it2.GoToBegin(); !it1.IsAtEnd() && !it2.IsAtEnd(); ++it1, ++it2) { - PixelType pix1(it1.Get()); + PixelType pix1(it1.Get()); const PixelType pix2(it2.Get()); pix1 = (pix1 * rescaleSlope) + rescaleIntercept; if (pix1 != pix2) diff --git a/Modules/IO/DCMTK/test/itkDCMTKImageIOSpacingTest.cxx b/Modules/IO/DCMTK/test/itkDCMTKImageIOSpacingTest.cxx index 0eff3230c64..c2477d9e983 100644 --- a/Modules/IO/DCMTK/test/itkDCMTKImageIOSpacingTest.cxx +++ b/Modules/IO/DCMTK/test/itkDCMTKImageIOSpacingTest.cxx @@ -116,9 +116,9 @@ itkDCMTKImageIOSpacingTest(int argc, char * argv[]) const ImageType::Pointer im = reader->GetOutput(); - const DirectionType dir = im->GetDirection(); - const SpacingType spacing = im->GetSpacing(); - const PointType origin = im->GetOrigin(); + const DirectionType dir = im->GetDirection(); + const SpacingType spacing = im->GetSpacing(); + const PointType origin = im->GetOrigin(); std::cerr << "Direction " << dir << std::endl << "Spacing " << spacing << std::endl diff --git a/Modules/IO/DCMTK/test/itkDCMTKLoggerTest.cxx b/Modules/IO/DCMTK/test/itkDCMTKLoggerTest.cxx index fa48216826c..4d37233b652 100644 --- a/Modules/IO/DCMTK/test/itkDCMTKLoggerTest.cxx +++ b/Modules/IO/DCMTK/test/itkDCMTKLoggerTest.cxx @@ -40,7 +40,7 @@ TestLogLevel(itk::DCMTKImageIO::Pointer & io, itk::DCMTKImageIO::LogLevelEnum ll int itkDCMTKLoggerTest(int, char *[]) { - itk::DCMTKImageIO::Pointer io = itk::DCMTKImageIO::New(); + itk::DCMTKImageIO::Pointer io = itk::DCMTKImageIO::New(); itk::DCMTKImageIO::LogLevelEnum logLevel = io->GetLogLevel(); if (logLevel != itk::DCMTKImageIO::LogLevelEnum::FATAL_LOG_LEVEL) { diff --git a/Modules/IO/DCMTK/test/itkDCMTKSeriesReadImageWrite.cxx b/Modules/IO/DCMTK/test/itkDCMTKSeriesReadImageWrite.cxx index f107cdee95a..314d286907f 100644 --- a/Modules/IO/DCMTK/test/itkDCMTKSeriesReadImageWrite.cxx +++ b/Modules/IO/DCMTK/test/itkDCMTKSeriesReadImageWrite.cxx @@ -82,7 +82,7 @@ itkDCMTKSeriesReadImageWrite(int argc, char * argv[]) auto reader = ReaderType::New(); const ReaderType::FileNamesContainer & fileNames = it->GetInputFileNames(); - const unsigned int numberOfFileNames = fileNames.size(); + const unsigned int numberOfFileNames = fileNames.size(); std::cout << numberOfFileNames << std::endl; for (unsigned int fni = 0; fni < numberOfFileNames; ++fni) { diff --git a/Modules/IO/GDCM/include/itkGDCMImageIO.h b/Modules/IO/GDCM/include/itkGDCMImageIO.h index 3893dce8295..33d2d994a6d 100644 --- a/Modules/IO/GDCM/include/itkGDCMImageIO.h +++ b/Modules/IO/GDCM/include/itkGDCMImageIO.h @@ -58,7 +58,7 @@ class GDCMImageIOEnums // Define how to print enumeration extern ITKIOGDCM_EXPORT std::ostream & - operator<<(std::ostream & out, const GDCMImageIOEnums::Compression value); +operator<<(std::ostream & out, const GDCMImageIOEnums::Compression value); /** * \class GDCMImageIO * diff --git a/Modules/IO/GDCM/src/itkGDCMImageIO.cxx b/Modules/IO/GDCM/src/itkGDCMImageIO.cxx index 8be5d9237b1..4e215fa7c91 100644 --- a/Modules/IO/GDCM/src/itkGDCMImageIO.cxx +++ b/Modules/IO/GDCM/src/itkGDCMImageIO.cxx @@ -157,7 +157,7 @@ readNoPreambleDicom(std::ifstream & file) // NOTE: This file is duplicated in it char vrcode[3] = { '\0', '\0', '\0' }; file.read(vrcode, 2); - long length = std::numeric_limits::max(); + long length = std::numeric_limits::max(); const std::string vr{ vrcode }; if (vr == "AE" || vr == "AS" || vr == "AT" || vr == "CS" || vr == "DA" || vr == "DS" || vr == "DT" || vr == "FL" || vr == "FD" || vr == "IS" || vr == "LO" || vr == "PN" || vr == "SH" || vr == "SL" || vr == "SS" || vr == "ST" || @@ -371,8 +371,8 @@ GDCMImageIO::Read(void * pointer) if (m_SingleBit) { const auto copy = make_unique_for_overwrite(len); - auto * t = reinterpret_cast(pointer); - size_t j = 0; + auto * t = reinterpret_cast(pointer); + size_t j = 0; for (size_t i = 0; i < len / 8; ++i) { const unsigned char c = t[i]; @@ -407,7 +407,7 @@ GDCMImageIO::Read(void * pointer) r.SetSlope(m_RescaleSlope); r.SetPixelFormat(pixeltype); const gdcm::PixelFormat outputpt = r.ComputeInterceptSlopePixelType(); - const auto copy = make_unique_for_overwrite(len); + const auto copy = make_unique_for_overwrite(len); memcpy(copy.get(), (char *)pointer, len); r.Rescale((char *)pointer, copy.get(), len); // WARNING: sizeof(Real World Value) != sizeof(Stored Pixel) @@ -470,10 +470,10 @@ GDCMImageIO::InternalReadImageInformation() { itkExceptionMacro("Cannot read requested file"); } - const gdcm::Image & image = reader.GetImage(); - const gdcm::File & f = reader.GetFile(); + const gdcm::Image & image = reader.GetImage(); + const gdcm::File & f = reader.GetFile(); const gdcm::DataSet & ds = f.GetDataSet(); - const unsigned int * dims = image.GetDimensions(); + const unsigned int * dims = image.GetDimensions(); const gdcm::PixelFormat & pixeltype = image.GetPixelFormat(); switch (pixeltype) @@ -647,12 +647,12 @@ GDCMImageIO::InternalReadImageInformation() case gdcm::MediaStorage::UltrasoundMultiFrameImageStorageRetired: { std::vector sp; - const gdcm::Tag spacingTag(0x0028, 0x0030); + const gdcm::Tag spacingTag(0x0028, 0x0030); if (const gdcm::DataElement & de = ds.GetDataElement(spacingTag); !de.IsEmpty()) { - std::stringstream m_Ss; + std::stringstream m_Ss; gdcm::Element m_El; - const gdcm::ByteValue * bv = de.GetByteValue(); + const gdcm::ByteValue * bv = de.GetByteValue(); assert(bv); const std::string s(bv->GetPointer(), bv->GetLength()); m_Ss.str(s); @@ -709,7 +709,7 @@ GDCMImageIO::InternalReadImageInformation() m_Dimensions[2] = 1; } - const double * dircos = image.GetDirectionCosines(); + const double * dircos = image.GetDirectionCosines(); vnl_vector rowDirection(3); rowDirection[0] = dircos[0]; rowDirection[1] = dircos[1]; @@ -746,7 +746,7 @@ GDCMImageIO::InternalReadImageInformation() for (; it != ds.End(); ++it) { const gdcm::DataElement & ref = *it; - const gdcm::Tag & tag = ref.GetTag(); + const gdcm::Tag & tag = ref.GetTag(); // Compute VR from the toplevel file, and the currently processed dataset: const gdcm::VR vr = gdcm::DataSetHelper::ComputeVR(f, ds, tag); @@ -771,7 +771,7 @@ GDCMImageIO::InternalReadImageInformation() encodedLengthEstimate = ((encodedLengthEstimate / 4) + 1) * 4; const auto bin = make_unique_for_overwrite(encodedLengthEstimate); - auto encodedLengthActual = + auto encodedLengthActual = static_cast(itksysBase64_Encode((const unsigned char *)bv->GetPointer(), static_cast(bv->GetLength()), (unsigned char *)bin.get(), @@ -833,16 +833,16 @@ GDCMImageIO::Write(const void * buffer) const std::string project_name = std::string("GDCM/ITK ") + itk::Version::GetITKVersion(); gdcm::FileMetaInformation::SetSourceApplicationEntityTitle(project_name.c_str()); - gdcm::ImageWriter writer; + gdcm::ImageWriter writer; gdcm::FileMetaInformation & fmi = writer.GetFile().GetHeader(); - gdcm::DataSet & header = writer.GetFile().GetDataSet(); - gdcm::Global & g = gdcm::Global::GetInstance(); - const gdcm::Dicts & dicts = g.GetDicts(); - const gdcm::Dict & pubdict = dicts.GetPublicDict(); + gdcm::DataSet & header = writer.GetFile().GetDataSet(); + gdcm::Global & g = gdcm::Global::GetInstance(); + const gdcm::Dicts & dicts = g.GetDicts(); + const gdcm::Dict & pubdict = dicts.GetPublicDict(); MetaDataDictionary & dict = this->GetMetaDataDictionary(); - auto itr = dict.Begin(); + auto itr = dict.Begin(); const auto end = dict.End(); gdcm::StringFilter sf; @@ -851,7 +851,7 @@ GDCMImageIO::Write(const void * buffer) std::vector problematicKeys; while (itr != end) { - std::string value; + std::string value; const std::string & key = itr->first; // Needed for bcc32 ExposeMetaData(dict, key, value); @@ -859,7 +859,7 @@ GDCMImageIO::Write(const void * buffer) // currently ignored, same tag appears twice in the dictionary // once with comma separator and once with pipe. The last one // encountered is the one used to set the tag value. - gdcm::Tag tag; + gdcm::Tag tag; const bool b = tag.ReadFromPipeSeparatedString(key.c_str()) || tag.ReadFromCommaSeparatedString(key.c_str()); // Anything that has been changed in the MetaData Dict will be pushed @@ -867,7 +867,7 @@ GDCMImageIO::Write(const void * buffer) if (b /*tag != gdcm::Tag(0xffff,0xffff)*/ /*dictEntry*/) { const gdcm::DictEntry & dictEntry = pubdict.GetDictEntry(tag); - const gdcm::VR::VRType vrtype = dictEntry.GetVR(); + const gdcm::VR::VRType vrtype = dictEntry.GetVR(); if (dictEntry.GetVR() == gdcm::VR::SQ) { // How did we reach here ? @@ -879,7 +879,7 @@ GDCMImageIO::Write(const void * buffer) // Custom VR::VRBINARY // convert value from Base64 const auto bin = make_unique_for_overwrite(value.size()); - auto decodedLengthActual = + auto decodedLengthActual = static_cast(itksysBase64_Decode((const unsigned char *)value.c_str(), static_cast(0), (unsigned char *)bin.get(), @@ -1004,7 +1004,7 @@ GDCMImageIO::Write(const void * buffer) std::accumulate(problematicKeys.begin() + 1, problematicKeys.end(), std::string(", "))); } const gdcm::SmartPointer simage = new gdcm::Image; - gdcm::Image & image = *simage; + gdcm::Image & image = *simage; image.SetNumberOfDimensions(2); // good default image.SetDimension(0, static_cast(m_Dimensions[0])); image.SetDimension(1, static_cast(m_Dimensions[1])); @@ -1018,7 +1018,7 @@ GDCMImageIO::Write(const void * buffer) // Set the origin (image position patient) // If the meta dictionary contains the tag "0020 0032", use it std::string tempString; - const bool hasIPP = ExposeMetaData(dict, "0020|0032", tempString); + const bool hasIPP = ExposeMetaData(dict, "0020|0032", tempString); if (hasIPP) { double origin3D[3]; @@ -1283,15 +1283,15 @@ GDCMImageIO::Write(const void * buffer) // Workaround because SetUseTargetPixelType does not apply to // InverseRescale - const auto minValue = static_cast(outpixeltype.GetMin()); - const auto maxValue = static_cast(outpixeltype.GetMax()); + const auto minValue = static_cast(outpixeltype.GetMin()); + const auto maxValue = static_cast(outpixeltype.GetMax()); const double minValueMapped = minValue * m_RescaleSlope + m_RescaleIntercept; const double maxValueMapped = maxValue * m_RescaleSlope + m_RescaleIntercept; ir.SetMinMaxForPixelType(minValueMapped, maxValueMapped); image.SetIntercept(m_RescaleIntercept); image.SetSlope(m_RescaleSlope); - const auto copyBuffer = make_unique_for_overwrite(len); + const auto copyBuffer = make_unique_for_overwrite(len); const auto * inputBuffer = static_cast(buffer); ir.InverseRescale(copyBuffer.get(), inputBuffer, numberOfBytes); pixeldata.SetByteValue(copyBuffer.get(), static_cast(len)); @@ -1407,8 +1407,8 @@ GDCMImageIO::GetLabelFromTag(const std::string & tag, std::string & labelId) gdcm::Tag t; if (t.ReadFromPipeSeparatedString(tag.c_str()) && t.IsPublic()) { - const gdcm::Global & g = gdcm::Global::GetInstance(); - const gdcm::Dicts & dicts = g.GetDicts(); + const gdcm::Global & g = gdcm::Global::GetInstance(); + const gdcm::Dicts & dicts = g.GetDicts(); const gdcm::DictEntry & entry = dicts.GetDictEntry(t); labelId = entry.GetName(); return true; diff --git a/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx b/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx index 04678dfcda9..cdf66c6109c 100644 --- a/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx +++ b/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx @@ -121,7 +121,7 @@ GDCMSeriesFileNames::GetFileNames(const std::string serie) { if (!flist->empty()) // make sure we have at leat one serie { - gdcm::File * file = (*flist)[0]; // for example take the first one + gdcm::File * file = (*flist)[0]; // for example take the first one const std::string id = m_SerieHelper->CreateUniqueSeriesIdentifier(file).c_str(); if (id == serie) diff --git a/Modules/IO/GDCM/test/itkGDCMImageIO32bitsStoredTest.cxx b/Modules/IO/GDCM/test/itkGDCMImageIO32bitsStoredTest.cxx index 8390beac16e..5daaa60ceeb 100644 --- a/Modules/IO/GDCM/test/itkGDCMImageIO32bitsStoredTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImageIO32bitsStoredTest.cxx @@ -41,7 +41,7 @@ itkGDCMImageIO32bitsStoredTest(int argc, char * argv[]) using ReaderType = itk::ImageFileReader; using ImageIOType = itk::GDCMImageIO; - auto dcmImageIO = ImageIOType::New(); + auto dcmImageIO = ImageIOType::New(); const bool canRead = dcmImageIO->CanReadFile(argv[1]); std::cerr << "GDCM can read file: " << (canRead ? "yes" : "no") << std::endl; if (canRead) diff --git a/Modules/IO/GDCM/test/itkGDCMImageIONoPreambleTest.cxx b/Modules/IO/GDCM/test/itkGDCMImageIONoPreambleTest.cxx index 586c338e4ba..aea8a7b910d 100644 --- a/Modules/IO/GDCM/test/itkGDCMImageIONoPreambleTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImageIONoPreambleTest.cxx @@ -41,7 +41,7 @@ itkGDCMImageIONoPreambleTest(int argc, char * argv[]) using ReaderType = itk::ImageFileReader; using ImageIOType = itk::GDCMImageIO; - auto dcmImageIO = ImageIOType::New(); + auto dcmImageIO = ImageIOType::New(); const bool canRead = dcmImageIO->CanReadFile(argv[1]); if (!canRead) { diff --git a/Modules/IO/GDCM/test/itkGDCMImageIOTest.cxx b/Modules/IO/GDCM/test/itkGDCMImageIOTest.cxx index 22b693da4ba..52706a3ac01 100644 --- a/Modules/IO/GDCM/test/itkGDCMImageIOTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImageIOTest.cxx @@ -77,10 +77,10 @@ itkGDCMImageIOTest(int argc, char * argv[]) // Test itk::GDCMImageIO::GetValueFromTag with upper and lower case tagkeys const std::string tagkeyLower = "0008|103e"; // Series Description - std::string valueFromLower; + std::string valueFromLower; gdcmImageIO->GetValueFromTag(tagkeyLower, valueFromLower); const std::string tagkeyUpper = "0008|103E"; // Series Description - std::string valueFromUpper; + std::string valueFromUpper; gdcmImageIO->GetValueFromTag(tagkeyUpper, valueFromUpper); // We can't easily verify the content of the tag value against a known // baseline, as this test is run multiple times with different input images @@ -149,7 +149,7 @@ itkGDCMImageIOTest(int argc, char * argv[]) rescaledDicomWriter->SetInput(rescaler->GetOutput()); rescaledDicomWriter->UseInputMetaDataDictionaryOff(); itk::MetaDataDictionary & dict = gdcmImageIO->GetMetaDataDictionary(); - std::ostringstream ostrm; + std::ostringstream ostrm; ostrm << itk::Math::Round(-1. * rescaler->GetShift()); itk::EncapsulateMetaData(dict, "0028|1052", ostrm.str()); ostrm.str(""); diff --git a/Modules/IO/GDCM/test/itkGDCMImageIOTest2.cxx b/Modules/IO/GDCM/test/itkGDCMImageIOTest2.cxx index d594563df44..1fdb985e96a 100644 --- a/Modules/IO/GDCM/test/itkGDCMImageIOTest2.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImageIOTest2.cxx @@ -59,7 +59,7 @@ itkGDCMImageIOTest2(int argc, char * argv[]) // reader->GetOutput()->Print(std::cout); itk::MetaDataDictionary & dict = dicomIO->GetMetaDataDictionary(); - std::string tagkey = "0002|0002"; + std::string tagkey = "0002|0002"; std::string value = "1.2.840.10008.5.1.4.1.1.4"; // Media Storage SOP Class UID itk::EncapsulateMetaData(dict, tagkey, value); @@ -78,7 +78,7 @@ itkGDCMImageIOTest2(int argc, char * argv[]) tagkey = "0020|1040"; // Position Reference Indicator value = ""; itk::EncapsulateMetaData(dict, tagkey, value); - std::string commatagkey = "0018,0020"; // Scanning Sequence + std::string commatagkey = "0018,0020"; // Scanning Sequence const std::string commavalue = "GR"; itk::EncapsulateMetaData(dict, commatagkey, commavalue); tagkey = "0018|0021"; // Sequence Variant diff --git a/Modules/IO/GDCM/test/itkGDCMImageOrientationPatientTest.cxx b/Modules/IO/GDCM/test/itkGDCMImageOrientationPatientTest.cxx index 3580bae2d3a..dc79fef59c2 100644 --- a/Modules/IO/GDCM/test/itkGDCMImageOrientationPatientTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImageOrientationPatientTest.cxx @@ -60,7 +60,7 @@ itkGDCMImageOrientationPatientTest(int argc, char * argv[]) src2D->SetSpacing(spacing2D); src2D->SetSize(size2D); - auto gdcmIO = ImageIOType::New(); + auto gdcmIO = ImageIOType::New(); DictionaryType dictionary; // Set all required DICOM fields @@ -95,7 +95,7 @@ itkGDCMImageOrientationPatientTest(int argc, char * argv[]) src2D->GetOutput()->SetMetaDataDictionary(dictionary); - auto writer2D = Writer2DType::New(); + auto writer2D = Writer2DType::New(); std::ostringstream filename; filename.str(""); filename << argv[1] << "/itkGDCMImageOrientationPatientTest.dcm"; diff --git a/Modules/IO/GDCM/test/itkGDCMImagePositionPatientTest.cxx b/Modules/IO/GDCM/test/itkGDCMImagePositionPatientTest.cxx index 13f1c8d8c8d..81ba9c641e8 100644 --- a/Modules/IO/GDCM/test/itkGDCMImagePositionPatientTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImagePositionPatientTest.cxx @@ -65,7 +65,7 @@ itkGDCMImagePositionPatientTest(int argc, char * argv[]) src2D->SetSpacing(spacing2D); src2D->SetSize(size2D); - auto gdcmIO = ImageIOType::New(); + auto gdcmIO = ImageIOType::New(); DictionaryType dictionary; // Set all required DICOM fields @@ -85,7 +85,7 @@ itkGDCMImagePositionPatientTest(int argc, char * argv[]) src2D->GetOutput()->SetMetaDataDictionary(dictionary); - auto writer2D = Writer2DType::New(); + auto writer2D = Writer2DType::New(); std::ostringstream filename; filename.str(""); filename << argv[1] << "/itkGDCMImagePositionPatientTest.dcm"; diff --git a/Modules/IO/GDCM/test/itkGDCMImageReadSeriesWriteTest.cxx b/Modules/IO/GDCM/test/itkGDCMImageReadSeriesWriteTest.cxx index c4a770a1e07..f2aafc74728 100644 --- a/Modules/IO/GDCM/test/itkGDCMImageReadSeriesWriteTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImageReadSeriesWriteTest.cxx @@ -66,8 +66,8 @@ itkGDCMImageReadSeriesWriteTest(int argc, char * argv[]) auto namesGenerator = NamesGeneratorType::New(); itk::MetaDataDictionary & dict = gdcmIO->GetMetaDataDictionary(); - std::string tagkey = "0008|0060"; // Modality - std::string value = "MR"; + std::string tagkey = "0008|0060"; // Modality + std::string value = "MR"; itk::EncapsulateMetaData(dict, tagkey, value); tagkey = "0008|0008"; // Image Type value = "DERIVED\\SECONDARY"; @@ -83,8 +83,8 @@ itkGDCMImageReadSeriesWriteTest(int argc, char * argv[]) ITK_TEST_SET_GET_VALUE(gdcmIO, seriesWriter->GetImageIO()); const ImageType::RegionType region = reader->GetOutput()->GetLargestPossibleRegion(); - ImageType::IndexType start = region.GetIndex(); - ImageType::SizeType size = region.GetSize(); + ImageType::IndexType start = region.GetIndex(); + ImageType::SizeType size = region.GetSize(); std::string format = outputDirectory; diff --git a/Modules/IO/GDCM/test/itkGDCMImageReadWriteTest.cxx b/Modules/IO/GDCM/test/itkGDCMImageReadWriteTest.cxx index 5a997f04b4b..3afa9e4e157 100644 --- a/Modules/IO/GDCM/test/itkGDCMImageReadWriteTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMImageReadWriteTest.cxx @@ -55,9 +55,9 @@ ReadWrite(const std::string & inputImage, const std::string & outputImage) template int -internalMain(const std::string & inputImage, - const std::string & outputImage, - const std::string & expectedPixelType, +internalMain(const std::string & inputImage, + const std::string & outputImage, + const std::string & expectedPixelType, itk::GDCMImageIO::Pointer gdcmImageIO) { const unsigned int numberOfComponents = gdcmImageIO->GetNumberOfComponents(); diff --git a/Modules/IO/GDCM/test/itkGDCMLegacyMultiFrameTest.cxx b/Modules/IO/GDCM/test/itkGDCMLegacyMultiFrameTest.cxx index 20b141d63b7..79ba00c74be 100644 --- a/Modules/IO/GDCM/test/itkGDCMLegacyMultiFrameTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMLegacyMultiFrameTest.cxx @@ -43,7 +43,7 @@ itkGDCMLegacyMultiFrameTest(int argc, char * argv[]) using ImageType = itk::Image; using ReaderType = itk::ImageFileReader; - auto reader = ReaderType::New(); + auto reader = ReaderType::New(); const itk::GDCMImageIO::Pointer imageIO = itk::GDCMImageIO::New(); reader->SetImageIO(imageIO); reader->SetFileName(inputFileName); diff --git a/Modules/IO/GDCM/test/itkGDCMLoadImageSpacingTest.cxx b/Modules/IO/GDCM/test/itkGDCMLoadImageSpacingTest.cxx index 8761ab1525a..db4eaf2d1d6 100644 --- a/Modules/IO/GDCM/test/itkGDCMLoadImageSpacingTest.cxx +++ b/Modules/IO/GDCM/test/itkGDCMLoadImageSpacingTest.cxx @@ -52,7 +52,7 @@ itkGDCMLoadImageSpacingTest(int argc, char * argv[]) using ReaderType = itk::ImageFileReader; const itk::GDCMImageIO::Pointer imageIO = itk::GDCMImageIO::New(); - auto reader = ReaderType::New(); + auto reader = ReaderType::New(); reader->SetImageIO(imageIO); reader->SetFileName(imageFilename); try diff --git a/Modules/IO/GE/src/Ge5xHdr.h b/Modules/IO/GE/src/Ge5xHdr.h index c3bc51987e4..139d8609dd8 100644 --- a/Modules/IO/GE/src/Ge5xHdr.h +++ b/Modules/IO/GE/src/Ge5xHdr.h @@ -59,46 +59,46 @@ struct Ge5xPixelHeader { - int GENESIS_IH_img_magic; - int GENESIS_IH_img_hdr_length; - int GENESIS_IH_img_width; - int GENESIS_IH_img_height; - int GENESIS_IH_img_depth; - int GENESIS_IH_img_compress; - int GENESIS_IH_img_dwindow; - int GENESIS_IH_img_dlevel; - int GENESIS_IH_img_bgshade; - int GENESIS_IH_img_ovrflow; - int GENESIS_IH_img_undflow; - int GENESIS_IH_img_top_offset; - int GENESIS_IH_img_bot_offset; - short GENESIS_IH_img_version; + int GENESIS_IH_img_magic; + int GENESIS_IH_img_hdr_length; + int GENESIS_IH_img_width; + int GENESIS_IH_img_height; + int GENESIS_IH_img_depth; + int GENESIS_IH_img_compress; + int GENESIS_IH_img_dwindow; + int GENESIS_IH_img_dlevel; + int GENESIS_IH_img_bgshade; + int GENESIS_IH_img_ovrflow; + int GENESIS_IH_img_undflow; + int GENESIS_IH_img_top_offset; + int GENESIS_IH_img_bot_offset; + short GENESIS_IH_img_version; unsigned short GENESIS_IH_img_checksum; - int GENESIS_IH_img_p_id; - int GENESIS_IH_img_l_id; - int GENESIS_IH_img_p_unpack; - int GENESIS_IH_img_l_unpack; - int GENESIS_IH_img_p_compress; - int GENESIS_IH_img_l_compress; - int GENESIS_IH_img_p_histo; - int GENESIS_IH_img_l_histo; - int GENESIS_IH_img_p_text; - int GENESIS_IH_img_l_text; - int GENESIS_IH_img_p_graphics; - int GENESIS_IH_img_l_graphics; - int GENESIS_IH_img_p_dbHdr; - int GENESIS_IH_img_l_dbHdr; - int GENESIS_IH_img_levelOffset; - int GENESIS_IH_img_p_user; - int GENESIS_IH_img_l_user; - int GENESIS_IH_img_p_suite; - int GENESIS_IH_img_l_suite; - int GENESIS_IH_img_p_exam; - int GENESIS_IH_img_l_exam; - int GENESIS_IH_img_p_series; - int GENESIS_IH_img_l_series; - int GENESIS_IH_img_p_image; - int GENESIS_IH_img_l_image; + int GENESIS_IH_img_p_id; + int GENESIS_IH_img_l_id; + int GENESIS_IH_img_p_unpack; + int GENESIS_IH_img_l_unpack; + int GENESIS_IH_img_p_compress; + int GENESIS_IH_img_l_compress; + int GENESIS_IH_img_p_histo; + int GENESIS_IH_img_l_histo; + int GENESIS_IH_img_p_text; + int GENESIS_IH_img_l_text; + int GENESIS_IH_img_p_graphics; + int GENESIS_IH_img_l_graphics; + int GENESIS_IH_img_p_dbHdr; + int GENESIS_IH_img_l_dbHdr; + int GENESIS_IH_img_levelOffset; + int GENESIS_IH_img_p_user; + int GENESIS_IH_img_l_user; + int GENESIS_IH_img_p_suite; + int GENESIS_IH_img_l_suite; + int GENESIS_IH_img_p_exam; + int GENESIS_IH_img_l_exam; + int GENESIS_IH_img_p_series; + int GENESIS_IH_img_l_series; + int GENESIS_IH_img_p_image; + int GENESIS_IH_img_l_image; }; diff --git a/Modules/IO/GE/src/itkGE4ImageIO.cxx b/Modules/IO/GE/src/itkGE4ImageIO.cxx index de5f28cfda1..b9d96199130 100644 --- a/Modules/IO/GE/src/itkGE4ImageIO.cxx +++ b/Modules/IO/GE/src/itkGE4ImageIO.cxx @@ -89,8 +89,8 @@ GE4ImageIO::ReadHeader(const char * FileNameToRead) // Set modality to UNKNOWN strcpy(hdr->modality, "UNK"); - char tmpStr[IOCommon::ITK_MAXPATHLEN + 1]; - int intTmp; + char tmpStr[IOCommon::ITK_MAXPATHLEN + 1]; + int intTmp; short tmpShort; // @@ -300,8 +300,8 @@ GE4ImageIO::MvtSunf(int numb) ByteSwapper::SwapFromSystemToBigEndian(&numb); const unsigned int dg_exp = (numb >> 24) & dexponent; const unsigned int dg_sign = numb & signbit; - unsigned int dg_mantissa = (numb & dmantissa) << 8; - int sun_exp = 4 * (dg_exp - 64); + unsigned int dg_mantissa = (numb & dmantissa) << 8; + int sun_exp = 4 * (dg_exp - 64); while ((dg_mantissa & signbit) == 0 && dg_mantissa != 0) { --sun_exp; diff --git a/Modules/IO/GE/test/itkGEImageIOTest.cxx b/Modules/IO/GE/test/itkGEImageIOTest.cxx index e29175846b7..017e1d4ad34 100644 --- a/Modules/IO/GE/test/itkGEImageIOTest.cxx +++ b/Modules/IO/GE/test/itkGEImageIOTest.cxx @@ -54,7 +54,7 @@ itkGEImageIOFactoryTest(int argc, char * argv[]) char * filename = *++argv; ImagePointer input; - auto imageReader = ImageReaderType::New(); + auto imageReader = ImageReaderType::New(); try { @@ -87,10 +87,10 @@ itkGEImageIOTest(int argc, char * argv[]) { return EXIT_FAILURE; } - const std::string failmode(argv[1]); - const std::string filetype(argv[2]); - const std::string filename(argv[3]); - const bool Failmode = failmode == std::string("true"); + const std::string failmode(argv[1]); + const std::string filetype(argv[2]); + const std::string filename(argv[3]); + const bool Failmode = failmode == std::string("true"); itk::ImageIOBase::Pointer io; if (filetype == "GE4") { @@ -114,7 +114,7 @@ itkGEImageIOTest(int argc, char * argv[]) } ImagePointer input; - auto imageReader = ImageReaderType::New(); + auto imageReader = ImageReaderType::New(); try { diff --git a/Modules/IO/GIPL/include/itkGiplImageIO.h b/Modules/IO/GIPL/include/itkGiplImageIO.h index 87310943f42..40311388858 100644 --- a/Modules/IO/GIPL/include/itkGiplImageIO.h +++ b/Modules/IO/GIPL/include/itkGiplImageIO.h @@ -99,7 +99,7 @@ class ITKIOGIPL_EXPORT GiplImageIO : public ImageIOBase std::ifstream m_Ifstream{}; std::ofstream m_Ofstream{}; - bool m_IsCompressed{}; + bool m_IsCompressed{}; const std::unique_ptr m_Internal; }; diff --git a/Modules/IO/GIPL/src/itkGiplImageIO.cxx b/Modules/IO/GIPL/src/itkGiplImageIO.cxx index 44b9e3d7c9a..e9cc7592510 100644 --- a/Modules/IO/GIPL/src/itkGiplImageIO.cxx +++ b/Modules/IO/GIPL/src/itkGiplImageIO.cxx @@ -199,7 +199,7 @@ void GiplImageIO::Read(void * buffer) { const uint32_t dimensions = this->GetNumberOfDimensions(); - uint32_t numberOfPixels = 1; + uint32_t numberOfPixels = 1; for (unsigned int dim = 0; dim < dimensions; ++dim) { diff --git a/Modules/IO/HDF5/include/itkHDF5ImageIO.h b/Modules/IO/HDF5/include/itkHDF5ImageIO.h index c001b42ab1e..a4c708f74df 100644 --- a/Modules/IO/HDF5/include/itkHDF5ImageIO.h +++ b/Modules/IO/HDF5/include/itkHDF5ImageIO.h @@ -198,9 +198,9 @@ class ITKIOHDF5_EXPORT HDF5ImageIO : public StreamingImageIOBase template void StoreMetaData(MetaDataDictionary * metaDict, - const std::string & HDFPath, - const std::string & name, - unsigned long numElements); + const std::string & HDFPath, + const std::string & name, + unsigned long numElements); void SetupStreaming(H5::DataSpace * imageSpace, H5::DataSpace * slabSpace); @@ -214,9 +214,9 @@ class ITKIOHDF5_EXPORT HDF5ImageIO : public StreamingImageIOBase void ResetToInitialState(); - std::unique_ptr m_H5File; + std::unique_ptr m_H5File; std::unique_ptr m_VoxelDataSet; - bool m_ImageInformationWritten{ false }; + bool m_ImageInformationWritten{ false }; }; } // end namespace itk diff --git a/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx b/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx index 9603a72ff40..a6ba0304c2e 100644 --- a/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx +++ b/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx @@ -260,18 +260,18 @@ doesAttrExist(const H5::H5Object & object, const char * const name) void HDF5ImageIO::WriteScalar(const std::string & path, const bool value) { - constexpr hsize_t numScalars(1); + constexpr hsize_t numScalars(1); const H5::DataSpace scalarSpace(1, &numScalars); - const H5::PredType scalarType = H5::PredType::NATIVE_HBOOL; - H5::DataSet scalarSet = m_H5File->createDataSet(path, scalarType, scalarSpace); + const H5::PredType scalarType = H5::PredType::NATIVE_HBOOL; + H5::DataSet scalarSet = m_H5File->createDataSet(path, scalarType, scalarSpace); // // HDF5 can't distinguish // between bool and int datasets // in a disk file. So add an attribute // labeling this as a bool const std::string isBoolName("isBool"); - H5::Attribute isBool = scalarSet.createAttribute(isBoolName, scalarType, scalarSpace); - bool trueVal(true); + H5::Attribute isBool = scalarSet.createAttribute(isBoolName, scalarType, scalarSpace); + bool trueVal(true); isBool.write(scalarType, &trueVal); isBool.close(); auto tempVal = static_cast(value); @@ -282,19 +282,19 @@ HDF5ImageIO::WriteScalar(const std::string & path, const bool value) void HDF5ImageIO::WriteScalar(const std::string & path, const long value) { - constexpr hsize_t numScalars(1); + constexpr hsize_t numScalars(1); const H5::DataSpace scalarSpace(1, &numScalars); - const H5::PredType scalarType = H5::PredType::NATIVE_INT; - const H5::PredType attrType = H5::PredType::NATIVE_HBOOL; - H5::DataSet scalarSet = m_H5File->createDataSet(path, scalarType, scalarSpace); + const H5::PredType scalarType = H5::PredType::NATIVE_INT; + const H5::PredType attrType = H5::PredType::NATIVE_HBOOL; + H5::DataSet scalarSet = m_H5File->createDataSet(path, scalarType, scalarSpace); // // HDF5 can't distinguish // between long and int datasets // in a disk file. So add an attribute // labeling this as a long. const std::string isLongName("isLong"); - H5::Attribute isLong = scalarSet.createAttribute(isLongName, attrType, scalarSpace); - bool trueVal(true); + H5::Attribute isLong = scalarSet.createAttribute(isLongName, attrType, scalarSpace); + bool trueVal(true); isLong.write(attrType, &trueVal); isLong.close(); auto tempVal = static_cast(value); @@ -305,19 +305,19 @@ HDF5ImageIO::WriteScalar(const std::string & path, const long value) void HDF5ImageIO::WriteScalar(const std::string & path, const unsigned long value) { - constexpr hsize_t numScalars(1); + constexpr hsize_t numScalars(1); const H5::DataSpace scalarSpace(1, &numScalars); - const H5::PredType scalarType = H5::PredType::NATIVE_UINT; - const H5::PredType attrType = H5::PredType::NATIVE_HBOOL; - H5::DataSet scalarSet = m_H5File->createDataSet(path, scalarType, scalarSpace); + const H5::PredType scalarType = H5::PredType::NATIVE_UINT; + const H5::PredType attrType = H5::PredType::NATIVE_HBOOL; + H5::DataSet scalarSet = m_H5File->createDataSet(path, scalarType, scalarSpace); // // HDF5 can't distinguish // between unsigned long and unsigned int datasets // in a disk file. So add an attribute // labeling this as an unsigned long. const std::string isUnsignedLongName("isUnsignedLong"); - H5::Attribute isUnsignedLong = scalarSet.createAttribute(isUnsignedLongName, attrType, scalarSpace); - bool trueVal(true); + H5::Attribute isUnsignedLong = scalarSet.createAttribute(isUnsignedLongName, attrType, scalarSpace); + bool trueVal(true); isUnsignedLong.write(attrType, &trueVal); isUnsignedLong.close(); auto tempVal = static_cast(value); @@ -328,19 +328,19 @@ HDF5ImageIO::WriteScalar(const std::string & path, const unsigned long value) void HDF5ImageIO::WriteScalar(const std::string & path, const long long value) { - constexpr hsize_t numScalars(1); + constexpr hsize_t numScalars(1); const H5::DataSpace scalarSpace(1, &numScalars); - const H5::PredType scalarType = H5::PredType::STD_I64LE; - const H5::PredType attrType = H5::PredType::NATIVE_HBOOL; - H5::DataSet scalarSet = m_H5File->createDataSet(path, scalarType, scalarSpace); + const H5::PredType scalarType = H5::PredType::STD_I64LE; + const H5::PredType attrType = H5::PredType::NATIVE_HBOOL; + H5::DataSet scalarSet = m_H5File->createDataSet(path, scalarType, scalarSpace); // // HDF5 can't distinguish // between long and long long datasets // in a disk file. So add an attribute // labeling this as a long long const std::string isLLongName("isLLong"); - H5::Attribute isLLong = scalarSet.createAttribute(isLLongName, attrType, scalarSpace); - bool trueVal(true); + H5::Attribute isLLong = scalarSet.createAttribute(isLLongName, attrType, scalarSpace); + bool trueVal(true); isLLong.write(attrType, &trueVal); isLLong.close(); scalarSet.write(&value, scalarType); @@ -350,19 +350,19 @@ HDF5ImageIO::WriteScalar(const std::string & path, const long long value) void HDF5ImageIO::WriteScalar(const std::string & path, const unsigned long long value) { - constexpr hsize_t numScalars(1); + constexpr hsize_t numScalars(1); const H5::DataSpace scalarSpace(1, &numScalars); - const H5::PredType scalarType = H5::PredType::STD_U64LE; - const H5::PredType attrType = H5::PredType::NATIVE_HBOOL; - H5::DataSet scalarSet = m_H5File->createDataSet(path, scalarType, scalarSpace); + const H5::PredType scalarType = H5::PredType::STD_U64LE; + const H5::PredType attrType = H5::PredType::NATIVE_HBOOL; + H5::DataSet scalarSet = m_H5File->createDataSet(path, scalarType, scalarSpace); // // HDF5 can't distinguish // between unsigned long and unsigned long long // datasets in a disk file. So add an attribute // labeling this as an unsigned long long const std::string isULLongName("isULLong"); - H5::Attribute isULLong = scalarSet.createAttribute(isULLongName, attrType, scalarSpace); - bool trueVal(true); + H5::Attribute isULLong = scalarSet.createAttribute(isULLongName, attrType, scalarSpace); + bool trueVal(true); isULLong.write(attrType, &trueVal); isULLong.close(); scalarSet.write(&value, scalarType); @@ -373,10 +373,10 @@ template void HDF5ImageIO::WriteScalar(const std::string & path, const TScalar & value) { - constexpr hsize_t numScalars(1); + constexpr hsize_t numScalars(1); const H5::DataSpace scalarSpace(1, &numScalars); - const H5::PredType scalarType = GetType(); - H5::DataSet scalarSet = m_H5File->createDataSet(path, scalarType, scalarSpace); + const H5::PredType scalarType = GetType(); + H5::DataSet scalarSet = m_H5File->createDataSet(path, scalarType, scalarSpace); scalarSet.write(&value, scalarType); scalarSet.close(); } @@ -385,8 +385,8 @@ template TScalar HDF5ImageIO::ReadScalar(const std::string & DataSetName) { - hsize_t dim[1]; - H5::DataSet scalarSet = m_H5File->openDataSet(DataSetName); + hsize_t dim[1]; + H5::DataSet scalarSet = m_H5File->openDataSet(DataSetName); const H5::DataSpace Space = scalarSet.getSpace(); if (Space.getSimpleExtentNdims() != 1) @@ -398,7 +398,7 @@ HDF5ImageIO::ReadScalar(const std::string & DataSetName) { itkExceptionMacro("Elements > 1 for scalar type in HDF5 File"); } - TScalar scalar; + TScalar scalar; const H5::PredType scalarType = GetType(); scalarSet.read(&scalar, scalarType); scalarSet.close(); @@ -409,10 +409,10 @@ HDF5ImageIO::ReadScalar(const std::string & DataSetName) void HDF5ImageIO::WriteString(const std::string & path, const std::string & value) { - constexpr hsize_t numStrings(1); + constexpr hsize_t numStrings(1); const H5::DataSpace strSpace(1, &numStrings); - const H5::StrType strType(H5::PredType::C_S1, H5T_VARIABLE); - H5::DataSet strSet = m_H5File->createDataSet(path, strType, strSpace); + const H5::StrType strType(H5::PredType::C_S1, H5T_VARIABLE); + H5::DataSet strSet = m_H5File->createDataSet(path, strType, strSpace); strSet.write(value, strType); strSet.close(); } @@ -427,11 +427,11 @@ HDF5ImageIO::WriteString(const std::string & path, const char * s) std::string HDF5ImageIO::ReadString(const std::string & path) { - std::string rval; - constexpr hsize_t numStrings(1); + std::string rval; + constexpr hsize_t numStrings(1); const H5::DataSpace strSpace(1, &numStrings); - const H5::StrType strType(H5::PredType::C_S1, H5T_VARIABLE); - H5::DataSet strSet = m_H5File->openDataSet(path); + const H5::StrType strType(H5::PredType::C_S1, H5T_VARIABLE); + H5::DataSet strSet = m_H5File->openDataSet(path); strSet.read(rval, strType, strSpace); strSet.close(); return rval; @@ -441,10 +441,10 @@ template void HDF5ImageIO::WriteVector(const std::string & path, const std::vector & vec) { - const hsize_t dim(vec.size()); + const hsize_t dim(vec.size()); const H5::DataSpace vecSpace(1, &dim); - const H5::PredType vecType = GetType(); - H5::DataSet vecSet = m_H5File->createDataSet(path, vecType, vecSpace); + const H5::PredType vecType = GetType(); + H5::DataSet vecSet = m_H5File->createDataSet(path, vecType, vecSpace); vecSet.write(vec.data(), vecType); vecSet.close(); } @@ -454,9 +454,9 @@ std::vector HDF5ImageIO::ReadVector(const std::string & DataSetName) { std::vector vec; - hsize_t dim[1]; - H5::DataSet vecSet = m_H5File->openDataSet(DataSetName); - const H5::DataSpace Space = vecSet.getSpace(); + hsize_t dim[1]; + H5::DataSet vecSet = m_H5File->openDataSet(DataSetName); + const H5::DataSpace Space = vecSet.getSpace(); if (Space.getSimpleExtentNdims() != 1) { @@ -476,7 +476,7 @@ HDF5ImageIO::WriteDirections(const std::string & path, const std::vector(dim[0] * dim[1]); + const auto buf = make_unique_for_overwrite(dim[0] * dim[1]); unsigned int k(0); for (unsigned int i = 0; i < dim[1]; ++i) { @@ -488,7 +488,7 @@ HDF5ImageIO::WriteDirections(const std::string & path, const std::vectorcreateDataSet(path, H5::PredType::NATIVE_DOUBLE, dirSpace); + H5::DataSet dirSet = m_H5File->createDataSet(path, H5::PredType::NATIVE_DOUBLE, dirSpace); dirSet.write(buf.get(), H5::PredType::NATIVE_DOUBLE); dirSet.close(); } @@ -497,9 +497,9 @@ std::vector> HDF5ImageIO::ReadDirections(const std::string & path) { std::vector> rval; - H5::DataSet dirSet = m_H5File->openDataSet(path); - const H5::DataSpace dirSpace = dirSet.getSpace(); - hsize_t dim[2]; + H5::DataSet dirSet = m_H5File->openDataSet(path); + const H5::DataSpace dirSpace = dirSet.getSpace(); + hsize_t dim[2]; if (dirSpace.getSimpleExtentNdims() != 2) { itkExceptionMacro(" Wrong # of dims for Image Directions in HDF5 File"); @@ -546,9 +546,9 @@ HDF5ImageIO::ReadDirections(const std::string & path) template void HDF5ImageIO::StoreMetaData(MetaDataDictionary * metaDict, - const std::string & HDFPath, - const std::string & name, - unsigned long numElements) + const std::string & HDFPath, + const std::string & name, + unsigned long numElements) { if (numElements == 1) { @@ -561,7 +561,7 @@ HDF5ImageIO::StoreMetaData(MetaDataDictionary * metaDict, // store as itk::Array -- consistent with how // metadatadictionary actually is used in ITK std::vector valVec = this->ReadVector(HDFPath); - Array val(static_cast::SizeValueType>(valVec.size())); + Array val(static_cast::SizeValueType>(valVec.size())); for (unsigned int i = 0; i < val.GetSize(); ++i) { val[i] = valVec[i]; @@ -708,7 +708,7 @@ HDF5ImageIO::ReadImageInformation() std::string VoxelDataName(groupName); VoxelDataName += VoxelData; *(m_VoxelDataSet) = m_H5File->openDataSet(VoxelDataName); - H5::DataSet imageSet = *(m_VoxelDataSet); + H5::DataSet imageSet = *(m_VoxelDataSet); const H5::DataSpace imageSpace = imageSet.getSpace(); // // set the componentType @@ -720,7 +720,7 @@ HDF5ImageIO::ReadImageInformation() // reported # of dimensions in the voxel dataset { const hsize_t nDims = imageSpace.getSimpleExtentNdims(); - const auto Dims = make_unique_for_overwrite(nDims); + const auto Dims = make_unique_for_overwrite(nDims); imageSpace.getSimpleExtentDims(Dims.get()); if (nDims > this->GetNumberOfDimensions()) { @@ -742,8 +742,8 @@ HDF5ImageIO::ReadImageInformation() std::string localMetaDataName(MetaDataGroupName); localMetaDataName += name; - const H5::DataSet metaDataSet = m_H5File->openDataSet(localMetaDataName); - const H5::DataType metaDataType = metaDataSet.getDataType(); + const H5::DataSet metaDataSet = m_H5File->openDataSet(localMetaDataName); + const H5::DataType metaDataType = metaDataSet.getDataType(); const H5::DataSpace metaDataSpace = metaDataSet.getSpace(); if (metaDataSpace.getSimpleExtentNdims() != 1) { @@ -908,8 +908,8 @@ HDF5ImageIO::ReadImageInformation() void HDF5ImageIO::SetupStreaming(H5::DataSpace * imageSpace, H5::DataSpace * slabSpace) { - const ImageIORegion regionToRead = this->GetIORegion(); - ImageIORegion::SizeType size = regionToRead.GetSize(); + const ImageIORegion regionToRead = this->GetIORegion(); + ImageIORegion::SizeType size = regionToRead.GetSize(); ImageIORegion::IndexType start = regionToRead.GetIndex(); // const int numComponents = this->GetNumberOfComponents(); @@ -918,7 +918,7 @@ HDF5ImageIO::SetupStreaming(H5::DataSpace * imageSpace, H5::DataSpace * slabSpac const auto offset = make_unique_for_overwrite(HDFDim); const auto HDFSize = make_unique_for_overwrite(HDFDim); - const int limit = regionToRead.GetImageDimension(); + const int limit = regionToRead.GetImageDimension(); // // fastest moving dimension is intra-voxel // index @@ -950,12 +950,12 @@ HDF5ImageIO::SetupStreaming(H5::DataSpace * imageSpace, H5::DataSpace * slabSpac void HDF5ImageIO::Read(void * buffer) { - const ImageIORegion regionToRead = this->GetIORegion(); - const ImageIORegion::SizeType size = regionToRead.GetSize(); + const ImageIORegion regionToRead = this->GetIORegion(); + const ImageIORegion::SizeType size = regionToRead.GetSize(); const ImageIORegion::IndexType start = regionToRead.GetIndex(); const H5::DataType voxelType = m_VoxelDataSet->getDataType(); - H5::DataSpace imageSpace = m_VoxelDataSet->getSpace(); + H5::DataSpace imageSpace = m_VoxelDataSet->getSpace(); H5::DataSpace dspace; this->SetupStreaming(&imageSpace, &dspace); @@ -986,7 +986,7 @@ HDF5ImageIO::WriteMetaArray(const std::string & name, MetaDataObjectBase * metaO { return false; } - Array val = metaObj->GetMetaDataObjectValue(); + Array val = metaObj->GetMetaDataObjectValue(); std::vector vecVal(val.GetSize()); for (unsigned int i = 0; i < val.size(); ++i) { @@ -1054,7 +1054,7 @@ HDF5ImageIO::WriteImageInformation() this->WriteString(VoxelTypeName, typeVal); const int numComponents = this->GetNumberOfComponents(); - int numDims = this->GetNumberOfDimensions(); + int numDims = this->GetNumberOfDimensions(); // HDF5 dimensions listed slowest moving first, ITK are fastest // moving first. auto dims = make_unique_for_overwrite(numDims + (numComponents == 1 ? 0 : 1)); @@ -1069,7 +1069,7 @@ HDF5ImageIO::WriteImageInformation() ++numDims; } const H5::DataSpace imageSpace(numDims, dims.get()); - const H5::PredType dataType = ComponentToPredType(this->GetComponentType()); + const H5::PredType dataType = ComponentToPredType(this->GetComponentType()); // set up properties for chunked, compressed writes. // in this case, set the chunk size to be the N-1 dimension @@ -1098,7 +1098,7 @@ HDF5ImageIO::WriteImageInformation() for (auto it = metaDict.Begin(); it != end; ++it) { MetaDataObjectBase * metaObj = it->second.GetPointer(); - std::string objName(MetaDataGroupName); + std::string objName(MetaDataGroupName); objName += "/"; objName += it->first; // scalars @@ -1267,7 +1267,7 @@ HDF5ImageIO::Write(const void * buffer) try { const int numComponents = this->GetNumberOfComponents(); - int numDims = this->GetNumberOfDimensions(); + int numDims = this->GetNumberOfDimensions(); // HDF5 dimensions listed slowest moving first, ITK are fastest // moving first. const auto dims = make_unique_for_overwrite(numDims + (numComponents == 1 ? 0 : 1)); @@ -1281,9 +1281,9 @@ HDF5ImageIO::Write(const void * buffer) dims[numDims] = numComponents; ++numDims; } - H5::DataSpace imageSpace(numDims, dims.get()); + H5::DataSpace imageSpace(numDims, dims.get()); const H5::PredType dataType = ComponentToPredType(this->GetComponentType()); - H5::DataSpace dspace; + H5::DataSpace dspace; this->SetupStreaming(&imageSpace, &dspace); m_VoxelDataSet->write(buffer, dataType, dspace, imageSpace); } diff --git a/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx b/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx index c839be80874..df434e52310 100644 --- a/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx +++ b/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx @@ -73,7 +73,7 @@ class DemoImageSource : public GenerateImageSource itk::ImageRegionIteratorWithIndex it(out, out->GetRequestedRegion()); for (it.GoToBegin(); !it.IsAtEnd(); ++it) { - typename TOutputImage::IndexType idx = it.GetIndex(); + typename TOutputImage::IndexType idx = it.GetIndex(); const typename TOutputImage::PixelType pixel(idx[2] * 100 + idx[1] * 10 + idx[0]); it.Set(pixel); } @@ -131,7 +131,7 @@ HDF5ReadWriteTest2(const char * fileName) expectedRegion.SetSize(0, 5); expectedRegion.SetSize(1, 5); expectedRegion.SetSize(2, 1); - typename MonitorFilterType::RegionVectorType writerRegionVector = writerMonitor->GetUpdatedBufferedRegions(); + typename MonitorFilterType::RegionVectorType writerRegionVector = writerMonitor->GetUpdatedBufferedRegions(); typename ImageType::RegionType::IndexValueType iRegion; for (iRegion = 0; iRegion < 5; ++iRegion) { @@ -190,7 +190,7 @@ HDF5ReadWriteTest2(const char * fileName) // Check image pixel values. itk::ImageRegionIterator it(image, image->GetLargestPossibleRegion()); - typename ImageType::IndexType idx; + typename ImageType::IndexType idx; for (it.GoToBegin(); !it.IsAtEnd(); ++it) { idx = it.GetIndex(); diff --git a/Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx b/Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx index f569243465f..b2922f19909 100644 --- a/Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx +++ b/Modules/IO/HDF5/test/itkHDF5ImageIOTest.cxx @@ -30,11 +30,11 @@ HDF5ReadWriteTest(const char * fileName) std::cout << fileName << std::endl; int success(EXIT_SUCCESS); using ImageType = typename itk::Image; - typename ImageType::RegionType imageRegion; - typename ImageType::SizeType size; - typename ImageType::IndexType index; + typename ImageType::RegionType imageRegion; + typename ImageType::SizeType size; + typename ImageType::IndexType index; typename ImageType::SpacingType spacing; - typename ImageType::PointType origin; + typename ImageType::PointType origin; for (unsigned int i = 0; i < 3; ++i) { @@ -61,7 +61,7 @@ HDF5ReadWriteTest(const char * fileName) // // add some unique metadata itk::MetaDataDictionary & metaDict(im->GetMetaDataDictionary()); - constexpr bool metaDataBool(false); + constexpr bool metaDataBool(false); itk::EncapsulateMetaData(metaDict, "TestBool", metaDataBool); constexpr char metaDataChar('c'); @@ -121,7 +121,7 @@ HDF5ReadWriteTest(const char * fileName) // // fill image buffer - vnl_random randgen(12345678); + vnl_random randgen(12345678); itk::ImageRegionIterator it(im, im->GetLargestPossibleRegion()); for (it.GoToBegin(); !it.IsAtEnd(); ++it) { diff --git a/Modules/IO/IPL/include/itkGEImageHeader.h b/Modules/IO/IPL/include/itkGEImageHeader.h index c586941c56d..b87d1a2eda7 100644 --- a/Modules/IO/IPL/include/itkGEImageHeader.h +++ b/Modules/IO/IPL/include/itkGEImageHeader.h @@ -54,7 +54,7 @@ struct GEImageHeader float TE2; float TR; short flipAngle; - int NEX; + int NEX; float xFOV; float yFOV; float centerR; @@ -76,12 +76,12 @@ struct GEImageHeader short acqXsize; short acqYsize; short frequencyDir; - char scanner[16]; - char pulseSequence[128]; // Needs to be at least 65 for seimens vision - char patientId[32]; - char scanId[32]; - char name[64]; - char date[32]; + char scanner[16]; + char pulseSequence[128]; // Needs to be at least 65 for seimens vision + char patientId[32]; + char scanId[32]; + char name[64]; + char date[32]; short imageXsize; short imageYsize; float imageXres; @@ -91,9 +91,9 @@ struct GEImageHeader short numberOfSlices; short offset; - char filename[itk::IOCommon::ITK_MAXPATHLEN + 1]; - char hospital[35]; - char modality[4]; + char filename[itk::IOCommon::ITK_MAXPATHLEN + 1]; + char hospital[35]; + char modality[4]; short imagesPerSlice; short turboFactor; // This is only relevant for the geADW image format, but // is put here for convenience diff --git a/Modules/IO/IPL/include/itkIPLCommonImageIO.h b/Modules/IO/IPL/include/itkIPLCommonImageIO.h index ca34b923101..57d9a96fe31 100644 --- a/Modules/IO/IPL/include/itkIPLCommonImageIO.h +++ b/Modules/IO/IPL/include/itkIPLCommonImageIO.h @@ -141,14 +141,14 @@ class ITKIOIPL_EXPORT IPLCommonImageIO : public ImageIOBase int AddElementToList(const char * const filename, - const float sliceLocation, - const int offset, - const int XDim, - const int YDim, - const float XRes, - const float YRes, - const int Key1, - const int Key2); + const float sliceLocation, + const int offset, + const int XDim, + const int YDim, + const float XRes, + const float YRes, + const int Key1, + const int Key2); void sortImageListAscend(); @@ -164,8 +164,8 @@ class ITKIOIPL_EXPORT IPLCommonImageIO : public ImageIOBase // // data members - GEImageHeader * m_ImageHeader{}; - IOByteOrderEnum m_SystemByteOrder{}; + GEImageHeader * m_ImageHeader{}; + IOByteOrderEnum m_SystemByteOrder{}; IPLFileNameList * m_FilenameList{}; // // return 0 on success, -1 on failure diff --git a/Modules/IO/IPL/include/itkIPLFileNameList.h b/Modules/IO/IPL/include/itkIPLFileNameList.h index 9cd3941dcb4..dfdad27ccdb 100644 --- a/Modules/IO/IPL/include/itkIPLFileNameList.h +++ b/Modules/IO/IPL/include/itkIPLFileNameList.h @@ -78,11 +78,11 @@ class IPLFileSortInfo } IPLFileSortInfo(const char * const filename, - float sliceLocation, - int sliceOffset, - int echoNumber, - int imageNumber, - void * data = nullptr) + float sliceLocation, + int sliceOffset, + int echoNumber, + int imageNumber, + void * data = nullptr) { m_ImageFileName = filename; m_SliceLocation = sliceLocation; @@ -108,11 +108,11 @@ class IPLFileSortInfo IPLGetMacroDeclaration(Data, const void *); private: - std::string m_ImageFileName{}; - float m_SliceLocation{}; - int m_SliceOffset{}; - int m_EchoNumber{}; - int m_ImageNumber{}; + std::string m_ImageFileName{}; + float m_SliceLocation{}; + int m_SliceOffset{}; + int m_EchoNumber{}; + int m_ImageNumber{}; const void * m_Data{}; }; @@ -187,15 +187,15 @@ class ITKIOIPL_EXPORT IPLFileNameList bool AddElementToList(const char * const filename, - const float sliceLocation, - const int offset, - const int XDim, - const int YDim, - const float XRes, - const float YRes, - const int imageNumber, - const int Key1, - const int Key2) + const float sliceLocation, + const int offset, + const int XDim, + const int YDim, + const float XRes, + const float YRes, + const int imageNumber, + const int Key1, + const int Key2) { if (m_List.empty()) { @@ -241,7 +241,7 @@ class ITKIOIPL_EXPORT IPLFileNameList { auto it = m_List.begin(); auto itend = m_List.end(); - int i = 0; + int i = 0; for (i = 0; it != itend; i++, it++) { @@ -288,14 +288,14 @@ class ITKIOIPL_EXPORT IPLFileNameList private: ListType m_List{}; - int m_XDim{}; - int m_YDim{}; - float m_XRes{}; - float m_YRes{}; - int m_Key1{}; /** Key that must be matched for image to be used, - i.e. seriesNumber, extensionkey */ - int m_Key2{}; /** Key that must be matched for image to be used, - i.e. echoNumber */ + int m_XDim{}; + int m_YDim{}; + float m_XRes{}; + float m_YRes{}; + int m_Key1{}; /** Key that must be matched for image to be used, + i.e. seriesNumber, extensionkey */ + int m_Key2{}; /** Key that must be matched for image to be used, + i.e. echoNumber */ int m_SortOrder{}; }; } // namespace itk diff --git a/Modules/IO/IPL/src/itkIPLCommonImageIO.cxx b/Modules/IO/IPL/src/itkIPLCommonImageIO.cxx index 2358821a85f..f44b59ff695 100644 --- a/Modules/IO/IPL/src/itkIPLCommonImageIO.cxx +++ b/Modules/IO/IPL/src/itkIPLCommonImageIO.cxx @@ -74,13 +74,13 @@ void IPLCommonImageIO::Read(void * buffer) { auto * img_buffer = (short *)buffer; - auto it = m_FilenameList->begin(); - auto itend = m_FilenameList->end(); + auto it = m_FilenameList->begin(); + auto itend = m_FilenameList->end(); for (; it != itend; ++it) { const std::string curfilename = (*it)->GetImageFileName(); - std::ifstream f; + std::ifstream f; this->OpenFileForReading(f, curfilename); f.seekg((*it)->GetSliceOffset(), std::ios::beg); @@ -126,8 +126,8 @@ IPLCommonImageIO::ReadImageInformation() // GE images are stored in separate files per slice. // char imagePath[IOCommon::ITK_MAXPATHLEN+1]; // TODO -- use std::string instead of C strings - char imageMask[IOCommon::ITK_MAXPATHLEN + 1]; - char imagePath[IOCommon::ITK_MAXPATHLEN + 1]; + char imageMask[IOCommon::ITK_MAXPATHLEN + 1]; + char imagePath[IOCommon::ITK_MAXPATHLEN + 1]; const std::string _imagePath = itksys::SystemTools::CollapseFullPath(FileNameToRead.c_str()); FileNameToRead = _imagePath; @@ -137,7 +137,7 @@ IPLCommonImageIO::ReadImageInformation() // if anything fails in the header read, just let // exceptions propagate up. - bool isCT = false; + bool isCT = false; const std::string modality = m_ImageHeader->modality; if (modality == "CT") { @@ -158,7 +158,7 @@ IPLCommonImageIO::ReadImageInformation() // Add header info to metadictionary itk::MetaDataDictionary & thisDic = this->GetMetaDataDictionary(); - const std::string classname(this->GetNameOfClass()); + const std::string classname(this->GetNameOfClass()); itk::EncapsulateMetaData(thisDic, ITK_InputFilterName, classname); itk::EncapsulateMetaData(thisDic, ITK_OnDiskStorageTypeName, std::string("SHORT")); itk::EncapsulateMetaData(thisDic, ITK_OnDiskBitPerPixel, static_cast(16)); @@ -445,14 +445,14 @@ IPLCommonImageIO::hdr2Double(char * hdr) int IPLCommonImageIO::AddElementToList(const char * const filename, - const float sliceLocation, - const int offset, - const int XDim, - const int YDim, - const float XRes, - const float YRes, - const int Key1, - const int Key2) + const float sliceLocation, + const int offset, + const int XDim, + const int YDim, + const float XRes, + const float YRes, + const int Key1, + const int Key2) { if (m_FilenameList->NumFiles() == 0) { @@ -496,7 +496,7 @@ int IPLCommonImageIO::statTimeToAscii(void * clock, char * timeString, int len) { - auto tclock = (time_t)*((int *)clock); + auto tclock = (time_t)*((int *)clock); const char * const asciiTime = ctime(&tclock); strncpy(timeString, asciiTime, len); diff --git a/Modules/IO/ImageBase/include/itkArchetypeSeriesFileNames.h b/Modules/IO/ImageBase/include/itkArchetypeSeriesFileNames.h index 44468f3cd1b..6800d5ed2d0 100644 --- a/Modules/IO/ImageBase/include/itkArchetypeSeriesFileNames.h +++ b/Modules/IO/ImageBase/include/itkArchetypeSeriesFileNames.h @@ -121,8 +121,8 @@ class ITKIOImageBase_EXPORT ArchetypeSeriesFileNames : public Object std::string m_Archetype{}; std::vector m_Groupings{}; - StringVectorType m_FileNames{}; // ivar for returning by - // reference + StringVectorType m_FileNames{}; // ivar for returning by + // reference TimeStamp m_ArchetypeMTime{}; TimeStamp m_ScanTime{}; diff --git a/Modules/IO/ImageBase/include/itkConvertPixelBuffer.h b/Modules/IO/ImageBase/include/itkConvertPixelBuffer.h index 30eec2e6862..de84e241405 100644 --- a/Modules/IO/ImageBase/include/itkConvertPixelBuffer.h +++ b/Modules/IO/ImageBase/include/itkConvertPixelBuffer.h @@ -65,9 +65,9 @@ class ITK_TEMPLATE_EXPORT ConvertPixelBuffer static void ConvertVectorImage(const InputPixelType * inputData, - int inputNumberOfComponents, - OutputPixelType * outputData, - size_t size); + int inputNumberOfComponents, + OutputPixelType * outputData, + size_t size); protected: /** Convert to Gray output. */ @@ -91,9 +91,9 @@ class ITK_TEMPLATE_EXPORT ConvertPixelBuffer static void ConvertMultiComponentToGray(const InputPixelType * inputData, - int inputNumberOfComponents, - OutputPixelType * outputData, - size_t size); + int inputNumberOfComponents, + OutputPixelType * outputData, + size_t size); /** Convert to RGB output. */ /** Each RGB output component is set the @@ -119,9 +119,9 @@ class ITK_TEMPLATE_EXPORT ConvertPixelBuffer * components are ignored. */ static void ConvertMultiComponentToRGB(const InputPixelType * inputData, - int inputNumberOfComponents, - OutputPixelType * outputData, - size_t size); + int inputNumberOfComponents, + OutputPixelType * outputData, + size_t size); /** Convert to RGBA output. */ static void @@ -135,16 +135,16 @@ class ITK_TEMPLATE_EXPORT ConvertPixelBuffer static void ConvertMultiComponentToRGBA(const InputPixelType * inputData, - int inputNumberOfComponents, - OutputPixelType * outputData, - size_t size); + int inputNumberOfComponents, + OutputPixelType * outputData, + size_t size); /** This is meant for many component vectors, e.g. converting 31-component float to 31-component double. */ static void ConvertVectorToVector(const InputPixelType * inputData, - int inputNumberOfComponents, - OutputPixelType * outputData, - size_t size); + int inputNumberOfComponents, + OutputPixelType * outputData, + size_t size); /** Convert tensor output. */ /** Each input is made into a 6 component symmetric pixel */ @@ -163,9 +163,9 @@ class ITK_TEMPLATE_EXPORT ConvertPixelBuffer static void ConvertMultiComponentToComplex(const InputPixelType * inputData, - int inputNumberOfComponents, - OutputPixelType * outputData, - size_t size); + int inputNumberOfComponents, + OutputPixelType * outputData, + size_t size); /** the most common case, where InputComponentType == unsigned * char, the alpha is in the range 0..255. I presume in the diff --git a/Modules/IO/ImageBase/include/itkConvertPixelBuffer.hxx b/Modules/IO/ImageBase/include/itkConvertPixelBuffer.hxx index 0f4f59bcd6b..9a6d1f53ab0 100644 --- a/Modules/IO/ImageBase/include/itkConvertPixelBuffer.hxx +++ b/Modules/IO/ImageBase/include/itkConvertPixelBuffer.hxx @@ -47,7 +47,7 @@ void ConvertPixelBuffer::Convert(const InputPixelType * inputData, int inputNumberOfComponents, OutputPixelType * outputData, - size_t size) + size_t size) { switch (OutputConvertTraits::GetNumberOfComponents()) { @@ -166,8 +166,8 @@ template ::ConvertGrayToGray( const InputPixelType * inputData, - OutputPixelType * outputData, - size_t size) + OutputPixelType * outputData, + size_t size) { const InputPixelType * endInput = inputData + size; @@ -182,8 +182,8 @@ template ::ConvertRGBToGray( const InputPixelType * inputData, - OutputPixelType * outputData, - size_t size) + OutputPixelType * outputData, + size_t size) { // Weights convert from linear RGB to CIE luminance assuming a // modern monitor. See Charles Poynton's Colour FAQ @@ -207,8 +207,8 @@ template ::ConvertRGBAToGray( const InputPixelType * inputData, - OutputPixelType * outputData, - size_t size) + OutputPixelType * outputData, + size_t size) { // Weights convert from linear RGB to CIE luminance assuming a // modern monitor. See Charles Poynton's Colour FAQ @@ -216,7 +216,7 @@ ConvertPixelBuffer::Conver // NOTE: The scale factors are converted to whole numbers for // precision const InputPixelType * endInput = inputData + size * 4; - double maxAlpha(DefaultAlphaValue()); + double maxAlpha(DefaultAlphaValue()); // // To be backwards compatible, if the output pixel type // isn't a short or char type, don't fix the problem. @@ -243,9 +243,9 @@ template ::ConvertMultiComponentToGray( const InputPixelType * inputData, - int inputNumberOfComponents, - OutputPixelType * outputData, - size_t size) + int inputNumberOfComponents, + OutputPixelType * outputData, + size_t size) { // // To be backwards compatible, if the output pixel type @@ -294,8 +294,8 @@ template ::ConvertGrayToRGB( const InputPixelType * inputData, - OutputPixelType * outputData, - size_t size) + OutputPixelType * outputData, + size_t size) { const InputPixelType * endInput = inputData + size; @@ -313,8 +313,8 @@ template ::ConvertRGBToRGB( const InputPixelType * inputData, - OutputPixelType * outputData, - size_t size) + OutputPixelType * outputData, + size_t size) { const InputPixelType * endInput = inputData + size * 3; @@ -332,8 +332,8 @@ template ::ConvertRGBAToRGB( const InputPixelType * inputData, - OutputPixelType * outputData, - size_t size) + OutputPixelType * outputData, + size_t size) { const InputPixelType * endInput = inputData + size * 4; @@ -352,9 +352,9 @@ template ::ConvertMultiComponentToRGB( const InputPixelType * inputData, - int inputNumberOfComponents, - OutputPixelType * outputData, - size_t size) + int inputNumberOfComponents, + OutputPixelType * outputData, + size_t size) { // assume intensity alpha if (inputNumberOfComponents == 2) @@ -390,8 +390,8 @@ template ::ConvertGrayToRGBA( const InputPixelType * inputData, - OutputPixelType * outputData, - size_t size) + OutputPixelType * outputData, + size_t size) { const InputPixelType * endInput = inputData + size; @@ -412,8 +412,8 @@ template ::ConvertRGBToRGBA( const InputPixelType * inputData, - OutputPixelType * outputData, - size_t size) + OutputPixelType * outputData, + size_t size) { using InputConvertTraits = itk::DefaultConvertPixelTraits; using InputComponentType = typename InputConvertTraits::ComponentType; @@ -436,8 +436,8 @@ template ::ConvertRGBAToRGBA( const InputPixelType * inputData, - OutputPixelType * outputData, - size_t size) + OutputPixelType * outputData, + size_t size) { const InputPixelType * endInput = inputData + size * 4; @@ -456,9 +456,9 @@ template ::ConvertMultiComponentToRGBA( const InputPixelType * inputData, - int inputNumberOfComponents, - OutputPixelType * outputData, - size_t size) + int inputNumberOfComponents, + OutputPixelType * outputData, + size_t size) { // equal weights for 2 components?? if (inputNumberOfComponents == 2) @@ -494,9 +494,9 @@ template ::ConvertVectorToVector( const InputPixelType * inputData, - int inputNumberOfComponents, - OutputPixelType * outputData, - size_t size) + int inputNumberOfComponents, + OutputPixelType * outputData, + size_t size) { const int outputNumberOfComponents = OutputConvertTraits::GetNumberOfComponents(); const int componentCount = std::min(inputNumberOfComponents, outputNumberOfComponents); @@ -521,8 +521,8 @@ template ::ConvertTensor6ToTensor6( const InputPixelType * inputData, - OutputPixelType * outputData, - size_t size) + OutputPixelType * outputData, + size_t size) { for (size_t i = 0; i < size; ++i) { @@ -543,8 +543,8 @@ template ::ConvertGrayToComplex( const InputPixelType * inputData, - OutputPixelType * outputData, - size_t size) + OutputPixelType * outputData, + size_t size) { const InputPixelType * endInput = inputData + size; @@ -561,8 +561,8 @@ template ::ConvertComplexToComplex( const InputPixelType * inputData, - OutputPixelType * outputData, - size_t size) + OutputPixelType * outputData, + size_t size) { const InputPixelType * endInput = inputData + size * 2; @@ -579,8 +579,8 @@ template ::ConvertTensor9ToTensor6( const InputPixelType * inputData, - OutputPixelType * outputData, - size_t size) + OutputPixelType * outputData, + size_t size) { for (size_t i = 0; i < size; ++i) { @@ -599,9 +599,9 @@ template ::ConvertMultiComponentToComplex( const InputPixelType * inputData, - int inputNumberOfComponents, - OutputPixelType * outputData, - size_t size) + int inputNumberOfComponents, + OutputPixelType * outputData, + size_t size) { const InputPixelType * endInput = inputData + size * static_cast(inputNumberOfComponents); @@ -618,9 +618,9 @@ template ::ConvertVectorImage( const InputPixelType * inputData, - int inputNumberOfComponents, - OutputPixelType * outputData, - size_t size) + int inputNumberOfComponents, + OutputPixelType * outputData, + size_t size) { const size_t length = size * static_cast(inputNumberOfComponents); diff --git a/Modules/IO/ImageBase/include/itkIOCommon.h b/Modules/IO/ImageBase/include/itkIOCommon.h index e06aadd734c..86e04364364 100644 --- a/Modules/IO/ImageBase/include/itkIOCommon.h +++ b/Modules/IO/ImageBase/include/itkIOCommon.h @@ -54,7 +54,7 @@ class IOCommonEnums }; // Define how to print enumeration extern ITKIOImageBase_EXPORT std::ostream & - operator<<(std::ostream & out, const IOCommonEnums::AtomicPixel value); +operator<<(std::ostream & out, const IOCommonEnums::AtomicPixel value); /** \class IOCommon * \brief Centralized functionality for IO classes. * diff --git a/Modules/IO/ImageBase/include/itkIOTestHelper.h b/Modules/IO/ImageBase/include/itkIOTestHelper.h index 70560d6dc1e..70864e9510c 100644 --- a/Modules/IO/ImageBase/include/itkIOTestHelper.h +++ b/Modules/IO/ImageBase/include/itkIOTestHelper.h @@ -31,8 +31,8 @@ class IOTestHelper public: template static typename TImage::Pointer - ReadImage(const std::string & fileName, - const bool zeroOrigin = false, + ReadImage(const std::string & fileName, + const bool zeroOrigin = false, typename ImageIOBase::Pointer imageio = nullptr) { using ReaderType = itk::ImageFileReader; @@ -75,8 +75,8 @@ class IOTestHelper template static void - WriteImage(typename ImageType::Pointer image, - const std::string & filename, + WriteImage(typename ImageType::Pointer image, + const std::string & filename, typename ImageIOType::Pointer imageio = nullptr) { const bool create_local_io_object{ imageio.IsNull() }; @@ -107,7 +107,7 @@ class IOTestHelper const std::string bad_root_path{ "/a_blatantly_obvious/bad_file_path/that/should/never/exist/on/the/computer/" }; const std::string bad_filename{ bad_root_path + filename }; - bool exception_correctly_caught = false; + bool exception_correctly_caught = false; auto writer = WriterType::New(); writer->SetImageIO(imageio); @@ -196,7 +196,7 @@ class IOTestHelper template static typename ImageType::Pointer - AllocateImageFromRegionAndSpacing(const typename ImageType::RegionType & region, + AllocateImageFromRegionAndSpacing(const typename ImageType::RegionType & region, const typename ImageType::SpacingType & spacing) { auto rval = ImageType::New(); @@ -208,9 +208,9 @@ class IOTestHelper } template static typename ImageType::Pointer - AllocateImageFromRegionAndSpacing(const typename ImageType::RegionType & region, + AllocateImageFromRegionAndSpacing(const typename ImageType::RegionType & region, const typename ImageType::SpacingType & spacing, - int vecLength) + int vecLength) { auto rval = ImageType::New(); rval->SetSpacing(spacing); diff --git a/Modules/IO/ImageBase/include/itkImageFileReader.hxx b/Modules/IO/ImageBase/include/itkImageFileReader.hxx index de1086f2e0f..e615fad2351 100644 --- a/Modules/IO/ImageBase/include/itkImageFileReader.hxx +++ b/Modules/IO/ImageBase/include/itkImageFileReader.hxx @@ -142,9 +142,9 @@ ImageFileReader::GenerateOutputInformation() m_ImageIO->SetFileName(this->GetFileName().c_str()); m_ImageIO->ReadImageInformation(); - SizeType dimSize; - double spacing[TOutputImage::ImageDimension]; - double origin[TOutputImage::ImageDimension]; + SizeType dimSize; + double spacing[TOutputImage::ImageDimension]; + double origin[TOutputImage::ImageDimension]; typename TOutputImage::DirectionType direction; std::vector> directionIO; @@ -262,7 +262,7 @@ ImageFileReader::TestFileExistanceAndReadabili if (!itksys::SystemTools::FileExists(this->GetFileName().c_str())) { ImageFileReaderException e(__FILE__, __LINE__); - std::ostringstream msg; + std::ostringstream msg; msg << "The file doesn't exist. " << std::endl << "Filename = " << this->GetFileName() << std::endl; e.SetDescription(msg.str().c_str()); throw e; @@ -292,14 +292,14 @@ void ImageFileReader::EnlargeOutputRequestedRegion(DataObject * output) { itkDebugMacro("Starting EnlargeOutputRequestedRegion() "); - const typename TOutputImage::Pointer out = dynamic_cast(output); + const typename TOutputImage::Pointer out = dynamic_cast(output); const typename TOutputImage::RegionType largestRegion = out->GetLargestPossibleRegion(); - ImageRegionType streamableRegion; + ImageRegionType streamableRegion; // The following code converts the ImageRegion (templated over dimension) // into an ImageIORegion (not templated over dimension). const ImageRegionType imageRequestedRegion = out->GetRequestedRegion(); - ImageIORegion ioRequestedRegion(TOutputImage::ImageDimension); + ImageIORegion ioRequestedRegion(TOutputImage::ImageDimension); using ImageIOAdaptor = ImageIORegionAdaptor; @@ -446,7 +446,7 @@ ImageFileReader::DoConvertBuffer(const void * { // get the pointer to the destination buffer OutputImagePixelType * outputData = this->GetOutput()->GetPixelContainer()->GetBufferPointer(); - const bool isVectorImage(strcmp(this->GetOutput()->GetNameOfClass(), "VectorImage") == 0); + const bool isVectorImage(strcmp(this->GetOutput()->GetNameOfClass(), "VectorImage") == 0); // TODO: // Pass down the PixelType (RGB, VECTOR, etc.) so that any vector to // scalar conversion be type specific. i.e. RGB to scalar would use @@ -497,7 +497,7 @@ ImageFileReader::DoConvertBuffer(const void * #define TYPENAME(x) m_ImageIO->GetComponentTypeAsString(ImageIOBase::MapPixelType::CType) ImageFileReaderException e(__FILE__, __LINE__); - std::ostringstream msg; + std::ostringstream msg; msg << "Couldn't convert component type: " << std::endl << " " << m_ImageIO->GetComponentTypeAsString(m_ImageIO->GetComponentType()) << std::endl << "to one of: " << std::endl diff --git a/Modules/IO/ImageBase/include/itkImageFileReaderException.h b/Modules/IO/ImageBase/include/itkImageFileReaderException.h index 2ee6c399f79..25a2e156c59 100644 --- a/Modules/IO/ImageBase/include/itkImageFileReaderException.h +++ b/Modules/IO/ImageBase/include/itkImageFileReaderException.h @@ -46,9 +46,9 @@ class ITKIOImageBase_EXPORT ImageFileReaderException : public ExceptionObject /** Constructor. */ ImageFileReaderException(const std::string & file, - unsigned int line, - const char * message = "Error in IO", - const char * loc = "Unknown") + unsigned int line, + const char * message = "Error in IO", + const char * loc = "Unknown") : ExceptionObject(file, line, message, loc) {} diff --git a/Modules/IO/ImageBase/include/itkImageFileWriter.h b/Modules/IO/ImageBase/include/itkImageFileWriter.h index 25630480c2c..466aa3033f5 100644 --- a/Modules/IO/ImageBase/include/itkImageFileWriter.h +++ b/Modules/IO/ImageBase/include/itkImageFileWriter.h @@ -49,9 +49,9 @@ class ITKIOImageBase_EXPORT ImageFileWriterException : public ExceptionObject /** Constructor. */ ImageFileWriterException(const std::string & file, - unsigned int line, - const char * message = "Error in IO", - const char * loc = "Unknown") + unsigned int line, + const char * message = "Error in IO", + const char * loc = "Unknown") : ExceptionObject(file, line, message, loc) {} @@ -227,15 +227,15 @@ class ITK_TEMPLATE_EXPORT ImageFileWriter : public ProcessObject std::string m_FileName{}; ImageIOBase::Pointer m_ImageIO{}; - bool m_UserSpecifiedImageIO{ false }; + bool m_UserSpecifiedImageIO{ false }; ImageIORegion m_PasteIORegion{ TInputImage::ImageDimension }; - unsigned int m_NumberOfStreamDivisions{ 1 }; - bool m_UserSpecifiedIORegion{ false }; + unsigned int m_NumberOfStreamDivisions{ 1 }; + bool m_UserSpecifiedIORegion{ false }; bool m_FactorySpecifiedImageIO{ false }; // did factory mechanism set the ImageIO? bool m_UseCompression{ false }; - int m_CompressionLevel{ -1 }; + int m_CompressionLevel{ -1 }; bool m_UseInputMetaDataDictionary{ true }; }; diff --git a/Modules/IO/ImageBase/include/itkImageFileWriter.hxx b/Modules/IO/ImageBase/include/itkImageFileWriter.hxx index 734f1b2cbae..42db694b63f 100644 --- a/Modules/IO/ImageBase/include/itkImageFileWriter.hxx +++ b/Modules/IO/ImageBase/include/itkImageFileWriter.hxx @@ -114,8 +114,8 @@ ImageFileWriter::Write() if (m_ImageIO.IsNull()) { - ImageFileWriterException e(__FILE__, __LINE__); - std::ostringstream msg; + ImageFileWriterException e(__FILE__, __LINE__); + std::ostringstream msg; const std::list allobjects = ObjectFactoryBase::CreateAllInstance("itkImageIOBase"); msg << " Could not create IO object for writing file " << m_FileName.c_str() << std::endl; if (!allobjects.empty()) @@ -167,13 +167,13 @@ ImageFileWriter::Write() // Setup the ImageIO // m_ImageIO->SetNumberOfDimensions(TInputImage::ImageDimension); - const InputImageRegionType largestRegion = input->GetLargestPossibleRegion(); - const typename TInputImage::SpacingType & spacing = input->GetSpacing(); + const InputImageRegionType largestRegion = input->GetLargestPossibleRegion(); + const typename TInputImage::SpacingType & spacing = input->GetSpacing(); const typename TInputImage::DirectionType & direction = input->GetDirection(); // BUG 8436: Wrong origin when writing a file with non-zero index // origin = input->GetOrigin(); const typename TInputImage::IndexType & startIndex = largestRegion.GetIndex(); - typename TInputImage::PointType origin; + typename TInputImage::PointType origin; input->TransformIndexToPhysicalPoint(startIndex, origin); for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i) @@ -328,9 +328,9 @@ template void ImageFileWriter::GenerateData() { - const InputImageType * input = this->GetInput(); + const InputImageType * input = this->GetInput(); const InputImageRegionType largestRegion = input->GetLargestPossibleRegion(); - InputImagePointer cacheImage; + InputImagePointer cacheImage; itkDebugMacro("Writing file: " << m_FileName); @@ -364,7 +364,7 @@ ImageFileWriter::GenerateData() else { ImageFileWriterException e(__FILE__, __LINE__); - std::ostringstream msg; + std::ostringstream msg; msg << "Did not get requested region!" << std::endl << "Requested:" << std::endl << ioRegion << "Actual:" << std::endl diff --git a/Modules/IO/ImageBase/include/itkImageIOBase.h b/Modules/IO/ImageBase/include/itkImageIOBase.h index ae0158f78c6..c8ae90dceb2 100644 --- a/Modules/IO/ImageBase/include/itkImageIOBase.h +++ b/Modules/IO/ImageBase/include/itkImageIOBase.h @@ -512,7 +512,7 @@ class ITKIOImageBase_EXPORT ImageIOBase : public LightProcessObject * class has more restrictive conditions then they should be checked */ virtual unsigned int - GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits, + GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits, const ImageIORegion & pasteRegion, const ImageIORegion & largestPossibleRegion); @@ -523,8 +523,8 @@ class ITKIOImageBase_EXPORT ImageIOBase : public LightProcessObject * Derived classes should overload this method to return a compatible region */ virtual ImageIORegion - GetSplitRegionForWriting(unsigned int ithPiece, - unsigned int numberOfActualSplits, + GetSplitRegionForWriting(unsigned int ithPiece, + unsigned int numberOfActualSplits, const ImageIORegion & pasteRegion, const ImageIORegion & largestPossibleRegion); @@ -724,8 +724,8 @@ class ITKIOImageBase_EXPORT ImageIOBase : public LightProcessObject bool m_UseCompression{ false }; - int m_CompressionLevel{ 30 }; - int m_MaximumCompressionLevel{ 100 }; + int m_CompressionLevel{ 30 }; + int m_MaximumCompressionLevel{ 100 }; std::string m_Compressor{ "uninitialized" }; /** Set/Get enforced maximum compression level value to limit range */ @@ -843,10 +843,10 @@ class ITKIOImageBase_EXPORT ImageIOBase : public LightProcessObject * encountered than an exception will be thrown. */ virtual void - OpenFileForWriting(std::ofstream & outputStream, + OpenFileForWriting(std::ofstream & outputStream, const std::string & filename, - bool truncate = true, - bool ascii = false); + bool truncate = true, + bool ascii = false); /** Convenient method to write a buffer as ASCII text. */ virtual void @@ -877,14 +877,14 @@ class ITKIOImageBase_EXPORT ImageIOBase : public LightProcessObject /** an implementation of ImageRegionSplitter:GetNumberOfSplits */ virtual unsigned int - GetActualNumberOfSplitsForWritingCanStreamWrite(unsigned int numberOfRequestedSplits, + GetActualNumberOfSplitsForWritingCanStreamWrite(unsigned int numberOfRequestedSplits, const ImageIORegion & pasteRegion) const; /** an implementation of ImageRegionSplitter:GetSplit */ virtual ImageIORegion - GetSplitRegionForWritingCanStreamWrite(unsigned int ithPiece, - unsigned int numberOfActualSplits, + GetSplitRegionForWritingCanStreamWrite(unsigned int ithPiece, + unsigned int numberOfActualSplits, const ImageIORegion & pasteRegion) const; private: @@ -898,18 +898,18 @@ class ITKIOImageBase_EXPORT ImageIOBase : public LightProcessObject /** Utility function for writing RAW bytes */ extern ITKIOImageBase_EXPORT void WriteRawBytesAfterSwapping(IOComponentEnum componentType, - const void * buffer, + const void * buffer, std::ofstream & file, IOByteOrderEnum byteOrder, - SizeValueType numberOfBytes, - SizeValueType numberOfComponents); + SizeValueType numberOfBytes, + SizeValueType numberOfComponents); /** Utility function for reading RAW bytes */ extern ITKIOImageBase_EXPORT void ReadRawBytesAfterSwapping(IOComponentEnum componentType, - void * buffer, + void * buffer, IOByteOrderEnum byteOrder, - SizeValueType numberOfComponents); + SizeValueType numberOfComponents); #define IMAGEIOBASE_TYPEMAP(type, ctype) \ template <> \ diff --git a/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx b/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx index 584ded7c1c2..c7d716f5174 100644 --- a/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx +++ b/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx @@ -77,7 +77,7 @@ ImageSeriesReader::ComputeMovingDimensionIndex(ReaderType * reader } const TOutputImage * first = reader->GetOutput(); - SizeType dimSize = first->GetLargestPossibleRegion().GetSize(); + SizeType dimSize = first->GetLargestPossibleRegion().GetSize(); // collapse the number of dimensions in image if any of the last // dimensions are one @@ -135,11 +135,11 @@ ImageSeriesReader::GenerateOutputInformation() firstReader->UpdateOutputInformation(); const TOutputImage * first = firstReader->GetOutput(); - typename TOutputImage::SpacingType spacing = first->GetSpacing(); - typename TOutputImage::PointType origin = first->GetOrigin(); + typename TOutputImage::SpacingType spacing = first->GetSpacing(); + typename TOutputImage::PointType origin = first->GetOrigin(); typename TOutputImage::DirectionType direction = first->GetDirection(); - ImageRegionType largestRegion = first->GetLargestPossibleRegion(); - unsigned int numberOfComponents = first->GetNumberOfComponentsPerPixel(); + ImageRegionType largestRegion = first->GetLargestPossibleRegion(); + unsigned int numberOfComponents = first->GetNumberOfComponentsPerPixel(); if (numberOfFiles == 1) { @@ -236,8 +236,8 @@ void ImageSeriesReader::EnlargeOutputRequestedRegion(DataObject * output) { const typename TOutputImage::Pointer out = dynamic_cast(output); - const ImageRegionType requestedRegion = out->GetRequestedRegion(); - const ImageRegionType largestRegion = out->GetLargestPossibleRegion(); + const ImageRegionType requestedRegion = out->GetRequestedRegion(); + const ImageRegionType largestRegion = out->GetLargestPossibleRegion(); if (m_UseStreaming) { @@ -257,7 +257,7 @@ ImageSeriesReader::GenerateData() const ImageRegionType requestedRegion = output->GetRequestedRegion(); const ImageRegionType largestRegion = output->GetLargestPossibleRegion(); - ImageRegionType sliceRegionToRequest = output->GetRequestedRegion(); + ImageRegionType sliceRegionToRequest = output->GetRequestedRegion(); // Each file must have the same size. SizeType validSize = largestRegion.GetSize(); @@ -290,13 +290,13 @@ ImageSeriesReader::GenerateData() this->m_OutputInformationMTime > this->m_MetaDataDictionaryArrayMTime && m_MetaDataDictionaryArrayUpdate; typename TOutputImage::InternalPixelType * outputBuffer = output->GetBufferPointer(); - IndexType sliceStartIndex = requestedRegion.GetIndex(); - const auto numberOfFiles = static_cast(m_FileNames.size()); + IndexType sliceStartIndex = requestedRegion.GetIndex(); + const auto numberOfFiles = static_cast(m_FileNames.size()); - typename TOutputImage::PointType prevSliceOrigin = output->GetOrigin(); + typename TOutputImage::PointType prevSliceOrigin = output->GetOrigin(); typename TOutputImage::SpacingType outputSpacing = output->GetSpacing(); - double maxSpacingDeviation = 0.0; - bool prevSliceIsValid = false; + double maxSpacingDeviation = 0.0; + bool prevSliceIsValid = false; for (int i = 0; i != numberOfFiles; ++i) { @@ -306,9 +306,9 @@ ImageSeriesReader::GenerateData() } const bool insideRequestedRegion = requestedRegion.IsInside(sliceStartIndex); - const int iFileName = (m_ReverseOrder ? numberOfFiles - i - 1 : i); - bool nonUniformSampling = false; - double spacingDeviation = 0.0; + const int iFileName = (m_ReverseOrder ? numberOfFiles - i - 1 : i); + bool nonUniformSampling = false; + double spacingDeviation = 0.0; // check if we need this slice if (!insideRequestedRegion && !needToUpdateMetaDataDictionaryArray) diff --git a/Modules/IO/ImageBase/include/itkImageSeriesWriter.h b/Modules/IO/ImageBase/include/itkImageSeriesWriter.h index 1989cdccd23..e448aa9ba7c 100644 --- a/Modules/IO/ImageBase/include/itkImageSeriesWriter.h +++ b/Modules/IO/ImageBase/include/itkImageSeriesWriter.h @@ -239,7 +239,7 @@ class ITK_TEMPLATE_EXPORT ImageSeriesWriter : public ProcessObject * NumericSeriesFileNames class. Removing this functionality from here allows * to use additional SeriesFileNames such as the DICOM filenames generators. * */ - std::string m_SeriesFormat{}; + std::string m_SeriesFormat{}; SizeValueType m_StartIndex{ 1 }; SizeValueType m_IncrementIndex{ 1 }; diff --git a/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx b/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx index dfd323f3249..2258328d3ad 100644 --- a/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx +++ b/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx @@ -129,7 +129,7 @@ ImageSeriesWriter::GenerateNumericFileNames() const ImageRegion inRegion = inputImage->GetRequestedRegion(); SizeValueType fileNumber = this->m_StartIndex; - char fileName[IOCommon::ITK_MAXPATHLEN + 1]; + char fileName[IOCommon::ITK_MAXPATHLEN + 1]; // Compute the number of files to be generated unsigned int numberOfFiles = 1; @@ -178,7 +178,7 @@ ImageSeriesWriter::WriteFiles() } // We need two regions. One for the input, one for the output. - ImageRegion inRegion = inputImage->GetRequestedRegion(); + ImageRegion inRegion = inputImage->GetRequestedRegion(); ImageRegion outRegion; // The size of the output will match the input sizes, up to the @@ -195,8 +195,8 @@ ImageSeriesWriter::WriteFiles() outputImage->Allocate(); // Set the origin and spacing of the output - double spacing[TOutputImage::ImageDimension]; - double origin[TOutputImage::ImageDimension]; + double spacing[TOutputImage::ImageDimension]; + double origin[TOutputImage::ImageDimension]; typename TOutputImage::DirectionType direction; for (unsigned int i = 0; i < TOutputImage::ImageDimension; ++i) { @@ -227,7 +227,7 @@ ImageSeriesWriter::WriteFiles() const SizeValueType pixelsPerFile = outputImage->GetRequestedRegion().GetNumberOfPixels(); - auto inSize = MakeFilled>(1); + auto inSize = MakeFilled>(1); for (unsigned int ns = 0; ns < TOutputImage::ImageDimension; ++ns) { inSize[ns] = outRegion.GetSize()[ns]; diff --git a/Modules/IO/ImageBase/include/itkInternationalizationIOHelpers.h b/Modules/IO/ImageBase/include/itkInternationalizationIOHelpers.h index d42721c3f58..82444732078 100644 --- a/Modules/IO/ImageBase/include/itkInternationalizationIOHelpers.h +++ b/Modules/IO/ImageBase/include/itkInternationalizationIOHelpers.h @@ -234,7 +234,7 @@ class I18nOfstream : public std::ostream } private: - int m_fd; + int m_fd; itk::fdoutbuf m_buf; }; @@ -269,7 +269,7 @@ class I18nIfstream : public std::istream } private: - int m_fd; + int m_fd; itk::fdinbuf m_buf; }; #elif LOCAL_USE_WIN32_WOPEN diff --git a/Modules/IO/ImageBase/include/itkRegularExpressionSeriesFileNames.h b/Modules/IO/ImageBase/include/itkRegularExpressionSeriesFileNames.h index 25682b67b03..431ad7c9c18 100644 --- a/Modules/IO/ImageBase/include/itkRegularExpressionSeriesFileNames.h +++ b/Modules/IO/ImageBase/include/itkRegularExpressionSeriesFileNames.h @@ -120,10 +120,10 @@ class ITKIOImageBase_EXPORT RegularExpressionSeriesFileNames : public Object PrintSelf(std::ostream & os, Indent indent) const override; private: - std::string m_Directory{}; + std::string m_Directory{}; unsigned int m_SubMatch{ 1 }; - bool m_NumericSort{ false }; - std::string m_RegularExpression{}; + bool m_NumericSort{ false }; + std::string m_RegularExpression{}; std::vector m_FileNames{}; }; diff --git a/Modules/IO/ImageBase/include/itkStreamingImageIOBase.h b/Modules/IO/ImageBase/include/itkStreamingImageIOBase.h index 1a594e17253..fb34fc7c9b7 100644 --- a/Modules/IO/ImageBase/include/itkStreamingImageIOBase.h +++ b/Modules/IO/ImageBase/include/itkStreamingImageIOBase.h @@ -86,7 +86,7 @@ class ITKIOImageBase_EXPORT StreamingImageIOBase : public ImageIOBase // Verifies the set file name meets the pasting requirements, then calls // GetActualNumberOfSplitsForWritingCanStreamWrite unsigned int - GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits, + GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits, const ImageIORegion & pasteRegion, const ImageIORegion & largestPossibleRegion) override; diff --git a/Modules/IO/ImageBase/include/itkfdstream/fdstream.hxx b/Modules/IO/ImageBase/include/itkfdstream/fdstream.hxx index 46d0e6cbe6d..b199cc9a90f 100644 --- a/Modules/IO/ImageBase/include/itkfdstream/fdstream.hxx +++ b/Modules/IO/ImageBase/include/itkfdstream/fdstream.hxx @@ -122,9 +122,9 @@ protected: * - at most, pbSize characters in putback area plus * - at most, bufSize characters in ordinary read buffer */ - static constexpr ptrdiff_t pbSize = 4; // size of putback area - static constexpr ptrdiff_t bufSize = 1024; // size of the data buffer - char buffer[bufSize + pbSize]; // data buffer + static constexpr ptrdiff_t pbSize = 4; // size of putback area + static constexpr ptrdiff_t bufSize = 1024; // size of the data buffer + char buffer[bufSize + pbSize]; // data buffer public: /* constructor diff --git a/Modules/IO/ImageBase/src/itkArchetypeSeriesFileNames.cxx b/Modules/IO/ImageBase/src/itkArchetypeSeriesFileNames.cxx index 40d0b3e7534..1b2bbf86d70 100644 --- a/Modules/IO/ImageBase/src/itkArchetypeSeriesFileNames.cxx +++ b/Modules/IO/ImageBase/src/itkArchetypeSeriesFileNames.cxx @@ -91,8 +91,8 @@ ArchetypeSeriesFileNames::Scan() // Parse the fileNameName and fileNamePath const std::string origFileName = itksys::SystemTools::GetFilenameName(unixArchetype.c_str()); - std::string fileNamePath = itksys::SystemTools::GetFilenamePath(unixArchetype.c_str()); - std::string pathPrefix; + std::string fileNamePath = itksys::SystemTools::GetFilenamePath(unixArchetype.c_str()); + std::string pathPrefix; // "Clean" the filename by escaping any special characters with backslashes. // This allows us to pass in filenames that include these special characters. @@ -120,10 +120,10 @@ ArchetypeSeriesFileNames::Scan() pathPrefix = ""; } - StringVectorType regExpFileNameVector; + StringVectorType regExpFileNameVector; const std::string regExpString = "([0-9]+)"; - IntVectorType numGroupStart; - IntVectorType numGroupLength; + IntVectorType numGroupStart; + IntVectorType numGroupLength; for (std::string::iterator sit = fileName.begin(); sit < fileName.end(); ++sit) { // If the element is a number, find its starting index and length. @@ -220,8 +220,8 @@ ArchetypeSeriesFileNames::PrintSelf(std::ostream & os, Indent indent) const { os << indent << "Grouping #" << j << std::endl; StringVectorType group = const_cast(this)->GetFileNames(j); - auto groupItr = group.begin(); - unsigned int i = 0; + auto groupItr = group.begin(); + unsigned int i = 0; while (groupItr != group.end()) { os << indent << indent << "FileNames[" << i << "]: " << *groupItr << std::endl; diff --git a/Modules/IO/ImageBase/src/itkImageIOBase.cxx b/Modules/IO/ImageBase/src/itkImageIOBase.cxx index 147de59385f..7e092b57b89 100644 --- a/Modules/IO/ImageBase/src/itkImageIOBase.cxx +++ b/Modules/IO/ImageBase/src/itkImageIOBase.cxx @@ -713,9 +713,9 @@ WriteBuffer(std::ostream & os, const TComponent * buffer, ImageIOBase::SizeType } } // namespace void -ImageIOBase::WriteBufferAsASCII(std::ostream & os, - const void * buffer, - IOComponentEnum ctype, +ImageIOBase::WriteBufferAsASCII(std::ostream & os, + const void * buffer, + IOComponentEnum ctype, ImageIOBase::SizeType numComp) { switch (ctype) @@ -827,7 +827,7 @@ void ReadBuffer(std::istream & is, TComponent * buffer, ImageIOBase::SizeType num) { using PrintType = typename itk::NumericTraits::PrintType; - PrintType temp; + PrintType temp; TComponent * ptr = buffer; for (ImageIOBase::SizeType i = 0; i < num; i++, ptr++) { @@ -931,7 +931,7 @@ ImageIOBase::ReadBufferAsASCII(std::istream & is, void * buffer, IOComponentEnum namespace { -std::mutex ioDefaultSplitterMutex; +std::mutex ioDefaultSplitterMutex; ImageRegionSplitterBase::Pointer ioDefaultSplitter; } // namespace @@ -969,9 +969,9 @@ ImageIOBase::HasSupportedWriteExtension(const char * fileName, bool ignoreCase) bool -ImageIOBase::HasSupportedExtension(const char * filename, +ImageIOBase::HasSupportedExtension(const char * filename, const ImageIOBase::ArrayOfExtensionsType & supportedExtensions, - bool ignoreCase) + bool ignoreCase) { std::string ext = itksys::SystemTools::GetFilenameLastExtension(filename); @@ -1014,7 +1014,7 @@ ImageIOBase::HasSupportedExtension(const char * fi } unsigned int -ImageIOBase::GetActualNumberOfSplitsForWritingCanStreamWrite(unsigned int numberOfRequestedSplits, +ImageIOBase::GetActualNumberOfSplitsForWritingCanStreamWrite(unsigned int numberOfRequestedSplits, const ImageIORegion & pasteRegion) const { const ImageRegionSplitterBase * splitter = this->GetImageRegionSplitter(); @@ -1022,7 +1022,7 @@ ImageIOBase::GetActualNumberOfSplitsForWritingCanStreamWrite(unsigned int } unsigned int -ImageIOBase::GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits, +ImageIOBase::GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits, const ImageIORegion & pasteRegion, const ImageIORegion & largestPossibleRegion) { @@ -1043,8 +1043,8 @@ ImageIOBase::GetActualNumberOfSplitsForWriting(unsigned int numberOfReq } ImageIORegion -ImageIOBase::GetSplitRegionForWritingCanStreamWrite(unsigned int ithPiece, - unsigned int numberOfActualSplits, +ImageIOBase::GetSplitRegionForWritingCanStreamWrite(unsigned int ithPiece, + unsigned int numberOfActualSplits, const ImageIORegion & pasteRegion) const { ImageIORegion splitRegion = pasteRegion; @@ -1056,8 +1056,8 @@ ImageIOBase::GetSplitRegionForWritingCanStreamWrite(unsigned int ithPie } ImageIORegion -ImageIOBase::GetSplitRegionForWriting(unsigned int ithPiece, - unsigned int numberOfActualSplits, +ImageIOBase::GetSplitRegionForWriting(unsigned int ithPiece, + unsigned int numberOfActualSplits, const ImageIORegion & pasteRegion, const ImageIORegion & largestPossibleRegion) { diff --git a/Modules/IO/ImageBase/src/itkNumericSeriesFileNames.cxx b/Modules/IO/ImageBase/src/itkNumericSeriesFileNames.cxx index c26fc293aaf..0bd88d46200 100644 --- a/Modules/IO/ImageBase/src/itkNumericSeriesFileNames.cxx +++ b/Modules/IO/ImageBase/src/itkNumericSeriesFileNames.cxx @@ -59,7 +59,7 @@ NumericSeriesFileNames::GetFileNames() // absurdly long integer string. } const OffsetValueType bufflen = nchars + 1; - const auto temp = make_unique_for_overwrite(bufflen); + const auto temp = make_unique_for_overwrite(bufflen); ITK_GCC_PRAGMA_PUSH ITK_GCC_SUPPRESS_Wformat_nonliteral const OffsetValueType result = snprintf(temp.get(), bufflen, m_SeriesFormat.c_str(), i); diff --git a/Modules/IO/ImageBase/src/itkRawImageIOUtilities.cxx b/Modules/IO/ImageBase/src/itkRawImageIOUtilities.cxx index dd7e8985cdc..b912a95d737 100644 --- a/Modules/IO/ImageBase/src/itkRawImageIOUtilities.cxx +++ b/Modules/IO/ImageBase/src/itkRawImageIOUtilities.cxx @@ -24,11 +24,11 @@ namespace template void -_WriteRawBytesAfterSwappingUtility(const void * buffer, - std::ofstream & file, +_WriteRawBytesAfterSwappingUtility(const void * buffer, + std::ofstream & file, itk::IOByteOrderEnum byteOrder, - itk::SizeValueType numberOfBytes, - itk::SizeValueType numberOfComponents) + itk::SizeValueType numberOfBytes, + itk::SizeValueType numberOfComponents) { using InternalByteSwapperType = itk::ByteSwapper; @@ -74,11 +74,11 @@ namespace itk void WriteRawBytesAfterSwapping(IOComponentEnum componentType, - const void * buffer, + const void * buffer, std::ofstream & file, IOByteOrderEnum byteOrder, - SizeValueType numberOfBytes, - SizeValueType numberOfComponents) + SizeValueType numberOfBytes, + SizeValueType numberOfComponents) { // Swap bytes if necessary if (componentType == IOComponentEnum::USHORT) @@ -133,9 +133,9 @@ WriteRawBytesAfterSwapping(IOComponentEnum componentType, void ReadRawBytesAfterSwapping(IOComponentEnum componentType, - void * buffer, + void * buffer, IOByteOrderEnum byteOrder, - SizeValueType numberOfComponents) + SizeValueType numberOfComponents) { // Swap bytes if necessary if (componentType == IOComponentEnum::USHORT) diff --git a/Modules/IO/ImageBase/src/itkStreamingImageIOBase.cxx b/Modules/IO/ImageBase/src/itkStreamingImageIOBase.cxx index 6312c3ad967..e734bdd0d73 100644 --- a/Modules/IO/ImageBase/src/itkStreamingImageIOBase.cxx +++ b/Modules/IO/ImageBase/src/itkStreamingImageIOBase.cxx @@ -46,7 +46,7 @@ StreamingImageIOBase::StreamReadBufferAsBinary(std::istream & file, void * _buff // compute the number of continuous bytes to be read std::streamsize sizeOfChunk = 1; - unsigned int movingDirection = 0; + unsigned int movingDirection = 0; do { sizeOfChunk *= m_IORegion.GetSize(movingDirection); @@ -61,7 +61,7 @@ StreamingImageIOBase::StreamReadBufferAsBinary(std::istream & file, void * _buff { // calculate the position to seek to in the file std::streampos seekPos = 0; - SizeValueType subDimensionQuantity = 1; + SizeValueType subDimensionQuantity = 1; for (unsigned int i = 0; i < m_IORegion.GetImageDimension(); ++i) { seekPos = seekPos + static_cast(subDimensionQuantity * this->GetPixelSize() * currentIndex[i]); @@ -173,7 +173,7 @@ StreamingImageIOBase::StreamWriteBufferAsBinary(std::ostream & file, const void // compute the number of continuous bytes to be written std::streamsize sizeOfChunk = 1; - unsigned int movingDirection = 0; + unsigned int movingDirection = 0; do { sizeOfChunk *= m_IORegion.GetSize(movingDirection); @@ -187,7 +187,7 @@ StreamingImageIOBase::StreamWriteBufferAsBinary(std::ostream & file, const void { // calculate the position to seek to in the file std::streampos seekPos = 0; - SizeValueType subDimensionQuantity = 1; + SizeValueType subDimensionQuantity = 1; for (unsigned int i = 0; i < m_IORegion.GetImageDimension(); ++i) { seekPos = seekPos + static_cast(subDimensionQuantity * this->GetPixelSize() * currentIndex[i]); @@ -246,7 +246,7 @@ StreamingImageIOBase::CanStreamWrite() } unsigned int -StreamingImageIOBase::GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits, +StreamingImageIOBase::GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits, const ImageIORegion & pasteRegion, const ImageIORegion & largestPossibleRegion) { @@ -265,7 +265,7 @@ StreamingImageIOBase::GetActualNumberOfSplitsForWriting(unsigned int nu // we are going to be pasting (may be streaming too) // need to check to see if the file is compatible - std::string errorMessage; + std::string errorMessage; const Pointer headerImageIOReader = dynamic_cast(this->CreateAnother().GetPointer()); try diff --git a/Modules/IO/ImageBase/test/itk64bitTest.cxx b/Modules/IO/ImageBase/test/itk64bitTest.cxx index 28da1eeb94d..f0a98972717 100644 --- a/Modules/IO/ImageBase/test/itk64bitTest.cxx +++ b/Modules/IO/ImageBase/test/itk64bitTest.cxx @@ -29,8 +29,8 @@ int verifyContent(ImageType::Pointer image) { itk::ImageRegionConstIterator it(image, image->GetBufferedRegion()); - constexpr unsigned long long imageSize = 4 * 3 * 2; - unsigned long long value = 1; + constexpr unsigned long long imageSize = 4 * 3 * 2; + unsigned long long value = 1; while (!it.IsAtEnd() && value <= imageSize) { if (value == imageSize) diff --git a/Modules/IO/ImageBase/test/itkArchetypeSeriesFileNamesTest.cxx b/Modules/IO/ImageBase/test/itkArchetypeSeriesFileNamesTest.cxx index b36b91a8c58..1e4cfaf4103 100644 --- a/Modules/IO/ImageBase/test/itkArchetypeSeriesFileNamesTest.cxx +++ b/Modules/IO/ImageBase/test/itkArchetypeSeriesFileNamesTest.cxx @@ -45,7 +45,7 @@ itkArchetypeSeriesFileNamesTest(int argc, char * argv[]) fit->SetArchetype(archetype); ITK_TEST_SET_GET_VALUE(archetype, fit->GetArchetype()); - std::vector names = fit->GetFileNames(); + std::vector names = fit->GetFileNames(); std::vector::iterator nit; std::cout << "List of returned filenames: " << std::endl; diff --git a/Modules/IO/ImageBase/test/itkConvertBufferTest.cxx b/Modules/IO/ImageBase/test/itkConvertBufferTest.cxx index ca2cdaf1777..67d415c8765 100644 --- a/Modules/IO/ImageBase/test/itkConvertBufferTest.cxx +++ b/Modules/IO/ImageBase/test/itkConvertBufferTest.cxx @@ -23,17 +23,17 @@ int itkConvertBufferTest(int, char *[]) { - int piInit[3] = { 3, 1, 4 }; - const itk::RGBPixel pi = piInit; - int piaInit[4] = { 3, 1, 4, 1 }; + int piInit[3] = { 3, 1, 4 }; + const itk::RGBPixel pi = piInit; + int piaInit[4] = { 3, 1, 4, 1 }; const itk::RGBAPixel pia = piaInit; std::cerr << "RGBPixel: " << pi << '\n'; std::cerr << "RGBAPixel: " << pia << '\n'; itk::RGBAPixel ucpa[3]; - itk::RGBAPixel pa[3]; + itk::RGBAPixel pa[3]; - int ipa[] = { 1, 2, 3 }; + int ipa[] = { 1, 2, 3 }; itk::RGBPixel p[3]; // convert from int to RGB itk::ConvertPixelBuffer, itk::DefaultConvertPixelTraits>>::Convert( @@ -48,7 +48,7 @@ itkConvertBufferTest(int, char *[]) } } std::cerr << '\n'; - float ipa3com[] = { 1.f, 1.f, 1.f, 2.f, 2.f, 2.f, 3.f, 3.f, 3.f }; + float ipa3com[] = { 1.f, 1.f, 1.f, 2.f, 2.f, 2.f, 3.f, 3.f, 3.f }; itk::RGBPixel pf[3]; // convert from float[] to RGB itk::ConvertPixelBuffer, itk::DefaultConvertPixelTraits>>::Convert( @@ -100,8 +100,8 @@ itkConvertBufferTest(int, char *[]) float farray[] = { 1.1f, 2.2f, 3.3f, 4.4f, 5.5f, 6.4f, 7.4f, 8.8f, 9.9f }; // set the size of the array in number of elements constexpr int arraySize = std::size(farray); - double darray[arraySize]; // create a double array - int iarray[arraySize]; // create an int array + double darray[arraySize]; // create a double array + int iarray[arraySize]; // create an int array // convert the float array to a double array itk::ConvertPixelBuffer>::Convert(farray, 1, darray, arraySize); std::cerr << "\nfloat array : "; diff --git a/Modules/IO/ImageBase/test/itkConvertBufferTest2.cxx b/Modules/IO/ImageBase/test/itkConvertBufferTest2.cxx index e703ec2906e..f2c901933ec 100644 --- a/Modules/IO/ImageBase/test/itkConvertBufferTest2.cxx +++ b/Modules/IO/ImageBase/test/itkConvertBufferTest2.cxx @@ -30,8 +30,8 @@ itkConvertBufferTest2(int, char *[]) int gray5[] = { 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5 }; // outputs - int gray[5]; - itk::RGBPixel rgbpixel[5]; + int gray[5]; + itk::RGBPixel rgbpixel[5]; itk::RGBAPixel rgbapixel[5]; itk::ConvertPixelBuffer>::Convert(gray1, 1, gray, 5); diff --git a/Modules/IO/ImageBase/test/itkFileFreeImageIO.cxx b/Modules/IO/ImageBase/test/itkFileFreeImageIO.cxx index c702dd7ff22..a60d9801fcd 100644 --- a/Modules/IO/ImageBase/test/itkFileFreeImageIO.cxx +++ b/Modules/IO/ImageBase/test/itkFileFreeImageIO.cxx @@ -53,9 +53,9 @@ FileFreeImageIO ::ReadImageInformation() // spacing // origin // direction - std::vector sizeVector; - std::vector spacingVector; - std::vector originVector; + std::vector sizeVector; + std::vector spacingVector; + std::vector originVector; std::vector> directionVector; itksys::RegularExpression findSize("Size=([^:$]*)"); @@ -186,12 +186,12 @@ FileFreeImageIO ::Write(const void *) {} void -FileFreeImageIO ::SplitString(const std::string & text, - const std::string & separators, +FileFreeImageIO ::SplitString(const std::string & text, + const std::string & separators, std::vector & words) { const std::string::size_type n = text.length(); - std::string::size_type start = text.find_first_not_of(separators); + std::string::size_type start = text.find_first_not_of(separators); while (start < n) { std::string::size_type stop = text.find_first_of(separators, start); diff --git a/Modules/IO/ImageBase/test/itkFileFreeImageIOFactory.cxx b/Modules/IO/ImageBase/test/itkFileFreeImageIOFactory.cxx index 2db013f223c..e335ca1d170 100644 --- a/Modules/IO/ImageBase/test/itkFileFreeImageIOFactory.cxx +++ b/Modules/IO/ImageBase/test/itkFileFreeImageIOFactory.cxx @@ -31,7 +31,7 @@ extern "C" { ITKIOImageBase_EXPORT itk::ObjectFactoryBase * - itkLoad(); + itkLoad(); } diff --git a/Modules/IO/ImageBase/test/itkIOPluginTest.cxx b/Modules/IO/ImageBase/test/itkIOPluginTest.cxx index bedf1a7a3a5..97573c62250 100644 --- a/Modules/IO/ImageBase/test/itkIOPluginTest.cxx +++ b/Modules/IO/ImageBase/test/itkIOPluginTest.cxx @@ -30,7 +30,7 @@ itkIOPluginTest(int argc, char * argv[]) } const char * envName = "ITK_AUTOLOAD_PATH"; - char * myenv = getenv(envName); + char * myenv = getenv(envName); if (myenv) { @@ -55,10 +55,10 @@ itkIOPluginTest(int argc, char * argv[]) std::list overrides = factory->GetClassOverrideNames(); std::list names = factory->GetClassOverrideWithNames(); std::list descriptions = factory->GetClassOverrideDescriptions(); - std::list enableflags = factory->GetEnableFlags(); - auto n = names.begin(); - auto d = descriptions.begin(); - auto e = enableflags.begin(); + std::list enableflags = factory->GetEnableFlags(); + auto n = names.begin(); + auto d = descriptions.begin(); + auto e = enableflags.begin(); for (auto o = overrides.begin(); o != overrides.end(); ++o, ++n, ++d, e++) { std::cout << " Override " << *o << " with " << *n << std::endl diff --git a/Modules/IO/ImageBase/test/itkImageFileReaderPositiveSpacingTest.cxx b/Modules/IO/ImageBase/test/itkImageFileReaderPositiveSpacingTest.cxx index 632bf3dc064..40417923558 100644 --- a/Modules/IO/ImageBase/test/itkImageFileReaderPositiveSpacingTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileReaderPositiveSpacingTest.cxx @@ -63,10 +63,10 @@ itkImageFileReaderPositiveSpacingTest(int argc, char * argv[]) return EXIT_FAILURE; } ImageNDType::DirectionType ioDirection; - ImageNDType::SpacingType ioSpacing; - ImageNDType::PointType ioOrigin; - ImageNDType::SizeType ioSize; - const double * transformMatrix = metaImage.TransformMatrix(); + ImageNDType::SpacingType ioSpacing; + ImageNDType::PointType ioOrigin; + ImageNDType::SizeType ioSize; + const double * transformMatrix = metaImage.TransformMatrix(); for (unsigned int ii = 0; ii < ImageNDType::ImageDimension; ++ii) { ioSize[ii] = metaImage.DimSize(ii); @@ -93,14 +93,14 @@ itkImageFileReaderPositiveSpacingTest(int argc, char * argv[]) scale[ii][ii] = ioSpacing[ii]; } const ImageNDType::DirectionType indexToPhysicalPoint = ioDirection * scale; - ImageNDType::DirectionType physicalPointToIndex = indexToPhysicalPoint.GetInverse(); + ImageNDType::DirectionType physicalPointToIndex = indexToPhysicalPoint.GetInverse(); using IteratorType = itk::ImageRegionIteratorWithIndex; IteratorType it(image, image->GetLargestPossibleRegion()); for (it.GoToBegin(); !it.IsAtEnd(); ++it) { const ImageNDType::IndexType index = it.GetIndex(); - ImageNDType::PointType point; + ImageNDType::PointType point; image->TransformIndexToPhysicalPoint(index, point); // Compute index from physical point in baseline ImageNDType::IndexType baselineIndex; diff --git a/Modules/IO/ImageBase/test/itkImageFileReaderStreamingTest2.cxx b/Modules/IO/ImageBase/test/itkImageFileReaderStreamingTest2.cxx index a9ee3da499e..7f0b3a1b285 100644 --- a/Modules/IO/ImageBase/test/itkImageFileReaderStreamingTest2.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileReaderStreamingTest2.cxx @@ -38,7 +38,7 @@ bool SameRegionImage(ImageConstPointer test, ImageConstPointer baseline) { - constexpr PixelType intensityTolerance = 0; + constexpr PixelType intensityTolerance = 0; constexpr unsigned int radiusTolerance = 0; constexpr unsigned int numberOfPixelTolerance = 0; @@ -105,7 +105,7 @@ itkImageFileReaderStreamingTest2(int argc, char * argv[]) const ImageType::RegionType largestRegion = baselineReader->GetOutput()->GetLargestPossibleRegion(); - ImageType::RegionType ioregion = baselineReader->GetOutput()->GetLargestPossibleRegion(); + ImageType::RegionType ioregion = baselineReader->GetOutput()->GetLargestPossibleRegion(); streamingReader->Modified(); //////////////////////////////////////////////// diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest1.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest1.cxx index a74c42bbfb5..4bb7038b93a 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest1.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest1.cxx @@ -53,7 +53,7 @@ itkImageFileWriterPastingTest1(int argc, char * argv[]) ImageType::SizeType fullsize = reader->GetOutput()->GetLargestPossibleRegion().GetSize(); ImageType::IndexType index{}; - ImageType::SizeType size; + ImageType::SizeType size; size[0] = fullsize[0]; size[1] = fullsize[1]; size[2] = 0; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest2.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest2.cxx index d2ac585a18b..3247166fb2f 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest2.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest2.cxx @@ -31,8 +31,8 @@ using ImagePointer = ImageType::Pointer; bool SameImage(ImagePointer testImage, ImagePointer baselineImage) { - constexpr PixelType intensityTolerance = 0; - constexpr int radiusTolerance = 0; + constexpr PixelType intensityTolerance = 0; + constexpr int radiusTolerance = 0; constexpr unsigned long numberOfPixelTolerance = 0; using DiffType = itk::Testing::ComparisonImageFilter; @@ -109,7 +109,7 @@ itkImageFileWriterPastingTest2(int argc, char * argv[]) writer->SetInput(monitor->GetOutput()); // create a vaild region from the largest - itk::ImageIORegion ioregion(3); + itk::ImageIORegion ioregion(3); itk::ImageIORegion::IndexType index; index.push_back(pasteIndex[0]); diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest3.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest3.cxx index 94ca62ce793..ad458bc2788 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest3.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterPastingTest3.cxx @@ -33,8 +33,8 @@ namespace bool SameImage(ImagePointer testImage, ImagePointer baselineImage) { - constexpr PixelType intensityTolerance = 0; - constexpr int radiusTolerance = 0; + constexpr PixelType intensityTolerance = 0; + constexpr int radiusTolerance = 0; constexpr unsigned long numberOfPixelTolerance = 0; using DiffType = itk::Testing::ComparisonImageFilter; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterStreamingPastingCompressingTest1.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterStreamingPastingCompressingTest1.cxx index 523ea74f30c..04ccbcb457f 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterStreamingPastingCompressingTest1.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterStreamingPastingCompressingTest1.cxx @@ -38,8 +38,8 @@ namespace bool SameImage(ImagePointer testImage, ImagePointer baselineImage) { - constexpr PixelType intensityTolerance = 5; // need this for compression - constexpr int radiusTolerance = 0; + constexpr PixelType intensityTolerance = 5; // need this for compression + constexpr int radiusTolerance = 0; constexpr unsigned long numberOfPixelTolerance = 0; // NOTE ALEX: it look slike this filter does not take the spacing @@ -90,10 +90,10 @@ bool ActualTest(std::string inputFileName, std::string outputFileNameBase, std::string outputFileNameExtension, - bool streamWriting, - bool pasteWriting, - bool compressWriting, - int expectException = -1) + bool streamWriting, + bool pasteWriting, + bool compressWriting, + int expectException = -1) { std::cout << "Writing Combination: "; @@ -247,7 +247,7 @@ itkImageFileWriterStreamingPastingCompressingTest1(int argc, char * argv[]) return EXIT_FAILURE; } - int expectException[8]; + int expectException[8]; constexpr int expectedExceptionOffset = 4; for (int i = 0; i < 8; ++i) { diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest2.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest2.cxx index d9fa3d6c608..4d0e670b68e 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest2.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterStreamingTest2.cxx @@ -34,7 +34,7 @@ bool SameImage(std::string output, std::string baseline) { - constexpr PixelType intensityTolerance = 0; + constexpr PixelType intensityTolerance = 0; constexpr unsigned int radiusTolerance = 0; constexpr unsigned int numberOfPixelTolerance = 0; @@ -123,7 +123,7 @@ itkImageFileWriterStreamingTest2(int argc, char * argv[]) // get the size of the image reader->UpdateOutputInformation(); const ImageType::RegionType largestRegion = reader->GetOutput()->GetLargestPossibleRegion().GetSize(); - itk::ImageIORegion ioregion(3); + itk::ImageIORegion ioregion(3); //////////////////////////////////////////////// diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterTest.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterTest.cxx index 15da0822ecf..7adc8fd2955 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterTest.cxx @@ -33,9 +33,9 @@ itkImageFileWriterTest(int argc, char * argv[]) using ImageNDType = itk::Image; using WriterType = itk::ImageFileWriter; - auto image = ImageNDType::New(); + auto image = ImageNDType::New(); constexpr ImageNDType::IndexType index{}; - auto size = itk::MakeFilled(5); + auto size = itk::MakeFilled(5); const ImageNDType::RegionType region{ index, size }; diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterTest2.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterTest2.cxx index e676857d7e3..9af5e9e2861 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterTest2.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterTest2.cxx @@ -35,8 +35,8 @@ itkImageFileWriterTest2(int argc, char * argv[]) auto image = ImageNDType::New(); - auto size = itk::MakeFilled(5); - auto index = itk::MakeFilled(1); + auto size = itk::MakeFilled(5); + auto index = itk::MakeFilled(1); const ImageNDType::RegionType region{ index, size }; image->SetRegions(region); @@ -49,8 +49,8 @@ itkImageFileWriterTest2(int argc, char * argv[]) std::cout << "Original Origin: " << image->GetOrigin() << std::endl; ImageNDType::PointType readPoint; - auto writer = WriterType::New(); - auto reader = ReaderType::New(); + auto writer = WriterType::New(); + auto reader = ReaderType::New(); try { writer->SetInput(image); diff --git a/Modules/IO/ImageBase/test/itkImageFileWriterUpdateLargestPossibleRegionTest.cxx b/Modules/IO/ImageBase/test/itkImageFileWriterUpdateLargestPossibleRegionTest.cxx index bb1b37da959..42baf697edb 100644 --- a/Modules/IO/ImageBase/test/itkImageFileWriterUpdateLargestPossibleRegionTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageFileWriterUpdateLargestPossibleRegionTest.cxx @@ -46,8 +46,8 @@ itkImageFileWriterUpdateLargestPossibleRegionTest(int argc, char * argv[]) writer->SetFileName(argv[2]); const ImageType::RegionType region = reader->GetOutput()->GetLargestPossibleRegion(); - ImageType::IndexType index = region.GetIndex(); - ImageType::SizeType size = region.GetSize(); + ImageType::IndexType index = region.GetIndex(); + ImageType::SizeType size = region.GetSize(); itk::ImageIORegion ioregion(2); ioregion.SetIndex(0, index[0]); diff --git a/Modules/IO/ImageBase/test/itkImageIOBaseTest.cxx b/Modules/IO/ImageBase/test/itkImageIOBaseTest.cxx index 25b8efca17c..f0de1c016bc 100644 --- a/Modules/IO/ImageBase/test/itkImageIOBaseTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageIOBaseTest.cxx @@ -149,19 +149,19 @@ itkImageIOBaseTest(int, char *[]) itk::IOPixelEnum::COMPLEX, itk::IOPixelEnum::FIXEDARRAY, itk::IOPixelEnum::MATRIX }; - const char * listIOPixelTypeString[] = { "unknown", - "scalar", - "rgb", - "rgba", - "offset", - "vector", - "point", - "covariant_vector", - "symmetric_second_rank_tensor", - "diffusion_tensor_3D", - "complex", - "fixed_array", - "matrix" }; + const char * listIOPixelTypeString[] = { "unknown", + "scalar", + "rgb", + "rgba", + "offset", + "vector", + "point", + "covariant_vector", + "symmetric_second_rank_tensor", + "diffusion_tensor_3D", + "complex", + "fixed_array", + "matrix" }; // Compile time verification that the array lengths are correct for type and name static_assert(std::size(listComponentType) == std::size(listComponentTypeString), "listComponentType and listComponentTypeString must be same length"); diff --git a/Modules/IO/ImageBase/test/itkImageIODirection2DTest.cxx b/Modules/IO/ImageBase/test/itkImageIODirection2DTest.cxx index 953714a54d5..c4520693fb7 100644 --- a/Modules/IO/ImageBase/test/itkImageIODirection2DTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageIODirection2DTest.cxx @@ -59,7 +59,7 @@ itkImageIODirection2DTest(int argc, char * argv[]) std::cout << directionCosines << std::endl; - unsigned int element = 2; + unsigned int element = 2; constexpr double tolerance = 1e-5; for (unsigned int row = 0; row < Dimension; ++row) diff --git a/Modules/IO/ImageBase/test/itkImageIODirection3DTest.cxx b/Modules/IO/ImageBase/test/itkImageIODirection3DTest.cxx index db565d29f7e..1c3a3346166 100644 --- a/Modules/IO/ImageBase/test/itkImageIODirection3DTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageIODirection3DTest.cxx @@ -59,7 +59,7 @@ itkImageIODirection3DTest(int argc, char * argv[]) std::cout << directionCosines << std::endl; - unsigned int element = 2; + unsigned int element = 2; constexpr double tolerance = 1e-5; for (unsigned int row = 0; row < Dimension; ++row) diff --git a/Modules/IO/ImageBase/test/itkImageSeriesReaderSamplingTest.cxx b/Modules/IO/ImageBase/test/itkImageSeriesReaderSamplingTest.cxx index 56869ee9f8b..ead02c26aa6 100644 --- a/Modules/IO/ImageBase/test/itkImageSeriesReaderSamplingTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageSeriesReaderSamplingTest.cxx @@ -62,7 +62,7 @@ itkImageSeriesReaderSamplingTest(int argc, char * argv[]) for (auto d : *reader->GetMetaDataDictionaryArray()) { const itk::MetaDataDictionary theMetadata = *d; - double samplingDeviation = 0.0; + double samplingDeviation = 0.0; if (itk::ExposeMetaData(theMetadata, "ITK_non_uniform_sampling_deviation", samplingDeviation)) { std::cout << "slice ITK_non_uniform_sampling_deviation detected: " << samplingDeviation << std::endl; diff --git a/Modules/IO/ImageBase/test/itkImageSeriesWriterTest.cxx b/Modules/IO/ImageBase/test/itkImageSeriesWriterTest.cxx index 332b80c7057..0057642618a 100644 --- a/Modules/IO/ImageBase/test/itkImageSeriesWriterTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageSeriesWriterTest.cxx @@ -48,7 +48,7 @@ itkImageSeriesWriterTest(int argc, char * argv[]) using SeriesIdContainer = std::vector; const SeriesIdContainer & seriesUID = nameGenerator->GetSeriesUIDs(); - const std::string seriesIdentifier = seriesUID.begin()->c_str(); + const std::string seriesIdentifier = seriesUID.begin()->c_str(); auto reader = ReaderType::New(); reader->SetFileNames(nameGenerator->GetFileNames(seriesIdentifier)); @@ -130,7 +130,7 @@ itkImageSeriesWriterTest(int argc, char * argv[]) std::cout << "Format = " << format << std::endl; const ImageNDType::RegionType region = reader->GetOutput()->GetBufferedRegion(); - ImageNDType::SizeType size = region.GetSize(); + ImageNDType::SizeType size = region.GetSize(); constexpr itk::SizeValueType startIndex = 0; fit->SetStartIndex(startIndex); diff --git a/Modules/IO/ImageBase/test/itkLargeImageWriteReadTest.cxx b/Modules/IO/ImageBase/test/itkLargeImageWriteReadTest.cxx index 72496adeb36..4927443edd5 100644 --- a/Modules/IO/ImageBase/test/itkLargeImageWriteReadTest.cxx +++ b/Modules/IO/ImageBase/test/itkLargeImageWriteReadTest.cxx @@ -39,7 +39,7 @@ ActualTest(std::string filename, typename TImageType::SizeType size) using IteratorType = itk::ImageRegionIterator; using ConstIteratorType = itk::ImageRegionConstIterator; - const typename ImageType::IndexType index{}; + const typename ImageType::IndexType index{}; const typename ImageType::RegionType region{ index, size }; { // begin write block diff --git a/Modules/IO/ImageBase/test/itkNoiseImageFilterTest.cxx b/Modules/IO/ImageBase/test/itkNoiseImageFilterTest.cxx index 754ee5b0039..53e889a0ed2 100644 --- a/Modules/IO/ImageBase/test/itkNoiseImageFilterTest.cxx +++ b/Modules/IO/ImageBase/test/itkNoiseImageFilterTest.cxx @@ -47,7 +47,7 @@ itkNoiseImageFilterTest(int argc, char * argv[]) // Create a filter using FilterType = itk::NoiseImageFilter; - auto filter = FilterType::New(); + auto filter = FilterType::New(); const itk::SimpleFilterWatcher filterWatch(filter); using RescaleFilterType = itk::RescaleIntensityImageFilter; diff --git a/Modules/IO/ImageBase/test/itkReadWriteImageWithDictionaryTest.cxx b/Modules/IO/ImageBase/test/itkReadWriteImageWithDictionaryTest.cxx index a4b0a0cf779..af3ae9ababe 100644 --- a/Modules/IO/ImageBase/test/itkReadWriteImageWithDictionaryTest.cxx +++ b/Modules/IO/ImageBase/test/itkReadWriteImageWithDictionaryTest.cxx @@ -38,9 +38,9 @@ itkReadWriteImageWithDictionaryTest(int argc, char * argv[]) // Create the 16x16 input image auto inputImage = ImageType::New(); - auto size = ImageType::SizeType::Filled(16); + auto size = ImageType::SizeType::Filled(16); constexpr ImageType::IndexType index{}; - const ImageType::RegionType region{ index, size }; + const ImageType::RegionType region{ index, size }; inputImage->SetRegions(region); inputImage->Allocate(); inputImage->FillBuffer(0); @@ -49,7 +49,7 @@ itkReadWriteImageWithDictionaryTest(int argc, char * argv[]) // Add some metadata in the dictionary itk::MetaDataDictionary & inputDictionary = inputImage->GetMetaDataDictionary(); - const std::string voxelunitstr = "mm. "; // try to follow analyze format (length matters) + const std::string voxelunitstr = "mm. "; // try to follow analyze format (length matters) itk::EncapsulateMetaData(inputDictionary, itk::ITK_VoxelUnits, voxelunitstr); const std::string datestr = "26-05-2010"; // try to follow analyze format (length matters) itk::EncapsulateMetaData(inputDictionary, itk::ITK_ExperimentDate, datestr); diff --git a/Modules/IO/ImageBase/test/itkRegularExpressionSeriesFileNamesTest.cxx b/Modules/IO/ImageBase/test/itkRegularExpressionSeriesFileNamesTest.cxx index 22a96586e66..4652438bacb 100644 --- a/Modules/IO/ImageBase/test/itkRegularExpressionSeriesFileNamesTest.cxx +++ b/Modules/IO/ImageBase/test/itkRegularExpressionSeriesFileNamesTest.cxx @@ -50,7 +50,7 @@ itkRegularExpressionSeriesFileNamesTest(int argc, char * argv[]) bool numericSort = false; ITK_TEST_SET_GET_BOOLEAN(fit, NumericSort, numericSort); - std::vector names = fit->GetFileNames(); + std::vector names = fit->GetFileNames(); std::vector::iterator nit; // normal sort diff --git a/Modules/IO/ImageBase/test/itkUnicodeIOTest.cxx b/Modules/IO/ImageBase/test/itkUnicodeIOTest.cxx index f28c177213d..e5301bf49f4 100644 --- a/Modules/IO/ImageBase/test/itkUnicodeIOTest.cxx +++ b/Modules/IO/ImageBase/test/itkUnicodeIOTest.cxx @@ -152,7 +152,7 @@ main(int, char *[]) if (rfile != nullptr) { - char teststring[10]; + char teststring[10]; char * retptr = fgets(teststring, 10, rfile); if (retptr != nullptr) { diff --git a/Modules/IO/ImageBase/test/itkVectorImageReadWriteTest.cxx b/Modules/IO/ImageBase/test/itkVectorImageReadWriteTest.cxx index 767f63702ff..9188bb07143 100644 --- a/Modules/IO/ImageBase/test/itkVectorImageReadWriteTest.cxx +++ b/Modules/IO/ImageBase/test/itkVectorImageReadWriteTest.cxx @@ -51,7 +51,7 @@ itkVectorImageReadWriteTest(int argc, char * argv[]) // // Create ON and OFF vectors constexpr PixelType vector0{}; - PixelType vector1; + PixelType vector1; vector1[0] = 1.0; vector1[1] = 2.0; vector1[2] = 3.0; @@ -60,8 +60,8 @@ itkVectorImageReadWriteTest(int argc, char * argv[]) using ConstIteratorType = itk::ImageLinearConstIteratorWithIndex; // Create the 9x9 input image - auto size = ImageType::SizeType::Filled(9); - ImageType::IndexType index{}; + auto size = ImageType::SizeType::Filled(9); + ImageType::IndexType index{}; const ImageType::RegionType region{ index, size }; inputImage->SetRegions(region); inputImage->Allocate(); diff --git a/Modules/IO/JPEG/src/itkJPEGImageIO.cxx b/Modules/IO/JPEG/src/itkJPEGImageIO.cxx index 03925f87452..073b9169f66 100644 --- a/Modules/IO/JPEG/src/itkJPEGImageIO.cxx +++ b/Modules/IO/JPEG/src/itkJPEGImageIO.cxx @@ -32,8 +32,8 @@ // can longjmp out of the jpeg library struct itk_jpeg_error_mgr { - struct jpeg_error_mgr pub; /* "public" fields */ - jmp_buf setjmp_buffer; /* for return to caller */ + struct jpeg_error_mgr pub; /* "public" fields */ + jmp_buf setjmp_buffer; /* for return to caller */ }; extern "C" @@ -112,7 +112,7 @@ JPEGImageIO::CanReadFile(const char * file) // read the first two bytes unsigned char magic[2]; - auto n = static_cast(fread(magic, sizeof(magic), 1, JPEGfp.m_FilePointer)); + auto n = static_cast(fread(magic, sizeof(magic), 1, JPEGfp.m_FilePointer)); if (n != 1) { return false; @@ -127,7 +127,7 @@ JPEGImageIO::CanReadFile(const char * file) // go back to the start of the file fseek(JPEGfp.m_FilePointer, 0, SEEK_SET); // magic number is ok, try and read the header - struct itk_jpeg_error_mgr jerr; + struct itk_jpeg_error_mgr jerr; struct jpeg_decompress_struct cinfo; cinfo.err = jpeg_std_error(&jerr.pub); // for any jpeg error call itk_jpeg_error_exit @@ -162,7 +162,7 @@ JPEGImageIO::Read(void * buffer) { // use this class so return will call close const JPEGFileWrapper JPEGfp(this->GetFileName(), "rb"); - FILE * fp = JPEGfp.m_FilePointer; + FILE * fp = JPEGfp.m_FilePointer; if (!fp) { itkExceptionMacro("Error JPEGImageIO could not open file: " << this->GetFileName() << std::endl @@ -172,7 +172,7 @@ JPEGImageIO::Read(void * buffer) // create jpeg decompression object and error handler struct jpeg_decompress_struct cinfo; - struct itk_jpeg_error_mgr jerr; + struct itk_jpeg_error_mgr jerr; cinfo.err = jpeg_std_error(&jerr.pub); // for any jpeg error call itk_jpeg_error_exit @@ -205,7 +205,7 @@ JPEGImageIO::Read(void * buffer) { const auto rowbytes = cinfo.output_width * this->GetNumberOfComponents(); - auto * tempImage = static_cast(buffer); + auto * tempImage = static_cast(buffer); for (size_t ui = 0; ui < cinfo.output_height; ++ui) { row_pointers[ui] = tempImage + rowbytes * ui; @@ -335,7 +335,7 @@ JPEGImageIO::ReadImageInformation() // use this class so return will call close const JPEGFileWrapper JPEGfp(m_FileName.c_str(), "rb"); - FILE * fp = JPEGfp.m_FilePointer; + FILE * fp = JPEGfp.m_FilePointer; if (!fp) { itkExceptionMacro("Error JPEGImageIO could not open file: " << this->GetFileName() << std::endl @@ -345,7 +345,7 @@ JPEGImageIO::ReadImageInformation() // create jpeg decompression object and error handler struct jpeg_decompress_struct cinfo; - struct itk_jpeg_error_mgr jerr; + struct itk_jpeg_error_mgr jerr; cinfo.err = jpeg_std_error(&jerr.pub); jerr.pub.error_exit = itk_jpeg_error_exit; @@ -468,7 +468,7 @@ JPEGImageIO::WriteSlice(const std::string & fileName, const void * const buffer) { // use this class so return will call close const JPEGFileWrapper JPEGfp(fileName.c_str(), "wb"); - FILE * fp = JPEGfp.m_FilePointer; + FILE * fp = JPEGfp.m_FilePointer; if (!fp) { itkExceptionMacro("Unable to open file " << fileName << " for writing." << std::endl @@ -490,7 +490,7 @@ JPEGImageIO::WriteSlice(const std::string & fileName, const void * const buffer) auto * volatile row_pointers = new JSAMPROW[height]; - struct itk_jpeg_error_mgr jerr; + struct itk_jpeg_error_mgr jerr; struct jpeg_compress_struct cinfo; cinfo.err = jpeg_std_error(&jerr.pub); @@ -566,7 +566,7 @@ JPEGImageIO::WriteSlice(const std::string & fileName, const void * const buffer) { const auto * ptr = static_cast(buffer); - const auto rowbytes = num_comp * width; + const auto rowbytes = num_comp * width; for (size_t ui = 0; ui < height; ++ui) { row_pointers[ui] = const_cast(ptr) + rowbytes * ui; diff --git a/Modules/IO/JPEG/test/itkJPEGImageIOTest2.cxx b/Modules/IO/JPEG/test/itkJPEGImageIOTest2.cxx index 5f7050e20bc..46f9e837fc0 100644 --- a/Modules/IO/JPEG/test/itkJPEGImageIOTest2.cxx +++ b/Modules/IO/JPEG/test/itkJPEGImageIOTest2.cxx @@ -39,8 +39,8 @@ itkJPEGImageIOTest2(int argc, char * argv[]) auto image = ImageType::New(); ImageType::RegionType region; - ImageType::IndexType start; - ImageType::SizeType size; + ImageType::IndexType start; + ImageType::SizeType size; size[0] = 157; size[1] = 129; diff --git a/Modules/IO/JPEG2000/include/itkJPEG2000ImageIO.h b/Modules/IO/JPEG2000/include/itkJPEG2000ImageIO.h index 36cb03e7331..5d8a0ad9bdc 100644 --- a/Modules/IO/JPEG2000/include/itkJPEG2000ImageIO.h +++ b/Modules/IO/JPEG2000/include/itkJPEG2000ImageIO.h @@ -61,9 +61,9 @@ class JPEG2000ImageIOInternalEnums }; // Define how to print enumeration extern ITKIOJPEG2000_EXPORT std::ostream & - operator<<(std::ostream & out, const JPEG2000ImageIOInternalEnums::DecodingFormat value); +operator<<(std::ostream & out, const JPEG2000ImageIOInternalEnums::DecodingFormat value); extern ITKIOJPEG2000_EXPORT std::ostream & - operator<<(std::ostream & out, const JPEG2000ImageIOInternalEnums::DFMFormat value); +operator<<(std::ostream & out, const JPEG2000ImageIOInternalEnums::DFMFormat value); /** * \class JPEG2000ImageIO diff --git a/Modules/IO/JPEG2000/src/itkJPEG2000ImageIO.cxx b/Modules/IO/JPEG2000/src/itkJPEG2000ImageIO.cxx index 85a3453e687..35ce38b2b5b 100644 --- a/Modules/IO/JPEG2000/src/itkJPEG2000ImageIO.cxx +++ b/Modules/IO/JPEG2000/src/itkJPEG2000ImageIO.cxx @@ -454,7 +454,7 @@ JPEG2000ImageIO::Read(void * buffer) const ImageIORegion regionToRead = this->GetIORegion(); - ImageIORegion::SizeType size = regionToRead.GetSize(); + ImageIORegion::SizeType size = regionToRead.GetSize(); ImageIORegion::IndexType start = regionToRead.GetIndex(); const unsigned int sizex = size[0]; @@ -506,7 +506,7 @@ JPEG2000ImageIO::Read(void * buffer) OPJ_UINT32 l_tile_index; OPJ_UINT32 l_data_size; - OPJ_UINT32 l_nb_comps; + OPJ_UINT32 l_nb_comps; const OPJ_BOOL tileHeaderRead = opj_read_tile_header(this->m_Internal->m_Dinfo, l_stream, &l_tile_index, @@ -756,9 +756,9 @@ JPEG2000ImageIO::Write(const void * buffer) /* Create comment for codestream */ if (parameters.cp_comment == nullptr) { - constexpr char comment[] = "Created by OpenJPEG version "; + constexpr char comment[] = "Created by OpenJPEG version "; const SizeValueType clen = strlen(comment); - const char * version = opj_version(); + const char * version = opj_version(); /* UniPG>> */ #ifdef USE_JPWL @@ -809,7 +809,7 @@ JPEG2000ImageIO::Write(const void * buffer) parameters.numresolution = numberOfResolutions; - OPJ_COLOR_SPACE color_space = OPJ_CLRSPC_GRAY; + OPJ_COLOR_SPACE color_space = OPJ_CLRSPC_GRAY; opj_image_cmptparm_t cmptparms[3]; if (this->GetNumberOfComponents() == 3) @@ -875,7 +875,7 @@ JPEG2000ImageIO::Write(const void * buffer) l_image->y1 = !l_image->y0 ? (h - 1) * subsampling_dy + 1 : l_image->y0 + (h - 1) * subsampling_dy + 1; // HERE, copy the buffer - SizeValueType index = 0; + SizeValueType index = 0; const SizeValueType numberOfPixels = SizeValueType(w) * SizeValueType(h); itkDebugMacro(" START COPY BUFFER"); if (this->GetComponentType() == IOComponentEnum::UCHAR) @@ -1045,17 +1045,17 @@ JPEG2000ImageIO::GenerateStreamableReadRegionFromRequestedRegion(const ImageIORe } void -JPEG2000ImageIO::ComputeRegionInTileBoundaries(unsigned int dimension, - SizeValueType tileSize, +JPEG2000ImageIO::ComputeRegionInTileBoundaries(unsigned int dimension, + SizeValueType tileSize, ImageIORegion & streamableRegion) const { - const SizeValueType requestedSize = streamableRegion.GetSize(dimension); + const SizeValueType requestedSize = streamableRegion.GetSize(dimension); const IndexValueType requestedIndex = streamableRegion.GetIndex(dimension); const IndexValueType startQuantizedInTileSize = requestedIndex - (requestedIndex % tileSize); const IndexValueType requestedEnd = requestedIndex + requestedSize; - const SizeValueType extendedSize = requestedEnd - startQuantizedInTileSize; - const SizeValueType tileRemanent = extendedSize % tileSize; + const SizeValueType extendedSize = requestedEnd - startQuantizedInTileSize; + const SizeValueType tileRemanent = extendedSize % tileSize; SizeValueType sizeQuantizedInTileSize = extendedSize; diff --git a/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest05.cxx b/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest05.cxx index d3e90ccbe5f..47a2e69ee61 100644 --- a/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest05.cxx +++ b/Modules/IO/JPEG2000/test/itkJPEG2000ImageIOTest05.cxx @@ -65,7 +65,7 @@ itkJPEG2000ImageIOTest05(int argc, char * argv[]) std::cout << "Format = " << format << std::endl; const ImageType::RegionType region = reader->GetOutput()->GetBufferedRegion(); - ImageType::SizeType size = region.GetSize(); + ImageType::SizeType size = region.GetSize(); fit->SetStartIndex(0); fit->SetEndIndex(size[2] - 1); // The number of slices to write diff --git a/Modules/IO/LSM/src/itkLSMImageIO.cxx b/Modules/IO/LSM/src/itkLSMImageIO.cxx index e8edd94c711..ee3fc89f3dc 100644 --- a/Modules/IO/LSM/src/itkLSMImageIO.cxx +++ b/Modules/IO/LSM/src/itkLSMImageIO.cxx @@ -65,35 +65,35 @@ using Float96_t = long double; struct zeiss_info { - UInt32_t U32MagicNumber; - Int32_t S32StructureSize; - Int32_t S32DimensionX; - Int32_t S32DimensionY; - Int32_t S32DimensionZ; - Int32_t S32DimensionChannels; - Int32_t S32DimensionTime; - Int32_t S32DataType; - Int32_t S32ThumbnailX; - Int32_t S32ThumbnailY; + UInt32_t U32MagicNumber; + Int32_t S32StructureSize; + Int32_t S32DimensionX; + Int32_t S32DimensionY; + Int32_t S32DimensionZ; + Int32_t S32DimensionChannels; + Int32_t S32DimensionTime; + Int32_t S32DataType; + Int32_t S32ThumbnailX; + Int32_t S32ThumbnailY; Float64_t F64VoxelSizeX; Float64_t F64VoxelSizeY; Float64_t F64VoxelSizeZ; - UInt32_t u32ScanType; - UInt32_t u32DataType; - UInt32_t u32OffsetVectorOverlay; - UInt32_t u32OffsetInputLut; - UInt32_t u32OffsetOutputLut; - UInt32_t u32OffsetChannelColors; + UInt32_t u32ScanType; + UInt32_t u32DataType; + UInt32_t u32OffsetVectorOverlay; + UInt32_t u32OffsetInputLut; + UInt32_t u32OffsetOutputLut; + UInt32_t u32OffsetChannelColors; Float64_t F64TimeIntervall; - UInt32_t u32OffsetChannelDataTypes; - UInt32_t u32OffsetScanInformation; - UInt32_t u32OffsetKsData; - UInt32_t u32OffsetTimeStamps; - UInt32_t u32OffsetEventList; - UInt32_t u32OffsetRoi; - UInt32_t u32OffsetBleachRoi; - UInt32_t u32OffsetNextRecording; - UInt32_t u32Reserved[TIF_CZ_LSMINFO_SIZE_RESERVED]; + UInt32_t u32OffsetChannelDataTypes; + UInt32_t u32OffsetScanInformation; + UInt32_t u32OffsetKsData; + UInt32_t u32OffsetTimeStamps; + UInt32_t u32OffsetEventList; + UInt32_t u32OffsetRoi; + UInt32_t u32OffsetBleachRoi; + UInt32_t u32OffsetNextRecording; + UInt32_t u32Reserved[TIF_CZ_LSMINFO_SIZE_RESERVED]; }; LSMImageIO::LSMImageIO() @@ -169,8 +169,8 @@ LSMImageIO::ReadImageInformation() // Now is a good time to check what was read and replaced it with LSM // information unsigned int tif_cz_lsminfo_size; - void * praw = this->TIFFImageIO::ReadRawByteFromTag(TIF_CZ_LSMINFO, tif_cz_lsminfo_size); - auto * zi = static_cast(praw); + void * praw = this->TIFFImageIO::ReadRawByteFromTag(TIF_CZ_LSMINFO, tif_cz_lsminfo_size); + auto * zi = static_cast(praw); if (praw == nullptr || tif_cz_lsminfo_size != TIF_CZ_LSMINFO_SIZE) { // no zeiss info, just use tiff spacing @@ -246,7 +246,7 @@ LSMImageIO::Write(const void * buffer) } const uint16_t scomponents = this->GetNumberOfComponents(); - uint16_t bps; + uint16_t bps; switch (this->GetComponentType()) { case IOComponentEnum::UCHAR: @@ -262,7 +262,7 @@ LSMImageIO::Write(const void * buffer) } constexpr float resolution = -1; - TIFF * tif = TIFFOpen(m_FileName.c_str(), "w"); + TIFF * tif = TIFFOpen(m_FileName.c_str(), "w"); if (!tif) { itkDebugMacro("Returning"); @@ -299,7 +299,7 @@ LSMImageIO::Write(const void * buffer) // if number of scalar components is greater than 3, that means we assume // there is alpha. const uint16_t extra_samples = scomponents - 3; - const auto sample_info = make_unique_for_overwrite(scomponents - 3); + const auto sample_info = make_unique_for_overwrite(scomponents - 3); sample_info[0] = EXTRASAMPLE_ASSOCALPHA; for (int cc = 1; cc < scomponents - 3; ++cc) { diff --git a/Modules/IO/LSM/test/itkLSMImageIOTest.cxx b/Modules/IO/LSM/test/itkLSMImageIOTest.cxx index fbe1fb82cdd..c9d3bd14b7d 100644 --- a/Modules/IO/LSM/test/itkLSMImageIOTest.cxx +++ b/Modules/IO/LSM/test/itkLSMImageIOTest.cxx @@ -41,7 +41,7 @@ itkLSMImageIOTest(int argc, char * argv[]) using ReaderType = itk::ImageFileReader; using ImageIOType = itk::LSMImageIO; - auto reader = ReaderType::New(); + auto reader = ReaderType::New(); const char * inputFileName = argv[1]; reader->SetFileName(inputFileName); @@ -58,7 +58,7 @@ itkLSMImageIOTest(int argc, char * argv[]) ITK_TRY_EXPECT_NO_EXCEPTION(reader->Update()); const size_t bufferSize = reader->GetImageIO()->GetImageSizeInBytes(); - auto * buffer = new InputPixelType[bufferSize]; + auto * buffer = new InputPixelType[bufferSize]; lsmImageIO->Read(buffer); diff --git a/Modules/IO/MINC/src/itkMINCImageIO.cxx b/Modules/IO/MINC/src/itkMINCImageIO.cxx index 194a86ecba4..20dc1a0ecbf 100644 --- a/Modules/IO/MINC/src/itkMINCImageIO.cxx +++ b/Modules/IO/MINC/src/itkMINCImageIO.cxx @@ -66,16 +66,16 @@ struct ITKIOMINC_HIDDEN MINCImageIOPImpl // dimension size and start and step, in FILE ORDER! - char ** m_DimensionName; + char ** m_DimensionName; misize_t * m_DimensionSize; - double * m_DimensionStart; - double * m_DimensionStep; - int m_DimensionIndices[5]; + double * m_DimensionStart; + double * m_DimensionStep; + int m_DimensionIndices[5]; midimhandle_t * m_MincFileDims; midimhandle_t * m_MincApparentDims; - mitype_t m_Volume_type; - miclass_t m_Volume_class; + mitype_t m_Volume_type; + miclass_t m_Volume_class; // MINC2 volume handle , currently opened mihandle_t m_Volume; @@ -325,7 +325,7 @@ MINCImageIO::ReadImageInformation() // Error getting dimension name itkExceptionMacro("Could not get dimension name!"); } - double _sep; + double _sep; const char * _sign = "+"; if (miget_dimension_separation(m_MINCPImpl->m_MincFileDims[i], MI_ORDER_FILE, &_sep) == MI_NOERROR && _sep < 0) { @@ -751,8 +751,8 @@ MINCImageIO::ReadImageInformation() m_MINCPImpl->m_Volume, attlist, group_name, sizeof(group_name), attribute, sizeof(attribute)) == MI_NOERROR) { - mitype_t att_data_type; - size_t att_length; + mitype_t att_data_type; + size_t att_length; std::string entry_key = group_name; entry_key += ":"; entry_key += attribute; @@ -963,7 +963,7 @@ MINCImageIO::WriteImageInformation() for (unsigned int i = 0; i < nDims; ++i) { const unsigned int j = i + (nComp > 1 ? 1 : 0); - double dir_cos[3]; + double dir_cos[3]; for (unsigned int k = 0; k < 3; ++k) { if (k < nDims) @@ -1055,7 +1055,7 @@ MINCImageIO::WriteImageInformation() // now let's create the same dimension order and positive/negative step size as // in original image std::string dimension_order; - bool dimorder_good = false; + bool dimorder_good = false; if (ExposeMetaData(thisDic, "dimension_order", dimension_order)) { // the format should be ((+|-)(X|Y|Z|V|T))* @@ -1066,7 +1066,7 @@ MINCImageIO::WriteImageInformation() for (unsigned int i = 0; i < minc_dimensions && dimorder_good; ++i) { const bool positive = (dimension_order[i * 2] == '+'); - int j = 0; + int j = 0; switch (dimension_order[i * 2 + 1]) { case 'v': @@ -1234,7 +1234,7 @@ MINCImageIO::WriteImageInformation() it->first == "NRRD_kinds[3]" || it->first == "NRRD_space") continue; - const char * d = strchr(it->first.c_str(), ':'); + const char * d = strchr(it->first.c_str(), ':'); MetaDataObjectBase * bs = it->second; if (d) { @@ -1324,7 +1324,7 @@ MINCImageIO::Write(const void * buffer) { const unsigned int nDims = this->GetNumberOfDimensions(); const unsigned int nComp = this->GetNumberOfComponents(); - size_t buffer_length = 1; + size_t buffer_length = 1; const auto start = make_unique_for_overwrite(nDims + (nComp > 1 ? 1 : 0)); const auto count = make_unique_for_overwrite(nDims + (nComp > 1 ? 1 : 0)); @@ -1351,8 +1351,8 @@ MINCImageIO::Write(const void * buffer) buffer_length *= nComp; } - double buffer_min; - double buffer_max; + double buffer_min; + double buffer_max; mitype_t volume_data_type = MI_TYPE_UBYTE; switch (this->GetComponentType()) diff --git a/Modules/IO/MINC/test/itkMINCImageIOTest.cxx b/Modules/IO/MINC/test/itkMINCImageIOTest.cxx index 22ac5b558c9..5a3d820fb03 100644 --- a/Modules/IO/MINC/test/itkMINCImageIOTest.cxx +++ b/Modules/IO/MINC/test/itkMINCImageIOTest.cxx @@ -25,9 +25,9 @@ #include "itkObjectFactoryBase.h" static void -RandomPix(vnl_random & randgen, +RandomPix(vnl_random & randgen, itk::RGBPixel & pix, - double _max = itk::NumericTraits::max()) + double _max = itk::NumericTraits::max()) { for (unsigned int i = 0; i < 3; ++i) { @@ -46,9 +46,9 @@ RandomPix(vnl_random & randgen, itk::RGBPixel & pix, double _max = itk::Nu static void -RandomPix(vnl_random & randgen, +RandomPix(vnl_random & randgen, itk::Vector & pix, - double _max = itk::NumericTraits::max()) + double _max = itk::NumericTraits::max()) { for (unsigned int i = 0; i < 3; ++i) { @@ -66,9 +66,9 @@ RandomPix(vnl_random & randgen, itk::Vector & pix, double _max = itk:: } static void -RandomPix(vnl_random & randgen, +RandomPix(vnl_random & randgen, itk::Vector & pix, - double _max = itk::NumericTraits::max()) + double _max = itk::NumericTraits::max()) { (void)_max; for (unsigned int i = 0; i < 3; ++i) @@ -237,9 +237,9 @@ abs_diff(const TPixel & pix1, const TPixel & pix2) template static void -RandomVectorPix(vnl_random & randgen, +RandomVectorPix(vnl_random & randgen, itk::VariableLengthVector & pix, - double _max = itk::NumericTraits::max()) + double _max = itk::NumericTraits::max()) { for (size_t i = 0; i < pix.GetSize(); ++i) { @@ -307,10 +307,10 @@ MINCReadWriteTest(const char * fileName, const char * minc_storage_type, double using ImageType = typename itk::Image; - typename ImageType::SizeType size; - typename ImageType::IndexType index; + typename ImageType::SizeType size; + typename ImageType::IndexType index; typename ImageType::SpacingType spacing; - typename ImageType::PointType origin; + typename ImageType::PointType origin; std::cout << "Testing:" << fileName << std::endl; for (unsigned int i = 0; i < VDimension; ++i) @@ -378,7 +378,7 @@ MINCReadWriteTest(const char * fileName, const char * minc_storage_type, double // // fill image buffer - vnl_random randgen(12345678); + vnl_random randgen(12345678); itk::ImageRegionIterator it(im, im->GetLargestPossibleRegion()); for (it.GoToBegin(); !it.IsAtEnd(); ++it) @@ -561,19 +561,19 @@ MINCReadWriteTest(const char * fileName, const char * minc_storage_type, double template int MINCReadWriteTestVector(const char * fileName, - size_t vector_length, + size_t vector_length, const char * minc_storage_type, - double tolerance = 0.0) + double tolerance = 0.0) { int success(EXIT_SUCCESS); using ImageType = typename itk::VectorImage; using InternalPixelType = typename itk::VectorImage::PixelType; - typename ImageType::SizeType size; - typename ImageType::IndexType index; + typename ImageType::SizeType size; + typename ImageType::IndexType index; typename ImageType::SpacingType spacing; - typename ImageType::PointType origin; + typename ImageType::PointType origin; std::cout << "Testing:" << fileName << std::endl; @@ -634,7 +634,7 @@ MINCReadWriteTestVector(const char * fileName, // // fill image buffer - vnl_random randgen(12345678); + vnl_random randgen(12345678); itk::ImageRegionIterator it(im, im->GetLargestPossibleRegion()); for (it.GoToBegin(); !it.IsAtEnd(); ++it) diff --git a/Modules/IO/MINC/test/itkMINCImageIOTest2.cxx b/Modules/IO/MINC/test/itkMINCImageIOTest2.cxx index e89adefccb6..47ee0559715 100644 --- a/Modules/IO/MINC/test/itkMINCImageIOTest2.cxx +++ b/Modules/IO/MINC/test/itkMINCImageIOTest2.cxx @@ -45,7 +45,7 @@ itkMINCImageIOTest2(int argc, char * argv[]) ITK_EXERCISE_BASIC_OBJECT_METHODS(mincIO1, MINCImageIO, ImageIOBase); - constexpr unsigned int supportedDimCount = 4; // includes the degenerate 0-dimensional case + constexpr unsigned int supportedDimCount = 4; // includes the degenerate 0-dimensional case std::vector supportedDims(supportedDimCount); std::iota(std::begin(supportedDims), std::end(supportedDims), 0); for (const auto & value : supportedDims) diff --git a/Modules/IO/MINC/test/itkMINCImageIOTest4.cxx b/Modules/IO/MINC/test/itkMINCImageIOTest4.cxx index 9c536baee36..82443c90f28 100644 --- a/Modules/IO/MINC/test/itkMINCImageIOTest4.cxx +++ b/Modules/IO/MINC/test/itkMINCImageIOTest4.cxx @@ -32,11 +32,11 @@ template int test_image_moments(const char * input_image, const char * output_image, - double total, - double mx, - double my, - double mz, - double epsilon) + double total, + double mx, + double my, + double mz, + double epsilon) { // itk::MINCImageIO::Pointer mincIO1 = itk::MINCImageIO::New(); diff --git a/Modules/IO/MINC/test/itkMINCImageIOTest_2D.cxx b/Modules/IO/MINC/test/itkMINCImageIOTest_2D.cxx index 47effd032e7..c836dd16141 100644 --- a/Modules/IO/MINC/test/itkMINCImageIOTest_2D.cxx +++ b/Modules/IO/MINC/test/itkMINCImageIOTest_2D.cxx @@ -33,10 +33,10 @@ template int test_image_moments(const char * input_image, const char * output_image, - double total, - double mx, - double my, - double epsilon) + double total, + double mx, + double my, + double epsilon) { using ReaderType = itk::ImageFileReader; diff --git a/Modules/IO/MRC/include/itkMRCHeaderObject.h b/Modules/IO/MRC/include/itkMRCHeaderObject.h index 75eda7bc015..9765349d01c 100644 --- a/Modules/IO/MRC/include/itkMRCHeaderObject.h +++ b/Modules/IO/MRC/include/itkMRCHeaderObject.h @@ -169,8 +169,8 @@ class ITKIOMRC_EXPORT MRCHeaderObject : public LightObject float rms; // ALL HEADERS: - int32_t nlabl; /**< Number of labels with useful data. */ - char label[10][80]; /**< 10 labels of 80 characters. */ + int32_t nlabl; /**< Number of labels with useful data. */ + char label[10][80]; /**< 10 labels of 80 characters. */ }; /** Fei/Agard extended header */ @@ -189,7 +189,7 @@ class ITKIOMRC_EXPORT MRCHeaderObject : public LightObject float tiltaxis; /**< tilt axis in degree */ float pixelsize; /**< pixel size (unit=m, huh if > 1) */ float magnification; - char notused[76]; /**< fill up 128 bytes */ + char notused[76]; /**< fill up 128 bytes */ }; /** pixel type enumeration */ @@ -287,7 +287,7 @@ class ITKIOMRC_EXPORT MRCHeaderObject : public LightObject private: SizeValueType m_ExtendedHeaderSize{ 0 }; - void * m_ExtendedHeader{ nullptr }; + void * m_ExtendedHeader{ nullptr }; FeiExtendedHeader * m_ExtendedFeiHeader{ nullptr }; diff --git a/Modules/IO/MRC/test/itkMRCImageIOTest.cxx b/Modules/IO/MRC/test/itkMRCImageIOTest.cxx index 9cfb8f1510c..f1253a94d56 100644 --- a/Modules/IO/MRC/test/itkMRCImageIOTest.cxx +++ b/Modules/IO/MRC/test/itkMRCImageIOTest.cxx @@ -56,7 +56,7 @@ MRCImageIOTester::Write(const std::string & filePrefix, std::string image->SetRegions(m_ImageSize); image->Allocate(); - unsigned int cnt = 0; + unsigned int cnt = 0; itk::ImageRegionIterator i(image, image->GetLargestPossibleRegion()); i.GoToBegin(); while (!i.IsAtEnd()) @@ -200,8 +200,8 @@ MRCImageIOTester::Read(const std::string & filePrefix, std::string & // check the size const typename ImageType::RegionType region = image->GetLargestPossibleRegion(); - typename ImageType::SizeType size = region.GetSize(); - bool sizeGood = true; + typename ImageType::SizeType size = region.GetSize(); + bool sizeGood = true; for (unsigned int i = 0; i < ImageType::GetImageDimension(); ++i) { if (size[i] != 10) @@ -217,8 +217,8 @@ MRCImageIOTester::Read(const std::string & filePrefix, std::string & } // check each pixel - bool pixelsGood = true; - unsigned int cnt = 0; + bool pixelsGood = true; + unsigned int cnt = 0; itk::ImageRegionIterator iter(image, region); iter.GoToBegin(); while (!iter.IsAtEnd() && pixelsGood) @@ -282,7 +282,7 @@ itkMRCImageIOTest(int argc, char * argv[]) return EXIT_FAILURE; } - std::string outputPath = argv[1]; + std::string outputPath = argv[1]; const std::string filePrefix = argv[0]; // diff --git a/Modules/IO/MRC/test/itkMRCImageIOTest2.cxx b/Modules/IO/MRC/test/itkMRCImageIOTest2.cxx index 7e6bafbbbd8..05a823429e7 100644 --- a/Modules/IO/MRC/test/itkMRCImageIOTest2.cxx +++ b/Modules/IO/MRC/test/itkMRCImageIOTest2.cxx @@ -49,7 +49,7 @@ Test(const std::string & inFileName, const std::string & outFileName, const std: // prepare to iterate over the dictionary DictionaryType & dic = image->GetMetaDataDictionary(); - auto itr = dic.Begin(); + auto itr = dic.Begin(); const auto end = dic.End(); while (itr != end) diff --git a/Modules/IO/MeshBYU/include/itkBYUMeshIO.h b/Modules/IO/MeshBYU/include/itkBYUMeshIO.h index 6b22113c999..b0b3644e95b 100644 --- a/Modules/IO/MeshBYU/include/itkBYUMeshIO.h +++ b/Modules/IO/MeshBYU/include/itkBYUMeshIO.h @@ -118,7 +118,7 @@ class ITKIOMeshBYU_EXPORT BYUMeshIO : public MeshIOBase void WritePoints(T * buffer, std::ofstream & outputFile) { - const Indent indent(1); + const Indent indent(1); SizeValueType index{}; for (SizeValueType ii = 0; ii < this->m_NumberOfPoints; ++ii) @@ -136,7 +136,7 @@ class ITKIOMeshBYU_EXPORT BYUMeshIO : public MeshIOBase void WriteCells(T * buffer, std::ofstream & outputFile) { - const Indent indent(7); + const Indent indent(7); SizeValueType index{}; for (SizeValueType ii = 0; ii < this->m_NumberOfCells; ++ii) @@ -161,9 +161,9 @@ class ITKIOMeshBYU_EXPORT BYUMeshIO : public MeshIOBase private: StreamOffsetType m_FilePosition{ 0 }; - SizeValueType m_PartId{}; - SizeValueType m_FirstCellId{}; - SizeValueType m_LastCellId{}; + SizeValueType m_PartId{}; + SizeValueType m_FirstCellId{}; + SizeValueType m_LastCellId{}; }; } // end namespace itk diff --git a/Modules/IO/MeshBYU/src/itkBYUMeshIO.cxx b/Modules/IO/MeshBYU/src/itkBYUMeshIO.cxx index cc575e464c5..3959d285412 100644 --- a/Modules/IO/MeshBYU/src/itkBYUMeshIO.cxx +++ b/Modules/IO/MeshBYU/src/itkBYUMeshIO.cxx @@ -233,11 +233,11 @@ BYUMeshIO::ReadCells(void * buffer) // Get cell buffer inputFile.precision(12); - auto * data = static_cast(buffer); + auto * data = static_cast(buffer); SizeValueType numPoints = 0; SizeValueType id{}; SizeValueType index = 2; - int ptId; + int ptId; m_FirstCellId -= 1; m_LastCellId -= 1; while (id < this->m_NumberOfCells) diff --git a/Modules/IO/MeshBase/include/itkConvertArrayPixelBuffer.hxx b/Modules/IO/MeshBase/include/itkConvertArrayPixelBuffer.hxx index c4e6ee8510b..2a560e0fbc6 100644 --- a/Modules/IO/MeshBase/include/itkConvertArrayPixelBuffer.hxx +++ b/Modules/IO/MeshBase/include/itkConvertArrayPixelBuffer.hxx @@ -24,9 +24,9 @@ namespace itk template void ConvertPixelBuffer, OutputConvertTraits>::Convert(InputPixelType * inputData, - int inputNumberOfComponents, - Array * outputData, - size_t size) + int inputNumberOfComponents, + Array * outputData, + size_t size) { InputPixelType * endInput = inputData + size * static_cast(inputNumberOfComponents); diff --git a/Modules/IO/MeshBase/include/itkConvertVariableLengthVectorPixelBuffer.hxx b/Modules/IO/MeshBase/include/itkConvertVariableLengthVectorPixelBuffer.hxx index 1b909933851..f06e61748e6 100644 --- a/Modules/IO/MeshBase/include/itkConvertVariableLengthVectorPixelBuffer.hxx +++ b/Modules/IO/MeshBase/include/itkConvertVariableLengthVectorPixelBuffer.hxx @@ -24,10 +24,10 @@ namespace itk template void ConvertPixelBuffer, OutputConvertTraits>::Convert( - InputPixelType * inputData, - int inputNumberOfComponents, + InputPixelType * inputData, + int inputNumberOfComponents, VariableLengthVector * outputData, - size_t size) + size_t size) { InputPixelType * endInput = inputData + size * static_cast(inputNumberOfComponents); diff --git a/Modules/IO/MeshBase/include/itkMeshFileReader.h b/Modules/IO/MeshBase/include/itkMeshFileReader.h index 4b26ca7af9d..36b4d965743 100644 --- a/Modules/IO/MeshBase/include/itkMeshFileReader.h +++ b/Modules/IO/MeshBase/include/itkMeshFileReader.h @@ -186,9 +186,9 @@ class ITK_TEMPLATE_EXPORT MeshFileReader : public MeshSource GenerateData() override; MeshIOBase::Pointer m_MeshIO{}; - bool m_UserSpecifiedMeshIO{}; // keep track whether the MeshIO is - // user specified - std::string m_FileName{}; // The file to be read + bool m_UserSpecifiedMeshIO{}; // keep track whether the MeshIO is + // user specified + std::string m_FileName{}; // The file to be read private: template diff --git a/Modules/IO/MeshBase/include/itkMeshFileReader.hxx b/Modules/IO/MeshBase/include/itkMeshFileReader.hxx index 91fde04f9c3..151ade71d73 100644 --- a/Modules/IO/MeshBase/include/itkMeshFileReader.hxx +++ b/Modules/IO/MeshBase/include/itkMeshFileReader.hxx @@ -44,7 +44,7 @@ MeshFileReader::Me template void MeshFileReader::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -77,7 +77,7 @@ MeshFileReader::Te if (!itksys::SystemTools::FileExists(m_FileName.c_str())) { MeshFileReaderException e(__FILE__, __LINE__); - std::ostringstream msg; + std::ostringstream msg; msg << "The file doesn't exist. " << std::endl << "Filename = " << m_FileName << std::endl; e.SetDescription(msg.str().c_str()); throw e; @@ -124,7 +124,7 @@ MeshFileReader::Re { const typename TOutputMesh::Pointer output = this->GetOutput(); - SizeValueType index{}; + SizeValueType index{}; OutputCellIdentifier id{}; while (index < m_MeshIO->GetCellBufferSize()) { @@ -139,7 +139,7 @@ MeshFileReader::Re itkExceptionMacro("Invalid Vertex Cell with number of points = " << numberOfPoints); } OutputCellAutoPointer cell; - auto * vertexCell = new OutputVertexCellType; + auto * vertexCell = new OutputVertexCellType; for (unsigned int jj = 0; jj < OutputVertexCellType::NumberOfPoints; ++jj) { vertexCell->SetPointId(jj, static_cast(buffer[index++])); @@ -161,7 +161,7 @@ MeshFileReader::Re for (unsigned int jj = 1; jj < numberOfPoints; ++jj) { OutputCellAutoPointer cell; - auto * lineCell = new OutputLineCellType; + auto * lineCell = new OutputLineCellType; lineCell->SetPointId(0, pointIDBuffer); pointIDBuffer = static_cast(buffer[index++]); lineCell->SetPointId(1, pointIDBuffer); @@ -177,7 +177,7 @@ MeshFileReader::Re { itkExceptionMacro("Invalid Line Cell with number of points = " << numberOfPoints); } - auto * polyLineCell = new OutputPolyLineCellType; + auto * polyLineCell = new OutputPolyLineCellType; OutputCellAutoPointer cell; for (unsigned int jj = 0; jj < numberOfPoints; ++jj) @@ -199,7 +199,7 @@ MeshFileReader::Re } OutputCellAutoPointer cell; - auto * triangleCell = new OutputTriangleCellType; + auto * triangleCell = new OutputTriangleCellType; for (unsigned int jj = 0; jj < OutputTriangleCellType::NumberOfPoints; ++jj) { triangleCell->SetPointId(jj, static_cast(buffer[index++])); @@ -218,7 +218,7 @@ MeshFileReader::Re } OutputCellAutoPointer cell; - auto * quadrilateralCell = new OutputQuadrilateralCellType; + auto * quadrilateralCell = new OutputQuadrilateralCellType; for (unsigned int jj = 0; jj < OutputQuadrilateralCellType::NumberOfPoints; ++jj) { quadrilateralCell->SetPointId(jj, static_cast(buffer[index++])); @@ -233,7 +233,7 @@ MeshFileReader::Re // For polyhedron, if the number of points is 3, then we treat it as // triangle cell OutputCellAutoPointer cell; - auto numberOfPoints = static_cast(buffer[index++]); + auto numberOfPoints = static_cast(buffer[index++]); if (numberOfPoints == OutputTriangleCellType::NumberOfPoints) { auto * triangleCell = new OutputTriangleCellType; @@ -265,7 +265,7 @@ MeshFileReader::Re } OutputCellAutoPointer cell; - auto * tetrahedronCell = new OutputTetrahedronCellType; + auto * tetrahedronCell = new OutputTetrahedronCellType; for (unsigned int jj = 0; jj < OutputTetrahedronCellType::NumberOfPoints; ++jj) { tetrahedronCell->SetPointId(jj, static_cast(buffer[index++])); @@ -284,7 +284,7 @@ MeshFileReader::Re } OutputCellAutoPointer cell; - auto * hexahedronCell = new OutputHexahedronCellType; + auto * hexahedronCell = new OutputHexahedronCellType; for (unsigned int jj = 0; jj < OutputHexahedronCellType::NumberOfPoints; ++jj) { hexahedronCell->SetPointId(jj, static_cast(buffer[index++])); @@ -303,7 +303,7 @@ MeshFileReader::Re } OutputCellAutoPointer cell; - auto * quadraticEdgeCell = new OutputQuadraticEdgeCellType; + auto * quadraticEdgeCell = new OutputQuadraticEdgeCellType; for (unsigned int jj = 0; jj < OutputQuadraticEdgeCellType::NumberOfPoints; ++jj) { quadraticEdgeCell->SetPointId(jj, static_cast(buffer[index++])); @@ -322,7 +322,7 @@ MeshFileReader::Re } OutputCellAutoPointer cell; - auto * quadraticTriangleCell = new OutputQuadraticTriangleCellType; + auto * quadraticTriangleCell = new OutputQuadraticTriangleCellType; for (unsigned int jj = 0; jj < OutputQuadraticTriangleCellType::NumberOfPoints; ++jj) { quadraticTriangleCell->SetPointId(jj, static_cast(buffer[index++])); @@ -680,7 +680,7 @@ template void MeshFileReader::ConvertPointPixelBuffer( void * inputData, - T * outputData, + T * outputData, size_t numberOfPixels) { // TODO: @@ -720,7 +720,7 @@ MeshFileReader::Co else { MeshFileReaderException e(__FILE__, __LINE__); - std::ostringstream msg; + std::ostringstream msg; msg << "Couldn't convert component type: " << std::endl << " " << m_MeshIO->GetComponentTypeAsString(m_MeshIO->GetPointPixelComponentType()) << std::endl << "to one of: " << std::endl @@ -751,7 +751,7 @@ template void MeshFileReader::ConvertCellPixelBuffer( void * inputData, - T * outputData, + T * outputData, size_t numberOfPixels) { // TODO: @@ -791,7 +791,7 @@ MeshFileReader::Co else { MeshFileReaderException e(__FILE__, __LINE__); - std::ostringstream msg; + std::ostringstream msg; msg << "Couldn't convert component type: " << std::endl << " " << m_MeshIO->GetComponentTypeAsString(m_MeshIO->GetCellPixelComponentType()) << std::endl << "to one of: " << std::endl diff --git a/Modules/IO/MeshBase/include/itkMeshFileReaderException.h b/Modules/IO/MeshBase/include/itkMeshFileReaderException.h index b823c3e1dfe..e9cf914abfe 100644 --- a/Modules/IO/MeshBase/include/itkMeshFileReaderException.h +++ b/Modules/IO/MeshBase/include/itkMeshFileReaderException.h @@ -48,9 +48,9 @@ class ITKIOMeshBase_EXPORT MeshFileReaderException : public ExceptionObject /** Constructor. */ MeshFileReaderException(const std::string & file, - unsigned int line, - const char * message = "Error in IO", - const char * loc = "Unknown"); + unsigned int line, + const char * message = "Error in IO", + const char * loc = "Unknown"); }; } // end namespace itk diff --git a/Modules/IO/MeshBase/include/itkMeshFileWriter.h b/Modules/IO/MeshBase/include/itkMeshFileWriter.h index f9501cf1158..df14fb5d81d 100644 --- a/Modules/IO/MeshBase/include/itkMeshFileWriter.h +++ b/Modules/IO/MeshBase/include/itkMeshFileWriter.h @@ -176,12 +176,12 @@ class ITK_TEMPLATE_EXPORT MeshFileWriter : public ProcessObject WriteCellData(); private: - std::string m_FileName{}; + std::string m_FileName{}; MeshIOBase::Pointer m_MeshIO{ nullptr }; - bool m_UserSpecifiedMeshIO{ false }; // track whether the MeshIO is user specified - bool m_FactorySpecifiedMeshIO{ false }; // track whether the factory mechanism set the MeshIO - bool m_UseCompression{ false }; - bool m_FileTypeIsBINARY{ false }; + bool m_UserSpecifiedMeshIO{ false }; // track whether the MeshIO is user specified + bool m_FactorySpecifiedMeshIO{ false }; // track whether the factory mechanism set the MeshIO + bool m_UseCompression{ false }; + bool m_FileTypeIsBINARY{ false }; }; diff --git a/Modules/IO/MeshBase/include/itkMeshFileWriter.hxx b/Modules/IO/MeshBase/include/itkMeshFileWriter.hxx index 699dce9e9ff..faeebe98a8f 100644 --- a/Modules/IO/MeshBase/include/itkMeshFileWriter.hxx +++ b/Modules/IO/MeshBase/include/itkMeshFileWriter.hxx @@ -100,7 +100,7 @@ MeshFileWriter::Write() if (m_MeshIO.IsNull()) { MeshFileWriterException e(__FILE__, __LINE__); - std::ostringstream msg; + std::ostringstream msg; msg << " Could not create IO object for file " << m_FileName.c_str() << std::endl << " Tried to create one of the following:" << std::endl; { @@ -308,7 +308,7 @@ MeshFileWriter::CopyPointsToBuffer(Output * data) { const typename InputMeshType::PointsContainer * points = this->GetInput()->GetPoints(); - SizeValueType index{}; + SizeValueType index{}; typename TInputMesh::PointsContainerConstIterator pter = points->Begin(); while (pter != points->End()) @@ -332,10 +332,10 @@ MeshFileWriter::CopyCellsToBuffer(Output * data) // Define required variables const typename TInputMesh::PointIdentifier * ptIds; - typename TInputMesh::CellType * cellPtr; + typename TInputMesh::CellType * cellPtr; // For each cell - SizeValueType index{}; + SizeValueType index{}; typename TInputMesh::CellsContainerConstIterator cter = cells->Begin(); while (cter != cells->End()) { @@ -407,7 +407,7 @@ MeshFileWriter::CopyPointDataToBuffer(Output * data) const unsigned int numberOfComponents = MeshConvertPixelTraits::GetNumberOfComponents(pointData->Begin().Value()); - SizeValueType index = 0; + SizeValueType index = 0; typename TInputMesh::PointDataContainer::ConstIterator pter = pointData->Begin(); while (pter != pointData->End()) { @@ -435,7 +435,7 @@ MeshFileWriter::CopyCellDataToBuffer(Output * data) const unsigned int numberOfComponents = MeshConvertPixelTraits::GetNumberOfComponents(cellData->Begin().Value()); - SizeValueType index = 0; + SizeValueType index = 0; typename TInputMesh::CellDataContainer::ConstIterator cter = cellData->Begin(); while (cter != cellData->End()) { diff --git a/Modules/IO/MeshBase/include/itkMeshFileWriterException.h b/Modules/IO/MeshBase/include/itkMeshFileWriterException.h index 138184f5945..76c3ed4c853 100644 --- a/Modules/IO/MeshBase/include/itkMeshFileWriterException.h +++ b/Modules/IO/MeshBase/include/itkMeshFileWriterException.h @@ -48,9 +48,9 @@ class ITKIOMeshBase_EXPORT MeshFileWriterException : public ExceptionObject /** Constructor. */ MeshFileWriterException(const std::string & file, - unsigned int line, - const char * message = "Error in IO", - const char * loc = "Unknown"); + unsigned int line, + const char * message = "Error in IO", + const char * loc = "Unknown"); }; } // end namespace itk diff --git a/Modules/IO/MeshBase/include/itkMeshIOBase.h b/Modules/IO/MeshBase/include/itkMeshIOBase.h index 6b443120803..4e002964b2e 100644 --- a/Modules/IO/MeshBase/include/itkMeshIOBase.h +++ b/Modules/IO/MeshBase/include/itkMeshIOBase.h @@ -652,10 +652,10 @@ class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject /** Write buffer to output file stream with ascii style */ template void - WriteBufferAsAscii(T * buffer, + WriteBufferAsAscii(T * buffer, std::ofstream & outputFile, - SizeValueType numberOfLines, - SizeValueType numberOfComponents) + SizeValueType numberOfLines, + SizeValueType numberOfComponents) { for (SizeValueType ii = 0; ii < numberOfLines; ++ii) { @@ -765,11 +765,11 @@ class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject with constant number of points */ template void - WriteCellsBuffer(TInput * input, - TOutput * output, + WriteCellsBuffer(TInput * input, + TOutput * output, CellGeometryEnum cellType, - unsigned int numberOfPoints, - SizeValueType numberOfCells) + unsigned int numberOfPoints, + SizeValueType numberOfCells) { if (input && output) { @@ -821,7 +821,7 @@ class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject protected: /** Big or Little Endian, and the type of the file. (May be ignored.) */ IOByteOrderEnum m_ByteOrder{ IOByteOrderEnum::OrderNotApplicable }; - IOFileEnum m_FileType{ IOFileEnum::ASCII }; + IOFileEnum m_FileType{ IOFileEnum::ASCII }; /** Filename to read */ std::string m_FileName{}; diff --git a/Modules/IO/MeshBase/include/itkMeshIOTestHelper.h b/Modules/IO/MeshBase/include/itkMeshIOTestHelper.h index 20db8508e12..54db45fb3b4 100644 --- a/Modules/IO/MeshBase/include/itkMeshIOTestHelper.h +++ b/Modules/IO/MeshBase/include/itkMeshIOTestHelper.h @@ -61,7 +61,7 @@ TestBaseClassMethodsMeshIO(typename TMeshIO::Pointer meshIO) using FloatType = float; constexpr FloatType floatValue = 1.0; - bool usePointPixel = true; + bool usePointPixel = true; meshIO->SetPixelType(floatValue, usePointPixel); LOCAL_ITK_TEST_SET_GET_VALUE(1, meshIO->GetNumberOfPointPixelComponents()); LOCAL_ITK_TEST_SET_GET_VALUE(itk::MeshIOBase::MapComponentType::CType, diff --git a/Modules/IO/MeshBase/src/itkMeshFileReaderException.cxx b/Modules/IO/MeshBase/src/itkMeshFileReaderException.cxx index 9f74835756c..fbf495b5e02 100644 --- a/Modules/IO/MeshBase/src/itkMeshFileReaderException.cxx +++ b/Modules/IO/MeshBase/src/itkMeshFileReaderException.cxx @@ -29,9 +29,9 @@ MeshFileReaderException::MeshFileReaderException(const char * file, {} MeshFileReaderException::MeshFileReaderException(const std::string & file, - unsigned int line, - const char * message, - const char * loc) + unsigned int line, + const char * message, + const char * loc) : ExceptionObject(file, line, message, loc) {} } // namespace itk diff --git a/Modules/IO/MeshBase/src/itkMeshFileWriterException.cxx b/Modules/IO/MeshBase/src/itkMeshFileWriterException.cxx index 92c8cef8a8d..87b4c12d69a 100644 --- a/Modules/IO/MeshBase/src/itkMeshFileWriterException.cxx +++ b/Modules/IO/MeshBase/src/itkMeshFileWriterException.cxx @@ -29,9 +29,9 @@ MeshFileWriterException::MeshFileWriterException(const char * file, {} MeshFileWriterException::MeshFileWriterException(const std::string & file, - unsigned int line, - const char * message, - const char * loc) + unsigned int line, + const char * message, + const char * loc) : ExceptionObject(file, line, message, loc) {} } // namespace itk diff --git a/Modules/IO/MeshFreeSurfer/include/itkFreeSurferAsciiMeshIO.h b/Modules/IO/MeshFreeSurfer/include/itkFreeSurferAsciiMeshIO.h index bd22c8b26eb..51f34236dc4 100644 --- a/Modules/IO/MeshFreeSurfer/include/itkFreeSurferAsciiMeshIO.h +++ b/Modules/IO/MeshFreeSurfer/include/itkFreeSurferAsciiMeshIO.h @@ -134,7 +134,7 @@ class ITKIOMeshFreeSurfer_EXPORT FreeSurferAsciiMeshIO : public MeshIOBase WriteCells(T * buffer, std::ofstream & outputFile, T label = T{}) { constexpr unsigned int numberOfCellPoints = 3; - SizeValueType index = 0; + SizeValueType index = 0; const auto data = make_unique_for_overwrite(this->m_NumberOfCells * numberOfCellPoints); diff --git a/Modules/IO/MeshFreeSurfer/include/itkFreeSurferBinaryMeshIO.h b/Modules/IO/MeshFreeSurfer/include/itkFreeSurferBinaryMeshIO.h index 7701a087399..c5ad6bde3a3 100644 --- a/Modules/IO/MeshFreeSurfer/include/itkFreeSurferBinaryMeshIO.h +++ b/Modules/IO/MeshFreeSurfer/include/itkFreeSurferBinaryMeshIO.h @@ -197,8 +197,8 @@ class ITKIOMeshFreeSurfer_EXPORT FreeSurferBinaryMeshIO : public MeshIOBase private: StreamOffsetType m_FilePosition{ 0 }; - itk::uint32_t m_FileTypeIdentifier{ 0 }; - std::ifstream m_InputFile{}; + itk::uint32_t m_FileTypeIdentifier{ 0 }; + std::ifstream m_InputFile{}; }; } // end namespace itk diff --git a/Modules/IO/MeshFreeSurfer/src/itkFreeSurferAsciiMeshIO.cxx b/Modules/IO/MeshFreeSurfer/src/itkFreeSurferAsciiMeshIO.cxx index 3031273ec7e..96ac73952b7 100644 --- a/Modules/IO/MeshFreeSurfer/src/itkFreeSurferAsciiMeshIO.cxx +++ b/Modules/IO/MeshFreeSurfer/src/itkFreeSurferAsciiMeshIO.cxx @@ -91,9 +91,9 @@ FreeSurferAsciiMeshIO::ReadMeshInformation() OpenFile(); // Read the ASCII file information - constexpr int numberOfInfoLines = 1; + constexpr int numberOfInfoLines = 1; constexpr unsigned int numberOfCellPoints = 3; - std::string line; + std::string line; for (int ii = 0; ii < numberOfInfoLines; ++ii) { @@ -162,10 +162,10 @@ FreeSurferAsciiMeshIO::ReadCells(void * buffer) { // Get cell buffer m_InputFile.precision(12); - SizeValueType index = 0; + SizeValueType index = 0; constexpr unsigned int numberOfCellPoints = 3; - const auto data = make_unique_for_overwrite(this->m_NumberOfCells * numberOfCellPoints); - float value; + const auto data = make_unique_for_overwrite(this->m_NumberOfCells * numberOfCellPoints); + float value; for (SizeValueType id = 0; id < this->m_NumberOfCells; ++id) { diff --git a/Modules/IO/MeshFreeSurfer/src/itkFreeSurferBinaryMeshIO.cxx b/Modules/IO/MeshFreeSurfer/src/itkFreeSurferBinaryMeshIO.cxx index dc7a49f4531..0f6db416652 100644 --- a/Modules/IO/MeshFreeSurfer/src/itkFreeSurferBinaryMeshIO.cxx +++ b/Modules/IO/MeshFreeSurfer/src/itkFreeSurferBinaryMeshIO.cxx @@ -99,7 +99,7 @@ FreeSurferBinaryMeshIO::ReadMeshInformation() // Define required variables constexpr unsigned int fileTypeIdLength = 3; - unsigned char fileTypeId[fileTypeIdLength]; + unsigned char fileTypeId[fileTypeIdLength]; this->m_FileType = IOFileEnum::BINARY; // Read file type @@ -244,7 +244,7 @@ void FreeSurferBinaryMeshIO::ReadCells(void * buffer) { constexpr unsigned int numberOfCellPoints = 3; - const auto data = make_unique_for_overwrite(this->m_NumberOfCells * numberOfCellPoints); + const auto data = make_unique_for_overwrite(this->m_NumberOfCells * numberOfCellPoints); m_InputFile.read(reinterpret_cast(data.get()), this->m_NumberOfCells * numberOfCellPoints * sizeof(itk::uint32_t)); @@ -315,8 +315,8 @@ FreeSurferBinaryMeshIO::WriteMeshInformation() constexpr char buffer[3] = { static_cast(255), static_cast(255), static_cast(255) }; outputFile.write(buffer, 3); - auto numberOfPoints = static_cast(this->m_NumberOfPointPixels); - auto numberOfCells = static_cast(this->m_NumberOfCells); + auto numberOfPoints = static_cast(this->m_NumberOfPointPixels); + auto numberOfCells = static_cast(this->m_NumberOfCells); constexpr itk::uint32_t numberOfValuesPerPoint = 1; itk::ByteSwapper::SwapWriteRangeFromSystemToBigEndian(&numberOfPoints, 1, &outputFile); itk::ByteSwapper::SwapWriteRangeFromSystemToBigEndian(&numberOfCells, 1, &outputFile); diff --git a/Modules/IO/MeshFreeSurfer/test/itkFreeSurferMeshIOTest.cxx b/Modules/IO/MeshFreeSurfer/test/itkFreeSurferMeshIOTest.cxx index cdd023a446b..639852a8235 100644 --- a/Modules/IO/MeshFreeSurfer/test/itkFreeSurferMeshIOTest.cxx +++ b/Modules/IO/MeshFreeSurfer/test/itkFreeSurferMeshIOTest.cxx @@ -24,17 +24,17 @@ template int -itkFreeSurferMeshIOTestHelper(typename TMeshIO::Pointer fsMeshIO, - typename TMeshIO::Pointer readWritefsMeshIO, - char * inputFileName, - char * outputFileName, - char * notAFsInputFileName, - char * notAFsOutputFileName, - bool useCompression, - bool updatePoints, - bool updatePointData, - bool updateCells, - bool updateCellData, +itkFreeSurferMeshIOTestHelper(typename TMeshIO::Pointer fsMeshIO, + typename TMeshIO::Pointer readWritefsMeshIO, + char * inputFileName, + char * outputFileName, + char * notAFsInputFileName, + char * notAFsOutputFileName, + bool useCompression, + bool updatePoints, + bool updatePointData, + bool updateCells, + bool updateCellData, typename TMeshIO::SizeValueType numberOfPoints, typename TMeshIO::SizeValueType numberOfPointPixels, typename TMeshIO::SizeValueType numberOfCells, diff --git a/Modules/IO/MeshGifti/include/itkGiftiMeshIO.h b/Modules/IO/MeshGifti/include/itkGiftiMeshIO.h index 41f92752d18..202c7d32a8a 100644 --- a/Modules/IO/MeshGifti/include/itkGiftiMeshIO.h +++ b/Modules/IO/MeshGifti/include/itkGiftiMeshIO.h @@ -168,7 +168,7 @@ class ITKIOMeshGifti_EXPORT GiftiMeshIO : public MeshIOBase GiftiImageProxy & m_GiftiImage; - bool m_ReadPointData{}; + bool m_ReadPointData{}; DirectionType m_Direction{}; // Translate (G|N)ifti datatypes to IOComponentEnum diff --git a/Modules/IO/MeshGifti/src/itkGiftiMeshIO.cxx b/Modules/IO/MeshGifti/src/itkGiftiMeshIO.cxx index 4d166210771..654a3914ade 100644 --- a/Modules/IO/MeshGifti/src/itkGiftiMeshIO.cxx +++ b/Modules/IO/MeshGifti/src/itkGiftiMeshIO.cxx @@ -713,7 +713,7 @@ GiftiMeshIO::WriteMeshInformation() // write labelTable using labelMap and colorMap const MetaDataDictionary & metaDic = this->GetMetaDataDictionary(); - LabelNameContainerPointer labelMap; + LabelNameContainerPointer labelMap; if (ExposeMetaData(metaDic, "labelContainer", labelMap)) { if (labelMap) diff --git a/Modules/IO/MeshGifti/test/itkGiftiMeshIOTest.cxx b/Modules/IO/MeshGifti/test/itkGiftiMeshIOTest.cxx index 9bda6d1317d..b3ce418d5b6 100644 --- a/Modules/IO/MeshGifti/test/itkGiftiMeshIOTest.cxx +++ b/Modules/IO/MeshGifti/test/itkGiftiMeshIOTest.cxx @@ -111,7 +111,7 @@ itkGiftiMeshIOTest(int argc, char * argv[]) ITK_TEST_SET_GET_VALUE(direction, giftiMeshIO->GetDirection()); const itk::GiftiMeshIO::LabelColorContainerPointer colorMap = giftiMeshIO->GetLabelColorTable(); - const itk::GiftiMeshIO::LabelNameContainerPointer labelMap = giftiMeshIO->GetLabelNameTable(); + const itk::GiftiMeshIO::LabelNameContainerPointer labelMap = giftiMeshIO->GetLabelNameTable(); giftiMeshIO->SetLabelColorTable(colorMap); ITK_TEST_SET_GET_VALUE(colorMap, giftiMeshIO->GetLabelColorTable()); diff --git a/Modules/IO/MeshOBJ/include/itkOBJMeshIO.h b/Modules/IO/MeshOBJ/include/itkOBJMeshIO.h index 80aec34c42e..7cb746a85b4 100644 --- a/Modules/IO/MeshOBJ/include/itkOBJMeshIO.h +++ b/Modules/IO/MeshOBJ/include/itkOBJMeshIO.h @@ -185,7 +185,7 @@ class ITKIOMeshOBJ_EXPORT OBJMeshIO : public MeshIOBase CloseFile(); private: - std::ifstream m_InputFile{}; + std::ifstream m_InputFile{}; std::streampos m_PointsStartPosition{}; // file position for points relative to // std::ios::beg }; diff --git a/Modules/IO/MeshOBJ/src/itkOBJMeshIO.cxx b/Modules/IO/MeshOBJ/src/itkOBJMeshIO.cxx index e8816d33956..439a8273b75 100644 --- a/Modules/IO/MeshOBJ/src/itkOBJMeshIO.cxx +++ b/Modules/IO/MeshOBJ/src/itkOBJMeshIO.cxx @@ -98,7 +98,7 @@ OBJMeshIO::CloseFile() bool OBJMeshIO::SplitLine(const std::string & line, std::string & type, std::string & content) { - const std::locale loc; + const std::locale loc; std::string::const_iterator start = line.begin(); while (start != line.end() && std::isspace(*start, loc)) @@ -134,9 +134,9 @@ OBJMeshIO::ReadMeshInformation() this->m_NumberOfPoints = 0; this->m_NumberOfCells = 0; this->m_NumberOfPointPixels = 0; - std::string line; - std::string inputLine; - std::string type; + std::string line; + std::string inputLine; + std::string type; const std::locale loc; while (std::getline(m_InputFile, line, '\n')) { @@ -151,7 +151,7 @@ OBJMeshIO::ReadMeshInformation() this->m_NumberOfCells++; std::stringstream ss(inputLine); - std::string item; + std::string item; while (ss >> item) { ++numberOfCellPoints; @@ -216,13 +216,13 @@ OBJMeshIO::ReadPoints(void * buffer) OpenFile(); // Number of data array - auto * data = static_cast(buffer); + auto * data = static_cast(buffer); SizeValueType index = 0; // Read and analyze the first line in the file - std::string line; - std::string inputLine; - std::string type; + std::string line; + std::string inputLine; + std::string type; const std::locale loc; while (std::getline(m_InputFile, line, '\n')) { @@ -249,12 +249,12 @@ OBJMeshIO::ReadCells(void * buffer) OpenFile(); // Read and analyze the first line in the file - const auto data = make_unique_for_overwrite(this->m_CellBufferSize - this->m_NumberOfCells); + const auto data = make_unique_for_overwrite(this->m_CellBufferSize - this->m_NumberOfCells); SizeValueType index = 0; - std::string line; - std::string inputLine; - std::string type; + std::string line; + std::string inputLine; + std::string type; const std::locale loc; while (std::getline(m_InputFile, line, '\n')) { @@ -263,11 +263,11 @@ OBJMeshIO::ReadCells(void * buffer) if (type == "f") { std::stringstream ss(inputLine); - std::string item; + std::string item; std::vector idList; while (ss >> item) { - long id; + long id; std::string::size_type pos = item.find('/'); while (pos != std::string::npos) { @@ -305,13 +305,13 @@ OBJMeshIO::ReadPointData(void * buffer) OpenFile(); // Number of data array - auto * data = static_cast(buffer); + auto * data = static_cast(buffer); SizeValueType index = 0; // Read and analyze the first line in the file - std::string line; - std::string inputLine; - std::string type; + std::string line; + std::string inputLine; + std::string type; const std::locale loc; while (std::getline(m_InputFile, line, '\n')) { diff --git a/Modules/IO/MeshOBJ/test/itkOBJMeshIOTest.cxx b/Modules/IO/MeshOBJ/test/itkOBJMeshIOTest.cxx index 7a367a2c233..5a245ae5554 100644 --- a/Modules/IO/MeshOBJ/test/itkOBJMeshIOTest.cxx +++ b/Modules/IO/MeshOBJ/test/itkOBJMeshIOTest.cxx @@ -100,7 +100,7 @@ itkOBJMeshIOTest(int argc, char * argv[]) constexpr itk::SizeValueType pointDataBufferSize = 100000; constexpr itk::SizeValueType cellBufferSize = 100000; - const std::shared_ptr pointBuffer = + const std::shared_ptr pointBuffer = itk::MeshIOTestHelper::AllocateBuffer(objMeshIO->GetPointComponentType(), pointBufferSize); const std::shared_ptr pointDataBuffer = itk::MeshIOTestHelper::AllocateBuffer(objMeshIO->GetPointPixelComponentType(), pointDataBufferSize); diff --git a/Modules/IO/MeshOFF/include/itkOFFMeshIO.h b/Modules/IO/MeshOFF/include/itkOFFMeshIO.h index ab229dbc55d..c27faae90db 100644 --- a/Modules/IO/MeshOFF/include/itkOFFMeshIO.h +++ b/Modules/IO/MeshOFF/include/itkOFFMeshIO.h @@ -119,8 +119,8 @@ class ITKIOMeshOFF_EXPORT OFFMeshIO : public MeshIOBase ReadCellsBufferAsAscii(T * buffer, std::ifstream & inputFile) { SizeValueType index = 0; - unsigned int numberOfPoints = 0; - std::string line; + unsigned int numberOfPoints = 0; + std::string line; for (SizeValueType ii = 0; ii < this->m_NumberOfCells; ++ii) { @@ -203,9 +203,9 @@ class ITKIOMeshOFF_EXPORT OFFMeshIO : public MeshIOBase CloseFile(); private: - std::ifstream m_InputFile{}; + std::ifstream m_InputFile{}; StreamOffsetType m_PointsStartPosition{}; // file position for points relative to std::ios::beg - bool m_TriangleCellType{}; // if all cells are triangle it is true. otherwise, it is false. + bool m_TriangleCellType{}; // if all cells are triangle it is true. otherwise, it is false. }; } // end namespace itk diff --git a/Modules/IO/MeshOFF/src/itkOFFMeshIO.cxx b/Modules/IO/MeshOFF/src/itkOFFMeshIO.cxx index 4496f4e9cae..3553b318383 100644 --- a/Modules/IO/MeshOFF/src/itkOFFMeshIO.cxx +++ b/Modules/IO/MeshOFF/src/itkOFFMeshIO.cxx @@ -215,7 +215,7 @@ OFFMeshIO::ReadMeshInformation() // Read cells itk::uint32_t numberOfCellPoints = 0; - const auto cellsBuffer = make_unique_for_overwrite(this->m_NumberOfCells); + const auto cellsBuffer = make_unique_for_overwrite(this->m_NumberOfCells); for (unsigned long id = 0; id < this->m_NumberOfCells; ++id) { this->ReadBufferAsBinary(&numberOfCellPoints, m_InputFile, 1); diff --git a/Modules/IO/MeshVTK/include/itkVTKPolyDataMeshIO.h b/Modules/IO/MeshVTK/include/itkVTKPolyDataMeshIO.h index 3d44d31f4e2..404415c510d 100644 --- a/Modules/IO/MeshVTK/include/itkVTKPolyDataMeshIO.h +++ b/Modules/IO/MeshVTK/include/itkVTKPolyDataMeshIO.h @@ -137,12 +137,12 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase void UpdateCellInformation(T * buffer) { - unsigned int numberOfVertices = 0; - unsigned int numberOfVertexIndices = 0; - unsigned int numberOfLines = 0; + unsigned int numberOfVertices = 0; + unsigned int numberOfVertexIndices = 0; + unsigned int numberOfLines = 0; SizeValueType numberOfLineIndices = 0; - unsigned int numberOfPolygons = 0; - unsigned int numberOfPolygonIndices = 0; + unsigned int numberOfPolygons = 0; + unsigned int numberOfPolygonIndices = 0; SizeValueType index = 0; @@ -462,12 +462,12 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase WriteCellsBufferAsASCII(std::ofstream & outputFile, T * buffer) { MetaDataDictionary & metaDic = this->GetMetaDataDictionary(); - unsigned int numberOfVertices = 0; - unsigned int numberOfVertexIndices = 0; - unsigned int numberOfLines = 0; - unsigned int numberOfLineIndices = 0; - unsigned int numberOfPolygons = 0; - unsigned int numberOfPolygonIndices = 0; + unsigned int numberOfVertices = 0; + unsigned int numberOfVertexIndices = 0; + unsigned int numberOfLines = 0; + unsigned int numberOfLineIndices = 0; + unsigned int numberOfPolygons = 0; + unsigned int numberOfPolygonIndices = 0; /** Write vertices */ SizeValueType index = 0; @@ -503,9 +503,9 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase if (numberOfLines) { numberOfLineIndices = 0; - SizeValueType numberOfPolylines = 0; + SizeValueType numberOfPolylines = 0; const PolylinesContainerPointer polylines = PolylinesContainerType::New(); - PointIdVector pointIds; + PointIdVector pointIds; for (SizeValueType ii = 0; ii < this->m_NumberOfCells; ++ii) { auto cellType = static_cast(static_cast(buffer[index++])); @@ -581,12 +581,12 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase WriteCellsBufferAsBINARY(std::ofstream & outputFile, T * buffer) { MetaDataDictionary & metaDic = this->GetMetaDataDictionary(); - unsigned int numberOfVertices = 0; - unsigned int numberOfVertexIndices = 0; - unsigned int numberOfLines = 0; - unsigned int numberOfLineIndices = 0; - unsigned int numberOfPolygons = 0; - unsigned int numberOfPolygonIndices = 0; + unsigned int numberOfVertices = 0; + unsigned int numberOfVertexIndices = 0; + unsigned int numberOfLines = 0; + unsigned int numberOfLineIndices = 0; + unsigned int numberOfPolygons = 0; + unsigned int numberOfPolygonIndices = 0; /** Write vertices */ SizeValueType index = 0; @@ -609,9 +609,9 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase if (numberOfLines) { numberOfLineIndices = 0; - SizeValueType numberOfPolylines = 0; + SizeValueType numberOfPolylines = 0; const PolylinesContainerPointer polylines = PolylinesContainerType::New(); - PointIdVector pointIds; + PointIdVector pointIds; for (SizeValueType ii = 0; ii < this->m_NumberOfCells; ++ii) { auto cellType = static_cast(static_cast(buffer[index++])); @@ -641,7 +641,7 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase EncapsulateMetaData(metaDic, "numberOfLineIndices", numberOfLineIndices); outputFile << "LINES " << numberOfLines << ' ' << numberOfLineIndices << '\n'; - const auto data = make_unique_for_overwrite(numberOfLineIndices); + const auto data = make_unique_for_overwrite(numberOfLineIndices); unsigned long outputIndex = 0; for (SizeValueType ii = 0; ii < polylines->Size(); ++ii) { @@ -677,7 +677,7 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase WritePointDataBufferAsASCII(std::ofstream & outputFile, T * buffer, const StringType & pointPixelComponentName) { const MetaDataDictionary & metaDic = this->GetMetaDataDictionary(); - StringType dataName; + StringType dataName; outputFile << "POINT_DATA " << this->m_NumberOfPointPixels << '\n'; switch (this->m_PointPixelType) @@ -733,8 +733,8 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase const Indent indent(2); if (this->m_PointPixelType == IOPixelEnum::SYMMETRICSECONDRANKTENSOR) { - T * ptr = buffer; - SizeValueType i = 0; + T * ptr = buffer; + SizeValueType i = 0; const SizeValueType num = this->m_NumberOfPointPixelComponents * this->m_NumberOfPointPixels; // Note that only the 3D tensors are supported in the VTK File Format // documentation. @@ -808,7 +808,7 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase WritePointDataBufferAsBINARY(std::ofstream & outputFile, T * buffer, const StringType & pointPixelComponentName) { const MetaDataDictionary & metaDic = this->GetMetaDataDictionary(); - StringType dataName; + StringType dataName; outputFile << "POINT_DATA " << this->m_NumberOfPointPixels << '\n'; switch (this->m_PointPixelType) @@ -871,7 +871,7 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase WriteCellDataBufferAsASCII(std::ofstream & outputFile, T * buffer, const StringType & cellPixelComponentName) { const MetaDataDictionary & metaDic = this->GetMetaDataDictionary(); - StringType dataName; + StringType dataName; outputFile << "CELL_DATA " << this->m_NumberOfCellPixels << '\n'; switch (this->m_CellPixelType) @@ -926,8 +926,8 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase const Indent indent(2); if (this->m_CellPixelType == IOPixelEnum::SYMMETRICSECONDRANKTENSOR) { - T * ptr = buffer; - SizeValueType i = 0; + T * ptr = buffer; + SizeValueType i = 0; const SizeValueType num = this->m_NumberOfCellPixelComponents * this->m_NumberOfCellPixels; if (this->m_NumberOfCellPixelComponents == 2) { @@ -998,7 +998,7 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase WriteCellDataBufferAsBINARY(std::ofstream & outputFile, T * buffer, const StringType & cellPixelComponentName) { const MetaDataDictionary & metaDic = this->GetMetaDataDictionary(); - StringType dataName; + StringType dataName; outputFile << "CELL_DATA " << this->m_NumberOfCellPixels << '\n'; switch (this->m_CellPixelType) @@ -1059,9 +1059,9 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase template void WriteColorScalarBufferAsASCII(std::ofstream & outputFile, - T * buffer, - unsigned int numberOfPixelComponents, - SizeValueType numberOfPixels) + T * buffer, + unsigned int numberOfPixelComponents, + SizeValueType numberOfPixels) { outputFile << numberOfPixelComponents << '\n'; const Indent indent(2); @@ -1081,13 +1081,13 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase template void WriteColorScalarBufferAsBINARY(std::ofstream & outputFile, - T * buffer, - unsigned int numberOfPixelComponents, - SizeValueType numberOfPixels) + T * buffer, + unsigned int numberOfPixelComponents, + SizeValueType numberOfPixels) { outputFile << numberOfPixelComponents << '\n'; const SizeValueType numberOfElements = numberOfPixelComponents * numberOfPixels; - const auto data = make_unique_for_overwrite(numberOfElements); + const auto data = make_unique_for_overwrite(numberOfElements); for (SizeValueType ii = 0; ii < numberOfElements; ++ii) { data[ii] = static_cast(buffer[ii]); diff --git a/Modules/IO/MeshVTK/src/itkVTKPolyDataMeshIO.cxx b/Modules/IO/MeshVTK/src/itkVTKPolyDataMeshIO.cxx index c33494a4bf2..893daeddd8c 100644 --- a/Modules/IO/MeshVTK/src/itkVTKPolyDataMeshIO.cxx +++ b/Modules/IO/MeshVTK/src/itkVTKPolyDataMeshIO.cxx @@ -33,9 +33,9 @@ namespace { template void -ReadFloatingPointsAsASCII(std::ifstream & inputFile, +ReadFloatingPointsAsASCII(std::ifstream & inputFile, TFloatingPoint * const buffer, - const SizeValueType numberOfFloatingPoints) + const SizeValueType numberOfFloatingPoints) { std::string str; @@ -61,10 +61,10 @@ ReadFloatingPointsAsASCII(std::ifstream & inputFile, const int numberOfChars = Math::CastWithRangeCheck(str.size()); - constexpr auto double_NaN = std::numeric_limits::quiet_NaN(); - int processedCharCount{ 0 }; + constexpr auto double_NaN = std::numeric_limits::quiet_NaN(); + int processedCharCount{ 0 }; const double_conversion::StringToDoubleConverter converter(0, double_NaN, double_NaN, "inf", "nan"); - const auto conversionResult = + const auto conversionResult = converter.StringTo(str.c_str(), numberOfChars, &processedCharCount); if (processedCharCount == numberOfChars && !std::isnan(conversionResult)) @@ -269,7 +269,7 @@ VTKPolyDataMeshIO::ReadMeshInformation() } unsigned int numLine = 0; - std::string line; + std::string line; std::getline(inputFile, line, '\n'); ++numLine; @@ -279,8 +279,8 @@ VTKPolyDataMeshIO::ReadMeshInformation() const std::string versionString = line.substr(versionPos + 8); // Split the version string by "." std::vector versionTokens; - std::istringstream iss(versionString); - std::string token; + std::istringstream iss(versionString); + std::string token; while (std::getline(iss, token, '.')) { versionTokens.push_back(token); @@ -984,9 +984,9 @@ VTKPolyDataMeshIO::ReadCells(void * buffer) void VTKPolyDataMeshIO::ReadCellsBufferAsASCII(std::ifstream & inputFile, void * buffer) { - std::string line; + std::string line; SizeValueType index = 0; - unsigned int numPoints; // number of point in each cell + unsigned int numPoints; // number of point in each cell const MetaDataDictionary & metaDic = this->GetMetaDataDictionary(); using GeometryIntegerType = unsigned int; @@ -1225,9 +1225,9 @@ VTKPolyDataMeshIO::ReadCellsBufferAsBINARYConnectivityType(std::ifstream & input using ConnectivityType = TConnectivity; using GeometryIntegerType = unsigned int; - std::string line; + std::string line; const MetaDataDictionary & metaDic = this->GetMetaDataDictionary(); - unsigned int numPoints; // number of point in each cell + unsigned int numPoints; // number of point in each cell auto * outputBuffer = static_cast(buffer); while (!inputFile.eof()) @@ -1242,8 +1242,8 @@ VTKPolyDataMeshIO::ReadCellsBufferAsBINARYConnectivityType(std::ifstream & input // OFFSETS line std::getline(inputFile, line, '\n'); const auto inputOffsetsBuffer = make_unique_for_overwrite(numberOfVertexOffsets); - void * pvOffsets = inputOffsetsBuffer.get(); - auto * startBufferOffsets = static_cast(pvOffsets); + void * pvOffsets = inputOffsetsBuffer.get(); + auto * startBufferOffsets = static_cast(pvOffsets); inputFile.read(startBufferOffsets, numberOfVertexOffsets * sizeof(OffsetType)); auto * dataOffsets = static_cast(pvOffsets); if constexpr (itk::ByteSwapper::SystemIsLittleEndian()) @@ -1262,8 +1262,8 @@ VTKPolyDataMeshIO::ReadCellsBufferAsBINARYConnectivityType(std::ifstream & input itkExceptionMacro("Expected CONNECTIVITY keyword in the VTK file"); } const auto inputConnectivityBuffer = make_unique_for_overwrite(numberOfVertexConnectivity); - void * pvConnectivity = inputOffsetsBuffer.get(); - auto * startBufferConnectivity = static_cast(pvConnectivity); + void * pvConnectivity = inputOffsetsBuffer.get(); + auto * startBufferConnectivity = static_cast(pvConnectivity); inputFile.read(startBufferConnectivity, numberOfVertexConnectivity * sizeof(ConnectivityType)); auto * dataConnectivity = static_cast(pvConnectivity); if constexpr (itk::ByteSwapper::SystemIsLittleEndian()) @@ -1292,8 +1292,8 @@ VTKPolyDataMeshIO::ReadCellsBufferAsBINARYConnectivityType(std::ifstream & input // OFFSETS line std::getline(inputFile, line, '\n'); const auto inputOffsetsBuffer = make_unique_for_overwrite(numberOfLinesOffsets); - void * pvOffsets = inputOffsetsBuffer.get(); - auto * startBufferOffsets = static_cast(pvOffsets); + void * pvOffsets = inputOffsetsBuffer.get(); + auto * startBufferOffsets = static_cast(pvOffsets); inputFile.read(startBufferOffsets, numberOfLinesOffsets * sizeof(OffsetType)); auto * dataOffsets = static_cast(pvOffsets); if constexpr (itk::ByteSwapper::SystemIsLittleEndian()) @@ -1312,8 +1312,8 @@ VTKPolyDataMeshIO::ReadCellsBufferAsBINARYConnectivityType(std::ifstream & input itkExceptionMacro("Expected CONNECTIVITY keyword in the VTK file"); } const auto inputConnectivityBuffer = make_unique_for_overwrite(numberOfLinesConnectivity); - void * pvConnectivity = inputOffsetsBuffer.get(); - auto * startBufferConnectivity = static_cast(pvConnectivity); + void * pvConnectivity = inputOffsetsBuffer.get(); + auto * startBufferConnectivity = static_cast(pvConnectivity); inputFile.read(startBufferConnectivity, numberOfLinesConnectivity * sizeof(ConnectivityType)); auto * dataConnectivity = static_cast(pvConnectivity); if constexpr (itk::ByteSwapper::SystemIsLittleEndian()) @@ -1354,8 +1354,8 @@ VTKPolyDataMeshIO::ReadCellsBufferAsBINARYConnectivityType(std::ifstream & input // OFFSETS line std::getline(inputFile, line, '\n'); const auto inputOffsetsBuffer = make_unique_for_overwrite(numberOfPolygonsOffsets); - void * pvOffsets = inputOffsetsBuffer.get(); - auto * startBufferOffsets = static_cast(pvOffsets); + void * pvOffsets = inputOffsetsBuffer.get(); + auto * startBufferOffsets = static_cast(pvOffsets); inputFile.read(startBufferOffsets, numberOfPolygonsOffsets * sizeof(OffsetType)); auto * dataOffsets = static_cast(pvOffsets); if constexpr (itk::ByteSwapper::SystemIsLittleEndian()) @@ -1374,8 +1374,8 @@ VTKPolyDataMeshIO::ReadCellsBufferAsBINARYConnectivityType(std::ifstream & input itkExceptionMacro("Expected CONNECTIVITY keyword in the VTK file"); } const auto inputConnectivityBuffer = make_unique_for_overwrite(numberOfPolygonsConnectivity); - void * pvConnectivity = inputConnectivityBuffer.get(); - auto * startBufferConnectivity = static_cast(pvConnectivity); + void * pvConnectivity = inputConnectivityBuffer.get(); + auto * startBufferConnectivity = static_cast(pvConnectivity); inputFile.read(startBufferConnectivity, numberOfPolygonsConnectivity * sizeof(ConnectivityType)); auto * dataConnectivity = static_cast(pvConnectivity); if constexpr (itk::ByteSwapper::SystemIsLittleEndian()) @@ -1409,7 +1409,7 @@ VTKPolyDataMeshIO::ReadCellsBufferAsBINARYOffsetType(std::ifstream & inputFile, using OffsetType = TOffset; const MetaDataDictionary & metaDic = this->GetMetaDataDictionary(); - std::string connectivityType; + std::string connectivityType; ExposeMetaData(metaDic, "connectivityType", connectivityType); const auto connectivityComponentType = this->GetComponentTypeFromString(connectivityType); switch (connectivityComponentType) @@ -1468,10 +1468,10 @@ VTKPolyDataMeshIO::ReadCellsBufferAsBINARY(std::ifstream & inputFile, void * buf else { std::string line; - const auto inputBuffer = make_unique_for_overwrite(this->m_CellBufferSize - this->m_NumberOfCells); - void * pv = inputBuffer.get(); - auto * startBuffer = static_cast(pv); - auto * outputBuffer = static_cast(buffer); + const auto inputBuffer = make_unique_for_overwrite(this->m_CellBufferSize - this->m_NumberOfCells); + void * pv = inputBuffer.get(); + auto * startBuffer = static_cast(pv); + auto * outputBuffer = static_cast(buffer); while (!inputFile.eof()) { std::getline(inputFile, line, '\n'); @@ -2064,7 +2064,7 @@ VTKPolyDataMeshIO::PrintSelf(std::ostream & os, Indent indent) const Superclass::PrintSelf(os, indent); const MetaDataDictionary & metaDic = this->GetMetaDataDictionary(); - unsigned int value = 0; + unsigned int value = 0; if (ExposeMetaData(metaDic, "numberOfVertices", value)) { @@ -2114,16 +2114,16 @@ VTKPolyDataMeshIO::PrintSelf(std::ostream & os, Indent indent) const } void -VTKPolyDataMeshIO::ReadComponentsAsASCII(std::ifstream & inputFile, - float * const buffer, +VTKPolyDataMeshIO::ReadComponentsAsASCII(std::ifstream & inputFile, + float * const buffer, const SizeValueType numberOfComponents) { ReadFloatingPointsAsASCII(inputFile, buffer, numberOfComponents); } void -VTKPolyDataMeshIO::ReadComponentsAsASCII(std::ifstream & inputFile, - double * const buffer, +VTKPolyDataMeshIO::ReadComponentsAsASCII(std::ifstream & inputFile, + double * const buffer, const SizeValueType numberOfComponents) { ReadFloatingPointsAsASCII(inputFile, buffer, numberOfComponents); diff --git a/Modules/IO/MeshVTK/test/itkVTKPolyDataMeshIOGTest.cxx b/Modules/IO/MeshVTK/test/itkVTKPolyDataMeshIOGTest.cxx index 8d27e7b1f25..754c9e0457a 100644 --- a/Modules/IO/MeshVTK/test/itkVTKPolyDataMeshIOGTest.cxx +++ b/Modules/IO/MeshVTK/test/itkVTKPolyDataMeshIOGTest.cxx @@ -48,9 +48,9 @@ MakePointOfIncreasingCoordValues() // value is written, a NaN coordinate value is expected to be read back.) template void -Expect_lossless_writing_and_reading_of_points(const std::string & fileName, +Expect_lossless_writing_and_reading_of_points(const std::string & fileName, const std::vector & points, - const bool writeAsBinary) + const bool writeAsBinary) { const auto inputMesh = TMesh::New(); @@ -121,9 +121,9 @@ TEST(VTKPolyDataMeshIO, LosslessWriteAndReadOfPoints) using NumericLimits = std::numeric_limits; std::vector points; - std::mt19937 randomNumberEngine; - const auto smallRandomValue = std::uniform_real_distribution{}(randomNumberEngine); - const auto largeRandomValue = + std::mt19937 randomNumberEngine; + const auto smallRandomValue = std::uniform_real_distribution{}(randomNumberEngine); + const auto largeRandomValue = std::uniform_real_distribution{ CoordinateType{ 1 }, NumericLimits::max() }(randomNumberEngine); // Include random and boundary values with the test input. diff --git a/Modules/IO/Meta/include/itkMetaArrayReader.h b/Modules/IO/Meta/include/itkMetaArrayReader.h index 46418a49987..c348bcc4b68 100644 --- a/Modules/IO/Meta/include/itkMetaArrayReader.h +++ b/Modules/IO/Meta/include/itkMetaArrayReader.h @@ -201,9 +201,9 @@ class ITKIOMeta_EXPORT MetaArrayReader : public LightProcessObject * when the MetaArrayReader is destroyed. */ template void - GetOutput(MET_ValueEnumType _metaElementType, + GetOutput(MET_ValueEnumType _metaElementType, VariableLengthVector * _vector, - bool _letVectorManageData = true) + bool _letVectorManageData = true) { if (m_MetaArray.ElementType() != _metaElementType) { diff --git a/Modules/IO/Meta/include/itkMetaImageIO.h b/Modules/IO/Meta/include/itkMetaImageIO.h index 0190ea9b3e8..0bd3176fd68 100644 --- a/Modules/IO/Meta/include/itkMetaImageIO.h +++ b/Modules/IO/Meta/include/itkMetaImageIO.h @@ -123,13 +123,13 @@ class ITKIOMeta_EXPORT MetaImageIO : public ImageIOBase GenerateStreamableReadRegionFromRequestedRegion(const ImageIORegion & requestedRegion) const override; unsigned int - GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits, + GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits, const ImageIORegion & pasteRegion, const ImageIORegion & largestPossibleRegion) override; ImageIORegion - GetSplitRegionForWriting(unsigned int ithPiece, - unsigned int numberOfActualSplits, + GetSplitRegionForWriting(unsigned int ithPiece, + unsigned int numberOfActualSplits, const ImageIORegion & pasteRegion, const ImageIORegion & largestPossibleRegion) override; @@ -189,9 +189,9 @@ class ITKIOMeta_EXPORT MetaImageIO : public ImageIOBase PrintSelf(std::ostream & os, Indent indent) const override; template bool - WriteMatrixInMetaData(std::ostringstream & strs, + WriteMatrixInMetaData(std::ostringstream & strs, const MetaDataDictionary & metaDict, - const std::string & metaString) const; + const std::string & metaString) const; private: /** Only used to synchronize the global variable across static libraries.*/ @@ -206,9 +206,9 @@ class ITKIOMeta_EXPORT MetaImageIO : public ImageIOBase template bool -MetaImageIO::WriteMatrixInMetaData(std::ostringstream & strs, +MetaImageIO::WriteMatrixInMetaData(std::ostringstream & strs, const MetaDataDictionary & metaDict, - const std::string & metaString) const + const std::string & metaString) const { itk::Matrix mval; if (ExposeMetaData>(metaDict, metaString, mval)) diff --git a/Modules/IO/Meta/src/itkMetaImageIO.cxx b/Modules/IO/Meta/src/itkMetaImageIO.cxx index 0c40e59690a..8972a2dbe15 100644 --- a/Modules/IO/Meta/src/itkMetaImageIO.cxx +++ b/Modules/IO/Meta/src/itkMetaImageIO.cxx @@ -407,7 +407,7 @@ MetaImageIO::ReadImageInformation() // // Read direction cosines // - const double * transformMatrix = m_MetaImage.TransformMatrix(); + const double * transformMatrix = m_MetaImage.TransformMatrix(); vnl_vector directionAxis(this->GetNumberOfDimensions()); for (unsigned int ii = 0; ii < this->GetNumberOfDimensions(); ++ii) { @@ -535,7 +535,7 @@ MetaImageIO::WriteImageInformation() { MetaDataDictionary & metaDict = this->GetMetaDataDictionary(); - std::string metaDataStr; + std::string metaDataStr; // Look at default metaio fields if (ExposeMetaData(metaDict, ITK_VoxelUnits, metaDataStr)) @@ -566,7 +566,7 @@ MetaImageIO::WriteImageInformation() // Save out the metadatadictionary key/value pairs as part of // the metaio header. - std::vector keys = metaDict.GetKeys(); + std::vector keys = metaDict.GetKeys(); std::vector::const_iterator keyIt; for (keyIt = keys.begin(); keyIt != keys.end(); ++keyIt) { @@ -575,22 +575,22 @@ MetaImageIO::WriteImageInformation() continue; } // try for common scalar types - std::ostringstream strs; - double dval = 0.0; - float fval = 0.0F; - long lval = 0L; - unsigned long ulval = 0L; - long long llval = 0LL; - unsigned long long ullval = 0uLL; - int ival = 0; - unsigned int uval = 0; - short shval = 0; - unsigned short ushval = 0; - char cval = 0; - unsigned char ucval = 0; - bool bval = false; + std::ostringstream strs; + double dval = 0.0; + float fval = 0.0F; + long lval = 0L; + unsigned long ulval = 0L; + long long llval = 0LL; + unsigned long long ullval = 0uLL; + int ival = 0; + unsigned int uval = 0; + short shval = 0; + unsigned short ushval = 0; + char cval = 0; + unsigned char ucval = 0; + bool bval = false; std::vector vval(0); - std::string value = ""; + std::string value = ""; if (ExposeMetaData(metaDict, *keyIt, value)) { strs << value; @@ -818,9 +818,9 @@ MetaImageIO::Write(const void * buffer) if (numberOfDimensions == 3) { AnatomicalOrientation::DirectionType dir; - std::vector dirx = this->GetDirection(0); - std::vector diry = this->GetDirection(1); - std::vector dirz = this->GetDirection(2); + std::vector dirx = this->GetDirection(0); + std::vector diry = this->GetDirection(1); + std::vector dirz = this->GetDirection(2); for (unsigned int ii = 0; ii < 3; ++ii) { dir[ii][0] = dirx[ii]; @@ -934,7 +934,7 @@ MetaImageIO::GenerateStreamableReadRegionFromRequestedRegion(const ImageIORegion } unsigned int -MetaImageIO::GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits, +MetaImageIO::GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits, const ImageIORegion & pasteRegion, const ImageIORegion & largestPossibleRegion) { @@ -962,7 +962,7 @@ MetaImageIO::GetActualNumberOfSplitsForWriting(unsigned int numberOfReq // we are going to be pasting (may be streaming too) // need to check to see if the file is compatible - std::string errorMessage; + std::string errorMessage; const Pointer headerImageIOReader = Self::New(); try @@ -1057,8 +1057,8 @@ MetaImageIO::GetActualNumberOfSplitsForWriting(unsigned int numberOfReq } ImageIORegion -MetaImageIO::GetSplitRegionForWriting(unsigned int ithPiece, - unsigned int numberOfActualSplits, +MetaImageIO::GetSplitRegionForWriting(unsigned int ithPiece, + unsigned int numberOfActualSplits, const ImageIORegion & pasteRegion, const ImageIORegion & itkNotUsed(largestPossibleRegion)) { diff --git a/Modules/IO/Meta/test/itkLargeMetaImageWriteReadTest.cxx b/Modules/IO/Meta/test/itkLargeMetaImageWriteReadTest.cxx index 5c3fdd83103..38f15b3f415 100644 --- a/Modules/IO/Meta/test/itkLargeMetaImageWriteReadTest.cxx +++ b/Modules/IO/Meta/test/itkLargeMetaImageWriteReadTest.cxx @@ -43,9 +43,9 @@ ActualTest(std::string filename, typename TImageType::SizeType size) using ConstIteratorType = itk::ImageRegionConstIterator; - const typename ImageType::IndexType index{}; + const typename ImageType::IndexType index{}; const typename ImageType::RegionType region{ index, size }; - itk::TimeProbesCollectorBase chronometer; + itk::TimeProbesCollectorBase chronometer; { // begin write block auto image = ImageType::New(); diff --git a/Modules/IO/Meta/test/itkMetaImageIOMetaDataTest.cxx b/Modules/IO/Meta/test/itkMetaImageIOMetaDataTest.cxx index 571da75ad29..596f5830555 100644 --- a/Modules/IO/Meta/test/itkMetaImageIOMetaDataTest.cxx +++ b/Modules/IO/Meta/test/itkMetaImageIOMetaDataTest.cxx @@ -129,7 +129,7 @@ bool TestMatch(itk::MetaDataDictionary & dict, const char * const key, TValue expectedValue) { std::istringstream is; - std::string stringValue; + std::string stringValue; if (!itk::ExposeMetaData(dict, key, stringValue)) { std::cerr << "Key " << key << " not found" << std::endl; @@ -162,14 +162,14 @@ itkMetaImageIOMetaDataTest(int argc, char * argv[]) using ImageType = itk::Image; using SourceType = itk::RandomImageSource; - auto source = SourceType::New(); + auto source = SourceType::New(); ImageType::SizeValueType size[Dim] = { 32, 32 }; source->SetSize(size); source->SetMin(itk::NumericTraits::min()); source->SetMax(itk::NumericTraits::max()); source->Update(); - ImageType::Pointer randImage(source->GetOutput()); + ImageType::Pointer randImage(source->GetOutput()); itk::MetaDataDictionary & dict(randImage->GetMetaDataDictionary()); // // add an arbitrary key to check whether it persists with the image @@ -193,72 +193,72 @@ itkMetaImageIOMetaDataTest(int argc, char * argv[]) { // Add double const std::string key("double"); - constexpr double value(7.891011); + constexpr double value(7.891011); itk::EncapsulateMetaData(dict, key, value); } { // Add float const std::string key("float"); - constexpr float value(1.23456); + constexpr float value(1.23456); itk::EncapsulateMetaData(dict, key, value); } { // Add long const std::string key("long"); - constexpr long value(-31415926); + constexpr long value(-31415926); itk::EncapsulateMetaData(dict, key, value); } { // Add unsigned long - const std::string key("unsigned_long"); + const std::string key("unsigned_long"); constexpr unsigned long value(27182818); itk::EncapsulateMetaData(dict, key, value); } { // Add long long - const std::string key("long_long"); + const std::string key("long_long"); constexpr long long value(-8589934592ll); itk::EncapsulateMetaData(dict, key, value); } { // Add unsigned long long - const std::string key("unsigned_long_long"); + const std::string key("unsigned_long_long"); constexpr unsigned long long value(8589934592ull); itk::EncapsulateMetaData(dict, key, value); } { // Add int const std::string key("int"); - constexpr int value(-3141592); + constexpr int value(-3141592); itk::EncapsulateMetaData(dict, key, value); } { // Add unsigned int - const std::string key("unsigned_int"); + const std::string key("unsigned_int"); constexpr unsigned int value(2718281); itk::EncapsulateMetaData(dict, key, value); } { // Add short const std::string key("short"); - constexpr short value(-16384); + constexpr short value(-16384); itk::EncapsulateMetaData(dict, key, value); } { // Add short - const std::string key("unsigned_short"); + const std::string key("unsigned_short"); constexpr unsigned int value(8192); itk::EncapsulateMetaData(dict, key, value); } { // Add char const std::string key("char"); - constexpr char value('c'); + constexpr char value('c'); itk::EncapsulateMetaData(dict, key, value); } { const std::string key("bool"); - constexpr bool value(true); + constexpr bool value(true); itk::EncapsulateMetaData(dict, key, value); } diff --git a/Modules/IO/Meta/test/itkMetaImageIOTest.cxx b/Modules/IO/Meta/test/itkMetaImageIOTest.cxx index 9aaddd1af83..594534e0087 100644 --- a/Modules/IO/Meta/test/itkMetaImageIOTest.cxx +++ b/Modules/IO/Meta/test/itkMetaImageIOTest.cxx @@ -61,7 +61,7 @@ itkMetaImageIOTest(int argc, char * argv[]) } // Test subsampling factor (change it then change it back) - const unsigned int origSubSamplingFactor = metaIn->GetSubSamplingFactor(); + const unsigned int origSubSamplingFactor = metaIn->GetSubSamplingFactor(); constexpr unsigned int subSamplingFactor = 2; metaIn->SetSubSamplingFactor(subSamplingFactor); ITK_TEST_SET_GET_VALUE(subSamplingFactor, metaIn->GetSubSamplingFactor()); @@ -98,7 +98,7 @@ itkMetaImageIOTest(int argc, char * argv[]) // Generate test image const itk::ImageFileWriter::Pointer writer = itk::ImageFileWriter::New(); - auto metaOut = IOType::New(); + auto metaOut = IOType::New(); writer->SetImageIO(metaOut); writer->SetInput(reader->GetOutput()); writer->SetFileName(argv[2]); diff --git a/Modules/IO/Meta/test/itkMetaImageIOTest2.cxx b/Modules/IO/Meta/test/itkMetaImageIOTest2.cxx index d9c64605221..3cf4f73ee06 100644 --- a/Modules/IO/Meta/test/itkMetaImageIOTest2.cxx +++ b/Modules/IO/Meta/test/itkMetaImageIOTest2.cxx @@ -39,7 +39,7 @@ TestUnknowMetaDataBug(const std::string & fname) using PixelType = unsigned short; using ImageType = itk::Image; - ImageType::RegionType region; + ImageType::RegionType region; constexpr ImageType::SizeType size = { { 32, 32 } }; region.SetSize(size); diff --git a/Modules/IO/Meta/test/testMetaArray.cxx b/Modules/IO/Meta/test/testMetaArray.cxx index b9985e795a4..d8af1bd2d23 100644 --- a/Modules/IO/Meta/test/testMetaArray.cxx +++ b/Modules/IO/Meta/test/testMetaArray.cxx @@ -128,7 +128,7 @@ testMetaArray(int argc, char * argv[]) // Read them std::cout << "Read VariableLengthVector short" << std::endl; - itk::VariableLengthVector rvecs; + itk::VariableLengthVector rvecs; const itk::MetaArrayReader::Pointer arrayReader = itk::MetaArrayReader::New(); ITK_EXERCISE_BASIC_OBJECT_METHODS(arrayReader, MetaArrayReader, LightProcessObject); diff --git a/Modules/IO/Meta/test/testMetaImage.cxx b/Modules/IO/Meta/test/testMetaImage.cxx index 0d32eb17904..a832fdd5a86 100644 --- a/Modules/IO/Meta/test/testMetaImage.cxx +++ b/Modules/IO/Meta/test/testMetaImage.cxx @@ -33,11 +33,11 @@ ReadWriteCompare(PixelType value, std::string type) { std::cout << "Testing: " << type << std::endl; using ImageType = itk::Image; - const char * filename = "test.mha"; - typename ImageType::SpacingType spacing; - typename ImageType::PointType origin; + const char * filename = "test.mha"; + typename ImageType::SpacingType spacing; + typename ImageType::PointType origin; typename ImageType::DirectionType direction; - typename ImageType::SizeType size; + typename ImageType::SizeType size; // Allocate Images direction[0][1] = 1; direction[1][0] = -1; @@ -50,7 +50,7 @@ ReadWriteCompare(PixelType value, std::string type) size[ii] = 10; } const typename ImageType::RegionType region(size); - const typename ImageType::Pointer img = + const typename ImageType::Pointer img = itk::IOTestHelper::AllocateImageFromRegionAndSpacing(region, spacing); { // Fill in entire image itk::ImageRegionIterator ri(img, region); @@ -119,7 +119,7 @@ int testMetaImage(int, char *[]) { - MetaImage tIm(8, 8, 1, 2, MET_CHAR); + MetaImage tIm(8, 8, 1, 2, MET_CHAR); const MetaImage tImCopy(&tIm); for (int i = 0; i < 64; ++i) diff --git a/Modules/IO/Meta/test/testMetaMesh.cxx b/Modules/IO/Meta/test/testMetaMesh.cxx index 582ee2e02cb..fc664be03ca 100644 --- a/Modules/IO/Meta/test/testMetaMesh.cxx +++ b/Modules/IO/Meta/test/testMetaMesh.cxx @@ -249,7 +249,7 @@ testMetaMesh(int argc, char * argv[]) using ListType = MetaScene::ObjectListType; ListType * list = myScene2.GetObjectList(); - auto it = list->begin(); + auto it = list->begin(); for (int i = 0; i < static_cast(list->size()); ++i) { diff --git a/Modules/IO/NIFTI/include/itkNiftiImageIO.h b/Modules/IO/NIFTI/include/itkNiftiImageIO.h index d19089c252f..dec8beca2d6 100644 --- a/Modules/IO/NIFTI/include/itkNiftiImageIO.h +++ b/Modules/IO/NIFTI/include/itkNiftiImageIO.h @@ -77,9 +77,9 @@ using Analyze75Flavor = NiftiImageIOEnums::Analyze75Flavor; /** Define how to print enumerations */ extern ITKIONIFTI_EXPORT std::ostream & - operator<<(std::ostream & out, const NiftiImageIOEnums::Analyze75Flavor value); +operator<<(std::ostream & out, const NiftiImageIOEnums::Analyze75Flavor value); extern ITKIONIFTI_EXPORT std::ostream & - operator<<(std::ostream & out, const NiftiImageIOEnums::NiftiFileEnum value); +operator<<(std::ostream & out, const NiftiImageIOEnums::NiftiFileEnum value); /** * \class NiftiImageIO diff --git a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx index 67d42cd5ca0..8cc2c52f407 100644 --- a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx +++ b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx @@ -133,7 +133,7 @@ str_intent(const unsigned int intent) static int DumpNiftiHeader(const std::string & fname) { - int swap; + int swap; nifti_1_header * hp = nifti_read_header(fname.c_str(), &swap, true); fputs("-------------------------------------------------------\n", stderr); if (!hp) @@ -350,7 +350,7 @@ UpperToLowerOrder(int dim) } } auto * rval = new int[index + 1]; - int index2(0); + int index2(0); for (int i = 0; i < dim; ++i) { for (int j = 0; j <= i; j++, index2++) @@ -536,13 +536,13 @@ NiftiImageIO::Read(void * buffer) { void * data = nullptr; - const ImageIORegion regionToRead = this->GetIORegion(); - ImageIORegion::SizeType size = regionToRead.GetSize(); + const ImageIORegion regionToRead = this->GetIORegion(); + ImageIORegion::SizeType size = regionToRead.GetSize(); ImageIORegion::IndexType start = regionToRead.GetIndex(); size_t numElts = 1; - int _origin[7]; - int _size[7]; + int _origin[7]; + int _size[7]; { unsigned int i = 0; for (; i < start.size(); ++i) @@ -696,7 +696,7 @@ NiftiImageIO::Read(void * buffer) // otherwise nifti is x y z t vec l m 0, itk is // vec x y z t l m o const auto * niftibuf = (const char *)data; - auto * itkbuf = (char *)buffer; + auto * itkbuf = (char *)buffer; const size_t rowdist = this->m_NiftiImage->dim[1]; const size_t slicedist = rowdist * this->m_NiftiImage->dim[2]; const size_t volumedist = slicedist * this->m_NiftiImage->dim[3]; @@ -1395,7 +1395,7 @@ NiftiImageIO::ReadImageInformation() // Insert Orientation. // Need to encapsulate as much Nifti information as possible here. MetaDataDictionary & thisDic = this->GetMetaDataDictionary(); - const std::string classname(this->GetNameOfClass()); + const std::string classname(this->GetNameOfClass()); EncapsulateMetaData(thisDic, ITK_InputFilterName, classname); // set the image orientation @@ -1464,12 +1464,12 @@ NiftiImageIO::WriteImageInformation() itkExceptionMacro("Bad Nifti file name. No extension found for file: " << FName); } const std::string ExtensionName(tempextension); - char * tempbasename = nifti_makebasename(FName.c_str()); + char * tempbasename = nifti_makebasename(FName.c_str()); const std::string BaseName(tempbasename); free(tempbasename); // Need to clear the extension const std::string::size_type ext = ExtensionName.rfind(".gz"); - const bool IsCompressed = (ext == std::string::npos) ? false : true; + const bool IsCompressed = (ext == std::string::npos) ? false : true; if ((ExtensionName == ".nii" || ExtensionName == ".nii.gz") && this->GetUseLegacyModeForTwoFileWriting() == false) { this->m_NiftiImage->nifti_type = NIFTI_FTYPE_NIFTI1_1; @@ -1593,12 +1593,12 @@ NiftiImageIO::WriteImageInformation() { // Each voxel is a vector. Set intent code to NIFTI_INTENT_VECTOR (default) // or NIFTI_INTENT_DISPVECT. - int intentCode = NIFTI_INTENT_VECTOR; + int intentCode = NIFTI_INTENT_VECTOR; std::string intentCodeStrInMetaData; if (itk::ExposeMetaData(thisDic, "intent_code", intentCodeStrInMetaData)) { std::istringstream is(intentCodeStrInMetaData); - int intentCodeInMetaData = -1; + int intentCodeInMetaData = -1; is >> intentCodeInMetaData; if (intentCodeInMetaData == NIFTI_INTENT_DISPVECT) { @@ -1863,7 +1863,7 @@ IsAffine(const mat44 & nifti_mat) // Calculate the inverse and separate the inverse translation component // and the top 3x3 part of the inverse matrix const vnl_matrix_fixed inv4x4Matrix = vnl_matrix_inverse(mat.as_matrix()).as_matrix(); - const vnl_vector_fixed inv4x4Translation(inv4x4Matrix[0][3], inv4x4Matrix[1][3], inv4x4Matrix[2][3]); + const vnl_vector_fixed inv4x4Translation(inv4x4Matrix[0][3], inv4x4Matrix[1][3], inv4x4Matrix[2][3]); const vnl_matrix_fixed inv4x4Top3x3 = inv4x4Matrix.extract(3, 3, 0, 0); // Grab just the top 3x3 matrix @@ -1873,8 +1873,8 @@ IsAffine(const mat44 & nifti_mat) const vnl_vector_fixed inv3x3Translation = -(invTop3x3Matrix * mat.get_column(3).extract(3)); // Make sure we adhere to the conditions of a 4x4 invertible affine transform matrix - const double diff_matrix_array_one_norm = (inv4x4Top3x3 - invTop3x3Matrix).array_one_norm(); - const double diff_vector_translation_one_norm = (inv4x4Translation - inv3x3Translation).one_norm(); + const double diff_matrix_array_one_norm = (inv4x4Top3x3 - invTop3x3Matrix).array_one_norm(); + const double diff_vector_translation_one_norm = (inv4x4Translation - inv3x3Translation).one_norm(); constexpr double normed_tolerance_matrix_close = 1e-2; return !((diff_matrix_array_one_norm > normed_tolerance_matrix_close) || (diff_vector_translation_one_norm > normed_tolerance_matrix_close)); @@ -1942,7 +1942,7 @@ NiftiImageIO::SetImageIOOrientationFromNIfTI(unsigned short dims, double spacing break; } const auto dir = orient.GetAsDirection(); - const int max_defined_orientation_dims = (dims > 3) ? 3 : dims; + const int max_defined_orientation_dims = (dims > 3) ? 3 : dims; for (int d = 0; d < max_defined_orientation_dims; ++d) { std::vector direction(dims, 0.0); @@ -2006,7 +2006,7 @@ NiftiImageIO::SetImageIOOrientationFromNIfTI(unsigned short dims, double spacing vnl_matrix_fixed rotation = sto_xyz.extract(3, 3, 0, 0); { // Ensure that the scales are approximately the same for spacing directions - bool sform_scales_ok{ true }; + bool sform_scales_ok{ true }; constexpr float large_value_tolerance = 1e-3; // Numerical precision of sform is not very good if (itk::Math::abs(this->m_NiftiImage->dx - rotation.get_column(0).magnitude()) > large_value_tolerance) { @@ -2035,7 +2035,7 @@ NiftiImageIO::SetImageIOOrientationFromNIfTI(unsigned short dims, double spacing // Only orthonormal matricies have transpose as inverse const vnl_matrix_fixed candidate_identity = rotation * rotation.transpose(); - const bool is_orthonormal = candidate_identity.is_identity(1.0e-4); + const bool is_orthonormal = candidate_identity.is_identity(1.0e-4); return is_orthonormal; } @@ -2072,8 +2072,8 @@ NiftiImageIO::SetImageIOOrientationFromNIfTI(unsigned short dims, double spacing // extract rotation matrix const vnl_matrix_fixed sform_3x3 = sform_as_matrix.extract(3, 3, 0, 0); const vnl_matrix_fixed qform_3x3 = qform_as_matrix.extract(3, 3, 0, 0); - vnl_svd sform_svd(sform_3x3.as_ref()); - vnl_svd qform_svd(qform_3x3.as_ref()); + vnl_svd sform_svd(sform_3x3.as_ref()); + vnl_svd qform_svd(qform_3x3.as_ref()); // extract offset const vnl_vector sform_offset{ sform_as_matrix.get_column(3).extract(3, 0) }; @@ -2170,7 +2170,7 @@ NiftiImageIO::SetImageIOOrientationFromNIfTI(unsigned short dims, double spacing m_Origin[3] = this->m_NiftiImage->toffset * timingscale; } - const int max_defined_orientation_dims = (dims > 3) ? 3 : dims; + const int max_defined_orientation_dims = (dims > 3) ? 3 : dims; std::vector xDirection(dims, 0.0); for (int i = 0; i < max_defined_orientation_dims; ++i) { @@ -2219,7 +2219,7 @@ NiftiImageIO::getQFormCodeFromDictionary() const { // The qform_code should be set to either NIFTI_XFORM_UNKNOWN or NIFTI_XFORM_SCANNER_ANAT. const MetaDataDictionary & thisDic = this->GetMetaDataDictionary(); - std::string temp; + std::string temp; if (itk::ExposeMetaData(thisDic, "qform_code_name", temp)) { return str_xform2code(temp); @@ -2238,7 +2238,7 @@ NiftiImageIO::getSFormCodeFromDictionary() const // The sform code should be set to either NIFTI_XFORM_UNKNOWN, NIFTI_XFORM_ALIGNED_ANAT, NIFTI_XFORM_TALAIRACH or // NIFTI_XFORM_MNI_152. const MetaDataDictionary & thisDic = this->GetMetaDataDictionary(); - std::string temp; + std::string temp; if (itk::ExposeMetaData(thisDic, "sform_code_name", temp)) { return str_xform2code(temp); @@ -2271,7 +2271,7 @@ NiftiImageIO::SetNIfTIOrientationFromImageIO(unsigned short origdims, unsigned s // The type here must be a float, because that matches the signature // of the nifti_make_orthog_mat44() method below. using DirectionMatrixComponentType = float; - const int mindims(dims < 3 ? 3 : dims); + const int mindims(dims < 3 ? 3 : dims); std::vector dirx(mindims, 0.0f); { unsigned int i = 0; @@ -2321,7 +2321,7 @@ NiftiImageIO::SetNIfTIOrientationFromImageIO(unsigned short origdims, unsigned s // Check if matrix is orthogonal and issue a warning if it was // coerced to orthogonal. Use same epsilon as used in SetImageIOOrientationFromNIfTI const unsigned int matDim(this->GetDirection(0).size()); - vnl_matrix imageMat(matDim, matDim); + vnl_matrix imageMat(matDim, matDim); for (unsigned c = 0; c < matDim; ++c) { auto col = this->GetDirection(c); @@ -2339,7 +2339,7 @@ NiftiImageIO::SetNIfTIOrientationFromImageIO(unsigned short origdims, unsigned s // also issue a warning if original file had non-orthogonal matrix? { const MetaDataDictionary & thisDic = this->GetMetaDataDictionary(); - std::string temp; + std::string temp; if (itk::ExposeMetaData(thisDic, "nifti_sform_corrected", temp) && temp == "YES") { itkWarningMacro("Non-orthogonal direction matrix in original nifti file was non-orthogonal"); @@ -2422,7 +2422,7 @@ NiftiImageIO::Write(const void * buffer) const size_t buffer_size = numVoxels * numComponents // Number of components * this->m_NiftiImage->nbyper; - const auto nifti_buf = make_unique_for_overwrite(buffer_size); + const auto nifti_buf = make_unique_for_overwrite(buffer_size); const auto * const itkbuf = (const char *)buffer; // Data must be rearranged to meet nifti organzation. // nifti_layout[vec][t][z][y][x] = itk_layout[t][z][y][z][vec] diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest.h b/Modules/IO/NIFTI/test/itkNiftiImageIOTest.h index a6205d26fc7..feec9b8d30d 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest.h +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest.h @@ -69,11 +69,11 @@ MakeNiftiImage(const char * filename) { ImageDimension = ImageType::ImageDimension }; - const typename ImageType::SizeType size = { { 10, 10, 10 } }; - const typename ImageType::IndexType index{}; + const typename ImageType::SizeType size = { { 10, 10, 10 } }; + const typename ImageType::IndexType index{}; const typename ImageType::RegionType region(index, size); { - auto spacing = itk::MakeFilled(1.0); + auto spacing = itk::MakeFilled(1.0); const typename ImageType::Pointer img = itk::IOTestHelper::AllocateImageFromRegionAndSpacing(region, spacing); @@ -95,10 +95,10 @@ MakeNiftiImage(const char * filename) } { // Fill in left half - const typename ImageType::IndexType RPIindex = { { 0, 0, 0 } }; - const typename ImageType::SizeType RPIsize = { { 5, 10, 10 } }; + const typename ImageType::IndexType RPIindex = { { 0, 0, 0 } }; + const typename ImageType::SizeType RPIsize = { { 5, 10, 10 } }; const typename ImageType::RegionType RPIregion = typename ImageType::RegionType(RPIindex, RPIsize); - itk::ImageRegionIterator RPIiterator = itk::ImageRegionIterator(img, RPIregion); + itk::ImageRegionIterator RPIiterator = itk::ImageRegionIterator(img, RPIregion); while (!RPIiterator.IsAtEnd()) { RPIiterator.Set(RPIiterator.Get() + LEFT); @@ -106,10 +106,10 @@ MakeNiftiImage(const char * filename) } } { // Fill in anterior half - const typename ImageType::IndexType RPIindex = { { 0, 5, 0 } }; - const typename ImageType::SizeType RPIsize = { { 10, 5, 10 } }; + const typename ImageType::IndexType RPIindex = { { 0, 5, 0 } }; + const typename ImageType::SizeType RPIsize = { { 10, 5, 10 } }; const typename ImageType::RegionType RPIregion = typename ImageType::RegionType(RPIindex, RPIsize); - itk::ImageRegionIterator RPIiterator = itk::ImageRegionIterator(img, RPIregion); + itk::ImageRegionIterator RPIiterator = itk::ImageRegionIterator(img, RPIregion); while (!RPIiterator.IsAtEnd()) { RPIiterator.Set(RPIiterator.Get() + ANTERIOR); @@ -117,10 +117,10 @@ MakeNiftiImage(const char * filename) } } { // Fill in superior half - const typename ImageType::IndexType RPIindex = { { 0, 0, 5 } }; - const typename ImageType::SizeType RPIsize = { { 10, 10, 5 } }; + const typename ImageType::IndexType RPIindex = { { 0, 0, 5 } }; + const typename ImageType::SizeType RPIsize = { { 10, 10, 5 } }; const typename ImageType::RegionType RPIregion = typename ImageType::RegionType(RPIindex, RPIsize); - itk::ImageRegionIterator RPIiterator = itk::ImageRegionIterator(img, RPIregion); + itk::ImageRegionIterator RPIiterator = itk::ImageRegionIterator(img, RPIregion); while (!RPIiterator.IsAtEnd()) { RPIiterator.Set(RPIiterator.Get() + SUPERIOR); @@ -275,11 +275,11 @@ TestImageOfSymMats(const std::string & fname) // // swizzle up a random vector image. - const auto size = itk::MakeFilled(dimsize); - typename DtiImageType::IndexType index{}; + const auto size = itk::MakeFilled(dimsize); + typename DtiImageType::IndexType index{}; const typename DtiImageType::RegionType imageRegion{ index, size }; - const auto spacing = itk::MakeFilled(1.0); + const auto spacing = itk::MakeFilled(1.0); const typename DtiImageType::Pointer vi = itk::IOTestHelper::AllocateImageFromRegionAndSpacing(imageRegion, spacing); vi->SetDirection(myDirection); @@ -468,10 +468,10 @@ RGBTest(int argc, char * argv[]) } using RGBImageType = typename itk::Image; - typename RGBImageType::SizeType size; - typename RGBImageType::IndexType index; + typename RGBImageType::SizeType size; + typename RGBImageType::IndexType index; typename RGBImageType::SpacingType spacing; - typename RGBImageType::PointType origin; + typename RGBImageType::PointType origin; for (unsigned int i = 0; i < 3; ++i) { @@ -485,7 +485,7 @@ RGBTest(int argc, char * argv[]) imageRegion.SetIndex(index); const typename RGBImageType::Pointer im = itk::IOTestHelper::AllocateImageFromRegionAndSpacing(imageRegion, spacing); - vnl_random randgen(12345678); + vnl_random randgen(12345678); itk::ImageRegionIterator it(im, im->GetLargestPossibleRegion()); for (it.GoToBegin(); !it.IsAtEnd(); ++it) { @@ -497,7 +497,7 @@ RGBTest(int argc, char * argv[]) it.Set(pix); } typename RGBImageType::Pointer im2; - char * tmpImage = *++argv; + char * tmpImage = *++argv; try { itk::IOTestHelper::WriteImage(im, std::string(tmpImage)); @@ -508,7 +508,7 @@ RGBTest(int argc, char * argv[]) std::cout << "itkNiftiImageIOTest9" << std::endl << "Exception Object caught: " << std::endl << err << std::endl; return EXIT_FAILURE; } - int success(EXIT_SUCCESS); + int success(EXIT_SUCCESS); itk::ImageRegionIterator it2(im2, im2->GetLargestPossibleRegion()); for (it.GoToBegin(), it2.GoToBegin(); !it.IsAtEnd() && !it2.IsAtEnd(); ++it, ++it2) { diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest11.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest11.cxx index 772a5a70eb4..d1c22c32f75 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest11.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest11.cxx @@ -50,9 +50,9 @@ itkNiftiImageIOTest11(int argc, char * argv[]) size[2] = 1; constexpr ImageType::IndexType index{}; - const ImageType::RegionType imageRegion{ index, size }; + const ImageType::RegionType imageRegion{ index, size }; - auto spacing = itk::MakeFilled(1.0); + auto spacing = itk::MakeFilled(1.0); const ImageType::Pointer im = itk::IOTestHelper::AllocateImageFromRegionAndSpacing(imageRegion, spacing); const ImageType::DirectionType dir(CORDirCosines()); std::cout << "itkNiftiImageIOTest11" << std::endl; diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest12.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest12.cxx index 3ed91231967..01ea2d3feac 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest12.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest12.cxx @@ -32,10 +32,10 @@ itkNiftiImageIOTest12(int argc, char * argv[]) return EXIT_FAILURE; } constexpr unsigned int CmdLineTestDirPos = 1; - const std::string testdir{ argv[CmdLineTestDirPos] }; + const std::string testdir{ argv[CmdLineTestDirPos] }; itksys::SystemTools::ChangeDirectory(testdir); constexpr unsigned int CmdLineFilenamePos = 2; - const std::string imgfilename{ argv[CmdLineFilenamePos] }; + const std::string imgfilename{ argv[CmdLineFilenamePos] }; using ImageType = itk::VectorImage; @@ -102,7 +102,7 @@ itkNiftiImageIOTest12(int argc, char * argv[]) ITK_TEST_EXPECT_EQUAL(originalHash, readHash); constexpr ImageType::IndexType threeIndex = { { 3, 3, 3 } }; - ImageType::PointType origPhysLocationIndexThree; + ImageType::PointType origPhysLocationIndexThree; image->TransformIndexToPhysicalPoint(threeIndex, origPhysLocationIndexThree); ImageType::PointType readPhysLocationIndexThree; readImage->TransformIndexToPhysicalPoint(threeIndex, readPhysLocationIndexThree); diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest2.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest2.cxx index 80e8ee1f8e7..b635e7bec3e 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest2.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest2.cxx @@ -36,7 +36,7 @@ itkNiftiImageIOTest2(int argc, char * argv[]) char * arg1 = argv[1]; char * arg2 = argv[2]; char * prefix = argv[3]; - int test_success = 0; + int test_success = 0; using ImageType = itk::Image; using ImagePointer = ImageType::Pointer; @@ -51,7 +51,7 @@ itkNiftiImageIOTest2(int argc, char * argv[]) { using ImageReaderType = itk::ImageFileReader; const itk::NiftiImageIO::Pointer io = itk::NiftiImageIO::New(); - auto imageReader = ImageReaderType::New(); + auto imageReader = ImageReaderType::New(); imageReader->SetImageIO(io); imageReader->SetFileName(arg2); imageReader->Update(); diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest3.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest3.cxx index 82f0d59ad5d..c2aa2517a3e 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest3.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest3.cxx @@ -70,10 +70,10 @@ TestImageOfVectors(const std::string & fname, const std::string & intentCode = " std::cout << "======================== Initialized Direction" << std::endl; std::cout << myDirection << std::endl; - typename VectorImageType::IndexType index{}; - auto size = itk::MakeFilled(dimsize); + typename VectorImageType::IndexType index{}; + auto size = itk::MakeFilled(dimsize); const typename VectorImageType::RegionType imageRegion{ index, size }; - auto spacing = itk::MakeFilled(1.0); + auto spacing = itk::MakeFilled(1.0); const typename VectorImageType::Pointer vi = itk::IOTestHelper::AllocateImageFromRegionAndSpacing(imageRegion, spacing); @@ -178,7 +178,7 @@ TestImageOfVectors(const std::string & fname, const std::string & intentCode = " if (!intentCode.empty()) { const itk::MetaDataDictionary & dictionary = readback->GetMetaDataDictionary(); - std::string readIntentCode; + std::string readIntentCode; if (itk::ExposeMetaData(dictionary, "intent_code", readIntentCode)) { if (readIntentCode != intentCode) diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest4.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest4.cxx index 66b2f0f0b04..f39cb365f0e 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest4.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest4.cxx @@ -50,11 +50,11 @@ itkNiftiImageIOTest4(int argc, char * argv[]) } // - Test4ImageType::RegionType imageRegion; - Test4ImageType::SizeType size; - Test4ImageType::IndexType index; + Test4ImageType::RegionType imageRegion; + Test4ImageType::SizeType size; + Test4ImageType::IndexType index; Test4ImageType::SpacingType spacing; - constexpr unsigned int dimsize = 2; + constexpr unsigned int dimsize = 2; for (unsigned int i = 0; i < 3; ++i) { @@ -79,7 +79,7 @@ itkNiftiImageIOTest4(int argc, char * argv[]) using TransformType = itk::AffineTransform; using AxisType = itk::Vector; - auto transform = TransformType::New(); + auto transform = TransformType::New(); AxisType axis; axis[0] = 1.0; axis[1] = 0.0; diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx index b46766efb4e..bd28f790b42 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx @@ -26,7 +26,7 @@ SlopeInterceptTest() { // // fill out a nifti image and write it. - const char * filename = "SlopeIntercept.nii"; + const char * filename = "SlopeIntercept.nii"; nifti_image * niftiImage = nifti_simple_init_nim(); niftiImage->fname = (char *)malloc(strlen(filename) + 1); if (niftiImage->fname == nullptr) @@ -142,7 +142,7 @@ SlopeInterceptWriteTest() const char * filename = "SlopeIntercept.nii"; using OutputImageType = itk::Image; typename OutputImageType::RegionType region; - typename OutputImageType::IndexType start; + typename OutputImageType::IndexType start; start[0] = 0; start[1] = 0; start[2] = 0; @@ -167,7 +167,7 @@ SlopeInterceptWriteTest() itout.Set(static_cast(i)); } using WriterType = itk::ImageFileWriter; - auto writer = WriterType::New(); + auto writer = WriterType::New(); const itk::NiftiImageIO::Pointer niftiImageIO(itk::NiftiImageIO::New()); niftiImageIO->SetRescaleSlope(1.0 / 256.0); niftiImageIO->SetRescaleIntercept(-10.0); diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest6.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest6.cxx index 9e2ae45228b..f2ee04ea876 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest6.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest6.cxx @@ -33,10 +33,10 @@ itkNiftiImageIOTest6(int argc, char * argv[]) int success(EXIT_SUCCESS); using VectorImageType = itk::VectorImage; - VectorImageType::RegionType imageRegion; - VectorImageType::SizeType size; - VectorImageType::IndexType index; - VectorImageType::SpacingType spacing; + VectorImageType::RegionType imageRegion; + VectorImageType::SizeType size; + VectorImageType::IndexType index; + VectorImageType::SpacingType spacing; constexpr VectorImageType::VectorLengthType vecLength(4); for (unsigned int i = 0; i < 3; ++i) @@ -51,7 +51,7 @@ itkNiftiImageIOTest6(int argc, char * argv[]) itk::IOTestHelper::AllocateImageFromRegionAndSpacing(imageRegion, spacing, vecLength); itk::ImageRegionIterator it(vecImage, vecImage->GetLargestPossibleRegion()); - double val(0.0); + double val(0.0); for (it.GoToBegin(); !it.IsAtEnd(); ++it) { VectorImageType::PixelType p(vecLength); @@ -62,7 +62,7 @@ itkNiftiImageIOTest6(int argc, char * argv[]) } it.Set(p); } - const std::string testfname("vectorImage.nii.gz"); + const std::string testfname("vectorImage.nii.gz"); VectorImageType::Pointer readback; try { diff --git a/Modules/IO/NIFTI/test/itkNiftiLargeImageRegionReadTest.cxx b/Modules/IO/NIFTI/test/itkNiftiLargeImageRegionReadTest.cxx index 3099c5e62f9..b21ea86c68b 100644 --- a/Modules/IO/NIFTI/test/itkNiftiLargeImageRegionReadTest.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiLargeImageRegionReadTest.cxx @@ -49,7 +49,7 @@ itkNiftiLargeImageRegionReadTest(int argc, char * argv[]) // Create a large image constexpr ImageType::SizeType size = { { 1034, 1034, 1020 } }; - ImageType::RegionType region; + ImageType::RegionType region; region.SetSize(size); { diff --git a/Modules/IO/NIFTI/test/itkNiftiReadAnalyzeTest.cxx b/Modules/IO/NIFTI/test/itkNiftiReadAnalyzeTest.cxx index 6dcc42c93fd..1ffb3265a1a 100644 --- a/Modules/IO/NIFTI/test/itkNiftiReadAnalyzeTest.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiReadAnalyzeTest.cxx @@ -141,12 +141,12 @@ WriteFile(const std::string & name, const unsigned char * buf, size_t buflen) */ template typename TImage::Pointer -ReadImage(const std::string & fileName, +ReadImage(const std::string & fileName, itk::NiftiImageIOEnums::Analyze75Flavor analyze_mode = itk::NiftiImageIOEnums::Analyze75Flavor::AnalyzeSPM) { using ReaderType = itk::ImageFileReader; - auto reader = ReaderType::New(); + auto reader = ReaderType::New(); const typename itk::NiftiImageIO::Pointer imageIO = itk::NiftiImageIO::New(); { imageIO->SetLegacyAnalyze75Mode(analyze_mode); @@ -176,11 +176,11 @@ ReadImage(const std::string & fileName, int -itkNiftiAnalyzeContentsAndCoordinatesTest(char * argv[], - unsigned char hist_orient_code, - itk::AnatomicalOrientation expected_code, +itkNiftiAnalyzeContentsAndCoordinatesTest(char * argv[], + unsigned char hist_orient_code, + itk::AnatomicalOrientation expected_code, itk::NiftiImageIOEnums::Analyze75Flavor analyze_mode, - bool flip_x = false) + bool flip_x = false) { std::string hdrName(argv[1]); hdrName += "/littleEndian_"; @@ -230,7 +230,7 @@ itkNiftiAnalyzeContentsAndCoordinatesTest(char * return EXIT_FAILURE; } - const auto * fPtr = reinterpret_cast(LittleEndian_img); + const auto * fPtr = reinterpret_cast(LittleEndian_img); itk::ImageRegionConstIterator it(img, img->GetLargestPossibleRegion()); it.GoToBegin(); for (; !it.IsAtEnd(); ++it, ++fPtr) diff --git a/Modules/IO/NIFTI/test/itkNiftiReadWriteDirectionTest.cxx b/Modules/IO/NIFTI/test/itkNiftiReadWriteDirectionTest.cxx index 840f661e4fd..6669643b3ca 100644 --- a/Modules/IO/NIFTI/test/itkNiftiReadWriteDirectionTest.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiReadWriteDirectionTest.cxx @@ -37,7 +37,7 @@ ReadImage(const std::string & fileName, bool SFORM_Permissive) { using ReaderType = itk::ImageFileReader; - auto reader = ReaderType::New(); + auto reader = ReaderType::New(); const typename itk::NiftiImageIO::Pointer imageIO = itk::NiftiImageIO::New(); { imageIO->SetSFORM_Permissive(SFORM_Permissive); @@ -123,7 +123,7 @@ itkNiftiReadWriteDirectionTest(int argc, char * argv[]) } itk::MetaDataDictionary & dictionary = inputImage->GetMetaDataDictionary(); - std::string temp; + std::string temp; if (!itk::ExposeMetaData(dictionary, "ITK_sform_corrected", temp) || temp != "NO") { @@ -160,8 +160,8 @@ itkNiftiReadWriteDirectionTest(int argc, char * argv[]) } // Write image that originally had no sform direction representation into a file with both sform and qform - const std::string testOutputDir = argv[5]; - const std::string testFilename = testOutputDir + "/test_filled_sform.nii.gz"; + const std::string testOutputDir = argv[5]; + const std::string testFilename = testOutputDir + "/test_filled_sform.nii.gz"; const itk::ImageFileWriter::Pointer writer = itk::ImageFileWriter::New(); ITK_TRY_EXPECT_NO_EXCEPTION(itk::WriteImage(inputImageNoSform, testFilename)); @@ -169,9 +169,9 @@ itkNiftiReadWriteDirectionTest(int argc, char * argv[]) // This time it should read from the newly written "sform" code in the image, which should // be the same as reading from qform of the original image const TestImageType::Pointer reReadImage = itk::ReadImage(testFilename); - const auto reReadImageDirection = reReadImage->GetDirection(); - const auto mdd = reReadImage->GetMetaDataDictionary(); - std::string sformCodeFromNifti; + const auto reReadImageDirection = reReadImage->GetDirection(); + const auto mdd = reReadImage->GetMetaDataDictionary(); + std::string sformCodeFromNifti; const bool exposeSuccess = itk::ExposeMetaData(mdd, "sform_code_name", sformCodeFromNifti); if (!exposeSuccess || sformCodeFromNifti != "NIFTI_XFORM_SCANNER_ANAT") { diff --git a/Modules/IO/NIFTI/test/itkNiftiWriteCoerceOrthogonalDirectionTest.cxx b/Modules/IO/NIFTI/test/itkNiftiWriteCoerceOrthogonalDirectionTest.cxx index ee9fb24fb94..e96ebf426ea 100644 --- a/Modules/IO/NIFTI/test/itkNiftiWriteCoerceOrthogonalDirectionTest.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiWriteCoerceOrthogonalDirectionTest.cxx @@ -39,9 +39,9 @@ itkNiftiWriteCoerceOrthogonalDirectionTest(int argc, char * argv[]) using ImageType = itk::Image; constexpr ImageType::IndexType startIndex = { { 0, 0 } }; - constexpr ImageType::SizeType imageSize = { { 2, 2 } }; - const ImageType::RegionType region{ startIndex, imageSize }; - auto image1 = ImageType::New(); + constexpr ImageType::SizeType imageSize = { { 2, 2 } }; + const ImageType::RegionType region{ startIndex, imageSize }; + auto image1 = ImageType::New(); image1->SetRegions(region); image1->AllocateInitialized(); diff --git a/Modules/IO/NRRD/src/itkNrrdImageIO.cxx b/Modules/IO/NRRD/src/itkNrrdImageIO.cxx index 78f3eed062e..1204d4b5ab0 100644 --- a/Modules/IO/NRRD/src/itkNrrdImageIO.cxx +++ b/Modules/IO/NRRD/src/itkNrrdImageIO.cxx @@ -266,7 +266,7 @@ NrrdImageIO::ReadImageInformation() // image origin // meta data dictionary information - Nrrd * nrrd = nrrdNew(); + Nrrd * nrrd = nrrdNew(); NrrdIoState * nio = nrrdIoStateNew(); try @@ -341,9 +341,9 @@ NrrdImageIO::ReadImageInformation() // Set the number of image dimensions and bail if needed - unsigned int domainAxisIdx[NRRD_DIM_MAX]; + unsigned int domainAxisIdx[NRRD_DIM_MAX]; const unsigned int domainAxisNum = nrrdDomainAxesGet(nrrd, domainAxisIdx); - unsigned int rangeAxisIdx[NRRD_DIM_MAX]; + unsigned int rangeAxisIdx[NRRD_DIM_MAX]; const unsigned int rangeAxisNum = nrrdRangeAxesGet(nrrd, rangeAxisIdx); if (nrrd->spaceDim && nrrd->spaceDim != domainAxisNum) { @@ -365,7 +365,7 @@ NrrdImageIO::ReadImageInformation() else if (1 == rangeAxisNum) { this->SetNumberOfDimensions(nrrd->dim - 1); - const int kind = nrrd->axis[rangeAxisIdx[0]].kind; + const int kind = nrrd->axis[rangeAxisIdx[0]].kind; const size_t size = nrrd->axis[rangeAxisIdx[0]].size; // NOTE: it is the NRRD readers responsibility to make sure that // the size (#of components) associated with a specific kind is @@ -463,8 +463,8 @@ NrrdImageIO::ReadImageInformation() { const unsigned int naxi = domainAxisIdx[axii]; this->SetDimensions(axii, static_cast(nrrd->axis[naxi].size)); - double spacing; - double spaceDir[NRRD_SPACE_DIM_MAX]; + double spacing; + double spaceDir[NRRD_SPACE_DIM_MAX]; const int spacingStatus = nrrdSpacingCalculate(nrrd, naxi, &spacing, spaceDir); switch (spacingStatus) @@ -557,7 +557,7 @@ NrrdImageIO::ReadImageInformation() } else { - double spaceOrigin[NRRD_DIM_MAX]; + double spaceOrigin[NRRD_DIM_MAX]; const int originStatus = nrrdOriginCalculate(nrrd, domainAxisIdx, domainAxisNum, nrrdCenterCell, spaceOrigin); for (unsigned int saxi = 0; saxi < domainAxisNum; ++saxi) { @@ -587,7 +587,7 @@ NrrdImageIO::ReadImageInformation() const std::string classname(this->GetNameOfClass()); EncapsulateMetaData(thisDic, ITK_InputFilterName, classname); - char key[AIR_STRLEN_SMALL]; + char key[AIR_STRLEN_SMALL]; char * keyPtr = nullptr; char * valPtr = nullptr; for (unsigned int kvpi = 0; kvpi < nrrdKeyValueSize(nrrd); ++kvpi) @@ -608,7 +608,7 @@ NrrdImageIO::ReadImageInformation() for (unsigned int axii = 0; axii < domainAxisNum; ++axii) { const unsigned int axi = domainAxisIdx[axii]; - NrrdAxisInfo * naxis = nrrd->axis + axi; + NrrdAxisInfo * naxis = nrrd->axis + axi; if (AIR_EXISTS(naxis->thickness)) { snprintf(key, sizeof(key), "%s%s[%u]", KEY_PREFIX, airEnumStr(nrrdField, nrrdField_thicknesses), axii); @@ -718,7 +718,7 @@ void NrrdImageIO::Read(void * buffer) { Nrrd * nrrd = nrrdNew(); - bool nrrdAllocated; + bool nrrdAllocated; // NOTE the main reason the logic becomes complicated here is that // ITK has to be the one to allocate the data segment ("buffer") @@ -777,7 +777,7 @@ NrrdImageIO::Read(void * buffer) FloatingPointExceptions::SetEnabled(saveFPEState); #endif - unsigned int rangeAxisIdx[NRRD_DIM_MAX]; + unsigned int rangeAxisIdx[NRRD_DIM_MAX]; const unsigned int rangeAxisNum = nrrdRangeAxesGet(nrrd, rangeAxisIdx); if (rangeAxisNum > 1) @@ -790,7 +790,7 @@ NrrdImageIO::Read(void * buffer) // the range (dependent variable) is not on the fastest axis, // so we have to permute axes to put it there, since that is // how we set things up in ReadImageInformation() above - Nrrd * ntmp = nrrdNew(); + Nrrd * ntmp = nrrdNew(); unsigned int axmap[NRRD_DIM_MAX]; axmap[0] = rangeAxisIdx[0]; for (unsigned int axi = 1; axi < nrrd->dim; ++axi) @@ -891,15 +891,15 @@ _dump_metadata_to_stream(MetaDataDictionary & thisDic, const std::string & key, void NrrdImageIO::Write(const void * buffer) { - Nrrd * nrrd = nrrdNew(); + Nrrd * nrrd = nrrdNew(); NrrdIoState * nio = nrrdIoStateNew(); - int kind[NRRD_DIM_MAX]; - size_t size[NRRD_DIM_MAX]; + int kind[NRRD_DIM_MAX]; + size_t size[NRRD_DIM_MAX]; double spaceDir[NRRD_DIM_MAX][NRRD_SPACE_DIM_MAX]; double origin[NRRD_DIM_MAX]; - unsigned int baseDim; + unsigned int baseDim; const unsigned int spaceDim = this->GetNumberOfDimensions(); if (this->GetNumberOfComponents() > 1) { @@ -943,9 +943,9 @@ NrrdImageIO::Write(const void * buffer) { baseDim = 0; } - const unsigned int nrrdDim = baseDim + spaceDim; + const unsigned int nrrdDim = baseDim + spaceDim; std::vector spaceDirStd(spaceDim); - unsigned int axi; + unsigned int axi; for (axi = 0; axi < spaceDim; ++axi) { size[axi + baseDim] = this->GetDimensions(axi); @@ -973,7 +973,7 @@ NrrdImageIO::Write(const void * buffer) // Go through MetaDataDictionary and set either specific nrrd field // or a key/value pair - MetaDataDictionary & thisDic = this->GetMetaDataDictionary(); + MetaDataDictionary & thisDic = this->GetMetaDataDictionary(); const std::vector keys = thisDic.GetKeys(); for (const auto & key : keys) { @@ -1035,7 +1035,7 @@ NrrdImageIO::Write(const void * buffer) field = airEnumStr(nrrdField, nrrdField_space); if (!strncmp(keyField, field, strlen(field))) { - int space; + int space; std::string value; ExposeMetaData(thisDic, key, value); space = airEnumVal(nrrdSpace, value.c_str()); diff --git a/Modules/IO/NRRD/test/itkNrrdComplexImageReadTest.cxx b/Modules/IO/NRRD/test/itkNrrdComplexImageReadTest.cxx index ca6ce1c2ad4..6e7137183f8 100644 --- a/Modules/IO/NRRD/test/itkNrrdComplexImageReadTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdComplexImageReadTest.cxx @@ -62,7 +62,7 @@ itkNrrdComplexImageReadTest(int argc, char * argv[]) // volume is being read. I/O errors will generate more than tiny // differences near representational precision. - float err = 0; + float err = 0; myImage::IndexType coord; coord[0] = 0; coord[1] = 0; diff --git a/Modules/IO/NRRD/test/itkNrrdCovariantVectorImageReadTest.cxx b/Modules/IO/NRRD/test/itkNrrdCovariantVectorImageReadTest.cxx index ba335fa6d30..2239db711c4 100644 --- a/Modules/IO/NRRD/test/itkNrrdCovariantVectorImageReadTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdCovariantVectorImageReadTest.cxx @@ -57,7 +57,7 @@ itkNrrdCovariantVectorImageReadTest(int argc, char * argv[]) const myImage::Pointer image = reader->GetOutput(); // The test image has been constructed so that the vector coefficients // coincide with sample coordinates - double err = 0; + double err = 0; unsigned int idx = 0; for (unsigned int zi = 0; zi < 5; ++zi) { diff --git a/Modules/IO/NRRD/test/itkNrrdDiffusionTensor3DImageReadTest.cxx b/Modules/IO/NRRD/test/itkNrrdDiffusionTensor3DImageReadTest.cxx index ef382892499..a05b15ad02c 100644 --- a/Modules/IO/NRRD/test/itkNrrdDiffusionTensor3DImageReadTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdDiffusionTensor3DImageReadTest.cxx @@ -62,9 +62,9 @@ itkNrrdDiffusionTensor3DImageReadTest(int argc, char * argv[]) // volume is being read. I/O errors will generate more than tiny // differences near representational precision. - float err = 0; + float err = 0; myImage::IndexType coord{}; - PixelType sample = image->GetPixel(coord); + PixelType sample = image->GetPixel(coord); err += itk::Math::abs(sample(0, 0) - 4.0248222); err += itk::Math::abs(sample(0, 1) - -0.2367909); err += itk::Math::abs(sample(0, 2) - 0.23370844); diff --git a/Modules/IO/NRRD/test/itkNrrdImageIOTest.cxx b/Modules/IO/NRRD/test/itkNrrdImageIOTest.cxx index 3c8749dc553..9f530211e3c 100644 --- a/Modules/IO/NRRD/test/itkNrrdImageIOTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdImageIOTest.cxx @@ -44,7 +44,7 @@ itkNrrdImageIOTest(int argc, char * argv[]) inputFile = std::string("null"); } constexpr int sz = 10; - int ret = EXIT_SUCCESS; + int ret = EXIT_SUCCESS; ret += itkNrrdImageIOTestReadWriteTest(std::string(argv[1]), sz, inputFile); ret += itkNrrdImageIOTestReadWriteTest(std::string(argv[1]), sz, inputFile); diff --git a/Modules/IO/NRRD/test/itkNrrdImageIOTest.h b/Modules/IO/NRRD/test/itkNrrdImageIOTest.h index 7062e0a3974..37a9e36febe 100644 --- a/Modules/IO/NRRD/test/itkNrrdImageIOTest.h +++ b/Modules/IO/NRRD/test/itkNrrdImageIOTest.h @@ -36,9 +36,9 @@ itkNrrdImageIOTestGenerateRandomImage(unsigned int size) const typename itk::RandomImageSource::Pointer source = itk::RandomImageSource::New(); - typename ImageType::SizeType sz; + typename ImageType::SizeType sz; typename ImageType::SpacingType spacing; - typename ImageType::PointType origin; + typename ImageType::PointType origin; for (unsigned int i = 0; i < VImageDimension; ++i) { @@ -72,7 +72,7 @@ itkNrrdImageIOTestReadWriteTest(std::string fn, unsigned int size, std::string i ITK_TEST_EXPECT_TRUE(io->SupportsDimension(VImageDimension)); constexpr unsigned int NRRD_DIM_MAX = 16; // taken from NrrdIO.h which is not in the include path - const unsigned long dim = NRRD_DIM_MAX + 1; + const unsigned long dim = NRRD_DIM_MAX + 1; ITK_TEST_EXPECT_TRUE(!io->SupportsDimension(dim)); // Binary files have no image information to read diff --git a/Modules/IO/NRRD/test/itkNrrdMetaDataTest.cxx b/Modules/IO/NRRD/test/itkNrrdMetaDataTest.cxx index 120330b7a4e..de5fd92ae41 100644 --- a/Modules/IO/NRRD/test/itkNrrdMetaDataTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdMetaDataTest.cxx @@ -42,7 +42,7 @@ itkNrrdMetaDataTest(int argc, char * argv[]) // Image type using ImageType = itk::Image; // create dummy image - auto image1 = ImageType::New(); + auto image1 = ImageType::New(); constexpr ImageType::SizeType size = { { 2, 2, 2 } }; image1->SetRegions(size); image1->Allocate(); diff --git a/Modules/IO/NRRD/test/itkNrrdVectorImageReadTest.cxx b/Modules/IO/NRRD/test/itkNrrdVectorImageReadTest.cxx index 269b897831e..8db12d4bbba 100644 --- a/Modules/IO/NRRD/test/itkNrrdVectorImageReadTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdVectorImageReadTest.cxx @@ -59,7 +59,7 @@ itkNrrdVectorImageReadTest(int argc, char * argv[]) // The test image has been constructed so that the vector coefficients // coincide with sample coordinates - double err = 0; + double err = 0; unsigned int idx = 0; for (unsigned int zi = 0; zi < 5; ++zi) { diff --git a/Modules/IO/PNG/src/itkPNGImageIO.cxx b/Modules/IO/PNG/src/itkPNGImageIO.cxx index a5219e8fe64..ab069ad1d5f 100644 --- a/Modules/IO/PNG/src/itkPNGImageIO.cxx +++ b/Modules/IO/PNG/src/itkPNGImageIO.cxx @@ -75,7 +75,7 @@ PNGImageIO::CanReadFile(const char * file) return false; } unsigned char header[8]; - const size_t temp = fread(header, 1, 8, pngfp.m_FilePointer); + const size_t temp = fread(header, 1, 8, pngfp.m_FilePointer); if (temp != 8) { return false; @@ -119,14 +119,14 @@ PNGImageIO::Read(void * buffer) itkDebugMacro("Read: file dimensions = " << this->GetNumberOfDimensions()); // use this class so return will call close const PNGFileWrapper pngfp(this->GetFileName(), "rb"); - FILE * fp = pngfp.m_FilePointer; + FILE * fp = pngfp.m_FilePointer; if (!fp) { itkExceptionMacro("PNGImageIO could not open file: " << this->GetFileName() << " for reading." << std::endl << "Reason: " << itksys::SystemTools::GetLastSystemError()); } unsigned char header[8]; - const size_t temp = fread(header, 1, 8, fp); + const size_t temp = fread(header, 1, 8, fp); if (temp != 8) { itkExceptionMacro("PNGImageIO failed to read header for file: " << this->GetFileName() << std::endl @@ -172,11 +172,11 @@ PNGImageIO::Read(void * buffer) png_uint_32 width; png_uint_32 height; - int bitDepth; - int colorType; - int interlaceType; - int compression_type; - int filter_method; + int bitDepth; + int colorType; + int interlaceType; + int compression_type; + int filter_method; png_get_IHDR( png_ptr, info_ptr, &width, &height, &bitDepth, &colorType, &interlaceType, &compression_type, &filter_method); @@ -234,8 +234,8 @@ PNGImageIO::Read(void * buffer) // update the info now that we have defined the filters png_read_update_info(png_ptr, info_ptr); - auto rowbytes = static_cast(png_get_rowbytes(png_ptr, info_ptr)); - auto * tempImage = static_cast(buffer); + auto rowbytes = static_cast(png_get_rowbytes(png_ptr, info_ptr)); + auto * tempImage = static_cast(buffer); const auto row_pointers = make_unique_for_overwrite(height); for (unsigned int ui = 0; ui < height; ++ui) { @@ -315,13 +315,13 @@ PNGImageIO::ReadImageInformation() // use this class so return will call close const PNGFileWrapper pngfp(m_FileName.c_str(), "rb"); - FILE * fp = pngfp.m_FilePointer; + FILE * fp = pngfp.m_FilePointer; if (!fp) { return; } unsigned char header[8]; - const size_t temp = fread(header, 1, 8, fp); + const size_t temp = fread(header, 1, 8, fp); if (temp != 8) { itkExceptionMacro("PNGImageIO failed to read header for file: " << this->GetFileName() << std::endl @@ -367,11 +367,11 @@ PNGImageIO::ReadImageInformation() png_uint_32 width; png_uint_32 height; - int bitDepth; - int colorType; - int interlaceType; - int compression_type; - int filter_method; + int bitDepth; + int colorType; + int interlaceType; + int compression_type; + int filter_method; png_get_IHDR( png_ptr, info_ptr, &width, &height, &bitDepth, &colorType, &interlaceType, &compression_type, &filter_method); @@ -390,7 +390,7 @@ PNGImageIO::ReadImageInformation() m_IsReadAsScalarPlusPalette = true; png_colorp palette; - int num_entry; + int num_entry; png_get_PLTE(png_ptr, info_ptr, &palette, &num_entry); if (num_entry < 0) @@ -510,7 +510,7 @@ PNGImageIO::WriteSlice(const std::string & fileName, const void * const buffer) { // use this class so return will call close const PNGFileWrapper pngfp(fileName.c_str(), "wb"); - FILE * fp = pngfp.m_FilePointer; + FILE * fp = pngfp.m_FilePointer; if (!fp) { @@ -572,7 +572,7 @@ PNGImageIO::WriteSlice(const std::string & fileName, const void * const buffer) << "Reason: " << itksys::SystemTools::GetLastSystemError()); } - int colorType; + int colorType; const unsigned int numComp = this->GetNumberOfComponents(); switch (numComp) { @@ -598,10 +598,10 @@ PNGImageIO::WriteSlice(const std::string & fileName, const void * const buffer) } const png_uint_32 width = this->GetDimensions(0); - const double colSpacing = m_Spacing[0]; + const double colSpacing = m_Spacing[0]; const png_uint_32 height = (m_NumberOfDimensions > 1) ? this->GetDimensions(1) : 1; - const double rowSpacing = (m_NumberOfDimensions > 1) ? m_Spacing[1] : 1; + const double rowSpacing = (m_NumberOfDimensions > 1) ? m_Spacing[1] : 1; png_set_IHDR(png_ptr, info_ptr, @@ -616,10 +616,10 @@ PNGImageIO::WriteSlice(const std::string & fileName, const void * const buffer) // PNG_INTERLACE_ADAM7 png_color * palette = nullptr; - bool paletteAllocated = false; + bool paletteAllocated = false; if (colorType == PNG_COLOR_TYPE_PALETTE) { - auto inputPaletteLength = static_cast(m_ColorPalette.size()); + auto inputPaletteLength = static_cast(m_ColorPalette.size()); unsigned int PNGPaletteLength = inputPaletteLength; // discard colors exceeding PNG max number @@ -681,7 +681,7 @@ PNGImageIO::WriteSlice(const std::string & fileName, const void * const buffer) const auto row_pointers = make_unique_for_overwrite(height); { - const int rowInc = width * numComp * bitDepth / 8; + const int rowInc = width * numComp * bitDepth / 8; const volatile unsigned char * outPtr = ((const unsigned char *)buffer); for (unsigned int ui = 0; ui < height; ++ui) { diff --git a/Modules/IO/PNG/test/itkPNGImageIOTest.cxx b/Modules/IO/PNG/test/itkPNGImageIOTest.cxx index 70b5fb1666c..8f1af30238a 100644 --- a/Modules/IO/PNG/test/itkPNGImageIOTest.cxx +++ b/Modules/IO/PNG/test/itkPNGImageIOTest.cxx @@ -170,9 +170,9 @@ itkPNGImageIOTest(int argc, char * argv[]) auto volume = ImageType3D::New(); - auto size3D = ImageType3D::SizeType::Filled(10); + auto size3D = ImageType3D::SizeType::Filled(10); constexpr ImageType3D::IndexType start3D{}; - ImageType3D::RegionType region3D{ start3D, size3D }; + ImageType3D::RegionType region3D{ start3D, size3D }; volume->SetRegions(region3D); volume->Allocate(); @@ -212,9 +212,9 @@ itkPNGImageIOTest(int argc, char * argv[]) // auto image = ImageType2D::New(); - auto size2D = ImageType2D::SizeType::Filled(10); + auto size2D = ImageType2D::SizeType::Filled(10); constexpr ImageType2D::IndexType start2D{}; - ImageType2D::RegionType region2D{ start2D, size2D }; + ImageType2D::RegionType region2D{ start2D, size2D }; image->SetRegions(region2D); image->Allocate(); @@ -253,9 +253,9 @@ itkPNGImageIOTest(int argc, char * argv[]) // auto line = ImageType1D::New(); - auto size1D = ImageType1D::SizeType::Filled(10); + auto size1D = ImageType1D::SizeType::Filled(10); constexpr ImageType1D::IndexType start1D{}; - const ImageType1D::RegionType region1D{ start1D, size1D }; + const ImageType1D::RegionType region1D{ start1D, size1D }; line->SetRegions(region1D); line->Allocate(); diff --git a/Modules/IO/PNG/test/itkPNGImageIOTest3.cxx b/Modules/IO/PNG/test/itkPNGImageIOTest3.cxx index 50bceabca08..817cac4a819 100644 --- a/Modules/IO/PNG/test/itkPNGImageIOTest3.cxx +++ b/Modules/IO/PNG/test/itkPNGImageIOTest3.cxx @@ -41,7 +41,7 @@ itkPNGImageIOTest3(int argc, char * argv[]) // Read the input image const itk::PNGImageIO::Pointer io = itk::PNGImageIO::New(); - auto reader = ReaderType::New(); + auto reader = ReaderType::New(); reader->SetFileName(argv[1]); reader->SetImageIO(io); diff --git a/Modules/IO/PNG/test/itkPNGImageIOTestPalette.cxx b/Modules/IO/PNG/test/itkPNGImageIOTestPalette.cxx index cf4c3d62c12..66720721fa9 100644 --- a/Modules/IO/PNG/test/itkPNGImageIOTestPalette.cxx +++ b/Modules/IO/PNG/test/itkPNGImageIOTestPalette.cxx @@ -215,7 +215,7 @@ itkPNGImageIOTestPalette(int argc, char * argv[]) return EXIT_FAILURE; } { - bool palette_equal = true; + bool palette_equal = true; size_t i = 0; for (; i < palette_written.size(); ++i) { diff --git a/Modules/IO/PhilipsREC/include/itkPhilipsPAR.h b/Modules/IO/PhilipsREC/include/itkPhilipsPAR.h index 8653dd0dc91..9e1e6d09ff8 100644 --- a/Modules/IO/PhilipsREC/include/itkPhilipsPAR.h +++ b/Modules/IO/PhilipsREC/include/itkPhilipsPAR.h @@ -82,10 +82,10 @@ struct par_parameter // par_parameter char exam_time[PAR_DEFAULT_STRING_LENGTH]; // Examination // date/time char series_type[PAR_DEFAULT_STRING_LENGTH]; // Series Type - int scno; // Acquisition nr - int recno; // Reconstruction nr - int scan_duration; // Scan Duration [sec] - int cardiac_phases; // Max. number of + int scno; // Acquisition nr + int recno; // Reconstruction nr + int scan_duration; // Scan Duration [sec] + int cardiac_phases; // Max. number of // cardiac phases float trigger_times[PAR_DEFAULT_TRIGGER_TIMES_SIZE]; // trigger_time // (float) @@ -106,8 +106,8 @@ struct par_parameter // par_parameter // or 16 bits] char technique[PAR_DEFAULT_STRING_LENGTH]; // Technique char scan_mode[PAR_DEFAULT_STRING_LENGTH]; // Scan mode - int num_averages; // Number of averages - int scan_resolution[2]; // Scan resolution + int num_averages; // Number of averages + int scan_resolution[2]; // Scan resolution // (x, y) int scan_percent; // Scan percentage int dim[3]; // Recon resolution @@ -142,9 +142,9 @@ struct par_parameter // par_parameter // <0=no 1=yes> ? int presaturation; // Presaturation // <0=no 1=yes> ? - int cardiac_freq; // Cardiac frequency - int min_rr_int; // Min. RR interval - int max_rr_int; // Max. RR interval + int cardiac_freq; // Cardiac frequency + int min_rr_int; // Min. RR interval + int max_rr_int; // Max. RR interval float phase_encode_vel[3]; // Phase encoding // velocity [cm/sec] int mtc; // MTC @@ -279,9 +279,9 @@ class ITKIOPhilipsREC_EXPORT PhilipsPAR : public LightProcessObject using PARDiffusionValuesContainer = VectorContainer; using PARBValuesContainer = VectorContainer; bool - GetDiffusionGradientOrientationAndBValues(std::string parFile, + GetDiffusionGradientOrientationAndBValues(std::string parFile, PARDiffusionValuesContainer * gradientValues, - PARBValuesContainer * bValues); + PARBValuesContainer * bValues); // Returns a vector of ASL label types for the PAR file "parFile". using PARLabelTypesASLContainer = VectorContainer; diff --git a/Modules/IO/PhilipsREC/include/itkPhilipsRECImageIO.h b/Modules/IO/PhilipsREC/include/itkPhilipsRECImageIO.h index e8bb8416bdb..f5430d48de1 100644 --- a/Modules/IO/PhilipsREC/include/itkPhilipsRECImageIO.h +++ b/Modules/IO/PhilipsREC/include/itkPhilipsRECImageIO.h @@ -159,7 +159,7 @@ class ITKIOPhilipsREC_EXPORT PhilipsRECImageIO : public ImageIOBase GetSliceIndex(IndexValueType index) const; SliceIndexType * m_SliceIndex{}; - IOByteOrderEnum m_MachineByteOrder{}; + IOByteOrderEnum m_MachineByteOrder{}; }; } // end namespace itk diff --git a/Modules/IO/PhilipsREC/src/itkPhilipsPAR.cxx b/Modules/IO/PhilipsREC/src/itkPhilipsPAR.cxx index 4addd37a7ee..cca635fa608 100644 --- a/Modules/IO/PhilipsREC/src/itkPhilipsPAR.cxx +++ b/Modules/IO/PhilipsREC/src/itkPhilipsPAR.cxx @@ -69,29 +69,29 @@ namespace itk */ struct image_info_defV3 { - int problemreading; - int slice; - int echo; - int dynamic; - int cardiac; - int image_type_mr; - int scan_sequence; - int index; + int problemreading; + int slice; + int echo; + int dynamic; + int cardiac; + int image_type_mr; + int scan_sequence; + int index; float rescale_int; float rescale_slope; float scale_slope; - int window_center; - int window_width; + int window_center; + int window_width; float angAP; float angFH; float angRL; float offAP; float offFH; float offRL; - int display_orientation; - int slice_orientation; - int fmri_status_indication; - int image_type_ed_es; + int display_orientation; + int slice_orientation; + int fmri_status_indication; + int image_type_ed_es; float spacingx; float spacingy; float echo_time; @@ -155,23 +155,23 @@ Version 4.2 */ struct image_info_defV4 { - int problemreading; - int slice; - int echo; - int dynamic; - int cardiac; - int image_type_mr; - int scan_sequence; - int index; - int image_bits; - int scan_percent; - int recon_dimx; - int recon_dimy; + int problemreading; + int slice; + int echo; + int dynamic; + int cardiac; + int image_type_mr; + int scan_sequence; + int index; + int image_bits; + int scan_percent; + int recon_dimx; + int recon_dimy; float rescale_int; float rescale_slope; float scale_slope; - int window_center; - int window_width; + int window_center; + int window_width; float angAP; float angFH; float angRL; @@ -180,27 +180,27 @@ struct image_info_defV4 float offRL; float slice_thick; float slice_gap; - int display_orientation; - int slice_orientation; - int fmri_status_indication; - int image_type_ed_es; + int display_orientation; + int slice_orientation; + int fmri_status_indication; + int image_type_ed_es; float spacingx; float spacingy; float echo_time; float dyn_scan_begin_time; float trigger_time; float diffusion_b_factor; - int num_averages; + int num_averages; float image_flip_angle; - int cardiac_freq; - int min_rr_int; - int max_rr_int; - int turbo_factor; + int cardiac_freq; + int min_rr_int; + int max_rr_int; + int turbo_factor; float inversion_delay; // Version 4.1 added diffusion gradient information - int diffusion_b_value_number; - int gradient_orientation_number; - int contrast_type; + int diffusion_b_value_number; + int gradient_orientation_number; + int contrast_type; float diffusion_ap; float diffusion_fh; float diffusion_rl; @@ -212,7 +212,7 @@ struct image_info_defV3 GetImageInformationDefinitionV3(std::string file, int lineNum, PhilipsPAR * philipsPARClass) { struct image_info_defV3 tempInfo{}; - std::string currentLine = ""; + std::string currentLine = ""; if (lineNum < 89) { @@ -252,7 +252,7 @@ struct image_info_defV4 GetImageInformationDefinitionV4(std::string file, int lineNum, PhilipsPAR * philipsPARClass) { struct image_info_defV4 tempInfo{}; - std::string currentLine = ""; + std::string currentLine = ""; if (lineNum < 92) { @@ -297,7 +297,7 @@ struct image_info_defV4 GetImageInformationDefinitionV41(std::string file, int lineNum, PhilipsPAR * philipsPARClass) { struct image_info_defV4 tempInfo{}; - std::string currentLine = ""; + std::string currentLine = ""; if (lineNum < 99) { @@ -345,7 +345,7 @@ struct image_info_defV4 GetImageInformationDefinitionV42(std::string file, int lineNum, PhilipsPAR * philipsPARClass) { struct image_info_defV4 tempInfo{}; - std::string currentLine = ""; + std::string currentLine = ""; if (lineNum < 101) { @@ -402,7 +402,7 @@ std::string PhilipsPAR::GetLineNumber(std::string file, int lineNum) { std::string line = ""; - char readFileBuffer[1024] = ""; + char readFileBuffer[1024] = ""; if (lineNum <= 0) { @@ -487,9 +487,9 @@ PhilipsPAR::GetPARVersion(std::string parFile) std::string PhilipsPAR::GetGeneralInfoString(std::string file, int lineNum) { - std::string currentLine = ""; + std::string currentLine = ""; std::string::size_type index; - std::string outString = ""; + std::string outString = ""; if ((lineNum < 12) || (lineNum > 51)) { @@ -722,9 +722,9 @@ PhilipsPAR::ReadPAR(std::string parFile, struct par_parameter * pPar) // Also get echo times and trigger_times. if (pPar->slice > 1) { - int lineIncrement = 89; - int echoIndex = 0; - int cardiacIndex = 0; + int lineIncrement = 89; + int echoIndex = 0; + int cardiacIndex = 0; struct image_info_defV3 tempInfo1 = GetImageInformationDefinitionV3(parFile, 90, this); if (tempInfo1.problemreading) { @@ -924,9 +924,9 @@ PhilipsPAR::ReadPAR(std::string parFile, struct par_parameter * pPar) // Only 1 slice, but how many repetitions of that slice? else { - int lineIncrement = 89; - int echoIndex = 0; - int cardiacIndex = 0; + int lineIncrement = 89; + int echoIndex = 0; + int cardiacIndex = 0; const int slice = tempInfo.slice; const int firstEchoNumber = echoNumber; const int firstCardiacPhase = cardiacPhase; @@ -1221,9 +1221,9 @@ PhilipsPAR::ReadPAR(std::string parFile, struct par_parameter * pPar) // Also get echo times. if (pPar->slice > 1) { - int lineIncrement = 92; - int echoIndex = 0; - int cardiacIndex = 0; + int lineIncrement = 92; + int echoIndex = 0; + int cardiacIndex = 0; struct image_info_defV4 tempInfo1; switch (pPar->ResToolsVersion) { @@ -1455,9 +1455,9 @@ PhilipsPAR::ReadPAR(std::string parFile, struct par_parameter * pPar) // Only 1 slice, but how many repetitions of that slice? else { - int lineIncrement = 92; - int echoIndex = 0; - int cardiacIndex = 0; + int lineIncrement = 92; + int echoIndex = 0; + int cardiacIndex = 0; const int slice = tempInfo.slice; const int firstEchoNumber = echoNumber; const int firstCardiacPhase = cardiacPhase; @@ -1626,7 +1626,7 @@ PhilipsPAR::PARSliceIndexImageTypeVector PhilipsPAR::GetRECSliceIndexImageTypes(std::string parFile) { PhilipsPAR::PARSliceIndexImageTypeVector recSliceIndexImageTypes; - int ResToolsVersion; + int ResToolsVersion; // Check version of PAR file. ResToolsVersion = this->GetPARVersion(parFile); @@ -1639,9 +1639,9 @@ PhilipsPAR::GetRECSliceIndexImageTypes(std::string parFile) { case RESEARCH_IMAGE_EXPORT_TOOL_V3: { - struct image_info_defV3 tempInfo; + struct image_info_defV3 tempInfo; PhilipsPAR::PARSliceIndexImageType sliceAndType; - int lineIncrement = 89; + int lineIncrement = 89; tempInfo = GetImageInformationDefinitionV3(parFile, lineIncrement, this); while (!tempInfo.problemreading && tempInfo.slice) { @@ -1655,9 +1655,9 @@ PhilipsPAR::GetRECSliceIndexImageTypes(std::string parFile) break; case RESEARCH_IMAGE_EXPORT_TOOL_V4: { - struct image_info_defV4 tempInfo; + struct image_info_defV4 tempInfo; PhilipsPAR::PARSliceIndexImageType sliceAndType; - int lineIncrement = 92; + int lineIncrement = 92; tempInfo = GetImageInformationDefinitionV4(parFile, lineIncrement, this); while (!tempInfo.problemreading && tempInfo.slice) { @@ -1671,9 +1671,9 @@ PhilipsPAR::GetRECSliceIndexImageTypes(std::string parFile) break; case RESEARCH_IMAGE_EXPORT_TOOL_V4_1: { - struct image_info_defV4 tempInfo; + struct image_info_defV4 tempInfo; PhilipsPAR::PARSliceIndexImageType sliceAndType; - int lineIncrement = 99; + int lineIncrement = 99; tempInfo = GetImageInformationDefinitionV41(parFile, lineIncrement, this); while (!tempInfo.problemreading && tempInfo.slice) { @@ -1687,9 +1687,9 @@ PhilipsPAR::GetRECSliceIndexImageTypes(std::string parFile) break; case RESEARCH_IMAGE_EXPORT_TOOL_V4_2: { - struct image_info_defV4 tempInfo; + struct image_info_defV4 tempInfo; PhilipsPAR::PARSliceIndexImageType sliceAndType; - int lineIncrement = 101; + int lineIncrement = 101; tempInfo = GetImageInformationDefinitionV42(parFile, lineIncrement, this); while (!tempInfo.problemreading && tempInfo.slice) { @@ -1709,7 +1709,7 @@ PhilipsPAR::PARSliceIndexScanSequenceVector PhilipsPAR::GetRECSliceIndexScanningSequence(std::string parFile) { PhilipsPAR::PARSliceIndexScanSequenceVector recSliceIndexScanSequence; - int ResToolsVersion; + int ResToolsVersion; // Check version of PAR file. ResToolsVersion = this->GetPARVersion(parFile); @@ -1722,9 +1722,9 @@ PhilipsPAR::GetRECSliceIndexScanningSequence(std::string parFile) { case RESEARCH_IMAGE_EXPORT_TOOL_V3: { - struct image_info_defV3 tempInfo; + struct image_info_defV3 tempInfo; PhilipsPAR::PARSliceIndexScanSequence sliceAndSequence; - int lineIncrement = 89; + int lineIncrement = 89; tempInfo = GetImageInformationDefinitionV3(parFile, lineIncrement, this); while (!tempInfo.problemreading && tempInfo.slice) { @@ -1738,9 +1738,9 @@ PhilipsPAR::GetRECSliceIndexScanningSequence(std::string parFile) break; case RESEARCH_IMAGE_EXPORT_TOOL_V4: { - struct image_info_defV4 tempInfo; + struct image_info_defV4 tempInfo; PhilipsPAR::PARSliceIndexScanSequence sliceAndSequence; - int lineIncrement = 92; + int lineIncrement = 92; tempInfo = GetImageInformationDefinitionV4(parFile, lineIncrement, this); while (!tempInfo.problemreading && tempInfo.slice) { @@ -1754,9 +1754,9 @@ PhilipsPAR::GetRECSliceIndexScanningSequence(std::string parFile) break; case RESEARCH_IMAGE_EXPORT_TOOL_V4_1: { - struct image_info_defV4 tempInfo; + struct image_info_defV4 tempInfo; PhilipsPAR::PARSliceIndexScanSequence sliceAndSequence; - int lineIncrement = 99; + int lineIncrement = 99; tempInfo = GetImageInformationDefinitionV41(parFile, lineIncrement, this); while (!tempInfo.problemreading && tempInfo.slice) { @@ -1770,9 +1770,9 @@ PhilipsPAR::GetRECSliceIndexScanningSequence(std::string parFile) break; case RESEARCH_IMAGE_EXPORT_TOOL_V4_2: { - struct image_info_defV4 tempInfo; + struct image_info_defV4 tempInfo; PhilipsPAR::PARSliceIndexScanSequence sliceAndSequence; - int lineIncrement = 101; + int lineIncrement = 101; tempInfo = GetImageInformationDefinitionV42(parFile, lineIncrement, this); while (!tempInfo.problemreading && tempInfo.slice) { @@ -1792,7 +1792,7 @@ PhilipsPAR::PARImageTypeScanSequenceVector PhilipsPAR::GetImageTypesScanningSequence(std::string parFile) { PhilipsPAR::PARImageTypeScanSequenceVector recImageTypesScanSequence; - struct par_parameter parParam; + struct par_parameter parParam; // Read the PAR file. try @@ -1811,8 +1811,8 @@ PhilipsPAR::GetImageTypesScanningSequence(std::string parFile) for (int scanIndex = 0; scanIndex < parParam.num_scanning_sequences; ++scanIndex) { PhilipsPAR::PARImageTypeScanSequence imageTypeAndSequence; - int lineIncrement = 89; - int imageType[PAR_DEFAULT_IMAGE_TYPES_SIZE] = { -1, -1, -1, -1, -1, -1, -1, -1 }; + int lineIncrement = 89; + int imageType[PAR_DEFAULT_IMAGE_TYPES_SIZE] = { -1, -1, -1, -1, -1, -1, -1, -1 }; struct image_info_defV3 tempInfo = GetImageInformationDefinitionV3(parFile, lineIncrement, this); while (!tempInfo.problemreading && tempInfo.slice) { @@ -1841,8 +1841,8 @@ PhilipsPAR::GetImageTypesScanningSequence(std::string parFile) for (int scanIndex = 0; scanIndex < parParam.num_scanning_sequences; ++scanIndex) { PhilipsPAR::PARImageTypeScanSequence imageTypeAndSequence; - int lineIncrement = 92; - int imageType[PAR_DEFAULT_IMAGE_TYPES_SIZE] = { -1, -1, -1, -1, -1, -1, -1, -1 }; + int lineIncrement = 92; + int imageType[PAR_DEFAULT_IMAGE_TYPES_SIZE] = { -1, -1, -1, -1, -1, -1, -1, -1 }; struct image_info_defV4 tempInfo = GetImageInformationDefinitionV4(parFile, lineIncrement, this); while (!tempInfo.problemreading && tempInfo.slice) { @@ -1871,8 +1871,8 @@ PhilipsPAR::GetImageTypesScanningSequence(std::string parFile) for (int scanIndex = 0; scanIndex < parParam.num_scanning_sequences; ++scanIndex) { PhilipsPAR::PARImageTypeScanSequence imageTypeAndSequence; - int lineIncrement = 99; - int imageType[PAR_DEFAULT_IMAGE_TYPES_SIZE] = { -1, -1, -1, -1, -1, -1, -1, -1 }; + int lineIncrement = 99; + int imageType[PAR_DEFAULT_IMAGE_TYPES_SIZE] = { -1, -1, -1, -1, -1, -1, -1, -1 }; struct image_info_defV4 tempInfo = GetImageInformationDefinitionV41(parFile, lineIncrement, this); while (!tempInfo.problemreading && tempInfo.slice) { @@ -1901,8 +1901,8 @@ PhilipsPAR::GetImageTypesScanningSequence(std::string parFile) for (int scanIndex = 0; scanIndex < parParam.num_scanning_sequences; ++scanIndex) { PhilipsPAR::PARImageTypeScanSequence imageTypeAndSequence; - int lineIncrement = 101; - int imageType[PAR_DEFAULT_IMAGE_TYPES_SIZE] = { -1, -1, -1, -1, -1, -1, -1, -1 }; + int lineIncrement = 101; + int imageType[PAR_DEFAULT_IMAGE_TYPES_SIZE] = { -1, -1, -1, -1, -1, -1, -1, -1 }; struct image_info_defV4 tempInfo = GetImageInformationDefinitionV42(parFile, lineIncrement, this); while (!tempInfo.problemreading && tempInfo.slice) { @@ -1931,9 +1931,9 @@ PhilipsPAR::GetImageTypesScanningSequence(std::string parFile) } bool -PhilipsPAR::GetRECRescaleValues(std::string parFile, +PhilipsPAR::GetRECRescaleValues(std::string parFile, PhilipsPAR::PARRescaleValuesContainer * rescaleValues, - int scan_sequence) + int scan_sequence) { rescaleValues->clear(); // Must match size of image_types @@ -1956,9 +1956,9 @@ PhilipsPAR::GetRECRescaleValues(std::string parFile, case RESEARCH_IMAGE_EXPORT_TOOL_V3: { PhilipsPAR::PARRescaleValues rescale; - int imageType[PAR_DEFAULT_IMAGE_TYPES_SIZE] = { -1, -1, -1, -1, -1, -1, -1, -1 }; - int lineIncrement = 89; - struct image_info_defV3 tempInfo = GetImageInformationDefinitionV3(parFile, lineIncrement, this); + int imageType[PAR_DEFAULT_IMAGE_TYPES_SIZE] = { -1, -1, -1, -1, -1, -1, -1, -1 }; + int lineIncrement = 89; + struct image_info_defV3 tempInfo = GetImageInformationDefinitionV3(parFile, lineIncrement, this); while (!tempInfo.problemreading && tempInfo.slice) { if ((*(imageType + tempInfo.image_type_mr) < 0) && (tempInfo.scan_sequence == scan_sequence)) @@ -1977,9 +1977,9 @@ PhilipsPAR::GetRECRescaleValues(std::string parFile, case RESEARCH_IMAGE_EXPORT_TOOL_V4: { PhilipsPAR::PARRescaleValues rescale; - int imageType[PAR_DEFAULT_IMAGE_TYPES_SIZE] = { -1, -1, -1, -1, -1, -1, -1, -1 }; - int lineIncrement = 92; - struct image_info_defV4 tempInfo = GetImageInformationDefinitionV4(parFile, lineIncrement, this); + int imageType[PAR_DEFAULT_IMAGE_TYPES_SIZE] = { -1, -1, -1, -1, -1, -1, -1, -1 }; + int lineIncrement = 92; + struct image_info_defV4 tempInfo = GetImageInformationDefinitionV4(parFile, lineIncrement, this); while (!tempInfo.problemreading && tempInfo.slice) { if ((*(imageType + tempInfo.image_type_mr) < 0) && (tempInfo.scan_sequence == scan_sequence)) @@ -1998,9 +1998,9 @@ PhilipsPAR::GetRECRescaleValues(std::string parFile, case RESEARCH_IMAGE_EXPORT_TOOL_V4_1: { PhilipsPAR::PARRescaleValues rescale; - int imageType[PAR_DEFAULT_IMAGE_TYPES_SIZE] = { -1, -1, -1, -1, -1, -1, -1, -1 }; - int lineIncrement = 99; - struct image_info_defV4 tempInfo = GetImageInformationDefinitionV41(parFile, lineIncrement, this); + int imageType[PAR_DEFAULT_IMAGE_TYPES_SIZE] = { -1, -1, -1, -1, -1, -1, -1, -1 }; + int lineIncrement = 99; + struct image_info_defV4 tempInfo = GetImageInformationDefinitionV41(parFile, lineIncrement, this); while (!tempInfo.problemreading && tempInfo.slice) { if ((*(imageType + tempInfo.image_type_mr) < 0) && (tempInfo.scan_sequence == scan_sequence)) @@ -2019,9 +2019,9 @@ PhilipsPAR::GetRECRescaleValues(std::string parFile, case RESEARCH_IMAGE_EXPORT_TOOL_V4_2: { PhilipsPAR::PARRescaleValues rescale; - int imageType[PAR_DEFAULT_IMAGE_TYPES_SIZE] = { -1, -1, -1, -1, -1, -1, -1, -1 }; - int lineIncrement = 101; - struct image_info_defV4 tempInfo = GetImageInformationDefinitionV42(parFile, lineIncrement, this); + int imageType[PAR_DEFAULT_IMAGE_TYPES_SIZE] = { -1, -1, -1, -1, -1, -1, -1, -1 }; + int lineIncrement = 101; + struct image_info_defV4 tempInfo = GetImageInformationDefinitionV42(parFile, lineIncrement, this); while (!tempInfo.problemreading && tempInfo.slice) { if ((*(imageType + tempInfo.image_type_mr) < 0) && (tempInfo.scan_sequence == scan_sequence)) @@ -2042,9 +2042,9 @@ PhilipsPAR::GetRECRescaleValues(std::string parFile, } bool -PhilipsPAR::GetDiffusionGradientOrientationAndBValues(std::string parFile, +PhilipsPAR::GetDiffusionGradientOrientationAndBValues(std::string parFile, PhilipsPAR::PARDiffusionValuesContainer * gradientValues, - PhilipsPAR::PARBValuesContainer * bValues) + PhilipsPAR::PARBValuesContainer * bValues) { gradientValues->resize(0); // Reset to zero size. bValues->resize(0); @@ -2081,7 +2081,7 @@ PhilipsPAR::GetDiffusionGradientOrientationAndBValues(std::string } // Can use either version 4.1 or 4.2 GetImageInformationDefinition function. - int gradientDirectionCount = 0; + int gradientDirectionCount = 0; struct image_info_defV4 tempInfo = GetImageInformationDefinitionV41(parFile, lineIncrement, this); while (!tempInfo.problemreading && tempInfo.slice && (gradientDirectionCount < tempPar.max_num_grad_orient)) { @@ -2115,8 +2115,8 @@ PhilipsPAR::GetLabelTypesASL(std::string parFile, PhilipsPAR::PARLabelTypesASLCo if (ResToolsVersion >= RESEARCH_IMAGE_EXPORT_TOOL_V4_2) { struct image_info_defV4 tempInfo; - int aslLabelNumber = -1; - int lineIncrement = 101; + int aslLabelNumber = -1; + int lineIncrement = 101; struct par_parameter tempPar; try diff --git a/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIO.cxx b/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIO.cxx index 54c15f548cf..9f65b9d389b 100644 --- a/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIO.cxx +++ b/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIO.cxx @@ -129,7 +129,7 @@ GetRootName(const std::string & filename) if (!fileExt.empty() && filename.length() > fileExt.length()) { const std::string::size_type it = filename.find_last_of(fileExt); - std::string baseName(filename, 0, it - (fileExt.length() - 1)); + std::string baseName(filename, 0, it - (fileExt.length() - 1)); return (baseName); } // Default to return same as input when the extension is nothing. @@ -139,7 +139,7 @@ GetRootName(const std::string & filename) static std::string GetHeaderFileName(const std::string & filename) { - std::string ImageFileName(filename); + std::string ImageFileName(filename); const std::string fileExt = GetExtension(filename); // Accommodate either all caps or all lower-case filenames. @@ -160,7 +160,7 @@ GetHeaderFileName(const std::string & filename) static std::string GetImageFileName(const std::string & filename) { - std::string ImageFileName(filename); + std::string ImageFileName(filename); const std::string fileExt = GetExtension(filename); // Default to uncompressed .REC if .PAR is given as file name. @@ -181,13 +181,13 @@ GetImageFileName(const std::string & filename) // This generates the correct offset to the desired image type and // scanning sequence (randomly ordered in the REC). int -PhilipsRECImageIOGetImageTypeOffset(int imageType, - int scanSequence, - int volumeIndex, - int slice, - int numSlices, - struct par_parameter parParam, - PhilipsPAR::PARSliceIndexImageTypeVector sliceImageTypesIndex, +PhilipsRECImageIOGetImageTypeOffset(int imageType, + int scanSequence, + int volumeIndex, + int slice, + int numSlices, + struct par_parameter parParam, + PhilipsPAR::PARSliceIndexImageTypeVector sliceImageTypesIndex, PhilipsPAR::PARSliceIndexScanSequenceVector sliceScanSequenceIndex) { const int index = volumeIndex * parParam.num_slice_repetitions * numSlices + slice * parParam.num_slice_repetitions; @@ -205,14 +205,14 @@ PhilipsRECImageIOGetImageTypeOffset(int //---------------------------------------------------------------------------- // This creates the desired slice order index (slice or image block). void -PhilipsRECImageIOSetupSliceIndex(PhilipsRECImageIO::SliceIndexType * indexMatrix, - int sortBlock, - struct par_parameter parParam, - PhilipsPAR::PARImageTypeScanSequenceVector imageTypesScanSequenceIndex, - PhilipsPAR::PARSliceIndexImageTypeVector sliceImageTypesIndex, +PhilipsRECImageIOSetupSliceIndex(PhilipsRECImageIO::SliceIndexType * indexMatrix, + int sortBlock, + struct par_parameter parParam, + PhilipsPAR::PARImageTypeScanSequenceVector imageTypesScanSequenceIndex, + PhilipsPAR::PARSliceIndexImageTypeVector sliceImageTypesIndex, PhilipsPAR::PARSliceIndexScanSequenceVector sliceScanSequenceIndex) { - int index = 0; + int index = 0; const int actualSlices = parParam.slice; const int remainingVolumes = parParam.image_blocks / parParam.num_slice_repetitions; @@ -421,7 +421,7 @@ void PhilipsRECImageIO::Read(void * buffer) { const unsigned int dimensions = this->GetNumberOfDimensions(); - unsigned int numberOfPixels = 1; + unsigned int numberOfPixels = 1; for (unsigned int dim = 0; dim < dimensions; ++dim) { @@ -538,7 +538,7 @@ PhilipsRECImageIO::CanReadFile(const char * FileNameToRead) void PhilipsRECImageIO::ReadImageInformation() { - const std::string HeaderFileName = GetHeaderFileName(this->m_FileName); + const std::string HeaderFileName = GetHeaderFileName(this->m_FileName); struct par_parameter par{}; // Read PAR file. diff --git a/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOPrintTest.cxx b/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOPrintTest.cxx index 952cfc6cbff..b06f004d917 100644 --- a/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOPrintTest.cxx +++ b/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOPrintTest.cxx @@ -50,8 +50,8 @@ itkPhilipsRECImageIOPrintTest(int argc, char * argv[]) // Print all of the PAR parameters. // Return EXIT_FAILURE if the value cannot be read. std::string tempStr = ""; - int tempInt = -1; - float tempFloat = 0; + int tempInt = -1; + float tempFloat = 0; if (!itk::ExposeMetaData(imageIO->GetMetaDataDictionary(), "PAR_Version", tempStr)) { diff --git a/Modules/IO/RAW/include/itkRawImageIO.h b/Modules/IO/RAW/include/itkRawImageIO.h index 8a64a8a484f..a067ac9ddb5 100644 --- a/Modules/IO/RAW/include/itkRawImageIO.h +++ b/Modules/IO/RAW/include/itkRawImageIO.h @@ -171,9 +171,9 @@ class ITK_TEMPLATE_EXPORT RawImageIO : public ImageIOBase private: std::string m_InternalFileName{}; - unsigned long m_FileDimensionality{}; - bool m_ManualHeaderSize{}; - SizeValueType m_HeaderSize{}; + unsigned long m_FileDimensionality{}; + bool m_ManualHeaderSize{}; + SizeValueType m_HeaderSize{}; unsigned short m_ImageMask{}; }; diff --git a/Modules/IO/RAW/include/itkRawImageIO.hxx b/Modules/IO/RAW/include/itkRawImageIO.hxx index 7562f7bb8ea..c3649d797c7 100644 --- a/Modules/IO/RAW/include/itkRawImageIO.hxx +++ b/Modules/IO/RAW/include/itkRawImageIO.hxx @@ -27,18 +27,18 @@ namespace itk /** Utility function for writing RAW bytes */ extern void WriteRawBytesAfterSwapping(IOComponentEnum componentType, - const void * buffer, + const void * buffer, std::ofstream & file, IOByteOrderEnum byteOrder, - SizeValueType numberOfBytes, - SizeValueType numberOfComponents); + SizeValueType numberOfBytes, + SizeValueType numberOfComponents); /** Utility function for reading RAW bytes */ extern void ReadRawBytesAfterSwapping(IOComponentEnum componentType, - void * buffer, + void * buffer, IOByteOrderEnum byteOrder, - SizeValueType numberOfComponents); + SizeValueType numberOfComponents); template diff --git a/Modules/IO/RAW/test/itkRawImageIOTest2.cxx b/Modules/IO/RAW/test/itkRawImageIOTest2.cxx index 40204738bf8..a8f7c033afe 100644 --- a/Modules/IO/RAW/test/itkRawImageIOTest2.cxx +++ b/Modules/IO/RAW/test/itkRawImageIOTest2.cxx @@ -51,8 +51,8 @@ itkRawImageIOTest2(int argc, char * argv[]) io->SetFileDimensionality(3); io->SetNumberOfDimensions(3); constexpr unsigned int dim[3] = { 50, 50, 10 }; - constexpr double spacing[3] = { 1.0, 1.0, 1.0 }; - constexpr double origin[3] = { 0.0, 0.0, 0.0 }; + constexpr double spacing[3] = { 1.0, 1.0, 1.0 }; + constexpr double origin[3] = { 0.0, 0.0, 0.0 }; for (unsigned int i = 0; i < 3; ++i) { io->SetDimensions(i, dim[i]); diff --git a/Modules/IO/RAW/test/itkRawImageIOTest3.cxx b/Modules/IO/RAW/test/itkRawImageIOTest3.cxx index 1fa99c2a7d5..4e8970876d5 100644 --- a/Modules/IO/RAW/test/itkRawImageIOTest3.cxx +++ b/Modules/IO/RAW/test/itkRawImageIOTest3.cxx @@ -52,7 +52,7 @@ itkRawImageIOTest3(int argc, char * argv[]) size[0] = 517; // prime numbers are good bug testers... size[1] = 293; - ImageType::RegionType region; + ImageType::RegionType region; constexpr ImageType::IndexType index{}; region.SetIndex(index); diff --git a/Modules/IO/RAW/test/itkRawImageIOTest4.cxx b/Modules/IO/RAW/test/itkRawImageIOTest4.cxx index d53942c8568..00ce1ca755a 100644 --- a/Modules/IO/RAW/test/itkRawImageIOTest4.cxx +++ b/Modules/IO/RAW/test/itkRawImageIOTest4.cxx @@ -121,7 +121,7 @@ itkRawImageIOTest4(int argc, char * argv[]) using ComponentType = itk::PixelTraits::ValueType; using ByteSwapperType = itk::ByteSwapper; - PixelType value{}; + PixelType value{}; const unsigned int numberOfPixels = dims[0] * dims[1]; diff --git a/Modules/IO/RAW/test/itkRawImageIOTest5.cxx b/Modules/IO/RAW/test/itkRawImageIOTest5.cxx index 214df8a20b0..9ac8b077bc1 100644 --- a/Modules/IO/RAW/test/itkRawImageIOTest5.cxx +++ b/Modules/IO/RAW/test/itkRawImageIOTest5.cxx @@ -40,8 +40,8 @@ class RawImageReaderAndWriter { m_Image = ImageType::New(); - typename ImageType::RegionType region; - typename ImageType::SizeType size; + typename ImageType::RegionType region; + typename ImageType::SizeType size; constexpr typename ImageType::IndexType start{}; size[0] = 16; // To fill the range of 8 bits image size[1] = 16; @@ -96,8 +96,8 @@ class RawImageReaderAndWriter reader->SetImageIO(rawImageIO); constexpr unsigned int dim[2] = { 16, 16 }; - constexpr double spacing[2] = { 1.0, 1.0 }; - constexpr double origin[2] = { 0.0, 0.0 }; + constexpr double spacing[2] = { 1.0, 1.0 }; + constexpr double origin[2] = { 0.0, 0.0 }; for (unsigned int i = 0; i < 2; ++i) { diff --git a/Modules/IO/Siemens/src/itkSiemensVisionImageIO.cxx b/Modules/IO/Siemens/src/itkSiemensVisionImageIO.cxx index f104140e2c3..9bd157403cb 100644 --- a/Modules/IO/Siemens/src/itkSiemensVisionImageIO.cxx +++ b/Modules/IO/Siemens/src/itkSiemensVisionImageIO.cxx @@ -75,7 +75,7 @@ SiemensVisionImageIO::ReadHeader(const char * FileNameToRead) { RAISE_EXCEPTION(); } - int tmpInt; + int tmpInt; double tmpDble; // #define DEBUGHEADER diff --git a/Modules/IO/SpatialObjects/include/itkPolygonGroupSpatialObjectXMLFile.h b/Modules/IO/SpatialObjects/include/itkPolygonGroupSpatialObjectXMLFile.h index 8678276c06a..ab2d885e0a7 100644 --- a/Modules/IO/SpatialObjects/include/itkPolygonGroupSpatialObjectXMLFile.h +++ b/Modules/IO/SpatialObjects/include/itkPolygonGroupSpatialObjectXMLFile.h @@ -73,10 +73,10 @@ class ITK_TEMPLATE_EXPORT PolygonGroupSpatialObjectXMLFileReader : public XMLRea CharacterDataHandler(const char * inData, int inLength) override; private: - GroupSpatialObjectType::Pointer m_Group{}; + GroupSpatialObjectType::Pointer m_Group{}; PolygonSpatialObjectType::Pointer m_CurPoly{}; - PolygonPointListType m_CurPointList{}; - std::string m_CurCharacterData{}; + PolygonPointListType m_CurPointList{}; + std::string m_CurCharacterData{}; }; /** \class PolygonGroupSpatialObjectXMLFileWriter diff --git a/Modules/IO/SpatialObjects/include/itkSpatialObjectReader.h b/Modules/IO/SpatialObjects/include/itkSpatialObjectReader.h index 9cdb0355e07..0d543851876 100644 --- a/Modules/IO/SpatialObjects/include/itkSpatialObjectReader.h +++ b/Modules/IO/SpatialObjects/include/itkSpatialObjectReader.h @@ -118,8 +118,8 @@ class ITK_TEMPLATE_EXPORT SpatialObjectReader : public Object /** Add a converter for a new MetaObject/SpatialObject type */ void - RegisterMetaConverter(const char * metaTypeName, - const char * spatialObjectTypeName, + RegisterMetaConverter(const char * metaTypeName, + const char * spatialObjectTypeName, MetaConverterBaseType * converter); protected: diff --git a/Modules/IO/SpatialObjects/include/itkSpatialObjectWriter.h b/Modules/IO/SpatialObjects/include/itkSpatialObjectWriter.h index 9e0a6258bda..2fa59805282 100644 --- a/Modules/IO/SpatialObjects/include/itkSpatialObjectWriter.h +++ b/Modules/IO/SpatialObjects/include/itkSpatialObjectWriter.h @@ -104,14 +104,14 @@ class ITK_TEMPLATE_EXPORT SpatialObjectWriter : public Object /** Add a converter for a new MetaObject/SpatialObject type */ void - RegisterMetaConverter(const char * metaTypeName, - const char * spatialObjectTypeName, + RegisterMetaConverter(const char * metaTypeName, + const char * spatialObjectTypeName, MetaConverterBaseType * converter); protected: std::string m_FileName{}; - bool m_BinaryPoints{}; - bool m_WriteImagesInSeparateFile{}; + bool m_BinaryPoints{}; + bool m_WriteImagesInSeparateFile{}; SpatialObjectWriter(); ~SpatialObjectWriter() override = default; diff --git a/Modules/IO/SpatialObjects/src/itkPolygonGroupSpatialObjectXMLFile.cxx b/Modules/IO/SpatialObjects/src/itkPolygonGroupSpatialObjectXMLFile.cxx index 74082e9b27e..d5a7d99e7c7 100644 --- a/Modules/IO/SpatialObjects/src/itkPolygonGroupSpatialObjectXMLFile.cxx +++ b/Modules/IO/SpatialObjects/src/itkPolygonGroupSpatialObjectXMLFile.cxx @@ -113,9 +113,9 @@ PolygonGroupSpatialObjectXMLFileReader::EndElement(const char * name) } else if (itksys::SystemTools::Strucmp(name, "POINT") == 0) { - double pval[3]; + double pval[3]; const char * s = m_CurCharacterData.c_str(); - char * endptr; + char * endptr; for (double & i : pval) { i = strtod(s, &endptr); @@ -172,10 +172,10 @@ class NumericTraits template void WriteMetaDataAttribute(PolygonGroupSpatialObjectXMLFileWriter * This, - itk::MetaDataDictionary & thisDic, - const char * const MetaName, - const char * const attName, - std::ofstream & output) + itk::MetaDataDictionary & thisDic, + const char * const MetaName, + const char * const attName, + std::ofstream & output) { T value{}; @@ -238,16 +238,16 @@ PolygonGroupSpatialObjectXMLFileWriter::WriteFile() // // Write out polygondata GroupType::ChildrenListType * children = m_InputObject->GetChildren(GroupType::MaximumDepth, "PolygonSpatialObject"); - auto it = children->begin(); - auto end = children->end(); + auto it = children->begin(); + auto end = children->end(); while (it != end) { WriteStartElement("POLYGON", output); output << std::endl; auto * curstrand = dynamic_cast(it->GetPointer()); PolygonSpatialObjectType::PolygonPointListType & polygonPoints = curstrand->GetPoints(); - auto pointIt = polygonPoints.begin(); - auto pointItEnd = polygonPoints.end(); + auto pointIt = polygonPoints.begin(); + auto pointItEnd = polygonPoints.end(); while (pointIt != pointItEnd) { PolygonSpatialObjectType::PointType curpoint = pointIt->GetPositionInObjectSpace(); diff --git a/Modules/IO/SpatialObjects/test/itkPolygonGroupSpatialObjectXMLFileTest.cxx b/Modules/IO/SpatialObjects/test/itkPolygonGroupSpatialObjectXMLFileTest.cxx index babf4189101..239039582fe 100644 --- a/Modules/IO/SpatialObjects/test/itkPolygonGroupSpatialObjectXMLFileTest.cxx +++ b/Modules/IO/SpatialObjects/test/itkPolygonGroupSpatialObjectXMLFileTest.cxx @@ -70,12 +70,12 @@ testPolygonGroupEquivalence(PolygonGroup3DPointer & p1, PolygonGroup3DPointer & // // Write out polygondata PolygonGroup3DType::ChildrenListType * children1 = p1->GetChildren(); - auto it1 = children1->begin(); - auto end1 = children1->end(); + auto it1 = children1->begin(); + auto end1 = children1->end(); PolygonGroup3DType::ChildrenListType * children2 = p2->GetChildren(); - auto it2 = children2->begin(); - auto end2 = children2->end(); + auto it2 = children2->begin(); + auto end2 = children2->end(); while (it1 != end1) { diff --git a/Modules/IO/SpatialObjects/test/itkReadVesselTubeSpatialObjectTest.cxx b/Modules/IO/SpatialObjects/test/itkReadVesselTubeSpatialObjectTest.cxx index bb963a5e55b..304c5e16e5a 100644 --- a/Modules/IO/SpatialObjects/test/itkReadVesselTubeSpatialObjectTest.cxx +++ b/Modules/IO/SpatialObjects/test/itkReadVesselTubeSpatialObjectTest.cxx @@ -47,7 +47,7 @@ itkReadVesselTubeSpatialObjectTest(int argc, char * argv[]) } const ReaderType::SpatialObjectPointer soScene = reader->GetOutput(); - const unsigned int numberOfChildren = soScene->GetNumberOfChildren(2); + const unsigned int numberOfChildren = soScene->GetNumberOfChildren(2); std::cout << "Number of children: " << numberOfChildren << std::endl; if (numberOfChildren != 2) { diff --git a/Modules/IO/SpatialObjects/test/itkReadWriteSpatialObjectTest.cxx b/Modules/IO/SpatialObjects/test/itkReadWriteSpatialObjectTest.cxx index 8c2fa4ab9b6..9d0fc1f658e 100644 --- a/Modules/IO/SpatialObjects/test/itkReadWriteSpatialObjectTest.cxx +++ b/Modules/IO/SpatialObjects/test/itkReadWriteSpatialObjectTest.cxx @@ -61,12 +61,12 @@ itkReadWriteSpatialObjectTest(int argc, char * argv[]) // Tubes std::cout << " --- Testing Read-Write SpatialObject ---" << std::endl; - TubeType::TubePointListType list; - VesselTubeType::TubePointListType list2; - DTITubeType::DTITubePointListType list3; - BlobType::BlobPointListType list4; - SurfaceType::SurfacePointListType list5; - LineType::LinePointListType list6; + TubeType::TubePointListType list; + VesselTubeType::TubePointListType list2; + DTITubeType::DTITubePointListType list3; + BlobType::BlobPointListType list4; + SurfaceType::SurfacePointListType list5; + LineType::LinePointListType list6; LandmarkType::LandmarkPointListType list7; for (unsigned int i = 0; i < 10; ++i) @@ -262,7 +262,7 @@ itkReadWriteSpatialObjectTest(int argc, char * argv[]) SizeType size; constexpr unsigned int dim = 3; - double spacing[3]; + double spacing[3]; for (unsigned int i = 0; i < dim; ++i) { @@ -325,8 +325,8 @@ itkReadWriteSpatialObjectTest(int argc, char * argv[]) for (int i = 0; i < 10; ++i) { - ContourType::ContourPointType ctrlPt; - ContourType::ContourPointType::PointType p; + ContourType::ContourPointType ctrlPt; + ContourType::ContourPointType::PointType p; ContourType::ContourPointType::CovariantVectorType n; ctrlPt.SetId(i); p.Fill(-i); @@ -1140,7 +1140,7 @@ itkReadWriteSpatialObjectTest(int argc, char * argv[]) return EXIT_FAILURE; } ContourType::ContourPointListType::const_iterator ctrl; - int value = 0; + int value = 0; for (ctrl = dynamic_cast(obj->GetPointer())->GetControlPoints().begin(); ctrl != dynamic_cast(obj->GetPointer())->GetControlPoints().end(); diff --git a/Modules/IO/Stimulate/include/itkStimulateImageIO.h b/Modules/IO/Stimulate/include/itkStimulateImageIO.h index 2148f4a47d8..a7133628991 100644 --- a/Modules/IO/Stimulate/include/itkStimulateImageIO.h +++ b/Modules/IO/Stimulate/include/itkStimulateImageIO.h @@ -137,9 +137,9 @@ class ITKIOStimulate_EXPORT StimulateImageIO : public ImageIOBase private: std::string m_DataFileName{}; - char m_SdtOrient[256]{}; - float m_DisplayRange[2]{}; - char m_FidName[256]{}; + char m_SdtOrient[256]{}; + float m_DisplayRange[2]{}; + char m_FidName[256]{}; }; } // end namespace itk diff --git a/Modules/IO/Stimulate/src/itkStimulateImageIO.cxx b/Modules/IO/Stimulate/src/itkStimulateImageIO.cxx index 3560f5bd28d..3f4420607c5 100644 --- a/Modules/IO/Stimulate/src/itkStimulateImageIO.cxx +++ b/Modules/IO/Stimulate/src/itkStimulateImageIO.cxx @@ -59,8 +59,8 @@ bool StimulateImageIO::CanReadFile(const char * filename) { std::ifstream file; - char buffer[256]; - std::string fname(filename); + char buffer[256]; + std::string fname(filename); if (fname.empty()) { @@ -188,7 +188,7 @@ StimulateImageIO::Read(void * buffer) void StimulateImageIO::InternalReadImageInformation(std::ifstream & file) { - char line[255]; + char line[255]; std::string text; // read .sdt file (header) @@ -211,10 +211,10 @@ StimulateImageIO::InternalReadImageInformation(std::ifstream & file) // char fidName[256] = ""; // char orient[256] = ""; - bool fov_specified = false; - bool origin_specified = false; - bool spacing_specified = false; - float fov[4]; + bool fov_specified = false; + bool origin_specified = false; + bool spacing_specified = false; + float fov[4]; unsigned int dims[4]; while ((static_cast(file.getline(line, 255)), file.gcount() > 0)) { @@ -252,7 +252,7 @@ StimulateImageIO::InternalReadImageInformation(std::ifstream & file) // to be centered: // save and reset old locale - float origin[4]; + float origin[4]; const std::locale currentLocale = std::locale::global(std::locale::classic()); sscanf(line, "%*s %f %f %f %f", origin, origin + 1, origin + 2, origin + 3); // reset locale @@ -294,7 +294,7 @@ StimulateImageIO::InternalReadImageInformation(std::ifstream & file) // save and reset old locale const std::locale currentLocale = std::locale::global(std::locale::classic()); - float spacing[4]; + float spacing[4]; sscanf(line, "%*s %f %f %f %f", spacing, spacing + 1, spacing + 2, spacing + 3); // reset locale std::locale::global(currentLocale); @@ -349,7 +349,7 @@ StimulateImageIO::InternalReadImageInformation(std::ifstream & file) // save and reset old locale const std::locale currentLocale = std::locale::global(std::locale::classic()); - float range[2]; + float range[2]; sscanf(line, "%*s %f %f", range, range + 1); // reset locale std::locale::global(currentLocale); diff --git a/Modules/IO/TIFF/include/itkTIFFImageIO.h b/Modules/IO/TIFF/include/itkTIFFImageIO.h index 2ef065bd366..0ee2268d605 100644 --- a/Modules/IO/TIFF/include/itkTIFFImageIO.h +++ b/Modules/IO/TIFF/include/itkTIFFImageIO.h @@ -265,8 +265,8 @@ class ITKIOTIFF_EXPORT TIFFImageIO : public ImageIOBase template void - PutGrayscale(TType * to, - TType * from, + PutGrayscale(TType * to, + TType * from, unsigned int xsize, unsigned int ysize, unsigned int toskew, @@ -279,8 +279,8 @@ class ITKIOTIFF_EXPORT TIFFImageIO : public ImageIOBase template void - PutPaletteGrayscale(TType * to, - TFromType * from, + PutPaletteGrayscale(TType * to, + TFromType * from, unsigned int xsize, unsigned int ysize, unsigned int toskew, @@ -288,8 +288,8 @@ class ITKIOTIFF_EXPORT TIFFImageIO : public ImageIOBase template void - PutPaletteRGB(TType * to, - TFromType * from, + PutPaletteRGB(TType * to, + TFromType * from, unsigned int xsize, unsigned int ysize, unsigned int toskew, @@ -297,17 +297,17 @@ class ITKIOTIFF_EXPORT TIFFImageIO : public ImageIOBase template void - PutPaletteScalar(TType * to, - TFromType * from, + PutPaletteScalar(TType * to, + TFromType * from, unsigned int xsize, unsigned int ysize, unsigned int toskew, unsigned int fromskew); - uint16_t * m_ColorRed{}; - uint16_t * m_ColorGreen{}; - uint16_t * m_ColorBlue{}; - uint64_t m_TotalColors{ 0 }; + uint16_t * m_ColorRed{}; + uint16_t * m_ColorGreen{}; + uint16_t * m_ColorBlue{}; + uint64_t m_TotalColors{ 0 }; unsigned int m_ImageFormat{ TIFFImageIO::NOFORMAT }; }; } // end namespace itk diff --git a/Modules/IO/TIFF/src/itkTIFFImageIO.cxx b/Modules/IO/TIFF/src/itkTIFFImageIO.cxx index 502b41a5027..5ab790ee875 100644 --- a/Modules/IO/TIFF/src/itkTIFFImageIO.cxx +++ b/Modules/IO/TIFF/src/itkTIFFImageIO.cxx @@ -495,7 +495,7 @@ TIFFImageIO::ReadImageInformation() if (TIFFIsCODECConfigured(this->m_InternalImage->m_Compression) != 1) { const TIFFCodec * c = TIFFFindCODEC(this->m_InternalImage->m_Compression); - const char * codecName = (c != nullptr) ? static_cast(c->name) : "unknown"; + const char * codecName = (c != nullptr) ? static_cast(c->name) : "unknown"; itkExceptionMacro("TIFF CODEC \"" << codecName << "\" is not supported."); } @@ -581,12 +581,12 @@ TIFFImageIO::InternalWrite(const void * buffer) pages = static_cast(m_Dimensions[2]); } - auto scomponents = static_cast(this->GetNumberOfComponents()); + auto scomponents = static_cast(this->GetNumberOfComponents()); const double resolution_x{ m_Spacing[0] != 0.0 ? 25.4 / m_Spacing[0] : 0.0 }; const double resolution_y{ m_Spacing[1] != 0.0 ? 25.4 / m_Spacing[1] : 0.0 }; // rowsperstrip is set to a default value but modified based on the tif scanlinesize before // passing it into the TIFFSetField (see below). - auto rowsperstrip = uint32_t{ 0 }; + auto rowsperstrip = uint32_t{ 0 }; uint16_t bps; switch (this->GetComponentType()) @@ -678,7 +678,7 @@ TIFFImageIO::InternalWrite(const void * buffer) // if number of scalar components is greater than 3, that means we assume // there is alpha. const uint16_t extra_samples = scomponents - 3; - const auto sample_info = make_unique_for_overwrite(scomponents - 3); + const auto sample_info = make_unique_for_overwrite(scomponents - 3); sample_info[0] = EXTRASAMPLE_ASSOCALPHA; for (uint16_t cc = 1; cc < scomponents - 3; ++cc) { @@ -921,7 +921,7 @@ TIFFImageIO::ReadRawByteFromTag(unsigned int t, unsigned int & value_count) itkExceptionMacro("Need to call CanReadFile before"); } const ttag_t tag = t; - void * raw_data = nullptr; + void * raw_data = nullptr; const TIFFField * fld = TIFFFieldWithTag(m_InternalImage->m_Image, tag); @@ -1054,7 +1054,7 @@ TIFFImageIO::ReadTIFFTags() MetaDataDictionary & dict = this->GetMetaDataDictionary(); void * raw_data = nullptr; - bool mem_alloc = false; + bool mem_alloc = false; const int tagCount = TIFFGetTagListCount(m_InternalImage->m_Image); @@ -1083,7 +1083,7 @@ TIFFImageIO::ReadTIFFTags() const char * field_name = TIFFFieldName(field); - int value_count = 0; + int value_count = 0; const int read_count = TIFFFieldReadCount(field); @@ -1157,7 +1157,7 @@ TIFFImageIO::ReadTIFFTags() #define itkEncapsulate(T1, T2) \ if (value_count > 1) \ { \ - auto v_c = static_cast(value_count); \ + auto v_c = static_cast(value_count); \ Array a(v_c); \ for (unsigned int cnt = 0; cnt < v_c; ++cnt) \ { \ @@ -1326,11 +1326,11 @@ TIFFImageIO::ReadGenericImage(void * _out, unsigned int width, unsigned int heig tsize_t isize = TIFFScanlineSize(m_InternalImage->m_Image); #endif - size_t inc; + size_t inc; tdata_t buf = _TIFFmalloc(static_cast(isize)); isize /= sizeof(ComponentType); - auto * out = static_cast(_out); + auto * out = static_cast(_out); ComponentType * image; if (m_InternalImage->m_PlanarConfig != PLANARCONFIG_CONTIG && m_InternalImage->m_SamplesPerPixel != 1) @@ -1456,8 +1456,8 @@ TIFFImageIO::ReadGenericImage(void * _out, unsigned int width, unsigned int heig // iso component scalar template void -TIFFImageIO::PutGrayscale(TType * to, - TType * from, +TIFFImageIO::PutGrayscale(TType * to, + TType * from, unsigned int xsize, unsigned int ysize, unsigned int toskew, @@ -1477,8 +1477,8 @@ TIFFImageIO::PutGrayscale(TType * to, // iso component scalar template void -TIFFImageIO::PutRGB_(TType * to, - TType * from, +TIFFImageIO::PutRGB_(TType * to, + TType * from, unsigned int xsize, unsigned int ysize, unsigned int toskew, @@ -1500,8 +1500,8 @@ TIFFImageIO::PutRGB_(TType * to, template void -TIFFImageIO::PutPaletteRGB(TType * to, - TFromType * from, +TIFFImageIO::PutPaletteRGB(TType * to, + TFromType * from, unsigned int xsize, unsigned int ysize, unsigned int toskew, @@ -1530,8 +1530,8 @@ TIFFImageIO::PutPaletteRGB(TType * to, template void -TIFFImageIO::PutPaletteGrayscale(TType * to, - TFromType * from, +TIFFImageIO::PutPaletteGrayscale(TType * to, + TFromType * from, unsigned int xsize, unsigned int ysize, unsigned int toskew, @@ -1555,8 +1555,8 @@ TIFFImageIO::PutPaletteGrayscale(TType * to, template void -TIFFImageIO::PutPaletteScalar(TType * to, - TFromType * from, +TIFFImageIO::PutPaletteScalar(TType * to, + TFromType * from, unsigned int xsize, unsigned int ysize, unsigned int toskew, diff --git a/Modules/IO/TIFF/src/itkTIFFReaderInternal.cxx b/Modules/IO/TIFF/src/itkTIFFReaderInternal.cxx index 2fab996cbd0..c24f935b314 100644 --- a/Modules/IO/TIFF/src/itkTIFFReaderInternal.cxx +++ b/Modules/IO/TIFF/src/itkTIFFReaderInternal.cxx @@ -41,9 +41,9 @@ class tiff_open_options_free int itkTIFFErrorHandlerExtR([[maybe_unused]] TIFF * tif, [[maybe_unused]] void * user_data, - const char * module, - const char * fmt, - va_list ap) + const char * module, + const char * fmt, + va_list ap) { auto * self = reinterpret_cast(user_data); if (::itk::Object::GetGlobalWarningDisplay() && !self->m_ErrorSilence) @@ -63,9 +63,9 @@ itkTIFFErrorHandlerExtR([[maybe_unused]] TIFF * tif, int itkTIFFWarningHandlerExtR([[maybe_unused]] TIFF * tif, [[maybe_unused]] void * user_data, - const char * module, - const char * fmt, - va_list ap) + const char * module, + const char * fmt, + va_list ap) { auto * self = reinterpret_cast(user_data); diff --git a/Modules/IO/TIFF/src/itkTIFFReaderInternal.h b/Modules/IO/TIFF/src/itkTIFFReaderInternal.h index 71fa43524df..ed65d86a5fa 100644 --- a/Modules/IO/TIFF/src/itkTIFFReaderInternal.h +++ b/Modules/IO/TIFF/src/itkTIFFReaderInternal.h @@ -42,8 +42,8 @@ class ITKIOTIFF_HIDDEN TIFFReaderInternal int Open(const char * filename, bool silent = false); - TIFF * m_Image; - bool m_IsOpen; + TIFF * m_Image; + bool m_IsOpen; uint32_t m_Width; uint32_t m_Height; uint16_t m_NumberOfPages; @@ -52,7 +52,7 @@ class ITKIOTIFF_HIDDEN TIFFReaderInternal uint16_t m_Compression; uint16_t m_BitsPerSample; uint16_t m_Photometrics; - bool m_HasValidPhotometricInterpretation; + bool m_HasValidPhotometricInterpretation; uint16_t m_PlanarConfig; uint16_t m_Orientation; uint32_t m_TileRows; @@ -63,8 +63,8 @@ class ITKIOTIFF_HIDDEN TIFFReaderInternal uint32_t m_SubFiles; uint32_t m_IgnoredSubFiles; uint16_t m_ResolutionUnit; - float m_XResolution; - float m_YResolution; + float m_XResolution; + float m_YResolution; uint16_t m_SampleFormat; bool m_WarningSilence{ false }; diff --git a/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx b/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx index 93ebc074224..fb9cf3351f5 100644 --- a/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx +++ b/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx @@ -42,7 +42,7 @@ itkLargeTIFFImageWriteReadTestHelper(std::string filename, typename TImage::Size using SizeValueType = itk::SizeValueType; - const typename ImageType::IndexType index{}; + const typename ImageType::IndexType index{}; const typename ImageType::RegionType region{ index, size }; { // Write block diff --git a/Modules/IO/TIFF/test/itkTIFFImageIOInfoTest.cxx b/Modules/IO/TIFF/test/itkTIFFImageIOInfoTest.cxx index 8b470477b32..3532ae072b9 100644 --- a/Modules/IO/TIFF/test/itkTIFFImageIOInfoTest.cxx +++ b/Modules/IO/TIFF/test/itkTIFFImageIOInfoTest.cxx @@ -66,14 +66,14 @@ itkTIFFImageIOInfoTest(int argc, char * argv[]) using MetaDataStringType = itk::MetaDataObject; const DictionaryType & dictionary = tiffImageIO->GetMetaDataDictionary(); - auto itr = dictionary.Begin(); - auto end = dictionary.End(); + auto itr = dictionary.Begin(); + auto end = dictionary.End(); std::cout << "MetaDataDictionary" << std::endl; while (itr != end) { const itk::MetaDataObjectBase::Pointer entry = itr->second; - const std::string tagkey = itr->first; + const std::string tagkey = itr->first; const MetaDataStringType::Pointer entryvalue = dynamic_cast(entry.GetPointer()); diff --git a/Modules/IO/TIFF/test/itkTIFFImageIOTest2.cxx b/Modules/IO/TIFF/test/itkTIFFImageIOTest2.cxx index 61f03559676..9eeb3e6c351 100644 --- a/Modules/IO/TIFF/test/itkTIFFImageIOTest2.cxx +++ b/Modules/IO/TIFF/test/itkTIFFImageIOTest2.cxx @@ -39,8 +39,8 @@ itkTIFFImageIOTest2(int argc, char * argv[]) auto image = ImageType::New(); ImageType::RegionType region; - ImageType::IndexType start; - ImageType::SizeType size; + ImageType::IndexType start; + ImageType::SizeType size; size[0] = 157; size[1] = 129; diff --git a/Modules/IO/TIFF/test/itkTIFFImageIOTestPalette.cxx b/Modules/IO/TIFF/test/itkTIFFImageIOTestPalette.cxx index a59c87b554d..5d83be7ae6d 100644 --- a/Modules/IO/TIFF/test/itkTIFFImageIOTestPalette.cxx +++ b/Modules/IO/TIFF/test/itkTIFFImageIOTestPalette.cxx @@ -214,7 +214,7 @@ itkTIFFImageIOTestPalette(int argc, char * argv[]) << palette_written.size() << ')' << std::endl; return EXIT_FAILURE; } - bool palette_equal = true; + bool palette_equal = true; size_t i = 0; for (; i < palette_written.size(); ++i) { diff --git a/Modules/IO/TransformBase/include/itkTransformFileReader.h b/Modules/IO/TransformBase/include/itkTransformFileReader.h index 40030be79a4..76edade5260 100644 --- a/Modules/IO/TransformBase/include/itkTransformFileReader.h +++ b/Modules/IO/TransformBase/include/itkTransformFileReader.h @@ -103,9 +103,9 @@ class ITK_TEMPLATE_EXPORT TransformFileReaderTemplate : public LightProcessObjec TransformFileReaderTemplate(); ~TransformFileReaderTemplate() override; - TransformListType m_TransformList{}; + TransformListType m_TransformList{}; typename TransformIOType::Pointer m_TransformIO{}; - std::string m_FileName{}; + std::string m_FileName{}; }; /** This helps to meet backward compatibility */ diff --git a/Modules/IO/TransformBase/include/itkTransformFileWriter.h b/Modules/IO/TransformBase/include/itkTransformFileWriter.h index 3a0c326de9d..24602b6e4fc 100644 --- a/Modules/IO/TransformBase/include/itkTransformFileWriter.h +++ b/Modules/IO/TransformBase/include/itkTransformFileWriter.h @@ -120,11 +120,11 @@ class ITKIOTransformBase_TEMPLATE_EXPORT TransformFileWriterTemplate : public Li void PushBackTransformList(const Object * transObj); - std::string m_FileName{}; + std::string m_FileName{}; ConstTransformListType m_TransformList{}; - bool m_AppendMode{ false }; + bool m_AppendMode{ false }; /** Should we compress the data? */ - bool m_UseCompression{ false }; + bool m_UseCompression{ false }; typename TransformIOType::Pointer m_TransformIO{}; }; diff --git a/Modules/IO/TransformBase/include/itkTransformIOBase.h b/Modules/IO/TransformBase/include/itkTransformIOBase.h index 9203f4dc316..029f5faa083 100644 --- a/Modules/IO/TransformBase/include/itkTransformIOBase.h +++ b/Modules/IO/TransformBase/include/itkTransformIOBase.h @@ -169,10 +169,10 @@ class ITKIOTransformBase_TEMPLATE_EXPORT TransformIOBaseTemplate : public LightP } private: - std::string m_FileName{}; - TransformListType m_ReadTransformList{}; + std::string m_FileName{}; + TransformListType m_ReadTransformList{}; ConstTransformListType m_WriteTransformList{}; - bool m_AppendMode{ false }; + bool m_AppendMode{ false }; /** Should we compress the data? */ bool m_UseCompression{ false }; }; diff --git a/Modules/IO/TransformBase/src/itkCompositeTransformIOHelper.cxx b/Modules/IO/TransformBase/src/itkCompositeTransformIOHelper.cxx index 333685257ac..e3d01212b3b 100644 --- a/Modules/IO/TransformBase/src/itkCompositeTransformIOHelper.cxx +++ b/Modules/IO/TransformBase/src/itkCompositeTransformIOHelper.cxx @@ -123,7 +123,7 @@ CompositeTransformIOHelperTemplate::GetTransformList(const template void -CompositeTransformIOHelperTemplate::SetTransformList(TransformType * transform, +CompositeTransformIOHelperTemplate::SetTransformList(TransformType * transform, TransformListType & transformList) { // try each CompositeTransform Type, starting with @@ -166,7 +166,7 @@ CompositeTransformIOHelperTemplate::BuildTransformList(con const typename CompositeType::TransformQueueType & transforms = composite->GetTransformQueue(); for (auto it = transforms.begin(); it != transforms.end(); ++it) { - const auto * curTransform = static_cast(it->GetPointer()); + const auto * curTransform = static_cast(it->GetPointer()); const ConstTransformPointer curPtr = curTransform; this->m_TransformList.push_back(curPtr); } @@ -176,7 +176,7 @@ CompositeTransformIOHelperTemplate::BuildTransformList(con template template int -CompositeTransformIOHelperTemplate::InternalSetTransformList(TransformType * transform, +CompositeTransformIOHelperTemplate::InternalSetTransformList(TransformType * transform, TransformListType & transformList) { // diff --git a/Modules/IO/TransformBase/src/itkTransformFileReader.cxx b/Modules/IO/TransformBase/src/itkTransformFileReader.cxx index 7287c6986ae..b2732168179 100644 --- a/Modules/IO/TransformBase/src/itkTransformFileReader.cxx +++ b/Modules/IO/TransformBase/src/itkTransformFileReader.cxx @@ -152,7 +152,7 @@ TransformFileReaderTemplate::Update() // kernelTransform->ComputeWMatrix() has to be called after the transform is read but // before the transform is used. const std::string transformTypeName = ioTransformList.front()->GetNameOfClass(); - const size_t len = strlen("KernelTransform"); // Computed at compile time in most cases + const size_t len = strlen("KernelTransform"); // Computed at compile time in most cases if (transformTypeName.size() >= len && !transformTypeName.compare(transformTypeName.size() - len, len, "KernelTransform")) { @@ -172,7 +172,7 @@ TransformFileReaderTemplate::Update() const std::string firstTransformName = ioTransformList.front()->GetNameOfClass(); if (firstTransformName.find("CompositeTransform") != std::string::npos) { - const auto tit = ioTransformList.begin(); + const auto tit = ioTransformList.begin(); const typename TransformType::Pointer composite = tit->GetPointer(); // CompositeTransformIOHelperTemplate knows how to assign to the composite diff --git a/Modules/IO/TransformBase/src/itkTransformFileWriterSpecializations.cxx b/Modules/IO/TransformBase/src/itkTransformFileWriterSpecializations.cxx index d740e6dd841..58f188c22a3 100644 --- a/Modules/IO/TransformBase/src/itkTransformFileWriterSpecializations.cxx +++ b/Modules/IO/TransformBase/src/itkTransformFileWriterSpecializations.cxx @@ -198,7 +198,7 @@ struct TransformIOHelper // Instantiate the transform const LightObject::Pointer i = ObjectFactoryBase::CreateInstance(transformName.c_str()); - OutputTransformPointer convertedTransform = dynamic_cast(i.GetPointer()); + OutputTransformPointer convertedTransform = dynamic_cast(i.GetPointer()); if (convertedTransform.IsNull()) { itkGenericExceptionMacro("Could not create an instance of " << transformName); @@ -250,7 +250,7 @@ namespace /* Changes the precision type of input transform to the requested precision type */ template inline void -AddToTransformList(typename TInputTransformType::ConstPointer & transform, +AddToTransformList(typename TInputTransformType::ConstPointer & transform, std::list & transformList) { using InputParameterValueType = typename TInputTransformType::ParametersValueType; @@ -266,7 +266,7 @@ AddToTransformList(typename TInputTransformType::ConstPointer & tran using OutputTransformConstPointer = typename OutputTransformType::ConstPointer; using OutputTransformListType = std::list; - const std::string transformName = transform->GetTransformTypeAsString(); + const std::string transformName = transform->GetTransformTypeAsString(); OutputTransformPointer convertedTransform; using IOhelper = TransformIOHelper; @@ -307,7 +307,7 @@ AddToTransformList(typename TInputTransformType::ConstPointer & tran // get the input sub transform const InputTransformType * const inSub = it->GetPointer(); // convert each sub transform and push them to the output transform list - const std::string inSubName = inSub->GetTransformTypeAsString(); + const std::string inSubName = inSub->GetTransformTypeAsString(); OutputTransformPointer convertedSub = IOhelper::CreateNewTypeTransform(inSubName); IOhelper::SetAllParameters(inSub, convertedSub); // push back the converted sub transform to the composite transform list @@ -326,7 +326,7 @@ AddToTransformList(typename TInputTransformType::ConstPointer & tran template <> // If types match, no conversion void AddToTransformList, TransformBaseTemplate>( - TransformBaseTemplate::ConstPointer & transform, + TransformBaseTemplate::ConstPointer & transform, std::list::ConstPointer> & transformList) { transformList.push_back(transform); @@ -335,7 +335,7 @@ AddToTransformList, TransformBaseTemplate> template <> // If types match, no conversion void AddToTransformList, TransformBaseTemplate>( - TransformBaseTemplate::ConstPointer & transform, + TransformBaseTemplate::ConstPointer & transform, std::list::ConstPointer> & transformList) { transformList.push_back(transform); diff --git a/Modules/IO/TransformFactory/include/itkTransformFactoryBase.h b/Modules/IO/TransformFactory/include/itkTransformFactoryBase.h index cd61f59decb..34707a3147a 100644 --- a/Modules/IO/TransformFactory/include/itkTransformFactoryBase.h +++ b/Modules/IO/TransformFactory/include/itkTransformFactoryBase.h @@ -84,10 +84,10 @@ class TransformFactoryBase : public ObjectFactoryBase * and \b GetGlobalWarningDisplay to true. */ void - RegisterTransform(const char * classOverride, - const char * overrideClassName, - const char * description, - bool enableFlag, + RegisterTransform(const char * classOverride, + const char * overrideClassName, + const char * description, + bool enableFlag, CreateObjectFunctionBase * createFunction) { diff --git a/Modules/IO/TransformFactory/test/itkTransformFactoryBaseTest.cxx b/Modules/IO/TransformFactory/test/itkTransformFactoryBaseTest.cxx index 9cf94e2e501..374d88c490a 100644 --- a/Modules/IO/TransformFactory/test/itkTransformFactoryBaseTest.cxx +++ b/Modules/IO/TransformFactory/test/itkTransformFactoryBaseTest.cxx @@ -258,9 +258,9 @@ itkTransformFactoryBaseTest(int, char *[]) // test other methods const itk::TransformFactoryBase::Pointer base = itk::TransformFactoryBase::New(); - const char * itkVersion = base->GetITKSourceVersion(); - const char * description = base->GetDescription(); - const char * type = base->GetNameOfClass(); + const char * itkVersion = base->GetITKSourceVersion(); + const char * description = base->GetDescription(); + const char * type = base->GetNameOfClass(); if (strcmp(itkVersion, ITK_SOURCE_VERSION) != 0) { std::cout << "[FAILED] Did not report version correctly" << std::endl; diff --git a/Modules/IO/TransformHDF5/src/itkHDF5TransformIO.cxx b/Modules/IO/TransformHDF5/src/itkHDF5TransformIO.cxx index 07cd95f1e22..55a694f0bad 100644 --- a/Modules/IO/TransformHDF5/src/itkHDF5TransformIO.cxx +++ b/Modules/IO/TransformHDF5/src/itkHDF5TransformIO.cxx @@ -114,10 +114,10 @@ HDF5TransformIOTemplate::GetH5TypeFromString() const /** Write a Parameter array to the location specified by name */ template void -HDF5TransformIOTemplate::WriteParameters(const std::string & name, +HDF5TransformIOTemplate::WriteParameters(const std::string & name, const ParametersType & parameters) { - const hsize_t dim(parameters.Size()); + const hsize_t dim(parameters.Size()); const H5::DataSpace paramSpace(1, &dim); H5::DataSet paramSet; @@ -133,7 +133,7 @@ HDF5TransformIOTemplate::WriteParameters(const std::string const H5::DSetCreatPropList plist; plist.setDeflate(5); // Set intermediate compression level constexpr hsize_t oneMegabyte = 1024 * 1024; - const hsize_t chunksize = (dim > oneMegabyte) ? oneMegabyte : dim; // Use chunks of 1 MB if large, else use dim + const hsize_t chunksize = (dim > oneMegabyte) ? oneMegabyte : dim; // Use chunks of 1 MB if large, else use dim plist.setChunk(1, &chunksize); paramSet = this->m_H5File->createDataSet(name, h5StorageIdentifier, paramSpace, plist); @@ -148,12 +148,12 @@ HDF5TransformIOTemplate::WriteParameters(const std::string template void -HDF5TransformIOTemplate::WriteFixedParameters(const std::string & name, +HDF5TransformIOTemplate::WriteFixedParameters(const std::string & name, const FixedParametersType & fixedParameters) { - const hsize_t dim(fixedParameters.Size()); + const hsize_t dim(fixedParameters.Size()); const H5::DataSpace paramSpace(1, &dim); - H5::DataSet paramSet = this->m_H5File->createDataSet(name, H5::PredType::NATIVE_DOUBLE, paramSpace); + H5::DataSet paramSet = this->m_H5File->createDataSet(name, H5::PredType::NATIVE_DOUBLE, paramSpace); paramSet.write(fixedParameters.data_block(), H5::PredType::NATIVE_DOUBLE); paramSet.close(); } @@ -164,7 +164,7 @@ auto HDF5TransformIOTemplate::ReadParameters(const std::string & DataSetName) const -> ParametersType { - H5::DataSet paramSet = this->m_H5File->openDataSet(DataSetName); + H5::DataSet paramSet = this->m_H5File->openDataSet(DataSetName); const H5T_class_t Type = paramSet.getTypeClass(); if (Type != H5T_FLOAT) { @@ -210,7 +210,7 @@ HDF5TransformIOTemplate::ReadFixedParameters(const std::st -> FixedParametersType { - H5::DataSet paramSet = this->m_H5File->openDataSet(DataSetName); + H5::DataSet paramSet = this->m_H5File->openDataSet(DataSetName); const H5T_class_t Type = paramSet.getTypeClass(); if (Type != H5T_FLOAT) { @@ -255,10 +255,10 @@ template void HDF5TransformIOTemplate::WriteString(const std::string & path, const std::string & value) { - constexpr hsize_t numStrings(1); + constexpr hsize_t numStrings(1); const H5::DataSpace strSpace(1, &numStrings); - const H5::StrType strType(H5::PredType::C_S1, H5T_VARIABLE); - H5::DataSet strSet = this->m_H5File->createDataSet(path, strType, strSpace); + const H5::StrType strType(H5::PredType::C_S1, H5T_VARIABLE); + H5::DataSet strSet = this->m_H5File->createDataSet(path, strType, strSpace); strSet.write(value, strType); strSet.close(); } @@ -304,10 +304,10 @@ HDF5TransformIOTemplate::Read() // read transform type std::string transformType; { - constexpr hsize_t numStrings(1); + constexpr hsize_t numStrings(1); const H5::DataSpace strSpace(1, &numStrings); - const H5::StrType typeType(H5::PredType::C_S1, H5T_VARIABLE); - std::string typeName(transformName); + const H5::StrType typeType(H5::PredType::C_S1, H5T_VARIABLE); + std::string typeName(transformName); typeName += transformTypeName; H5::DataSet typeSet = this->m_H5File->openDataSet(typeName); typeSet.read(transformType, typeType, strSpace); @@ -366,7 +366,7 @@ HDF5TransformIOTemplate::Read() template void -HDF5TransformIOTemplate::WriteOneTransform(const int transformIndex, +HDF5TransformIOTemplate::WriteOneTransform(const int transformIndex, const TransformType * curTransform) { const std::string transformName(GetTransformName(transformIndex)); @@ -393,11 +393,11 @@ HDF5TransformIOTemplate::WriteOneTransform(const int // // write out Fixed Parameters const FixedParametersType FixedtmpArray = curTransform->GetFixedParameters(); - const std::string fixedParamsName(transformName + transformFixedName); + const std::string fixedParamsName(transformName + transformFixedName); this->WriteFixedParameters(fixedParamsName, FixedtmpArray); // parameters const ParametersType tmpArray = curTransform->GetParameters(); - const std::string paramsName(transformName + transformParamsName); + const std::string paramsName(transformName + transformParamsName); this->WriteParameters(paramsName, tmpArray); } } diff --git a/Modules/IO/TransformHDF5/test/itkIOTransformHDF5Test.cxx b/Modules/IO/TransformHDF5/test/itkIOTransformHDF5Test.cxx index 0909f884c3b..15e97b6d502 100644 --- a/Modules/IO/TransformHDF5/test/itkIOTransformHDF5Test.cxx +++ b/Modules/IO/TransformHDF5/test/itkIOTransformHDF5Test.cxx @@ -45,13 +45,13 @@ ReadWriteTest(const std::string fileName, const bool isRealDisplacementField, co constexpr double aNumberThatCanNotBeRepresentedInFloatingPoint = 1e-5 + 1e-7 + 1e-9 + 1e-13; constexpr double requiredSpacing = 1.2 + aNumberThatCanNotBeRepresentedInFloatingPoint; constexpr double requiredOrigin = 23.0 + aNumberThatCanNotBeRepresentedInFloatingPoint; - auto displacementTransform = DisplacementTransformType::New(); + auto displacementTransform = DisplacementTransformType::New(); using FieldType = typename DisplacementTransformType::DisplacementFieldType; auto knownField = FieldType::New(); // This is based on itk::Image { - constexpr int dimLength = 20; - auto size = FieldType::SizeType::Filled(dimLength); - const typename FieldType::IndexType start{}; + constexpr int dimLength = 20; + auto size = FieldType::SizeType::Filled(dimLength); + const typename FieldType::IndexType start{}; const typename FieldType::RegionType region{ start, size }; knownField->SetRegions(region); diff --git a/Modules/IO/TransformInsightLegacy/src/itkTxtTransformIO.cxx b/Modules/IO/TransformInsightLegacy/src/itkTxtTransformIO.cxx index 07c7f56ec60..083edeed24c 100644 --- a/Modules/IO/TransformInsightLegacy/src/itkTxtTransformIO.cxx +++ b/Modules/IO/TransformInsightLegacy/src/itkTxtTransformIO.cxx @@ -60,7 +60,7 @@ template std::string TxtTransformIOTemplate::trim(const std::string & source, const char * delims) { - std::string result(source); + std::string result(source); std::string::size_type index = result.find_last_not_of(delims); if (index != std::string::npos) @@ -92,7 +92,7 @@ TxtTransformIOTemplate::ReadComponentFile(std::string Valu const std::string filePath = itksys::SystemTools::GetFilenamePath(this->GetFileName()) + "/"; /* Use TransformFileReader to read each component file. */ - auto reader = TransformFileReaderTemplate::New(); + auto reader = TransformFileReaderTemplate::New(); const std::string componentFullPath = filePath + Value; reader->SetFileName(componentFullPath); try @@ -112,7 +112,7 @@ void TxtTransformIOTemplate::Read() { TransformPointer transform; - std::ifstream in; + std::ifstream in; in.open(this->GetFileName(), std::ios::in | std::ios::binary); if (in.fail()) @@ -159,7 +159,7 @@ TxtTransformIOTemplate::Read() itkExceptionMacro("Tags must be delimited by :"); } const std::string Name = trim(line.substr(0, end)); - std::string Value = trim(line.substr(end + 1, line.length())); + std::string Value = trim(line.substr(end + 1, line.length())); // Push back itkDebugMacro("Name: \"" << Name << '"'); itkDebugMacro("Value: \"" << Value << '"'); diff --git a/Modules/IO/TransformInsightLegacy/test/itkIOTransformTxtTest.cxx b/Modules/IO/TransformInsightLegacy/test/itkIOTransformTxtTest.cxx index 4c850786f42..f2260c79cba 100644 --- a/Modules/IO/TransformInsightLegacy/test/itkIOTransformTxtTest.cxx +++ b/Modules/IO/TransformInsightLegacy/test/itkIOTransformTxtTest.cxx @@ -94,7 +94,7 @@ oneTest(const std::string & outputDirectory, const char * goodname, const char * try { const typename itk::TransformFileReaderTemplate::TransformListType * list = reader->GetTransformList(); - auto lit = list->begin(); + auto lit = list->begin(); while (lit != list->end()) { (*lit)->Print(std::cout); @@ -219,7 +219,7 @@ secondTest(const std::string & outputDirectory) reader->Update(); std::cerr << "FAILED to throw expected exception" << std::endl; const typename itk::TransformFileReaderTemplate::TransformListType * list = reader->GetTransformList(); - auto lit = list->begin(); + auto lit = list->begin(); while (lit != list->end()) { (*lit)->Print(std::cout); @@ -264,8 +264,8 @@ itkIOTransformTxtTest(int argc, char * argv[]) itksys::SystemTools::ChangeDirectory(argv[1]); } const std::string outputDirectory = std::string(argv[1]) + "/"; - const int result1 = oneTest(outputDirectory, "Transforms_float.txt", "TransformsBad_float.txt"); - const int result2 = secondTest(outputDirectory); + const int result1 = oneTest(outputDirectory, "Transforms_float.txt", "TransformsBad_float.txt"); + const int result2 = secondTest(outputDirectory); const int result3 = oneTest(outputDirectory, "Transforms_double.txt", "TransformsBad_double.txt"); const int result4 = secondTest(outputDirectory); diff --git a/Modules/IO/TransformMINC/include/itkMINCTransformAdapter.h b/Modules/IO/TransformMINC/include/itkMINCTransformAdapter.h index cc0bfd110d0..3482a396635 100644 --- a/Modules/IO/TransformMINC/include/itkMINCTransformAdapter.h +++ b/Modules/IO/TransformMINC/include/itkMINCTransformAdapter.h @@ -128,8 +128,8 @@ class ITK_TEMPLATE_EXPORT MINCTransformAdapter void estimate_local_jacobian(const InputPointType & orig, vnl_matrix_fixed & m) { - double u1, v1, w1; - double u2, v2, w2; + double u1, v1, w1; + double u2, v2, w2; constexpr double delta = 1e-4; general_transform_point((m_Invert ? &m_Xfm_inv : &m_Xfm), orig[0] - delta, orig[1], orig[2], &u1, &v1, &w1); diff --git a/Modules/IO/TransformMINC/include/itkMINCTransformIO.h b/Modules/IO/TransformMINC/include/itkMINCTransformIO.h index a0e945e0972..e9f7db4efb6 100644 --- a/Modules/IO/TransformMINC/include/itkMINCTransformIO.h +++ b/Modules/IO/TransformMINC/include/itkMINCTransformIO.h @@ -85,17 +85,17 @@ class ITK_TEMPLATE_EXPORT MINCTransformIOTemplate : public TransformIOBaseTempla ~MINCTransformIOTemplate() override; VIO_General_transform m_XFM{}; - bool m_XFM_initialized{}; + bool m_XFM_initialized{}; private: void _cleanup(); void - WriteOneTransform(const int transformIndex, - const TransformType * transform, + WriteOneTransform(const int transformIndex, + const TransformType * transform, std::vector & _xfm, - const char * xfm_file_base, - int & serial); + const char * xfm_file_base, + int & serial); void ReadOneTransform(VIO_General_transform * xfm); diff --git a/Modules/IO/TransformMINC/src/itkMINCTransformIO.cxx b/Modules/IO/TransformMINC/src/itkMINCTransformIO.cxx index d87a1fe117c..8f06fabad3d 100644 --- a/Modules/IO/TransformMINC/src/itkMINCTransformIO.cxx +++ b/Modules/IO/TransformMINC/src/itkMINCTransformIO.cxx @@ -86,7 +86,7 @@ MINCTransformIOTemplate::ReadOneTransform(VIO_General_tran VIO_Transform * lin = get_linear_transform_ptr(xfm); TransformPointer transform; - std::string transformTypeName = "AffineTransform_"; + std::string transformTypeName = "AffineTransform_"; transformTypeName += typeNameString; transformTypeName += "_3_3"; this->CreateTransform(transform, transformTypeName); @@ -148,7 +148,7 @@ MINCTransformIOTemplate::ReadOneTransform(VIO_General_tran typename GridImageType::Pointer grid = reader->GetOutput(); TransformPointer transform; - std::string transformTypeName = "DisplacementFieldTransform_"; + std::string transformTypeName = "DisplacementFieldTransform_"; transformTypeName += typeNameString; transformTypeName += "_3_3"; this->CreateTransform(transform, transformTypeName); @@ -194,11 +194,11 @@ MINCTransformIOTemplate::Read() template void -MINCTransformIOTemplate::WriteOneTransform(const int transformIndex, - const TransformType * curTransform, +MINCTransformIOTemplate::WriteOneTransform(const int transformIndex, + const TransformType * curTransform, std::vector & xfm, - const char * xfm_file_base, - int & serial) + const char * xfm_file_base, + int & serial) { const std::string transformType = curTransform->GetTransformTypeAsString(); @@ -246,7 +246,7 @@ MINCTransformIOTemplate::WriteOneTransform(const int using GridImageType = typename DisplacementFieldTransformType::DisplacementFieldType; using MincWriterType = ImageFileWriter; auto * _grid_transform = static_cast(const_cast(curTransform)); - char tmp[1024]; + char tmp[1024]; snprintf(tmp, sizeof(tmp), "%s_grid_%d.mnc", xfm_file_base, serial); ++serial; diff --git a/Modules/IO/TransformMINC/test/itkIOTransformMINCTest.cxx b/Modules/IO/TransformMINC/test/itkIOTransformMINCTest.cxx index 71f5e22ce8d..0a74fb8e670 100644 --- a/Modules/IO/TransformMINC/test/itkIOTransformMINCTest.cxx +++ b/Modules/IO/TransformMINC/test/itkIOTransformMINCTest.cxx @@ -160,11 +160,11 @@ check_nonlinear_double(const char * nonlinear_transform) auto field = DisplacementFieldType::New(); // create zero displacement field - DisplacementFieldType::SizeType imageSize3D = { { 10, 10, 10 } }; + DisplacementFieldType::SizeType imageSize3D = { { 10, 10, 10 } }; DisplacementFieldType::IndexType startIndex3D = { { 0, 0, 0 } }; - double spacing[] = { 2.0, 2.0, 2.0 }; - double origin[] = { -10.0, -10.0, -10.0 }; + double spacing[] = { 2.0, 2.0, 2.0 }; + double origin[] = { -10.0, -10.0, -10.0 }; DisplacementFieldType::RegionType region; region.SetSize(imageSize3D); @@ -179,7 +179,7 @@ check_nonlinear_double(const char * nonlinear_transform) DisplacementFieldType::PixelType zeroDisplacement{}; field->FillBuffer(zeroDisplacement); - vnl_random randgen(12345678); + vnl_random randgen(12345678); itk::ImageRegionIterator it(field, field->GetLargestPossibleRegion()); for (it.GoToBegin(); !it.IsAtEnd(); ++it) @@ -286,11 +286,11 @@ check_nonlinear_float(const char * nonlinear_transform) auto field = DisplacementFieldType::New(); // create zero displacement field - DisplacementFieldType::SizeType imageSize3D = { { 10, 10, 10 } }; + DisplacementFieldType::SizeType imageSize3D = { { 10, 10, 10 } }; DisplacementFieldType::IndexType startIndex3D = { { 0, 0, 0 } }; - double spacing[] = { 2.0, 2.0, 2.0 }; - double origin[] = { -10.0, -10.0, -10.0 }; + double spacing[] = { 2.0, 2.0, 2.0 }; + double origin[] = { -10.0, -10.0, -10.0 }; DisplacementFieldType::RegionType region; region.SetSize(imageSize3D); @@ -305,7 +305,7 @@ check_nonlinear_float(const char * nonlinear_transform) DisplacementFieldType::PixelType zeroDisplacement{}; field->FillBuffer(zeroDisplacement); - vnl_random randgen(12345678); + vnl_random randgen(12345678); itk::ImageRegionIterator it(field, field->GetLargestPossibleRegion()); for (it.GoToBegin(); !it.IsAtEnd(); ++it) @@ -415,7 +415,7 @@ secondTest() reader->Update(); const TransformFileReader::TransformListType * list = reader->GetTransformList(); - auto lit = list->begin(); + auto lit = list->begin(); while (lit != list->end()) { (*lit)->Print(std::cout); @@ -556,11 +556,11 @@ check_composite2(const char * transform_file, const char * transform_grid_file) auto field = DisplacementFieldType::New(); // create zero displacement field - DisplacementFieldType::SizeType imageSize3D = { { 10, 10, 10 } }; + DisplacementFieldType::SizeType imageSize3D = { { 10, 10, 10 } }; DisplacementFieldType::IndexType startIndex3D = { { 0, 0, 0 } }; - double spacing[] = { 2.0, 2.0, 2.0 }; - double origin[] = { -10.0, -10.0, -10.0 }; + double spacing[] = { 2.0, 2.0, 2.0 }; + double origin[] = { -10.0, -10.0, -10.0 }; DisplacementFieldType::RegionType region; region.SetSize(imageSize3D); @@ -619,7 +619,7 @@ check_composite2(const char * transform_file, const char * transform_grid_file) std::cout << "Testing that transformations is expected ..." << std::endl; - CompositeTransformType::InputPointType pnt; + CompositeTransformType::InputPointType pnt; CompositeTransformType::OutputPointType v, v2; pnt[0] = 1.0; diff --git a/Modules/IO/TransformMINC/test/itkMINCTransformAdapterTest.cxx b/Modules/IO/TransformMINC/test/itkMINCTransformAdapterTest.cxx index 799fcc0d74a..f5febf06c82 100644 --- a/Modules/IO/TransformMINC/test/itkMINCTransformAdapterTest.cxx +++ b/Modules/IO/TransformMINC/test/itkMINCTransformAdapterTest.cxx @@ -32,7 +32,7 @@ static constexpr double tolerance = 1e-5; -static constexpr int point_counter = 1000; +static constexpr int point_counter = 1000; template @@ -140,11 +140,11 @@ compare_nonlinear_double(const char * nonlinear_transform) auto field = DisplacementFieldType::New(); // create zero displacement field - DisplacementFieldType::SizeType imageSize3D = { { 10, 10, 10 } }; + DisplacementFieldType::SizeType imageSize3D = { { 10, 10, 10 } }; DisplacementFieldType::IndexType startIndex3D = { { 0, 0, 0 } }; - double spacing[] = { 2.0, 2.0, 2.0 }; - double origin[] = { -10.0, -10.0, -10.0 }; + double spacing[] = { 2.0, 2.0, 2.0 }; + double origin[] = { -10.0, -10.0, -10.0 }; DisplacementFieldType::RegionType region; region.SetSize(imageSize3D); @@ -159,7 +159,7 @@ compare_nonlinear_double(const char * nonlinear_transform) DisplacementFieldType::PixelType zeroDisplacement{}; field->FillBuffer(zeroDisplacement); - vnl_random randgen(12345678); + vnl_random randgen(12345678); itk::ImageRegionIteratorWithIndex it(field, field->GetLargestPossibleRegion()); for (it.GoToBegin(); !it.IsAtEnd(); ++it) @@ -204,7 +204,7 @@ compare_nonlinear_double(const char * nonlinear_transform) { DisplacementFieldTransform::OutputPointType v1; DisplacementFieldTransform::OutputPointType v2; - DisplacementFieldType::PointType pnt; + DisplacementFieldType::PointType pnt; field->TransformIndexToPhysicalPoint(it.GetIndex(), pnt); @@ -245,7 +245,7 @@ itkMINCTransformAdapterTest(int argc, char * argv[]) // Test exceptions TransformAdapterType::InputVectorType vector{}; - TransformAdapterType::InputPointType point{}; + TransformAdapterType::InputPointType point{}; ITK_TRY_EXPECT_EXCEPTION(xfm->TransformVector(vector, point)); TransformAdapterType::InputVnlVectorType vnlVector{}; diff --git a/Modules/IO/TransformMatlab/src/itkMatlabTransformIO.cxx b/Modules/IO/TransformMatlab/src/itkMatlabTransformIO.cxx index 1d15346d5b2..6d58d498b63 100644 --- a/Modules/IO/TransformMatlab/src/itkMatlabTransformIO.cxx +++ b/Modules/IO/TransformMatlab/src/itkMatlabTransformIO.cxx @@ -49,7 +49,7 @@ MatlabTransformIOTemplate::CanWriteFile(const char * fileNa // but handle single precision as well. template inline void -ReadMat(vnl_matlab_readhdr & mathdr, +ReadMat(vnl_matlab_readhdr & mathdr, typename MatlabTransformIOTemplate::TransformType::ParametersType & array) { if (mathdr.is_single()) @@ -127,7 +127,7 @@ MatlabTransformIOTemplate::Write() auto it = this->GetWriteTransformList().begin(); typename MatlabTransformIOTemplate::TransformType::ParametersType TempArray; - std::ofstream out; + std::ofstream out; this->OpenStream(out, true); while (it != this->GetWriteTransformList().end()) { diff --git a/Modules/IO/TransformMatlab/test/itkIOTransformMatlabTest.cxx b/Modules/IO/TransformMatlab/test/itkIOTransformMatlabTest.cxx index f1da433d5ce..69c40d5176b 100644 --- a/Modules/IO/TransformMatlab/test/itkIOTransformMatlabTest.cxx +++ b/Modules/IO/TransformMatlab/test/itkIOTransformMatlabTest.cxx @@ -89,7 +89,7 @@ oneTest(const char * goodname, const char * badname) try { const typename TransformReaderType::TransformListType * list = reader->GetTransformList(); - auto lit = list->begin(); + auto lit = list->begin(); while (lit != list->end()) { (*lit)->Print(std::cout); @@ -203,7 +203,7 @@ secondTest() reader->Update(); std::cerr << "FAILED to throw expected exception" << std::endl; const typename TransformReaderType::TransformListType * list = reader->GetTransformList(); - auto lit = list->begin(); + auto lit = list->begin(); while (lit != list->end()) { (*lit)->Print(std::cout); diff --git a/Modules/IO/VTK/include/itkVTKImageIO.h b/Modules/IO/VTK/include/itkVTKImageIO.h index f8c3e84bc1b..c41b3c0af7a 100644 --- a/Modules/IO/VTK/include/itkVTKImageIO.h +++ b/Modules/IO/VTK/include/itkVTKImageIO.h @@ -157,7 +157,7 @@ class ITKIOVTK_EXPORT VTKImageIO : public StreamingImageIOBase private: void - SetPixelTypeFromString(const std::string & pixelType); + SetPixelTypeFromString(const std::string & pixelType); std::string GetComponentTypeAsString(IOComponentEnum); /** Return the number of pixels in the IOregion. */ diff --git a/Modules/IO/VTK/src/itkVTKImageIO.cxx b/Modules/IO/VTK/src/itkVTKImageIO.cxx index a13e64fa071..ba0e7c838b1 100644 --- a/Modules/IO/VTK/src/itkVTKImageIO.cxx +++ b/Modules/IO/VTK/src/itkVTKImageIO.cxx @@ -74,7 +74,7 @@ bool VTKImageIO::CanReadFile(const char * filename) { std::ifstream file; - std::string fname(filename); + std::string fname(filename); if (!this->HasSupportedReadExtension(filename)) { @@ -314,7 +314,7 @@ VTKImageIO::InternalReadImageInformation(std::ifstream & file) { readAttribute = true; - char pixelType[256]; + char pixelType[256]; unsigned int numComp = 1; // numComp is optional sscanf(text.c_str(), "%*s %*s %s %u", pixelType, &numComp); @@ -417,8 +417,8 @@ void ReadTensorBuffer(std::istream & is, TComponent * buffer, const ImageIOBase::SizeType num) { using PrintType = typename itk::NumericTraits::PrintType; - PrintType temp; - TComponent * ptr = buffer; + PrintType temp; + TComponent * ptr = buffer; ImageIOBase::SizeType i = 0; // More than the resulting components because of symmetry. const ImageIOBase::SizeType fileComponents = num / 6 * 9; @@ -454,9 +454,9 @@ ReadTensorBuffer(std::istream & is, TComponent * buffer, const ImageIOBase::Size } // end anonymous namespace void -VTKImageIO::ReadBufferAsASCII(std::istream & is, - void * buffer, - IOComponentEnum ctype, +VTKImageIO::ReadBufferAsASCII(std::istream & is, + void * buffer, + IOComponentEnum ctype, const ImageIOBase::SizeType numComp) { if (this->GetPixelType() == IOPixelEnum::SYMMETRICSECONDRANKTENSOR) @@ -497,8 +497,8 @@ void VTKImageIO::ReadSymmetricTensorBufferAsBinary(std::istream & is, void * buffer, StreamingImageIOBase::SizeType num) { std::streamsize bytesRemaining = num; - const SizeType componentSize = this->GetComponentSize(); - const SizeType pixelSize = componentSize * 6; + const SizeType componentSize = this->GetComponentSize(); + const SizeType pixelSize = componentSize * 6; if (this->GetNumberOfComponents() != 6) { @@ -712,8 +712,8 @@ namespace { template void -WriteTensorBuffer(std::ostream & os, - const TComponent * buffer, +WriteTensorBuffer(std::ostream & os, + const TComponent * buffer, const ImageIOBase::SizeType num, const ImageIOBase::SizeType components) { @@ -725,7 +725,7 @@ WriteTensorBuffer(std::ostream & os, if (components == 3) { const auto zero(TComponent{}); - PrintType e12; + PrintType e12; while (i < num) { // row 1 @@ -778,9 +778,9 @@ WriteTensorBuffer(std::ostream & os, } // end anonymous namespace void -VTKImageIO::WriteBufferAsASCII(std::ostream & os, - const void * buffer, - IOComponentEnum ctype, +VTKImageIO::WriteBufferAsASCII(std::ostream & os, + const void * buffer, + IOComponentEnum ctype, const ImageIOBase::SizeType numComp) { if (this->GetPixelType() == IOPixelEnum::SYMMETRICSECONDRANKTENSOR) @@ -852,14 +852,14 @@ VTKImageIO::WriteBufferAsASCII(std::ostream & os, } void -VTKImageIO::WriteSymmetricTensorBufferAsBinary(std::ostream & os, - const void * buffer, +VTKImageIO::WriteSymmetricTensorBufferAsBinary(std::ostream & os, + const void * buffer, StreamingImageIOBase::SizeType num) { std::streamsize bytesRemaining = num; - const SizeType componentSize = this->GetComponentSize(); - SizeType pixelSize; - constexpr char zero[1024]{}; + const SizeType componentSize = this->GetComponentSize(); + SizeType pixelSize; + constexpr char zero[1024]{}; switch (this->GetNumberOfComponents()) { diff --git a/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx b/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx index b05ceecd4e1..11f51e0dbf1 100644 --- a/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx +++ b/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx @@ -104,7 +104,7 @@ class VTKImageIOTester image->SetRegions(imageSize); image->Allocate(); - unsigned int cnt = 0; + unsigned int cnt = 0; itk::ImageRegionIterator i(image, image->GetLargestPossibleRegion()); i.GoToBegin(); while (!i.IsAtEnd()) @@ -182,7 +182,7 @@ class VTKImageIOTester // Check that the correct content was written to the header. std::ifstream istrm(outputFileName.c_str()); - char firstline[25]; + char firstline[25]; istrm.getline(firstline, 24); istrm.close(); if (strncmp(firstline, "# vtk DataFile Version ", 24) != 0) @@ -204,8 +204,8 @@ class VTKImageIOTester // check the size const typename ImageType::RegionType region = image->GetLargestPossibleRegion(); - typename ImageType::SizeType size = region.GetSize(); - bool sizeGood = true; + typename ImageType::SizeType size = region.GetSize(); + bool sizeGood = true; for (unsigned int i = 0; i < ImageType::GetImageDimension(); ++i) { if (size[i] != 10) @@ -221,8 +221,8 @@ class VTKImageIOTester } // check each pixel - bool pixelsGood = true; - unsigned int cnt = 0; + bool pixelsGood = true; + unsigned int cnt = 0; itk::ImageRegionIterator iter(image, region); iter.GoToBegin(); @@ -358,7 +358,7 @@ itkVTKImageIO2Test(int argc, char * argv[]) } const std::string filePrefix = argv[0]; - std::string outputPath = argv[1]; + std::string outputPath = argv[1]; // // test all usable pixel types diff --git a/Modules/IO/VTK/test/itkVTKImageIO2Test2.cxx b/Modules/IO/VTK/test/itkVTKImageIO2Test2.cxx index fa22d81f532..d10bd3984f7 100644 --- a/Modules/IO/VTK/test/itkVTKImageIO2Test2.cxx +++ b/Modules/IO/VTK/test/itkVTKImageIO2Test2.cxx @@ -56,7 +56,7 @@ itkVTKImageIO2Test2(int argc, char * argv[]) image->SetRegions(imageSize); image->Allocate(); - unsigned int cnt = 0; + unsigned int cnt = 0; itk::ImageRegionIterator i(image, image->GetLargestPossibleRegion()); i.GoToBegin(); while (!i.IsAtEnd()) diff --git a/Modules/IO/VTK/test/itkVTKImageIOStreamTest.cxx b/Modules/IO/VTK/test/itkVTKImageIOStreamTest.cxx index f40a7066a74..47e216c6bd9 100644 --- a/Modules/IO/VTK/test/itkVTKImageIOStreamTest.cxx +++ b/Modules/IO/VTK/test/itkVTKImageIOStreamTest.cxx @@ -137,7 +137,7 @@ TestStreamWrite(char * file1, unsigned int numberOfStreams = 0) constValueImageSource->SetValue(static_cast(23)); constValueImageSource->SetSize(size); - typename ImageType::SpacingValueType spacing[3] = { 5.0f, 10.0f, 15.0f }; + typename ImageType::SpacingValueType spacing[3] = { 5.0f, 10.0f, 15.0f }; const typename ImageType::PointValueType origin[3] = { -5.0f, -10.0f, -15.0f }; constValueImageSource->SetSpacing(spacing); @@ -207,7 +207,7 @@ TestStreamRead(char * file1, unsigned int numberOfStreams = 0) constValueImageSource->SetValue(static_cast(23)); constValueImageSource->SetSize(size); - typename ImageType::SpacingValueType spacing[3] = { 5.0f, 10.0f, 15.0f }; + typename ImageType::SpacingValueType spacing[3] = { 5.0f, 10.0f, 15.0f }; const typename ImageType::PointValueType origin[3] = { -5.0f, -10.0f, -15.0f }; constValueImageSource->SetSpacing(spacing); @@ -240,7 +240,7 @@ TestStreamRead(char * file1, unsigned int numberOfStreams = 0) // Simulate streaming and compares regions numberOfStreams = std::clamp(numberOfStreams, 1u, static_cast(size[TDimension - 1])); const typename ImageType::SizeValueType width = (size[TDimension - 1] + numberOfStreams - 1) / numberOfStreams; - const typename ImageType::RegionType totalRegion = consValueImage->GetLargestPossibleRegion(); + const typename ImageType::RegionType totalRegion = consValueImage->GetLargestPossibleRegion(); ImageType * readImage = reader->GetOutput(); consValueImage->SetRequestedRegion(totalRegion); @@ -290,7 +290,7 @@ itkVTKImageIOStreamTest(int argc, char * argv[]) } constexpr unsigned int numberOfStreams = 2; - int status = 0; + int status = 0; #define ReadWriteTestMACRO(scalarType) \ status += TestStreamWrite(argv[1], 0); \ diff --git a/Modules/IO/VTK/test/itkVTKImageIOTest.cxx b/Modules/IO/VTK/test/itkVTKImageIOTest.cxx index a207c281c37..4c18ebe070a 100644 --- a/Modules/IO/VTK/test/itkVTKImageIOTest.cxx +++ b/Modules/IO/VTK/test/itkVTKImageIOTest.cxx @@ -49,7 +49,7 @@ ReadWrite(TScalar low, TScalar hi, char * file1, char * file2, bool ascii) random->SetSize(size); typename ImageType::SpacingValueType spacing[3] = { 5.0f, 10.0f, 15.0f }; - typename ImageType::PointValueType origin[3] = { -5.0f, -10.0f, -15.0f }; + typename ImageType::PointValueType origin[3] = { -5.0f, -10.0f, -15.0f }; random->SetSpacing(spacing); random->SetOrigin(origin); @@ -76,7 +76,7 @@ ReadWrite(TScalar low, TScalar hi, char * file1, char * file2, bool ascii) // Check that the correct content was written to the header. std::ifstream istrm(file1); - char firstline[25]; + char firstline[25]; istrm.getline(firstline, 24); istrm.close(); if (strncmp(firstline, "# vtk DataFile Version ", 24) != 0) diff --git a/Modules/IO/XML/include/itkDOMReader.hxx b/Modules/IO/XML/include/itkDOMReader.hxx index b387538d423..dc3e60a71ef 100644 --- a/Modules/IO/XML/include/itkDOMReader.hxx +++ b/Modules/IO/XML/include/itkDOMReader.hxx @@ -92,7 +92,7 @@ DOMReader::Update(const DOMNodeType * inputdom, const void * userdata) this->GetLogger()->SetName(this->GetNameOfClass()); // variable/info needed for logging - FancyString info; + FancyString info; const FancyString tagname = inputdom->GetName(); // log start of reading diff --git a/Modules/IO/XML/include/itkDOMWriter.hxx b/Modules/IO/XML/include/itkDOMWriter.hxx index 10f56ab369d..bf28bf04a04 100644 --- a/Modules/IO/XML/include/itkDOMWriter.hxx +++ b/Modules/IO/XML/include/itkDOMWriter.hxx @@ -90,7 +90,7 @@ DOMWriter::Update(DOMNodeType * outputdom, const void * userdata) this->GetLogger()->SetName(this->GetNameOfClass()); // variable/info needed for logging - FancyString info; + FancyString info; const FancyString objname = this->GetInput()->GetNameOfClass(); // log start of writing diff --git a/Modules/IO/XML/include/itkXMLFile.h b/Modules/IO/XML/include/itkXMLFile.h index 483fb192277..524a904fdf3 100644 --- a/Modules/IO/XML/include/itkXMLFile.h +++ b/Modules/IO/XML/include/itkXMLFile.h @@ -216,8 +216,8 @@ class ITK_TEMPLATE_EXPORT XMLWriterBase : public LightProcessObject #endif protected: - T * m_InputObject{}; // object to write out to an XML file - std::string m_Filename{}; // name of file to write. + T * m_InputObject{}; // object to write out to an XML file + std::string m_Filename{}; // name of file to write. }; } // namespace itk #endif diff --git a/Modules/IO/XML/src/itkDOMNode.cxx b/Modules/IO/XML/src/itkDOMNode.cxx index 0ff1310c712..5cb97b7862d 100644 --- a/Modules/IO/XML/src/itkDOMNode.cxx +++ b/Modules/IO/XML/src/itkDOMNode.cxx @@ -503,7 +503,7 @@ DOMNode::Find(const std::string & path) else if (s[0] >= '0' && s[0] <= '9') { std::istringstream iss(s); - unsigned int i = 0; + unsigned int i = 0; iss >> i; if (!iss.fail()) { @@ -518,7 +518,7 @@ DOMNode::Find(const std::string & path) { s = s.substr(1); std::istringstream iss(s); - unsigned int i = 0; + unsigned int i = 0; iss >> i; if (!iss.fail()) { @@ -538,7 +538,7 @@ DOMNode::Find(const std::string & path) { s = s.substr(1); std::istringstream iss(s); - unsigned int i = 0; + unsigned int i = 0; iss >> i; if (!iss.fail()) { @@ -579,7 +579,7 @@ DOMNode::Find(const std::string & path) const std::string s2 = s.substr(pos + 1); s = s.substr(0, pos); std::istringstream iss(s2); - IdentifierType i = 0; + IdentifierType i = 0; iss >> i; if (!iss.fail()) { diff --git a/Modules/IO/XML/src/itkDOMNodeXMLReader.cxx b/Modules/IO/XML/src/itkDOMNodeXMLReader.cxx index 59a5049aed1..8839fe790c0 100644 --- a/Modules/IO/XML/src/itkDOMNodeXMLReader.cxx +++ b/Modules/IO/XML/src/itkDOMNodeXMLReader.cxx @@ -93,7 +93,7 @@ DOMNodeXMLReader::Update(std::istream & is) const bool ok = XML_Parse(parser, s.data(), static_cast(s.size()), false); if (!ok) { - ExceptionObject e(__FILE__, __LINE__); + ExceptionObject e(__FILE__, __LINE__); const std::string message(XML_ErrorString(XML_GetErrorCode(parser))); e.SetDescription(message.c_str()); throw e; diff --git a/Modules/IO/XML/src/itkXMLFile.cxx b/Modules/IO/XML/src/itkXMLFile.cxx index 02a1389c8d1..835248a30c5 100644 --- a/Modules/IO/XML/src/itkXMLFile.cxx +++ b/Modules/IO/XML/src/itkXMLFile.cxx @@ -77,7 +77,7 @@ XMLReaderBase::parse() if (inputstream.fail()) { ExceptionObject exception(__FILE__, __LINE__); - std::string message = "Can't open "; + std::string message = "Can't open "; message += m_Filename; message += '\n'; exception.SetDescription(message.c_str()); diff --git a/Modules/IO/XML/test/itkDOMTest2.cxx b/Modules/IO/XML/test/itkDOMTest2.cxx index 33fd19749d8..8032fabcd2f 100644 --- a/Modules/IO/XML/test/itkDOMTest2.cxx +++ b/Modules/IO/XML/test/itkDOMTest2.cxx @@ -72,7 +72,7 @@ itkDOMTest2(int argc, char * argv[]) // write a DOM object to an XML stream const itk::DOMNode::Pointer dom1 = dom; - std::ostringstream oss; + std::ostringstream oss; oss << *dom1; const std::string s = oss.str(); std::cout << "Write DOM object to an output string stream: " << std::endl; @@ -80,7 +80,7 @@ itkDOMTest2(int argc, char * argv[]) // read a DOM object from an XML stream const itk::DOMNode::Pointer dom2 = itk::DOMNode::New(); - std::istringstream iss(s); + std::istringstream iss(s); iss >> *dom2; std::cout << "Read DOM object from an input string stream: " << std::endl; std::cout << *dom2 << std::endl; diff --git a/Modules/IO/XML/test/itkDOMTest6.cxx b/Modules/IO/XML/test/itkDOMTest6.cxx index 232c72d87e3..da45cace071 100644 --- a/Modules/IO/XML/test/itkDOMTest6.cxx +++ b/Modules/IO/XML/test/itkDOMTest6.cxx @@ -159,7 +159,7 @@ testStringToolsWithStdVector() // read all data elements in the string std::vector dataOut1; - std::string s = svalue; + std::string s = svalue; itk::StringTools::ToData(s, dataOut1); // check successful or not if (dataOut1.size() != (dataIn.size() + 1) && dataOut1.back() != 10.0f) @@ -238,7 +238,7 @@ testStringToolsWithItkArray() { using DataType = itk::Array; - DataType dataIn(10, -0.1); + DataType dataIn(10, -0.1); std::string svalue; itk::StringTools::FromData(svalue, dataIn); // add one more data element to the end of the string @@ -246,7 +246,7 @@ testStringToolsWithItkArray() // read all data elements in the string std::string s = svalue; - DataType dataOut1; + DataType dataOut1; itk::StringTools::ToData(s, dataOut1); // check successful or not if (dataOut1.GetSize() != (dataIn.GetSize() + 1) && dataOut1[10] != 10.0) diff --git a/Modules/IO/XML/test/itkDOMTestObjectDOMReader.h b/Modules/IO/XML/test/itkDOMTestObjectDOMReader.h index 4e5260f6995..d57c53b8e39 100644 --- a/Modules/IO/XML/test/itkDOMTestObjectDOMReader.h +++ b/Modules/IO/XML/test/itkDOMTestObjectDOMReader.h @@ -64,7 +64,7 @@ DOMTestObjectDOMReader::GenerateData(const DOMNodeType * inputdom, const void *) this->SetOutput(output); } - FancyString s; + FancyString s; std::ifstream ifs; if (inputdom->GetName() != "DOMTestObject") diff --git a/Modules/IO/XML/test/itkDOMTestObjectDOMWriter.h b/Modules/IO/XML/test/itkDOMTestObjectDOMWriter.h index 0f460e39b54..a9d82980498 100644 --- a/Modules/IO/XML/test/itkDOMTestObjectDOMWriter.h +++ b/Modules/IO/XML/test/itkDOMTestObjectDOMWriter.h @@ -60,7 +60,7 @@ DOMTestObjectDOMWriter::GenerateData(DOMNodeType * outputdom, const void *) cons const InputType * input = this->GetInput(); std::ofstream ofs; - FancyString fn; + FancyString fn; outputdom->SetName("DOMTestObject"); diff --git a/Modules/IO/XML/test/itkFancyStringTest.cxx b/Modules/IO/XML/test/itkFancyStringTest.cxx index 1e3b50327f6..84376a7f40c 100644 --- a/Modules/IO/XML/test/itkFancyStringTest.cxx +++ b/Modules/IO/XML/test/itkFancyStringTest.cxx @@ -155,7 +155,7 @@ testFancyStringWithStdVector() // read all data elements in the string std::vector dataOut1; - itk::FancyString s = svalue; + itk::FancyString s = svalue; s.ToData(dataOut1); // check successful or not if (dataOut1.size() != (dataIn.size() + 1) && dataOut1.back() != 10.0f) @@ -243,7 +243,7 @@ testFancyStringWithItkArray() svalue.Append(" 10 "); // read all data elements in the string - DataType dataOut1; + DataType dataOut1; itk::FancyString s = svalue; s.ToData(dataOut1); // check successful or not @@ -444,7 +444,7 @@ testFancyStringUnequalOperator() { const std::string str = "Hello World!"; - itk::FancyString s1{ str }; + itk::FancyString s1{ str }; const std::string s2{ "Hello World" }; ITK_TEST_EXPECT_TRUE(s1 != s2); @@ -458,13 +458,13 @@ testFancyStringUnequalOperator() { itk::FancyString s1{ "s" }; - const char * s2{ "S" }; + const char * s2{ "S" }; ITK_TEST_EXPECT_TRUE(s1 != s2); } { - itk::FancyString s1{ "Hello World!" }; + itk::FancyString s1{ "Hello World!" }; const itk::FancyString s2{ "Hello World" }; ITK_TEST_EXPECT_TRUE(s1 != s2); @@ -481,7 +481,7 @@ int testFancyStringEqualOperator() { { - itk::FancyString s1{ "Hello World!" }; + itk::FancyString s1{ "Hello World!" }; const std::string s2{ "Hello World!" }; ITK_TEST_EXPECT_TRUE(s1 == s2); @@ -491,13 +491,13 @@ testFancyStringEqualOperator() { itk::FancyString s1{ "s" }; - const char * s2{ "s" }; + const char * s2{ "s" }; ITK_TEST_EXPECT_TRUE(s1 == s2); } { - itk::FancyString s1{ "Hello World!" }; + itk::FancyString s1{ "Hello World!" }; const itk::FancyString s2{ "Hello World!" }; ITK_TEST_EXPECT_TRUE(s1 == s2); diff --git a/Modules/Nonunit/IntegratedTest/test/itkBasicFiltersPrintTest.cxx b/Modules/Nonunit/IntegratedTest/test/itkBasicFiltersPrintTest.cxx index e1a5dad8ce2..0d2ab871d68 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkBasicFiltersPrintTest.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkBasicFiltersPrintTest.cxx @@ -71,8 +71,8 @@ struct node_type { unsigned int value; - node_type * Next; - node_type * Previous; + node_type * Next; + node_type * Previous; }; diff --git a/Modules/Nonunit/IntegratedTest/test/itkBasicFiltersPrintTest2.cxx b/Modules/Nonunit/IntegratedTest/test/itkBasicFiltersPrintTest2.cxx index e104a3c737a..2e65d1013e3 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkBasicFiltersPrintTest2.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkBasicFiltersPrintTest2.cxx @@ -101,8 +101,8 @@ struct node_type { unsigned int value; - node_type * Next; - node_type * Previous; + node_type * Next; + node_type * Previous; }; diff --git a/Modules/Nonunit/IntegratedTest/test/itkCommonPrintTest.cxx b/Modules/Nonunit/IntegratedTest/test/itkCommonPrintTest.cxx index 64cf287a780..548e27808dc 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkCommonPrintTest.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkCommonPrintTest.cxx @@ -95,7 +95,7 @@ struct TestObject { float vector[3]; - int counter; + int counter; }; diff --git a/Modules/Nonunit/IntegratedTest/test/itkNumericsPrintTest.cxx b/Modules/Nonunit/IntegratedTest/test/itkNumericsPrintTest.cxx index c21f5159a67..448a1fd3cd1 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkNumericsPrintTest.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkNumericsPrintTest.cxx @@ -59,8 +59,8 @@ itkNumericsPrintTest(int, char *[]) std::cout << "----------LevenbergMarquardtOptimizer " << LevenbergMarquardtOptimizerObj; using PolynomialType = itk::MultivariateLegendrePolynomial; - constexpr unsigned int dimension = 3; - constexpr unsigned int degree = 3; + constexpr unsigned int dimension = 3; + constexpr unsigned int degree = 3; const PolynomialType::DomainSizeType domainSize(dimension); auto * MultivariateLegendrePolynomialObj = new itk::MultivariateLegendrePolynomial(dimension, degree, domainSize); std::cout << "----------MultivariateLegendrePolynomial " << *MultivariateLegendrePolynomialObj; diff --git a/Modules/Nonunit/IntegratedTest/test/itkPolygonCellTest.cxx b/Modules/Nonunit/IntegratedTest/test/itkPolygonCellTest.cxx index 1ede30724ad..f2ab0496f94 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkPolygonCellTest.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkPolygonCellTest.cxx @@ -89,7 +89,7 @@ itkPolygonCellTest(int, char *[]) * pointer to a cell; in this example it ends up pointing to * different types of cells. */ - CellAutoPointer testCell; + CellAutoPointer testCell; PolygonCellType * newcell = new PolygonCellType; testCell.TakeOwnership(newcell); // polymorphism diff --git a/Modules/Nonunit/IntegratedTest/test/itkShrinkImagePreserveObjectPhysicalLocations.cxx b/Modules/Nonunit/IntegratedTest/test/itkShrinkImagePreserveObjectPhysicalLocations.cxx index 41ddbd106e3..f9a39e92f56 100644 --- a/Modules/Nonunit/IntegratedTest/test/itkShrinkImagePreserveObjectPhysicalLocations.cxx +++ b/Modules/Nonunit/IntegratedTest/test/itkShrinkImagePreserveObjectPhysicalLocations.cxx @@ -110,14 +110,14 @@ TImageType::PointType ComputeCG(TImageType::Pointer img) { itk::ImageRegionConstIteratorWithIndex it(img, img->GetLargestPossibleRegion()); - TImageType::PointType Cg{}; - double sumMass = 0.0; + TImageType::PointType Cg{}; + double sumMass = 0.0; while (!it.IsAtEnd()) { const double value = it.Value(); sumMass += value; const TImageType::IndexType indexPosition = it.GetIndex(); - TImageType::PointType physicalPosition; + TImageType::PointType physicalPosition; img->TransformIndexToPhysicalPoint(indexPosition, physicalPosition); for (unsigned int i = 0; i < TImageType::ImageDimension; ++i) @@ -138,9 +138,9 @@ itkShrinkImagePreserveObjectPhysicalLocations(int, char *[]) { /* Make an image that is 32x32 */ - TImageType::SizeType newSize; + TImageType::SizeType newSize; TImageType::SpacingType newSpacing; - TImageType::PointType newOrigin; + TImageType::PointType newOrigin; for (unsigned int i = 0; i < TImageType::ImageDimension; ++i) { @@ -177,8 +177,8 @@ itkShrinkImagePreserveObjectPhysicalLocations(int, char *[]) } const PyramidFilterType::Pointer MyPyramid = MakeTwoLevelPyramid(image); - const TImageType::Pointer ReallySmallImage = MyPyramid->GetOutput(0); - const TImageType::Pointer SmallImage = MyPyramid->GetOutput(1); + const TImageType::Pointer ReallySmallImage = MyPyramid->GetOutput(0); + const TImageType::Pointer SmallImage = MyPyramid->GetOutput(1); const itk::ShrinkImageFilter::Pointer Shrinkfilter = itk::ShrinkImageFilter::New(); @@ -213,7 +213,7 @@ itkShrinkImagePreserveObjectPhysicalLocations(int, char *[]) // #define WriteDebugImaging #ifdef WriteDebugImaging using WriterType = itk::ImageFileWriter; - auto writer = WriterType::New(); + auto writer = WriterType::New(); itk::CastImageFilter::Pointer castFilter = itk::CastImageFilter::New(); @@ -257,7 +257,7 @@ itkShrinkImagePreserveObjectPhysicalLocations(int, char *[]) // Known CG=[0,0] TImageType::PointType testCG; - int errorCount = 0; + int errorCount = 0; { TImageType::Pointer test = image; std::cout << "\nFullSizeImage..."; diff --git a/Modules/Nonunit/Review/include/itkAttributeMorphologyBaseImageFilter.h b/Modules/Nonunit/Review/include/itkAttributeMorphologyBaseImageFilter.h index 79e98658f77..e1426902077 100644 --- a/Modules/Nonunit/Review/include/itkAttributeMorphologyBaseImageFilter.h +++ b/Modules/Nonunit/Review/include/itkAttributeMorphologyBaseImageFilter.h @@ -159,7 +159,7 @@ class ITK_TEMPLATE_EXPORT AttributeMorphologyBaseImageFilter : public ImageToIma AttributeType m_AttributeValuePerPixel{}; private: - bool m_FullyConnected{}; + bool m_FullyConnected{}; AttributeType m_Lambda{}; // some constants used several times in the code diff --git a/Modules/Nonunit/Review/include/itkAttributeMorphologyBaseImageFilter.hxx b/Modules/Nonunit/Review/include/itkAttributeMorphologyBaseImageFilter.hxx index 96a37ecb6d6..d42b2c7defa 100644 --- a/Modules/Nonunit/Review/include/itkAttributeMorphologyBaseImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkAttributeMorphologyBaseImageFilter.hxx @@ -77,7 +77,7 @@ AttributeMorphologyBaseImageFilterGetOutput(); + typename TOutputImage::Pointer output = this->GetOutput(); typename TInputImage::ConstPointer input = this->GetInput(); // Allocate the output this->AllocateOutputs(); @@ -88,11 +88,11 @@ AttributeMorphologyBaseImageFilter; - FaceCalculatorType faceCalculator; + FaceCalculatorType faceCalculator; typename FaceCalculatorType::FaceListType faceList = faceCalculator(input, output->GetRequestedRegion(), kernelRadius); typename FaceCalculatorType::FaceListType::iterator fit; - ProgressReporter progress(this, 0, buffsize * 4); // pretend we have 4 steps + ProgressReporter progress(this, 0, buffsize * 4); // pretend we have 4 steps fit = faceList.begin(); @@ -124,7 +124,7 @@ AttributeMorphologyBaseImageFilterComputeIndex(ThisPos); - InputPixelType ThisPix = m_Raw[ThisPos]; + IndexType ThisWhere = input->ComputeIndex(ThisPos); + InputPixelType ThisPix = m_Raw[ThisPos]; MakeSet(ThisPos); // Some optimization of bounds check if (fit->IsInside(ThisWhere)) @@ -145,7 +145,7 @@ AttributeMorphologyBaseImageFilterGetRequestedRegion().IsInside(ThisWhere + TheseOffsets[i])) { OffsetValueType NeighInd = ThisPos + TheseDirectOffsets[i]; - InputPixelType NeighPix = m_Raw[NeighInd]; + InputPixelType NeighPix = m_Raw[NeighInd]; if (compare(NeighPix, ThisPix) || ((ThisPix == NeighPix) && (NeighInd < ThisPos))) { Union(NeighInd, ThisPos); @@ -207,17 +207,17 @@ template ::SetupOffsetVec( OffsetDirectVecType & PosOffsets, - OffsetVecType & Offsets) + OffsetVecType & Offsets) { using NeighType = ConstShapedNeighborhoodIterator; - auto KernRad = SizeType::Filled(1); + auto KernRad = SizeType::Filled(1); NeighType It(KernRad, this->GetOutput(), this->GetOutput()->GetRequestedRegion()); setConnectivity(&It, m_FullyConnected); - typename NeighType::IndexListType OffsetList; + typename NeighType::IndexListType OffsetList; typename NeighType::IndexListType::const_iterator LIt; OffsetList = It.GetActiveIndexList(); - IndexType idx = this->GetOutput()->GetRequestedRegion().GetIndex(); + IndexType idx = this->GetOutput()->GetRequestedRegion().GetIndex(); OffsetValueType offset = this->GetOutput()->ComputeOffset(idx); for (LIt = OffsetList.begin(); LIt != OffsetList.end(); ++LIt) diff --git a/Modules/Nonunit/Review/include/itkConformalFlatteningMeshFilter.hxx b/Modules/Nonunit/Review/include/itkConformalFlatteningMeshFilter.hxx index 9a87bbd082d..8014ede32f3 100644 --- a/Modules/Nonunit/Review/include/itkConformalFlatteningMeshFilter.hxx +++ b/Modules/Nonunit/Review/include/itkConformalFlatteningMeshFilter.hxx @@ -84,7 +84,7 @@ ConformalFlatteningMeshFilter::GenerateData() using OutputPointsContainerPointer = typename TOutputMesh::PointsContainerPointer; InputMeshConstPointer inputMesh = this->GetInput(); - OutputMeshPointer outputMesh = this->GetOutput(); + OutputMeshPointer outputMesh = this->GetOutput(); if (!inputMesh) { @@ -246,7 +246,7 @@ ConformalFlatteningMeshFilter::GenerateData() while (cellIterator != cellEnd) { - CellType * aCell = cellIterator.Value(); + CellType * aCell = cellIterator.Value(); unsigned int aCellNumberOfPoints = aCell->GetNumberOfPoints(); if (aCellNumberOfPoints > 3) @@ -486,7 +486,7 @@ ConformalFlatteningMeshFilter::GenerateData() // same number of vertices. std::vector v_r2(numberOfPoints); - auto itv_r2 = v_r2.begin(); + auto itv_r2 = v_r2.begin(); for (i = 0; i < numberOfPoints; ++i, ++itv_r2) { diff --git a/Modules/Nonunit/Review/include/itkDirectFourierReconstructionImageToImageFilter.hxx b/Modules/Nonunit/Review/include/itkDirectFourierReconstructionImageToImageFilter.hxx index 74e3bc85b82..7333375909b 100644 --- a/Modules/Nonunit/Review/include/itkDirectFourierReconstructionImageToImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkDirectFourierReconstructionImageToImageFilter.hxx @@ -47,7 +47,7 @@ DirectFourierReconstructionImageToImageFilter void DirectFourierReconstructionImageToImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -71,7 +71,7 @@ DirectFourierReconstructionImageToImageFilter::Genera Superclass::GenerateOutputInformation(); ConstInputImagePointer inputImage = this->GetInput(); - OutputImagePointer outputImage = this->GetOutput(); + OutputImagePointer outputImage = this->GetOutput(); if (!inputImage || !outputImage) { @@ -79,11 +79,11 @@ DirectFourierReconstructionImageToImageFilter::Genera } RegionType inputRegion = inputImage->GetLargestPossibleRegion(); - IndexType inputStart = inputRegion.GetIndex(); - SizeType inputSize = inputRegion.GetSize(); + IndexType inputStart = inputRegion.GetIndex(); + SizeType inputSize = inputRegion.GetSize(); IndexType outputStart; - SizeType outputSize; + SizeType outputSize; // Conserve axial dimensions outputSize[2] = inputSize[m_ZDirection]; @@ -123,7 +123,7 @@ DirectFourierReconstructionImageToImageFilter::Genera Superclass::GenerateInputRequestedRegion(); OutputImagePointer outputImage = this->GetOutput(); - InputImagePointer inputImage = const_cast(this->GetInput()); + InputImagePointer inputImage = const_cast(this->GetInput()); if (!inputImage || !outputImage) { return; @@ -131,7 +131,7 @@ DirectFourierReconstructionImageToImageFilter::Genera // request maximum angular and radial information / to be optimized - SizeType inputSize = inputImage->GetLargestPossibleRegion().GetSize(); + SizeType inputSize = inputImage->GetLargestPossibleRegion().GetSize(); IndexType inputStart = inputImage->GetLargestPossibleRegion().GetIndex(); // crop to requested z-axis @@ -149,7 +149,7 @@ template void DirectFourierReconstructionImageToImageFilter::GenerateData() { - OutputImagePointer outputImage = this->GetOutput(); + OutputImagePointer outputImage = this->GetOutput(); ConstInputImagePointer inputImage = this->GetInput(); if (!inputImage || !outputImage) @@ -162,11 +162,11 @@ DirectFourierReconstructionImageToImageFilter::Genera // Crop angular input image size to 180 degrees typename InputImageType::RegionType inputROI = m_InputRequestedRegion; - typename InputImageType::SizeType inputROISize = inputROI.GetSize(); - typename InputImageType::IndexType inputROIStart = inputROI.GetIndex(); + typename InputImageType::SizeType inputROISize = inputROI.GetSize(); + typename InputImageType::IndexType inputROIStart = inputROI.GetIndex(); // the number of projections needed to cover 180 degrees - const auto alpha_size = Math::Floor((180 * (inputROISize[m_AlphaDirection])) / m_AlphaRange); + const auto alpha_size = Math::Floor((180 * (inputROISize[m_AlphaDirection])) / m_AlphaRange); const double last_alpha_size = 1 + (180.0 * (inputROISize[m_AlphaDirection])) / m_AlphaRange - alpha_size; inputROIStart[m_AlphaDirection] += (inputROISize[m_AlphaDirection] - alpha_size) / 2; inputROISize[m_AlphaDirection] = alpha_size; @@ -181,10 +181,10 @@ DirectFourierReconstructionImageToImageFilter::Genera inputIt.GoToBegin(); // Setup projection line - auto projectionLine = ProjectionLineType::New(); + auto projectionLine = ProjectionLineType::New(); ProjectionLineType::RegionType pRegion; - ProjectionLineType::SizeType pSize; - ProjectionLineType::IndexType pStart; + ProjectionLineType::SizeType pSize; + ProjectionLineType::IndexType pStart; pSize[0] = inputROISize[m_RDirection] * m_ZeroPadding; pStart[0] = inputROIStart[m_RDirection]; pRegion.SetSize(pSize); @@ -193,7 +193,7 @@ DirectFourierReconstructionImageToImageFilter::Genera projectionLine->AllocateInitialized(); ProjectionLineType::IndexType pIdx; - const unsigned int pLineHalfShift = pSize[0] - inputROISize[m_RDirection] / 2; + const unsigned int pLineHalfShift = pSize[0] - inputROISize[m_RDirection] / 2; // Setup 1D FFT Filter auto FFT = FFTLineFilterType::New(); @@ -209,8 +209,8 @@ DirectFourierReconstructionImageToImageFilter::Genera // Setup cartesian FFTSlice domain FFTSliceType::RegionType FFTSliceRegion; - FFTSliceType::SizeType FFTSliceSize; - FFTSliceType::IndexType FFTSliceStart; + FFTSliceType::SizeType FFTSliceSize; + FFTSliceType::IndexType FFTSliceStart; FFTSliceSize[0] = FFTSliceSize[1] = inputROISize[m_RDirection] * m_ZeroPadding * m_OverSampling; FFTSliceStart[0] = FFTSliceStart[1] = 0; @@ -221,7 +221,7 @@ DirectFourierReconstructionImageToImageFilter::Genera FFTSlice->SetRegions(FFTSliceRegion); FFTSlice->AllocateInitialized(); - FFTSliceIteratorType FFTSliceIt(FFTSlice, FFTSliceRegion); + FFTSliceIteratorType FFTSliceIt(FFTSlice, FFTSliceRegion); FFTSliceType::IndexType sIdx; const double r_max = inputROISize[m_RDirection] * m_ZeroPadding * m_Cutoff / 2.0 - 1; @@ -229,8 +229,8 @@ DirectFourierReconstructionImageToImageFilter::Genera // Only the central frame will be copied to the output OutputSliceType::RegionType outputWindow; - OutputSliceType::SizeType outputWindowSize; - OutputSliceType::IndexType outputWindowStart; + OutputSliceType::SizeType outputWindowSize; + OutputSliceType::IndexType outputWindowStart; const unsigned int outputWindowShift = inputROISize[m_RDirection] * (m_ZeroPadding * m_OverSampling - 1) / 2; const unsigned int outputWindowHalf = inputROISize[m_RDirection] * m_ZeroPadding * m_OverSampling / 2; @@ -243,7 +243,7 @@ DirectFourierReconstructionImageToImageFilter::Genera outputWindow.SetSize(outputWindowSize); outputWindow.SetIndex(outputWindowStart); - OutputSliceType::IndexType wIdx; + OutputSliceType::IndexType wIdx; typename OutputImageType::IndexType oIdx; ProgressReporter progress(this, 0, outputImage->GetRequestedRegion().GetNumberOfPixels()); @@ -281,9 +281,9 @@ DirectFourierReconstructionImageToImageFilter::Genera inputIt.NextLine(); } // while ( !inputIt.IsAtEndOfSlice() ) - double u, v; - double theta, r; - double alpha; + double u, v; + double theta, r; + double alpha; unsigned int a_lo; // Resample the cartesian FFT Slice from polar lines diff --git a/Modules/Nonunit/Review/include/itkGridForwardWarpImageFilter.h b/Modules/Nonunit/Review/include/itkGridForwardWarpImageFilter.h index 6f799d2291a..5656dc0bb49 100644 --- a/Modules/Nonunit/Review/include/itkGridForwardWarpImageFilter.h +++ b/Modules/Nonunit/Review/include/itkGridForwardWarpImageFilter.h @@ -124,8 +124,8 @@ class ITK_TEMPLATE_EXPORT GridForwardWarpImageFilter : public ImageToImageFilter GenerateData() override; private: - PixelType m_BackgroundValue{}; - PixelType m_ForegroundValue{}; + PixelType m_BackgroundValue{}; + PixelType m_ForegroundValue{}; unsigned int m_GridPixSpacing{ 5 }; }; } // end namespace itk diff --git a/Modules/Nonunit/Review/include/itkGridForwardWarpImageFilter.hxx b/Modules/Nonunit/Review/include/itkGridForwardWarpImageFilter.hxx index 1bbb789e549..51f7e697589 100644 --- a/Modules/Nonunit/Review/include/itkGridForwardWarpImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkGridForwardWarpImageFilter.hxx @@ -37,7 +37,7 @@ template void GridForwardWarpImageFilter::GenerateData() { - OutputImagePointer outputPtr = this->GetOutput(); + OutputImagePointer outputPtr = this->GetOutput(); DisplacementFieldConstPointer fieldPtr = this->GetInput(); SpacingType spacing = fieldPtr->GetSpacing(); @@ -62,10 +62,10 @@ GridForwardWarpImageFilter::GenerateData() // Bresenham line iterator using LineIteratorType = LineIterator; - IndexType index, refIndex, targetIndex; + IndexType index, refIndex, targetIndex; ContinuousIndex contindex; - DisplacementType displacement; - bool inside, targetIn; + DisplacementType displacement; + bool inside, targetIn; for (iter.GoToBegin(), fieldIt.GoToBegin(); !iter.IsAtEnd(); ++iter, ++fieldIt) { diff --git a/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.h b/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.h index f53edd99fd4..f69cd0720c4 100644 --- a/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.h +++ b/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.h @@ -194,7 +194,7 @@ class ITK_TEMPLATE_EXPORT m_Elongation = 1; m_Orientation = 0; LabelPointType emptyPoint{}; - unsigned int numberOfVertices = 1 << ImageDimension; + unsigned int numberOfVertices = 1 << ImageDimension; m_OrientedBoundingBoxVertices.resize(numberOfVertices, emptyPoint); m_OrientedBoundingBoxVolume = 0; m_OrientedBoundingBoxSize.Fill(0); @@ -216,34 +216,34 @@ class ITK_TEMPLATE_EXPORT } } - LabelPixelType m_Label; - RealType m_Sum; - LabelPointType m_Centroid; - LabelPointType m_WeightedCentroid; - SizeValueType m_ZeroOrderMoment; - IndexArrayType m_FirstOrderRawMoments; - AxesLengthType m_FirstOrderWeightedRawMoments; - SizeValueType m_FirstOrderRawCrossMoment; - RealType m_FirstOrderCentralCrossMoment; - MatrixType m_SecondOrderRawMoments; - MatrixType m_SecondOrderCentralMoments; - VectorType m_Eigenvalues; - MatrixType m_Eigenvectors; + LabelPixelType m_Label; + RealType m_Sum; + LabelPointType m_Centroid; + LabelPointType m_WeightedCentroid; + SizeValueType m_ZeroOrderMoment; + IndexArrayType m_FirstOrderRawMoments; + AxesLengthType m_FirstOrderWeightedRawMoments; + SizeValueType m_FirstOrderRawCrossMoment; + RealType m_FirstOrderCentralCrossMoment; + MatrixType m_SecondOrderRawMoments; + MatrixType m_SecondOrderCentralMoments; + VectorType m_Eigenvalues; + MatrixType m_Eigenvectors; FixedArray m_AxesLength; - RealType m_Eccentricity; - RealType m_Elongation; - RealType m_Orientation; - BoundingBoxType m_BoundingBox; - LabelSizeType m_BoundingBoxSize; - RealType m_BoundingBoxVolume; - LabelIndicesType m_PixelIndices; - BoundingBoxVerticesType m_OrientedBoundingBoxVertices; - RealType m_OrientedBoundingBoxVolume; - LabelPointType m_OrientedBoundingBoxSize; - typename LabelImageType::Pointer m_OrientedLabelImage; - typename IntensityImageType::Pointer m_OrientedIntensityImage; - MatrixType m_RotationMatrix; - LabelPointType m_OrientedBoundingBoxOrigin; + RealType m_Eccentricity; + RealType m_Elongation; + RealType m_Orientation; + BoundingBoxType m_BoundingBox; + LabelSizeType m_BoundingBoxSize; + RealType m_BoundingBoxVolume; + LabelIndicesType m_PixelIndices; + BoundingBoxVerticesType m_OrientedBoundingBoxVertices; + RealType m_OrientedBoundingBoxVolume; + LabelPointType m_OrientedBoundingBoxSize; + typename LabelImageType::Pointer m_OrientedLabelImage; + typename IntensityImageType::Pointer m_OrientedIntensityImage; + MatrixType m_RotationMatrix; + LabelPointType m_OrientedBoundingBoxOrigin; }; /** Type of the map used to store data per label */ @@ -513,9 +513,9 @@ class ITK_TEMPLATE_EXPORT bool m_CalculateOrientedLabelRegions{}; bool m_CalculateOrientedIntensityRegions{}; - MapType m_LabelGeometryMapper{}; + MapType m_LabelGeometryMapper{}; LabelGeometry m_LabelGeometry{}; - LabelsType m_AllLabels{}; + LabelsType m_AllLabels{}; }; // end of class } // end namespace itk diff --git a/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.hxx b/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.hxx index e5a42498526..ee52d9752d6 100644 --- a/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.hxx @@ -82,10 +82,10 @@ CalculateRotationMatrix(const vnl_symmetric_eigensystem & eig) template inline bool -CalculateOrientedImage(const vnl_symmetric_eigensystem & eig, +CalculateOrientedImage(const vnl_symmetric_eigensystem & eig, typename LabelGeometryImageFilter::LabelGeometry & labelGeometry, - bool useLabelImage, - const TInputImage * inputImage) + bool useLabelImage, + const TInputImage * inputImage) { static constexpr unsigned int Dimension = TInputImage::ImageDimension; @@ -103,10 +103,10 @@ CalculateOrientedImage(const vnl_symmetric_eigensystem & // centroid of the object, the rotation matrix is specified by the // eigenvectors, and there is no translation. using TransformType = itk::AffineTransform; - auto transform = TransformType::New(); + auto transform = TransformType::New(); typename TransformType::MatrixType rotationMatrix(vnl_RotationMatrix); typename TransformType::CenterType center; - typename TInputImage::PointType origin; + typename TInputImage::PointType origin; for (unsigned int i = 0; i < Dimension; ++i) { center[i] = labelGeometry.m_Centroid[i] * inputImage->GetSpacing()[i]; @@ -426,7 +426,7 @@ template bool LabelGeometryImageFilter::CalculateOrientedBoundingBoxVertices( vnl_symmetric_eigensystem eig, - LabelGeometry & labelGeometry) + LabelGeometry & labelGeometry) { // Calculate the oriented bounding box using the eigenvectors. // For each label, the pixels are rotated to the new coordinate @@ -520,11 +520,11 @@ LabelGeometryImageFilter::CalculateOrientedBoundin // to [minX,minY],[minX,maxY],[maxX,minY],[maxX,maxY]. // Loop through each dimension of the bounding box and find all of the // vertices. - unsigned int numberOfVertices = 1 << ImageDimension; - MatrixType transformedBoundingBoxVertices(ImageDimension, numberOfVertices, 0); - int val; + unsigned int numberOfVertices = 1 << ImageDimension; + MatrixType transformedBoundingBoxVertices(ImageDimension, numberOfVertices, 0); + int val; LabelIndexType binaryIndex; - int arrayIndex; + int arrayIndex; for (unsigned int i = 0; i < numberOfVertices; ++i) { val = i; @@ -823,12 +823,12 @@ auto LabelGeometryImageFilter::GetOrientedBoundingBoxVertices(LabelPixelType label) const -> BoundingBoxVerticesType { - unsigned int numberOfVertices = 1 << ImageDimension; + unsigned int numberOfVertices = 1 << ImageDimension; MapConstIterator mapIt = m_LabelGeometryMapper.find(label); if (mapIt == m_LabelGeometryMapper.end()) { // label does not exist, return a default value - LabelPointType emptyPoint{}; + LabelPointType emptyPoint{}; BoundingBoxVerticesType emptyVertices; emptyVertices.resize(numberOfVertices, emptyPoint); return emptyVertices; @@ -927,8 +927,8 @@ LabelGeometryImageFilter::GetRegion(LabelPixelType else { BoundingBoxType bbox = this->GetBoundingBox(label); - IndexType index; - SizeType size; + IndexType index; + SizeType size; unsigned int dimension = bbox.Size() / 2; diff --git a/Modules/Nonunit/Review/include/itkMiniPipelineSeparableImageFilter.h b/Modules/Nonunit/Review/include/itkMiniPipelineSeparableImageFilter.h index b1dc3fa92fe..9a7e572b11d 100644 --- a/Modules/Nonunit/Review/include/itkMiniPipelineSeparableImageFilter.h +++ b/Modules/Nonunit/Review/include/itkMiniPipelineSeparableImageFilter.h @@ -107,7 +107,7 @@ class ITK_TEMPLATE_EXPORT MiniPipelineSeparableImageFilter : public BoxImageFilt GenerateData() override; typename FilterType::Pointer m_Filters[ImageDimension]{}; - typename CastType::Pointer m_Cast{}; + typename CastType::Pointer m_Cast{}; }; } // namespace itk diff --git a/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.hxx b/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.hxx index e34fdb06629..7d15506b7cb 100644 --- a/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.hxx @@ -25,7 +25,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -44,8 +44,8 @@ MultiphaseDenseFiniteDifferenceImageFilterm_FunctionCount; ++i) { const InputImagePointer input = this->m_LevelSet[i]; - const InputPointType origin = input->GetOrigin(); - const InputSizeType size = input->GetBufferedRegion().GetSize(); + const InputPointType origin = input->GetOrigin(); + const InputSizeType size = input->GetBufferedRegion().GetSize(); // Find the index of the target image where this Level Set // should be pasted. @@ -61,7 +61,7 @@ MultiphaseDenseFiniteDifferenceImageFilter in(input, input->GetBufferedRegion()); - ImageRegionIterator out(output, region); + ImageRegionIterator out(output, region); // Fill the output pointer auto p = static_cast(this->m_Lookup[i]); @@ -89,7 +89,7 @@ MultiphaseDenseFiniteDifferenceImageFilterm_FunctionCount; ++i) { InputImagePointer input = this->m_LevelSet[i]; - InputRegionType region = input->GetLargestPossibleRegion(); + InputRegionType region = input->GetLargestPossibleRegion(); m_UpdateBuffers[i]->CopyInformation(input); m_UpdateBuffers[i]->SetRegions(region); @@ -118,7 +118,7 @@ typename MultiphaseDenseFiniteDifferenceImageFilterGetLargestPossibleRegion(), radius); + FaceListType faceList = faceCalculator(levelset, levelset->GetLargestPossibleRegion(), radius); void * globalData; @@ -133,7 +133,7 @@ typename MultiphaseDenseFiniteDifferenceImageFilter nU(m_UpdateBuffers[i], *fIt); nD.GoToBegin(); @@ -185,9 +185,9 @@ void MultiphaseDenseFiniteDifferenceImageFilter::ApplyUpdate( TimeStepType dt) { - double rms_change_accumulator = 0; - double den = 0; - IdCellType i; + double rms_change_accumulator = 0; + double den = 0; + IdCellType i; InputPixelType val; for (i = 0; i < this->m_FunctionCount; ++i) diff --git a/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.h b/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.h index 43fb46d82b2..41b6ea8af0f 100644 --- a/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.h +++ b/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.h @@ -308,7 +308,7 @@ class ITK_TEMPLATE_EXPORT MultiphaseFiniteDifferenceImageFilter : public InPlace m_LevelSet[i]->CopyInformation(levelSet); ImageRegionConstIterator in(levelSet, levelSet->GetBufferedRegion()); - ImageRegionIterator cp(m_LevelSet[i], levelSet->GetBufferedRegion()); + ImageRegionIterator cp(m_LevelSet[i], levelSet->GetBufferedRegion()); in.GoToBegin(); cp.GoToBegin(); @@ -398,14 +398,14 @@ class ITK_TEMPLATE_EXPORT MultiphaseFiniteDifferenceImageFilter : public InPlace ~MultiphaseFiniteDifferenceImageFilter() override = default; - IdCellType m_FunctionCount{}; + IdCellType m_FunctionCount{}; std::vector m_LevelSet{}; - VectorIdCellType m_Lookup{}; - KdTreePointer m_KdTree{}; + VectorIdCellType m_Lookup{}; + KdTreePointer m_KdTree{}; unsigned int m_ElapsedIterations{}; - double m_MaximumRMSError{}; - double m_RMSChange{}; + double m_MaximumRMSError{}; + double m_RMSChange{}; unsigned int m_NumberOfIterations{}; /** The function that will be used in calculating updates for each pixel. */ diff --git a/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.hxx b/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.hxx index 3cc126bf895..2726fc21b78 100644 --- a/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.hxx @@ -40,7 +40,7 @@ MultiphaseFiniteDifferenceImageFilterm_InitializedState) { // Set the coefficients for the derivatives - double coeffs[ImageDimension]; + double coeffs[ImageDimension]; unsigned int i; if (m_UseImageSpacing) { @@ -203,12 +203,12 @@ typename MultiphaseFiniteDifferenceImageFilter:: ResolveTimeStep(const TimeStepVectorType & timeStepList, const std::vector & valid) { - TimeStepType oMin{}; + TimeStepType oMin{}; const SizeValueType size = timeStepList.size(); if (size == valid.size()) { - bool flag = false; + bool flag = false; SizeValueType k = 0; SizeValueType i; diff --git a/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.h b/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.h index 28a420256ad..c75d5311866 100644 --- a/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.h +++ b/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.h @@ -367,9 +367,9 @@ class ITK_TEMPLATE_EXPORT MultiphaseSparseFiniteDifferenceImageFilter * timestep and adding to the value of the previous iteration. */ inline virtual ValueType CalculateUpdateValue(const OutputIndexType & itkNotUsed(idx), - const TimeStepType & dt, - const ValueType & value, - const ValueType & change) + const TimeStepType & dt, + const ValueType & value, + const ValueType & change) { return (value + dt * change); } @@ -465,8 +465,8 @@ class ITK_TEMPLATE_EXPORT MultiphaseSparseFiniteDifferenceImageFilter void ProcessStatusList(LayerType * InputList, LayerType * OutputList, - StatusType ChangeToStatus, - StatusType SearchForStatus); + StatusType ChangeToStatus, + StatusType SearchForStatus); /** */ void @@ -476,11 +476,11 @@ class ITK_TEMPLATE_EXPORT MultiphaseSparseFiniteDifferenceImageFilter InitializeIteration() override; virtual void - UpdatePixel(unsigned int itkNotUsed(functionIndex), - unsigned int itkNotUsed(idx), + UpdatePixel(unsigned int itkNotUsed(functionIndex), + unsigned int itkNotUsed(idx), NeighborhoodIterator & itkNotUsed(iterator), - ValueType & itkNotUsed(newValue), - bool & itkNotUsed(status)) + ValueType & itkNotUsed(newValue), + bool & itkNotUsed(status)) {} itkGetConstMacro(ValueZero, ValueType); @@ -538,7 +538,7 @@ class ITK_TEMPLATE_EXPORT MultiphaseSparseFiniteDifferenceImageFilter private: unsigned int m_CurrentFunctionIndex{}; - double m_RMSSum{ 0. }; + double m_RMSSum{ 0. }; unsigned int m_RMSCounter{ 0 }; /** This flag is true when methods need to check boundary conditions and diff --git a/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.hxx b/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.hxx index 70ceeab46bc..0a22b35aa55 100644 --- a/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.hxx @@ -137,7 +137,7 @@ MultiphaseSparseFiniteDifferenceImageFilterGetRequestedRegion(); + InputRegionType region = input->GetRequestedRegion(); ImageRegionIterator lIt(input, region); ImageRegionIterator tIt(tempImage, region); @@ -184,8 +184,8 @@ typename MultiphaseSparseFiniteDifferenceImageFilter::max(); - TimeStepType timeStep; + TimeStepType minTimeStep = NumericTraits::max(); + TimeStepType timeStep; InputSpacingType spacing = this->m_LevelSet[0]->GetSpacing(); // Calculate change across all the level-set functions @@ -198,8 +198,8 @@ typename MultiphaseSparseFiniteDifferenceImageFilterm_SparseData[fId]; FiniteDifferenceFunctionFloatOffsetType offset; - ValueType gradientMagnitudeSqr, forward, backward, current; - const ValueType MIN_NORM = 1.0e-6; + ValueType gradientMagnitudeSqr, forward, backward, current; + const ValueType MIN_NORM = 1.0e-6; void * globalData = df->GetGlobalDataPointer(); @@ -324,7 +324,7 @@ MultiphaseSparseFiniteDifferenceImageFilterm_CurrentFunctionIndex = fId; SparseDataStruct * sparsePtr = this->m_SparseData[fId]; - unsigned int t; + unsigned int t; StatusType up_to, up_search; StatusType down_to, down_search; @@ -409,7 +409,7 @@ MultiphaseSparseFiniteDifferenceImageFilterm_SparseData[this->m_CurrentFunctionIndex]; - LayerNodeType * node; + LayerNodeType * node; // Push each index in the input list into its appropriate status layer // (ChangeToStatus) and update the status image value at that index. @@ -427,15 +427,15 @@ void MultiphaseSparseFiniteDifferenceImageFilter:: ProcessStatusList(LayerType * InputList, LayerType * OutputList, - StatusType ChangeToStatus, - StatusType SearchForStatus) + StatusType ChangeToStatus, + StatusType SearchForStatus) { SparseDataStruct * sparsePtr = this->m_SparseData[this->m_CurrentFunctionIndex]; - unsigned int i; - bool bounds_status; + unsigned int i; + bool bounds_status; LayerNodeType * node; - StatusType neighbor_status; + StatusType neighbor_status; NeighborhoodIterator statusIt(m_NeighborList.GetRadius(), sparsePtr->m_StatusImage, @@ -506,13 +506,13 @@ MultiphaseSparseFiniteDifferenceImageFilter outputIt(m_NeighborList.GetRadius(), @@ -679,7 +679,7 @@ MultiphaseSparseFiniteDifferenceImageFilterm_LevelSet[0]->GetSpacing(); double temp; @@ -690,7 +690,7 @@ MultiphaseSparseFiniteDifferenceImageFilterm_LevelSet[i]; - typename LayerType::ConstIterator activeIt; + typename LayerType::ConstIterator activeIt; ConstNeighborhoodIterator outputIt( m_NeighborList.GetRadius(), levelset, levelset->GetRequestedRegion()); @@ -812,11 +812,11 @@ MultiphaseSparseFiniteDifferenceImageFilter(sparsePtr->m_Layers.size()) - 1; @@ -825,7 +825,7 @@ MultiphaseSparseFiniteDifferenceImageFilter outputIt(m_NeighborList.GetRadius(), + NeighborhoodIterator outputIt(m_NeighborList.GetRadius(), this->m_LevelSet[sparsePtr->m_Index], this->m_LevelSet[sparsePtr->m_Index]->GetRequestedRegion()); NeighborhoodIterator statusIt( @@ -876,7 +876,7 @@ MultiphaseSparseFiniteDifferenceImageFilterm_LevelSet[sparsePtr->m_Index]->TransformIndexToPhysicalPoint(statusIt.GetIndex(indexNeighbor), p1); this->m_LevelSet[sparsePtr->m_Index]->TransformIndexToPhysicalPoint(indexCurrent, p2); for (unsigned int j = 0; j < ImageDimension; ++j) @@ -923,7 +923,7 @@ MultiphaseSparseFiniteDifferenceImageFilterm_Index, center, outputIt, value, bounds_status); @@ -995,7 +995,7 @@ MultiphaseSparseFiniteDifferenceImageFilterm_LevelSet[0]->GetSpacing(); - OffsetType offset; + OffsetType offset; this->m_PixelDistance.clear(); this->m_PixelDistance.resize(m_NeighborList.GetSize()); @@ -1027,7 +1027,7 @@ MultiphaseSparseFiniteDifferenceImageFilterm_DifferenceFunctions[fId]->GetRadius(); + typename BFCType::SizeType sz = this->m_DifferenceFunctions[fId]->GetRadius(); typename BFCType::FaceListType::iterator fit; // Compute the boundary pixel regions set in a container @@ -1120,7 +1120,7 @@ MultiphaseSparseFiniteDifferenceImageFilter::min(); + float maxSpacing = NumericTraits::min(); InputSpacingType spacing = this->m_LevelSet[0]->GetSpacing(); for (unsigned int i = 0; i < ImageDimension; ++i) @@ -1200,14 +1200,14 @@ MultiphaseSparseFiniteDifferenceImageFilter statusIt( m_NeighborList.GetRadius(), sparsePtr->m_StatusImage, this->m_LevelSet[fId]->GetRequestedRegion()); - InputIndexType center_index, offset_index; + InputIndexType center_index, offset_index; LayerNodeType * node; - bool bounds_status; - StatusType layer_number; + bool bounds_status; + StatusType layer_number; // Determine image bounds for checking if sparse layers touch boundaries InputIndexType lowerBounds; - InputSizeType upperBounds; + InputSizeType upperBounds; lowerBounds = this->m_LevelSet[fId]->GetRequestedRegion().GetIndex(); upperBounds = this->m_LevelSet[fId]->GetRequestedRegion().GetSize(); @@ -1288,7 +1288,7 @@ MultiphaseSparseFiniteDifferenceImageFilter statusIt( m_NeighborList.GetRadius(), sparsePtr->m_StatusImage, this->m_LevelSet[sparsePtr->m_Index]->GetRequestedRegion()); @@ -1346,7 +1346,7 @@ MultiphaseSparseFiniteDifferenceImageFilterm_FunctionCount; ++fId) { InputImagePointer input = this->m_LevelSet[fId]; - InputPointType origin = input->GetOrigin(); + InputPointType origin = input->GetOrigin(); // Local iterator ImageRegionIterator inIt(this->m_LevelSet[fId], this->m_LevelSet[fId]->GetRequestedRegion()); @@ -1387,7 +1387,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { using namespace print_helper; diff --git a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.h b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.h index dde8a10d09d..64776ae346b 100644 --- a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.h +++ b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.h @@ -192,7 +192,7 @@ class ITK_TEMPLATE_EXPORT RegionBasedLevelSetFunction : public FiniteDifferenceF /** Compute the equation value. */ PixelType ComputeUpdate(const NeighborhoodType & neighborhood, - void * globalData, + void * globalData, const FloatOffsetType & = FloatOffsetType(0.0)) override; void @@ -414,10 +414,10 @@ class ITK_TEMPLATE_EXPORT RegionBasedLevelSetFunction : public FiniteDifferenceF unsigned int m_FunctionId{}; - std::slice x_slice[Self::ImageDimension]; + std::slice x_slice[Self::ImageDimension]; OffsetValueType m_Center{}; OffsetValueType m_xStride[Self::ImageDimension]{}; - double m_InvSpacing[Self::ImageDimension]{}; + double m_InvSpacing[Self::ImageDimension]{}; static double m_WaveDT; static double m_DT; diff --git a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.hxx b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.hxx index 69da3ad94f6..6aef4911864 100644 --- a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.hxx +++ b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.hxx @@ -81,7 +81,7 @@ RegionBasedLevelSetFunction::ComputeHImage() { // The phi function InputImageConstPointer contourImage = this->m_InitialImage; - InputImagePointer hBuffer = + InputImagePointer hBuffer = this->m_SharedData->m_LevelSetDataPointerVector[this->m_FunctionId]->m_HeavisideFunctionOfLevelSetImage; // Iterator for the phi function @@ -203,7 +203,7 @@ RegionBasedLevelSetFunction::ComputeCurvature(con template void RegionBasedLevelSetFunction::ComputeHessian(const NeighborhoodType & it, - GlobalDataStruct * gd) + GlobalDataStruct * gd) { const ScalarValueType inputValue = it.GetCenterPixel(); @@ -242,8 +242,8 @@ RegionBasedLevelSetFunction::ComputeHessian(const template auto RegionBasedLevelSetFunction::ComputeUpdate(const NeighborhoodType & it, - void * globalData, - const FloatOffsetType & offset) -> PixelType + void * globalData, + const FloatOffsetType & offset) -> PixelType { // Access the neighborhood center pixel of phi const ScalarValueType inputValue = it.GetCenterPixel(); @@ -252,7 +252,7 @@ RegionBasedLevelSetFunction::ComputeUpdate(const ScalarValueType curvature_term{}; ScalarValueType curvature{}; ScalarValueType globalTerm{}; - VectorType advection_field; + VectorType advection_field; ScalarValueType x_energy, advection_term = ScalarValueType{}; // Access the global data structure @@ -357,7 +357,7 @@ template auto RegionBasedLevelSetFunction::ComputeGlobalTerm( const ScalarValueType & itkNotUsed(inputPixel), - const InputIndexType & inputIndex) -> ScalarValueType + const InputIndexType & inputIndex) -> ScalarValueType { // computes if it belongs to background ScalarValueType product = 1; diff --git a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionData.h b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionData.h index a30e2924f01..a4f3655e793 100644 --- a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionData.h +++ b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionData.h @@ -136,8 +136,8 @@ class ITK_TEMPLATE_EXPORT RegionBasedLevelSetFunctionData : public LightObject double m_WeightedNumberOfPixelsOutsideLevelSet{}; InputImagePointer m_HeavisideFunctionOfLevelSetImage{}; - InputIndexType m_Start{}; - InputIndexType m_End{}; + InputIndexType m_Start{}; + InputIndexType m_End{}; protected: RegionBasedLevelSetFunctionData(); diff --git a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionSharedData.h b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionSharedData.h index 0471ab375db..c4867128df5 100644 --- a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionSharedData.h +++ b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionSharedData.h @@ -171,10 +171,10 @@ class RegionBasedLevelSetFunctionSharedData : public LightObject LevelSetDataPointerVector m_LevelSetDataPointerVector{}; - unsigned int m_FunctionCount{}; - unsigned int m_NumberOfNeighbors{ 6 }; + unsigned int m_FunctionCount{}; + unsigned int m_NumberOfNeighbors{ 6 }; ListImagePointer m_NearestNeighborListImage{}; - KdTreePointer m_KdTree{}; + KdTreePointer m_KdTree{}; protected: RegionBasedLevelSetFunctionSharedData() diff --git a/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdCalculator.h b/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdCalculator.h index 3bfc9cc485a..ceaf01df6fd 100644 --- a/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdCalculator.h +++ b/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdCalculator.h @@ -113,11 +113,11 @@ class ITK_TEMPLATE_EXPORT RobustAutomaticThresholdCalculator : public Object PrintSelf(std::ostream & os, Indent indent) const override; private: - bool m_Valid{ false }; // Have moments been computed yet? - double m_Pow{ 1 }; + bool m_Valid{ false }; // Have moments been computed yet? + double m_Pow{ 1 }; InputPixelType m_Output{}; - InputImageConstPointer m_Input{}; + InputImageConstPointer m_Input{}; GradientImageConstPointer m_Gradient{}; }; } // end namespace itk diff --git a/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdImageFilter.h b/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdImageFilter.h index 6c456015d93..bbd1dbc1f96 100644 --- a/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdImageFilter.h +++ b/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdImageFilter.h @@ -160,8 +160,8 @@ class ITK_TEMPLATE_EXPORT RobustAutomaticThresholdImageFilter : public ImageToIm GenerateData() override; private: - double m_Pow{ 1 }; - InputPixelType m_Threshold{}; + double m_Pow{ 1 }; + InputPixelType m_Threshold{}; OutputPixelType m_InsideValue{}; OutputPixelType m_OutsideValue{}; }; diff --git a/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdImageFilter.hxx b/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdImageFilter.hxx index 4ff389f4ad1..5f46fe92869 100644 --- a/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdImageFilter.hxx @@ -73,7 +73,7 @@ RobustAutomaticThresholdImageFilter:: template void RobustAutomaticThresholdImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Nonunit/Review/include/itkScalarChanAndVeseDenseLevelSetImageFilter.hxx b/Modules/Nonunit/Review/include/itkScalarChanAndVeseDenseLevelSetImageFilter.hxx index 6130c54da9e..7ec505920fb 100644 --- a/Modules/Nonunit/Review/include/itkScalarChanAndVeseDenseLevelSetImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkScalarChanAndVeseDenseLevelSetImageFilter.hxx @@ -30,7 +30,7 @@ ScalarChanAndVeseDenseLevelSetImageFilterm_FunctionCount; ++fId) { InputImagePointer input = this->m_LevelSet[fId]; - InputPointType origin = input->GetOrigin(); + InputPointType origin = input->GetOrigin(); // In the context of the global coordinates const FeatureIndexType start = this->GetInput()->TransformPhysicalPointToIndex(origin); diff --git a/Modules/Nonunit/Review/include/itkScalarChanAndVeseLevelSetFunction.h b/Modules/Nonunit/Review/include/itkScalarChanAndVeseLevelSetFunction.h index edbe42d3b08..b51570170c9 100644 --- a/Modules/Nonunit/Review/include/itkScalarChanAndVeseLevelSetFunction.h +++ b/Modules/Nonunit/Review/include/itkScalarChanAndVeseLevelSetFunction.h @@ -152,14 +152,14 @@ class ITK_TEMPLATE_EXPORT ScalarChanAndVeseLevelSetFunction ComputeExternalTerm(const FeaturePixelType & iValue, const FeatureIndexType & iIdx) override; void - UpdateSharedDataInsideParameters(const unsigned int & iId, + UpdateSharedDataInsideParameters(const unsigned int & iId, const FeaturePixelType & iVal, - const ScalarValueType & iChange) override; + const ScalarValueType & iChange) override; void - UpdateSharedDataOutsideParameters(const unsigned int & iId, + UpdateSharedDataOutsideParameters(const unsigned int & iId, const FeaturePixelType & iVal, - const ScalarValueType & iChange) override; + const ScalarValueType & iChange) override; }; } // namespace itk diff --git a/Modules/Nonunit/Review/include/itkScalarChanAndVeseLevelSetFunction.hxx b/Modules/Nonunit/Review/include/itkScalarChanAndVeseLevelSetFunction.hxx index 71f444f933b..b3ab45de2e9 100644 --- a/Modules/Nonunit/Review/include/itkScalarChanAndVeseLevelSetFunction.hxx +++ b/Modules/Nonunit/Review/include/itkScalarChanAndVeseLevelSetFunction.hxx @@ -59,9 +59,9 @@ ScalarChanAndVeseLevelSetFunction::Upda template void ScalarChanAndVeseLevelSetFunction::UpdateSharedDataInsideParameters( - const unsigned int & iId, + const unsigned int & iId, const FeaturePixelType & iVal, - const ScalarValueType & iChange) + const ScalarValueType & iChange) { // update the foreground constant calculation of the current level-set // function @@ -75,9 +75,9 @@ ScalarChanAndVeseLevelSetFunction::Upda template void ScalarChanAndVeseLevelSetFunction::UpdateSharedDataOutsideParameters( - const unsigned int & iId, + const unsigned int & iId, const FeaturePixelType & iVal, - const ScalarValueType & iChange) + const ScalarValueType & iChange) { this->m_SharedData->m_LevelSetDataPointerVector[iId]->m_WeightedNumberOfPixelsOutsideLevelSet += iChange; this->m_SharedData->m_LevelSetDataPointerVector[iId]->m_WeightedSumOfPixelValuesOutsideLevelSet += iVal * iChange; @@ -104,9 +104,9 @@ ScalarChanAndVeseLevelSetFunction::Comp FeaturePixelType featureVal; FeatureIndexType globalIndex; - InputIndexType itInputIndex, inputIndex; - InputPixelType hVal; - ListPixelType L; + InputIndexType itInputIndex, inputIndex; + InputPixelType hVal; + ListPixelType L; fIt.GoToBegin(); @@ -149,7 +149,7 @@ ScalarChanAndVeseLevelSetFunction::Comp const FeaturePixelType & iValue, const FeatureIndexType & itkNotUsed(iIdx)) -> ScalarValueType { - const unsigned int fId = this->m_FunctionId; + const unsigned int fId = this->m_FunctionId; const ScalarValueType cVals = this->m_SharedData->m_LevelSetDataPointerVector[fId]->m_ForegroundConstantValues; const ScalarValueType t = (iValue - cVals); @@ -162,7 +162,7 @@ ScalarChanAndVeseLevelSetFunction::Comp const FeaturePixelType & iValue, const FeatureIndexType & itkNotUsed(iIdx)) -> ScalarValueType { - const unsigned int fId = this->m_FunctionId; + const unsigned int fId = this->m_FunctionId; const ScalarValueType cBgrnd = this->m_SharedData->m_LevelSetDataPointerVector[fId]->m_BackgroundConstantValues; // // background diff --git a/Modules/Nonunit/Review/include/itkScalarChanAndVeseSparseLevelSetImageFilter.h b/Modules/Nonunit/Review/include/itkScalarChanAndVeseSparseLevelSetImageFilter.h index 3e46899fb49..01bca22f81a 100644 --- a/Modules/Nonunit/Review/include/itkScalarChanAndVeseSparseLevelSetImageFilter.h +++ b/Modules/Nonunit/Review/include/itkScalarChanAndVeseSparseLevelSetImageFilter.h @@ -149,11 +149,11 @@ class ITK_TEMPLATE_EXPORT ScalarChanAndVeseSparseLevelSetImageFilter InitializeIteration() override; void - UpdatePixel(unsigned int functionIndex, - unsigned int idx, + UpdatePixel(unsigned int functionIndex, + unsigned int idx, NeighborhoodIterator & iterator, - ValueType & newValue, - bool & status) override; + ValueType & newValue, + bool & status) override; }; } // end namespace itk diff --git a/Modules/Nonunit/Review/include/itkScalarChanAndVeseSparseLevelSetImageFilter.hxx b/Modules/Nonunit/Review/include/itkScalarChanAndVeseSparseLevelSetImageFilter.hxx index 067535b42d4..c08c9a3ad4e 100644 --- a/Modules/Nonunit/Review/include/itkScalarChanAndVeseSparseLevelSetImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkScalarChanAndVeseSparseLevelSetImageFilter.hxx @@ -35,7 +35,7 @@ ScalarChanAndVeseSparseLevelSetImageFilterm_FunctionCount; ++fId) { InputImagePointer input = this->m_LevelSet[fId]; - InputPointType origin = input->GetOrigin(); + InputPointType origin = input->GetOrigin(); // In the context of the global coordinates const FeatureIndexType start = this->GetInput()->TransformPhysicalPointToIndex(origin); @@ -128,11 +128,11 @@ template void ScalarChanAndVeseSparseLevelSetImageFilter:: - UpdatePixel(unsigned int fId, - unsigned int idx, + UpdatePixel(unsigned int fId, + unsigned int idx, NeighborhoodIterator & iterator, - ValueType & newValue, - bool & status) + ValueType & newValue, + bool & status) { FunctionPtr typedPointer = this->m_DifferenceFunctions[fId]; diff --git a/Modules/Nonunit/Review/include/itkScalarRegionBasedLevelSetFunction.h b/Modules/Nonunit/Review/include/itkScalarRegionBasedLevelSetFunction.h index e17591bba22..3590709705d 100644 --- a/Modules/Nonunit/Review/include/itkScalarRegionBasedLevelSetFunction.h +++ b/Modules/Nonunit/Review/include/itkScalarRegionBasedLevelSetFunction.h @@ -122,10 +122,10 @@ class ITK_TEMPLATE_EXPORT ScalarRegionBasedLevelSetFunction * shared data which contains information from the other level sets). Using the * new $H$ values, the previous $c_i$ are updated. */ void - UpdatePixel(const unsigned int idx, + UpdatePixel(const unsigned int idx, NeighborhoodIterator & iterator, - InputPixelType & newValue, - bool & status); + InputPixelType & newValue, + bool & status); protected: ScalarRegionBasedLevelSetFunction() @@ -142,14 +142,14 @@ class ITK_TEMPLATE_EXPORT ScalarRegionBasedLevelSetFunction * Called only when sparse filters are used to prevent iteration through the * entire image. */ virtual void - UpdateSharedDataInsideParameters(const unsigned int & iId, + UpdateSharedDataInsideParameters(const unsigned int & iId, const FeaturePixelType & iVal, - const ScalarValueType & iChange) = 0; + const ScalarValueType & iChange) = 0; virtual void - UpdateSharedDataOutsideParameters(const unsigned int & iId, + UpdateSharedDataOutsideParameters(const unsigned int & iId, const FeaturePixelType & iVal, - const ScalarValueType & iChange) = 0; + const ScalarValueType & iChange) = 0; }; } // namespace itk diff --git a/Modules/Nonunit/Review/include/itkScalarRegionBasedLevelSetFunction.hxx b/Modules/Nonunit/Review/include/itkScalarRegionBasedLevelSetFunction.hxx index 3b1f329765b..ca41a8ec996 100644 --- a/Modules/Nonunit/Review/include/itkScalarRegionBasedLevelSetFunction.hxx +++ b/Modules/Nonunit/Review/include/itkScalarRegionBasedLevelSetFunction.hxx @@ -26,7 +26,7 @@ template auto ScalarRegionBasedLevelSetFunction::ComputeOverlapParameters( const FeatureIndexType & globalIndex, - ScalarValueType & product) -> ScalarValueType + ScalarValueType & product) -> ScalarValueType { // This conditional statement computes the amount of overlap s // and the presence of background pr @@ -61,15 +61,15 @@ ScalarRegionBasedLevelSetFunction::Comp template void ScalarRegionBasedLevelSetFunction::UpdatePixel( - const unsigned int idx, + const unsigned int idx, NeighborhoodIterator & iterator, - InputPixelType & newValue, - bool & itkNotUsed(status)) + InputPixelType & newValue, + bool & itkNotUsed(status)) { unsigned int fId = this->m_FunctionId; // For each affected h val: h val = new hval (this will dirty some cvals) - InputIndexType inputIndex = iterator.GetIndex(idx); + InputIndexType inputIndex = iterator.GetIndex(idx); FeatureIndexType globalIndex = this->m_SharedData->m_LevelSetDataPointerVector[fId]->GetFeatureIndex(inputIndex); FeaturePixelType featureVal = this->m_FeatureImage->GetPixel(inputIndex); @@ -83,8 +83,8 @@ ScalarRegionBasedLevelSetFunction::Upda UpdateSharedDataInsideParameters(fId, featureVal, change); // Compute the product factor - ListPixelType L = this->m_SharedData->m_NearestNeighborListImage->GetPixel(globalIndex); - InputIndexType itInputIndex; + ListPixelType L = this->m_SharedData->m_NearestNeighborListImage->GetPixel(globalIndex); + InputIndexType itInputIndex; ScalarValueType hVal; InputPixelType product = 1; diff --git a/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.hxx b/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.hxx index 230290a7ef1..80eded53330 100644 --- a/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.hxx @@ -65,8 +65,8 @@ StochasticFractalDimensionImageFilter::Ge using OutputPixelType = typename OutputImageType::PixelType; using PointType = typename InputImageType::PointType; - const InputImageType * inputImage = this->GetInput(); - OutputImageType * outputImage = this->GetOutput(); + const InputImageType * inputImage = this->GetInput(); + OutputImageType * outputImage = this->GetOutput(); typename InputImageType::RegionType region = inputImage->GetRequestedRegion(); ProgressReporter progress(this, 0, region.GetNumberOfPixels(), 100); @@ -115,7 +115,7 @@ StochasticFractalDimensionImageFilter::Ge for (unsigned int i = 0; i < It.GetNeighborhood().Size(); ++i) { - bool IsInBounds1; + bool IsInBounds1; InputPixelType pixel1 = It.GetPixel(i, IsInBounds1); if (!IsInBounds1) @@ -135,7 +135,7 @@ StochasticFractalDimensionImageFilter::Ge continue; } - bool IsInBounds2; + bool IsInBounds2; InputPixelType pixel2 = It.GetPixel(j, IsInBounds2); if (!IsInBounds2) @@ -210,7 +210,7 @@ StochasticFractalDimensionImageFilter::Ge template void StochasticFractalDimensionImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Nonunit/Review/include/itkVoxBoCUBImageIO.h b/Modules/Nonunit/Review/include/itkVoxBoCUBImageIO.h index 38a88e5c46f..6a92875e19d 100644 --- a/Modules/Nonunit/Review/include/itkVoxBoCUBImageIO.h +++ b/Modules/Nonunit/Review/include/itkVoxBoCUBImageIO.h @@ -120,7 +120,7 @@ class VoxBoCUBImageIO : public ImageIOBase using OrientationMap = std::map; using InverseOrientationMap = std::map; - OrientationMap m_OrientationMap{}; + OrientationMap m_OrientationMap{}; InverseOrientationMap m_InverseOrientationMap{}; // Method to swap bytes in read buffer diff --git a/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.h b/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.h index 43b5b04557d..f024e651b74 100644 --- a/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.h +++ b/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.h @@ -138,11 +138,11 @@ class ITK_TEMPLATE_EXPORT WarpHarmonicEnergyCalculator : public Object EvaluateAtNeighborhood(ConstNeighborhoodIteratorType & it) const; private: - double m_HarmonicEnergy{ 0.0 }; + double m_HarmonicEnergy{ 0.0 }; ImageConstPointer m_Image{}; RegionType m_Region{}; - bool m_RegionSetByUser{ false }; + bool m_RegionSetByUser{ false }; bool m_UseImageSpacing{ true }; diff --git a/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.hxx b/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.hxx index 8f828683409..b43fd336a71 100644 --- a/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.hxx +++ b/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.hxx @@ -90,10 +90,10 @@ WarpHarmonicEnergyCalculator::Compute() m_HarmonicEnergy = 0.0; ZeroFluxNeumannBoundaryCondition nBc; - ConstNeighborhoodIteratorType bIt; + ConstNeighborhoodIteratorType bIt; // Find the data-set boundary "faces" - NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; + NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = bC(m_Image, m_Region, m_NeighborhoodRadius); diff --git a/Modules/Nonunit/Review/src/itkVoxBoCUBImageIO.cxx b/Modules/Nonunit/Review/src/itkVoxBoCUBImageIO.cxx index 88bc1c07790..8012591ecc5 100644 --- a/Modules/Nonunit/Review/src/itkVoxBoCUBImageIO.cxx +++ b/Modules/Nonunit/Review/src/itkVoxBoCUBImageIO.cxx @@ -69,7 +69,7 @@ class GenericCUBFileAdaptor { // Read everything up to the \f symbol std::ostringstream oss; - unsigned char byte = ReadByte(); + unsigned char byte = ReadByte(); while (byte != '\f') { @@ -149,7 +149,7 @@ class CompressedCUBFileAdaptor : public GenericCUBFileAdaptor throw exception; } - auto numberOfBytesToRead = Math::CastWithRangeCheck(bytes); + auto numberOfBytesToRead = Math::CastWithRangeCheck(bytes); SizeType bread = gzread(m_GzFile, data, numberOfBytesToRead); if (bread != bytes) { @@ -173,7 +173,7 @@ class CompressedCUBFileAdaptor : public GenericCUBFileAdaptor throw exception; } - auto numberOfBytesToWrite = Math::CastWithRangeCheck(bytes); + auto numberOfBytesToWrite = Math::CastWithRangeCheck(bytes); SizeType bwritten = gzwrite(m_GzFile, const_cast(data), numberOfBytesToWrite); if (bwritten != bytes) { @@ -241,7 +241,7 @@ class DirectCUBFileAdaptor : public GenericCUBFileAdaptor } const auto numberOfBytesToRead = Math::CastWithRangeCheck(bytes); - SizeType bread = fread(data, NumericTraits::OneValue(), numberOfBytesToRead, m_File); + SizeType bread = fread(data, NumericTraits::OneValue(), numberOfBytesToRead, m_File); if (bread != bytes) { std::ostringstream oss; @@ -265,7 +265,7 @@ class DirectCUBFileAdaptor : public GenericCUBFileAdaptor } const auto numberOfBytesToWrite = Math::CastWithRangeCheck(bytes); - SizeType bwritten = fwrite(data, NumericTraits::OneValue(), numberOfBytesToWrite, m_File); + SizeType bwritten = fwrite(data, NumericTraits::OneValue(), numberOfBytesToWrite, m_File); if (bwritten != bytes) { ExceptionObject exception; @@ -496,7 +496,7 @@ VoxBoCUBImageIO::ReadImageInformation() // Get the key string std::istringstream iss(linebuffer); - std::string key; + std::string key; // Read the key and strip the colon from it iss >> key; @@ -587,7 +587,7 @@ VoxBoCUBImageIO::ReadImageInformation() if (it != m_OrientationMap.end()) { // NOTE: The itk::ImageIOBase direction is a std::vector >, and threeDDirection is a 3x3 matrix - itk::SpatialOrientationAdapter soAdaptor; + itk::SpatialOrientationAdapter soAdaptor; itk::SpatialOrientationAdapter::DirectionType threeDDirection = soAdaptor.ToDirectionCosines(it->second); this->m_Direction[0][0] = threeDDirection[0][0]; this->m_Direction[0][1] = threeDDirection[0][1]; @@ -604,7 +604,7 @@ VoxBoCUBImageIO::ReadImageInformation() else { // Encode the right hand side of the string in the meta-data dic - std::string word; + std::string word; std::ostringstream oss; while (iss >> word) { @@ -690,7 +690,7 @@ VoxBoCUBImageIO::WriteImageInformation() // Write the orientation code // NOTE: The itk::ImageIOBase direction is a std::vector >, and threeDDirection is a 3x3 matrix - itk::SpatialOrientationAdapter soAdaptor; + itk::SpatialOrientationAdapter soAdaptor; itk::SpatialOrientationAdapter::DirectionType threeDDirection; threeDDirection[0][0] = this->m_Direction[0][0]; threeDDirection[0][1] = this->m_Direction[0][1]; diff --git a/Modules/Nonunit/Review/test/itkDirectFourierReconstructionImageToImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkDirectFourierReconstructionImageToImageFilterTest.cxx index 0903db2dab1..00739b70389 100644 --- a/Modules/Nonunit/Review/test/itkDirectFourierReconstructionImageToImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkDirectFourierReconstructionImageToImageFilterTest.cxx @@ -158,7 +158,7 @@ itkDirectFourierReconstructionImageToImageFilterTest(int argc, char * argv[]) ROIFilter->SetInput(rescaler->GetOutput()); ROIFilterType::IndexType start; - ROIFilterType::SizeType size; + ROIFilterType::SizeType size; start[0] = std::stoi(argv[11]); start[1] = std::stoi(argv[12]); diff --git a/Modules/Nonunit/Review/test/itkImageFunctionTest.cxx b/Modules/Nonunit/Review/test/itkImageFunctionTest.cxx index bd42f21d82c..d0b7fcaa888 100644 --- a/Modules/Nonunit/Review/test/itkImageFunctionTest.cxx +++ b/Modules/Nonunit/Review/test/itkImageFunctionTest.cxx @@ -124,7 +124,7 @@ itkImageFunctionTest(int, char *[]) auto image = ImageType::New(); - auto start = IndexType::Filled(1); + auto start = IndexType::Filled(1); SizeType size; size[0] = 3; size[1] = 4; @@ -139,8 +139,8 @@ itkImageFunctionTest(int, char *[]) /* Test SetInputImage & Accessors */ function->SetInputImage(image); - const IndexType & endIndex = function->GetEndIndex(); - const IndexType & startIndex = function->GetStartIndex(); + const IndexType & endIndex = function->GetEndIndex(); + const IndexType & startIndex = function->GetStartIndex(); const FunctionType::ContinuousIndexType & endIndexC = function->GetEndContinuousIndex(); const FunctionType::ContinuousIndexType & startIndexC = function->GetStartContinuousIndex(); diff --git a/Modules/Nonunit/Review/test/itkLabelGeometryImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkLabelGeometryImageFilterTest.cxx index 1f0905eee4d..98513a84491 100644 --- a/Modules/Nonunit/Review/test/itkLabelGeometryImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkLabelGeometryImageFilterTest.cxx @@ -153,8 +153,8 @@ LabelGeometryImageFilterTest(std::string labelImageName, using MatrixType = WriterType::vnlMatrixType; MatrixType matrix(numberOfLabels, numberOfColumns); - int rowIndex = 0; - typename LabelGeometryType::LabelsType allLabels = labelGeometryFilter->GetLabels(); + int rowIndex = 0; + typename LabelGeometryType::LabelsType allLabels = labelGeometryFilter->GetLabels(); typename LabelGeometryType::LabelsType::iterator allLabelsIt; for (allLabelsIt = allLabels.begin(); allLabelsIt != allLabels.end(); ++allLabelsIt) { diff --git a/Modules/Nonunit/Review/test/itkOptImageToImageMetricsTest.h b/Modules/Nonunit/Review/test/itkOptImageToImageMetricsTest.h index 9449a183bfb..338b5c823c6 100644 --- a/Modules/Nonunit/Review/test/itkOptImageToImageMetricsTest.h +++ b/Modules/Nonunit/Review/test/itkOptImageToImageMetricsTest.h @@ -36,11 +36,11 @@ class OptImageToImageMetricsTest OptImageToImageMetricsTest() = default; int - RunTest(FixedImageType * fixed, - MovingImageType * moving, - InterpolatorType * interpolator, - TransformType * transform, - MetricType * metric, + RunTest(FixedImageType * fixed, + MovingImageType * moving, + InterpolatorType * interpolator, + TransformType * transform, + MetricType * metric, MetricInitializerType metricInitializer) { using ParametersType = typename MetricType::ParametersType; @@ -85,7 +85,7 @@ class OptImageToImageMetricsTest // Get the transform parameters for identity. ParametersType parameters = transform->GetParameters(); - typename MetricType::MeasureType value; + typename MetricType::MeasureType value; typename MetricType::DerivativeType derivative; // Try GetValue and GetDerivative... @@ -196,10 +196,10 @@ template void -BasicTest(FixedImageReaderType * fixedImageReader, +BasicTest(FixedImageReaderType * fixedImageReader, MovingImageReaderType * movingImageReader, - InterpolatorType * interpolator, - TransformType * transform) + InterpolatorType * interpolator, + TransformType * transform) { using FixedImageType = typename FixedImageReaderType::OutputImageType; using MovingImageType = typename MovingImageReaderType::OutputImageType; @@ -207,19 +207,19 @@ BasicTest(FixedImageReaderType * fixedImageReader, fixedImageReader->Update(); movingImageReader->Update(); - typename FixedImageType::Pointer fixed = fixedImageReader->GetOutput(); + typename FixedImageType::Pointer fixed = fixedImageReader->GetOutput(); typename MovingImageType::Pointer moving = movingImageReader->GetOutput(); // Mean squares using MetricType = itk::MeanSquaresImageToImageMetric; - auto msMetric = MetricType::New(); + auto msMetric = MetricType::New(); MeanSquaresMetricInitializer msMetricInitializer(msMetric); TestAMetric(fixedImageReader, movingImageReader, interpolator, transform, msMetric.GetPointer(), msMetricInitializer); // Mattes MI using MattesMetricType = itk::MattesMutualInformationImageToImageMetric; - auto mattesMetric = MattesMetricType::New(); + auto mattesMetric = MattesMetricType::New(); MattesMIMetricInitializer mattesMetricInitializer(mattesMetric); TestAMetric( @@ -233,12 +233,12 @@ template void -TestAMetric(FixedImageReaderType * fixedImageReader, +TestAMetric(FixedImageReaderType * fixedImageReader, MovingImageReaderType * movingImageReader, - InterpolatorType * interpolator, - TransformType * transform, - MetricType * metric, - MetricInitializerType metricInitializer) + InterpolatorType * interpolator, + TransformType * transform, + MetricType * metric, + MetricInitializerType metricInitializer) { using FixedImageType = typename FixedImageReaderType::OutputImageType; using MovingImageType = typename MovingImageReaderType::OutputImageType; @@ -320,12 +320,12 @@ DoDebugTest(FixedImageReaderType * fixedImageReader, MovingImageReaderType * mov fixedImageReader->Update(); movingImageReader->Update(); - typename FixedImageType::Pointer fixed = fixedImageReader->GetOutput(); + typename FixedImageType::Pointer fixed = fixedImageReader->GetOutput(); typename MovingImageType::Pointer moving = movingImageReader->GetOutput(); // Mean squares using MetricType = itk::MeanSquaresImageToImageMetric; - auto metric = MetricType::New(); + auto metric = MetricType::New(); MeanSquaresMetricInitializer metricInitializer(metric); metric->SetFixedImageRegion(fixedImageReader->GetOutput()->GetBufferedRegion()); @@ -362,7 +362,7 @@ DoDebugTest(FixedImageReaderType * fixedImageReader, MovingImageReaderType * mov // Get the transform parameters for identity. ParametersType parameters = transform->GetParameters(); - typename MetricType::MeasureType value; + typename MetricType::MeasureType value; typename MetricType::DerivativeType derivative; parameters[0] = 0.1; diff --git a/Modules/Nonunit/Review/test/itkOptImageToImageMetricsTest2.h b/Modules/Nonunit/Review/test/itkOptImageToImageMetricsTest2.h index 37f959616c9..89a6c8a3c37 100644 --- a/Modules/Nonunit/Review/test/itkOptImageToImageMetricsTest2.h +++ b/Modules/Nonunit/Review/test/itkOptImageToImageMetricsTest2.h @@ -38,11 +38,11 @@ class OptImageToImageMetricsTest OptImageToImageMetricsTest() = default; void - RunTest(FixedImageType * fixed, - MovingImageType * moving, - InterpolatorType * interpolator, - TransformType * transform, - MetricType * metric, + RunTest(FixedImageType * fixed, + MovingImageType * moving, + InterpolatorType * interpolator, + TransformType * transform, + MetricType * metric, MetricInitializerType metricInitializer) { std::cout << "-------------------------------------------------------------------" << std::endl; @@ -122,10 +122,10 @@ template void -BasicTest(FixedImageReaderType * fixedImageReader, +BasicTest(FixedImageReaderType * fixedImageReader, MovingImageReaderType * movingImageReader, - InterpolatorType * interpolator, - TransformType * transform) + InterpolatorType * interpolator, + TransformType * transform) { using FixedImageType = typename FixedImageReaderType::OutputImageType; using MovingImageType = typename MovingImageReaderType::OutputImageType; @@ -133,12 +133,12 @@ BasicTest(FixedImageReaderType * fixedImageReader, fixedImageReader->Update(); movingImageReader->Update(); - typename FixedImageType::Pointer fixed = fixedImageReader->GetOutput(); + typename FixedImageType::Pointer fixed = fixedImageReader->GetOutput(); typename MovingImageType::Pointer moving = movingImageReader->GetOutput(); // Mean squares using MetricType = itk::MeanSquaresImageToImageMetric; - auto msMetric = MetricType::New(); + auto msMetric = MetricType::New(); MeanSquaresMetricInitializer msMetricInitializer(msMetric); TestAMetric(fixedImageReader, movingImageReader, interpolator, transform, msMetric.GetPointer(), msMetricInitializer); @@ -151,12 +151,12 @@ template void -TestAMetric(FixedImageReaderType * fixedImageReader, +TestAMetric(FixedImageReaderType * fixedImageReader, MovingImageReaderType * movingImageReader, - InterpolatorType * interpolator, - TransformType * transform, - MetricType * metric, - MetricInitializerType metricInitializer) + InterpolatorType * interpolator, + TransformType * transform, + MetricType * metric, + MetricInitializerType metricInitializer) { using FixedImageType = typename FixedImageReaderType::OutputImageType; using MovingImageType = typename MovingImageReaderType::OutputImageType; @@ -188,13 +188,13 @@ BSplineLinearTest(FixedImageReaderType * fixedImageReader, MovingImageReaderType fixedImageReader->Update(); movingImageReader->Update(); - typename FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); - typename MovingImageType::Pointer movingImage = movingImageReader->GetOutput(); - typename FixedImageType::SpacingType fixedSpacing = fixedImage->GetSpacing(); - typename FixedImageType::PointType fixedOrigin = fixedImage->GetOrigin(); + typename FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); + typename MovingImageType::Pointer movingImage = movingImageReader->GetOutput(); + typename FixedImageType::SpacingType fixedSpacing = fixedImage->GetSpacing(); + typename FixedImageType::PointType fixedOrigin = fixedImage->GetOrigin(); typename FixedImageType::DirectionType fixedDirection = fixedImage->GetDirection(); - typename FixedImageType::RegionType fixedRegion = fixedImage->GetBufferedRegion(); - typename FixedImageType::SizeType fixedSize = fixedRegion.GetSize(); + typename FixedImageType::RegionType fixedRegion = fixedImage->GetBufferedRegion(); + typename FixedImageType::SizeType fixedSize = fixedRegion.GetSize(); constexpr unsigned int SpaceDimension = 2; constexpr unsigned int VSplineOrder = 3; @@ -204,7 +204,7 @@ BSplineLinearTest(FixedImageReaderType * fixedImageReader, MovingImageReaderType auto bsplineTransform = TransformType::New(); - typename TransformType::MeshSizeType meshSize; + typename TransformType::MeshSizeType meshSize; typename TransformType::PhysicalDimensionsType physicalDimensions; for (unsigned int d = 0; d < SpaceDimension; ++d) { diff --git a/Modules/Nonunit/Review/test/itkOptMattesMutualInformationImageToImageMetricThreadsTest1.cxx b/Modules/Nonunit/Review/test/itkOptMattesMutualInformationImageToImageMetricThreadsTest1.cxx index 5a7425c38e0..ab6a69eee0b 100644 --- a/Modules/Nonunit/Review/test/itkOptMattesMutualInformationImageToImageMetricThreadsTest1.cxx +++ b/Modules/Nonunit/Review/test/itkOptMattesMutualInformationImageToImageMetricThreadsTest1.cxx @@ -104,13 +104,13 @@ itkOptMattesMutualInformationImageToImageMetricThreadsTest1(int argc, char * arg using MeasureType = MetricType::MeasureType; using DerivativeType = MetricType::DerivativeType; - MeasureType value_combined; + MeasureType value_combined; DerivativeType derivative_combined; - MeasureType value_separate; + MeasureType value_separate; DerivativeType derivative_separate; - std::vector values; + std::vector values; std::vector derivatives; // By now restrict the number of threads to test to the range 1 to 4. diff --git a/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdCalculatorTest.cxx b/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdCalculatorTest.cxx index 3560a7ce141..a9408d7dbfd 100644 --- a/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdCalculatorTest.cxx +++ b/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdCalculatorTest.cxx @@ -78,7 +78,7 @@ itkRobustAutomaticThresholdCalculatorTest(int argc, char * argv[]) // Regression test - auto expectedOutput = static_cast(std::stod(argv[3])); + auto expectedOutput = static_cast(std::stod(argv[3])); CalculatorType::InputPixelType computedOutput = calculator->GetOutput(); if (itk::Math::NotAlmostEquals(expectedOutput, computedOutput)) { diff --git a/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdImageFilterTest.cxx index 038772032fc..93d55858ea0 100644 --- a/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkRobustAutomaticThresholdImageFilterTest.cxx @@ -86,7 +86,7 @@ itkRobustAutomaticThresholdImageFilterTest(int argc, char * argv[]) // Regression test - auto expectedThreshold = static_cast(std::stod(argv[6])); + auto expectedThreshold = static_cast(std::stod(argv[6])); FilterType::InputPixelType computedThreshold = filter->GetThreshold(); if (itk::Math::NotAlmostEquals(expectedThreshold, computedThreshold)) { diff --git a/Modules/Nonunit/Review/test/itkScalarChanAndVeseDenseLevelSetImageFilterTest2.cxx b/Modules/Nonunit/Review/test/itkScalarChanAndVeseDenseLevelSetImageFilterTest2.cxx index 99033351c26..04da53cd8ae 100644 --- a/Modules/Nonunit/Review/test/itkScalarChanAndVeseDenseLevelSetImageFilterTest2.cxx +++ b/Modules/Nonunit/Review/test/itkScalarChanAndVeseDenseLevelSetImageFilterTest2.cxx @@ -37,15 +37,15 @@ itkScalarChanAndVeseDenseLevelSetImageFilterTest2(int argc, char * argv[]) } unsigned int nb_iteration = 500; - double rms = 0.; - double epsilon = 1.; - double curvature_weight = std::stod(argv[4]); - double area_weight = std::stod(argv[5]); - double reinitialization_weight = std::stod(argv[6]); - double volume_weight = std::stod(argv[7]); - double volume = std::stod(argv[8]); - double l1 = 1.; - double l2 = 1.; + double rms = 0.; + double epsilon = 1.; + double curvature_weight = std::stod(argv[4]); + double area_weight = std::stod(argv[5]); + double reinitialization_weight = std::stod(argv[6]); + double volume_weight = std::stod(argv[7]); + double volume = std::stod(argv[8]); + double l1 = 1.; + double l2 = 1.; constexpr unsigned int Dimension = 2; using ScalarPixelType = float; diff --git a/Modules/Nonunit/Review/test/itkScalarChanAndVeseDenseLevelSetImageFilterTest4.cxx b/Modules/Nonunit/Review/test/itkScalarChanAndVeseDenseLevelSetImageFilterTest4.cxx index 6c7210ad6f1..68232dc1f70 100644 --- a/Modules/Nonunit/Review/test/itkScalarChanAndVeseDenseLevelSetImageFilterTest4.cxx +++ b/Modules/Nonunit/Review/test/itkScalarChanAndVeseDenseLevelSetImageFilterTest4.cxx @@ -38,15 +38,15 @@ itkScalarChanAndVeseDenseLevelSetImageFilterTest4(int argc, char * argv[]) } unsigned int nb_iteration = 500; - double rms = 0.; - double epsilon = 1.; - double curvature_weight = std::stod(argv[4]); - double area_weight = std::stod(argv[5]); - double reinitialization_weight = std::stod(argv[6]); - double volume_weight = std::stod(argv[7]); - double volume = std::stod(argv[8]); - double l1 = 1.; - double l2 = 1.; + double rms = 0.; + double epsilon = 1.; + double curvature_weight = std::stod(argv[4]); + double area_weight = std::stod(argv[5]); + double reinitialization_weight = std::stod(argv[6]); + double volume_weight = std::stod(argv[7]); + double volume = std::stod(argv[8]); + double l1 = 1.; + double l2 = 1.; constexpr unsigned int Dimension = 2; using ScalarPixelType = float; diff --git a/Modules/Nonunit/Review/test/itkScalarChanAndVeseSparseLevelSetImageFilterTest2.cxx b/Modules/Nonunit/Review/test/itkScalarChanAndVeseSparseLevelSetImageFilterTest2.cxx index 454722c39f1..1a687e5dcd9 100644 --- a/Modules/Nonunit/Review/test/itkScalarChanAndVeseSparseLevelSetImageFilterTest2.cxx +++ b/Modules/Nonunit/Review/test/itkScalarChanAndVeseSparseLevelSetImageFilterTest2.cxx @@ -36,12 +36,12 @@ itkScalarChanAndVeseSparseLevelSetImageFilterTest2(int argc, char * argv[]) } unsigned int nb_iteration = 50; - double rms = 0.; - double epsilon = 1.; - double mu = 0.; - double nu = 0.; - double l1 = 1.; - double l2 = 3.; + double rms = 0.; + double epsilon = 1.; + double mu = 0.; + double nu = 0.; + double l1 = 1.; + double l2 = 3.; constexpr unsigned int Dimension = 2; using ScalarPixelType = float; diff --git a/Modules/Nonunit/Review/test/itkScalarRegionBasedLevelSetFunctionTest.cxx b/Modules/Nonunit/Review/test/itkScalarRegionBasedLevelSetFunctionTest.cxx index 07a69caa1b8..7fbe635619b 100644 --- a/Modules/Nonunit/Review/test/itkScalarRegionBasedLevelSetFunctionTest.cxx +++ b/Modules/Nonunit/Review/test/itkScalarRegionBasedLevelSetFunctionTest.cxx @@ -115,9 +115,9 @@ class ScalarRegionBasedLevelSetFunctionSharedDataHelper : public DataObject struct SingleData { typename InputImageType::Pointer m_HeavisideFunctionOfLevelSetImage; - int m_WeightedNumberOfPixelsInsideLevelSet; - int m_WeightedSumOfPixelValuesInsideLevelSet; - int m_ForegroundConstantValues; + int m_WeightedNumberOfPixelsInsideLevelSet; + int m_WeightedSumOfPixelValuesInsideLevelSet; + int m_ForegroundConstantValues; int m_WeightedNumberOfPixelsOutsideLevelSet; int m_WeightedSumOfPixelValuesOutsideLevelSet; diff --git a/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2.cxx b/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2.cxx index f9a45a48a46..36e750d6f4e 100644 --- a/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2.cxx +++ b/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2.cxx @@ -92,7 +92,7 @@ itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2(int, char *[]) function->SetInputImage(inputImage); function->ThresholdAbove(1); // >= 1 - FloodFilledIteratorType floodIt(inputImage, function, seedList); + FloodFilledIteratorType floodIt(inputImage, function, seedList); ShapedFloodFilledIteratorType shapedFloodIt(inputImage, function, seedList); shapedFloodIt.SetFullyConnected(false); // 4-connected, default diff --git a/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3.cxx b/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3.cxx index 10303d060f7..7801a68a0f2 100644 --- a/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3.cxx +++ b/Modules/Nonunit/Review/test/itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3.cxx @@ -94,7 +94,7 @@ itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3(int, char *[]) function->SetInputImage(inputImage); function->ThresholdAbove(1); // >= 1 - FloodFilledIteratorType floodIt(inputImage, function, seedList); + FloodFilledIteratorType floodIt(inputImage, function, seedList); ShapedFloodFilledIteratorType shapedFloodIt(inputImage, function, seedList); shapedFloodIt.SetFullyConnected(false); // 4-connected, default diff --git a/Modules/Nonunit/Review/test/itkTimeAndMemoryProbeTest.cxx b/Modules/Nonunit/Review/test/itkTimeAndMemoryProbeTest.cxx index d9667143418..2fa7f3441a4 100644 --- a/Modules/Nonunit/Review/test/itkTimeAndMemoryProbeTest.cxx +++ b/Modules/Nonunit/Review/test/itkTimeAndMemoryProbeTest.cxx @@ -23,7 +23,7 @@ int itkTimeAndMemoryProbeTest(int itkNotUsed(argc), char * itkNotUsed(argv)[]) { - itk::TimeProbe timeProbe; + itk::TimeProbe timeProbe; itk::MemoryProbesCollectorBase memoryProbes; timeProbe.Start(); diff --git a/Modules/Nonunit/Review/test/itkWarpHarmonicEnergyCalculatorTest.cxx b/Modules/Nonunit/Review/test/itkWarpHarmonicEnergyCalculatorTest.cxx index 807ab74a326..b9da9367975 100644 --- a/Modules/Nonunit/Review/test/itkWarpHarmonicEnergyCalculatorTest.cxx +++ b/Modules/Nonunit/Review/test/itkWarpHarmonicEnergyCalculatorTest.cxx @@ -102,7 +102,7 @@ itkWarpHarmonicEnergyCalculatorTest(int argc, char * argv[]) ITK_TRY_EXPECT_NO_EXCEPTION(calculator->Compute()); // Regression test: check the computed harmonic energy - double expectedEnergy = std::stod(argv[3]); + double expectedEnergy = std::stod(argv[3]); const double computedEnergy = calculator->GetHarmonicEnergy(); if (itk::Math::NotAlmostEquals(expectedEnergy, computedEnergy)) { diff --git a/Modules/Nonunit/Review/test/itkWarpJacobianDeterminantFilterTest.cxx b/Modules/Nonunit/Review/test/itkWarpJacobianDeterminantFilterTest.cxx index ccb590e35da..801a7938e6c 100644 --- a/Modules/Nonunit/Review/test/itkWarpJacobianDeterminantFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkWarpJacobianDeterminantFilterTest.cxx @@ -111,7 +111,7 @@ itkWarpJacobianDeterminantFilterTest(int, char *[]) while (!ot.IsAtEnd()) { DeformationPixelType input = it.Get(); - OutputPixelType output = ot.Get(); + OutputPixelType output = ot.Get(); std::cout << input << " => "; std::cout << output << std::endl; ++ot; diff --git a/Modules/Numerics/Eigen/include/itkEigenAnalysis2DImageFilter.hxx b/Modules/Numerics/Eigen/include/itkEigenAnalysis2DImageFilter.hxx index 320f86a0b04..46dd785b420 100644 --- a/Modules/Numerics/Eigen/include/itkEigenAnalysis2DImageFilter.hxx +++ b/Modules/Numerics/Eigen/include/itkEigenAnalysis2DImageFilter.hxx @@ -124,8 +124,8 @@ EigenAnalysis2DImageFilter::Ge const typename TInputImage::ConstPointer inputPtr3(dynamic_cast((ProcessObject::GetInput(2)))); - const EigenValueImagePointer outputPtr1 = this->GetMaxEigenValue(); - const EigenValueImagePointer outputPtr2 = this->GetMinEigenValue(); + const EigenValueImagePointer outputPtr1 = this->GetMaxEigenValue(); + const EigenValueImagePointer outputPtr2 = this->GetMinEigenValue(); const EigenVectorImagePointer outputPtr3 = this->GetMaxEigenVector(); outputPtr1->SetBufferedRegion(inputPtr1->GetBufferedRegion()); @@ -142,8 +142,8 @@ EigenAnalysis2DImageFilter::Ge ImageRegionConstIteratorWithIndex inputIt2(inputPtr2, region); ImageRegionConstIteratorWithIndex inputIt3(inputPtr3, region); - ImageRegionIteratorWithIndex outputIt1(outputPtr1, region); - ImageRegionIteratorWithIndex outputIt2(outputPtr2, region); + ImageRegionIteratorWithIndex outputIt1(outputPtr1, region); + ImageRegionIteratorWithIndex outputIt2(outputPtr2, region); ImageRegionIteratorWithIndex outputIt3(outputPtr3, region); constexpr EigenVectorType nullVector{}; diff --git a/Modules/Numerics/Eigen/test/itkEigenAnalysis2DImageFilterTest.cxx b/Modules/Numerics/Eigen/test/itkEigenAnalysis2DImageFilterTest.cxx index f6c7085dcbc..41b2da3a6aa 100644 --- a/Modules/Numerics/Eigen/test/itkEigenAnalysis2DImageFilterTest.cxx +++ b/Modules/Numerics/Eigen/test/itkEigenAnalysis2DImageFilterTest.cxx @@ -135,7 +135,7 @@ class EigenAnalysis2DImageFilterTester // Create a Filter - auto filter = myFilterType::New(); + auto filter = myFilterType::New(); const itk::SimpleFilterWatcher watcher(filter); // Connect the input images diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearLine.h b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearLine.h index f2757b39e4f..ba870d269a5 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearLine.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearLine.h @@ -103,8 +103,8 @@ class ITKFEM_EXPORT Element2DC0LinearLine : public ElementStd<2, 2> DistanceToLine(const VectorType & x, const VectorType & p1, const VectorType & p2, - Float & t, - VectorType & closestPoint) const; + Float & t, + VectorType & closestPoint) const; protected: void diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralMembrane.h b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralMembrane.h index 476f8128d0d..432b4c836cb 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralMembrane.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralMembrane.h @@ -84,10 +84,10 @@ class ITKFEM_EXPORT Element2DC0LinearQuadrilateralMembrane : public Element2DMem * Construct an element by specifying pointers to * 4 points and a material. */ - Element2DC0LinearQuadrilateralMembrane(NodeIDType n1_, - NodeIDType n2_, - NodeIDType n3_, - NodeIDType n4_, + Element2DC0LinearQuadrilateralMembrane(NodeIDType n1_, + NodeIDType n2_, + NodeIDType n3_, + NodeIDType n4_, Material::ConstPointer p_); protected: diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralStrain.h b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralStrain.h index 6f311bd5e4e..bb5bc494ae0 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralStrain.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralStrain.h @@ -82,10 +82,10 @@ class ITKFEM_EXPORT Element2DC0LinearQuadrilateralStrain : public Element2DStrai * Construct an element by specifying pointers to * 4 points and a material. */ - Element2DC0LinearQuadrilateralStrain(NodeIDType n1_, - NodeIDType n2_, - NodeIDType n3_, - NodeIDType n4_, + Element2DC0LinearQuadrilateralStrain(NodeIDType n1_, + NodeIDType n2_, + NodeIDType n3_, + NodeIDType n4_, Material::ConstPointer p_); protected: diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralStress.h b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralStress.h index 7133dc7b80e..7de5b54e302 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralStress.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralStress.h @@ -84,10 +84,10 @@ class ITKFEM_EXPORT Element2DC0LinearQuadrilateralStress : public Element2DStres * Construct an element by specifying pointers to * 4 points and a material. */ - Element2DC0LinearQuadrilateralStress(NodeIDType n1_, - NodeIDType n2_, - NodeIDType n3_, - NodeIDType n4_, + Element2DC0LinearQuadrilateralStress(NodeIDType n1_, + NodeIDType n2_, + NodeIDType n3_, + NodeIDType n4_, Material::ConstPointer p_); protected: diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DC0QuadraticTriangularStrain.h b/Modules/Numerics/FEM/include/itkFEMElement2DC0QuadraticTriangularStrain.h index 0d47bb1c7fb..df07632448c 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DC0QuadraticTriangularStrain.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DC0QuadraticTriangularStrain.h @@ -88,12 +88,12 @@ class ITKFEM_EXPORT Element2DC0QuadraticTriangularStrain : public Element2DStrai * Construct an element by specifying pointers to * 3 points and a material. */ - Element2DC0QuadraticTriangularStrain(NodeIDType n1_, - NodeIDType n2_, - NodeIDType n3_, - NodeIDType n4_, - NodeIDType n5_, - NodeIDType n6_, + Element2DC0QuadraticTriangularStrain(NodeIDType n1_, + NodeIDType n2_, + NodeIDType n3_, + NodeIDType n4_, + NodeIDType n5_, + NodeIDType n6_, Material::ConstPointer p_); protected: diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DC0QuadraticTriangularStress.h b/Modules/Numerics/FEM/include/itkFEMElement2DC0QuadraticTriangularStress.h index 87cd24ea7e0..201ac1250ff 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DC0QuadraticTriangularStress.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DC0QuadraticTriangularStress.h @@ -85,12 +85,12 @@ class ITKFEM_EXPORT Element2DC0QuadraticTriangularStress : public Element2DStres * Construct an element by specifying pointers to * 3 points and a material. */ - Element2DC0QuadraticTriangularStress(NodeIDType n1_, - NodeIDType n2_, - NodeIDType n3_, - NodeIDType n4_, - NodeIDType n5_, - NodeIDType n6_, + Element2DC0QuadraticTriangularStress(NodeIDType n1_, + NodeIDType n2_, + NodeIDType n3_, + NodeIDType n4_, + NodeIDType n5_, + NodeIDType n6_, Material::ConstPointer p_); protected: diff --git a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTriangular.h b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTriangular.h index 71a12db8285..ca3dffe48fa 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTriangular.h +++ b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTriangular.h @@ -122,7 +122,7 @@ class ITKFEM_EXPORT Element3DC0LinearTriangular : public ElementStd<3, 3> GeneralizedProjectPoint(const VectorType & x, const VectorType & origin, const VectorType & normal, - VectorType & xproj) const; + VectorType & xproj) const; /** Return the determinate of a 2x2 matrix */ itk::fem::Element::Float diff --git a/Modules/Numerics/FEM/include/itkFEMElementBase.h b/Modules/Numerics/FEM/include/itkFEMElementBase.h index 85bfb7deb0b..eff460a9ed6 100644 --- a/Modules/Numerics/FEM/include/itkFEMElementBase.h +++ b/Modules/Numerics/FEM/include/itkFEMElementBase.h @@ -398,9 +398,9 @@ class ITKFEM_EXPORT Element : public FEMLightObject */ virtual Float InterpolateSolutionN(const VectorType & pt, - const Solution & sol, - unsigned int f, - unsigned int solutionIndex = 0) const; + const Solution & sol, + unsigned int f, + unsigned int solutionIndex = 0) const; /** * Convenient way to access IDs of degrees of freedom @@ -633,7 +633,7 @@ class ITKFEM_EXPORT Element : public FEMLightObject */ virtual void ShapeFunctionGlobalDerivatives(const VectorType & pt, - MatrixType & shapeDgl, + MatrixType & shapeDgl, const MatrixType * pJ = nullptr, const MatrixType * pshapeD = nullptr) const; diff --git a/Modules/Numerics/FEM/include/itkFEMException.h b/Modules/Numerics/FEM/include/itkFEMException.h index c1f84604467..d816226f3d7 100644 --- a/Modules/Numerics/FEM/include/itkFEMException.h +++ b/Modules/Numerics/FEM/include/itkFEMException.h @@ -125,9 +125,9 @@ class ITK_ABI_EXPORT FEMExceptionObjectNotFound : public FEMException public: FEMExceptionObjectNotFound(const char * file, unsigned int lineNumber, - std::string location, - std::string baseClassName, - int GN); + std::string location, + std::string baseClassName, + int GN); /** Virtual destructor needed for subclasses. Has to have empty throw(). */ ~FEMExceptionObjectNotFound() noexcept override; @@ -139,7 +139,7 @@ class ITK_ABI_EXPORT FEMExceptionObjectNotFound : public FEMException * Base class of the searched object. */ std::string m_baseClassName{}; - int m_GlobalNumber{}; + int m_GlobalNumber{}; }; /** diff --git a/Modules/Numerics/FEM/include/itkFEMFactoryBase.h b/Modules/Numerics/FEM/include/itkFEMFactoryBase.h index 001cf546150..11c88d35b6d 100644 --- a/Modules/Numerics/FEM/include/itkFEMFactoryBase.h +++ b/Modules/Numerics/FEM/include/itkFEMFactoryBase.h @@ -96,10 +96,10 @@ class ITKFEM_EXPORT FEMFactoryBase : public ObjectFactoryBase } void - RegisterType(const char * classOverride, - const char * overrideClassName, - const char * description, - bool enableFlag, + RegisterType(const char * classOverride, + const char * overrideClassName, + const char * description, + bool enableFlag, CreateObjectFunctionBase * createFunction) { this->RegisterOverride(classOverride, overrideClassName, description, enableFlag, createFunction); @@ -110,7 +110,7 @@ class ITKFEM_EXPORT FEMFactoryBase : public ObjectFactoryBase ~FEMFactoryBase() override; private: - static std::mutex m_CreationMutex; + static std::mutex m_CreationMutex; static FEMFactoryBase * m_Factory; }; } // end namespace itk diff --git a/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.h b/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.h index 9ff99d0933a..cbd330a7fda 100644 --- a/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.h +++ b/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.h @@ -356,23 +356,23 @@ class ITK_TEMPLATE_EXPORT ImageMetricLoad : public LoadElement private: GradientImageType * m_MetricGradientImage{}; - MovingPointer m_RefImage{}; - FixedPointer m_TarImage{}; - MovingRadiusType m_MetricRadius{}; /** used by the metric to set - region size for fixed image*/ + MovingPointer m_RefImage{}; + FixedPointer m_TarImage{}; + MovingRadiusType m_MetricRadius{}; /** used by the metric to set + region size for fixed image*/ typename MovingType::SizeType m_RefSize{}; - typename FixedType::SizeType m_TarSize{}; - unsigned int m_NumberOfIntegrationPoints{}; - unsigned int m_SolutionIndex{}; - unsigned int m_SolutionIndex2{}; - Float m_Sign{}; - Float m_Temp{}; - Float m_Gamma{}; - - typename Solution::ConstPointer m_Solution{}; - MetricBaseTypePointer m_Metric{}; + typename FixedType::SizeType m_TarSize{}; + unsigned int m_NumberOfIntegrationPoints{}; + unsigned int m_SolutionIndex{}; + unsigned int m_SolutionIndex2{}; + Float m_Sign{}; + Float m_Temp{}; + Float m_Gamma{}; + + typename Solution::ConstPointer m_Solution{}; + MetricBaseTypePointer m_Metric{}; typename TransformBaseType::Pointer m_Transform{}; - typename InterpolatorType::Pointer m_Interpolator{}; + typename InterpolatorType::Pointer m_Interpolator{}; mutable double m_Energy{}; diff --git a/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.hxx b/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.hxx index 99030013022..5657c2a7918 100644 --- a/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.hxx +++ b/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.hxx @@ -29,7 +29,7 @@ itk::LightObject::Pointer ImageMetricLoad::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); // Copy Load Contents copyPtr->m_MetricGradientImage = this->m_MetricGradientImage; @@ -82,8 +82,8 @@ ImageMetricLoad::InitializeMetric() m_Metric->SetFixedImage(m_TarImage); typename FixedType::RegionType requestedRegion; - typename FixedType::SizeType size; - typename FixedType::IndexType tindex; + typename FixedType::SizeType size; + typename FixedType::IndexType tindex; // typename MovingType::IndexType rindex; // initialize the offset/vector part for (unsigned int k = 0; k < ImageDimension; ++k) @@ -148,9 +148,9 @@ ImageMetricLoad::EvaluateMetricGivenSolution(Element::ArrayType Element::VectorType ip, shapef; Element::MatrixType solmat; - Element::Float w; + Element::Float w; - auto elt = element->begin(); + auto elt = element->begin(); const unsigned int Nnodes = (*elt)->GetNumberOfNodes(); solmat.set_size(Nnodes * ImageDimension, 1); @@ -216,9 +216,9 @@ ImageMetricLoad::EvaluateMetricGivenSolution1(Element::ArrayTyp Element::VectorType ip, shapef; Element::MatrixType solmat; - Element::Float w; + Element::Float w; - auto elt = element->begin(); + auto elt = element->begin(); const unsigned int Nnodes = (*elt)->GetNumberOfNodes(); solmat.set_size(Nnodes * ImageDimension, 1); @@ -304,8 +304,8 @@ ImageMetricLoad::Fe(VectorType Gpos, VectorType Gsol) -> Vector ParametersType parameters(m_Transform->GetNumberOfParameters()); typename FixedType::RegionType requestedRegion; - FixedRadiusType regionRadius; - typename FixedType::IndexType tindex; + FixedRadiusType regionRadius; + typename FixedType::IndexType tindex; typename MovingType::IndexType rindex; OutVec.set_size(ImageDimension); @@ -348,7 +348,7 @@ ImageMetricLoad::Fe(VectorType Gpos, VectorType Gsol) -> Vector // -------------------------------------------------------- // Get metric values - typename MetricBaseType::MeasureType measure; + typename MetricBaseType::MeasureType measure; typename MetricBaseType::DerivativeType derivative; try @@ -407,10 +407,10 @@ ImageMetricLoad::GetMetric(VectorType InVec) -> Float ParametersType parameters(m_Transform->GetNumberOfParameters()); typename FixedType::RegionType requestedRegion; - typename FixedType::IndexType tindex; + typename FixedType::IndexType tindex; typename MovingType::IndexType rindex; - FixedRadiusType regionRadius; - VectorType OutVec(ImageDimension, 0.0); // gradient direction + FixedRadiusType regionRadius; + VectorType OutVec(ImageDimension, 0.0); // gradient direction // std::cout << " pos translation " << InVec << endl; // initialize the offset/vector part for (unsigned int k = 0; k < ImageDimension; ++k) @@ -475,8 +475,8 @@ ImageMetricLoad::MetricFiniteDiff(VectorType Gpos, VectorType G ParametersType parameters(ImageDimension); typename FixedType::RegionType requestedRegion; - typename FixedType::IndexType tindex; - FixedRadiusType regionRadius; + typename FixedType::IndexType tindex; + FixedRadiusType regionRadius; VectorType OutVec; OutVec.set_size(ImageDimension); @@ -509,7 +509,7 @@ ImageMetricLoad::MetricFiniteDiff(VectorType Gpos, VectorType G tindex[k] = static_cast(Gpos[k] + 0.5) - static_cast(regionRadius[k]) / 2; } - unsigned int row; + unsigned int row; typename ImageType::IndexType difIndex[ImageDimension][2]; typename MetricBaseType::MeasureType dPixL, dPixR; @@ -569,8 +569,8 @@ ImageMetricLoad::GetPolynomialFitToMetric(VectorType Gpos, Vect ParametersType parameters(ImageDimension); typename FixedType::RegionType requestedRegion; - typename FixedType::IndexType tindex; - FixedRadiusType regionRadius; + typename FixedType::IndexType tindex; + FixedRadiusType regionRadius; typename ImageType::IndexType temp; @@ -753,7 +753,7 @@ ImageMetricLoad::ApplyLoad(Element::ConstPointer element, Eleme // Element::VectorType force_tmp; // - Element::Float w; + Element::Float w; Element::VectorType force(Ndofs, 0.0); for (unsigned int i = 0; i < Nip; ++i) { diff --git a/Modules/Numerics/FEM/include/itkFEMItpackSparseMatrix.h b/Modules/Numerics/FEM/include/itkFEMItpackSparseMatrix.h index 5e3e3b28b98..a2dd6e6ed95 100644 --- a/Modules/Numerics/FEM/include/itkFEMItpackSparseMatrix.h +++ b/Modules/Numerics/FEM/include/itkFEMItpackSparseMatrix.h @@ -307,8 +307,8 @@ class ITK_ABI_EXPORT FEMExceptionItpackSparseMatrixSbagn : public FEMException */ FEMExceptionItpackSparseMatrixSbagn(const char * file, unsigned int lineNumber, - std::string location, - integer errorCode); + std::string location, + integer errorCode); /** Virtual destructor needed for subclasses. Has to have empty throw(). */ ~FEMExceptionItpackSparseMatrixSbagn() noexcept override; @@ -338,8 +338,8 @@ class ITK_ABI_EXPORT FEMExceptionItpackSparseMatrixSbsij : public FEMException */ FEMExceptionItpackSparseMatrixSbsij(const char * file, unsigned int lineNumber, - std::string location, - integer errorCode); + std::string location, + integer errorCode); /** Virtual destructor needed for subclasses. Has to have empty throw(). */ ~FEMExceptionItpackSparseMatrixSbsij() noexcept override; diff --git a/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapper.h b/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapper.h index 259d8beaf97..74cf7092240 100644 --- a/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapper.h +++ b/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapper.h @@ -527,11 +527,11 @@ class ITKFEM_EXPORT LinearSystemWrapper : public Solution CuthillMckeeOrdering(ColumnArray & newNumbering, int startingRow, unsigned int matrixIndex = 0); void - FollowConnectionsCuthillMckeeOrdering(unsigned int rowNumber, + FollowConnectionsCuthillMckeeOrdering(unsigned int rowNumber, ColumnArray & rowDegree, ColumnArray & newNumbering, - unsigned int nextRowNumber, - unsigned int matrixIndex = 0); + unsigned int nextRowNumber, + unsigned int matrixIndex = 0); }; class ITK_ABI_EXPORT FEMExceptionLinearSystem : public FEMException @@ -544,8 +544,8 @@ class ITK_ABI_EXPORT FEMExceptionLinearSystem : public FEMException */ FEMExceptionLinearSystem(const char * file, unsigned int lineNumber, - std::string location, - std::string moreDescription); + std::string location, + std::string moreDescription); /** Virtual destructor needed for subclasses. Has to have empty throw(). */ ~FEMExceptionLinearSystem() noexcept override; @@ -564,8 +564,8 @@ class ITK_ABI_EXPORT FEMExceptionLinearSystemBounds : public FEMException */ FEMExceptionLinearSystemBounds(const char * file, unsigned int lineNumber, - std::string location, - std::string moreDescription, + std::string location, + std::string moreDescription, unsigned int index1); /** @@ -574,8 +574,8 @@ class ITK_ABI_EXPORT FEMExceptionLinearSystemBounds : public FEMException * of the exception, the first index, and the second index */ FEMExceptionLinearSystemBounds(const char * file, unsigned int lineNumber, - std::string location, - std::string moreDescription, + std::string location, + std::string moreDescription, unsigned int index1, unsigned int index2); diff --git a/Modules/Numerics/FEM/include/itkFEMLoadElementBase.h b/Modules/Numerics/FEM/include/itkFEMLoadElementBase.h index 9336eca2948..c247911f7cd 100644 --- a/Modules/Numerics/FEM/include/itkFEMLoadElementBase.h +++ b/Modules/Numerics/FEM/include/itkFEMLoadElementBase.h @@ -115,7 +115,7 @@ class ITKFEM_EXPORT LoadElement : public Load void PrintSelf(std::ostream & os, Indent indent) const override; void - AddNextElementInternal(const Element * e); + AddNextElementInternal(const Element * e); ElementPointersVectorType m_Element{}; /** pointers to element objects on which the load acts */ }; diff --git a/Modules/Numerics/FEM/include/itkFEMLoadTest.h b/Modules/Numerics/FEM/include/itkFEMLoadTest.h index 3232be866de..cbde342546b 100644 --- a/Modules/Numerics/FEM/include/itkFEMLoadTest.h +++ b/Modules/Numerics/FEM/include/itkFEMLoadTest.h @@ -56,7 +56,7 @@ class LoadTest : public LoadElement CreateAnother() const override { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); for (unsigned int i = 0; i < this->m_Element.size(); ++i) { copyPtr->AddNextElement(this->m_Element[i]); diff --git a/Modules/Numerics/FEM/include/itkFEMObject.h b/Modules/Numerics/FEM/include/itkFEMObject.h index 163d967320f..98ad64905e8 100644 --- a/Modules/Numerics/FEM/include/itkFEMObject.h +++ b/Modules/Numerics/FEM/include/itkFEMObject.h @@ -380,9 +380,9 @@ class ITK_TEMPLATE_EXPORT FEMObject : public DataObject */ unsigned int m_NMFC{}; - ElementContainerPointer m_ElementContainer{}; - NodeContainerPointer m_NodeContainer{}; - LoadContainerPointer m_LoadContainer{}; + ElementContainerPointer m_ElementContainer{}; + NodeContainerPointer m_NodeContainer{}; + LoadContainerPointer m_LoadContainer{}; MaterialContainerPointer m_MaterialContainer{}; private: diff --git a/Modules/Numerics/FEM/include/itkFEMObject.hxx b/Modules/Numerics/FEM/include/itkFEMObject.hxx index a8c0eacea22..06bd6f90f3a 100644 --- a/Modules/Numerics/FEM/include/itkFEMObject.hxx +++ b/Modules/Numerics/FEM/include/itkFEMObject.hxx @@ -68,7 +68,7 @@ FEMObject::Clear() for (int e = 0; e < numElements; ++e) { Element::Pointer el = this->GetElement(e); - unsigned int Npts = el->GetNumberOfNodes(); + unsigned int Npts = el->GetNumberOfNodes(); for (unsigned int pt = 0; pt < Npts; ++pt) { el->GetNode(pt)->m_elements.clear(); @@ -87,7 +87,7 @@ FEMObject::Clear() for (int e = 0; e < numLoads; ++e) { Element::Pointer dummy; - Load * l = this->GetLoad(e).GetPointer(); + Load * l = this->GetLoad(e).GetPointer(); l->SetElement(dummy); } this->m_LoadContainer->Initialize(); @@ -104,7 +104,7 @@ FEMObject::DeepCopy(FEMObject * Copy) this->Clear(); // copy node information - int numNodes = Copy->GetNumberOfNodes(); + int numNodes = Copy->GetNumberOfNodes(); fem::Element::Node::Pointer n1; itk::fem::Element::VectorType pt(VDimension); @@ -139,7 +139,7 @@ FEMObject::DeepCopy(FEMObject * Copy) } // copy element information - int numElements = Copy->GetNumberOfElements(); + int numElements = Copy->GetNumberOfElements(); itk::LightObject::Pointer a = nullptr; for (int i = 0; i < numElements; ++i) { @@ -188,7 +188,7 @@ FEMObject::DeepCopy(FEMObject * Copy) o1->SetNode(lCopy->GetNode()); - int dim = VDimension; + int dim = VDimension; vnl_vector F(dim); for (int i = 0; i < dim; ++i) { @@ -213,7 +213,7 @@ FEMObject::DeepCopy(FEMObject * Copy) o1->SetElement(this->GetElementWithGlobalNumber(lCopy->GetElement()->GetGlobalNumber())); - int numRHS = lCopy->GetValue().size(); + int numRHS = lCopy->GetValue().size(); vnl_vector F(numRHS); for (int i = 0; i < numRHS; ++i) { @@ -233,9 +233,9 @@ FEMObject::DeepCopy(FEMObject * Copy) auto o1 = fem::LoadBCMFC::New(); o1->SetGlobalNumber(lCopy->GetGlobalNumber()); - int NumLHS; - int elementGN; - int DOF; + int NumLHS; + int elementGN; + int DOF; float Value; NumLHS = lCopy->GetNumberOfLeftHandSideTerms(); @@ -386,7 +386,7 @@ FEMObject::GenerateGFN() // Add the elements in the nodes list of elements // FIXME: should be removed once Mesh is there Element::Pointer el = this->GetElement(e); - unsigned int Npts = el->GetNumberOfNodes(); + unsigned int Npts = el->GetNumberOfNodes(); for (unsigned int pt = 0; pt < Npts; ++pt) { el->GetNode(pt)->m_elements.insert(el); @@ -475,7 +475,7 @@ void FEMObject::AddNextMaterialInternal(Material * e) { MaterialIdentifier size = this->m_MaterialContainer->Size(); - Material::Pointer m(e); + Material::Pointer m(e); this->m_MaterialContainer->InsertElement(size, m); } diff --git a/Modules/Numerics/FEM/include/itkFEMObjectSpatialObject.hxx b/Modules/Numerics/FEM/include/itkFEMObjectSpatialObject.hxx index b094f787632..be6c0e555f5 100644 --- a/Modules/Numerics/FEM/include/itkFEMObjectSpatialObject.hxx +++ b/Modules/Numerics/FEM/include/itkFEMObjectSpatialObject.hxx @@ -57,7 +57,7 @@ template ModifiedTimeType FEMObjectSpatialObject::GetMTime() const { - ModifiedTimeType latestMTime = Superclass::GetMTime(); + ModifiedTimeType latestMTime = Superclass::GetMTime(); const ModifiedTimeType femobjectMTime = m_FEMObject->GetMTime(); if (femobjectMTime > latestMTime) diff --git a/Modules/Numerics/FEM/include/itkFEMPArray.h b/Modules/Numerics/FEM/include/itkFEMPArray.h index b60e258c627..42fcb9370e5 100644 --- a/Modules/Numerics/FEM/include/itkFEMPArray.h +++ b/Modules/Numerics/FEM/include/itkFEMPArray.h @@ -171,7 +171,7 @@ int FEMPArray::Renumber() { typename Superclass::iterator i; - int j = 0; + int j = 0; for (i = this->begin(); i != this->end(); ++i) { (*i)->SetGlobalNumber(j); diff --git a/Modules/Numerics/FEM/include/itkFEMRobustSolver.hxx b/Modules/Numerics/FEM/include/itkFEMRobustSolver.hxx index 7c8e1b493c9..f20400fdea8 100644 --- a/Modules/Numerics/FEM/include/itkFEMRobustSolver.hxx +++ b/Modules/Numerics/FEM/include/itkFEMRobustSolver.hxx @@ -138,7 +138,7 @@ RobustSolver::InitializeLandmarks() landmark->SetContainedElement(element); const FEMIndexType numberOfDimensions = element->GetNumberOfSpatialDimensions(); - VectorType localPos(numberOfDimensions); + VectorType localPos(numberOfDimensions); element->GetLocalFromGlobalCoordinates(globalPosition, localPos); landmark->SetShape(element->ShapeFunctions(localPos)); @@ -155,7 +155,7 @@ RobustSolver::InitializeLandmarks() { landmark->AssignToElement(this->m_FEMObject->GetModifiableElementContainer()); Element::ConstPointer ep = landmark->GetElement(0); - VectorType localPos = landmark->GetPoint(); + VectorType localPos = landmark->GetPoint(); landmark->SetShape(ep->ShapeFunctions(localPos)); } } @@ -221,7 +221,7 @@ RobustSolver::IncrementalSolverWithOutlierRejection() // Solve the displacement vector U with outlier rejection const unsigned int numberOfLoads = this->m_FEMObject->GetNumberOfLoads(); - const double rejectionRate = this->m_FractionErrorRejected / this->m_OutlierRejectionSteps; + const double rejectionRate = this->m_FractionErrorRejected / this->m_OutlierRejectionSteps; const auto numberOfRejectedLandmarksPerStep = static_cast(floor(numberOfLoads * rejectionRate)); @@ -355,7 +355,7 @@ RobustSolver::ComputeLandmarkSimulatedDisplacementAndWeightedError() const double displacementNorm = error.two_norm(); error = landmark->GetRealDisplacement() - error; - const double confidence = landmark->GetConfidence(); + const double confidence = landmark->GetConfidence(); const VectorType weightedError = error / ((1 - lambda) * displacementNorm + lambda); if (landmark->HasStructureTensor()) @@ -705,8 +705,8 @@ RobustSolver::AssembleLandmarkStiffnessMatrix() { for (FEMIndexType m = 0; m < numberOfDOFs; ++m) { - const int dofn = element->GetDegreeOfFreedom(k * numberOfDOFs + n); - const int dofm = element->GetDegreeOfFreedom(k * numberOfDOFs + m); + const int dofn = element->GetDegreeOfFreedom(k * numberOfDOFs + n); + const int dofm = element->GetDegreeOfFreedom(k * numberOfDOFs + m); const auto value = static_cast(barCoor * m_TradeOffImageMeshEnergy * pointTensorPonderation * (tens(n, m))*confidence); @@ -726,8 +726,8 @@ RobustSolver::AssembleLandmarkStiffnessMatrix() { for (FEMIndexType m = 0; m < numberOfDOFs; ++m) { - const int dofn = element->GetDegreeOfFreedom(i * numberOfDOFs + n); - const int dofm = element->GetDegreeOfFreedom(j * numberOfDOFs + m); + const int dofn = element->GetDegreeOfFreedom(i * numberOfDOFs + n); + const int dofm = element->GetDegreeOfFreedom(j * numberOfDOFs + m); const auto value = static_cast(barCoor * m_TradeOffImageMeshEnergy * pointTensorPonderation * (tens(n, m))*confidence); @@ -790,8 +790,8 @@ RobustSolver::RemoveUnselectedLandmarkContributionInPointStiffnessMa { for (FEMIndexType m = 0; m < numberOfDOFs; ++m) { - const int dofn = element->GetDegreeOfFreedom(k * numberOfDOFs + n); - const int dofm = element->GetDegreeOfFreedom(k * numberOfDOFs + m); + const int dofn = element->GetDegreeOfFreedom(k * numberOfDOFs + n); + const int dofm = element->GetDegreeOfFreedom(k * numberOfDOFs + m); const auto value = static_cast(-barCoor * m_TradeOffImageMeshEnergy * pointTensorPonderation * (tens(n, m))*confidence); @@ -810,8 +810,8 @@ RobustSolver::RemoveUnselectedLandmarkContributionInPointStiffnessMa { for (FEMIndexType m = 0; m < numberOfDOFs; ++m) { - const int dofn = element->GetDegreeOfFreedom(i * numberOfDOFs + n); - const int dofm = element->GetDegreeOfFreedom(j * numberOfDOFs + m); + const int dofn = element->GetDegreeOfFreedom(i * numberOfDOFs + n); + const int dofm = element->GetDegreeOfFreedom(j * numberOfDOFs + m); const auto value = static_cast(-barCoor * m_TradeOffImageMeshEnergy * pointTensorPonderation * (tens(n, m))*confidence); @@ -952,7 +952,7 @@ void RobustSolver::InitializeInterpolationGrid() { const InterpolationGridRegionType & region = this->GetRegion(); - InterpolationGridSizeType size = region.GetSize(); + InterpolationGridSizeType size = region.GetSize(); for (unsigned int i = 0; i < this->FEMDimension; ++i) { if (size[i] == 0) diff --git a/Modules/Numerics/FEM/include/itkFEMScatteredDataPointSetToImageFilter.h b/Modules/Numerics/FEM/include/itkFEMScatteredDataPointSetToImageFilter.h index 6eebee8f8a4..6a212bc6afc 100644 --- a/Modules/Numerics/FEM/include/itkFEMScatteredDataPointSetToImageFilter.h +++ b/Modules/Numerics/FEM/include/itkFEMScatteredDataPointSetToImageFilter.h @@ -296,18 +296,18 @@ class ITK_TEMPLATE_EXPORT FEMScatteredDataPointSetToImageFilter PrintSelf(std::ostream & os, Indent indent) const override; private: - typename FEMObjectType::Pointer m_FEMObject{}; - typename FEMSolverType::Pointer m_FEMSolver{}; + typename FEMObjectType::Pointer m_FEMObject{}; + typename FEMSolverType::Pointer m_FEMSolver{}; typename FEMSolverType::ConstPointer m_FEMDeformedObject{}; - typename MeshType::Pointer m_Mesh{}; + typename MeshType::Pointer m_Mesh{}; typename ConfidencePointSetType::ConstPointer m_ConfidencePointSet{}; - typename TensorPointSetType::ConstPointer m_TensorPointSet{}; + typename TensorPointSetType::ConstPointer m_TensorPointSet{}; /** Rectilinear mesh */ - SizeType m_NumberOfElements{}; + SizeType m_NumberOfElements{}; ContinuousIndexType m_PixelsPerElement{}; - SpacingType m_SpacingPerElement{}; + SpacingType m_SpacingPerElement{}; /** Material */ MaterialPointerType m_Material{}; diff --git a/Modules/Numerics/FEM/include/itkFEMScatteredDataPointSetToImageFilter.hxx b/Modules/Numerics/FEM/include/itkFEMScatteredDataPointSetToImageFilter.hxx index fb0121d63d4..36a81140986 100644 --- a/Modules/Numerics/FEM/include/itkFEMScatteredDataPointSetToImageFilter.hxx +++ b/Modules/Numerics/FEM/include/itkFEMScatteredDataPointSetToImageFilter.hxx @@ -80,7 +80,7 @@ FEMScatteredDataPointSetToImageFilterm_SpacingPerElement = elementSpacing; typename ImageType::Pointer image = this->GetOutput(); - const SpacingType & imageSpacing = image->GetSpacing(); + const SpacingType & imageSpacing = image->GetSpacing(); for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -198,8 +198,8 @@ FEMScatteredDataPointSetToImageFilter::Generate2DQuadrilateralMesh() { ImageType * image = this->GetOutput(); - RegionType region = image->GetLargestPossibleRegion(); - SizeType size = region.GetSize(); + RegionType region = image->GetLargestPossibleRegion(); + SizeType size = region.GetSize(); const double elementFraction0 = (size[0] - 1) / m_PixelsPerElement[0]; const double elementFraction1 = (size[1] - 1) / m_PixelsPerElement[1]; @@ -210,9 +210,9 @@ FEMScatteredDataPointSetToImageFilterm_Mesh = MeshType::New(); // create nodes - ContinuousIndexType pointIndex; + ContinuousIndexType pointIndex; typename ImageType::PointType pointCoordinate; - int globalNumbering = 0; + int globalNumbering = 0; for (float j = 0; j <= m_NumberOfElements[1]; ++j) { @@ -262,8 +262,8 @@ FEMScatteredDataPointSetToImageFilter::Generate3DHexahedralMesh() { ImageType * image = this->GetOutput(); - RegionType region = image->GetLargestPossibleRegion(); - SizeType size = region.GetSize(); + RegionType region = image->GetLargestPossibleRegion(); + SizeType size = region.GetSize(); const double elementFraction0 = (size[0] - 1) / m_PixelsPerElement[0]; const double elementFraction1 = (size[1] - 1) / m_PixelsPerElement[1]; @@ -276,7 +276,7 @@ FEMScatteredDataPointSetToImageFilterm_Mesh = MeshType::New(); // create nodes - ContinuousIndexType pointIndex; + ContinuousIndexType pointIndex; typename ImageType::PointType pointCoordinate; int globalNumbering = 0; @@ -418,7 +418,7 @@ FEMScatteredDataPointSetToImageFilterInitialize(); typename PointsContainer::Pointer meshPoints = this->m_Mesh->GetPoints(); - PointsIterator it = meshPoints->Begin(); + PointsIterator it = meshPoints->Begin(); FEMVectorType point(ImageDimension); @@ -465,7 +465,7 @@ FEMScatteredDataPointSetToImageFilterm_Mesh->GetCells(); - CellIterator cellIterator = cells->Begin(); + CellIterator cellIterator = cells->Begin(); while (cellIterator != cells->End()) { @@ -625,10 +625,10 @@ FEMScatteredDataPointSetToImageFilterGetPoints(); - PointsIterator it = featurePoints->Begin(); - PointDataIterator displacementIt = displacementVector->Begin(); + PointsIterator it = featurePoints->Begin(); + PointDataIterator displacementIt = displacementVector->Begin(); typename ConfidencePointDataContainerType::ConstIterator confidenceIt; - typename TensorPointDataContainerType::ConstIterator tensorIt; + typename TensorPointDataContainerType::ConstIterator tensorIt; if (this->m_ConfidencePointSet.IsNotNull()) { @@ -700,15 +700,15 @@ FEMScatteredDataPointSetToImageFilterGetOutput(); - RegionType region = output->GetLargestPossibleRegion(); + ImageType * output = this->GetOutput(); + RegionType region = output->GetLargestPossibleRegion(); ImageRegionIterator iter(output, region); - PointType point; - unsigned int solutionIndex = 0; + PointType point; + unsigned int solutionIndex = 0; FEMVectorType globalPoint(ImageDimension); FEMVectorType localPoint(ImageDimension); - PixelType displacement; + PixelType displacement; // step over all points within the region for (iter.GoToBegin(); !iter.IsAtEnd(); ++iter) diff --git a/Modules/Numerics/FEM/include/itkFEMSolver.h b/Modules/Numerics/FEM/include/itkFEMSolver.h index 5ffa36415a7..64769dd4128 100644 --- a/Modules/Numerics/FEM/include/itkFEMSolver.h +++ b/Modules/Numerics/FEM/include/itkFEMSolver.h @@ -220,7 +220,7 @@ class ITK_TEMPLATE_EXPORT Solver : public ProcessObject * \sa GetInterpolationGrid */ void - InitializeInterpolationGrid(const InterpolationGridSizeType & size, + InitializeInterpolationGrid(const InterpolationGridSizeType & size, const InterpolationGridPointType & bb1, const InterpolationGridPointType & bb2); @@ -241,9 +241,9 @@ class ITK_TEMPLATE_EXPORT Solver : public ProcessObject /** Initialize the interpolation grid, over the domain specified by the * user. */ void - InitializeInterpolationGrid(const InterpolationGridRegionType & region, - const InterpolationGridPointType & origin, - const InterpolationGridSpacingType & spacing, + InitializeInterpolationGrid(const InterpolationGridRegionType & region, + const InterpolationGridPointType & origin, + const InterpolationGridSpacingType & spacing, const InterpolationGridDirectionType & direction); /** @@ -433,9 +433,9 @@ class ITK_TEMPLATE_EXPORT Solver : public ProcessObject private: /** Properties of the interpolation grid. */ - InterpolationGridRegionType m_Region{}; - InterpolationGridPointType m_Origin{}; - InterpolationGridSpacingType m_Spacing{}; + InterpolationGridRegionType m_Region{}; + InterpolationGridPointType m_Origin{}; + InterpolationGridSpacingType m_Spacing{}; InterpolationGridDirectionType m_Direction{}; }; } // end namespace fem diff --git a/Modules/Numerics/FEM/include/itkFEMSolver.hxx b/Modules/Numerics/FEM/include/itkFEMSolver.hxx index 295e78970f9..dd9eacd2345 100644 --- a/Modules/Numerics/FEM/include/itkFEMSolver.hxx +++ b/Modules/Numerics/FEM/include/itkFEMSolver.hxx @@ -588,14 +588,14 @@ template auto Solver::GetDeformationEnergy(unsigned int SolutionIndex) -> Float { - Float U = 0.0f; + Float U = 0.0f; Element::MatrixType LocalSolution; unsigned int numberOfElements = m_FEMObject->GetNumberOfElements(); for (unsigned int index = 0; index < numberOfElements; ++index) { Element::Pointer e = m_FEMObject->GetElement(index); - unsigned int Ne = e->GetNumberOfDegreesOfFreedom(); + unsigned int Ne = e->GetNumberOfDegreesOfFreedom(); LocalSolution.set_size(Ne, 1); // Step over all DOFs of element for (unsigned int j = 0; j < Ne; ++j) @@ -661,7 +661,7 @@ Solver::ApplyBC(int dim, unsigned int matrix) if (LoadBC::Pointer c = dynamic_cast(l0.GetPointer())) { Element::DegreeOfFreedomIDType fdof = c->GetElement()->GetDegreeOfFreedom(c->GetDegreeOfFreedom()); - Float fixedvalue = c->GetValue()[dim]; + Float fixedvalue = c->GetValue()[dim]; // Copy the corresponding row of the matrix to the vector that will // be later added to the master force vector. @@ -714,7 +714,7 @@ Solver::ApplyBC(int dim, unsigned int matrix) template void -Solver::InitializeInterpolationGrid(const InterpolationGridSizeType & size, +Solver::InitializeInterpolationGrid(const InterpolationGridSizeType & size, const InterpolationGridPointType & bb1, const InterpolationGridPointType & bb2) { @@ -874,9 +874,9 @@ Solver::FillInterpolationGrid() template void -Solver::InitializeInterpolationGrid(const InterpolationGridRegionType & region, - const InterpolationGridPointType & origin, - const InterpolationGridSpacingType & spacing, +Solver::InitializeInterpolationGrid(const InterpolationGridRegionType & region, + const InterpolationGridPointType & origin, + const InterpolationGridSpacingType & spacing, const InterpolationGridDirectionType & direction) { InterpolationGridSizeType size = region.GetSize(); diff --git a/Modules/Numerics/FEM/include/itkFEMSolverCrankNicolson.h b/Modules/Numerics/FEM/include/itkFEMSolverCrankNicolson.h index 829af183104..4dbead5895a 100644 --- a/Modules/Numerics/FEM/include/itkFEMSolverCrankNicolson.h +++ b/Modules/Numerics/FEM/include/itkFEMSolverCrankNicolson.h @@ -262,7 +262,7 @@ class ITK_TEMPLATE_EXPORT SolverCrankNicolson : public Solver Float m_Alpha{}; Float m_CurrentMaxSolution{}; - bool m_UseMassMatrix{}; + bool m_UseMassMatrix{}; unsigned int m_Iterations{}; unsigned int m_ForceTIndex{}; diff --git a/Modules/Numerics/FEM/include/itkFEMSolverCrankNicolson.hxx b/Modules/Numerics/FEM/include/itkFEMSolverCrankNicolson.hxx index b7aeb4471b5..f75bf586371 100644 --- a/Modules/Numerics/FEM/include/itkFEMSolverCrankNicolson.hxx +++ b/Modules/Numerics/FEM/include/itkFEMSolverCrankNicolson.hxx @@ -179,7 +179,7 @@ SolverCrankNicolson::AssembleKandM() if (LoadLandmark::Pointer l3 = dynamic_cast(this->m_FEMObject->GetLoad(l2).GetPointer())) { Element::ConstPointer ep = (l3->GetElementArray()[0]); - Element::MatrixType Le; + Element::MatrixType Le; ep->GetLandmarkContributionMatrix(l3->GetEta(), Le); int Ne = ep->GetNumberOfDegreesOfFreedom(); // Step over all rows in element matrix diff --git a/Modules/Numerics/FEM/include/itkFEMSolverHyperbolic.h b/Modules/Numerics/FEM/include/itkFEMSolverHyperbolic.h index 5aa1b121b78..6a9ac550545 100644 --- a/Modules/Numerics/FEM/include/itkFEMSolverHyperbolic.h +++ b/Modules/Numerics/FEM/include/itkFEMSolverHyperbolic.h @@ -149,9 +149,9 @@ class ITK_TEMPLATE_EXPORT SolverHyperbolic : public Solver vector_tmp = 5 }; - Float m_TimeStep{}; - Float m_Gamma{}; - Float m_Beta{}; + Float m_TimeStep{}; + Float m_Gamma{}; + Float m_Beta{}; unsigned int m_NumberOfIterations{}; }; diff --git a/Modules/Numerics/FEM/include/itkImageToRectilinearFEMObjectFilter.h b/Modules/Numerics/FEM/include/itkImageToRectilinearFEMObjectFilter.h index 66622c79e21..fe00e50856b 100644 --- a/Modules/Numerics/FEM/include/itkImageToRectilinearFEMObjectFilter.h +++ b/Modules/Numerics/FEM/include/itkImageToRectilinearFEMObjectFilter.h @@ -172,8 +172,8 @@ class ITK_TEMPLATE_EXPORT ImageToRectilinearFEMObjectFilter : public ProcessObje private: vnl_vector m_NumberOfElements{}; vnl_vector m_PixelsPerElement{}; - MaterialPointerType m_Material{}; - ElementBasePointerType m_Element{}; + MaterialPointerType m_Material{}; + ElementBasePointerType m_Element{}; }; } // end namespace fem } // end namespace itk diff --git a/Modules/Numerics/FEM/include/itkImageToRectilinearFEMObjectFilter.hxx b/Modules/Numerics/FEM/include/itkImageToRectilinearFEMObjectFilter.hxx index e860eb9e2ca..88928ef9ca8 100644 --- a/Modules/Numerics/FEM/include/itkImageToRectilinearFEMObjectFilter.hxx +++ b/Modules/Numerics/FEM/include/itkImageToRectilinearFEMObjectFilter.hxx @@ -131,8 +131,8 @@ void ImageToRectilinearFEMObjectFilter::Generate2DRectilinearMesh() { ImageConstPointer image = this->GetInput(); - ImageRegionType region = image->GetLargestPossibleRegion(); - ImageSizeType size = region.GetSize(); + ImageRegionType region = image->GetLargestPossibleRegion(); + ImageSizeType size = region.GetSize(); this->m_NumberOfElements[0] = size[0] / m_PixelsPerElement[0]; this->m_NumberOfElements[1] = size[1] / m_PixelsPerElement[1]; @@ -144,8 +144,8 @@ ImageToRectilinearFEMObjectFilter::Generate2DRectilinearMesh() // Create nodes Element::Node::Pointer n; - ImageIndexType nodeIndex; - ImagePointType nodePoint; + ImageIndexType nodeIndex; + ImagePointType nodePoint; if (this->m_Material) { @@ -199,8 +199,8 @@ void ImageToRectilinearFEMObjectFilter::Generate3DRectilinearMesh() { ImageConstPointer image = this->GetInput(); - ImageRegionType region = image->GetLargestPossibleRegion(); - ImageSizeType size = region.GetSize(); + ImageRegionType region = image->GetLargestPossibleRegion(); + ImageSizeType size = region.GetSize(); this->m_NumberOfElements[0] = size[0] / m_PixelsPerElement[0]; this->m_NumberOfElements[1] = size[1] / m_PixelsPerElement[1]; @@ -218,9 +218,9 @@ ImageToRectilinearFEMObjectFilter::Generate3DRectilinearMesh() // Create nodes Element::Node::Pointer n; - ImageIndexType nodeIndex; - ImagePointType nodePoint; - int gn = 0; // number of node + ImageIndexType nodeIndex; + ImagePointType nodePoint; + int gn = 0; // number of node for (unsigned int k = 0; k <= m_NumberOfElements[2]; ++k) { nodeIndex[2] = k * m_PixelsPerElement[2]; diff --git a/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.hxx b/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.hxx index 682230060c0..e743c5df9d0 100644 --- a/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.hxx +++ b/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.hxx @@ -113,7 +113,7 @@ MetaFEMObjectConverter::MetaObjectToSpatialObject(const MetaObjectTy while (it_elements != elementlist.end()) { - FEMObjectElement * element = (*it_elements); + FEMObjectElement * element = (*it_elements); itk::LightObject::Pointer a = ObjectFactoryBase::CreateInstance(element->m_ElementName); a->UnRegister(); fem::Element::Pointer o1 = dynamic_cast(a.GetPointer()); @@ -149,7 +149,7 @@ MetaFEMObjectConverter::MetaObjectToSpatialObject(const MetaObjectTy o1->SetNode(load->m_NodeNumber); - int dim = load->m_Dim; + int dim = load->m_Dim; vnl_vector F(dim); for (int i = 0; i < dim; ++i) { @@ -167,7 +167,7 @@ MetaFEMObjectConverter::MetaObjectToSpatialObject(const MetaObjectTy o1->SetElement(myFEMObject->GetElementWithGlobalNumber(load->m_ElementGN)); - int numRHS = load->m_NumRHS; + int numRHS = load->m_NumRHS; vnl_vector F(numRHS); for (int i = 0; i < numRHS; ++i) { @@ -181,9 +181,9 @@ MetaFEMObjectConverter::MetaObjectToSpatialObject(const MetaObjectTy auto o1 = fem::LoadBCMFC::New(); o1->SetGlobalNumber(load->m_GN); - int NumLHS; - int elementGN; - int DOF; + int NumLHS; + int elementGN; + int DOF; float Value; NumLHS = load->m_NumLHS; @@ -226,7 +226,7 @@ MetaFEMObjectConverter::MetaObjectToSpatialObject(const MetaObjectTy if (numRows) { std::vector forcevector = force[0]; - auto numCols = static_cast(forcevector.size()); + auto numCols = static_cast(forcevector.size()); o1->GetForce().set_size(numRows, numCols); for (int i = 0; i < numRows; ++i) { @@ -263,7 +263,7 @@ MetaFEMObjectConverter::MetaObjectToSpatialObject(const MetaObjectTy o1->SetEta(load->m_Variance); o1->GetElementArray().resize(1); - auto dim = static_cast(load->m_Undeformed.size()); + auto dim = static_cast(load->m_Undeformed.size()); vnl_vector source; vnl_vector target; vnl_vector point; @@ -333,9 +333,9 @@ MetaFEMObjectConverter::SpatialObjectToMetaObject(const SpatialObjec const int numSONodes = curFEMObject->GetNumberOfNodes(); for (int i = 0; i < numSONodes; ++i) { - auto * Node = new FEMObjectNode(VDimension); + auto * Node = new FEMObjectNode(VDimension); fem::Element::Node::ConstPointer SONode = curFEMObject->GetNode(i); - fem::Element::VectorType pt = SONode->GetCoordinates(); + fem::Element::VectorType pt = SONode->GetCoordinates(); Node->m_GN = SONode->GetGlobalNumber(); for (unsigned int j = 0; j < VDimension; ++j) @@ -350,7 +350,7 @@ MetaFEMObjectConverter::SpatialObjectToMetaObject(const SpatialObjec for (int i = 0; i < numMaterial; ++i) { fem::Material::ConstPointer SOMaterial = curFEMObject->GetMaterial(i); - auto * Material = new FEMObjectMaterial; + auto * Material = new FEMObjectMaterial; // check for the material type std::string mat_name = SOMaterial->GetNameOfClass(); @@ -376,8 +376,8 @@ MetaFEMObjectConverter::SpatialObjectToMetaObject(const SpatialObjec for (int i = 0; i < numElements; ++i) { fem::Element::ConstPointer SOElement = curFEMObject->GetElement(i); - const int numNodes = SOElement->GetNumberOfNodes(); - auto * Element = new FEMObjectElement(numNodes); + const int numNodes = SOElement->GetNumberOfNodes(); + auto * Element = new FEMObjectElement(numNodes); Element->m_GN = SOElement->GetGlobalNumber(); Element->m_Dim = VDimension; @@ -398,7 +398,7 @@ MetaFEMObjectConverter::SpatialObjectToMetaObject(const SpatialObjec for (int ll = 0; ll < numLoads; ++ll) { fem::Load::ConstPointer SOLoad = curFEMObject->GetLoad(ll); - auto * Load = new FEMObjectLoad; + auto * Load = new FEMObjectLoad; // check for the load/bc type std::string load_name = SOLoad->GetNameOfClass(); @@ -439,8 +439,8 @@ MetaFEMObjectConverter::SpatialObjectToMetaObject(const SpatialObjec } else if (load_name == "LoadBCMFC") { - int elementGN; - int DOF; + int elementGN; + int DOF; float Value; fem::LoadBCMFC::ConstPointer SOLoadCast = dynamic_cast(SOLoad.GetPointer()); diff --git a/Modules/Numerics/FEM/include/itpack.h b/Modules/Numerics/FEM/include/itpack.h index 211188b7a74..3e1f8571112 100644 --- a/Modules/Numerics/FEM/include/itpack.h +++ b/Modules/Numerics/FEM/include/itpack.h @@ -73,18 +73,18 @@ extern "C" * \param ierr holds error flag on return */ extern int - jcg_(integer * nn, - integer * ia, - integer * ja, + jcg_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, - integer * iwksp, - integer * nw, + integer * iwksp, + integer * nw, doublereal * wksp, - integer * iparm, + integer * iparm, doublereal * rparm, - integer * ierr); + integer * ierr); /** * Jacobian semi-iteration @@ -103,18 +103,18 @@ extern "C" * \param ierr holds error flag on return */ extern int - jsi_(integer * nn, - integer * ia, - integer * ja, + jsi_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, - integer * iwksp, - integer * nw, + integer * iwksp, + integer * nw, doublereal * wksp, - integer * iparm, + integer * iparm, doublereal * rparm, - integer * ierr); + integer * ierr); /** * Successive over-relaxation @@ -133,18 +133,18 @@ extern "C" * \param ierr holds error flag on return */ extern int - sor_(integer * nn, - integer * ia, - integer * ja, + sor_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, - integer * iwksp, - integer * nw, + integer * iwksp, + integer * nw, doublereal * wksp, - integer * iparm, + integer * iparm, doublereal * rparm, - integer * ierr); + integer * ierr); /** * Symmetric successive over-relaxation conjugate gradient @@ -163,18 +163,18 @@ extern "C" * \param ierr holds error flag on return */ extern int - ssorcg_(integer * nn, - integer * ia, - integer * ja, + ssorcg_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, - integer * iwksp, - integer * nw, + integer * iwksp, + integer * nw, doublereal * wksp, - integer * iparm, + integer * iparm, doublereal * rparm, - integer * ierr); + integer * ierr); /** * Symmetric successive over-relaxation semi-iteration @@ -193,18 +193,18 @@ extern "C" * \param ierr holds error flag on return */ extern int - ssorsi_(integer * nn, - integer * ia, - integer * ja, + ssorsi_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, - integer * iwksp, - integer * nw, + integer * iwksp, + integer * nw, doublereal * wksp, - integer * iparm, + integer * iparm, doublereal * rparm, - integer * ierr); + integer * ierr); /** * Reduced system conjugate gradient @@ -223,18 +223,18 @@ extern "C" * \param ierr holds error flag on return */ extern int - rscg_(integer * nn, - integer * ia, - integer * ja, + rscg_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, - integer * iwksp, - integer * nw, + integer * iwksp, + integer * nw, doublereal * wksp, - integer * iparm, + integer * iparm, doublereal * rparm, - integer * ierr); + integer * ierr); /** * Reduced system semi-iteration @@ -253,18 +253,18 @@ extern "C" * \param ierr holds error flag on return */ extern int - rssi_(integer * nn, - integer * ia, - integer * ja, + rssi_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, - integer * iwksp, - integer * nw, + integer * iwksp, + integer * nw, doublereal * wksp, - integer * iparm, + integer * iparm, doublereal * rparm, - integer * ierr); + integer * ierr); /** * Performs one iteration of the jacobian conjugate gradient method @@ -280,9 +280,9 @@ extern "C" * \param tri stores the tridiagonal matrix associated with the eigenvalues of the conjugate gradient polynomial */ extern int - itjcg_(integer * nn, - integer * ia, - integer * ja, + itjcg_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * u, doublereal * u1, @@ -304,15 +304,15 @@ extern "C" * \param icnt number of iterations since last change in solution estimate */ extern int - itjsi_(integer * nn, - integer * ia, - integer * ja, + itjsi_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, doublereal * u1, doublereal * d__, - integer * icnt); + integer * icnt); /** * Performs one iteration of the successive over-relaxation method @@ -344,9 +344,9 @@ extern "C" * \param tri stores the tridiagonal matrix associated with the eigenvalues of the conjugate gradient polynomial */ extern int - itsrcg_(integer * nn, - integer * ia, - integer * ja, + itsrcg_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, @@ -373,9 +373,9 @@ extern "C" * \param wk work array of length nn */ extern int - itsrsi_(integer * nn, - integer * ia, - integer * ja, + itsrsi_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, @@ -400,10 +400,10 @@ extern "C" * \param tri stores the tridiagonal matrix associated with the eigenvalues of the conjugate gradient polynomial */ extern int - itrscg_(integer * n, - integer * nnb, - integer * ia, - integer * ja, + itrscg_(integer * n, + integer * nnb, + integer * ia, + integer * ja, doublereal * a, doublereal * ub, doublereal * ub1, @@ -425,10 +425,10 @@ extern "C" * \param db current residual */ extern int - itrssi_(integer * n, - integer * nnb, - integer * ia, - integer * ja, + itrssi_(integer * n, + integer * nnb, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * ub, @@ -558,14 +558,14 @@ extern "C" * \note in this implementation...all printing is disabled */ extern int - echall_(integer * nn, - integer * ia, - integer * ja, + echall_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, - integer * iparm, + integer * iparm, doublereal * rparm, - integer * icall); + integer * icall); /** * This routine initializes the itpack common blocks from IPARM and RPARM @@ -686,7 +686,7 @@ extern "C" doublereal * c4, doublereal * gamold, doublereal * rhotmp, - integer * ibmth); + integer * ibmth); /* * FIXME: add doc @@ -710,31 +710,31 @@ extern "C" * FIXME: add doc */ extern int - permat_(integer * nn, - integer * ia, - integer * ja, + permat_(integer * nn, + integer * ia, + integer * ja, doublereal * a, - integer * p, - integer * newia, - integer * isym, - integer * level, - integer * nout, - integer * ierr); + integer * p, + integer * newia, + integer * isym, + integer * level, + integer * nout, + integer * ierr); /* * FIXME: add doc */ extern int - perror_(integer * nn, - integer * ia, - integer * ja, + perror_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, doublereal * w, doublereal * digtt1, doublereal * digtt2, - integer * idgtts); + integer * idgtts); /* * FIXME: add doc @@ -796,9 +796,9 @@ extern "C" * FIXME: add doc */ extern int - pssor1_(integer * nn, - integer * ia, - integer * ja, + pssor1_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * u, doublereal * rhs, @@ -827,32 +827,32 @@ extern "C" * Convert compressed row matrix back to linked-list representation used for adding entries */ extern int - sbagn_(integer * n, - integer * nz, - integer * ia, - integer * ja, + sbagn_(integer * n, + integer * nz, + integer * ia, + integer * ja, doublereal * a, - integer * iwork, - integer * levell, - integer * noutt, - integer * ierr); + integer * iwork, + integer * levell, + integer * noutt, + integer * ierr); /* * FIXME: add doc */ extern int - sbelm_(integer * nn, - integer * ia, - integer * ja, + sbelm_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, - integer * iw, + integer * iw, doublereal * rw, doublereal * tol, - integer * isym, - integer * level, - integer * nout, - integer * ier); + integer * isym, + integer * level, + integer * nout, + integer * ier); /** * Finalize matrix storage format @@ -895,40 +895,40 @@ extern "C" * \param ierr holds error flag on return */ extern int - sbsij_(integer * nn, - integer * nz, - integer * ia, - integer * ja, + sbsij_(integer * nn, + integer * nz, + integer * ia, + integer * ja, doublereal * a, - integer * iwork, - integer * ii, - integer * jj, + integer * iwork, + integer * ii, + integer * jj, doublereal * vall, - integer * mode, - integer * levell, - integer * noutt, - integer * ierr); + integer * mode, + integer * levell, + integer * noutt, + integer * ierr); /* * FIXME: add doc */ extern int - scal_(integer * nn, - integer * ia, - integer * ja, + scal_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, doublereal * d__, - integer * level, - integer * nout, - integer * ier); + integer * level, + integer * nout, + integer * ier); /* * FIXME: add doc */ extern int - sum3_(integer * n, + sum3_(integer * n, doublereal * c1, doublereal * x1, doublereal * c2, @@ -997,14 +997,14 @@ extern "C" * FIXME: add doc */ extern int - zbrent_(integer * n, + zbrent_(integer * n, doublereal * tri, doublereal * eps, - integer * nsig, + integer * nsig, doublereal * aa, doublereal * bb, - integer * maxfnn, - integer * ier); + integer * maxfnn, + integer * ier); } #include "v3p_f2c_unmangle.h" diff --git a/Modules/Numerics/FEM/src/dsrc2c.c b/Modules/Numerics/FEM/src/dsrc2c.c index a4cc6b0e3cb..dce16248d12 100644 --- a/Modules/Numerics/FEM/src/dsrc2c.c +++ b/Modules/Numerics/FEM/src/dsrc2c.c @@ -80,31 +80,31 @@ tstchg_(integer *); int echout_(integer * iparm, doublereal * rparm, integer * imthd); int -echall_(integer * nn, - integer * ia, - integer * ja, +echall_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, - integer * iparm, + integer * iparm, doublereal * rparm, - integer * icall); + integer * icall); int ivfill_(integer * n, integer * iv, integer * ival); int vfill_(integer * n, doublereal * v, doublereal * val); int -sbelm_(integer * n, - integer * ia, - integer * ja, +sbelm_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, - integer * iw, + integer * iw, doublereal * rw, doublereal * tol, - integer * isym, - integer * level, - integer * nout, - integer * ier); + integer * isym, + integer * level, + integer * nout, + integer * ier); int prbndx_(integer * n, integer * nblack, @@ -116,29 +116,29 @@ prbndx_(integer * n, integer * nout, integer * ier); int -permat_(integer * n, - integer * ia, - integer * ja, +permat_(integer * n, + integer * ia, + integer * ja, doublereal * a, - integer * p, - integer * newia, - integer * isym, - integer * level, - integer * nout, - integer * ierr); + integer * p, + integer * newia, + integer * isym, + integer * level, + integer * nout, + integer * ierr); int pervec_(integer * n, doublereal * v, integer * p); int -scal_(integer * n, - integer * ia, - integer * ja, +scal_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, doublereal * d, - integer * level, - integer * nout, - integer * ier); + integer * level, + integer * nout, + integer * ier); int itpackdcopy_(integer * n, doublereal * dx, integer * incx, doublereal * dy, integer * incy); int @@ -147,26 +147,26 @@ int vevmw_(integer * n, doublereal * v, doublereal * w); int -perror_(integer * n, - integer * ia, - integer * ja, +perror_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, doublereal * w, doublereal * digtt1, doublereal * digtt2, - integer * idgtts); + integer * idgtts); int -itjsi_(integer * n, - integer * ia, - integer * ja, +itjsi_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, doublereal * u1, doublereal * d, - integer * icnt); + integer * icnt); int itsor_(integer * n, integer * ia, integer * ja, doublereal * a, doublereal * rhs, doublereal * u, doublereal * wk); int @@ -174,9 +174,9 @@ omeg_(doublereal * dnrm, integer * iflag); int pfsor_(integer * n, integer * ia, integer * ja, doublereal * a, doublereal * u, doublereal * rhs); int -itsrcg_(integer * n, - integer * ia, - integer * ja, +itsrcg_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, @@ -188,9 +188,9 @@ itsrcg_(integer * n, doublereal * wk, doublereal * tri); int -itsrsi_(integer * n, - integer * ia, - integer * ja, +itsrsi_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, @@ -211,9 +211,9 @@ parcon_(doublereal * dtnrm, doublereal * c4, doublereal * gamold, doublereal * rhotmp, - integer * ibmth); + integer * ibmth); int -sum3_(integer * n, +sum3_(integer * n, doublereal * c1, doublereal * x1, doublereal * c2, @@ -235,9 +235,9 @@ pbsor_(integer * n, integer * ia, integer * ja, doublereal * a, doublereal * u, int wevmw_(integer * n, doublereal * v, doublereal * w); int -pssor1_(integer * n, - integer * ia, - integer * ja, +pssor1_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * u, doublereal * rhs, @@ -252,10 +252,10 @@ unscal_(integer * n, integer * ia, integer * ja, doublereal * a, doublereal * rh int prsred_(integer * nb, integer * nr, integer * ia, integer * ja, doublereal * a, doublereal * ub, doublereal * vr); int -itrscg_(integer * n, - integer * nb, - integer * ia, - integer * ja, +itrscg_(integer * n, + integer * nb, + integer * ia, + integer * ja, doublereal * a, doublereal * ub, doublereal * ub1, @@ -264,10 +264,10 @@ itrscg_(integer * n, doublereal * wb, doublereal * tri); int -itrssi_(integer * n, - integer * nb, - integer * ia, - integer * ja, +itrssi_(integer * n, + integer * nb, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * ub, @@ -276,9 +276,9 @@ itrssi_(integer * n, int parsi_(doublereal * c1, doublereal * c2, doublereal * c3, integer * ibmth); int -itjcg_(integer * n, - integer * ia, - integer * ja, +itjcg_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * u, doublereal * u1, @@ -342,43 +342,43 @@ static struct /* Table of constant values */ -static integer c__1 = 1; -static integer c__0 = 0; +static integer c__1 = 1; +static integer c__0 = 0; static doublereal c_b21 = 0.; -static integer c__2 = 2; -static integer c__3 = 3; -static integer c__4 = 4; +static integer c__2 = 2; +static integer c__3 = 3; +static integer c__4 = 4; static doublereal c_b286 = 1.; -static integer c__5 = 5; -static integer c__6 = 6; -static integer c__7 = 7; +static integer c__5 = 5; +static integer c__6 = 6; +static integer c__7 = 7; /* Subroutine */ int -jcg_(integer * n, - integer * ia, - integer * ja, +jcg_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, - integer * iwksp, - integer * nw, + integer * iwksp, + integer * nw, doublereal * wksp, - integer * iparm, + integer * iparm, doublereal * rparm, - integer * ierr) + integer * ierr) { /* Local variables */ - static integer n3, nb, ib1, ib2, ib3, ib4, ib5, ier; + static integer n3, nb, ib1, ib2, ib3, ib4, ib5, ier; static doublereal tol; static doublereal temp; - static integer loop; + static integer loop; static doublereal time1, time2; - static real timi1, timj1, timi2, timj2; - static integer idgts; + static real timi1, timj1, timi2, timj2; + static integer idgts; static doublereal digit1, digit2; - static integer itmax1; - static integer ierper; + static integer itmax1; + static integer ierper; /* ITPACK 2C MAIN SUBROUTINE JCG (JACOBI CONJUGATE GRADIENT) */ /* EACH OF THE MAIN SUBROUTINES: */ @@ -733,31 +733,31 @@ jcg_(integer * n, /* Subroutine */ int -jsi_(integer * n, - integer * ia, - integer * ja, +jsi_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, - integer * iwksp, - integer * nw, + integer * iwksp, + integer * nw, doublereal * wksp, - integer * iparm, + integer * iparm, doublereal * rparm, - integer * ierr) + integer * ierr) { /* Local variables */ - static integer n3, nb, ib1, ib2, ib3, ier; + static integer n3, nb, ib1, ib2, ib3, ier; static doublereal tol; - static integer icnt; + static integer icnt; static doublereal temp; - static integer loop; + static integer loop; static doublereal time1, time2; - static real timi1, timj1, timi2, timj2; - static integer idgts; + static real timi1, timj1, timi2, timj2; + static integer idgts; static doublereal digit1, digit2; - static integer itmax1; - static integer ierper; + static integer itmax1; + static integer ierper; /* ITPACK 2C MAIN SUBROUTINE JSI (JACOBI SEMI-ITERATIVE) */ /* EACH OF THE MAIN SUBROUTINES: */ @@ -1089,30 +1089,30 @@ jsi_(integer * n, /* Subroutine */ int -sor_(integer * n, - integer * ia, - integer * ja, +sor_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, - integer * iwksp, - integer * nw, + integer * iwksp, + integer * nw, doublereal * wksp, - integer * iparm, + integer * iparm, doublereal * rparm, - integer * ierr) + integer * ierr) { /* Local variables */ - static integer n3, nb, ib1, ib2, ib3, ier; + static integer n3, nb, ib1, ib2, ib3, ier; static doublereal tol; static doublereal temp; - static integer loop; + static integer loop; static doublereal time1, time2; - static real timi1, timj1, timi2, timj2; - static integer idgts; + static real timi1, timj1, timi2, timj2; + static integer idgts; static doublereal digit1, digit2; - static integer itmax1; - static integer ierper; + static integer itmax1; + static integer ierper; /* ITPACK 2C MAIN SUBROUTINE SOR (SUCCESSIVE OVERRELATION) */ /* EACH OF THE MAIN SUBROUTINES: */ @@ -1423,31 +1423,31 @@ sor_(integer * n, /* Subroutine */ int -ssorcg_(integer * n, - integer * ia, - integer * ja, +ssorcg_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, - integer * iwksp, - integer * nw, + integer * iwksp, + integer * nw, doublereal * wksp, - integer * iparm, + integer * iparm, doublereal * rparm, - integer * ierr) + integer * ierr) { /* Local variables */ - static integer n3, nb, ib1, ib2, ib3, ib4, ib5, ib6, ib7, ier; + static integer n3, nb, ib1, ib2, ib3, ib4, ib5, ib6, ib7, ier; static doublereal tol; static doublereal temp; - static integer loop; + static integer loop; static doublereal time1, time2; - static real timi1, timj1, timi2, timj2; - static integer idgts; + static real timi1, timj1, timi2, timj2; + static integer idgts; static doublereal digit1, digit2; - static integer itmax1; + static integer itmax1; static doublereal betnew; - static integer ierper; + static integer ierper; /* ITPACK 2C MAIN SUBROUTINE SSORCG (SYMMETRIC SUCCESSIVE OVER- */ /* RELAXATION CONJUGATE GRADIENT) */ @@ -1822,31 +1822,31 @@ ssorcg_(integer * n, /* Subroutine */ int -ssorsi_(integer * n, - integer * ia, - integer * ja, +ssorsi_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, - integer * iwksp, - integer * nw, + integer * iwksp, + integer * nw, doublereal * wksp, - integer * iparm, + integer * iparm, doublereal * rparm, - integer * ierr) + integer * ierr) { /* Local variables */ - static integer n3, nb, ib1, ib2, ib3, ib4, ib5, ier; + static integer n3, nb, ib1, ib2, ib3, ib4, ib5, ier; static doublereal tol; static doublereal temp; - static integer loop; + static integer loop; static doublereal time1, time2; - static real timi1, timj1, timi2, timj2; - static integer idgts; + static real timi1, timj1, timi2, timj2; + static integer idgts; static doublereal digit1, digit2; - static integer itmax1; + static integer itmax1; static doublereal betnew; - static integer ierper; + static integer ierper; /* ITPACK 2C MAIN SUBROUTINE SSORSI (SYMMETRIC SUCCESSIVE RELAX- */ /* ATION SEMI-ITERATION) */ @@ -2199,30 +2199,30 @@ ssorsi_(integer * n, /* Subroutine */ int -rscg_(integer * n, - integer * ia, - integer * ja, +rscg_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, - integer * iwksp, - integer * nw, + integer * iwksp, + integer * nw, doublereal * wksp, - integer * iparm, + integer * iparm, doublereal * rparm, - integer * ierr) + integer * ierr) { /* Local variables */ - static integer n3, nb, nr, ib1, ib2, ib3, ib4, ib5, jb3, ier; + static integer n3, nb, nr, ib1, ib2, ib3, ib4, ib5, jb3, ier; static doublereal tol; static doublereal temp; - static integer loop; + static integer loop; static doublereal time1, time2; - static real timi1, timj1, timi2, timj2; - static integer idgts; + static real timi1, timj1, timi2, timj2; + static integer idgts; static doublereal digit1, digit2; - static integer itmax1; - static integer ierper; + static integer itmax1; + static integer ierper; /* ITPACK 2C MAIN SUBROUTINE RSCG (REDUCED SYSTEM CONJUGATE */ /* GRADIENT) */ @@ -2600,30 +2600,30 @@ rscg_(integer * n, /* Subroutine */ int -rssi_(integer * n, - integer * ia, - integer * ja, +rssi_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, - integer * iwksp, - integer * nw, + integer * iwksp, + integer * nw, doublereal * wksp, - integer * iparm, + integer * iparm, doublereal * rparm, - integer * ierr) + integer * ierr) { /* Local variables */ - static integer n3, nb, nr, ib1, ib2, jb3, ier; + static integer n3, nb, nr, ib1, ib2, jb3, ier; static doublereal tol; static doublereal temp; - static integer loop; + static integer loop; static doublereal time1, time2; - static real timi1, timj1, timi2, timj2; - static integer idgts; + static real timi1, timj1, timi2, timj2; + static integer idgts; static doublereal digit1, digit2; - static integer itmax1; - static integer ierper; + static integer itmax1; + static integer ierper; /* ITPACK 2C MAIN SUBROUTINE RSSI (REDUCED SYSTEM SEMI-ITERATIVE) */ /* EACH OF THE MAIN SUBROUTINES: */ @@ -2979,9 +2979,9 @@ rssi_(integer * n, /* Subroutine */ int -itjcg_(integer * n, - integer * ia, - integer * ja, +itjcg_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * u, doublereal * u1, @@ -2991,7 +2991,7 @@ itjcg_(integer * n, doublereal * tri) { static doublereal c1, c2, c3, c4; - static logical q1; + static logical q1; static doublereal con; static doublereal dnrm; static doublereal dtnrm; @@ -3066,18 +3066,18 @@ itjcg_(integer * n, /* Subroutine */ int -itjsi_(integer * n, - integer * ia, - integer * ja, +itjsi_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, doublereal * u1, doublereal * d, - integer * icnt) + integer * icnt) { static doublereal c1, c2, c3; - static logical q1; + static logical q1; static doublereal con; static doublereal dnrm; static doublereal dtnrm; @@ -3180,15 +3180,15 @@ itsor_(integer * n, integer * ia, integer * ja, doublereal * a, doublereal * rhs /* Local variables */ static doublereal h; - static logical q1; - static integer ip; - static integer iss; + static logical q1; + static integer ip; + static integer iss; static doublereal dnrm; - static integer iphat; + static integer iphat; static doublereal spcrm1; - static logical change; + static logical change; static doublereal omegap; - static integer ipstar; + static integer ipstar; /* THIS SUBROUTINE, ITSOR, PERFORMS ONE ITERATION OF THE */ /* SUCCESSIVE OVERRELAXATION ALGORITHM. IT IS CALLED BY SOR. */ @@ -3328,9 +3328,9 @@ itsor_(integer * n, integer * ia, integer * ja, doublereal * a, doublereal * rhs /* Subroutine */ int -itsrcg_(integer * n, - integer * ia, - integer * ja, +itsrcg_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, @@ -3346,7 +3346,7 @@ itsrcg_(integer * n, doublereal d__1; /* Local variables */ - static logical q1; + static logical q1; static doublereal t1, t2, t3, t4, con; static doublereal dnrm; static doublereal gamold; @@ -3488,9 +3488,9 @@ itsrcg_(integer * n, /* Subroutine */ int -itsrsi_(integer * n, - integer * ia, - integer * ja, +itsrsi_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, @@ -3502,7 +3502,7 @@ itsrsi_(integer * n, { /* Local variables */ static doublereal c1, c2, c3; - static logical q1; + static logical q1; static doublereal con; static doublereal dnrm; static doublereal betnew; @@ -3612,10 +3612,10 @@ itsrsi_(integer * n, /* Subroutine */ int -itrscg_(integer * n, - integer * nb, - integer * ia, - integer * ja, +itrscg_(integer * n, + integer * nb, + integer * ia, + integer * ja, doublereal * a, doublereal * ub, doublereal * ub1, @@ -3625,8 +3625,8 @@ itrscg_(integer * n, doublereal * tri) { static doublereal c1, c2, c3, c4; - static logical q1; - static integer nr; + static logical q1; + static integer nr; static doublereal con; static doublereal dnrm; static doublereal gamold; @@ -3703,10 +3703,10 @@ itrscg_(integer * n, /* Subroutine */ int -itrssi_(integer * n, - integer * nb, - integer * ia, - integer * ja, +itrssi_(integer * n, + integer * nb, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * ub, @@ -3714,8 +3714,8 @@ itrssi_(integer * n, doublereal * db) { static doublereal c1, c2, c3; - static logical q1; - static integer nr; + static logical q1; + static integer nr; static doublereal dnrm; static doublereal cnst; @@ -3870,9 +3870,9 @@ int chgcon_(doublereal * tri, doublereal * gamold, doublereal * rhoold, integer * ibmth) { /* Local variables */ - static integer ip, ib3; + static integer ip, ib3; static doublereal end; - static integer ier; + static integer ier; static doublereal cmold, start; /* COMPUTES THE NEW ESTIMATE FOR THE LARGEST EIGENVALUE FOR */ @@ -4158,12 +4158,12 @@ logical chgsme_(doublereal * oldnrm, integer * icnt) { /* System generated locals */ - integer i__1; + integer i__1; doublereal d__1, d__2; /* Local variables */ static doublereal q, z; - static integer ip; + static integer ip; static doublereal rn, wp, sm1, sm2; /* ... THIS FUNCTION TESTS FOR JACOBI SI WHETHER SME SHOULD BE CHANGED */ @@ -4437,9 +4437,9 @@ doublereal determ_(integer * n, doublereal * tri, doublereal * xlmda) { /* Local variables */ - static integer l; + static integer l; static doublereal d1, d2, d3; - static integer icnt; + static integer icnt; /* THIS SUBROUTINE COMPUTES THE DETERMINANT OF A SYMMETRIC */ /* TRIDIAGONAL MATRIX GIVEN BY TRI. DET(TRI - XLMDA*I) = 0 */ @@ -4540,14 +4540,14 @@ dfault_(integer * iparm, doublereal * rparm) /* Subroutine */ int -echall_(integer * nn, - integer * ia, - integer * ja, +echall_(integer * nn, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, - integer * iparm, + integer * iparm, doublereal * rparm, - integer * icall) + integer * icall) { (void)nn; (void)ia; @@ -4794,7 +4794,7 @@ ipstr_(doublereal * omega) integer i__1; /* Local variables */ - static integer ip; + static integer ip; static doublereal wm1; /* FINDS THE SMALLEST INTEGER, IPSTR, GREATER THAN 5 SUCH THAT */ @@ -5094,9 +5094,9 @@ parcon_(doublereal * dtnrm, doublereal * c4, doublereal * gamold, doublereal * rhotmp, - integer * ibmth) + integer * ibmth) { - static integer ip; + static integer ip; static doublereal rhoold; /* COMPUTES ACCELERATION PARAMETERS FOR CONJUGATE GRADIENT */ @@ -5252,9 +5252,9 @@ pbeta_(integer * n, integer * ia, integer * ja, doublereal * a, doublereal * v, doublereal ret_val; /* Local variables */ - static integer i, k, ii, jj, jai; + static integer i, k, ii, jj, jai; static doublereal sum; - static integer jajj, ibgn, iend, itmp; + static integer jajj, ibgn, iend, itmp; static doublereal temp1, temp2; /* ... COMPUTES THE NUMERATOR FOR THE COMPUTATION OF BETAB IN */ @@ -5344,9 +5344,9 @@ int pbsor_(integer * n, integer * ia, integer * ja, doublereal * a, doublereal * u, doublereal * rhs) { /* Local variables */ - static integer i, ii, jj; + static integer i, ii, jj; static doublereal ui, sum, omm1; - static integer jajj, ibgn, iend; + static integer jajj, ibgn, iend; /* ... THIS SUBROUTINE COMPUTES A BACKWARD SOR SWEEP. */ @@ -5422,9 +5422,9 @@ qsort_(integer * n, integer * key, doublereal * data, integer * error) /* Local variables */ static doublereal d; - static integer i, j, k, v, jm1, ip1, top; - static logical done; - static integer left, llen, rlen, lfrh2, stack[30], right; + static integer i, j, k, v, jm1, ip1, top; + static logical done; + static integer left, llen, rlen, lfrh2, stack[30], right; /* ================================================================== */ @@ -5707,23 +5707,23 @@ qsort_(integer * n, integer * key, doublereal * data, integer * error) /* Subroutine */ int -permat_(integer * n, - integer * ia, - integer * ja, +permat_(integer * n, + integer * ia, + integer * ja, doublereal * a, - integer * p, - integer * newia, - integer * isym, - integer * level, - integer * nout, - integer * ierr) + integer * p, + integer * newia, + integer * isym, + integer * level, + integer * nout, + integer * ierr) { /* Local variables */ - static integer i, j, k, ip, jp, jaj, ier, ipp, ibgn, iend; + static integer i, j, k, ip, jp, jaj, ier, ipp, ibgn, iend; static doublereal save; - static integer nels; + static integer nels; static doublereal temp; - static integer next; + static integer next; (void)level; (void)nout; @@ -5922,23 +5922,23 @@ permat_(integer * n, /* Subroutine */ int -perror_(integer * n, - integer * ia, - integer * ja, +perror_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, doublereal * w, doublereal * digtt1, doublereal * digtt2, - integer * idgtts) + integer * idgtts) { /* System generated locals */ doublereal d__1; /* Local variables */ static doublereal bnrm, temp, rnrm; - static integer idgts; + static integer idgts; static doublereal digit1, digit2; /* PERROR COMPUTES THE RESIDUAL, R = RHS - A*U. THE USER */ @@ -6017,9 +6017,9 @@ int pervec_(integer * n, doublereal * v, integer * p) { /* Local variables */ - static integer ii, now; + static integer ii, now; static doublereal save, temp; - static integer next; + static integer next; /* THIS SUBROUTINE PERMUTES A D.P. VECTOR AS DICTATED BY THE */ /* PERMUTATION VECTOR, P. IF P(I) = J, THEN V(J) GETS V(I). */ @@ -6062,9 +6062,9 @@ int pfsor_(integer * n, integer * ia, integer * ja, doublereal * a, doublereal * u, doublereal * rhs) { /* Local variables */ - static integer ii, jj; + static integer ii, jj; static doublereal ui, sum, omm1; - static integer jajj, ibgn, iend; + static integer jajj, ibgn, iend; /* THIS SUBROUTINE COMPUTES A FORWARD SOR SWEEP. */ @@ -6130,9 +6130,9 @@ pfsor1_(integer * n, integer * ia, integer * ja, doublereal * a, doublereal * u, doublereal d__1; /* Local variables */ - static integer ii, jj; + static integer ii, jj; static doublereal ui, sum, omm1; - static integer jajj, ibgn, iend; + static integer jajj, ibgn, iend; static doublereal sumd; /* THIS SUBROUTINE COMPUTES A FORWARD SOR SWEEP ON U AND */ @@ -6205,9 +6205,9 @@ int pjac_(integer * n, integer * ia, integer * ja, doublereal * a, doublereal * u, doublereal * rhs) { /* Local variables */ - static integer ii, jj; + static integer ii, jj; static doublereal uii; - static integer jajj, ibgn, iend; + static integer jajj, ibgn, iend; static doublereal rhsii; /* ... THIS SUBROUTINE PERFORMS ONE JACOBI ITERATION. */ @@ -6269,9 +6269,9 @@ int pmult_(integer * n, integer * ia, integer * ja, doublereal * a, doublereal * u, doublereal * w) { /* Local variables */ - static integer ii, jj; + static integer ii, jj; static doublereal uii, wii, sum; - static integer jajj, ibgn, iend; + static integer jajj, ibgn, iend; /* ... THIS SUBROUTINE PERFORMS ONE MATRIX-VECTOR MULTIPLICATION. */ @@ -6597,9 +6597,9 @@ int prsblk_(integer * nb, integer * nr, integer * ia, integer * ja, doublereal * a, doublereal * ur, doublereal * vb) { /* Local variables */ - static integer i, j, jaj, inr; + static integer i, j, jaj, inr; static doublereal uri, sum; - static integer ibgn, iend; + static integer ibgn, iend; /* ... COMPUTE A BLACK-RS SWEEP ON A RED VECTOR INTO A BLACK VECTOR */ @@ -6659,9 +6659,9 @@ int prsred_(integer * nb, integer * nr, integer * ia, integer * ja, doublereal * a, doublereal * ub, doublereal * vr) { /* Local variables */ - static integer ii, jj; + static integer ii, jj; static doublereal sum; - static integer jajj, ibgn, iend; + static integer jajj, ibgn, iend; /* ... COMPUTES A RED-RS SWEEP ON A BLACK VECTOR INTO A RED VECTOR. */ /* */ @@ -6695,9 +6695,9 @@ prsred_(integer * nb, integer * nr, integer * ia, integer * ja, doublereal * a, /* Subroutine */ int -pssor1_(integer * n, - integer * ia, - integer * ja, +pssor1_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * u, doublereal * rhs, @@ -6705,9 +6705,9 @@ pssor1_(integer * n, doublereal * br) { /* Local variables */ - static integer i, ii, jj; + static integer i, ii, jj; static doublereal uii, sum, omm1; - static integer jajj, ibgn, iend; + static integer jajj, ibgn, iend; /* ... COMPUTES COMPLETE SSOR SWEEP ON U. U IS OVERWRITTEN */ /* ... WITH THE NEW ITERANT, FR AND BR WILL CONTAIN */ @@ -6878,9 +6878,9 @@ doublereal pvtbv_(integer * n, integer * ia, integer * ja, doublereal * a, doublereal * v) { /* Local variables */ - static integer ii, jj; + static integer ii, jj; static doublereal sum; - static integer jajj, ibgn, iend; + static integer jajj, ibgn, iend; static doublereal sumr; /* THIS FUNCTION COMPUTES (V**T)*A*V. */ @@ -6917,15 +6917,15 @@ pvtbv_(integer * n, integer * ia, integer * ja, doublereal * a, doublereal * v) /* Subroutine */ int -sbagn_(integer * n, - integer * nz, - integer * ia, - integer * ja, +sbagn_(integer * n, + integer * nz, + integer * ia, + integer * ja, doublereal * a, - integer * iwork, - integer * level, - integer * nout, - integer * ierr) + integer * iwork, + integer * level, + integer * nout, + integer * ierr) { /* Local variables */ static integer i, j, ier, ntn, nto, now, nadd; @@ -7018,22 +7018,22 @@ sbagn_(integer * n, /* Subroutine */ int -sbelm_(integer * n, - integer * ia, - integer * ja, +sbelm_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, - integer * iw, + integer * iw, doublereal * rw, doublereal * tol, - integer * isym, - integer * level, - integer * nout, - integer * ier) + integer * isym, + integer * level, + integer * nout, + integer * ier) { /* Local variables */ static doublereal di; - static integer ii, jj, kk, ibgn, iend, jjdi, icnt; + static integer ii, jj, kk, ibgn, iend, jjdi, icnt; (void)level; (void)nout; @@ -7231,9 +7231,9 @@ int sbend_(integer * n, integer * nz, integer * ia, integer * ja, doublereal * a, integer * iwork) { /* Local variables */ - static integer i, l, jaj; + static integer i, l, jaj; static doublereal val; - static integer top, ideg, link, next, hlink, mhlink, ohlink, nulink, maxtop; + static integer top, ideg, link, next, hlink, mhlink, ohlink, nulink, maxtop; /* *********************************************************************** */ @@ -7490,26 +7490,26 @@ sbini_(integer * n, integer * nz, integer * ia, integer * ja, doublereal * a, in /* Subroutine */ int -sbsij_(integer * n, - integer * nz, - integer * ia, - integer * ja, +sbsij_(integer * n, + integer * nz, + integer * ia, + integer * ja, doublereal * a, - integer * iwork, - integer * ii, - integer * jj, + integer * iwork, + integer * ii, + integer * jj, doublereal * vall, - integer * mode, - integer * level, - integer * nout, - integer * ierr) + integer * mode, + integer * level, + integer * nout, + integer * ierr) { /* Local variables */ - static integer i, j, ier; + static integer i, j, ier; static doublereal val; - static integer link; + static integer link; static doublereal temp; - static integer next; + static integer next; (void)nz; (void)level; @@ -7672,21 +7672,21 @@ sbsij_(integer * n, /* Subroutine */ int -scal_(integer * n, - integer * ia, - integer * ja, +scal_(integer * n, + integer * ia, + integer * ja, doublereal * a, doublereal * rhs, doublereal * u, doublereal * d, - integer * level, - integer * nout, - integer * ier) + integer * level, + integer * nout, + integer * ier) { /* Local variables */ - static integer i, j; + static integer i, j; static doublereal di; - static integer ii, jj, im1, jadd, jajj, ibgn, iend, jjpi; + static integer ii, jj, im1, jadd, jajj, ibgn, iend, jjpi; (void)level; (void)nout; @@ -7899,7 +7899,7 @@ unscal_(integer * n, integer * ia, integer * ja, doublereal * a, doublereal * rh { /* Local variables */ static doublereal di; - static integer ii, jj, is, jajj, ibgn, iend, jjpi, inew; + static integer ii, jj, is, jajj, ibgn, iend, jjpi, inew; /* ... THIS SUBROUTINE REVERSES THE PROCESS OF SCAL. */ diff --git a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearLine.cxx b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearLine.cxx index 388781d6a90..4a4439194ee 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearLine.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearLine.cxx @@ -26,7 +26,7 @@ namespace fem void Element2DC0LinearLine::GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, - Float & w, + Float & w, unsigned int order) const { @@ -125,13 +125,13 @@ itk::fem::Element::Float Element2DC0LinearLine::DistanceToLine(const VectorType & x, const VectorType & p1, const VectorType & p2, - Float & t, - VectorType & closestPoint) const + Float & t, + VectorType & closestPoint) const { - Float denom, num; + Float denom, num; VectorType p21(3); VectorType closest; - Float tolerance; + Float tolerance; // // Determine appropriate vectors diff --git a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearLineStress.cxx b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearLineStress.cxx index bb6e8621820..715026b99b5 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearLineStress.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearLineStress.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer Element2DC0LinearLineStress::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->SetNode(0, this->GetNode(0)); copyPtr->SetNode(1, this->GetNode(1)); diff --git a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearQuadrilateral.cxx b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearQuadrilateral.cxx index 7bc26e31384..55aeb021e26 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearQuadrilateral.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearQuadrilateral.cxx @@ -25,7 +25,7 @@ namespace fem void Element2DC0LinearQuadrilateral::GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, - Float & w, + Float & w, unsigned int order) const { // default integration order diff --git a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearQuadrilateralMembrane.cxx b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearQuadrilateralMembrane.cxx index 866f34db0af..da8ad98e693 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearQuadrilateralMembrane.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearQuadrilateralMembrane.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer Element2DC0LinearQuadrilateralMembrane::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->SetNode(0, this->GetNode(0)); copyPtr->SetNode(1, this->GetNode(1)); @@ -45,10 +45,10 @@ Element2DC0LinearQuadrilateralMembrane::Element2DC0LinearQuadrilateralMembrane() : Superclass() {} -Element2DC0LinearQuadrilateralMembrane::Element2DC0LinearQuadrilateralMembrane(NodeIDType n1_, - NodeIDType n2_, - NodeIDType n3_, - NodeIDType n4_, +Element2DC0LinearQuadrilateralMembrane::Element2DC0LinearQuadrilateralMembrane(NodeIDType n1_, + NodeIDType n2_, + NodeIDType n3_, + NodeIDType n4_, Material::ConstPointer m_) : Superclass() { diff --git a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearQuadrilateralStrain.cxx b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearQuadrilateralStrain.cxx index be3a2193c19..28d15d9d0db 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearQuadrilateralStrain.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearQuadrilateralStrain.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer Element2DC0LinearQuadrilateralStrain::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->SetNode(0, this->GetNode(0)); copyPtr->SetNode(1, this->GetNode(1)); @@ -47,10 +47,10 @@ Element2DC0LinearQuadrilateralStrain::Element2DC0LinearQuadrilateralStrain() this->PopulateEdgeIds(); } -Element2DC0LinearQuadrilateralStrain::Element2DC0LinearQuadrilateralStrain(NodeIDType n1_, - NodeIDType n2_, - NodeIDType n3_, - NodeIDType n4_, +Element2DC0LinearQuadrilateralStrain::Element2DC0LinearQuadrilateralStrain(NodeIDType n1_, + NodeIDType n2_, + NodeIDType n3_, + NodeIDType n4_, Material::ConstPointer m_) : Superclass() { diff --git a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearQuadrilateralStress.cxx b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearQuadrilateralStress.cxx index ba42e4e11f7..de13fd06671 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearQuadrilateralStress.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearQuadrilateralStress.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer Element2DC0LinearQuadrilateralStress::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->SetNode(0, this->GetNode(0)); copyPtr->SetNode(1, this->GetNode(1)); @@ -47,10 +47,10 @@ Element2DC0LinearQuadrilateralStress::Element2DC0LinearQuadrilateralStress() this->PopulateEdgeIds(); } -Element2DC0LinearQuadrilateralStress::Element2DC0LinearQuadrilateralStress(NodeIDType n1_, - NodeIDType n2_, - NodeIDType n3_, - NodeIDType n4_, +Element2DC0LinearQuadrilateralStress::Element2DC0LinearQuadrilateralStress(NodeIDType n1_, + NodeIDType n2_, + NodeIDType n3_, + NodeIDType n4_, Material::ConstPointer m_) : Superclass() { diff --git a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangular.cxx b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangular.cxx index 53008f9adfa..be28b79868f 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangular.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangular.cxx @@ -63,7 +63,7 @@ const unsigned int Element2DC0LinearTriangular::Nip[6] = { 0, 1, 3, 3, 6, 7 }; void Element2DC0LinearTriangular::GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, - Float & w, + Float & w, unsigned int order) const { // default integration order diff --git a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangularMembrane.cxx b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangularMembrane.cxx index 28047a1a29c..8775f7e85d5 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangularMembrane.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangularMembrane.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer Element2DC0LinearTriangularMembrane::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->SetNode(0, this->GetNode(0)); copyPtr->SetNode(1, this->GetNode(1)); @@ -44,9 +44,9 @@ Element2DC0LinearTriangularMembrane::Element2DC0LinearTriangularMembrane() : Superclass() {} -Element2DC0LinearTriangularMembrane::Element2DC0LinearTriangularMembrane(NodeIDType n1_, - NodeIDType n2_, - NodeIDType n3_, +Element2DC0LinearTriangularMembrane::Element2DC0LinearTriangularMembrane(NodeIDType n1_, + NodeIDType n2_, + NodeIDType n3_, Material::ConstPointer m_) : Superclass() { diff --git a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangularStrain.cxx b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangularStrain.cxx index cbbc670ef08..f7cad324a9c 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangularStrain.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangularStrain.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer Element2DC0LinearTriangularStrain::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->SetNode(0, this->GetNode(0)); copyPtr->SetNode(1, this->GetNode(1)); @@ -44,9 +44,9 @@ Element2DC0LinearTriangularStrain::Element2DC0LinearTriangularStrain() : Superclass() {} -Element2DC0LinearTriangularStrain::Element2DC0LinearTriangularStrain(NodeIDType n1_, - NodeIDType n2_, - NodeIDType n3_, +Element2DC0LinearTriangularStrain::Element2DC0LinearTriangularStrain(NodeIDType n1_, + NodeIDType n2_, + NodeIDType n3_, Material::ConstPointer m_) : Superclass() { diff --git a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangularStress.cxx b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangularStress.cxx index 4ac244c2f73..be213d4779a 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangularStress.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangularStress.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer Element2DC0LinearTriangularStress::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->SetNode(0, this->GetNode(0)); copyPtr->SetNode(1, this->GetNode(1)); @@ -44,9 +44,9 @@ Element2DC0LinearTriangularStress::Element2DC0LinearTriangularStress() : Superclass() {} -Element2DC0LinearTriangularStress::Element2DC0LinearTriangularStress(NodeIDType n1_, - NodeIDType n2_, - NodeIDType n3_, +Element2DC0LinearTriangularStress::Element2DC0LinearTriangularStress(NodeIDType n1_, + NodeIDType n2_, + NodeIDType n3_, Material::ConstPointer m_) : Superclass() { diff --git a/Modules/Numerics/FEM/src/itkFEMElement2DC0QuadraticTriangular.cxx b/Modules/Numerics/FEM/src/itkFEMElement2DC0QuadraticTriangular.cxx index 3a5aa6e492c..0485399a6f6 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement2DC0QuadraticTriangular.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement2DC0QuadraticTriangular.cxx @@ -27,7 +27,7 @@ namespace fem void Element2DC0QuadraticTriangular::GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, - Float & w, + Float & w, unsigned int order) const { // default integration order @@ -164,8 +164,8 @@ Element2DC0QuadraticTriangular::GetLocalFromGlobalCoordinates(const VectorType & int LinearTris[4][3] = { { 0, 3, 5 }, { 3, 1, 4 }, { 5, 4, 2 }, { 4, 5, 3 } }; VectorType pc(3); - int i, subId; - bool returnStatus = false; + int i, subId; + bool returnStatus = false; VectorType tempWeights(3); VectorType closest(3); diff --git a/Modules/Numerics/FEM/src/itkFEMElement2DC0QuadraticTriangularStrain.cxx b/Modules/Numerics/FEM/src/itkFEMElement2DC0QuadraticTriangularStrain.cxx index b0afecf1d66..e1419f06018 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement2DC0QuadraticTriangularStrain.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement2DC0QuadraticTriangularStrain.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer Element2DC0QuadraticTriangularStrain::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->SetNode(0, this->GetNode(0)); copyPtr->SetNode(1, this->GetNode(1)); @@ -47,12 +47,12 @@ Element2DC0QuadraticTriangularStrain::Element2DC0QuadraticTriangularStrain() : Superclass() {} -Element2DC0QuadraticTriangularStrain::Element2DC0QuadraticTriangularStrain(NodeIDType n1_, - NodeIDType n2_, - NodeIDType n3_, - NodeIDType n4_, - NodeIDType n5_, - NodeIDType n6_, +Element2DC0QuadraticTriangularStrain::Element2DC0QuadraticTriangularStrain(NodeIDType n1_, + NodeIDType n2_, + NodeIDType n3_, + NodeIDType n4_, + NodeIDType n5_, + NodeIDType n6_, Material::ConstPointer m_) : Superclass() { diff --git a/Modules/Numerics/FEM/src/itkFEMElement2DC0QuadraticTriangularStress.cxx b/Modules/Numerics/FEM/src/itkFEMElement2DC0QuadraticTriangularStress.cxx index f5e37939b07..ebdacb5e995 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement2DC0QuadraticTriangularStress.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement2DC0QuadraticTriangularStress.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer Element2DC0QuadraticTriangularStress::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->SetNode(0, this->GetNode(0)); copyPtr->SetNode(1, this->GetNode(1)); @@ -47,12 +47,12 @@ Element2DC0QuadraticTriangularStress::Element2DC0QuadraticTriangularStress() : Superclass() {} -Element2DC0QuadraticTriangularStress::Element2DC0QuadraticTriangularStress(NodeIDType n1_, - NodeIDType n2_, - NodeIDType n3_, - NodeIDType n4_, - NodeIDType n5_, - NodeIDType n6_, +Element2DC0QuadraticTriangularStress::Element2DC0QuadraticTriangularStress(NodeIDType n1_, + NodeIDType n2_, + NodeIDType n3_, + NodeIDType n4_, + NodeIDType n5_, + NodeIDType n6_, Material::ConstPointer m_) : Superclass() { diff --git a/Modules/Numerics/FEM/src/itkFEMElement2DC1Beam.cxx b/Modules/Numerics/FEM/src/itkFEMElement2DC1Beam.cxx index c4323e10711..43b2509ba8a 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement2DC1Beam.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement2DC1Beam.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer Element2DC1Beam::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->SetNode(0, this->GetNode(0)); copyPtr->SetNode(1, this->GetNode(1)); @@ -264,9 +264,9 @@ void Element2DC1Beam::GetMassMatrix(MatrixType & Me) const { const unsigned int NDOF = this->GetNumberOfDegreesOfFreedom(); - MatrixType m(NDOF, NDOF, 0.0); - MatrixType mb(NDOF, NDOF, 0.0); - MatrixType k(NDOF, NDOF, 0.0); + MatrixType m(NDOF, NDOF, 0.0); + MatrixType mb(NDOF, NDOF, 0.0); + MatrixType k(NDOF, NDOF, 0.0); Float x = m_node[1]->GetCoordinates()[0] - m_node[0]->GetCoordinates()[0]; Float y = m_node[1]->GetCoordinates()[1] - m_node[0]->GetCoordinates()[1]; diff --git a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearHexahedron.cxx b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearHexahedron.cxx index 64f3e8dd4f5..c3d9efd3c3a 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearHexahedron.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearHexahedron.cxx @@ -26,7 +26,7 @@ namespace fem void Element3DC0LinearHexahedron::GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, - Float & w, + Float & w, unsigned int order) const { if (order == 0 || order > 9) @@ -177,15 +177,15 @@ Element3DC0LinearHexahedron::ShapeFunctionDerivatives(const VectorType & pt, Mat bool Element3DC0LinearHexahedron::GetLocalFromGlobalCoordinates(const VectorType & globalPt, VectorType & localPt) const { - int MAX_ITERATIONS = 10; + int MAX_ITERATIONS = 10; Float CONVERGED = 1.0e-03; Float DIVERGED = 1.0e06; - int iteration, converged; + int iteration, converged; VectorType params(3); VectorType fcol(3), rcol(3), scol(3), tcol(3), closestPoint(3); - int i, j; - Float d; + int i, j; + Float d; VectorType pt; VectorType derivs(24); VectorType weights(8); diff --git a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearHexahedronMembrane.cxx b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearHexahedronMembrane.cxx index b7a7bf0b319..8d1f91cfc04 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearHexahedronMembrane.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearHexahedronMembrane.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer Element3DC0LinearHexahedronMembrane::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->SetNode(0, this->GetNode(0)); copyPtr->SetNode(1, this->GetNode(1)); diff --git a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearHexahedronStrain.cxx b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearHexahedronStrain.cxx index 98c7c6ac4a2..05a40cfdb28 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearHexahedronStrain.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearHexahedronStrain.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer Element3DC0LinearHexahedronStrain::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->SetNode(0, this->GetNode(0)); copyPtr->SetNode(1, this->GetNode(1)); diff --git a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTetrahedronMembrane.cxx b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTetrahedronMembrane.cxx index 10a2cd9df61..9a4080fd4a2 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTetrahedronMembrane.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTetrahedronMembrane.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer Element3DC0LinearTetrahedronMembrane::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->SetNode(0, this->GetNode(0)); copyPtr->SetNode(1, this->GetNode(1)); diff --git a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTetrahedronStrain.cxx b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTetrahedronStrain.cxx index e0c9fc0b405..bd89aed42b9 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTetrahedronStrain.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTetrahedronStrain.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer Element3DC0LinearTetrahedronStrain::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->SetNode(0, this->GetNode(0)); copyPtr->SetNode(1, this->GetNode(1)); diff --git a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTriangular.cxx b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTriangular.cxx index fb8aafc084e..7ab3c506c50 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTriangular.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTriangular.cxx @@ -67,7 +67,7 @@ const unsigned int Element3DC0LinearTriangular::Nip[6] = { 0, 1, 3, 3, 6, 7 }; void Element3DC0LinearTriangular::GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, - Float & w, + Float & w, unsigned int order) const { // default integration order @@ -139,13 +139,13 @@ Element3DC0LinearTriangular::ShapeFunctionDerivatives(const VectorType &, Matrix bool Element3DC0LinearTriangular::GetLocalFromGlobalCoordinates(const VectorType & globalPt, VectorType & localPt) const { - int i, j; + int i, j; VectorType pt1, pt2, pt3, n(3); - Float fabsn; + Float fabsn; VectorType rhs(2), c1(2), c2(2); - Float det; - Float maxComponent; - int idx = 0, indices[2]; + Float det; + Float maxComponent; + int idx = 0, indices[2]; VectorType closest, closestPoint1(3), closestPoint2(3), cp(3); // Get normal for triangle, only the normal direction is needed, i.e. the @@ -230,12 +230,12 @@ Element3DC0LinearTriangular::JacobianDeterminant(const VectorType & /*HACK pt*/, const VectorType & BA = B - A; const VectorType & CA = C - A; const VectorType & CB = C - B; - const float L1 = CB.magnitude(); - const float L2 = CA.magnitude(); - const float L3 = BA.magnitude(); + const float L1 = CB.magnitude(); + const float L2 = CA.magnitude(); + const float L3 = BA.magnitude(); const float s = (L1 + L2 + L3) * .5; - Float det = sqrt(s * (s - L1) * (s - L2) * (s - L3)); + Float det = sqrt(s * (s - L1) * (s - L2) * (s - L3)); /* // use the formula for tri pqr, area is mag( vec(pq) cross vec(pr) ) @@ -299,7 +299,7 @@ void Element3DC0LinearTriangular::ComputeNormalDirection(const VectorType & v1, const VectorType & v2, const VectorType & v3, - VectorType & n) const + VectorType & n) const { Float ax, ay, az, bx, by, bz; @@ -320,7 +320,7 @@ void Element3DC0LinearTriangular::GeneralizedProjectPoint(const VectorType & x, const VectorType & origin, const VectorType & normal, - VectorType & xproj) const + VectorType & xproj) const { double t, xo[3], n2; diff --git a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTriangularLaplaceBeltrami.cxx b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTriangularLaplaceBeltrami.cxx index 83bdc3104dd..fb39061ac2f 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTriangularLaplaceBeltrami.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTriangularLaplaceBeltrami.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer Element3DC0LinearTriangularLaplaceBeltrami::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->SetNode(0, this->GetNode(0)); copyPtr->SetNode(1, this->GetNode(1)); @@ -45,9 +45,9 @@ Element3DC0LinearTriangularLaplaceBeltrami::Element3DC0LinearTriangularLaplaceBe : Superclass() {} -Element3DC0LinearTriangularLaplaceBeltrami::Element3DC0LinearTriangularLaplaceBeltrami(NodeIDType n1_, - NodeIDType n2_, - NodeIDType n3_, +Element3DC0LinearTriangularLaplaceBeltrami::Element3DC0LinearTriangularLaplaceBeltrami(NodeIDType n1_, + NodeIDType n2_, + NodeIDType n3_, Material::ConstPointer m_) : Superclass() { @@ -93,9 +93,9 @@ Element3DC0LinearTriangularLaplaceBeltrami::GetStiffnessMatrix(MatrixType & Ke) VectorType BA = B - A; VectorType CA = C - A; VectorType CB = C - B; - float L1 = CB.magnitude(); - float L2 = CA.magnitude(); - float L3 = BA.magnitude(); + float L1 = CB.magnitude(); + float L2 = CA.magnitude(); + float L3 = BA.magnitude(); float s = (L1 + L2 + L3) * .5; Float Area = sqrt(s * (s - L1) * (s - L2) * (s - L3)); diff --git a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTriangularMembrane.cxx b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTriangularMembrane.cxx index cf5e23a0e15..ad0a9a54558 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTriangularMembrane.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTriangularMembrane.cxx @@ -28,7 +28,7 @@ itk::LightObject::Pointer Element3DC0LinearTriangularMembrane::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->SetNode(0, this->GetNode(0)); copyPtr->SetNode(1, this->GetNode(1)); @@ -46,9 +46,9 @@ Element3DC0LinearTriangularMembrane::Element3DC0LinearTriangularMembrane() : Superclass() {} -Element3DC0LinearTriangularMembrane::Element3DC0LinearTriangularMembrane(NodeIDType n1_, - NodeIDType n2_, - NodeIDType n3_, +Element3DC0LinearTriangularMembrane::Element3DC0LinearTriangularMembrane(NodeIDType n1_, + NodeIDType n2_, + NodeIDType n3_, Material::ConstPointer m_) : Superclass() { diff --git a/Modules/Numerics/FEM/src/itkFEMElementBase.cxx b/Modules/Numerics/FEM/src/itkFEMElementBase.cxx index bde925d6ed3..27117085c47 100644 --- a/Modules/Numerics/FEM/src/itkFEMElementBase.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElementBase.cxx @@ -60,7 +60,7 @@ Element::GetStiffnessMatrix(MatrixType & Ke) const unsigned int Nip = this->GetNumberOfIntegrationPoints(); VectorType ip; - Float w; + Float w; MatrixType J; MatrixType shapeDgl; MatrixType shapeD; @@ -114,8 +114,8 @@ Element::GetStrainsAtPoint(const VectorType & pt, const Solution & sol, unsigned Element::VectorType Element::GetStressesAtPoint(const VectorType & itkNotUsed(pt), const VectorType & e, - const Solution & itkNotUsed(sol), - unsigned int itkNotUsed(index)) const + const Solution & itkNotUsed(sol), + unsigned int itkNotUsed(index)) const // NOTE: pt should be in local coordinates already { MatrixType D; @@ -143,7 +143,7 @@ Element::GetLandmarkContributionMatrix(float eta, MatrixType & Le) const Le.set_size(NDOF, NDOF); // resize the target matrix object Le.fill(0.0); - Float w; + Float w; VectorType ip, shape; for (unsigned int i = 0; i < Nip; ++i) { @@ -198,7 +198,7 @@ Element::GetMassMatrix(MatrixType & Me) const Me.set_size(NDOF, NDOF); // resize the target matrix object Me.fill(0.0); - Float w; + Float w; VectorType ip, shape; MatrixType J, shapeD; for (unsigned int i = 0; i < Nip; ++i) @@ -227,7 +227,7 @@ Element::InterpolateSolution(const VectorType & pt, const Solution & sol, unsign { VectorType vec(GetNumberOfDegreesOfFreedomPerNode()); VectorType shapef = this->ShapeFunctions(pt); - Float value; + Float value; const unsigned int Nnodes = this->GetNumberOfNodes(); const unsigned int Ndofs_per_node = this->GetNumberOfDegreesOfFreedomPerNode(); @@ -247,13 +247,13 @@ Element::InterpolateSolution(const VectorType & pt, const Solution & sol, unsign Element::Float Element::InterpolateSolutionN(const VectorType & pt, - const Solution & sol, - unsigned int f, - unsigned int solutionIndex) const + const Solution & sol, + unsigned int f, + unsigned int solutionIndex) const { Float value = 0.0; - VectorType shapef = this->ShapeFunctions(pt); + VectorType shapef = this->ShapeFunctions(pt); unsigned int Nnodes = this->GetNumberOfNodes(); for (unsigned int n = 0; n < Nnodes; ++n) { @@ -331,7 +331,7 @@ Element::JacobianInverse(const VectorType & pt, MatrixType & invJ, const MatrixT void Element::ShapeFunctionGlobalDerivatives(const VectorType & pt, - MatrixType & shapeDgl, + MatrixType & shapeDgl, const MatrixType * pJ, const MatrixType * pshapeD) const { @@ -364,7 +364,7 @@ Element::VectorType Element::GetGlobalFromLocalCoordinates(const VectorType & pt) const { unsigned int Nnodes = this->GetNumberOfNodes(); - MatrixType nc(this->GetNumberOfSpatialDimensions(), Nnodes); + MatrixType nc(this->GetNumberOfSpatialDimensions(), Nnodes); for (unsigned int n = 0; n < Nnodes; ++n) { nc.set_column(n, this->GetNodeCoordinates(n)); @@ -485,7 +485,7 @@ itk::LightObject::Pointer Element::Node::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->m_coordinates = this->m_coordinates; copyPtr->m_dof = this->m_dof; diff --git a/Modules/Numerics/FEM/src/itkFEMException.cxx b/Modules/Numerics/FEM/src/itkFEMException.cxx index dc848b8ab7f..8921c33ec05 100644 --- a/Modules/Numerics/FEM/src/itkFEMException.cxx +++ b/Modules/Numerics/FEM/src/itkFEMException.cxx @@ -35,8 +35,8 @@ FEMException::~FEMException() noexcept = default; FEMExceptionIO::FEMExceptionIO(const char * file, unsigned int lineNumber, - std::string location, - std::string moreDescription) + std::string location, + std::string moreDescription) : FEMException(file, lineNumber) { SetDescription("IO error in FEM class: " + moreDescription); @@ -55,9 +55,9 @@ FEMExceptionWrongClass::~FEMExceptionWrongClass() noexcept = default; FEMExceptionObjectNotFound::FEMExceptionObjectNotFound(const char * file, unsigned int lineNumber, - std::string location, - std::string baseClassName, - int GN) + std::string location, + std::string baseClassName, + int GN) : FEMException(file, lineNumber, location) { m_baseClassName = baseClassName; @@ -71,8 +71,8 @@ FEMExceptionObjectNotFound::~FEMExceptionObjectNotFound() noexcept = default; FEMExceptionSolution::FEMExceptionSolution(const char * file, unsigned int lineNumber, - std::string location, - std::string moreDescription) + std::string location, + std::string moreDescription) : FEMException(file, lineNumber) { SetDescription("Error when solving FEM problem: " + moreDescription); diff --git a/Modules/Numerics/FEM/src/itkFEMFactoryBase.cxx b/Modules/Numerics/FEM/src/itkFEMFactoryBase.cxx index 1f370573475..23a377a493e 100644 --- a/Modules/Numerics/FEM/src/itkFEMFactoryBase.cxx +++ b/Modules/Numerics/FEM/src/itkFEMFactoryBase.cxx @@ -42,7 +42,7 @@ namespace itk { FEMFactoryBase * FEMFactoryBase::m_Factory = nullptr; -std::mutex FEMFactoryBase::m_CreationMutex; +std::mutex FEMFactoryBase::m_CreationMutex; FEMFactoryBase::FEMFactoryBase() = default; diff --git a/Modules/Numerics/FEM/src/itkFEMItpackSparseMatrix.cxx b/Modules/Numerics/FEM/src/itkFEMItpackSparseMatrix.cxx index dc7320dc9b1..5fef230b274 100644 --- a/Modules/Numerics/FEM/src/itkFEMItpackSparseMatrix.cxx +++ b/Modules/Numerics/FEM/src/itkFEMItpackSparseMatrix.cxx @@ -270,9 +270,9 @@ ItpackSparseMatrix::doublereal ItpackSparseMatrix::Get(integer i, integer j) { doublereal returnValue = 0.0; /* set to default return value */ - integer fortranJ = j + 1; - integer lower; - integer upper; + integer fortranJ = j + 1; + integer lower; + integer upper; /* check for readiness */ if (m_MatrixInitialized != 0) @@ -393,11 +393,11 @@ ItpackSparseMatrix::mult(ItpackSparseMatrix * rightMatrix, ItpackSparseMatrix * } /* loop and temp variables */ - int lower; /* lower bounds for column indices vector */ - int upper; /* upper bounds for column indices vector */ - int i; /* loop over rows */ - int j; /* loop over columns */ - int k; /* iterate through row */ + int lower; /* lower bounds for column indices vector */ + int upper; /* upper bounds for column indices vector */ + int i; /* loop over rows */ + int j; /* loop over columns */ + int k; /* iterate through row */ doublereal summed; /* temp holder for row.column */ /* perform the mult operation */ for (i = 0; i < m_N; ++i) @@ -444,8 +444,8 @@ ItpackSparseMatrix::~ItpackSparseMatrix() FEMExceptionItpackSparseMatrixSbagn::FEMExceptionItpackSparseMatrixSbagn(const char * file, unsigned int lineNumber, - std::string location, - integer errorCode) + std::string location, + integer errorCode) : FEMException(file, lineNumber) { std::string solverError; @@ -471,8 +471,8 @@ FEMExceptionItpackSparseMatrixSbagn::~FEMExceptionItpackSparseMatrixSbagn() noex FEMExceptionItpackSparseMatrixSbsij::FEMExceptionItpackSparseMatrixSbsij(const char * file, unsigned int lineNumber, - std::string location, - integer errorCode) + std::string location, + integer errorCode) : FEMException(file, lineNumber) { std::string solverError; diff --git a/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapper.cxx b/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapper.cxx index 887adfde89d..1c7de12d62b 100644 --- a/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapper.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapper.cxx @@ -181,7 +181,7 @@ LinearSystemWrapper::OptimizeMatrixStorage(unsigned int matrixIndex, unsigned in this->InitializeMatrix(matrixIndex); /* loop through old matrix and pull out non-zero values */ - ColumnArray currentRow; + ColumnArray currentRow; unsigned int i; unsigned int j; for (i = 0; i < this->m_Order; ++i) @@ -200,7 +200,7 @@ LinearSystemWrapper::OptimizeMatrixStorage(unsigned int matrixIndex, unsigned in void LinearSystemWrapper::CopyMatrix(unsigned int matrixIndex1, unsigned int matrixIndex2) { - ColumnArray cols; + ColumnArray cols; unsigned int r; this->InitializeMatrix(matrixIndex2); @@ -217,7 +217,7 @@ LinearSystemWrapper::CopyMatrix(unsigned int matrixIndex1, unsigned int matrixIn void LinearSystemWrapper::AddMatrixMatrix(unsigned int matrixIndex1, unsigned int matrixIndex2) { - ColumnArray cols; + ColumnArray cols; unsigned int r; for (r = 0; r < this->m_Order; ++r) { @@ -315,21 +315,21 @@ LinearSystemWrapper::CuthillMckeeOrdering(ColumnArray & newNumbering, int starti } void -LinearSystemWrapper::FollowConnectionsCuthillMckeeOrdering(unsigned int rowNumber, +LinearSystemWrapper::FollowConnectionsCuthillMckeeOrdering(unsigned int rowNumber, ColumnArray & rowDegree, ColumnArray & reverseMapping, - unsigned int nextRowNumber, - unsigned int matrixIndex) + unsigned int nextRowNumber, + unsigned int matrixIndex) { int i; // these must be signed ints since they are compared // to size()-1 - int j; - int k; - unsigned int temp; + int j; + int k; + unsigned int temp; ColumnArray::iterator rowBufferIt; ColumnArray::iterator nextRowsIt; - ColumnArray bufferArray; - ColumnArray rowBuffer; + ColumnArray bufferArray; + ColumnArray rowBuffer; if (reverseMapping[rowNumber] > (this->m_Order - 1)) { @@ -433,8 +433,8 @@ FEMExceptionLinearSystem::~FEMExceptionLinearSystem() noexcept = default; FEMExceptionLinearSystem::FEMExceptionLinearSystem(const char * file, unsigned int lineNumber, - std::string location, - std::string moreDescription) + std::string location, + std::string moreDescription) : FEMException(file, lineNumber) { SetDescription("Error in linear system: " + moreDescription); @@ -444,7 +444,7 @@ FEMExceptionLinearSystem::FEMExceptionLinearSystem(const char * file, FEMExceptionLinearSystemBounds::FEMExceptionLinearSystemBounds(const char * file, unsigned int lineNumber, std::string, - std::string moreDescription, + std::string moreDescription, unsigned int index1) : FEMException(file, lineNumber) { diff --git a/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperItpack.cxx b/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperItpack.cxx index be28b0b95b5..940e923a6d5 100644 --- a/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperItpack.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperItpack.cxx @@ -330,9 +330,9 @@ LinearSystemWrapperItpack::AddMatrixValue(unsigned int i, unsigned int j, Float } void -LinearSystemWrapperItpack::GetColumnsOfNonZeroMatrixElementsInRow(unsigned int row, +LinearSystemWrapperItpack::GetColumnsOfNonZeroMatrixElementsInRow(unsigned int row, ColumnArray & cols, - unsigned int matrixIndex) + unsigned int matrixIndex) { /* FIXME: error checking */ if (!m_Matrices) @@ -397,7 +397,7 @@ LinearSystemWrapperItpack::ScaleMatrix(Float scale, unsigned int matrixIndex) __FILE__, __LINE__, "LinearSystemWrapperItpack::ScaleMatrix", "m_Matrices", matrixIndex); } - int i; + int i; doublereal * values = (*m_Matrices)[matrixIndex].GetA(); for (i = 0; i < (*m_Matrices)[matrixIndex].GetIA()[this->m_Order] - 1; ++i) { @@ -576,13 +576,13 @@ LinearSystemWrapperItpack::Solve() } /* itpack variables */ - integer N; - integer NB; - integer NW; - integer NCG; - integer * IWKSP; + integer N; + integer NB; + integer NW; + integer NCG; + integer * IWKSP; doublereal * WKSP; - integer IERR = 0; + integer IERR = 0; /********************************************************************* * FIX ME: itpack does not allow for any non-zero diagonal elements @@ -739,10 +739,10 @@ LinearSystemWrapperItpack::SwapMatrices(unsigned int matrixIndex1, unsigned int __FILE__, __LINE__, "LinearSystemWrapperItpack::SwapMatrices", "m_Matrices", matrixIndex2); } - int n = (*m_Matrices)[matrixIndex2].GetOrder(); - int nz = (*m_Matrices)[matrixIndex2].GetMaxNonZeroValues(); - integer * ia = (*m_Matrices)[matrixIndex2].GetIA(); - integer * ja = (*m_Matrices)[matrixIndex2].GetJA(); + int n = (*m_Matrices)[matrixIndex2].GetOrder(); + int nz = (*m_Matrices)[matrixIndex2].GetMaxNonZeroValues(); + integer * ia = (*m_Matrices)[matrixIndex2].GetIA(); + integer * ja = (*m_Matrices)[matrixIndex2].GetJA(); doublereal * a = (*m_Matrices)[matrixIndex2].GetA(); (*m_Matrices)[matrixIndex2].SetOrder((*m_Matrices)[matrixIndex1].GetOrder()); @@ -1013,8 +1013,8 @@ LinearSystemWrapperItpack::~LinearSystemWrapperItpack() FEMExceptionItpackSolver::FEMExceptionItpackSolver(const char * file, unsigned int lineNumber, - std::string location, - integer errorCode) + std::string location, + integer errorCode) : FEMException(file, lineNumber) { std::string solverError; diff --git a/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperVNL.cxx b/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperVNL.cxx index a9d6aab85c2..03d78cc2f42 100644 --- a/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperVNL.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperVNL.cxx @@ -211,7 +211,7 @@ LinearSystemWrapperVNL::Solve() * Here we use the iterative least squares solver. */ vnl_sparse_matrix_linear_system ls((*((*m_Matrices)[0])), (*((*m_Vectors)[0]))); - vnl_lsqr lsq(ls); + vnl_lsqr lsq(ls); /* * Set max number of iterations to 3*size of the K matrix. diff --git a/Modules/Numerics/FEM/src/itkFEMLoadBC.cxx b/Modules/Numerics/FEM/src/itkFEMLoadBC.cxx index d09e277599e..f459281a18f 100644 --- a/Modules/Numerics/FEM/src/itkFEMLoadBC.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLoadBC.cxx @@ -28,7 +28,7 @@ itk::LightObject::Pointer LoadBC::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); // Copy Load Contents copyPtr->m_DegreeOfFreedom = this->m_DegreeOfFreedom; diff --git a/Modules/Numerics/FEM/src/itkFEMLoadBCMFC.cxx b/Modules/Numerics/FEM/src/itkFEMLoadBCMFC.cxx index 5af6b28201f..55054179d84 100644 --- a/Modules/Numerics/FEM/src/itkFEMLoadBCMFC.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLoadBCMFC.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer LoadBCMFC::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); // Copy Load Contents copyPtr->m_Index = this->m_Index; diff --git a/Modules/Numerics/FEM/src/itkFEMLoadEdge.cxx b/Modules/Numerics/FEM/src/itkFEMLoadEdge.cxx index 6f67c0e2718..bb227cbd36a 100644 --- a/Modules/Numerics/FEM/src/itkFEMLoadEdge.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLoadEdge.cxx @@ -28,7 +28,7 @@ itk::LightObject::Pointer LoadEdge::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->m_Edge = this->m_Edge; @@ -97,7 +97,7 @@ LoadEdge::ApplyLoad(Element::ConstPointer element, Element::VectorType & Fe) Fe.fill(0.0); auto NEdgePts = static_cast((EdgeIds[0]).size()); - int EdgePt; + int EdgePt; // access the edge points. for (unsigned int i = 0; i < NEdgePts; ++i) { diff --git a/Modules/Numerics/FEM/src/itkFEMLoadElementBase.cxx b/Modules/Numerics/FEM/src/itkFEMLoadElementBase.cxx index beae4c76878..60732e1f513 100644 --- a/Modules/Numerics/FEM/src/itkFEMLoadElementBase.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLoadElementBase.cxx @@ -28,7 +28,7 @@ itk::LightObject::Pointer LoadElement::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); for (auto i : this->m_Element) { copyPtr->AddNextElement(i); diff --git a/Modules/Numerics/FEM/src/itkFEMLoadGrav.cxx b/Modules/Numerics/FEM/src/itkFEMLoadGrav.cxx index 2d36635e053..b359d24d547 100644 --- a/Modules/Numerics/FEM/src/itkFEMLoadGrav.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLoadGrav.cxx @@ -34,7 +34,7 @@ itk::LightObject::Pointer LoadGravConst::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); // Copy Load Contents copyPtr->m_GravityForce = this->m_GravityForce; diff --git a/Modules/Numerics/FEM/src/itkFEMLoadLandmark.cxx b/Modules/Numerics/FEM/src/itkFEMLoadLandmark.cxx index 1d59f8e2688..5168144b33f 100644 --- a/Modules/Numerics/FEM/src/itkFEMLoadLandmark.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLoadLandmark.cxx @@ -28,7 +28,7 @@ itk::LightObject::Pointer LoadLandmark::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); // Copy Load Contents copyPtr->m_Eta = this->m_Eta; diff --git a/Modules/Numerics/FEM/src/itkFEMLoadNode.cxx b/Modules/Numerics/FEM/src/itkFEMLoadNode.cxx index b72ecf62b43..7bd287ec658 100644 --- a/Modules/Numerics/FEM/src/itkFEMLoadNode.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLoadNode.cxx @@ -28,7 +28,7 @@ itk::LightObject::Pointer LoadNode::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->m_Element = this->m_Element; copyPtr->m_Point = this->m_Point; diff --git a/Modules/Numerics/FEM/src/itkFEMLoadPoint.cxx b/Modules/Numerics/FEM/src/itkFEMLoadPoint.cxx index b740bdecba1..67e9f47dd72 100644 --- a/Modules/Numerics/FEM/src/itkFEMLoadPoint.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLoadPoint.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer LoadPoint::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->m_Point = this->m_Point; copyPtr->m_ForcePoint = this->m_ForcePoint; diff --git a/Modules/Numerics/FEM/src/itkFEMMaterialLinearElasticity.cxx b/Modules/Numerics/FEM/src/itkFEMMaterialLinearElasticity.cxx index 328d9210136..77024e35372 100644 --- a/Modules/Numerics/FEM/src/itkFEMMaterialLinearElasticity.cxx +++ b/Modules/Numerics/FEM/src/itkFEMMaterialLinearElasticity.cxx @@ -27,7 +27,7 @@ itk::LightObject::Pointer MaterialLinearElasticity::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->SetYoungsModulus(this->GetYoungsModulus()); copyPtr->SetCrossSectionalArea(this->GetCrossSectionalArea()); diff --git a/Modules/Numerics/FEM/src/itkFEMUtility.cxx b/Modules/Numerics/FEM/src/itkFEMUtility.cxx index fd5d8d369d7..a95d8c7f1b3 100644 --- a/Modules/Numerics/FEM/src/itkFEMUtility.cxx +++ b/Modules/Numerics/FEM/src/itkFEMUtility.cxx @@ -45,7 +45,7 @@ GaussIntegrate::Integrate(double (*f)(double), double a, double b, int n) */ double scale, t, tl, tu, sum; - int i, m, ibase; + int i, m, ibase; /* Begin integration */ diff --git a/Modules/Numerics/FEM/test/itkFEMElement2DC0LinearLineStressTest.cxx b/Modules/Numerics/FEM/test/itkFEMElement2DC0LinearLineStressTest.cxx index eb062520f0e..97ae9b8952a 100644 --- a/Modules/Numerics/FEM/test/itkFEMElement2DC0LinearLineStressTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElement2DC0LinearLineStressTest.cxx @@ -79,9 +79,9 @@ itkFEMElement2DC0LinearLineStressTest(int argc, char * argv[]) solver->SetInput(femSO->GetFEMObject()); solver->Update(); - int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); + int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); vnl_vector soln(numDOF); - float expectedResult[6] = { 0.0f, 0.0f, 1.66667e-07f, 0.0f, 5e-07f, 0.0f }; + float expectedResult[6] = { 0.0f, 0.0f, 1.66667e-07f, 0.0f, 5e-07f, 0.0f }; bool foundError = false; for (int i = 0; i < numDOF; ++i) diff --git a/Modules/Numerics/FEM/test/itkFEMElement2DC0LinearQuadrilateralStrainItpackTest.cxx b/Modules/Numerics/FEM/test/itkFEMElement2DC0LinearQuadrilateralStrainItpackTest.cxx index 8f729e81b36..2aeeceddc52 100644 --- a/Modules/Numerics/FEM/test/itkFEMElement2DC0LinearQuadrilateralStrainItpackTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElement2DC0LinearQuadrilateralStrainItpackTest.cxx @@ -95,7 +95,7 @@ itkFEMElement2DC0LinearQuadrilateralStrainItpackTest(int argc, char * argv[]) solver->SetLinearSystemWrapper(&WrapperItpack); solver->Update(); - int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); + int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); vnl_vector soln(numDOF); float expectedResult[8] = { 0.0f, 0.0f, 4.11808e-07f, 3.47237e-08f, 5.54107e-07f, -1.65448e-07f, 0.0f, 0.0f }; diff --git a/Modules/Numerics/FEM/test/itkFEMElement2DC1BeamTest.cxx b/Modules/Numerics/FEM/test/itkFEMElement2DC1BeamTest.cxx index daf0723d915..a12467d8891 100644 --- a/Modules/Numerics/FEM/test/itkFEMElement2DC1BeamTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElement2DC1BeamTest.cxx @@ -81,7 +81,7 @@ itkFEMElement2DC1BeamTest(int argc, char * argv[]) solver->SetInput(femSO->GetFEMObject()); solver->Update(); - int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); + int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); vnl_vector soln(numDOF); float expectedResult[12] = { 0.0917665f, -0.00103585f, -0.00138737f, 0.0901188f, -0.00178768f, -3.88301e-05f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; diff --git a/Modules/Numerics/FEM/test/itkFEMElement2DMembraneTest.cxx b/Modules/Numerics/FEM/test/itkFEMElement2DMembraneTest.cxx index f18f46ba40e..aecab09ab5a 100644 --- a/Modules/Numerics/FEM/test/itkFEMElement2DMembraneTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElement2DMembraneTest.cxx @@ -30,7 +30,7 @@ itkFEMElement2DMembraneTest(int, char *[]) using ElasticityType = itk::fem::MaterialLinearElasticity; - NodeType::Pointer n0, n1, n2, n3; + NodeType::Pointer n0, n1, n2, n3; ElementType::VectorType pt(2); n0 = NodeType::New(); diff --git a/Modules/Numerics/FEM/test/itkFEMElement2DQuadraticTriangularTest.cxx b/Modules/Numerics/FEM/test/itkFEMElement2DQuadraticTriangularTest.cxx index ad9d80d46be..b8f04cfa715 100644 --- a/Modules/Numerics/FEM/test/itkFEMElement2DQuadraticTriangularTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElement2DQuadraticTriangularTest.cxx @@ -28,7 +28,7 @@ itkFEMElement2DQuadraticTriangularTest(int, char *[]) using ElementType = itk::fem::Element; using NodeType = ElementType::Node; - NodeType::Pointer n0, n1, n2; + NodeType::Pointer n0, n1, n2; ElementType::VectorType pt(2); n0 = NodeType::New(); diff --git a/Modules/Numerics/FEM/test/itkFEMElement2DStrainTest.cxx b/Modules/Numerics/FEM/test/itkFEMElement2DStrainTest.cxx index 7079267f1c8..db71fe4a719 100644 --- a/Modules/Numerics/FEM/test/itkFEMElement2DStrainTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElement2DStrainTest.cxx @@ -28,7 +28,7 @@ itkFEMElement2DStrainTest(int, char *[]) using ElementType = itk::fem::Element; using NodeType = ElementType::Node; - NodeType::Pointer n0, n1, n2, n3; + NodeType::Pointer n0, n1, n2, n3; ElementType::VectorType pt(2); n0 = NodeType::New(); diff --git a/Modules/Numerics/FEM/test/itkFEMElement2DTest.cxx b/Modules/Numerics/FEM/test/itkFEMElement2DTest.cxx index 56eb6bcfe2f..66724f80938 100644 --- a/Modules/Numerics/FEM/test/itkFEMElement2DTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElement2DTest.cxx @@ -102,8 +102,8 @@ itkFEMElement2DTest(int argc, char * argv[]) femSO->GetFEMObject()->FinalizeMesh(); - double * expectedSolution = nullptr; - bool foundError = false; + double * expectedSolution = nullptr; + bool foundError = false; std::string modelFile = itksys::SystemTools::GetFilenameName(argv[1]); // Define all expected solutions here @@ -135,8 +135,8 @@ itkFEMElement2DTest(int argc, char * argv[]) // Declare and initialize linear system wrapper objects itk::fem::LinearSystemWrapperDenseVNL lsw_dvnl; - itk::fem::LinearSystemWrapperItpack lsw_itpack; - itk::fem::LinearSystemWrapperVNL lsw_vnl; + itk::fem::LinearSystemWrapperItpack lsw_itpack; + itk::fem::LinearSystemWrapperVNL lsw_vnl; for (int s = 0; s < numsolvers; ++s) { auto solver = Solver2DType::New(); diff --git a/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearHexahedronMembraneTest.cxx b/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearHexahedronMembraneTest.cxx index f4c2a22b1a4..017cb478156 100644 --- a/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearHexahedronMembraneTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearHexahedronMembraneTest.cxx @@ -80,10 +80,10 @@ itkFEMElement3DC0LinearHexahedronMembraneTest(int argc, char * argv[]) solver->SetInput(femSO->GetFEMObject()); solver->Update(); - int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); + int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); vnl_vector soln(numDOF); - bool foundError = false; + bool foundError = false; float exectedResult[24] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.00133333f, 0.0f, 0.0f, 0.00133333f, 0.0f, 0.0f, 0.00133333f, 0.0f, 0.0f, 0.00133333f, 0.0f, 0.0f }; diff --git a/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearHexahedronStrainTest.cxx b/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearHexahedronStrainTest.cxx index 29e87947869..914becaab11 100644 --- a/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearHexahedronStrainTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearHexahedronStrainTest.cxx @@ -79,12 +79,12 @@ itkFEMElement3DC0LinearHexahedronStrainTest(int argc, char * argv[]) solver->SetInput(femSO->GetFEMObject()); solver->Update(); - int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); + int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); vnl_vector soln(numDOF); - float exectedResult[24] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.00597587f, 0.000594286f, 0.00250921f, 0.00597587f, -0.000594286f, -0.00250921f, - 0.00597587f, 0.000594286f, -0.00250921f, 0.00597587f, -0.000594286f, 0.00250921f }; + float exectedResult[24] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.00597587f, 0.000594286f, 0.00250921f, 0.00597587f, -0.000594286f, -0.00250921f, + 0.00597587f, 0.000594286f, -0.00250921f, 0.00597587f, -0.000594286f, 0.00250921f }; bool foundError = false; for (int i = 0; i < numDOF; ++i) diff --git a/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearTetrahedronMembraneTest.cxx b/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearTetrahedronMembraneTest.cxx index 96fad129ff7..ad567b4de8b 100644 --- a/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearTetrahedronMembraneTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearTetrahedronMembraneTest.cxx @@ -75,7 +75,7 @@ itkFEMElement3DC0LinearTetrahedronMembraneTest(int argc, char * argv[]) solver->SetInput(femSO->GetFEMObject()); solver->Update(); - int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); + int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); vnl_vector soln(numDOF); float exectedResult[12] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.66667e-05f, 0.0f, 0.0f }; diff --git a/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearTetrahedronStrainTest.cxx b/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearTetrahedronStrainTest.cxx index 2857c963e2a..aba4acb9742 100644 --- a/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearTetrahedronStrainTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearTetrahedronStrainTest.cxx @@ -82,7 +82,7 @@ itkFEMElement3DC0LinearTetrahedronStrainTest(int argc, char * argv[]) solver->SetInput(femSO->GetFEMObject()); solver->Update(); - int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); + int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); vnl_vector soln(numDOF); float exectedResult[12] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, diff --git a/Modules/Numerics/FEM/test/itkFEMElement3DMembraneTest.cxx b/Modules/Numerics/FEM/test/itkFEMElement3DMembraneTest.cxx index 973f3995eb4..77399153557 100644 --- a/Modules/Numerics/FEM/test/itkFEMElement3DMembraneTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElement3DMembraneTest.cxx @@ -28,7 +28,7 @@ itkFEMElement3DMembraneTest(int, char *[]) using ElementType = itk::fem::Element; using NodeType = ElementType::Node; - NodeType::Pointer n0, n1, n2, n3, n4, n5, n6, n7; + NodeType::Pointer n0, n1, n2, n3, n4, n5, n6, n7; ElementType::VectorType pt(3); n0 = NodeType::New(); diff --git a/Modules/Numerics/FEM/test/itkFEMElement3DTest.cxx b/Modules/Numerics/FEM/test/itkFEMElement3DTest.cxx index c7da26261cf..6eec4f9694e 100644 --- a/Modules/Numerics/FEM/test/itkFEMElement3DTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElement3DTest.cxx @@ -104,8 +104,8 @@ itkFEMElement3DTest(int argc, char * argv[]) femSO->GetFEMObject()->FinalizeMesh(); - double * expectedSolution = nullptr; - bool foundError = false; + double * expectedSolution = nullptr; + bool foundError = false; std::string modelFile = itksys::SystemTools::GetFilenameName(argv[1]); // Define all expected solutions here @@ -152,8 +152,8 @@ itkFEMElement3DTest(int argc, char * argv[]) // Declare and initialize linear system wrapper objects itk::fem::LinearSystemWrapperDenseVNL lsw_dvnl; - itk::fem::LinearSystemWrapperItpack lsw_itpack; - itk::fem::LinearSystemWrapperVNL lsw_vnl; + itk::fem::LinearSystemWrapperItpack lsw_itpack; + itk::fem::LinearSystemWrapperVNL lsw_vnl; for (int s = 0; s < numsolvers; ++s) { auto solver = SolverType::New(); diff --git a/Modules/Numerics/FEM/test/itkFEMElementTest.cxx b/Modules/Numerics/FEM/test/itkFEMElementTest.cxx index fe96d032717..703aef4d399 100644 --- a/Modules/Numerics/FEM/test/itkFEMElementTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElementTest.cxx @@ -44,9 +44,9 @@ itkFEMElementTest(int argc, char * argv[]) // Storage for list of or user-specified input file(s) char ** filelist; - char buffer[80] = { '\0' }; - int numfiles = 0; - char * fname; + char buffer[80] = { '\0' }; + int numfiles = 0; + char * fname; // Solvers being tested int numsolvers = 3; @@ -144,8 +144,8 @@ itkFEMElementTest(int argc, char * argv[]) // Open a file handle & associate it with the input file std::string modelFile = itksys::SystemTools::GetFilenameName(fname); - double * expectedSolution = nullptr; - double tolerance; + double * expectedSolution = nullptr; + double tolerance; f.open(fname, std::ios::binary); if (!f) @@ -173,8 +173,8 @@ itkFEMElementTest(int argc, char * argv[]) // Declare and initialize linear system wrapper objects itk::fem::LinearSystemWrapperDenseVNL lsw_dvnl; - itk::fem::LinearSystemWrapperItpack lsw_itpack; - itk::fem::LinearSystemWrapperVNL lsw_vnl; + itk::fem::LinearSystemWrapperItpack lsw_itpack; + itk::fem::LinearSystemWrapperVNL lsw_vnl; for (s = 0; s < numsolvers; ++s) { if (s == 2) @@ -549,7 +549,7 @@ CheckDisplacements(itk::fem::Solver & S, int s, char comment, double * expectedR // Prints the components of the problem for debugging/reporting purposes { std::cout << std::endl << comment << "Check Displacements: " << std::endl; - int index = 0; + int index = 0; bool foundError = false; std::cout << std::endl << comment << "NodeArray: " << std::endl; diff --git a/Modules/Numerics/FEM/test/itkFEMGenerateMeshTest.cxx b/Modules/Numerics/FEM/test/itkFEMGenerateMeshTest.cxx index 8fbd2c578c9..46da86a2798 100644 --- a/Modules/Numerics/FEM/test/itkFEMGenerateMeshTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMGenerateMeshTest.cxx @@ -37,7 +37,7 @@ itkFEMGenerateMeshTest(int, char *[]) // Generate3DRectilinearMesh(m_Element,mySolver,MeshOriginV,MeshSizeV,ElementsPerDim); // Set up the solver object - itk::fem::Solver S; + itk::fem::Solver S; itk::fem::LinearSystemWrapperVNL lsw; S.SetLinearSystemWrapper(&lsw); diff --git a/Modules/Numerics/FEM/test/itkFEMLinearSystemWrapperItpackTest.cxx b/Modules/Numerics/FEM/test/itkFEMLinearSystemWrapperItpackTest.cxx index a4b1175c453..e300c434108 100644 --- a/Modules/Numerics/FEM/test/itkFEMLinearSystemWrapperItpackTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMLinearSystemWrapperItpackTest.cxx @@ -305,7 +305,7 @@ itkFEMLinearSystemWrapperItpackTest(int argc, char * argv[]) } } - int integerPass = 1; + int integerPass = 1; double doublePass = 1.0; std::cout << "Test itpack parameter setting..." << std::endl; diff --git a/Modules/Numerics/FEM/test/itkFEMLoadBCMFCTest.cxx b/Modules/Numerics/FEM/test/itkFEMLoadBCMFCTest.cxx index 5aba4aa478f..b500ad460a9 100644 --- a/Modules/Numerics/FEM/test/itkFEMLoadBCMFCTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMLoadBCMFCTest.cxx @@ -81,7 +81,7 @@ itkFEMLoadBCMFCTest(int argc, char * argv[]) solver->SetInput(femSO->GetFEMObject()); solver->Update(); - int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); + int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); vnl_vector soln(numDOF); float expectedResult[10] = { 0.283525f, 0.0f, 0.283525f, 1.70115f, 0.283525f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; diff --git a/Modules/Numerics/FEM/test/itkFEMLoadBCMFCTestUser.cxx b/Modules/Numerics/FEM/test/itkFEMLoadBCMFCTestUser.cxx index 5d92dfbb4e9..d087d11eaff 100644 --- a/Modules/Numerics/FEM/test/itkFEMLoadBCMFCTestUser.cxx +++ b/Modules/Numerics/FEM/test/itkFEMLoadBCMFCTestUser.cxx @@ -202,7 +202,7 @@ itkFEMLoadBCMFCTestUser(int, char *[]) solver->SetInput(femObject); solver->Update(); - int numDOF = femObject->GetNumberOfDegreesOfFreedom(); + int numDOF = femObject->GetNumberOfDegreesOfFreedom(); vnl_vector soln(numDOF); float expectedResult[10] = { 0.283525f, 0.0f, 0.283525f, 1.70115f, 0.283525f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; diff --git a/Modules/Numerics/FEM/test/itkFEMLoadEdgeTest.cxx b/Modules/Numerics/FEM/test/itkFEMLoadEdgeTest.cxx index bee8b19706d..3eea6cd07c4 100644 --- a/Modules/Numerics/FEM/test/itkFEMLoadEdgeTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMLoadEdgeTest.cxx @@ -80,7 +80,7 @@ itkFEMLoadEdgeTest(int argc, char * argv[]) solver->SetInput(femSO->GetFEMObject()); solver->Update(); - int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); + int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); vnl_vector soln(numDOF); for (int i = 0; i < numDOF; ++i) { diff --git a/Modules/Numerics/FEM/test/itkFEMLoadGravConstTest.cxx b/Modules/Numerics/FEM/test/itkFEMLoadGravConstTest.cxx index 003469e1af9..837c9fd842b 100644 --- a/Modules/Numerics/FEM/test/itkFEMLoadGravConstTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMLoadGravConstTest.cxx @@ -79,7 +79,7 @@ itkFEMLoadGravConstTest(int argc, char * argv[]) solver->SetInput(femSO->GetFEMObject()); solver->Update(); - int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); + int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); vnl_vector soln(numDOF); for (int i = 0; i < numDOF; ++i) { diff --git a/Modules/Numerics/FEM/test/itkFEMLoadPointTestUser.cxx b/Modules/Numerics/FEM/test/itkFEMLoadPointTestUser.cxx index 7e96a583881..a497b9df2a4 100644 --- a/Modules/Numerics/FEM/test/itkFEMLoadPointTestUser.cxx +++ b/Modules/Numerics/FEM/test/itkFEMLoadPointTestUser.cxx @@ -140,8 +140,8 @@ itkFEMLoadPointTestUser(int, char *[]) solver->SetInput(femObject); itk::fem::LinearSystemWrapperDenseVNL lsw_dvnl; - itk::fem::LinearSystemWrapperItpack lsw_itpack; - itk::fem::LinearSystemWrapperVNL lsw_vnl; + itk::fem::LinearSystemWrapperItpack lsw_itpack; + itk::fem::LinearSystemWrapperVNL lsw_vnl; // Solvers being tested int numsolvers = 3; @@ -170,7 +170,7 @@ itkFEMLoadPointTestUser(int, char *[]) solver->Update(); - int numDOF = femObject->GetNumberOfDegreesOfFreedom(); + int numDOF = femObject->GetNumberOfDegreesOfFreedom(); vnl_vector soln(numDOF); for (int i = 0; i < numDOF; ++i) { diff --git a/Modules/Numerics/FEM/test/itkFEMPArrayTest.cxx b/Modules/Numerics/FEM/test/itkFEMPArrayTest.cxx index ab639d6ddfd..e6915580fa1 100644 --- a/Modules/Numerics/FEM/test/itkFEMPArrayTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMPArrayTest.cxx @@ -37,7 +37,7 @@ itkFEMPArrayTest(int, char *[]) ArrayType array; - auto n1 = NodeType::New(); + auto n1 = NodeType::New(); ElementType::VectorType pt(2); pt[0] = 0.; diff --git a/Modules/Numerics/FEM/test/itkFEMRobustSolverTest.cxx b/Modules/Numerics/FEM/test/itkFEMRobustSolverTest.cxx index 2f346259031..280d3b201f4 100644 --- a/Modules/Numerics/FEM/test/itkFEMRobustSolverTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMRobustSolverTest.cxx @@ -123,7 +123,7 @@ itkFEMRobustSolverTest(int, char *[]) unsigned int elementDimensionY = 2; FEMVectorType point(ParameterDimension); - unsigned int globalNumbering = 0; + unsigned int globalNumbering = 0; for (unsigned int j = 0; j <= elementDimensionY; ++j) { @@ -286,10 +286,10 @@ itkFEMRobustSolverTest(int, char *[]) solver->SetInput(femObject); solver->Update(); - int numOfDOF = femObject->GetNumberOfDegreesOfFreedom(); + int numOfDOF = femObject->GetNumberOfDegreesOfFreedom(); FEMVectorType solution(numOfDOF); - bool hasError = false; + bool hasError = false; float groundTruthSolution[18] = { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 }; diff --git a/Modules/Numerics/FEM/test/itkFEMScatteredDataPointSetToImageFilterTest.cxx b/Modules/Numerics/FEM/test/itkFEMScatteredDataPointSetToImageFilterTest.cxx index 63b310e555b..e95421abc69 100644 --- a/Modules/Numerics/FEM/test/itkFEMScatteredDataPointSetToImageFilterTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMScatteredDataPointSetToImageFilterTest.cxx @@ -73,7 +73,7 @@ itkFEMScatteredDataPointSetToImageFilterTest(int, char *[]) // Construct a feature point set - auto featurePoints = FeaturePointSetType::New(); + auto featurePoints = FeaturePointSetType::New(); PointType p0; PointType p1; PointType p2; @@ -152,7 +152,7 @@ itkFEMScatteredDataPointSetToImageFilterTest(int, char *[]) ConstIteratorType constIterator(DF, DF->GetRequestedRegion()); // examine the results - bool hasError = false; + bool hasError = false; VectorType realDisplacement; realDisplacement[0] = 1.0; realDisplacement[1] = 1.0; diff --git a/Modules/Numerics/FEM/test/itkFEMSolverHyperbolicTest.cxx b/Modules/Numerics/FEM/test/itkFEMSolverHyperbolicTest.cxx index f719d29840f..aca30708871 100644 --- a/Modules/Numerics/FEM/test/itkFEMSolverHyperbolicTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMSolverHyperbolicTest.cxx @@ -133,7 +133,7 @@ PrintSolution(FEMSolverType * S) { std::cout << std::endl << "Solution: " << std::endl; const unsigned int invalidID = itk::fem::Element::InvalidDegreeOfFreedomID; - int numberOfNodes = S->GetInput()->GetNumberOfNodes(); + int numberOfNodes = S->GetInput()->GetNumberOfNodes(); for (int i = 0; i < numberOfNodes; ++i) { @@ -160,8 +160,8 @@ itkFEMSolverHyperbolicTest(int argc, char * argv[]) itk::FEMFactoryBase::GetFactory()->RegisterDefaultTypes(); - unsigned int niter = std::stoi(argv[2]); - unsigned int w = std::stoi(argv[3]); + unsigned int niter = std::stoi(argv[2]); + unsigned int w = std::stoi(argv[3]); std::vector solution; if (argc > 4) { @@ -182,7 +182,7 @@ itkFEMSolverHyperbolicTest(int argc, char * argv[]) using FEMObjectSpatialObjectType = itk::FEMObjectSpatialObject<2>; FEMObjectSpatialObjectType::ChildrenListType * children = spatialReader->GetGroup()->GetChildren(); - FEMObjectSpatialObjectType::Pointer femSO = + FEMObjectSpatialObjectType::Pointer femSO = dynamic_cast((*(children->begin())).GetPointer()); if (!femSO) { @@ -220,8 +220,8 @@ itkFEMSolverHyperbolicTest(int argc, char * argv[]) itk::fem::LinearSystemWrapperDenseVNL lsw_dvnl; - itk::fem::LinearSystemWrapperItpack lsw_itpack; - itk::fem::LinearSystemWrapperVNL lsw_vnl; + itk::fem::LinearSystemWrapperItpack lsw_itpack; + itk::fem::LinearSystemWrapperVNL lsw_vnl; switch (w) { @@ -257,7 +257,7 @@ itkFEMSolverHyperbolicTest(int argc, char * argv[]) if (argc > 4) { - int numberOfNodes = SH->GetInput()->GetNumberOfNodes(); + int numberOfNodes = SH->GetInput()->GetNumberOfNodes(); const unsigned int invalidID = itk::fem::Element::InvalidDegreeOfFreedomID; for (int i = 0; i < numberOfNodes; ++i) { diff --git a/Modules/Numerics/FEM/test/itkFEMSolverTest2D.cxx b/Modules/Numerics/FEM/test/itkFEMSolverTest2D.cxx index db35dba116c..342f489cf90 100644 --- a/Modules/Numerics/FEM/test/itkFEMSolverTest2D.cxx +++ b/Modules/Numerics/FEM/test/itkFEMSolverTest2D.cxx @@ -89,7 +89,7 @@ itkFEMSolverTest2D(int argc, char * argv[]) solver->SetInput(femSO->GetFEMObject()); solver->Update(); - int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); + int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); vnl_vector soln(numDOF); for (int i = 0; i < numDOF; ++i) { diff --git a/Modules/Numerics/FEM/test/itkFEMSolverTest3D.cxx b/Modules/Numerics/FEM/test/itkFEMSolverTest3D.cxx index a9108eea2a5..02e710b5233 100644 --- a/Modules/Numerics/FEM/test/itkFEMSolverTest3D.cxx +++ b/Modules/Numerics/FEM/test/itkFEMSolverTest3D.cxx @@ -80,10 +80,10 @@ itkFEMSolverTest3D(int argc, char * argv[]) solver->SetInput(femSO->GetFEMObject()); solver->Update(); - int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); + int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); vnl_vector soln(numDOF); - bool foundError = false; + bool foundError = false; float exectedResult[24] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.00133333f, 0.0f, 0.0f, 0.00133333f, 0.0f, 0.0f, 0.00133333f, 0.0f, 0.0f, 0.00133333f, 0.0f, 0.0f }; diff --git a/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter2DTest.cxx b/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter2DTest.cxx index 36174028694..9b392af16ea 100644 --- a/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter2DTest.cxx +++ b/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter2DTest.cxx @@ -31,7 +31,7 @@ itkImageToRectilinearFEMObjectFilter2DTest(int argc, char * argv[]) constexpr unsigned int minArgNodes = 4; // numberOfElementsToTest (a least 1) + elementNumber (at least 1) + elementNodes (4 per element) constexpr unsigned int minArgElements = 6; - int minArgC = inputFileDataCheckArgs + minArgNodes + minArgElements; + int minArgC = inputFileDataCheckArgs + minArgNodes + minArgElements; if (argc < minArgC) { @@ -58,8 +58,8 @@ itkImageToRectilinearFEMObjectFilter2DTest(int argc, char * argv[]) // Check the provided node and element argument numbers const auto numberOfNodesToTest = static_cast(std::stoi(argv[8])); - int nodeData = numberOfNodesToTest * (1 + Dimension); - int nodeTestData = 1 + nodeData; + int nodeData = numberOfNodesToTest * (1 + Dimension); + int nodeTestData = 1 + nodeData; if (argc < inputFileDataCheckArgs + nodeTestData) { std::cerr << "Missing parameters." << std::endl; @@ -71,8 +71,8 @@ itkImageToRectilinearFEMObjectFilter2DTest(int argc, char * argv[]) } const auto numberOfElementsToTest = static_cast(std::stoi(argv[9 + numberOfNodesToTest * 3])); - int elementData = numberOfElementsToTest * (1 + nodeSize); - int elementTestData = 1 + elementData; + int elementData = numberOfElementsToTest * (1 + nodeSize); + int elementTestData = 1 + elementData; if (argc < inputFileDataCheckArgs + nodeTestData + elementTestData) { std::cerr << "Missing parameters." << std::endl; @@ -141,7 +141,7 @@ itkImageToRectilinearFEMObjectFilter2DTest(int argc, char * argv[]) std::cout << " [PASSED]" << std::endl; // Test the resulting FEMOBject - bool foundError = false; + bool foundError = false; const auto expectedNumberOfNodes = static_cast(std::stoi(argv[6])); const auto expectedNumberOfElements = static_cast(std::stoi(argv[7])); @@ -246,7 +246,7 @@ itkImageToRectilinearFEMObjectFilter2DTest(int argc, char * argv[]) for (unsigned int i = 0; i < numberOfNodesToTest; ++i) { - auto nodeNumber = static_cast(std::stoi(argv[9 + i * 3])); + auto nodeNumber = static_cast(std::stoi(argv[9 + i * 3])); vnl_vector loc; loc.set_size(Dimension); loc[0] = std::stod(argv[9 + i * 3 + 1]); @@ -269,7 +269,7 @@ itkImageToRectilinearFEMObjectFilter2DTest(int argc, char * argv[]) for (unsigned int i = 0; i < numberOfElementsToTest; ++i) { - auto elementNumber = static_cast(std::stoi(argv[10 + numberOfNodesToTest * 3 + i * 5])); + auto elementNumber = static_cast(std::stoi(argv[10 + numberOfNodesToTest * 3 + i * 5])); vnl_vector nodes; nodes.set_size(nodeSize); nodes[0] = std::stoi(argv[10 + numberOfNodesToTest * 3 + i * 5 + 1]); diff --git a/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter3DTest.cxx b/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter3DTest.cxx index c5e56aeb6e3..9cfb2c1aaab 100644 --- a/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter3DTest.cxx +++ b/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter3DTest.cxx @@ -31,7 +31,7 @@ itkImageToRectilinearFEMObjectFilter3DTest(int argc, char * argv[]) constexpr unsigned int minArgNodes = 5; // numberOfElementsToTest (a least 1) + elementNumber (at least 1) + elementNodes (8 per element) constexpr unsigned int minArgElements = 10; - int minArgC = inputFileDataCheckArgs + minArgNodes + minArgElements; + int minArgC = inputFileDataCheckArgs + minArgNodes + minArgElements; if (argc < minArgC) { @@ -60,8 +60,8 @@ itkImageToRectilinearFEMObjectFilter3DTest(int argc, char * argv[]) // Check the provided node and element argument numbers const auto numberOfNodesToTest = static_cast(std::stoi(argv[10])); - int nodeData = numberOfNodesToTest * (1 + Dimension); - int nodeTestData = 1 + nodeData; + int nodeData = numberOfNodesToTest * (1 + Dimension); + int nodeTestData = 1 + nodeData; if (argc < inputFileDataCheckArgs + nodeTestData) { std::cerr << "Missing parameters." << std::endl; @@ -73,8 +73,8 @@ itkImageToRectilinearFEMObjectFilter3DTest(int argc, char * argv[]) } const auto numberOfElementsToTest = static_cast(std::stoi(argv[11 + numberOfNodesToTest * 4])); - int elementData = numberOfElementsToTest * (1 + nodeSize); - int elementTestData = 1 + elementData; + int elementData = numberOfElementsToTest * (1 + nodeSize); + int elementTestData = 1 + elementData; if (argc < inputFileDataCheckArgs + nodeTestData + elementTestData) { std::cerr << "Missing parameters." << std::endl; @@ -146,7 +146,7 @@ itkImageToRectilinearFEMObjectFilter3DTest(int argc, char * argv[]) std::cout << " [PASSED]" << std::endl; // Test the resulting FEMOBject - bool foundError = false; + bool foundError = false; const auto expectedNumberOfNodes = static_cast(std::stoi(argv[8])); const auto expectedNumberOfElements = static_cast(std::stoi(argv[9])); @@ -252,7 +252,7 @@ itkImageToRectilinearFEMObjectFilter3DTest(int argc, char * argv[]) for (unsigned int i = 0; i < numberOfNodesToTest; ++i) { - auto nodeNumber = static_cast(std::stoi(argv[11 + i * 4])); + auto nodeNumber = static_cast(std::stoi(argv[11 + i * 4])); vnl_vector loc; loc.set_size(Dimension); loc[0] = std::stod(argv[11 + i * 4 + 1]); @@ -278,7 +278,7 @@ itkImageToRectilinearFEMObjectFilter3DTest(int argc, char * argv[]) for (unsigned int i = 0; i < numberOfElementsToTest; ++i) { - auto elementNumber = static_cast(std::stoi(argv[12 + numberOfNodesToTest * 4 + i * 9])); + auto elementNumber = static_cast(std::stoi(argv[12 + numberOfNodesToTest * 4 + i * 9])); vnl_vector nodes; nodes.set_size(8); nodes[0] = std::stoi(argv[12 + numberOfNodesToTest * 4 + i * 9 + 1]); diff --git a/Modules/Numerics/NarrowBand/include/itkNarrowBand.h b/Modules/Numerics/NarrowBand/include/itkNarrowBand.h index 11431dea49f..9a551d7b331 100644 --- a/Modules/Numerics/NarrowBand/include/itkNarrowBand.h +++ b/Modules/Numerics/NarrowBand/include/itkNarrowBand.h @@ -35,8 +35,8 @@ template class ITK_TEMPLATE_EXPORT BandNode { public: - TDataType m_Data; - TIndexType m_Index; + TDataType m_Data; + TIndexType m_Index; signed char m_NodeState{ 0 }; BandNode() : m_Data(TDataType{}) diff --git a/Modules/Numerics/NarrowBand/include/itkNarrowBand.hxx b/Modules/Numerics/NarrowBand/include/itkNarrowBand.hxx index 73df0e6ea50..4d61c5a8356 100644 --- a/Modules/Numerics/NarrowBand/include/itkNarrowBand.hxx +++ b/Modules/Numerics/NarrowBand/include/itkNarrowBand.hxx @@ -36,7 +36,7 @@ template std::vector::RegionType> NarrowBand::SplitBand(const SizeType & n) { - SizeType t_n = n; + SizeType t_n = n; const SizeType t_size = m_NodeContainer.size(); std::vector regionList; @@ -53,7 +53,7 @@ NarrowBand::SplitBand(const SizeType & n) } RegionType region; - auto pos = this->Begin(); + auto pos = this->Begin(); for (SizeType i = 0; i < t_n; ++i) { diff --git a/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.hxx b/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.hxx index 2f3b7c943d8..d2e944cd1ed 100644 --- a/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.hxx +++ b/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.hxx @@ -46,7 +46,7 @@ template void NarrowBandImageFilterBase::GenerateData() { - const int numberOfWorkUnits = this->GetNumberOfWorkUnits(); + const int numberOfWorkUnits = this->GetNumberOfWorkUnits(); MultiThreaderBase * mt = this->GetMultiThreader(); // if it is not initialized @@ -84,9 +84,9 @@ NarrowBandImageFilterBase::GenerateData() wui.UserData = nullptr; wui.ThreadFunction = nullptr; - TimeStepType timeStep; + TimeStepType timeStep; std::vector timeStepList(numberOfWorkUnits, TimeStepType{}); - BooleanStdVectorType validTimeStepList(numberOfWorkUnits, true); + BooleanStdVectorType validTimeStepList(numberOfWorkUnits, true); // Implement iterative loop in thread function // ThreadedApplyUpdate and ThreadedCalculateChanged @@ -218,17 +218,17 @@ NarrowBandImageFilterBase::InitializeIteration() template void -NarrowBandImageFilterBase::ThreadedApplyUpdate(const TimeStepType & dt, +NarrowBandImageFilterBase::ThreadedApplyUpdate(const TimeStepType & dt, const ThreadRegionType & regionToProcess, - ThreadIdType threadId) + ThreadIdType threadId) { // constexpr int INNER_MASK = 2; constexpr signed char INNER_MASK = 2; - typename NarrowBandType::ConstIterator it; + typename NarrowBandType::ConstIterator it; const typename OutputImageType::Pointer image = this->GetOutput(); - typename OutputImageType::PixelType oldvalue; - typename OutputImageType::PixelType newvalue; + typename OutputImageType::PixelType oldvalue; + typename OutputImageType::PixelType newvalue; for (it = regionToProcess.first; it != regionToProcess.last; ++it) { oldvalue = image->GetPixel(it->m_Index); @@ -250,12 +250,12 @@ NarrowBandImageFilterBase::ThreadedCalculateChange(co using NeighborhoodIteratorType = typename FiniteDifferenceFunctionType::NeighborhoodType; const typename OutputImageType::Pointer output = this->GetOutput(); - TimeStepType timeStep; - void * globalData; + TimeStepType timeStep; + void * globalData; // Get the FiniteDifferenceFunction to use in calculations. const typename FiniteDifferenceFunctionType::Pointer df = this->GetDifferenceFunction(); - const OutputSizeType radius = df->GetRadius(); + const OutputSizeType radius = df->GetRadius(); // Ask the function object for a pointer to a data structure it will use to // manage any global values it needs. We'll pass this back to the function @@ -264,7 +264,7 @@ NarrowBandImageFilterBase::ThreadedCalculateChange(co globalData = df->GetGlobalDataPointer(); typename NarrowBandType::Iterator bandIt; - NeighborhoodIteratorType outputIt(radius, output, output->GetRequestedRegion()); + NeighborhoodIteratorType outputIt(radius, output, output->GetRequestedRegion()); for (bandIt = regionToProcess.first; bandIt != regionToProcess.last; ++bandIt) { diff --git a/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx b/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx index 6246bcd2fa3..695f865aaf9 100644 --- a/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx +++ b/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx @@ -73,8 +73,8 @@ class NbTestClass : public NarrowBandImageFilterBaseGetInput()->GetRequestedRegion().GetSize(); - typename ImageType::IndexType tl = this->GetInput()->GetRequestedRegion().GetIndex(); + typename ImageType::SizeType sz = this->GetInput()->GetRequestedRegion().GetSize(); + typename ImageType::IndexType tl = this->GetInput()->GetRequestedRegion().GetIndex(); typename Superclass::IndexType in; for (in[0] = 32 + tl[0]; in[0] < tl[0] + static_cast(sz[0]); in[0]++) @@ -95,7 +95,7 @@ template double SimpleSignedDistance(const TPoint & p) { - auto center = itk::MakeFilled(32); + auto center = itk::MakeFilled(32); constexpr double radius = 19.5; double accum = 0.0; @@ -125,9 +125,9 @@ itkNarrowBandImageFilterBaseTest(int argc, char * argv[]) using WriterImageType = itk::Image; using PointType = itk::Point; - constexpr ImageType::SizeType size = { { 64, 64 } }; + constexpr ImageType::SizeType size = { { 64, 64 } }; constexpr ImageType::IndexType index = { { 0, 0 } }; - const ImageType::RegionType region{ index, size }; + const ImageType::RegionType region{ index, size }; auto inputImage = ImageType::New(); inputImage->SetRegions(region); @@ -146,7 +146,7 @@ itkNarrowBandImageFilterBaseTest(int argc, char * argv[]) } using RandomSourceType = itk::RandomImageSource; - auto randomSource = RandomSourceType::New(); + auto randomSource = RandomSourceType::New(); ImageType::SizeValueType tam[2]; tam[0] = 64; tam[1] = 64; diff --git a/Modules/Numerics/NarrowBand/test/itkNarrowBandTest.cxx b/Modules/Numerics/NarrowBand/test/itkNarrowBandTest.cxx index cf55ac4aef4..a1008a4c42c 100644 --- a/Modules/Numerics/NarrowBand/test/itkNarrowBandTest.cxx +++ b/Modules/Numerics/NarrowBand/test/itkNarrowBandTest.cxx @@ -50,7 +50,7 @@ itkNarrowBandTest(int, char *[]) std::cout << "Band size: " << band->Size() << std::endl; // Iterate over the band - auto it = band->Begin(); + auto it = band->Begin(); const auto itend = band->End(); // BandNodeType *tmp; @@ -62,8 +62,8 @@ itkNarrowBandTest(int, char *[]) // Split the band std::vector regions = band->SplitBand(10); - auto regionsit = regions.begin(); - const auto regionsitend = regions.end(); + auto regionsit = regions.begin(); + const auto regionsitend = regions.end(); std::cout << "Number of regions: " << regions.size() << std::endl; for (unsigned int i = 0; regionsit != regionsitend; ++regionsit) { diff --git a/Modules/Numerics/Optimizers/include/itkAmoebaOptimizer.h b/Modules/Numerics/Optimizers/include/itkAmoebaOptimizer.h index 7cb6a4c8720..cd906843310 100644 --- a/Modules/Numerics/Optimizers/include/itkAmoebaOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkAmoebaOptimizer.h @@ -170,13 +170,13 @@ class ITKOptimizers_EXPORT AmoebaOptimizer : public SingleValuedNonLinearVnlOpti void ValidateSettings(); - NumberOfIterationsType m_MaximumNumberOfIterations{}; - ParametersType::ValueType m_ParametersConvergenceTolerance{}; + NumberOfIterationsType m_MaximumNumberOfIterations{}; + ParametersType::ValueType m_ParametersConvergenceTolerance{}; CostFunctionType::MeasureType m_FunctionConvergenceTolerance{}; - bool m_AutomaticInitialSimplex{}; - ParametersType m_InitialSimplexDelta{}; - bool m_OptimizeWithRestarts{}; - std::unique_ptr m_VnlOptimizer; + bool m_AutomaticInitialSimplex{}; + ParametersType m_InitialSimplexDelta{}; + bool m_OptimizeWithRestarts{}; + std::unique_ptr m_VnlOptimizer; std::ostringstream m_StopConditionDescription{}; }; diff --git a/Modules/Numerics/Optimizers/include/itkConjugateGradientOptimizer.h b/Modules/Numerics/Optimizers/include/itkConjugateGradientOptimizer.h index a2dd5957282..252ff7331b2 100644 --- a/Modules/Numerics/Optimizers/include/itkConjugateGradientOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkConjugateGradientOptimizer.h @@ -87,7 +87,7 @@ class ITKOptimizers_EXPORT ConjugateGradientOptimizer : public SingleValuedNonLi private: /** The vnl optimization method for conjugate gradient. */ - bool m_OptimizerInitialized{}; + bool m_OptimizerInitialized{}; std::unique_ptr m_VnlOptimizer; }; } // end namespace itk diff --git a/Modules/Numerics/Optimizers/include/itkCumulativeGaussianCostFunction.h b/Modules/Numerics/Optimizers/include/itkCumulativeGaussianCostFunction.h index 15ee6b90fd7..aba58bbb729 100644 --- a/Modules/Numerics/Optimizers/include/itkCumulativeGaussianCostFunction.h +++ b/Modules/Numerics/Optimizers/include/itkCumulativeGaussianCostFunction.h @@ -127,8 +127,8 @@ class ITKOptimizers_EXPORT CumulativeGaussianCostFunction : public MultipleValue unsigned int m_RangeDimension{ 0 }; /** Different arrays. */ - mutable MeasureType m_Measure{}; - mutable MeasureType m_MeasurePointer{}; + mutable MeasureType m_Measure{}; + mutable MeasureType m_MeasurePointer{}; mutable ParametersType m_Parameters{}; }; } // end namespace itk diff --git a/Modules/Numerics/Optimizers/include/itkCumulativeGaussianOptimizer.h b/Modules/Numerics/Optimizers/include/itkCumulativeGaussianOptimizer.h index 62dcfb42e3f..c2ab562f754 100644 --- a/Modules/Numerics/Optimizers/include/itkCumulativeGaussianOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkCumulativeGaussianOptimizer.h @@ -148,7 +148,7 @@ class ITKOptimizers_EXPORT CumulativeGaussianOptimizer : public MultipleValuedNo MeasureType * RecalculateExtendedArrayFromGaussianParameters(MeasureType * originalArray, MeasureType * extendedArray, - int startingPointForInsertion) const; + int startingPointForInsertion) const; /** Calculates the squared difference error between each Gaussian * iteration loop. */ diff --git a/Modules/Numerics/Optimizers/include/itkFRPROptimizer.h b/Modules/Numerics/Optimizers/include/itkFRPROptimizer.h index 204f774358b..a6e42e1e9dc 100644 --- a/Modules/Numerics/Optimizers/include/itkFRPROptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkFRPROptimizer.h @@ -41,7 +41,7 @@ class FRPROptimizerEnums }; // Define how to print enumeration extern ITKOptimizers_EXPORT std::ostream & - operator<<(std::ostream & out, const FRPROptimizerEnums::Optimization value); +operator<<(std::ostream & out, const FRPROptimizerEnums::Optimization value); /** \class FRPROptimizer * \brief Implements Fletch-Reeves & Polak-Ribiere optimization using dBrent diff --git a/Modules/Numerics/Optimizers/include/itkGradientDescentOptimizer.h b/Modules/Numerics/Optimizers/include/itkGradientDescentOptimizer.h index ee802a3642a..85ca8537be6 100644 --- a/Modules/Numerics/Optimizers/include/itkGradientDescentOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkGradientDescentOptimizer.h @@ -180,13 +180,13 @@ class ITKOptimizers_EXPORT GradientDescentOptimizer : public SingleValuedNonLine double m_LearningRate{ 1.0 }; private: - bool m_Stop{ false }; - double m_Value{ 0.0 }; + bool m_Stop{ false }; + double m_Value{ 0.0 }; StopConditionGradientDescentOptimizerEnum m_StopCondition{ StopConditionGradientDescentOptimizerEnum::MaximumNumberOfIterations }; - SizeValueType m_NumberOfIterations{ 100 }; - SizeValueType m_CurrentIteration{ 0 }; + SizeValueType m_NumberOfIterations{ 100 }; + SizeValueType m_CurrentIteration{ 0 }; std::ostringstream m_StopConditionDescription{}; }; diff --git a/Modules/Numerics/Optimizers/include/itkLBFGSBOptimizer.h b/Modules/Numerics/Optimizers/include/itkLBFGSBOptimizer.h index 2cf832613a8..ddb12dda84c 100644 --- a/Modules/Numerics/Optimizers/include/itkLBFGSBOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkLBFGSBOptimizer.h @@ -214,20 +214,20 @@ class ITKOptimizers_EXPORT LBFGSBOptimizer : public SingleValuedNonLinearVnlOpti // counts, etc. friend class LBFGSBOptimizerHelper; - bool m_Trace{ false }; - bool m_OptimizerInitialized{ false }; - double m_CostFunctionConvergenceFactor{ 1e+7 }; - double m_ProjectedGradientTolerance{ 1e-5 }; + bool m_Trace{ false }; + bool m_OptimizerInitialized{ false }; + double m_CostFunctionConvergenceFactor{ 1e+7 }; + double m_ProjectedGradientTolerance{ 1e-5 }; unsigned int m_MaximumNumberOfIterations{ 500 }; unsigned int m_MaximumNumberOfEvaluations{ 500 }; unsigned int m_MaximumNumberOfCorrections{ 5 }; unsigned int m_CurrentIteration{ 0 }; - double m_InfinityNormOfProjectedGradient{ 0.0 }; + double m_InfinityNormOfProjectedGradient{ 0.0 }; std::unique_ptr m_VnlOptimizer; - BoundValueType m_LowerBound{}; - BoundValueType m_UpperBound{}; - BoundSelectionType m_BoundSelection{}; + BoundValueType m_LowerBound{}; + BoundValueType m_UpperBound{}; + BoundSelectionType m_BoundSelection{}; }; } // end namespace itk diff --git a/Modules/Numerics/Optimizers/include/itkLBFGSOptimizer.h b/Modules/Numerics/Optimizers/include/itkLBFGSOptimizer.h index 1adf94b085b..6da6257026c 100644 --- a/Modules/Numerics/Optimizers/include/itkLBFGSOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkLBFGSOptimizer.h @@ -180,15 +180,15 @@ class ITKOptimizers_EXPORT LBFGSOptimizer : public SingleValuedNonLinearVnlOptim using CostFunctionAdaptorType = Superclass::CostFunctionAdaptorType; private: - bool m_OptimizerInitialized{}; + bool m_OptimizerInitialized{}; std::unique_ptr m_VnlOptimizer; - mutable std::ostringstream m_StopConditionDescription{}; + mutable std::ostringstream m_StopConditionDescription{}; - bool m_Trace{}; + bool m_Trace{}; unsigned int m_MaximumNumberOfFunctionEvaluations{}; - double m_GradientConvergenceTolerance{}; - double m_LineSearchAccuracy{}; - double m_DefaultStepLength{}; + double m_GradientConvergenceTolerance{}; + double m_LineSearchAccuracy{}; + double m_DefaultStepLength{}; }; } // end namespace itk diff --git a/Modules/Numerics/Optimizers/include/itkLevenbergMarquardtOptimizer.h b/Modules/Numerics/Optimizers/include/itkLevenbergMarquardtOptimizer.h index c1cb85636b1..bbe3f4b941c 100644 --- a/Modules/Numerics/Optimizers/include/itkLevenbergMarquardtOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkLevenbergMarquardtOptimizer.h @@ -96,12 +96,12 @@ class ITKOptimizers_EXPORT LevenbergMarquardtOptimizer : public MultipleValuedNo using CostFunctionAdaptorType = Superclass::CostFunctionAdaptorType; private: - bool m_OptimizerInitialized{}; + bool m_OptimizerInitialized{}; std::unique_ptr m_VnlOptimizer; - unsigned int m_NumberOfIterations{}; - double m_ValueTolerance{}; - double m_GradientTolerance{}; - double m_EpsilonFunction{}; + unsigned int m_NumberOfIterations{}; + double m_ValueTolerance{}; + double m_GradientTolerance{}; + double m_EpsilonFunction{}; }; } // end namespace itk diff --git a/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearVnlOptimizer.h b/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearVnlOptimizer.h index e80b233d8ff..3367637612a 100644 --- a/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearVnlOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearVnlOptimizer.h @@ -129,12 +129,12 @@ class ITKOptimizers_EXPORT MultipleValuedNonLinearVnlOptimizer : public Multiple IterationReport(const EventObject & event); std::unique_ptr m_CostFunctionAdaptor; - bool m_UseGradient{}; + bool m_UseGradient{}; CommandType::Pointer m_Command{}; mutable ParametersType m_CachedCurrentPosition{}; - mutable MeasureType m_CachedValue{}; + mutable MeasureType m_CachedValue{}; mutable DerivativeType m_CachedDerivative{}; }; } // end namespace itk diff --git a/Modules/Numerics/Optimizers/include/itkMultipleValuedVnlCostFunctionAdaptor.h b/Modules/Numerics/Optimizers/include/itkMultipleValuedVnlCostFunctionAdaptor.h index 37ef4e42794..c94beb012e6 100644 --- a/Modules/Numerics/Optimizers/include/itkMultipleValuedVnlCostFunctionAdaptor.h +++ b/Modules/Numerics/Optimizers/include/itkMultipleValuedVnlCostFunctionAdaptor.h @@ -150,11 +150,11 @@ class ITKOptimizers_EXPORT MultipleValuedVnlCostFunctionAdaptor : public vnl_lea MultipleValuedCostFunction::Pointer m_CostFunction{}; - bool m_ScalesInitialized{}; - ScalesType m_InverseScales{}; + bool m_ScalesInitialized{}; + ScalesType m_InverseScales{}; Object::Pointer m_Reporter{}; - mutable MeasureType m_CachedValue{}; + mutable MeasureType m_CachedValue{}; mutable DerivativeType m_CachedDerivative{}; mutable ParametersType m_CachedCurrentParameters{}; }; // end of Class CostFunction diff --git a/Modules/Numerics/Optimizers/include/itkOnePlusOneEvolutionaryOptimizer.h b/Modules/Numerics/Optimizers/include/itkOnePlusOneEvolutionaryOptimizer.h index 851ffe22376..58344995d25 100644 --- a/Modules/Numerics/Optimizers/include/itkOnePlusOneEvolutionaryOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkOnePlusOneEvolutionaryOptimizer.h @@ -207,7 +207,7 @@ class ITKOptimizers_EXPORT OnePlusOneEvolutionaryOptimizer : public SingleValued /** Current iteration */ unsigned int m_CurrentIteration{}; - bool m_CatchGetValueException{}; + bool m_CatchGetValueException{}; double m_MetricWorstPossibleValue{}; /** Set if the Metric should be maximized: Default = False */ diff --git a/Modules/Numerics/Optimizers/include/itkOptimizer.h b/Modules/Numerics/Optimizers/include/itkOptimizer.h index 0ac2d7fb8a0..7ed1928afb0 100644 --- a/Modules/Numerics/Optimizers/include/itkOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkOptimizer.h @@ -110,8 +110,8 @@ class ITKOptimizers_EXPORT Optimizer : public Object private: ParametersType m_InitialPosition{}; - ScalesType m_Scales{}; - ScalesType m_InverseScales{}; + ScalesType m_Scales{}; + ScalesType m_InverseScales{}; }; } // end namespace itk diff --git a/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizerBase.h b/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizerBase.h index 166813901f8..d09cf29e409 100644 --- a/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizerBase.h +++ b/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizerBase.h @@ -71,10 +71,10 @@ class ITKOptimizers_EXPORT ParticleSwarmOptimizerBase : public SingleValuedNonLi struct ParticleData { - ParametersType m_CurrentParameters; - ParametersType m_CurrentVelocity; + ParametersType m_CurrentParameters; + ParametersType m_CurrentVelocity; CostFunctionType::MeasureType m_CurrentValue; - ParametersType m_BestParameters; + ParametersType m_BestParameters; CostFunctionType::MeasureType m_BestValue; }; @@ -230,23 +230,23 @@ class ITKOptimizers_EXPORT ParticleSwarmOptimizerBase : public SingleValuedNonLi void FileInitialization(); - bool m_PrintSwarm{}; - std::ostringstream m_StopConditionDescription{}; - bool m_InitializeNormalDistribution{}; - NumberOfParticlesType m_NumberOfParticles{}; - NumberOfIterationsType m_MaximalNumberOfIterations{}; - NumberOfGenerationsType m_NumberOfGenerationsWithMinimalImprovement{}; - ParameterBoundsType m_ParameterBounds{}; - ParametersType m_ParametersConvergenceTolerance{}; - double m_PercentageParticlesConverged{}; - CostFunctionType::MeasureType m_FunctionConvergenceTolerance{}; - std::vector m_Particles{}; - CostFunctionType::MeasureType m_FunctionBestValue{ 0 }; - std::vector m_FunctionBestValueMemory{}; - ParametersType m_ParametersBestValue{}; - NumberOfIterationsType m_IterationIndex{ 0 }; + bool m_PrintSwarm{}; + std::ostringstream m_StopConditionDescription{}; + bool m_InitializeNormalDistribution{}; + NumberOfParticlesType m_NumberOfParticles{}; + NumberOfIterationsType m_MaximalNumberOfIterations{}; + NumberOfGenerationsType m_NumberOfGenerationsWithMinimalImprovement{}; + ParameterBoundsType m_ParameterBounds{}; + ParametersType m_ParametersConvergenceTolerance{}; + double m_PercentageParticlesConverged{}; + CostFunctionType::MeasureType m_FunctionConvergenceTolerance{}; + std::vector m_Particles{}; + CostFunctionType::MeasureType m_FunctionBestValue{ 0 }; + std::vector m_FunctionBestValueMemory{}; + ParametersType m_ParametersBestValue{}; + NumberOfIterationsType m_IterationIndex{ 0 }; RandomVariateGeneratorType::IntegerType m_Seed{}; - bool m_UseSeed{}; + bool m_UseSeed{}; }; } // end namespace itk diff --git a/Modules/Numerics/Optimizers/include/itkPowellOptimizer.h b/Modules/Numerics/Optimizers/include/itkPowellOptimizer.h index 1b09fda5f38..e759329f78f 100644 --- a/Modules/Numerics/Optimizers/include/itkPowellOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkPowellOptimizer.h @@ -204,24 +204,24 @@ class ITKOptimizers_EXPORT PowellOptimizer : public SingleValuedNonLinearOptimiz * terminates based on MaximumIteration, StepTolerance, or ValueTolerance. * Implemented as Brent line optimizers from NRC. */ virtual void - BracketedLineOptimize(double ax, - double bx, - double cx, - double fa, - double functionValueOfb, - double fc, + BracketedLineOptimize(double ax, + double bx, + double cx, + double fa, + double functionValueOfb, + double fc, double * extX, double * extVal); virtual void - BracketedLineOptimize(double ax, - double bx, - double cx, - double fa, - double functionValueOfb, - double fc, - double * extX, - double * extVal, + BracketedLineOptimize(double ax, + double bx, + double cx, + double fa, + double functionValueOfb, + double fc, + double * extX, + double * extVal, ParametersType & tempCoord); itkGetMacro(SpaceDimension, unsigned int); @@ -251,7 +251,7 @@ class ITKOptimizers_EXPORT PowellOptimizer : public SingleValuedNonLinearOptimiz unsigned int m_MaximumIteration{}; unsigned int m_MaximumLineIteration{}; - bool m_CatchGetValueException{}; + bool m_CatchGetValueException{}; double m_MetricWorstPossibleValue{}; /** Set if the Metric should be maximized: Default = False */ @@ -261,7 +261,7 @@ class ITKOptimizers_EXPORT PowellOptimizer : public SingleValuedNonLinearOptimiz double m_StepLength{}; double m_StepTolerance{}; - ParametersType m_LineOrigin{}; + ParametersType m_LineOrigin{}; vnl_vector m_LineDirection{}; double m_ValueTolerance{}; diff --git a/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentBaseOptimizer.h b/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentBaseOptimizer.h index 1beb716d798..56bc45afcee 100644 --- a/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentBaseOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentBaseOptimizer.h @@ -175,17 +175,17 @@ class ITKOptimizers_EXPORT RegularStepGradientDescentBaseOptimizer : public Sing DerivativeType m_Gradient{}; DerivativeType m_PreviousGradient{}; - bool m_Stop{ false }; - bool m_Maximize{}; - MeasureType m_Value{}; - double m_GradientMagnitudeTolerance{}; - double m_MaximumStepLength{}; - double m_MinimumStepLength{}; - double m_CurrentStepLength{}; - double m_RelaxationFactor{}; - StopConditionEnum m_StopCondition{}; - SizeValueType m_NumberOfIterations{}; - SizeValueType m_CurrentIteration{}; + bool m_Stop{ false }; + bool m_Maximize{}; + MeasureType m_Value{}; + double m_GradientMagnitudeTolerance{}; + double m_MaximumStepLength{}; + double m_MinimumStepLength{}; + double m_CurrentStepLength{}; + double m_RelaxationFactor{}; + StopConditionEnum m_StopCondition{}; + SizeValueType m_NumberOfIterations{}; + SizeValueType m_CurrentIteration{}; std::ostringstream m_StopConditionDescription{}; }; } // end namespace itk diff --git a/Modules/Numerics/Optimizers/include/itkSPSAOptimizer.h b/Modules/Numerics/Optimizers/include/itkSPSAOptimizer.h index 630e134bc71..edfccfb1dd3 100644 --- a/Modules/Numerics/Optimizers/include/itkSPSAOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkSPSAOptimizer.h @@ -44,7 +44,7 @@ class SPSAOptimizerEnums }; // Define how to print enumeration extern ITKOptimizers_EXPORT std::ostream & - operator<<(std::ostream & out, const SPSAOptimizerEnums::StopConditionSPSAOptimizer value); +operator<<(std::ostream & out, const SPSAOptimizerEnums::StopConditionSPSAOptimizer value); /** * \class SPSAOptimizer * \brief An optimizer based on simultaneous perturbation... @@ -311,10 +311,10 @@ class ITKOptimizers_EXPORT SPSAOptimizer : public SingleValuedNonLinearOptimizer /** Settings.*/ SizeValueType m_MinimumNumberOfIterations{}; SizeValueType m_MaximumNumberOfIterations{}; - double m_StateOfConvergenceDecayRate{}; - double m_Tolerance{}; - bool m_Maximize{}; - double m_GradientMagnitude{}; + double m_StateOfConvergenceDecayRate{}; + double m_Tolerance{}; + bool m_Maximize{}; + double m_GradientMagnitude{}; SizeValueType m_NumberOfPerturbations{}; /** Parameters, as described by Spall.*/ @@ -327,7 +327,7 @@ class ITKOptimizers_EXPORT SPSAOptimizer : public SingleValuedNonLinearOptimizer // Define how to print enumeration extern ITKOptimizers_EXPORT std::ostream & - operator<<(std::ostream & out, const SPSAOptimizer::StopConditionSPSAOptimizerEnum value); +operator<<(std::ostream & out, const SPSAOptimizer::StopConditionSPSAOptimizerEnum value); } // end namespace itk diff --git a/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearVnlOptimizer.h b/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearVnlOptimizer.h index a4e4c545d75..bbf2e332b55 100644 --- a/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearVnlOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearVnlOptimizer.h @@ -148,7 +148,7 @@ class ITKOptimizers_EXPORT SingleValuedNonLinearVnlOptimizer : public SingleValu CommandType::Pointer m_Command{}; mutable ParametersType m_CachedCurrentPosition{}; - mutable MeasureType m_CachedValue{}; + mutable MeasureType m_CachedValue{}; mutable DerivativeType m_CachedDerivative{}; }; } // end namespace itk diff --git a/Modules/Numerics/Optimizers/include/itkSingleValuedVnlCostFunctionAdaptor.h b/Modules/Numerics/Optimizers/include/itkSingleValuedVnlCostFunctionAdaptor.h index 0f366e1c086..1a9244083a0 100644 --- a/Modules/Numerics/Optimizers/include/itkSingleValuedVnlCostFunctionAdaptor.h +++ b/Modules/Numerics/Optimizers/include/itkSingleValuedVnlCostFunctionAdaptor.h @@ -151,12 +151,12 @@ class ITKOptimizers_EXPORT SingleValuedVnlCostFunctionAdaptor : public vnl_cost_ itkGetConstReferenceMacro(InverseScales, ScalesType); SingleValuedCostFunction::Pointer m_CostFunction{}; - bool m_ScalesInitialized{}; - ScalesType m_InverseScales{}; - bool m_NegateCostFunction{}; - Object::Pointer m_Reporter{}; + bool m_ScalesInitialized{}; + ScalesType m_InverseScales{}; + bool m_NegateCostFunction{}; + Object::Pointer m_Reporter{}; - mutable MeasureType m_CachedValue{}; + mutable MeasureType m_CachedValue{}; mutable DerivativeType m_CachedDerivative{}; mutable ParametersType m_CachedCurrentParameters{}; }; // end of Class CostFunction diff --git a/Modules/Numerics/Optimizers/src/itkAmoebaOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkAmoebaOptimizer.cxx index 10909256564..ca2cebe0601 100644 --- a/Modules/Numerics/Optimizers/src/itkAmoebaOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkAmoebaOptimizer.cxx @@ -61,8 +61,8 @@ AmoebaOptimizer::PrintSelf(std::ostream & os, Indent indent) const AmoebaOptimizer::MeasureType AmoebaOptimizer::GetValue() const { - ParametersType parameters = this->GetCurrentPosition(); - const unsigned int numberOfParameters = parameters.Size(); + ParametersType parameters = this->GetCurrentPosition(); + const unsigned int numberOfParameters = parameters.Size(); SingleValuedNonLinearVnlOptimizer::CostFunctionAdaptorType * costFunction = this->GetNonConstCostFunctionAdaptor(); if (costFunction != nullptr) @@ -130,9 +130,9 @@ AmoebaOptimizer::SetCostFunction(SingleValuedCostFunction * costFunction) void AmoebaOptimizer::StartOptimization() { - const ScalesType & scales = GetScales(); - const ParametersType & initialPosition = GetInitialPosition(); - InternalParametersType delta(m_InitialSimplexDelta); + const ScalesType & scales = GetScales(); + const ParametersType & initialPosition = GetInitialPosition(); + InternalParametersType delta(m_InitialSimplexDelta); SingleValuedNonLinearVnlOptimizer::CostFunctionAdaptorType * costFunction = this->GetCostFunctionAdaptor(); auto n = static_cast(costFunction->get_number_of_unknowns()); @@ -185,8 +185,8 @@ AmoebaOptimizer::StartOptimization() // automated initialization - previously hidden inside vnl if (this->m_AutomaticInitialSimplex) { - constexpr double relativeDiameter = 0.05; - constexpr double zeroTermDelta = 0.00025; + constexpr double relativeDiameter = 0.05; + constexpr double zeroTermDelta = 0.00025; InternalParametersType automaticDelta(n); for (unsigned int i = 0; i < n; ++i) { @@ -208,8 +208,8 @@ AmoebaOptimizer::StartOptimization() // multiple restart heuristic if (this->m_OptimizeWithRestarts) { - auto totalEvaluations = static_cast(m_VnlOptimizer->get_num_evaluations()); - bool converged = false; + auto totalEvaluations = static_cast(m_VnlOptimizer->get_num_evaluations()); + bool converged = false; unsigned int i = 1; while (!converged && (totalEvaluations < m_MaximumNumberOfIterations)) { diff --git a/Modules/Numerics/Optimizers/src/itkCumulativeGaussianCostFunction.cxx b/Modules/Numerics/Optimizers/src/itkCumulativeGaussianCostFunction.cxx index 4d6366e0959..4f3562c06f2 100644 --- a/Modules/Numerics/Optimizers/src/itkCumulativeGaussianCostFunction.cxx +++ b/Modules/Numerics/Optimizers/src/itkCumulativeGaussianCostFunction.cxx @@ -131,7 +131,7 @@ CumulativeGaussianCostFunction::EvaluateCumulativeGaussian(double argument) cons } else { - const int temp = -static_cast(argument * 100); + const int temp = -static_cast(argument * 100); const double slope = (-y[temp + 1] + y[temp]) / (-(static_cast(temp) + 1) / 100 + (static_cast(temp) / 100)); erfValue = (slope * (argument + (static_cast(temp) + 1) / 100) - y[temp + 1]); diff --git a/Modules/Numerics/Optimizers/src/itkCumulativeGaussianOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkCumulativeGaussianOptimizer.cxx index 7ef4f343c68..1762296c68e 100644 --- a/Modules/Numerics/Optimizers/src/itkCumulativeGaussianOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkCumulativeGaussianOptimizer.cxx @@ -44,7 +44,7 @@ CumulativeGaussianOptimizer::~CumulativeGaussianOptimizer() { delete m_FinalSamp CumulativeGaussianOptimizer::MeasureType * CumulativeGaussianOptimizer::ExtendGaussian(MeasureType * originalArray, MeasureType * extendedArray, - int startingPointForInsertion) + int startingPointForInsertion) { // Use the parameters from originalArray to construct a Gaussian in // extendedArray @@ -74,7 +74,7 @@ CumulativeGaussianOptimizer::FindAverageSumOfSquaredDifferences(MeasureType * ar // sum of squared // differences between them. const int size = array1->GetNumberOfElements(); - double sum = 0; + double sum = 0; for (int i = 0; i < size; ++i) { @@ -105,7 +105,7 @@ CumulativeGaussianOptimizer::FindParametersOfGaussian(MeasureType * sampledGauss const int sampledGaussianArraySize = sampledGaussianArray->GetNumberOfElements(); const int extendedArraySize = 3 * sampledGaussianArraySize; - auto * extendedArray = new MeasureType(); + auto * extendedArray = new MeasureType(); extendedArray->SetSize(extendedArraySize); auto * extendedArrayCopy = new MeasureType(); extendedArrayCopy->SetSize(extendedArraySize); @@ -307,7 +307,7 @@ CumulativeGaussianOptimizer::StartOptimization() } // Calculate the mean, standard deviation, lower and upper asymptotes of the // sampled Cumulative Gaussian. - auto floorOfMean = static_cast(m_ComputedMean); + auto floorOfMean = static_cast(m_ComputedMean); const double yFloorOfMean = sampledGaussianArray->get(floorOfMean); const double yCeilingOfMean = sampledGaussianArray->get(floorOfMean + 1); const double y = (m_ComputedMean - floorOfMean) * (yCeilingOfMean - yFloorOfMean) + yFloorOfMean; @@ -357,7 +357,7 @@ CumulativeGaussianOptimizer::VerticalBestShift(MeasureType * originalArray, Meas // => nC = sum(Ai) - sum(Bi) // => C = (sum(Ai) - sum(Bi)) / n - double c = 0; + double c = 0; const int size = originalArray->GetNumberOfElements(); for (int i = 0; i < size; ++i) diff --git a/Modules/Numerics/Optimizers/src/itkExhaustiveOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkExhaustiveOptimizer.cxx index df973f43f0e..744024b934f 100644 --- a/Modules/Numerics/Optimizers/src/itkExhaustiveOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkExhaustiveOptimizer.cxx @@ -150,7 +150,7 @@ ExhaustiveOptimizer::AdvanceOneStep() void ExhaustiveOptimizer::IncrementIndex(ParametersType & newPosition) { - unsigned int idx = 0; + unsigned int idx = 0; const unsigned int spaceDimension = m_CostFunction->GetNumberOfParameters(); while (idx < spaceDimension) diff --git a/Modules/Numerics/Optimizers/src/itkInitializationBiasedParticleSwarmOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkInitializationBiasedParticleSwarmOptimizer.cxx index 43159100019..960f75d626d 100644 --- a/Modules/Numerics/Optimizers/src/itkInitializationBiasedParticleSwarmOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkInitializationBiasedParticleSwarmOptimizer.cxx @@ -56,7 +56,7 @@ InitializationBiasedParticleSwarmOptimizer::UpdateSwarm() for (unsigned int j = 0; j < m_NumberOfParticles; ++j) { - ParticleData & p = m_Particles[j]; + ParticleData & p = m_Particles[j]; const ParametersType::ValueType phi1 = randomGenerator->GetVariateWithClosedRange() * this->m_PersonalCoefficient; const ParametersType::ValueType phi2 = randomGenerator->GetVariateWithClosedRange() * this->m_GlobalCoefficient; const ParametersType::ValueType phi3 = randomGenerator->GetVariateWithClosedRange() * initializationCoefficient; diff --git a/Modules/Numerics/Optimizers/src/itkLBFGSOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkLBFGSOptimizer.cxx index cf6e6be7475..cc8f01bc874 100644 --- a/Modules/Numerics/Optimizers/src/itkLBFGSOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkLBFGSOptimizer.cxx @@ -217,7 +217,7 @@ LBFGSOptimizer::StartOptimization() // This compensates for later scaling them down in the cost function adaptor // and at the end of this function. InternalParametersType vnlCompatibleParameters(currentPositionInternalValue.size()); - const ScalesType & scales = this->GetScales(); + const ScalesType & scales = this->GetScales(); if (m_ScalesInitialized) { this->GetNonConstCostFunctionAdaptor()->SetScales(scales); diff --git a/Modules/Numerics/Optimizers/src/itkLevenbergMarquardtOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkLevenbergMarquardtOptimizer.cxx index efe641cb38f..4de9204af4f 100644 --- a/Modules/Numerics/Optimizers/src/itkLevenbergMarquardtOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkLevenbergMarquardtOptimizer.cxx @@ -102,7 +102,7 @@ LevenbergMarquardtOptimizer::StartOptimization() this->InvokeEvent(StartEvent()); const ParametersType initialPosition = GetInitialPosition(); - ParametersType parameters(initialPosition); + ParametersType parameters(initialPosition); // If the user provides the scales then we set otherwise we don't // for computation speed. diff --git a/Modules/Numerics/Optimizers/src/itkMultipleValuedVnlCostFunctionAdaptor.cxx b/Modules/Numerics/Optimizers/src/itkMultipleValuedVnlCostFunctionAdaptor.cxx index 383ef724cbc..b5170d79dc7 100644 --- a/Modules/Numerics/Optimizers/src/itkMultipleValuedVnlCostFunctionAdaptor.cxx +++ b/Modules/Numerics/Optimizers/src/itkMultipleValuedVnlCostFunctionAdaptor.cxx @@ -88,7 +88,7 @@ MultipleValuedVnlCostFunctionAdaptor::f(const InternalParametersType & inparamet /** Delegate computation of the gradient to the costfunction. */ void MultipleValuedVnlCostFunctionAdaptor::gradf(const InternalParametersType & inparameters, - InternalDerivativeType & gradient) + InternalDerivativeType & gradient) { if (!this->m_CostFunction) { @@ -120,8 +120,8 @@ MultipleValuedVnlCostFunctionAdaptor::gradf(const InternalParametersType & inpar /** Delegate computation of value and gradient to the costfunction. */ void MultipleValuedVnlCostFunctionAdaptor::compute(const InternalParametersType & x, - InternalMeasureType * ff, - InternalDerivativeType * g) + InternalMeasureType * ff, + InternalDerivativeType * g) { // delegate the computation to the CostFunction DerivativeType externalGradient; @@ -156,7 +156,7 @@ MultipleValuedVnlCostFunctionAdaptor::compute(const InternalParametersType & x, /** Convert external derivative measures into internal type */ void -MultipleValuedVnlCostFunctionAdaptor::ConvertExternalToInternalGradient(const DerivativeType & input, +MultipleValuedVnlCostFunctionAdaptor::ConvertExternalToInternalGradient(const DerivativeType & input, InternalDerivativeType & output) { const unsigned int rows = input.rows(); @@ -179,7 +179,7 @@ MultipleValuedVnlCostFunctionAdaptor::ConvertExternalToInternalGradient(const De /** Convert external Measures into internal type */ void -MultipleValuedVnlCostFunctionAdaptor::ConvertExternalToInternalMeasures(const MeasureType & input, +MultipleValuedVnlCostFunctionAdaptor::ConvertExternalToInternalMeasures(const MeasureType & input, InternalMeasureType & output) { const unsigned int size = input.size(); diff --git a/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizer.cxx index 860e42173a3..86e10c4f140 100644 --- a/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizer.cxx @@ -53,7 +53,7 @@ ParticleSwarmOptimizer::UpdateSwarm() for (unsigned int j = 0; j < m_NumberOfParticles; ++j) { - ParticleData & p = m_Particles[j]; + ParticleData & p = m_Particles[j]; const ParametersType::ValueType phi1 = randomGenerator->GetVariateWithClosedRange() * this->m_PersonalCoefficient; const ParametersType::ValueType phi2 = randomGenerator->GetVariateWithClosedRange() * this->m_GlobalCoefficient; for (unsigned int k = 0; k < n; ++k) diff --git a/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizerBase.cxx b/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizerBase.cxx index e3d9c1c23c8..f1a57989367 100644 --- a/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizerBase.cxx +++ b/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizerBase.cxx @@ -62,7 +62,7 @@ ParticleSwarmOptimizerBase::SetInitialSwarm(const SwarmType & initialSwarm) this->m_Particles.clear(); if (!initialSwarm.empty()) { - const auto initialSwarm_END = initialSwarm.end(); + const auto initialSwarm_END = initialSwarm.end(); const unsigned int n = initialSwarm[0].m_CurrentParameters.GetSize(); // check that the dimensions of the swarm data are consistent for (auto it = initialSwarm.begin(); it != initialSwarm_END; ++it) @@ -102,7 +102,7 @@ ParticleSwarmOptimizerBase::SetParameterBounds(ParameterBoundsType & bounds) void ParticleSwarmOptimizerBase::SetParameterBounds(std::pair & bounds, - unsigned int n) + unsigned int n) { this->m_ParameterBounds.clear(); this->m_ParameterBounds.insert(m_ParameterBounds.begin(), n, bounds); @@ -119,7 +119,7 @@ ParticleSwarmOptimizerBase::GetParameterBounds() const void ParticleSwarmOptimizerBase::SetParametersConvergenceTolerance(ParametersType::ValueType convergenceTolerance, - unsigned int sz) + unsigned int sz) { this->m_ParametersConvergenceTolerance.SetSize(sz); this->m_ParametersConvergenceTolerance.Fill(convergenceTolerance); @@ -210,9 +210,9 @@ ParticleSwarmOptimizerBase::PrintParamtersType(const ParametersType & x, std::os void ParticleSwarmOptimizerBase::StartOptimization() { - bool converged = false; + bool converged = false; const unsigned int bestValueMemorySize = this->m_NumberOfGenerationsWithMinimalImprovement + 1; - auto percentileIndex = + auto percentileIndex = static_cast(this->m_PercentageParticlesConverged * (this->m_NumberOfParticles - 1) + 0.5); ValidateSettings(); @@ -415,9 +415,9 @@ ParticleSwarmOptimizerBase::Initialize() void ParticleSwarmOptimizerBase::RandomInitialization() { - const unsigned int n = GetInitialPosition().Size(); - ParameterBoundsType parameterBounds(this->m_ParameterBounds); - ParametersType mean = GetInitialPosition(); + const unsigned int n = GetInitialPosition().Size(); + ParameterBoundsType parameterBounds(this->m_ParameterBounds); + ParametersType mean = GetInitialPosition(); const itk::Statistics::MersenneTwisterRandomVariateGenerator::Pointer randomGenerator = Statistics::MersenneTwisterRandomVariateGenerator::GetInstance(); diff --git a/Modules/Numerics/Optimizers/src/itkPowellOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkPowellOptimizer.cxx index 7420d5a5074..273934c509d 100644 --- a/Modules/Numerics/Optimizers/src/itkPowellOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkPowellOptimizer.cxx @@ -160,12 +160,12 @@ PowellOptimizer::LineBracket(double * x1, double * x2, double * x3, double * f1, } void -PowellOptimizer::LineBracket(double * x1, - double * x2, - double * x3, - double * f1, - double * f2, - double * f3, +PowellOptimizer::LineBracket(double * x1, + double * x2, + double * x3, + double * f1, + double * f2, + double * f3, ParametersType & tempCoord) { // @@ -213,12 +213,12 @@ PowellOptimizer::LineBracket(double * x1, } void -PowellOptimizer::BracketedLineOptimize(double ax, - double bx, - double cx, - double fa, - double functionValueOfb, - double fc, +PowellOptimizer::BracketedLineOptimize(double ax, + double bx, + double cx, + double fa, + double functionValueOfb, + double fc, double * extX, double * extVal) { @@ -228,14 +228,14 @@ PowellOptimizer::BracketedLineOptimize(double ax, } void -PowellOptimizer::BracketedLineOptimize(double ax, - double bx, - double cx, - double itkNotUsed(fa), - double functionValueOfb, - double itkNotUsed(fc), - double * extX, - double * extVal, +PowellOptimizer::BracketedLineOptimize(double ax, + double bx, + double cx, + double itkNotUsed(fa), + double functionValueOfb, + double itkNotUsed(fc), + double * extX, + double * extVal, ParametersType & tempCoord) { double v = 0.0; @@ -430,7 +430,7 @@ PowellOptimizer::StartOptimization() { const double fp = fx; unsigned int ibig = 0; - double del = 0.0; + double del = 0.0; for (unsigned int i = 0; i < m_SpaceDimension; ++i) { diff --git a/Modules/Numerics/Optimizers/src/itkQuaternionRigidTransformGradientDescentOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkQuaternionRigidTransformGradientDescentOptimizer.cxx index ee341022f63..c53c8af1498 100644 --- a/Modules/Numerics/Optimizers/src/itkQuaternionRigidTransformGradientDescentOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkQuaternionRigidTransformGradientDescentOptimizer.cxx @@ -27,7 +27,7 @@ namespace itk void QuaternionRigidTransformGradientDescentOptimizer::AdvanceOneStep() { - const double direction = (m_Maximize) ? 1.0 : -1.0; + const double direction = (m_Maximize) ? 1.0 : -1.0; const ScalesType & scales = this->GetScales(); const unsigned int spaceDimension = m_CostFunction->GetNumberOfParameters(); diff --git a/Modules/Numerics/Optimizers/src/itkRegularStepGradientDescentBaseOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkRegularStepGradientDescentBaseOptimizer.cxx index 27203497fd3..9e33ff23978 100644 --- a/Modules/Numerics/Optimizers/src/itkRegularStepGradientDescentBaseOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkRegularStepGradientDescentBaseOptimizer.cxx @@ -146,8 +146,8 @@ RegularStepGradientDescentBaseOptimizer::AdvanceOneStep() const unsigned int spaceDimension = m_CostFunction->GetNumberOfParameters(); - DerivativeType transformedGradient(spaceDimension); - DerivativeType previousTransformedGradient(spaceDimension); + DerivativeType transformedGradient(spaceDimension); + DerivativeType previousTransformedGradient(spaceDimension); const ScalesType & scales = this->GetScales(); if (m_RelaxationFactor < 0.0) diff --git a/Modules/Numerics/Optimizers/src/itkSPSAOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkSPSAOptimizer.cxx index 038528e5f0b..be2b76ae28a 100644 --- a/Modules/Numerics/Optimizers/src/itkSPSAOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkSPSAOptimizer.cxx @@ -189,7 +189,7 @@ SPSAOptimizer::AdvanceOneStep() const unsigned int spaceDimension = m_CostFunction->GetNumberOfParameters(); // Instantiate the newPosition vector and get the current parameters - ParametersType newPosition(spaceDimension); + ParametersType newPosition(spaceDimension); const ParametersType & currentPosition = this->GetCurrentPosition(); // Compute the gradient as an average of q estimates, where diff --git a/Modules/Numerics/Optimizers/src/itkSingleValuedCostFunction.cxx b/Modules/Numerics/Optimizers/src/itkSingleValuedCostFunction.cxx index 20a7bb27150..103b716c5a9 100644 --- a/Modules/Numerics/Optimizers/src/itkSingleValuedCostFunction.cxx +++ b/Modules/Numerics/Optimizers/src/itkSingleValuedCostFunction.cxx @@ -21,8 +21,8 @@ namespace itk { void SingleValuedCostFunction::GetValueAndDerivative(const ParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const + MeasureType & value, + DerivativeType & derivative) const { value = this->GetValue(parameters); this->GetDerivative(parameters, derivative); diff --git a/Modules/Numerics/Optimizers/src/itkSingleValuedVnlCostFunctionAdaptor.cxx b/Modules/Numerics/Optimizers/src/itkSingleValuedVnlCostFunctionAdaptor.cxx index 6459468b9b1..4c907b4c722 100644 --- a/Modules/Numerics/Optimizers/src/itkSingleValuedVnlCostFunctionAdaptor.cxx +++ b/Modules/Numerics/Optimizers/src/itkSingleValuedVnlCostFunctionAdaptor.cxx @@ -95,7 +95,7 @@ SingleValuedVnlCostFunctionAdaptor::f(const InternalParametersType & inparameter /** Delegate computation of the gradient to the costfunction. */ void SingleValuedVnlCostFunctionAdaptor::gradf(const InternalParametersType & inparameters, - InternalDerivativeType & gradient) + InternalDerivativeType & gradient) { if (!m_CostFunction) { @@ -131,12 +131,12 @@ SingleValuedVnlCostFunctionAdaptor::gradf(const InternalParametersType & inparam /** Delegate computation of value and gradient to the costfunction. */ void SingleValuedVnlCostFunctionAdaptor::compute(const InternalParametersType & x, - InternalMeasureType * fun, - InternalDerivativeType * g) + InternalMeasureType * fun, + InternalDerivativeType * g) { // delegate the computation to the CostFunction ParametersType parameters(x.size()); - double measure; + double measure; if (m_ScalesInitialized) { @@ -178,7 +178,7 @@ SingleValuedVnlCostFunctionAdaptor::compute(const InternalParametersType & x, /** Convert external derivative measures into internal type */ void -SingleValuedVnlCostFunctionAdaptor::ConvertExternalToInternalGradient(const DerivativeType & input, +SingleValuedVnlCostFunctionAdaptor::ConvertExternalToInternalGradient(const DerivativeType & input, InternalDerivativeType & output) const { const unsigned int size = input.size(); diff --git a/Modules/Numerics/Optimizers/src/itkVersorTransformOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkVersorTransformOptimizer.cxx index d3933724bb5..8d0190f8b15 100644 --- a/Modules/Numerics/Optimizers/src/itkVersorTransformOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkVersorTransformOptimizer.cxx @@ -28,7 +28,7 @@ void VersorTransformOptimizer::StepAlongGradient(double factor, const DerivativeType & transformedGradient) { const ParametersType & currentPosition = this->GetCurrentPosition(); - const unsigned int NumberOfParameters = m_CostFunction->GetNumberOfParameters(); + const unsigned int NumberOfParameters = m_CostFunction->GetNumberOfParameters(); // The parameters are assumed to be the right part of the versor and the // components of the translation vector. diff --git a/Modules/Numerics/Optimizers/test/itkAmoebaOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkAmoebaOptimizerTest.cxx index 771d09ede06..c967e265076 100644 --- a/Modules/Numerics/Optimizers/test/itkAmoebaOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkAmoebaOptimizerTest.cxx @@ -91,7 +91,7 @@ class amoebaTestF1 : public itk::SingleValuedCostFunction v[i] = parameters[i]; } const VectorType Av = m_A * v; - double val = (inner_product(Av, v)) / 2.0; + double val = (inner_product(Av, v)) / 2.0; val -= inner_product(m_B, v); if (m_Negate) { @@ -142,7 +142,7 @@ class amoebaTestF1 : public itk::SingleValuedCostFunction private: MatrixType m_A; VectorType m_B; - bool m_Negate; + bool m_Negate; }; @@ -362,7 +362,7 @@ AmoebaTest1() OptimizerType::ParametersType finalPosition = itkOptimizer->GetCurrentPosition(); constexpr double trueParameters[2] = { 2, -2 }; - bool pass = true; + bool pass = true; std::cout << "Right answer = " << trueParameters[0] << " , " << trueParameters[1] << std::endl; std::cout << "Final position = " << finalPosition << std::endl; @@ -533,7 +533,7 @@ AmoebaTest2() // we should have converged to the local minimum, -2 { OptimizerType::ParametersType finalParameters = itkOptimizer->GetCurrentPosition(); - constexpr double knownParameters = -2.0; + constexpr double knownParameters = -2.0; std::cout << "Standard Amoeba:\n"; std::cout << "Known parameters = " << knownParameters << " "; std::cout << "Estimated parameters = " << finalParameters << std::endl; @@ -566,7 +566,7 @@ AmoebaTest2() { // we should have converged to the global minimum, 2 OptimizerType::ParametersType finalParameters = itkOptimizer->GetCurrentPosition(); - constexpr double knownParameters = 2.0; + constexpr double knownParameters = 2.0; std::cout << "Amoeba with restarts:\n"; std::cout << "Known parameters = " << knownParameters << " "; std::cout << "Estimated parameters = " << finalParameters << std::endl; diff --git a/Modules/Numerics/Optimizers/test/itkConjugateGradientOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkConjugateGradientOptimizerTest.cxx index 0fcb16cf8e4..92bb2ce15f2 100644 --- a/Modules/Numerics/Optimizers/test/itkConjugateGradientOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkConjugateGradientOptimizerTest.cxx @@ -180,7 +180,7 @@ itkConjugateGradientOptimizerTest(int, char *[]) constexpr double G_Tolerance = 1e-4; // Gradient magnitude tolerance constexpr double X_Tolerance = 1e-8; // Search space tolerance constexpr double Epsilon_Function = 1e-10; // Step - constexpr int Max_Iterations = 100; // Maximum number of iterations + constexpr int Max_Iterations = 100; // Maximum number of iterations vnlOptimizer->set_f_tolerance(F_Tolerance); vnlOptimizer->set_g_tolerance(G_Tolerance); @@ -240,7 +240,7 @@ itkConjugateGradientOptimizerTest(int, char *[]) std::cout << finalPosition[0] << ','; std::cout << finalPosition[1] << ')' << std::endl; - bool pass = true; + bool pass = true; constexpr double trueParameters[2] = { 2, -2 }; for (unsigned int j = 0; j < 2; ++j) { diff --git a/Modules/Numerics/Optimizers/test/itkCumulativeGaussianOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkCumulativeGaussianOptimizerTest.cxx index 351043bc96d..26abda3d2c2 100644 --- a/Modules/Numerics/Optimizers/test/itkCumulativeGaussianOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkCumulativeGaussianOptimizerTest.cxx @@ -38,7 +38,7 @@ itkCumulativeGaussianOptimizerTest(int, char *[]) // Ranges from 0 to N-1, where N is numberOfSamples. constexpr double standardDeviation = 2; // Standard deviation of the Cumulative Gaussian. constexpr double lowerAsymptote = -10; // Lower asymptotic value of the Cumulative Gaussian. - constexpr int numberOfSamples = 9; // Number of data samples. + constexpr int numberOfSamples = 9; // Number of data samples. constexpr double upperAsymptote = 10; // Upper asymptotic value of the Cumulative Gaussian. constexpr double differenceTolerance = 1e-20; // Tolerance allowed for the difference between Gaussian iterations. diff --git a/Modules/Numerics/Optimizers/test/itkExhaustiveOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkExhaustiveOptimizerTest.cxx index 4045fd670b2..b4f9d54e24a 100644 --- a/Modules/Numerics/Optimizers/test/itkExhaustiveOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkExhaustiveOptimizerTest.cxx @@ -231,7 +231,7 @@ itkExhaustiveOptimizerTest(int, char *[]) std::cout << finalPosition[0] << ','; std::cout << finalPosition[1] << ')' << std::endl; - bool visitedIndicesPass = true; + bool visitedIndicesPass = true; std::vector visitedIndices = idxObserver->m_VisitedIndices; const size_t requiredNumberOfSteps = (2 * steps[0] + 1) * (2 * steps[1] + 1); @@ -255,7 +255,7 @@ itkExhaustiveOptimizerTest(int, char *[]) // // check results to see if it is within range // - bool trueParamsPass = true; + bool trueParamsPass = true; constexpr double trueParameters[2] = { 2, -2 }; for (unsigned int j = 0; j < 2; ++j) { diff --git a/Modules/Numerics/Optimizers/test/itkFRPROptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkFRPROptimizerTest.cxx index 15cc35a67ba..372c64bb61c 100644 --- a/Modules/Numerics/Optimizers/test/itkFRPROptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkFRPROptimizerTest.cxx @@ -171,7 +171,7 @@ itkFRPROptimizerTest(int, char *[]) // // check results to see if it is within range // - bool pass = true; + bool pass = true; constexpr double trueParameters[2] = { 2, -2 }; for (unsigned int j = 0; j < 2; ++j) { @@ -226,7 +226,7 @@ itkFRPROptimizerTest(int, char *[]) // // check results to see if it is within range // - bool pass = true; + bool pass = true; constexpr double trueParameters[2] = { 2, -2 }; for (unsigned int j = 0; j < 2; ++j) { diff --git a/Modules/Numerics/Optimizers/test/itkGradientDescentOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkGradientDescentOptimizerTest.cxx index 6d8bf431e74..badc50f0884 100644 --- a/Modules/Numerics/Optimizers/test/itkGradientDescentOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkGradientDescentOptimizerTest.cxx @@ -179,7 +179,7 @@ itkGradientDescentOptimizerTest(int, char *[]) // // check results to see if it is within range // - bool pass = true; + bool pass = true; constexpr double trueParameters[2] = { 2, -2 }; for (unsigned int j = 0; j < 2; ++j) { diff --git a/Modules/Numerics/Optimizers/test/itkInitializationBiasedParticleSwarmOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkInitializationBiasedParticleSwarmOptimizerTest.cxx index 8e159ceea5b..ae0076fd040 100644 --- a/Modules/Numerics/Optimizers/test/itkInitializationBiasedParticleSwarmOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkInitializationBiasedParticleSwarmOptimizerTest.cxx @@ -89,9 +89,9 @@ itkInitializationBiasedParticleSwarmOptimizerTest(int argc, char * argv[]) auto globalCoefficient = static_cast(std::stod(argv[3])); auto initializationCoefficient = static_cast(std::stod(argv[4])); - unsigned int success1{ 0 }; - unsigned int success2{ 0 }; - unsigned int success3{ 0 }; + unsigned int success1{ 0 }; + unsigned int success2{ 0 }; + unsigned int success3{ 0 }; constexpr unsigned int allIterations = 10; for (unsigned int i = 0; i < allIterations; ++i) { @@ -164,10 +164,10 @@ IBPSOTest1(typename OptimizerType::CoefficientType inertiaCoefficient, // set optimizer parameters OptimizerType::ParameterBoundsType bounds; bounds.push_back(std::make_pair(-10, 10)); - constexpr unsigned int numberOfParticles = 10; - constexpr unsigned int maxIterations = 200; - constexpr double xTolerance = 0.1; - constexpr double fTolerance = 0.001; + constexpr unsigned int numberOfParticles = 10; + constexpr unsigned int maxIterations = 200; + constexpr double xTolerance = 0.1; + constexpr double fTolerance = 0.001; OptimizerType::ParametersType initialParameters(1); itkOptimizer->SetParameterBounds(bounds); @@ -291,10 +291,10 @@ IBPSOTest2(typename OptimizerType::CoefficientType inertiaCoefficient, OptimizerType::ParameterBoundsType bounds; bounds.push_back(std::make_pair(-10, 10)); bounds.push_back(std::make_pair(-10, 10)); - constexpr unsigned int numberOfParticles = 10; - constexpr unsigned int maxIterations = 200; - constexpr double xTolerance = 0.1; - constexpr double fTolerance = 0.001; + constexpr unsigned int numberOfParticles = 10; + constexpr unsigned int maxIterations = 200; + constexpr double xTolerance = 0.1; + constexpr double fTolerance = 0.001; OptimizerType::ParametersType initialParameters(2); itkOptimizer->SetParameterBounds(bounds); @@ -390,10 +390,10 @@ IBPSOTest3(typename OptimizerType::CoefficientType inertiaCoefficient, OptimizerType::ParameterBoundsType bounds; bounds.push_back(std::make_pair(-100, 100)); bounds.push_back(std::make_pair(-100, 100)); - constexpr unsigned int numberOfParticles = 100; - constexpr unsigned int maxIterations = 1000; - constexpr double xTolerance = 0.1; - constexpr double fTolerance = 0.01; + constexpr unsigned int numberOfParticles = 100; + constexpr unsigned int maxIterations = 1000; + constexpr double xTolerance = 0.1; + constexpr double fTolerance = 0.01; OptimizerType::ParametersType initialParameters(2); itkOptimizer->SetParameterBounds(bounds); diff --git a/Modules/Numerics/Optimizers/test/itkLBFGSBOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkLBFGSBOptimizerTest.cxx index f509b06228a..4ddf3ceab38 100644 --- a/Modules/Numerics/Optimizers/test/itkLBFGSBOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkLBFGSBOptimizerTest.cxx @@ -198,7 +198,7 @@ itkLBFGSBOptimizerTest(int, char *[]) constexpr double F_Convergence_Factor = 1e+7; // Function value tolerance constexpr double Projected_G_Tolerance = 1e-5; // Proj gradient tolerance - constexpr int Max_Iterations = 100; // Maximum number of iterations + constexpr int Max_Iterations = 100; // Maximum number of iterations itkOptimizer->SetCostFunctionConvergenceFactor(F_Convergence_Factor); ITK_TEST_SET_GET_VALUE(F_Convergence_Factor, itkOptimizer->GetCostFunctionConvergenceFactor()); @@ -218,7 +218,7 @@ itkLBFGSBOptimizerTest(int, char *[]) ITK_TEST_EXPECT_TRUE(!itkOptimizer->CanUseScales()); - constexpr unsigned int SpaceDimension = 2; + constexpr unsigned int SpaceDimension = 2; OptimizerType::ParametersType initialValue(SpaceDimension); // Starting point @@ -232,8 +232,8 @@ itkLBFGSBOptimizerTest(int, char *[]) itkOptimizer->SetInitialPosition(currentValue); // Set up boundary conditions - OptimizerType::BoundValueType lower(SpaceDimension); - OptimizerType::BoundValueType upper(SpaceDimension); + OptimizerType::BoundValueType lower(SpaceDimension); + OptimizerType::BoundValueType upper(SpaceDimension); OptimizerType::BoundSelectionType select(SpaceDimension); lower.Fill(-1); @@ -296,7 +296,7 @@ itkLBFGSBOptimizerTest(int, char *[]) // // check results to see if it is within range // - bool pass = true; + bool pass = true; std::string errorIn; constexpr double trueParameters[2] = { 4.0 / 3.0, -1.0 }; diff --git a/Modules/Numerics/Optimizers/test/itkLBFGSOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkLBFGSOptimizerTest.cxx index 513aeaf81a4..61881d0f8dc 100644 --- a/Modules/Numerics/Optimizers/test/itkLBFGSOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkLBFGSOptimizerTest.cxx @@ -158,7 +158,7 @@ itkLBFGSOptimizerTest(int, char *[]) vnlOptimizer->set_check_derivatives(0); - constexpr unsigned int SpaceDimension = 2; + constexpr unsigned int SpaceDimension = 2; OptimizerType::ParametersType initialValue(SpaceDimension); // We start not so far from | 2 -2 | @@ -218,7 +218,7 @@ itkLBFGSOptimizerTest(int, char *[]) // // check results to see if it is within range // - bool pass = true; + bool pass = true; constexpr double trueParameters[2] = { 2, -2 }; for (unsigned int j = 0; j < 2; ++j) { diff --git a/Modules/Numerics/Optimizers/test/itkLevenbergMarquardtOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkLevenbergMarquardtOptimizerTest.cxx index 59a14e8ed0c..66c431d1d51 100644 --- a/Modules/Numerics/Optimizers/test/itkLevenbergMarquardtOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkLevenbergMarquardtOptimizerTest.cxx @@ -117,7 +117,7 @@ class LMCostFunction : public itk::MultipleValuedCostFunction for (int x = -XRange; x <= XRange; ++x) { const auto xd = static_cast(x); - double value = a * xd + b * yd + c; + double value = a * xd + b * yd + c; value -= m_TheoreticalData[valueindex]; m_Measure[valueindex] = value; valueindex++; @@ -171,9 +171,9 @@ class LMCostFunction : public itk::MultipleValuedCostFunction } private: - mutable MeasureType m_Measure; + mutable MeasureType m_Measure; mutable DerivativeType m_Derivative; - MeasureType m_TheoreticalData; + MeasureType m_TheoreticalData; }; class CommandIterationUpdateLevenbergMarquardt : public itk::Command @@ -222,12 +222,12 @@ class CommandIterationUpdateLevenbergMarquardt : public itk::Command }; int -itkRunLevenbergMarquardOptimization(bool useGradient, +itkRunLevenbergMarquardOptimization(bool useGradient, double fTolerance, double gTolerance, double xTolerance, double epsilonFunction, - int maxIterations) + int maxIterations) { std::cout << "Levenberg Marquardt optimizer test \n \n"; @@ -371,7 +371,7 @@ itkRunLevenbergMarquardOptimization(bool useGradient, // // check results to see if it is within range // - bool pass = true; + bool pass = true; constexpr double trueParameters[3] = { ra, rb, rc }; for (unsigned int j = 0; j < LMCostFunction::SpaceDimension; ++j) { @@ -417,7 +417,7 @@ itkLevenbergMarquardtOptimizerTest(int argc, char * argv[]) double G_Tolerance = 1e-2; // Gradient magnitude tolerance double X_Tolerance = 1e-5; // Search space tolerance double Epsilon_Function = 1e-9; // Step - int Max_Iterations = 200; // Maximum number of iterations + int Max_Iterations = 200; // Maximum number of iterations if (argc > 1) { @@ -454,7 +454,7 @@ itkLevenbergMarquardtOptimizerTest(int argc, char * argv[]) std::cout << std::endl; std::cout << "Running using the Gradient computed by vnl " << std::endl; bool useGradient = false; - int result = itkRunLevenbergMarquardOptimization( + int result = itkRunLevenbergMarquardOptimization( useGradient, F_Tolerance, G_Tolerance, X_Tolerance, Epsilon_Function, Max_Iterations); if (result == EXIT_FAILURE) { diff --git a/Modules/Numerics/Optimizers/test/itkOnePlusOneEvolutionaryOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkOnePlusOneEvolutionaryOptimizerTest.cxx index d06bab4cf2e..5823859112b 100644 --- a/Modules/Numerics/Optimizers/test/itkOnePlusOneEvolutionaryOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkOnePlusOneEvolutionaryOptimizerTest.cxx @@ -233,7 +233,7 @@ itkOnePlusOneEvolutionaryOptimizerTest(int, char *[]) // // check results to see if it is within range // - bool pass = true; + bool pass = true; constexpr double trueParameters[2] = { 2, -2 }; for (unsigned int j = 0; j < 2; ++j) { diff --git a/Modules/Numerics/Optimizers/test/itkOptimizersHierarchyTest.cxx b/Modules/Numerics/Optimizers/test/itkOptimizersHierarchyTest.cxx index 072ae73b0f1..18b2a76c68d 100644 --- a/Modules/Numerics/Optimizers/test/itkOptimizersHierarchyTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkOptimizersHierarchyTest.cxx @@ -47,9 +47,9 @@ itkOptimizersHierarchyTest(int, char *[]) constexpr unsigned int spaceDimension = 10; - OptimizerType::ParametersType initialPosition(spaceDimension); + OptimizerType::ParametersType initialPosition(spaceDimension); const OptimizerType::ParametersType currentPosition(spaceDimension); - OptimizerType::ScalesType parameterScale(spaceDimension); + OptimizerType::ScalesType parameterScale(spaceDimension); parameterScale.Fill(1.5); initialPosition.Fill(2.0); @@ -149,7 +149,7 @@ itkOptimizersHierarchyTest(int, char *[]) // Not used; empty method body; called for coverage purposes const CumulativeGaussianCostFunctionType::ParametersType parameters{}; - CumulativeGaussianCostFunctionType::DerivativeType derivative; + CumulativeGaussianCostFunctionType::DerivativeType derivative; cumGaussCostFunc->GetDerivative(parameters, derivative); diff --git a/Modules/Numerics/Optimizers/test/itkParticleSwarmOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkParticleSwarmOptimizerTest.cxx index bed70b77f80..e2220ffb7e1 100644 --- a/Modules/Numerics/Optimizers/test/itkParticleSwarmOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkParticleSwarmOptimizerTest.cxx @@ -67,10 +67,10 @@ itkParticleSwarmOptimizerTest(int argc, char * argv[]) } constexpr unsigned int allIterations = 10; - constexpr double threshold = 0.8; - unsigned int success1{}; - unsigned int success2{}; - unsigned int success3{}; + constexpr double threshold = 0.8; + unsigned int success1{}; + unsigned int success2{}; + unsigned int success3{}; std::cout << "Particle Swarm Optimizer Test \n \n"; @@ -122,10 +122,10 @@ PSOTest1() // set optimizer parameters OptimizerType::ParameterBoundsType bounds; bounds.push_back(std::make_pair(-10, 10)); - constexpr unsigned int numberOfParticles = 10; - constexpr unsigned int maxIterations = 100; - constexpr double xTolerance = 0.1; - constexpr double fTolerance = 0.001; + constexpr unsigned int numberOfParticles = 10; + constexpr unsigned int maxIterations = 100; + constexpr double xTolerance = 0.1; + constexpr double fTolerance = 0.001; OptimizerType::ParametersType initialParameters(1); @@ -222,10 +222,10 @@ PSOTest2() OptimizerType::ParameterBoundsType bounds; bounds.push_back(std::make_pair(-10, 10)); bounds.push_back(std::make_pair(-10, 10)); - constexpr unsigned int numberOfParticles = 10; - constexpr unsigned int maxIterations = 100; - constexpr double xTolerance = 0.1; - constexpr double fTolerance = 0.001; + constexpr unsigned int numberOfParticles = 10; + constexpr unsigned int maxIterations = 100; + constexpr double xTolerance = 0.1; + constexpr double fTolerance = 0.001; OptimizerType::ParametersType initialParameters(2); itkOptimizer->SetParameterBounds(bounds); @@ -301,10 +301,10 @@ PSOTest3() OptimizerType::ParameterBoundsType bounds; bounds.push_back(std::make_pair(-100, 100)); bounds.push_back(std::make_pair(-100, 100)); - constexpr unsigned int numberOfParticles = 100; - constexpr unsigned int maxIterations = 200; - constexpr double xTolerance = 0.1; - constexpr double fTolerance = 0.01; + constexpr unsigned int numberOfParticles = 100; + constexpr unsigned int maxIterations = 200; + constexpr double xTolerance = 0.1; + constexpr double fTolerance = 0.01; OptimizerType::ParametersType initialParameters(2); // Exercise Get/Set methods diff --git a/Modules/Numerics/Optimizers/test/itkParticleSwarmOptimizerTestFunctions.h b/Modules/Numerics/Optimizers/test/itkParticleSwarmOptimizerTestFunctions.h index 8b584f302e5..b6f3bf688d8 100644 --- a/Modules/Numerics/Optimizers/test/itkParticleSwarmOptimizerTestFunctions.h +++ b/Modules/Numerics/Optimizers/test/itkParticleSwarmOptimizerTestFunctions.h @@ -234,7 +234,7 @@ class CommandIterationUpdateParticleSwarm : public Command private: unsigned long m_IterationNumber{}; - bool m_PrintOptimizer{}; + bool m_PrintOptimizer{}; }; } // namespace itk diff --git a/Modules/Numerics/Optimizers/test/itkPowellOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkPowellOptimizerTest.cxx index 6b475a13178..cdc5c3d85be 100644 --- a/Modules/Numerics/Optimizers/test/itkPowellOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkPowellOptimizerTest.cxx @@ -183,7 +183,7 @@ itkPowellOptimizerTest(int argc, char * argv[]) // // check results to see if it is within range // - bool pass = true; + bool pass = true; constexpr double trueParameters[2] = { 2, -2 }; for (unsigned int j = 0; j < 2; ++j) { diff --git a/Modules/Numerics/Optimizers/test/itkRegularStepGradientDescentOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkRegularStepGradientDescentOptimizerTest.cxx index b8c74c04762..131f10043f1 100644 --- a/Modules/Numerics/Optimizers/test/itkRegularStepGradientDescentOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkRegularStepGradientDescentOptimizerTest.cxx @@ -173,7 +173,7 @@ itkRegularStepGradientDescentOptimizerTest(int, char *[]) std::cout << finalPosition[1] << ')' << std::endl; // Check results to see if it is within range - bool pass = true; + bool pass = true; constexpr double trueParameters[2] = { 2, -2 }; for (unsigned int j = 0; j < 2; ++j) { diff --git a/Modules/Numerics/Optimizers/test/itkSPSAOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkSPSAOptimizerTest.cxx index a2e9bde0e47..346e7ce566d 100644 --- a/Modules/Numerics/Optimizers/test/itkSPSAOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkSPSAOptimizerTest.cxx @@ -225,7 +225,7 @@ itkSPSAOptimizerTest(int, char *[]) // // check results to see if it is within range // - bool pass = true; + bool pass = true; constexpr double trueParameters[2] = { 2, -2 }; for (unsigned int j = 0; j < 2; ++j) { diff --git a/Modules/Numerics/Optimizers/test/itkVersorRigid3DTransformOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkVersorRigid3DTransformOptimizerTest.cxx index 266a2470fed..31d75d7e9ba 100644 --- a/Modules/Numerics/Optimizers/test/itkVersorRigid3DTransformOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkVersorRigid3DTransformOptimizerTest.cxx @@ -85,7 +85,7 @@ class versorRigid3DCostFunction : public itk::SingleValuedCostFunction m_Q1[1] = 10.0; m_Q1[2] = 0.0; - VersorType versor; + VersorType versor; const double angle = 10.0 * std::atan(1.0) / 45.0; versor.SetRotationAroundX(angle); @@ -265,7 +265,7 @@ itkVersorRigid3DTransformOptimizerTest(int, char *[]) initialPosition[4] = 0.0; initialPosition[5] = 0.0; - ScalesType parametersScale(parametersDimensions); + ScalesType parametersScale(parametersDimensions); constexpr double translationScaleFactor = 50.0; parametersScale[0] = 1.0; parametersScale[1] = 1.0; @@ -304,7 +304,7 @@ itkVersorRigid3DTransformOptimizerTest(int, char *[]) constexpr unsigned int spaceDimensions = 3; - VersorType finalRotation; + VersorType finalRotation; VersorType::VectorType finalRightPart; for (unsigned int i = 0; i < spaceDimensions; ++i) { @@ -333,7 +333,7 @@ itkVersorRigid3DTransformOptimizerTest(int, char *[]) trueAxis[1] = 0.0f; trueAxis[2] = 0.0f; const VersorType::ValueType trueAngle = 10.0 * std::atan(1.0f) / 45.0; - VersorType trueRotation; + VersorType trueRotation; trueRotation.Set(trueAxis, trueAngle); ParametersType trueParameters(parametersDimensions); @@ -348,7 +348,7 @@ itkVersorRigid3DTransformOptimizerTest(int, char *[]) std::cout << "Final parameters = " << finalPosition << std::endl; std::cout << "True Parameters = " << trueParameters << std::endl; - const VersorType ratio = finalRotation * trueRotation.GetReciprocal(); + const VersorType ratio = finalRotation * trueRotation.GetReciprocal(); const VersorType::ValueType cosHalfAngle = ratio.GetW(); const VersorType::ValueType cosHalfAngleSquare = cosHalfAngle * cosHalfAngle; if (cosHalfAngleSquare < 0.95) diff --git a/Modules/Numerics/Optimizers/test/itkVersorTransformOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkVersorTransformOptimizerTest.cxx index 8abd5516c1f..abd73bf850f 100644 --- a/Modules/Numerics/Optimizers/test/itkVersorTransformOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkVersorTransformOptimizerTest.cxx @@ -249,7 +249,7 @@ itkVersorTransformOptimizerTest(int, char *[]) ParametersType finalPosition(spaceDimensions); finalPosition = itkOptimizer->GetCurrentPosition(); - VersorType finalRotation; + VersorType finalRotation; VersorType::VectorType finalRightPart; for (unsigned int i = 0; i < spaceDimensions; ++i) { @@ -270,7 +270,7 @@ itkVersorTransformOptimizerTest(int, char *[]) trueAxis[1] = 0.0f; trueAxis[2] = 0.0f; const VersorType::ValueType trueAngle = 2.0 * std::atan(1.0f); - VersorType trueRotation; + VersorType trueRotation; trueRotation.Set(trueAxis, trueAngle); ParametersType trueParameters(spaceDimensions); @@ -280,7 +280,7 @@ itkVersorTransformOptimizerTest(int, char *[]) std::cout << "True Parameters = " << trueParameters << std::endl; - const VersorType ratio = finalRotation * trueRotation.GetReciprocal(); + const VersorType ratio = finalRotation * trueRotation.GetReciprocal(); const VersorType::ValueType cosHalfAngle = ratio.GetW(); const VersorType::ValueType cosHalfAngleSquare = cosHalfAngle * cosHalfAngle; if (cosHalfAngleSquare < 0.95) diff --git a/Modules/Numerics/Optimizersv4/include/itkAmoebaOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkAmoebaOptimizerv4.h index 26c46ec8a2d..5b31705acaa 100644 --- a/Modules/Numerics/Optimizersv4/include/itkAmoebaOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkAmoebaOptimizerv4.h @@ -154,11 +154,11 @@ class ITKOptimizersv4_EXPORT AmoebaOptimizerv4 : public SingleValuedNonLinearVnl void ValidateSettings(); - ParametersType::ValueType m_ParametersConvergenceTolerance{}; - MeasureType m_FunctionConvergenceTolerance{}; - bool m_AutomaticInitialSimplex{}; - ParametersType m_InitialSimplexDelta{}; - bool m_OptimizeWithRestarts{}; + ParametersType::ValueType m_ParametersConvergenceTolerance{}; + MeasureType m_FunctionConvergenceTolerance{}; + bool m_AutomaticInitialSimplex{}; + ParametersType m_InitialSimplexDelta{}; + bool m_OptimizeWithRestarts{}; std::unique_ptr m_VnlOptimizer; std::ostringstream m_StopConditionDescription{}; diff --git a/Modules/Numerics/Optimizersv4/include/itkConjugateGradientLineSearchOptimizerv4.hxx b/Modules/Numerics/Optimizersv4/include/itkConjugateGradientLineSearchOptimizerv4.hxx index 43fbb7605fa..5f983d2414d 100644 --- a/Modules/Numerics/Optimizersv4/include/itkConjugateGradientLineSearchOptimizerv4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkConjugateGradientLineSearchOptimizerv4.hxx @@ -28,7 +28,7 @@ namespace itk template void ConjugateGradientLineSearchOptimizerv4Template::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); } diff --git a/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.h index c5386ee84d0..07887518180 100644 --- a/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.h @@ -167,13 +167,13 @@ class ITK_TEMPLATE_EXPORT ExhaustiveOptimizerv4 protected: ParametersType m_InitialPosition{}; - MeasureType m_CurrentValue{ 0 }; - StepsType m_NumberOfSteps{ 0 }; - bool m_Stop{ false }; - double m_StepLength{ 1.0 }; + MeasureType m_CurrentValue{ 0 }; + StepsType m_NumberOfSteps{ 0 }; + bool m_Stop{ false }; + double m_StepLength{ 1.0 }; ParametersType m_CurrentIndex{ 0 }; - MeasureType m_MaximumMetricValue{ 0.0 }; - MeasureType m_MinimumMetricValue{ 0.0 }; + MeasureType m_MaximumMetricValue{ 0.0 }; + MeasureType m_MinimumMetricValue{ 0.0 }; ParametersType m_MinimumMetricValuePosition{}; ParametersType m_MaximumMetricValuePosition{}; diff --git a/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.hxx b/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.hxx index 0bdfdbb302c..bfc6962ce04 100644 --- a/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.hxx @@ -168,7 +168,7 @@ template void ExhaustiveOptimizerv4::IncrementIndex(ParametersType & newPosition) { - unsigned int idx = 0; + unsigned int idx = 0; const unsigned int spaceDimension = this->m_Metric->GetParameters().GetSize(); while (idx < spaceDimension) diff --git a/Modules/Numerics/Optimizersv4/include/itkGradientDescentLineSearchOptimizerv4.hxx b/Modules/Numerics/Optimizersv4/include/itkGradientDescentLineSearchOptimizerv4.hxx index 3e5ce0cacd0..e1bbe2af57c 100644 --- a/Modules/Numerics/Optimizersv4/include/itkGradientDescentLineSearchOptimizerv4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkGradientDescentLineSearchOptimizerv4.hxx @@ -39,7 +39,7 @@ GradientDescentLineSearchOptimizerv4Template< template void GradientDescentLineSearchOptimizerv4Template::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -140,8 +140,8 @@ GradientDescentLineSearchOptimizerv4Template::Gol // scope before we call recursively below. With dense transforms // we would otherwise eat up a lot of memory unnecessarily. TInternalComputationValueType baseLearningRate = this->m_LearningRate; - const DerivativeType baseGradient(this->m_Gradient); - ParametersType baseParameters(this->GetCurrentPosition()); + const DerivativeType baseGradient(this->m_Gradient); + ParametersType baseParameters(this->GetCurrentPosition()); this->m_LearningRate = x; this->ModifyGradientByLearningRate(); diff --git a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.h b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.h index ce9a486d39a..d91760bf860 100644 --- a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.h +++ b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.h @@ -201,9 +201,9 @@ class ITK_TEMPLATE_EXPORT GradientDescentOptimizerBasev4Template typename DomainThreader::Pointer m_ModifyGradientByLearningRateThreader{}; /* Common variables for optimization control and reporting */ - bool m_Stop{ false }; + bool m_Stop{ false }; StopConditionObjectToObjectOptimizerEnum m_StopCondition{}; - StopConditionDescriptionType m_StopConditionDescription{}; + StopConditionDescriptionType m_StopConditionDescription{}; /** Current gradient */ DerivativeType m_Gradient{}; diff --git a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader.hxx b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader.hxx index fe46380a811..dce7adf1665 100644 --- a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader.hxx @@ -25,7 +25,7 @@ template void GradientDescentOptimizerBasev4ModifyGradientByLearningRateThreaderTemplate< TInternalComputationValueType>::ThreadedExecution(const IndexRangeType & subrange, - const ThreadIdType itkNotUsed(threadId)) + const ThreadIdType itkNotUsed(threadId)) { this->m_Associate->ModifyGradientByLearningRateOverSubRange(subrange); } diff --git a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4ModifyGradientByScalesThreader.hxx b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4ModifyGradientByScalesThreader.hxx index dc4e07aa9f6..c281cb5c08c 100644 --- a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4ModifyGradientByScalesThreader.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4ModifyGradientByScalesThreader.hxx @@ -25,7 +25,7 @@ template void GradientDescentOptimizerBasev4ModifyGradientByScalesThreaderTemplate::ThreadedExecution( const IndexRangeType & subrange, - const ThreadIdType itkNotUsed(threadId)) + const ThreadIdType itkNotUsed(threadId)) { this->m_Associate->ModifyGradientByScalesOverSubRange(subrange); } diff --git a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerv4.h index 0738f530958..00f07d0984e 100644 --- a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerv4.h @@ -230,7 +230,7 @@ class ITK_TEMPLATE_EXPORT GradientDescentOptimizerv4Template TInternalComputationValueType m_ConvergenceValue{}; /** Store the best value and related parameters. */ - MeasureType m_CurrentBestValue{}; + MeasureType m_CurrentBestValue{}; ParametersType m_BestParameters{}; bool m_ReturnBestParametersAndValue{ false }; diff --git a/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.h index a750548d730..66b4200eddb 100644 --- a/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.h @@ -81,7 +81,7 @@ class LBFGS2Optimizerv4Enums }; // Define how to print enumeration extern ITKOptimizersv4_EXPORT std::ostream & - operator<<(std::ostream & out, LBFGS2Optimizerv4Enums::LineSearchMethod value); +operator<<(std::ostream & out, LBFGS2Optimizerv4Enums::LineSearchMethod value); /** * \class LBFGS2Optimizerv4Template @@ -470,36 +470,36 @@ class ITK_TEMPLATE_EXPORT LBFGS2Optimizerv4Template /** Progress callback from libLBFGS forwards it to the specific instance */ static int - UpdateProgressCallback(void * instance, + UpdateProgressCallback(void * instance, const PrecisionType * x, const PrecisionType * g, - const PrecisionType fx, - const PrecisionType xnorm, - const PrecisionType gnorm, - const PrecisionType step, - int n, - int k, - int ls); + const PrecisionType fx, + const PrecisionType xnorm, + const PrecisionType gnorm, + const PrecisionType step, + int n, + int k, + int ls); /** Update the progress as reported from libLBFSG and notify itkObject */ int UpdateProgress(const PrecisionType * x, const PrecisionType * g, - const PrecisionType fx, - const PrecisionType xnorm, - const PrecisionType gnorm, - const PrecisionType step, - int n, - int k, - int ls); + const PrecisionType fx, + const PrecisionType xnorm, + const PrecisionType gnorm, + const PrecisionType step, + int n, + int k, + int ls); //** Function evaluation callback from libLBFGS forward to instance */ static PrecisionType - EvaluateCostCallback(void * instance, + EvaluateCostCallback(void * instance, const PrecisionType * x, - PrecisionType * g, - const int n, - const PrecisionType step); + PrecisionType * g, + const int n, + const PrecisionType step); PrecisionType EvaluateCost(const PrecisionType * x, PrecisionType * g, const int n, const PrecisionType step); @@ -509,12 +509,12 @@ class ITK_TEMPLATE_EXPORT LBFGS2Optimizerv4Template class PrivateImplementationHolder; lbfgs_parameter_t m_Parameters{}; - bool m_EstimateScalesAtEachIteration{}; + bool m_EstimateScalesAtEachIteration{}; double m_CurrentStepSize{}; double m_CurrentParameterNorm{}; double m_CurrentGradientNorm{}; - int m_CurrentNumberOfEvaluations{}; - int m_StatusCode{}; + int m_CurrentNumberOfEvaluations{}; + int m_StatusCode{}; /** * itkGradientDecentOptimizerv4Template specific non supported methods. diff --git a/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.hxx b/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.hxx index a0981e45156..687f49f1c52 100644 --- a/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.hxx @@ -124,11 +124,11 @@ LBFGS2Optimizerv4Template::ResumeOptimization() template auto LBFGS2Optimizerv4Template::EvaluateCostCallback( - void * instance, + void * instance, const LBFGS2Optimizerv4Template::PrecisionType * x, - LBFGS2Optimizerv4Template::PrecisionType * g, - const int n, - const LBFGS2Optimizerv4Template::PrecisionType step) -> PrecisionType + LBFGS2Optimizerv4Template::PrecisionType * g, + const int n, + const LBFGS2Optimizerv4Template::PrecisionType step) -> PrecisionType { auto * optimizer = static_cast(instance); return optimizer->EvaluateCost(x, g, n, step); @@ -137,8 +137,8 @@ template auto LBFGS2Optimizerv4Template::EvaluateCost( const LBFGS2Optimizerv4Template::PrecisionType * x, - LBFGS2Optimizerv4Template::PrecisionType * g, - const int n, + LBFGS2Optimizerv4Template::PrecisionType * g, + const int n, const LBFGS2Optimizerv4Template::PrecisionType) -> PrecisionType { ParametersType xItk(n); @@ -172,16 +172,16 @@ LBFGS2Optimizerv4Template::EvaluateCost( template int LBFGS2Optimizerv4Template::UpdateProgressCallback( - void * instance, + void * instance, const LBFGS2Optimizerv4Template::PrecisionType * x, const LBFGS2Optimizerv4Template::PrecisionType * g, - const LBFGS2Optimizerv4Template::PrecisionType fx, - const LBFGS2Optimizerv4Template::PrecisionType xnorm, - const LBFGS2Optimizerv4Template::PrecisionType gnorm, - const LBFGS2Optimizerv4Template::PrecisionType step, - int n, - int k, - int ls) + const LBFGS2Optimizerv4Template::PrecisionType fx, + const LBFGS2Optimizerv4Template::PrecisionType xnorm, + const LBFGS2Optimizerv4Template::PrecisionType gnorm, + const LBFGS2Optimizerv4Template::PrecisionType step, + int n, + int k, + int ls) { auto * optimizer = static_cast(instance); return optimizer->UpdateProgress(x, g, fx, xnorm, gnorm, step, n, k, ls); @@ -414,7 +414,7 @@ auto LBFGS2Optimizerv4Template::GetLineSearch() const -> LineSearchMethodEnum { LineSearchMethodEnum linesearch = LineSearchMethodEnum::LINESEARCH_DEFAULT; - const int lbfgsLineSearch = m_Parameters.linesearch; + const int lbfgsLineSearch = m_Parameters.linesearch; if (lbfgsLineSearch == LBFGS_LINESEARCH_BACKTRACKING) { linesearch = LineSearchMethodEnum::LINESEARCH_BACKTRACKING; diff --git a/Modules/Numerics/Optimizersv4/include/itkLBFGSBOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkLBFGSBOptimizerv4.h index 297698d69bf..7ec05d1072f 100644 --- a/Modules/Numerics/Optimizersv4/include/itkLBFGSBOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkLBFGSBOptimizerv4.h @@ -193,9 +193,9 @@ class ITKOptimizersv4_EXPORT LBFGSBOptimizerv4 : public LBFGSOptimizerBasev4::UpdateTransformParameters( const DerivativeType & derivative, - TParametersValueType factor) + TParametersValueType factor) { // Rely on transform::UpdateTransformParameters to verify proper // size of derivative. @@ -219,10 +219,10 @@ template void ObjectToObjectMetric::SetVirtualDomain( - const VirtualSpacingType & spacing, - const VirtualOriginType & origin, + const VirtualSpacingType & spacing, + const VirtualOriginType & origin, const VirtualDirectionType & direction, - const VirtualRegionType & region) + const VirtualRegionType & region) { if (this->m_VirtualImage.IsNull() || (this->m_VirtualImage->GetSpacing() != spacing) || (this->m_VirtualImage->GetOrigin() != origin) || (this->m_VirtualImage->GetDirection() != direction) || @@ -319,7 +319,7 @@ template OffsetValueType ObjectToObjectMetric:: - ComputeParameterOffsetFromVirtualPoint(const VirtualPointType & point, + ComputeParameterOffsetFromVirtualPoint(const VirtualPointType & point, const NumberOfParametersType & numberOfLocalParameters) const { if (!this->m_VirtualImage.IsNull()) @@ -343,7 +343,7 @@ template OffsetValueType ObjectToObjectMetric:: - ComputeParameterOffsetFromVirtualIndex(const VirtualIndexType & index, + ComputeParameterOffsetFromVirtualIndex(const VirtualIndexType & index, const NumberOfParametersType & numberOfLocalParameters) const { if (m_VirtualImage) @@ -486,8 +486,8 @@ ObjectToObjectMetricGetDisplacementField(); - const typename FieldType::RegionType fieldRegion = field->GetBufferedRegion(); - const VirtualRegionType virtualRegion = this->GetVirtualRegion(); + const typename FieldType::RegionType fieldRegion = field->GetBufferedRegion(); + const VirtualRegionType virtualRegion = this->GetVirtualRegion(); if (virtualRegion.GetSize() != fieldRegion.GetSize() || virtualRegion.GetIndex() != fieldRegion.GetIndex()) { itkExceptionMacro( @@ -504,7 +504,7 @@ ObjectToObjectMetricGetVirtualSpacing()[0]; + const double coordinateTol = 1.0e-6 * this->GetVirtualSpacing()[0]; constexpr double directionTol = 1.0e-6; if (!this->GetVirtualOrigin().GetVnlVector().is_equal(field->GetOrigin().GetVnlVector(), coordinateTol) || @@ -535,7 +535,7 @@ template bool ObjectToObjectMetric::VerifyNumberOfValidPoints( - MeasureType & value, + MeasureType & value, DerivativeType & derivative) const { if (this->m_NumberOfValidPoints == 0) @@ -559,7 +559,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.h b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.h index b2e86e1d3a7..1c918180566 100644 --- a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.h +++ b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.h @@ -218,7 +218,7 @@ class ITK_TEMPLATE_EXPORT ObjectToObjectMetricBaseTemplate * from GetNumberOfParameters. */ virtual void UpdateTransformParameters(const DerivativeType & derivative, - ParametersValueType factor = NumericTraits::OneValue()) = 0; + ParametersValueType factor = NumericTraits::OneValue()) = 0; /** Get the current metric value stored in m_Value. This is only * meaningful after a call to GetValue() or GetValueAndDerivative(). diff --git a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.h b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.h index cdcb06d9c2f..5ba1181d444 100644 --- a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.h +++ b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.h @@ -54,7 +54,7 @@ class ObjectToObjectOptimizerBaseTemplateEnums using StopConditionObjectToObjectOptimizerEnum = ObjectToObjectOptimizerBaseTemplateEnums::StopConditionObjectToObjectOptimizer; extern ITKOptimizersv4_EXPORT std::ostream & - operator<<(std::ostream & out, +operator<<(std::ostream & out, const ObjectToObjectOptimizerBaseTemplateEnums::StopConditionObjectToObjectOptimizer value); /** @@ -283,9 +283,9 @@ class ITK_TEMPLATE_EXPORT ObjectToObjectOptimizerBaseTemplate : public Object ~ObjectToObjectOptimizerBaseTemplate() override; MetricTypePointer m_Metric{}; - ThreadIdType m_NumberOfWorkUnits{}; - SizeValueType m_CurrentIteration{}; - SizeValueType m_NumberOfIterations{}; + ThreadIdType m_NumberOfWorkUnits{}; + SizeValueType m_CurrentIteration{}; + SizeValueType m_NumberOfIterations{}; /** Metric measure value at a given iteration, as most recently evaluated. */ MeasureType m_CurrentMetricValue{}; diff --git a/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.h index c85e24decd5..04679b01492 100644 --- a/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.h @@ -182,7 +182,7 @@ class ITK_TEMPLATE_EXPORT OnePlusOneEvolutionaryOptimizerv4 /** Maximum iteration limit. */ unsigned int m_MaximumIteration{}; - bool m_CatchGetValueException{}; + bool m_CatchGetValueException{}; double m_MetricWorstPossibleValue{}; /** The minimal size of search radius diff --git a/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.h index 543e4bd7e17..92906c81b54 100644 --- a/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.h @@ -193,24 +193,24 @@ class ITK_TEMPLATE_EXPORT PowellOptimizerv4 : public ObjectToObjectOptimizerBase * terminates based on MaximumIteration, StepTolerance, or ValueTolerance. * Implemented as Brent line optimizers from NRC. */ virtual void - BracketedLineOptimize(double ax, - double bx, - double cx, - double fa, - double functionValueOfb, - double fc, + BracketedLineOptimize(double ax, + double bx, + double cx, + double fa, + double functionValueOfb, + double fc, double * extX, double * extVal); virtual void - BracketedLineOptimize(double ax, - double bx, - double cx, - double fa, - double functionValueOfb, - double fc, - double * extX, - double * extVal, + BracketedLineOptimize(double ax, + double bx, + double cx, + double fa, + double functionValueOfb, + double fc, + double * extX, + double * extVal, ParametersType & tempCoord); itkGetMacro(SpaceDimension, unsigned int); @@ -239,14 +239,14 @@ class ITK_TEMPLATE_EXPORT PowellOptimizerv4 : public ObjectToObjectOptimizerBase unsigned int m_MaximumIteration{ 100 }; unsigned int m_MaximumLineIteration{ 100 }; - bool m_CatchGetValueException{ false }; + bool m_CatchGetValueException{ false }; double m_MetricWorstPossibleValue{ 0 }; /** The minimal size of search */ double m_StepLength{ 0 }; double m_StepTolerance{ 0 }; - ParametersType m_LineOrigin{}; + ParametersType m_LineOrigin{}; vnl_vector m_LineDirection{}; double m_ValueTolerance{ 0 }; diff --git a/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.hxx b/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.hxx index b9331b0abce..6aa4eec3d56 100644 --- a/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.hxx @@ -31,7 +31,7 @@ PowellOptimizerv4::PowellOptimizerv4() template void -PowellOptimizerv4::SetLine(const ParametersType & origin, +PowellOptimizerv4::SetLine(const ParametersType & origin, const vnl_vector & direction) { const ScalesType & scales = this->GetScales(); @@ -153,12 +153,12 @@ PowellOptimizerv4::LineBracket(double * x1, template void -PowellOptimizerv4::LineBracket(double * x1, - double * x2, - double * x3, - double * f1, - double * f2, - double * f3, +PowellOptimizerv4::LineBracket(double * x1, + double * x2, + double * x3, + double * f1, + double * f2, + double * f3, ParametersType & tempCoord) { // @@ -207,12 +207,12 @@ PowellOptimizerv4::LineBracket(double * x template void -PowellOptimizerv4::BracketedLineOptimize(double ax, - double bx, - double cx, - double fa, - double functionValueOfb, - double fc, +PowellOptimizerv4::BracketedLineOptimize(double ax, + double bx, + double cx, + double fa, + double functionValueOfb, + double fc, double * extX, double * extVal) { @@ -223,14 +223,14 @@ PowellOptimizerv4::BracketedLineOptimize(double template void -PowellOptimizerv4::BracketedLineOptimize(double ax, - double bx, - double cx, - double itkNotUsed(fa), - double functionValueOfb, - double itkNotUsed(fc), - double * extX, - double * extVal, +PowellOptimizerv4::BracketedLineOptimize(double ax, + double bx, + double cx, + double itkNotUsed(fa), + double functionValueOfb, + double itkNotUsed(fc), + double * extX, + double * extVal, ParametersType & tempCoord) { double x; @@ -432,7 +432,7 @@ PowellOptimizerv4::StartOptimization(bool /* doOn { const double fp = fx; unsigned int ibig = 0; - double del = 0.0; + double del = 0.0; for (unsigned int i = 0; i < m_SpaceDimension; ++i) { diff --git a/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.h index db3eb67b45e..673d7d18314 100644 --- a/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.h @@ -132,13 +132,13 @@ class ITK_TEMPLATE_EXPORT QuasiNewtonOptimizerv4Template ParametersType m_OptimalStep{}; /** The information about the previous step */ - MeasureType m_PreviousValue{}; + MeasureType m_PreviousValue{}; ParametersType m_PreviousPosition{}; /** The best value so far and relevant information */ - MeasureType m_BestValue{}; + MeasureType m_BestValue{}; ParametersType m_BestPosition{}; - SizeValueType m_BestIteration{ 0 }; + SizeValueType m_BestIteration{ 0 }; /** The Quasi-Newton step */ DerivativeType m_NewtonStep{}; diff --git a/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.hxx b/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.hxx index f914f24b39b..8a85847fbd0 100644 --- a/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.hxx @@ -308,7 +308,7 @@ QuasiNewtonOptimizerv4Template::EstimateNewtonSte const SizeValueType numLocalPara = this->m_Metric->GetNumberOfLocalParameters(); const IndexValueType low = subrange[0] / numLocalPara; - IndexValueType high = subrange[1] / numLocalPara; + IndexValueType high = subrange[1] / numLocalPara; // let us denote the i-th thread's sub range by subrange_i // we assume subrange_i[1] + 1 = subrange_(i+1)[0] . @@ -349,7 +349,7 @@ QuasiNewtonOptimizerv4Template::ComputeHessianAnd return false; } - const SizeValueType numLocalPara = this->m_Metric->GetNumberOfLocalParameters(); + const SizeValueType numLocalPara = this->m_Metric->GetNumberOfLocalParameters(); const IndexValueType offset = loc * numLocalPara; ParametersType dx(numLocalPara); // delta of position x: x_k+1 - x_k @@ -376,7 +376,7 @@ QuasiNewtonOptimizerv4Template::ComputeHessianAnd const vnl_matrix plus = outer_product(dg, dg) / dot_dg_dx; const vnl_matrix minus = outer_product(edg, edg) / dot_edg_dx; - vnl_matrix newHessian = this->m_HessianArray[loc] + plus - minus; + vnl_matrix newHessian = this->m_HessianArray[loc] + plus - minus; this->m_HessianArray[loc] = newHessian; diff --git a/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4EstimateNewtonStepThreader.hxx b/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4EstimateNewtonStepThreader.hxx index 0a0236c7ff6..b6b13cf5c3b 100644 --- a/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4EstimateNewtonStepThreader.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4EstimateNewtonStepThreader.hxx @@ -25,7 +25,7 @@ template void QuasiNewtonOptimizerv4EstimateNewtonStepThreaderTemplate::ThreadedExecution( const IndexRangeType & subrange, - const ThreadIdType itkNotUsed(threadId)) + const ThreadIdType itkNotUsed(threadId)) { this->m_Associate->EstimateNewtonStepOverSubRange(subrange); } diff --git a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx index c449eca3329..dc2389c82a3 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx @@ -258,7 +258,7 @@ template template void RegistrationParameterScalesEstimator::TransformPoint(const VirtualPointType & point, - TTargetPointType & mappedPoint) + TTargetPointType & mappedPoint) { if (this->GetTransformForward()) { @@ -273,11 +273,11 @@ RegistrationParameterScalesEstimator::TransformPoint(const VirtualPoint template void RegistrationParameterScalesEstimator::ComputeSquaredJacobianNorms(const VirtualPointType & point, - ParametersType & squareNorms) + ParametersType & squareNorms) { const SizeValueType numPara = this->GetNumberOfLocalParameters(); const SizeValueType dim = this->GetDimension(); - JacobianType jacobian(dim, numPara); + JacobianType jacobian(dim, numPara); if (this->GetTransformForward()) { @@ -442,7 +442,7 @@ auto RegistrationParameterScalesEstimator::GetVirtualDomainCentralIndex() -> VirtualIndexType { const VirtualRegionType region = this->m_Metric->GetVirtualRegion(); - const SizeValueType dim = this->GetDimension(); + const SizeValueType dim = this->GetDimension(); VirtualIndexType lowerIndex = region.GetIndex(); VirtualIndexType upperIndex = region.GetUpperIndex(); @@ -463,7 +463,7 @@ RegistrationParameterScalesEstimator::GetVirtualDomainCentralRegion() - VirtualIndexType centralIndex = this->GetVirtualDomainCentralIndex(); const VirtualRegionType region = this->m_Metric->GetVirtualRegion(); - const SizeValueType dim = this->GetDimension(); + const SizeValueType dim = this->GetDimension(); VirtualIndexType lowerIndex = region.GetIndex(); VirtualIndexType upperIndex = region.GetUpperIndex(); @@ -500,7 +500,7 @@ void RegistrationParameterScalesEstimator::SampleVirtualDomainWithRegion(VirtualRegionType region) { const VirtualImageConstPointer image = this->m_Metric->GetVirtualImage(); - const SizeValueType total = region.GetNumberOfPixels(); + const SizeValueType total = region.GetNumberOfPixels(); this->m_SamplePoints.resize(total); /* Set up an iterator within the user specified virtual image region. */ @@ -528,9 +528,9 @@ RegistrationParameterScalesEstimator::SampleVirtualDomainWithCorners() const VirtualImageConstPointer image = this->m_Metric->GetVirtualImage(); const VirtualRegionType region = this->m_Metric->GetVirtualRegion(); - VirtualIndexType firstCorner = region.GetIndex(); + VirtualIndexType firstCorner = region.GetIndex(); - VirtualSizeType size = region.GetSize(); + VirtualSizeType size = region.GetSize(); const unsigned int cornerNumber = 1 << VirtualDimension; // 2^Dimension this->m_SamplePoints.resize(cornerNumber); @@ -609,7 +609,7 @@ RegistrationParameterScalesEstimator::SampleVirtualDomainWithPointSet() this->m_SamplePoints.resize(this->m_VirtualDomainPointSet->GetNumberOfPoints()); typename VirtualPointSetType::PointsContainerConstIterator it(this->m_VirtualDomainPointSet->GetPoints()->Begin()); - SizeValueType count = 0; + SizeValueType count = 0; while (it != this->m_VirtualDomainPointSet->GetPoints()->End()) { this->m_SamplePoints[count] = it.Value(); diff --git a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromIndexShift.hxx b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromIndexShift.hxx index 6fc6937c1fb..fbbd63dbda7 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromIndexShift.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromIndexShift.hxx @@ -25,7 +25,7 @@ namespace itk template void RegistrationParameterScalesFromIndexShift::ComputeSampleShifts(const ParametersType & deltaParameters, - ScalesType & sampleShifts) + ScalesType & sampleShifts) { if (this->GetTransformForward()) { @@ -41,7 +41,7 @@ template template void RegistrationParameterScalesFromIndexShift::ComputeSampleShiftsInternal(const ParametersType & deltaParameters, - ScalesType & sampleShifts) + ScalesType & sampleShifts) { using TransformOutputType = itk::ContinuousIndex; @@ -52,7 +52,7 @@ RegistrationParameterScalesFromIndexShift::ComputeSampleShiftsInternal( const auto numSamples = static_cast(this->m_SamplePoints.size()); - VirtualPointType point; + VirtualPointType point; TransformOutputType newMappedVoxel; // Store the old mapped indices to reduce calls to Transform::SetParameters() diff --git a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.hxx b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.hxx index fd9164fdd3a..d7c9e0ad585 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.hxx @@ -73,7 +73,7 @@ RegistrationParameterScalesFromJacobian::EstimateStepScale(const Parame this->ComputeSampleStepScales(step, sampleScales); const auto numSamples = static_cast(this->m_SamplePoints.size()); - FloatType scaleSum{}; + FloatType scaleSum{}; // checking each sample point for (SizeValueType c = 0; c < numSamples; ++c) @@ -87,7 +87,7 @@ RegistrationParameterScalesFromJacobian::EstimateStepScale(const Parame template void RegistrationParameterScalesFromJacobian::EstimateLocalStepScales(const ParametersType & step, - ScalesType & localStepScales) + ScalesType & localStepScales) { if (!this->IsDisplacementFieldTransform()) { @@ -101,7 +101,7 @@ RegistrationParameterScalesFromJacobian::EstimateLocalStepScales(const ScalesType sampleScales; this->ComputeSampleStepScales(step, sampleScales); - const auto numSamples = static_cast(this->m_SamplePoints.size()); + const auto numSamples = static_cast(this->m_SamplePoints.size()); const SizeValueType numPara = this->GetNumberOfLocalParameters(); const SizeValueType numAllPara = this->GetTransform()->GetNumberOfParameters(); const SizeValueType numLocals = numAllPara / numPara; @@ -113,7 +113,7 @@ RegistrationParameterScalesFromJacobian::EstimateLocalStepScales(const for (SizeValueType c = 0; c < numSamples; ++c) { const VirtualPointType & point = this->m_SamplePoints[c]; - const IndexValueType localId = + const IndexValueType localId = this->m_Metric->ComputeParameterOffsetFromVirtualPoint(point, NumericTraits::OneValue()); localStepScales[localId] = sampleScales[c]; } @@ -122,9 +122,9 @@ RegistrationParameterScalesFromJacobian::EstimateLocalStepScales(const template void RegistrationParameterScalesFromJacobian::ComputeSampleStepScales(const ParametersType & step, - ScalesType & sampleScales) + ScalesType & sampleScales) { - const auto numSamples = static_cast(this->m_SamplePoints.size()); + const auto numSamples = static_cast(this->m_SamplePoints.size()); const SizeValueType dim = this->GetDimension(); const SizeValueType numPara = this->GetNumberOfLocalParameters(); diff --git a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromPhysicalShift.hxx b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromPhysicalShift.hxx index e94d64463b0..81deab3da81 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromPhysicalShift.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromPhysicalShift.hxx @@ -25,7 +25,7 @@ namespace itk template void RegistrationParameterScalesFromPhysicalShift::ComputeSampleShifts(const ParametersType & deltaParameters, - ScalesType & sampleShifts) + ScalesType & sampleShifts) { if (this->GetTransformForward()) { @@ -42,7 +42,7 @@ template void RegistrationParameterScalesFromPhysicalShift::ComputeSampleShiftsInternal( const ParametersType & deltaParameters, - ScalesType & sampleShifts) + ScalesType & sampleShifts) { using TransformOutputType = typename TTransform::OutputPointType; @@ -53,7 +53,7 @@ RegistrationParameterScalesFromPhysicalShift::ComputeSampleShiftsIntern const auto numSamples = static_cast(this->m_SamplePoints.size()); - VirtualPointType point; + VirtualPointType point; TransformOutputType newMappedVoxel; // store the old mapped indices to reduce calls to Transform::SetParameters() diff --git a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.hxx b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.hxx index 325f6458791..ce24655a14d 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.hxx @@ -150,7 +150,7 @@ RegistrationParameterScalesFromShiftBase::EstimateStepScale(const Param else { const FloatType factor = this->m_SmallParameterVariation / maxStep; - ParametersType smallStep(step.size()); + ParametersType smallStep(step.size()); // Use a small step to have a linear approximation. smallStep = step * factor; return this->ComputeMaximumVoxelShift(smallStep) / factor; @@ -163,7 +163,7 @@ RegistrationParameterScalesFromShiftBase::EstimateStepScale(const Param template void RegistrationParameterScalesFromShiftBase::EstimateLocalStepScales(const ParametersType & step, - ScalesType & localStepScales) + ScalesType & localStepScales) { if (!this->TransformHasLocalSupportForScalesEstimation()) { @@ -189,7 +189,7 @@ RegistrationParameterScalesFromShiftBase::EstimateLocalStepScales(const for (SizeValueType c = 0; c < numSamples; ++c) { const VirtualPointType & point = this->m_SamplePoints[c]; - const IndexValueType localId = this->m_Metric->ComputeParameterOffsetFromVirtualPoint(point, numPara) / numPara; + const IndexValueType localId = this->m_Metric->ComputeParameterOffsetFromVirtualPoint(point, numPara) / numPara; localStepScales[localId] = sampleShifts[c]; } } diff --git a/Modules/Numerics/Optimizersv4/include/itkSingleValuedVnlCostFunctionAdaptorv4.h b/Modules/Numerics/Optimizersv4/include/itkSingleValuedVnlCostFunctionAdaptorv4.h index 05d72834a38..a25b3e6d2f1 100644 --- a/Modules/Numerics/Optimizersv4/include/itkSingleValuedVnlCostFunctionAdaptorv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkSingleValuedVnlCostFunctionAdaptorv4.h @@ -122,11 +122,11 @@ class SingleValuedVnlCostFunctionAdaptorv4 : public vnl_cost_function private: ObjectToObjectMetricBase::Pointer m_ObjectMetric{}; - bool m_ScalesInitialized{}; - ScalesType m_Scales{}; - Object::Pointer m_Reporter{}; + bool m_ScalesInitialized{}; + ScalesType m_Scales{}; + Object::Pointer m_Reporter{}; - mutable MeasureType m_CachedValue{}; + mutable MeasureType m_CachedValue{}; mutable DerivativeType m_CachedDerivative{}; }; // end of Class CostFunction diff --git a/Modules/Numerics/Optimizersv4/include/itkWindowConvergenceMonitoringFunction.hxx b/Modules/Numerics/Optimizersv4/include/itkWindowConvergenceMonitoringFunction.hxx index 4f1860866bd..f36bd6776ef 100644 --- a/Modules/Numerics/Optimizersv4/include/itkWindowConvergenceMonitoringFunction.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkWindowConvergenceMonitoringFunction.hxx @@ -74,8 +74,8 @@ WindowConvergenceMonitoringFunction::GetConvergenceValue() const -> Rea using EnergyProfileType = PointSet; using ProfilePointType = typename EnergyProfileType::PointType; - typename CurveType::PointType origin; - typename CurveType::SizeType size; + typename CurveType::PointType origin; + typename CurveType::SizeType size; typename CurveType::SpacingType spacing; origin[0] = 0.0; diff --git a/Modules/Numerics/Optimizersv4/src/itkAmoebaOptimizerv4.cxx b/Modules/Numerics/Optimizersv4/src/itkAmoebaOptimizerv4.cxx index 850bf8bd945..8b045bf40fa 100644 --- a/Modules/Numerics/Optimizersv4/src/itkAmoebaOptimizerv4.cxx +++ b/Modules/Numerics/Optimizersv4/src/itkAmoebaOptimizerv4.cxx @@ -121,7 +121,7 @@ AmoebaOptimizerv4::StartOptimization(bool /* doOnlyInitialization */) // expected parameter vector matches the one we have etc...) this->ValidateSettings(); - ParametersType parameters = this->m_Metric->GetParameters(); + ParametersType parameters = this->m_Metric->GetParameters(); const unsigned int n = parameters.GetSize(); InternalParametersType delta(m_InitialSimplexDelta); @@ -161,8 +161,8 @@ AmoebaOptimizerv4::StartOptimization(bool /* doOnlyInitialization */) // automated initialization - previously hidden inside vnl if (this->m_AutomaticInitialSimplex) { - constexpr double relativeDiameter = 0.05; - constexpr double zeroTermDelta = 0.00025; + constexpr double relativeDiameter = 0.05; + constexpr double zeroTermDelta = 0.00025; InternalParametersType automaticDelta(n); for (unsigned int i = 0; i < n; ++i) { @@ -184,7 +184,7 @@ AmoebaOptimizerv4::StartOptimization(bool /* doOnlyInitialization */) // multiple restart heuristic if (this->m_OptimizeWithRestarts) { - bool converged = false; + bool converged = false; unsigned int i = 1; while (!converged && (this->m_CurrentIteration < m_NumberOfIterations)) { @@ -251,7 +251,7 @@ AmoebaOptimizerv4::ValidateSettings() // if we got here it is safe to get the number of parameters the cost // function expects const ParametersType parameters = this->m_Metric->GetParameters(); - const unsigned int n = parameters.GetSize(); + const unsigned int n = parameters.GetSize(); // the user gave us data to use for the initial simplex, check that it // matches the number of parameters (simplex dimension is n+1 - the initial diff --git a/Modules/Numerics/Optimizersv4/src/itkLBFGSOptimizerv4.cxx b/Modules/Numerics/Optimizersv4/src/itkLBFGSOptimizerv4.cxx index 35f2e891f69..a771ceeb8f9 100644 --- a/Modules/Numerics/Optimizersv4/src/itkLBFGSOptimizerv4.cxx +++ b/Modules/Numerics/Optimizersv4/src/itkLBFGSOptimizerv4.cxx @@ -146,7 +146,7 @@ LBFGSOptimizerv4::StartOptimization(bool /* doOnlyInitialization */) // This compensates for later scaling them down in "compute" function of // the cost function adaptor and at the end of this function. InternalParametersType vnlCompatibleParameters(parameters.GetSize()); - const ScalesType & scales = this->GetScales(); + const ScalesType & scales = this->GetScales(); for (SizeValueType i = 0; i < parameters.GetSize(); ++i) { if (this->GetScalesAreIdentity()) diff --git a/Modules/Numerics/Optimizersv4/src/itkObjectToObjectOptimizerBase.cxx b/Modules/Numerics/Optimizersv4/src/itkObjectToObjectOptimizerBase.cxx index 3aa82e1dd3e..d1e6aa7da68 100644 --- a/Modules/Numerics/Optimizersv4/src/itkObjectToObjectOptimizerBase.cxx +++ b/Modules/Numerics/Optimizersv4/src/itkObjectToObjectOptimizerBase.cxx @@ -133,7 +133,7 @@ ObjectToObjectOptimizerBaseTemplate::StartOptimiz * within a tolerance, to allow for automatically estimated scales * that may not be exactly 1.0 when in priciniple they should be. */ const SValueType difference = itk::Math::abs(NumericTraits::OneValue() - this->m_Scales[i]); - auto tolerance = static_cast(0.01); + auto tolerance = static_cast(0.01); if (difference > tolerance) { this->m_ScalesAreIdentity = false; @@ -164,7 +164,7 @@ ObjectToObjectOptimizerBaseTemplate::StartOptimiz for (SizeType i = 0; i < this->m_Weights.Size(); ++i) { const SValueType difference = itk::Math::abs(NumericTraits::OneValue() - this->m_Weights[i]); - auto tolerance = static_cast(1e-4); + auto tolerance = static_cast(1e-4); if (difference > tolerance) { this->m_WeightsAreIdentity = false; @@ -212,7 +212,7 @@ ITK_GCC_PRAGMA_DIAG_POP() /** Print enum values */ std::ostream & -operator<<(std::ostream & out, +operator<<(std::ostream & out, const ObjectToObjectOptimizerBaseTemplateEnums::StopConditionObjectToObjectOptimizer value) { return out << [value] { diff --git a/Modules/Numerics/Optimizersv4/src/itkSingleValuedVnlCostFunctionAdaptorv4.cxx b/Modules/Numerics/Optimizersv4/src/itkSingleValuedVnlCostFunctionAdaptorv4.cxx index 00ac2a3ec08..35b272d5a9c 100644 --- a/Modules/Numerics/Optimizersv4/src/itkSingleValuedVnlCostFunctionAdaptorv4.cxx +++ b/Modules/Numerics/Optimizersv4/src/itkSingleValuedVnlCostFunctionAdaptorv4.cxx @@ -70,7 +70,7 @@ SingleValuedVnlCostFunctionAdaptorv4::f(const InternalParametersType & inparamet void SingleValuedVnlCostFunctionAdaptorv4::gradf(const InternalParametersType & inparameters, - InternalDerivativeType & gradient) + InternalDerivativeType & gradient) { if (!m_ObjectMetric) { @@ -106,12 +106,12 @@ SingleValuedVnlCostFunctionAdaptorv4::gradf(const InternalParametersType & inpar void SingleValuedVnlCostFunctionAdaptorv4::compute(const InternalParametersType & x, - InternalMeasureType * fun, - InternalDerivativeType * g) + InternalMeasureType * fun, + InternalDerivativeType * g) { // delegate the computation to the ObjectMetric ParametersType parameters(x.size()); - double measure; + double measure; if (m_ScalesInitialized) { @@ -144,7 +144,7 @@ SingleValuedVnlCostFunctionAdaptorv4::compute(const InternalParametersType & x, } void -SingleValuedVnlCostFunctionAdaptorv4::ConvertExternalToInternalGradient(const DerivativeType & input, +SingleValuedVnlCostFunctionAdaptorv4::ConvertExternalToInternalGradient(const DerivativeType & input, InternalDerivativeType & output) const { // Convert external derivative measures into internal type diff --git a/Modules/Numerics/Optimizersv4/test/itkAmoebaOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkAmoebaOptimizerv4Test.cxx index 95ea7d33386..c7cb0842d2b 100644 --- a/Modules/Numerics/Optimizersv4/test/itkAmoebaOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkAmoebaOptimizerv4Test.cxx @@ -144,7 +144,7 @@ class itkAmoebaOptimizerv4TestMetric1 : public itk::ObjectToObjectMetricBase private: ParametersType m_Parameters; - bool m_HasLocalSupport; + bool m_HasLocalSupport; }; @@ -185,7 +185,7 @@ class itkAmoebaOptimizerv4TestMetric2 : public itk::ObjectToObjectMetricBase GetValue() const override { const double x = this->m_Parameters[0]; - double val; + double val; if (x < 0) { val = x * x + 4 * x; @@ -258,7 +258,7 @@ class itkAmoebaOptimizerv4TestMetric2 : public itk::ObjectToObjectMetricBase private: ParametersType m_Parameters; - bool m_HasLocalSupport; + bool m_HasLocalSupport; }; class CommandIterationUpdateAmoeba : public itk::Command @@ -434,7 +434,7 @@ AmoebaTest1() OptimizerType::ParametersType finalPosition = itkOptimizer->GetCurrentPosition(); constexpr double trueParameters[2] = { 2, -2 }; - bool pass = true; + bool pass = true; std::cout << "Right answer = " << trueParameters[0] << " , " << trueParameters[1] << std::endl; std::cout << "Final position = " << finalPosition << std::endl; @@ -531,7 +531,7 @@ AmoebaTest2() { // we should have converged to the local minimum, -2 OptimizerType::ParametersType finalParameters = itkOptimizer->GetCurrentPosition(); - constexpr double knownParameters = -2.0; + constexpr double knownParameters = -2.0; std::cout << "Standard Amoeba:\n"; std::cout << "Known parameters = " << knownParameters << " "; std::cout << "Estimated parameters = " << finalParameters << std::endl; @@ -564,7 +564,7 @@ AmoebaTest2() { // we should have converged to the global minimum, 2 OptimizerType::ParametersType finalParameters = itkOptimizer->GetCurrentPosition(); - constexpr double knownParameters = 2.0; + constexpr double knownParameters = 2.0; std::cout << "Amoeba with restarts:\n"; std::cout << "Known parameters = " << knownParameters << " "; std::cout << "Estimated parameters = " << finalParameters << std::endl; diff --git a/Modules/Numerics/Optimizersv4/test/itkAutoScaledGradientDescentRegistrationOnVectorTest.cxx b/Modules/Numerics/Optimizersv4/test/itkAutoScaledGradientDescentRegistrationOnVectorTest.cxx index b786caf8971..be72f1addca 100644 --- a/Modules/Numerics/Optimizersv4/test/itkAutoScaledGradientDescentRegistrationOnVectorTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkAutoScaledGradientDescentRegistrationOnVectorTest.cxx @@ -35,8 +35,8 @@ template int -itkAutoScaledGradientDescentRegistrationOnVectorTestTemplated(int numberOfIterations, - double shiftOfStep, +itkAutoScaledGradientDescentRegistrationOnVectorTestTemplated(int numberOfIterations, + double shiftOfStep, std::string scalesOption) { const unsigned int Dimension = TMovingTransform::SpaceDimension; @@ -58,9 +58,9 @@ itkAutoScaledGradientDescentRegistrationOnVectorTestTemplated(int number typename MovingImageType::PixelType, Dimension>; - typename FixedImageType::ConstPointer fixedImage; + typename FixedImageType::ConstPointer fixedImage; typename MovingImageType::ConstPointer movingImage; - typename ImageSourceType::Pointer imageSource; + typename ImageSourceType::Pointer imageSource; imageSource = ImageSourceType::New(); @@ -186,7 +186,7 @@ itkAutoScaledGradientDescentRegistrationOnVectorTestTemplated(int number // // results // - ParametersType finalParameters = movingTransform->GetParameters(); + ParametersType finalParameters = movingTransform->GetParameters(); const ParametersType fixedParameters = movingTransform->GetFixedParameters(); std::cout << "Estimated scales = " << optimizer->GetScales() << std::endl; std::cout << "finalParameters = " << finalParameters << std::endl; @@ -239,7 +239,7 @@ itkAutoScaledGradientDescentRegistrationOnVectorTest(int argc, char ** const arg return EXIT_FAILURE; } unsigned int numberOfIterations = 30; - double shiftOfStep = 1.0; + double shiftOfStep = 1.0; if (argc >= 2) { diff --git a/Modules/Numerics/Optimizersv4/test/itkAutoScaledGradientDescentRegistrationTest.cxx b/Modules/Numerics/Optimizersv4/test/itkAutoScaledGradientDescentRegistrationTest.cxx index 2b14d589607..b877a6fc65e 100644 --- a/Modules/Numerics/Optimizersv4/test/itkAutoScaledGradientDescentRegistrationTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkAutoScaledGradientDescentRegistrationTest.cxx @@ -35,13 +35,13 @@ template int -itkAutoScaledGradientDescentRegistrationTestTemplated(int numberOfIterations, - double shiftOfStep, +itkAutoScaledGradientDescentRegistrationTestTemplated(int numberOfIterations, + double shiftOfStep, std::string scalesOption, - bool usePhysicalSpaceForShift, - bool estimateLearningRateOnce, - bool estimateLearningRateAtEachIteration, - bool estimateScales) + bool usePhysicalSpaceForShift, + bool estimateLearningRateOnce, + bool estimateLearningRateAtEachIteration, + bool estimateScales) { const unsigned int Dimension = TMovingTransform::SpaceDimension; using PixelType = double; @@ -61,9 +61,9 @@ itkAutoScaledGradientDescentRegistrationTestTemplated(int numberOfIterat typename MovingImageType::PixelType, Dimension>; - typename FixedImageType::ConstPointer fixedImage; + typename FixedImageType::ConstPointer fixedImage; typename MovingImageType::ConstPointer movingImage; - typename ImageSourceType::Pointer imageSource; + typename ImageSourceType::Pointer imageSource; imageSource = ImageSourceType::New(); @@ -219,7 +219,7 @@ itkAutoScaledGradientDescentRegistrationTestTemplated(int numberOfIterat // // results // - ParametersType finalParameters = movingTransform->GetParameters(); + ParametersType finalParameters = movingTransform->GetParameters(); const ParametersType fixedParameters = movingTransform->GetFixedParameters(); std::cout << "Estimated scales = " << optimizer->GetScales() << std::endl; std::cout << "finalParameters = " << finalParameters << std::endl; @@ -275,10 +275,10 @@ itkAutoScaledGradientDescentRegistrationTest(int argc, char ** const argv) return EXIT_FAILURE; } unsigned int numberOfIterations = 30; - double shiftOfStep = 1.0; - bool estimateLearningRateOnce = true; - bool estimateLearningRateAtEachIteration = false; - bool estimateScales = true; + double shiftOfStep = 1.0; + bool estimateLearningRateOnce = true; + bool estimateLearningRateAtEachIteration = false; + bool estimateScales = true; if (argc >= 2) { @@ -306,7 +306,7 @@ itkAutoScaledGradientDescentRegistrationTest(int argc, char ** const argv) std::cout << std::endl << "Optimizing translation transform with shift scales" << std::endl; using TranslationTransformType = itk::TranslationTransform; constexpr bool usePhysicalSpaceForShift = false; - const int ret1 = + const int ret1 = itkAutoScaledGradientDescentRegistrationTestTemplated(numberOfIterations, shiftOfStep, "shift", diff --git a/Modules/Numerics/Optimizersv4/test/itkConjugateGradientLineSearchOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkConjugateGradientLineSearchOptimizerv4Test.cxx index 278f1d7dbed..136aea6a8dd 100644 --- a/Modules/Numerics/Optimizersv4/test/itkConjugateGradientLineSearchOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkConjugateGradientLineSearchOptimizerv4Test.cxx @@ -152,7 +152,7 @@ class ConjugateGradientLineSearchOptimizerv4TestMetric : public itk::ObjectToObj } private: - ParametersType m_Parameters; + ParametersType m_Parameters; mutable unsigned int m_Iterations; }; diff --git a/Modules/Numerics/Optimizersv4/test/itkExhaustiveOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkExhaustiveOptimizerv4Test.cxx index 1729fa136e8..5dfa6c7673a 100644 --- a/Modules/Numerics/Optimizersv4/test/itkExhaustiveOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkExhaustiveOptimizerv4Test.cxx @@ -146,7 +146,7 @@ class ExhaustiveOptv4Metric : public itk::ObjectToObjectMetricBase private: ParametersType m_Parameters; - bool m_HasLocalSupport; + bool m_HasLocalSupport; }; @@ -168,7 +168,7 @@ class IndexObserver : public itk::Command if (nullptr != optimizer) { OptimizerType::ParametersType currentIndex = optimizer->GetCurrentIndex(); - const itk::SizeValueType currentIteration = optimizer->GetCurrentIteration(); + const itk::SizeValueType currentIteration = optimizer->GetCurrentIteration(); if (currentIndex.GetSize() == 2) { @@ -283,7 +283,7 @@ itkExhaustiveOptimizerv4Test(int, char *[]) std::cout << "CurrentValue: " << itkOptimizer->GetCurrentValue() << std::endl; - bool visitedIndicesPass = true; + bool visitedIndicesPass = true; std::vector visitedIndices = idxObserver->m_VisitedIndices; const size_t requiredNumberOfSteps = (2 * steps[0] + 1) * (2 * steps[1] + 1); @@ -307,7 +307,7 @@ itkExhaustiveOptimizerv4Test(int, char *[]) // // check results to see if it is within range // - bool trueParamsPass = true; + bool trueParamsPass = true; constexpr double trueParameters[2] = { 2, -2 }; for (unsigned int j = 0; j < 2; ++j) { diff --git a/Modules/Numerics/Optimizersv4/test/itkGradientDescentLineSearchOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkGradientDescentLineSearchOptimizerv4Test.cxx index 0b44f2c2dee..527db729c87 100644 --- a/Modules/Numerics/Optimizersv4/test/itkGradientDescentLineSearchOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkGradientDescentLineSearchOptimizerv4Test.cxx @@ -154,7 +154,7 @@ class GradientDescentLineSearchOptimizerv4TestMetric : public itk::ObjectToObjec } private: - ParametersType m_Parameters; + ParametersType m_Parameters; mutable unsigned int m_Iterations; }; diff --git a/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test.cxx index 5df40bbe34f..bf85ed2089c 100644 --- a/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test.cxx @@ -153,7 +153,7 @@ class GradientDescentOptimizerv4TestMetric : public itk::ObjectToObjectMetricBas /////////////////////////////////////////////////////////// int -GradientDescentOptimizerv4RunTest(itk::GradientDescentOptimizerv4::Pointer & itkOptimizer, +GradientDescentOptimizerv4RunTest(itk::GradientDescentOptimizerv4::Pointer & itkOptimizer, GradientDescentOptimizerv4TestMetric::ParametersType & trueParameters) { try diff --git a/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test2.cxx b/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test2.cxx index 26dc9155319..6d092a03b8a 100644 --- a/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test2.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test2.cxx @@ -171,7 +171,7 @@ itkGradientDescentOptimizerv4Test2(int, char *[]) } itkOptimizer->SetScales(scales); - ParametersType truth(metric->GetNumberOfParameters()); + ParametersType truth(metric->GetNumberOfParameters()); const NumberOfParametersType numLocal = metric->GetNumberOfLocalParameters(); const NumberOfParametersType numLoops = metric->GetNumberOfParameters() / numLocal; for (NumberOfParametersType i = 0; i < numLoops; ++i) diff --git a/Modules/Numerics/Optimizersv4/test/itkLBFGS2Optimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkLBFGS2Optimizerv4Test.cxx index f1dadfddb34..7dab60448da 100644 --- a/Modules/Numerics/Optimizersv4/test/itkLBFGS2Optimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkLBFGS2Optimizerv4Test.cxx @@ -148,7 +148,7 @@ class itkLBFGS2Optimizerv4TestMetric : public itk::ObjectToObjectMetricBase private: ParametersType m_Parameters; - bool m_HasLocalSupport; + bool m_HasLocalSupport; }; @@ -247,7 +247,7 @@ itkLBFGS2Optimizerv4Test(int, char *[]) itkOptimizer->SetMetric(metric); - constexpr unsigned int SpaceDimension = 2; + constexpr unsigned int SpaceDimension = 2; OptimizerType::ParametersType initialValue(SpaceDimension); // We start not so far from | 2 -2 | @@ -291,7 +291,7 @@ itkLBFGS2Optimizerv4Test(int, char *[]) // // check results to see if it is within range // - bool pass = true; + bool pass = true; constexpr double trueParameters[2] = { 2, -2 }; for (unsigned int j = 0; j < 2; ++j) { diff --git a/Modules/Numerics/Optimizersv4/test/itkLBFGSBOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkLBFGSBOptimizerv4Test.cxx index ace53d04d5f..734e3a72b9b 100644 --- a/Modules/Numerics/Optimizersv4/test/itkLBFGSBOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkLBFGSBOptimizerv4Test.cxx @@ -152,7 +152,7 @@ class LBFGSBOptimizerv4TestMetric : public itk::ObjectToObjectMetricBase private: ParametersType m_Parameters; - bool m_HasLocalSupport; + bool m_HasLocalSupport; }; /** To ensure the events get fired. */ @@ -248,7 +248,7 @@ itkLBFGSBOptimizerv4Test(int, char *[]) constexpr double F_Convergence_Factor = 1e+7; // Function value tolerance constexpr double Projected_G_Tolerance = 1e-5; // Proj gradient tolerance - constexpr int Max_Iterations = 25; // Maximum number of iterations + constexpr int Max_Iterations = 25; // Maximum number of iterations itkOptimizer->SetCostFunctionConvergenceFactor(F_Convergence_Factor); ITK_TEST_SET_GET_VALUE(F_Convergence_Factor, itkOptimizer->GetCostFunctionConvergenceFactor()); @@ -267,7 +267,7 @@ itkLBFGSBOptimizerv4Test(int, char *[]) itkOptimizer->SetMaximumNumberOfCorrections(maximumNumberOfCorrections); ITK_TEST_SET_GET_VALUE(maximumNumberOfCorrections, itkOptimizer->GetMaximumNumberOfCorrections()); - constexpr unsigned int SpaceDimension = 2; + constexpr unsigned int SpaceDimension = 2; OptimizerType::ParametersType initialValue(SpaceDimension); // Starting point @@ -292,8 +292,8 @@ itkLBFGSBOptimizerv4Test(int, char *[]) * = 2 if x[i] has both lower and upper bounds, and * = 3 if x[1] has only an upper bound */ - OptimizerType::BoundValueType lower(SpaceDimension); - OptimizerType::BoundValueType upper(SpaceDimension); + OptimizerType::BoundValueType lower(SpaceDimension); + OptimizerType::BoundValueType upper(SpaceDimension); OptimizerType::BoundSelectionType select(SpaceDimension); lower.Fill(-1); @@ -348,7 +348,7 @@ itkLBFGSBOptimizerv4Test(int, char *[]) // // check results to see if it is within range // - bool pass = true; + bool pass = true; std::string errorIn; // true parameters considering bounding constrains -1 <= x <= 10 diff --git a/Modules/Numerics/Optimizersv4/test/itkLBFGSOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkLBFGSOptimizerv4Test.cxx index 3f525049669..7e0647a6705 100644 --- a/Modules/Numerics/Optimizersv4/test/itkLBFGSOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkLBFGSOptimizerv4Test.cxx @@ -148,7 +148,7 @@ class itkLBFGSOptimizerv4TestMetric : public itk::ObjectToObjectMetricBase private: ParametersType m_Parameters; - bool m_HasLocalSupport; + bool m_HasLocalSupport; }; @@ -205,7 +205,7 @@ itkLBFGSOptimizerv4Test(int, char *[]) vnlOptimizer->set_check_derivatives(0); - constexpr unsigned int SpaceDimension = 2; + constexpr unsigned int SpaceDimension = 2; OptimizerType::ParametersType initialValue(SpaceDimension); // We start not so far from | 2 -2 | @@ -265,7 +265,7 @@ itkLBFGSOptimizerv4Test(int, char *[]) // // check results to see if it is within range // - bool pass = true; + bool pass = true; constexpr double trueParameters[2] = { 2, -2 }; for (unsigned int j = 0; j < 2; ++j) { diff --git a/Modules/Numerics/Optimizersv4/test/itkMultiGradientOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkMultiGradientOptimizerv4Test.cxx index 8b43fea0247..536d8045d46 100644 --- a/Modules/Numerics/Optimizersv4/test/itkMultiGradientOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkMultiGradientOptimizerv4Test.cxx @@ -340,8 +340,8 @@ itkMultiGradientOptimizerv4Test(int, char *[]) // Declaration of the Metric - auto metric = MultiGradientOptimizerv4TestMetric::New(); - auto metric2 = MultiGradientOptimizerv4TestMetric2::New(); + auto metric = MultiGradientOptimizerv4TestMetric::New(); + auto metric2 = MultiGradientOptimizerv4TestMetric2::New(); constexpr unsigned int spaceDimension = 2; itkOptimizer->SetMetric(metric); itkOptimizer->SetNumberOfIterations(50); diff --git a/Modules/Numerics/Optimizersv4/test/itkOnePlusOneEvolutionaryOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkOnePlusOneEvolutionaryOptimizerv4Test.cxx index 2e22368d9c0..11bd911b5bc 100644 --- a/Modules/Numerics/Optimizersv4/test/itkOnePlusOneEvolutionaryOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkOnePlusOneEvolutionaryOptimizerv4Test.cxx @@ -141,7 +141,7 @@ class OnePlusOneMetric : public itk::ObjectToObjectMetricBase private: ParametersType m_Parameters; - bool m_HasLocalSupport; + bool m_HasLocalSupport; }; @@ -268,7 +268,7 @@ itkOnePlusOneEvolutionaryOptimizerv4Test(int, char *[]) // // check results to see if it is within range // - bool pass = true; + bool pass = true; constexpr double trueParameters[2] = { 2, -2 }; for (unsigned int j = 0; j < 2; ++j) { diff --git a/Modules/Numerics/Optimizersv4/test/itkPowellOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkPowellOptimizerv4Test.cxx index 44af57e903e..9f7af6940af 100644 --- a/Modules/Numerics/Optimizersv4/test/itkPowellOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkPowellOptimizerv4Test.cxx @@ -139,7 +139,7 @@ class PowellBoundedMetric : public itk::ObjectToObjectMetricBase private: ParametersType m_Parameters; - bool m_HasLocalSupport; + bool m_HasLocalSupport; }; @@ -224,7 +224,7 @@ itkPowellOptimizerv4Test(int argc, char * argv[]) // // check results to see if it is within range // - bool pass = true; + bool pass = true; constexpr double trueParameters[2] = { 2, -2 }; for (unsigned int j = 0; j < 2; ++j) { diff --git a/Modules/Numerics/Optimizersv4/test/itkQuasiNewtonOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkQuasiNewtonOptimizerv4Test.cxx index 51d5507e8b6..6d8eeb23492 100644 --- a/Modules/Numerics/Optimizersv4/test/itkQuasiNewtonOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkQuasiNewtonOptimizerv4Test.cxx @@ -37,10 +37,10 @@ template int -itkQuasiNewtonOptimizerv4TestTemplated(int numberOfIterations, - double shiftOfStep, +itkQuasiNewtonOptimizerv4TestTemplated(int numberOfIterations, + double shiftOfStep, std::string scalesOption, - bool usePhysicalSpaceForShift = true) + bool usePhysicalSpaceForShift = true) { const unsigned int Dimension = TMovingTransform::SpaceDimension; using PixelType = double; @@ -60,9 +60,9 @@ itkQuasiNewtonOptimizerv4TestTemplated(int numberOfIterations, typename MovingImageType::PixelType, Dimension>; - typename FixedImageType::ConstPointer fixedImage; + typename FixedImageType::ConstPointer fixedImage; typename MovingImageType::ConstPointer movingImage; - typename ImageSourceType::Pointer imageSource; + typename ImageSourceType::Pointer imageSource; imageSource = ImageSourceType::New(); @@ -177,7 +177,7 @@ itkQuasiNewtonOptimizerv4TestTemplated(int numberOfIterations, // // results // - ParametersType finalParameters = movingTransform->GetParameters(); + ParametersType finalParameters = movingTransform->GetParameters(); const ParametersType fixedParameters = movingTransform->GetFixedParameters(); std::cout << "Estimated scales = " << optimizer->GetScales() << std::endl; std::cout << "finalParameters = " << finalParameters << std::endl; @@ -230,7 +230,7 @@ itkQuasiNewtonOptimizerv4Test(int argc, char ** const argv) return EXIT_FAILURE; } unsigned int numberOfIterations = 50; - double shiftOfStep = 1.0; + double shiftOfStep = 1.0; if (argc >= 2) { diff --git a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesEstimatorTest.cxx b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesEstimatorTest.cxx index 38e31b509c9..4680b016677 100644 --- a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesEstimatorTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesEstimatorTest.cxx @@ -231,8 +231,8 @@ itkRegistrationParameterScalesEstimatorTest(int, char *[]) using MovingImageType = itk::Image; using VirtualImageType = itk::Image; - auto fixedImage = FixedImageType::New(); - auto movingImage = MovingImageType::New(); + auto fixedImage = FixedImageType::New(); + auto movingImage = MovingImageType::New(); const VirtualImageType::Pointer virtualImage = fixedImage; auto size = MovingImageType::SizeType::Filled(100); diff --git a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromIndexShiftTest.cxx b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromIndexShiftTest.cxx index 429d0a59a24..64a523d162b 100644 --- a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromIndexShiftTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromIndexShiftTest.cxx @@ -124,8 +124,8 @@ itkRegistrationParameterScalesFromIndexShiftTest(int, char *[]) using MovingImageType = itk::Image; using VirtualImageType = itk::Image; - auto fixedImage = FixedImageType::New(); - auto movingImage = MovingImageType::New(); + auto fixedImage = FixedImageType::New(); + auto movingImage = MovingImageType::New(); const VirtualImageType::Pointer virtualImage = fixedImage; auto size = MovingImageType::SizeType::Filled(100); @@ -312,7 +312,7 @@ itkRegistrationParameterScalesFromIndexShiftTest(int, char *[]) const FloatType localLearningRate = 1.0 / localStepScale; std::cout << "The learning rate of shift for the displacement field transform = " << localLearningRate << std::endl; - bool localStepScalePass = false; + bool localStepScalePass = false; const FloatType theoreticalLocalStepScale = std::sqrt(2.0); if (itk::Math::abs((localStepScale - theoreticalLocalStepScale) / theoreticalLocalStepScale) < 0.01) { diff --git a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromJacobianTest.cxx b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromJacobianTest.cxx index 0c03cad0a93..9bfd26dfe09 100644 --- a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromJacobianTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromJacobianTest.cxx @@ -124,8 +124,8 @@ itkRegistrationParameterScalesFromJacobianTest(int, char *[]) using MovingImageType = itk::Image; using VirtualImageType = itk::Image; - auto fixedImage = FixedImageType::New(); - auto movingImage = MovingImageType::New(); + auto fixedImage = FixedImageType::New(); + auto movingImage = MovingImageType::New(); const VirtualImageType::Pointer virtualImage = fixedImage; auto size = MovingImageType::SizeType::Filled(100); @@ -231,8 +231,8 @@ itkRegistrationParameterScalesFromJacobianTest(int, char *[]) const FloatType learningRate = 1.0 / stepScale; std::cout << "The learning rate of Jacobian for the affine transform = " << learningRate << std::endl; - FloatType theoreticalStepScale = 0.0; - FloatType count = 0.0; + FloatType theoreticalStepScale = 0.0; + FloatType count = 0.0; VirtualImageType::PointType lowerPoint; virtualImage->TransformIndexToPhysicalPoint(virtualImage->GetLargestPossibleRegion().GetIndex(), lowerPoint); @@ -317,7 +317,7 @@ itkRegistrationParameterScalesFromJacobianTest(int, char *[]) std::cout << "The learning rate of Jacobian for the displacement field transform = " << localLearningRate << std::endl; - bool localStepScalePass = false; + bool localStepScalePass = false; const FloatType theoreticalLocalStepScale = std::sqrt(2.0); if (itk::Math::abs((localStepScale - theoreticalLocalStepScale) / theoreticalLocalStepScale) < 0.01) { diff --git a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftPointSetTest.cxx b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftPointSetTest.cxx index 2266710d4f0..8382ba926e9 100644 --- a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftPointSetTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftPointSetTest.cxx @@ -60,7 +60,7 @@ class RegistrationParameterScalesFromPhysicalShiftPointSetTestMetric void GetLocalNeighborhoodValueAndDerivative(const PointType &, - MeasureType & measure, + MeasureType & measure, LocalDerivativeType & derivative, const PixelType &) const override { @@ -99,7 +99,7 @@ itkRegistrationParameterScalesFromPhysicalShiftPointSetTest(int, char *[]) // Make a simple point set PointType testPoint; - auto offset = itk::MakeFilled(0.1); + auto offset = itk::MakeFilled(0.1); testPoint[0] = 0.0; testPoint[1] = 0.0; fixedPoints->SetPoint(0, testPoint); @@ -346,7 +346,7 @@ itkRegistrationParameterScalesFromPhysicalShiftPointSetTest(int, char *[]) const FloatType localLearningRate = 1.0 / localStepScale; std::cout << "The learning rate of shift for the displacement field transform = " << localLearningRate << std::endl; - bool localStepScalePass = false; + bool localStepScalePass = false; const FloatType theoreticalLocalStepScale = std::sqrt(2.0); if (itk::Math::abs((localStepScale - theoreticalLocalStepScale) / theoreticalLocalStepScale) < 0.01) { diff --git a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftTest.cxx b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftTest.cxx index b193f477ee2..29b33873d77 100644 --- a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftTest.cxx @@ -124,8 +124,8 @@ itkRegistrationParameterScalesFromPhysicalShiftTest(int, char *[]) using MovingImageType = itk::Image; using VirtualImageType = itk::Image; - auto fixedImage = FixedImageType::New(); - auto movingImage = MovingImageType::New(); + auto fixedImage = FixedImageType::New(); + auto movingImage = MovingImageType::New(); const VirtualImageType::Pointer virtualImage = fixedImage; auto size = MovingImageType::SizeType::Filled(100); @@ -359,7 +359,7 @@ itkRegistrationParameterScalesFromPhysicalShiftTest(int, char *[]) const FloatType localLearningRate = 1.0 / localStepScale; std::cout << "The learning rate of shift for the displacement field transform = " << localLearningRate << std::endl; - bool localStepScalePass = false; + bool localStepScalePass = false; const FloatType theoreticalLocalStepScale = std::sqrt(2.0); if (itk::Math::abs((localStepScale - theoreticalLocalStepScale) / theoreticalLocalStepScale) < 0.01) { diff --git a/Modules/Numerics/Optimizersv4/test/itkRegularStepGradientDescentOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkRegularStepGradientDescentOptimizerv4Test.cxx index 2bc82fac0e6..4bca3142c14 100644 --- a/Modules/Numerics/Optimizersv4/test/itkRegularStepGradientDescentOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkRegularStepGradientDescentOptimizerv4Test.cxx @@ -156,13 +156,13 @@ class RSGv4TestMetric : public itk::ObjectToObjectMetricBase template int RegularStepGradientDescentOptimizerv4TestHelper( - itk::SizeValueType numberOfIterations, - bool doEstimateLearningRateAtEachIteration, - bool doEstimateLearningRateOnce, + itk::SizeValueType numberOfIterations, + bool doEstimateLearningRateAtEachIteration, + bool doEstimateLearningRateOnce, typename OptimizerType::InternalComputationValueType relaxationFactor, typename OptimizerType::InternalComputationValueType minimumStepLength, typename OptimizerType::InternalComputationValueType gradientMagnitudeTolerance, - typename OptimizerType::MeasureType currentLearningRateRelaxation) + typename OptimizerType::MeasureType currentLearningRateRelaxation) { using ScalesType = typename OptimizerType::ScalesType; @@ -241,7 +241,7 @@ RegularStepGradientDescentOptimizerv4TestHelper( // // Check results to see if it is within range // - bool pass = true; + bool pass = true; constexpr double trueParameters[2] = { 2, -2 }; for (unsigned int j = 0; j < 2; ++j) { @@ -283,7 +283,7 @@ itkRegularStepGradientDescentOptimizerv4Test(int, char *[]) constexpr OptimizerType::InternalComputationValueType relaxationFactor = 0.5; constexpr OptimizerType::InternalComputationValueType minimumStepLength = 1e-6; constexpr OptimizerType::InternalComputationValueType gradientMagnitudeTolerance = 1e-6; - constexpr OptimizerType::MeasureType currentLearningRateRelaxation = 0; + constexpr OptimizerType::MeasureType currentLearningRateRelaxation = 0; testStatus = RegularStepGradientDescentOptimizerv4TestHelper(numberOfIterations, doEstimateLearningRateAtEachIteration, @@ -382,7 +382,7 @@ itkRegularStepGradientDescentOptimizerv4Test(int, char *[]) std::cout << "\nTest the Exception if the GradientMagnitudeTolerance is set to a negative value:" << std::endl; { constexpr OptimizerType::InternalComputationValueType gradientMagnitudeTolerance2 = -1.0; - const bool expectedExceptionReceived = + const bool expectedExceptionReceived = RegularStepGradientDescentOptimizerv4TestHelper(numberOfIterations, doEstimateLearningRateAtEachIteration, doEstimateLearningRateOnce, @@ -405,10 +405,10 @@ itkRegularStepGradientDescentOptimizerv4Test(int, char *[]) // std::cout << "\nTest the Exception if the RelaxationFactor is set to a negative value:" << std::endl; { - constexpr itk::SizeValueType numberOfIterations3 = 100; + constexpr itk::SizeValueType numberOfIterations3 = 100; constexpr OptimizerType::InternalComputationValueType relaxationFactor3 = -1.0; constexpr OptimizerType::InternalComputationValueType gradientMagnitudeTolerance3 = 0.01; - const bool expectedExceptionReceived = + const bool expectedExceptionReceived = RegularStepGradientDescentOptimizerv4TestHelper(numberOfIterations3, doEstimateLearningRateAtEachIteration, doEstimateLearningRateOnce, @@ -430,10 +430,10 @@ itkRegularStepGradientDescentOptimizerv4Test(int, char *[]) // std::cout << "\nTest the Exception if the RelaxationFactor is set to a value larger than one:" << std::endl; { - constexpr itk::SizeValueType numberOfIterations4 = 100; + constexpr itk::SizeValueType numberOfIterations4 = 100; constexpr OptimizerType::InternalComputationValueType relaxationFactor4 = 1.1; constexpr OptimizerType::InternalComputationValueType gradientMagnitudeTolerance4 = 0.01; - const bool expectedExceptionReceived = + const bool expectedExceptionReceived = RegularStepGradientDescentOptimizerv4TestHelper(numberOfIterations4, doEstimateLearningRateAtEachIteration, doEstimateLearningRateOnce, diff --git a/Modules/Numerics/Polynomials/include/itkMultivariateLegendrePolynomial.h b/Modules/Numerics/Polynomials/include/itkMultivariateLegendrePolynomial.h index f314b8419b5..7e8201f19b4 100644 --- a/Modules/Numerics/Polynomials/include/itkMultivariateLegendrePolynomial.h +++ b/Modules/Numerics/Polynomials/include/itkMultivariateLegendrePolynomial.h @@ -281,10 +281,10 @@ class ITKPolynomials_EXPORT MultivariateLegendrePolynomial private: MultivariateLegendrePolynomial * m_MultivariateLegendrePolynomial; - unsigned int m_Dimension; - DomainSizeType m_DomainSize; - IndexType m_Index; - bool m_IsAtEnd{ false }; + unsigned int m_Dimension; + DomainSizeType m_DomainSize; + IndexType m_Index; + bool m_IsAtEnd{ false }; }; // end of class Iterator void @@ -305,9 +305,9 @@ class ITKPolynomials_EXPORT MultivariateLegendrePolynomial private: DomainSizeType m_DomainSize{}; - unsigned int m_Dimension{}; - unsigned int m_Degree{}; - unsigned int m_NumberOfCoefficients{}; + unsigned int m_Dimension{}; + unsigned int m_Degree{}; + unsigned int m_NumberOfCoefficients{}; CoefficientArrayType m_CoefficientArray{}; CoefficientArrayType m_CachedXCoef{}; @@ -315,11 +315,11 @@ class ITKPolynomials_EXPORT MultivariateLegendrePolynomial CoefficientArrayType m_CachedZCoef{}; DoubleArrayType m_NormFactor{}; - IndexValueType m_PrevY{}; - IndexValueType m_PrevZ{}; + IndexValueType m_PrevY{}; + IndexValueType m_PrevZ{}; }; // end of class ITKPolynomials_EXPORT std::ostream & - operator<<(std::ostream & os, const MultivariateLegendrePolynomial & poly); +operator<<(std::ostream & os, const MultivariateLegendrePolynomial & poly); } // end of namespace itk #endif diff --git a/Modules/Numerics/Polynomials/src/itkMultivariateLegendrePolynomial.cxx b/Modules/Numerics/Polynomials/src/itkMultivariateLegendrePolynomial.cxx index e042b6c806b..0c71c479fe8 100644 --- a/Modules/Numerics/Polynomials/src/itkMultivariateLegendrePolynomial.cxx +++ b/Modules/Numerics/Polynomials/src/itkMultivariateLegendrePolynomial.cxx @@ -20,8 +20,8 @@ namespace itk { -MultivariateLegendrePolynomial::MultivariateLegendrePolynomial(unsigned int dimension, - unsigned int degree, +MultivariateLegendrePolynomial::MultivariateLegendrePolynomial(unsigned int dimension, + unsigned int degree, const DomainSizeType & domainSize) { if (dimension > 3 || dimension < 2) @@ -183,8 +183,8 @@ void MultivariateLegendrePolynomial::CalculateYCoef(double norm_z, const CoefficientArrayType & coef) { // compute y_coef[i,j] = sum (0 <= k <= m-i-j) pijk * P(z) - unsigned int y_index = 0; - unsigned int c_index = 0; + unsigned int y_index = 0; + unsigned int c_index = 0; const unsigned int lxmax = m_Degree; for (unsigned int lx = 0; lx <= lxmax; ++lx) @@ -192,7 +192,7 @@ MultivariateLegendrePolynomial::CalculateYCoef(double norm_z, const CoefficientA const unsigned int lymax = m_Degree - lx; for (unsigned int ly = 0; ly <= lymax; ly++, c_index++) { - unsigned int z_index = c_index; + unsigned int z_index = c_index; const unsigned int lzmax = m_Degree - lx - ly; for (unsigned int lz = 0; lz <= lzmax; ++lz) { diff --git a/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.hxx b/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.hxx index efc4636cf6b..89e2f991594 100644 --- a/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.hxx @@ -138,7 +138,7 @@ CovarianceSampleFilter::GenerateData() using TotalFrequencyType = typename SampleType::TotalAbsoluteFrequencyType; TotalFrequencyType totalFrequency{}; - typename SampleType::ConstIterator iter = input->Begin(); + typename SampleType::ConstIterator iter = input->Begin(); const typename SampleType::ConstIterator end = input->End(); // fills the lower triangle and the diagonal cells in the covariance matrix diff --git a/Modules/Numerics/Statistics/include/itkDenseFrequencyContainer2.h b/Modules/Numerics/Statistics/include/itkDenseFrequencyContainer2.h index 9019db0f512..a7f5c84ab3b 100644 --- a/Modules/Numerics/Statistics/include/itkDenseFrequencyContainer2.h +++ b/Modules/Numerics/Statistics/include/itkDenseFrequencyContainer2.h @@ -118,7 +118,7 @@ class ITKStatistics_EXPORT DenseFrequencyContainer2 : public Object private: /** Internal storage */ - FrequencyContainerPointer m_FrequencyContainer{}; + FrequencyContainerPointer m_FrequencyContainer{}; TotalAbsoluteFrequencyType m_TotalFrequency{}; }; // end of class } // end of namespace Statistics diff --git a/Modules/Numerics/Statistics/include/itkDistanceToCentroidMembershipFunction.hxx b/Modules/Numerics/Statistics/include/itkDistanceToCentroidMembershipFunction.hxx index 9dbc033f4f2..a221165381f 100644 --- a/Modules/Numerics/Statistics/include/itkDistanceToCentroidMembershipFunction.hxx +++ b/Modules/Numerics/Statistics/include/itkDistanceToCentroidMembershipFunction.hxx @@ -69,7 +69,7 @@ template typename LightObject::Pointer DistanceToCentroidMembershipFunction::InternalClone() const { - LightObject::Pointer loPtr = Superclass::InternalClone(); + LightObject::Pointer loPtr = Superclass::InternalClone(); const typename Self::Pointer membershipFunction = dynamic_cast(loPtr.GetPointer()); if (membershipFunction.IsNull()) { diff --git a/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.h b/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.h index 3331ae9afee..65d4cdf1ac7 100644 --- a/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.h +++ b/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.h @@ -232,11 +232,11 @@ class ITK_TEMPLATE_EXPORT ExpectationMaximizationMixtureModelEstimator : public int m_CurrentIteration{ 0 }; TERMINATION_CODE_ENUM m_TerminationCode{ TERMINATION_CODE_ENUM::NOT_CONVERGED }; - ComponentVectorType m_ComponentVector{}; - ProportionVectorType m_InitialProportions{}; - ProportionVectorType m_Proportions{}; + ComponentVectorType m_ComponentVector{}; + ProportionVectorType m_InitialProportions{}; + ProportionVectorType m_Proportions{}; - MembershipFunctionVectorObjectPointer m_MembershipFunctionsObject{}; + MembershipFunctionVectorObjectPointer m_MembershipFunctionsObject{}; MembershipFunctionsWeightsArrayPointer m_MembershipFunctionsWeightArrayObject{}; }; // end of class } // end of namespace Statistics diff --git a/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx b/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx index c4c8f074881..26f23bd91fa 100644 --- a/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx +++ b/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx @@ -150,10 +150,10 @@ ExpectationMaximizationMixtureModelEstimator::CalculateDensities() return false; } - const size_t numberOfComponents = m_ComponentVector.size(); + const size_t numberOfComponents = m_ComponentVector.size(); std::vector tempWeights(numberOfComponents, 0.); - typename TSample::ConstIterator iter = m_Sample->Begin(); + typename TSample::ConstIterator iter = m_Sample->Begin(); const typename TSample::ConstIterator last = m_Sample->End(); // Note: The data type of componentIndex should be unsigned int // because itk::Array only supports 'unsigned int' number of elements. @@ -161,13 +161,13 @@ ExpectationMaximizationMixtureModelEstimator::CalculateDensities() using FrequencyType = typename TSample::AbsoluteFrequencyType; constexpr FrequencyType zeroFrequency{}; - constexpr double minDouble = NumericTraits::epsilon(); - SizeValueType measurementVectorIndex = 0; + constexpr double minDouble = NumericTraits::epsilon(); + SizeValueType measurementVectorIndex = 0; while (iter != last) { typename TSample::MeasurementVectorType mvector = iter.GetMeasurementVector(); - const FrequencyType frequency = iter.GetFrequency(); - double densitySum = 0.0; + const FrequencyType frequency = iter.GetFrequency(); + double densitySum = 0.0; if (frequency > zeroFrequency) { for (unsigned int componentIndex = 0; componentIndex < numberOfComponents; ++componentIndex) @@ -269,7 +269,7 @@ ExpectationMaximizationMixtureModelEstimator::UpdateProportions() { const size_t numberOfComponents = m_ComponentVector.size(); const size_t sampleSize = m_Sample->Size(); - auto totalFrequency = static_cast(m_Sample->GetTotalFrequency()); + auto totalFrequency = static_cast(m_Sample->GetTotalFrequency()); bool updated = false; @@ -329,7 +329,7 @@ template auto ExpectationMaximizationMixtureModelEstimator::GetOutput() const -> const MembershipFunctionVectorObjectType * { - const size_t numberOfComponents = m_ComponentVector.size(); + const size_t numberOfComponents = m_ComponentVector.size(); MembershipFunctionVectorType & membershipFunctionsVector = m_MembershipFunctionsObject->Get(); const typename SampleType::MeasurementVectorSizeType measurementVectorSize = m_Sample->GetMeasurementVectorSize(); @@ -376,7 +376,7 @@ auto ExpectationMaximizationMixtureModelEstimator::GetMembershipFunctionsWeightsArray() const -> const MembershipFunctionsWeightsArrayObjectType * { - const size_t numberOfComponents = m_ComponentVector.size(); + const size_t numberOfComponents = m_ComponentVector.size(); ProportionVectorType & membershipFunctionsWeightVector = m_MembershipFunctionsWeightArrayObject->Get(); membershipFunctionsWeightVector.SetSize(static_cast(numberOfComponents)); diff --git a/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.h b/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.h index 0d1123bcced..fea88effefb 100644 --- a/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.h +++ b/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.h @@ -126,7 +126,7 @@ class ITK_TEMPLATE_EXPORT GaussianMembershipFunction : public MembershipFunction PrintSelf(std::ostream & os, Indent indent) const override; private: - MeanVectorType m_Mean{}; // mean + MeanVectorType m_Mean{}; // mean CovarianceMatrixType m_Covariance{}; // covariance matrix // inverse covariance matrix. automatically calculated diff --git a/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.hxx b/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.hxx index d42b614cbd5..f8b69061182 100644 --- a/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.hxx +++ b/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.hxx @@ -176,7 +176,7 @@ template typename LightObject::Pointer GaussianMembershipFunction::InternalClone() const { - LightObject::Pointer loPtr = Superclass::InternalClone(); + LightObject::Pointer loPtr = Superclass::InternalClone(); const typename Self::Pointer membershipFunction = dynamic_cast(loPtr.GetPointer()); if (membershipFunction.IsNull()) { diff --git a/Modules/Numerics/Statistics/include/itkGaussianMixtureModelComponent.hxx b/Modules/Numerics/Statistics/include/itkGaussianMixtureModelComponent.hxx index 5244c894fa2..f9f0706f112 100644 --- a/Modules/Numerics/Statistics/include/itkGaussianMixtureModelComponent.hxx +++ b/Modules/Numerics/Statistics/include/itkGaussianMixtureModelComponent.hxx @@ -88,7 +88,7 @@ GaussianMixtureModelComponent::SetParameters(const ParametersType & par Superclass::SetParameters(parameters); unsigned int paramIndex = 0; - bool changed = false; + bool changed = false; const MeasurementVectorSizeType measurementVectorSize = this->GetSample()->GetMeasurementVectorSize(); @@ -137,7 +137,7 @@ GaussianMixtureModelComponent::CalculateParametersChange() { typename MeanVectorType::MeasurementVectorType meanEstimate = m_MeanEstimator->GetMean(); - CovarianceMatrixType covEstimateDecoratedObject = m_CovarianceEstimator->GetOutput(); + CovarianceMatrixType covEstimateDecoratedObject = m_CovarianceEstimator->GetOutput(); typename CovarianceMatrixType::MeasurementVectorType covEstimate = covEstimateDecoratedObject->et(); MeasurementVectorSizeType measurementVectorSize = this->GetSample()->GetMeasurementVectorSize(); @@ -172,7 +172,7 @@ GaussianMixtureModelComponent::GenerateData() const WeightArrayType & weights = this->GetWeights(); - typename TSample::ConstIterator iter = this->GetSample()->Begin(); + typename TSample::ConstIterator iter = this->GetSample()->Begin(); const typename TSample::ConstIterator end = this->GetSample()->End(); typename TSample::MeasurementVectorType measurements; @@ -187,8 +187,8 @@ GaussianMixtureModelComponent::GenerateData() m_MeanEstimator->SetWeights(weights); m_MeanEstimator->Update(); - bool changed = false; - ParametersType parameters = this->GetFullParameters(); + bool changed = false; + ParametersType parameters = this->GetFullParameters(); MeasurementVectorSizeType paramIndex = 0; typename MeanEstimatorType::MeasurementVectorType meanEstimate = m_MeanEstimator->GetMean(); diff --git a/Modules/Numerics/Statistics/include/itkHistogram.h b/Modules/Numerics/Statistics/include/itkHistogram.h index da094194db1..e62d46aba72 100644 --- a/Modules/Numerics/Statistics/include/itkHistogram.h +++ b/Modules/Numerics/Statistics/include/itkHistogram.h @@ -502,9 +502,9 @@ class ITK_TEMPLATE_EXPORT Histogram : public Sample> private: using OffsetTableType = std::vector; - OffsetTableType m_OffsetTable{}; + OffsetTableType m_OffsetTable{}; FrequencyContainerPointer m_FrequencyContainer{}; - unsigned int m_NumberOfInstances{ 0 }; + unsigned int m_NumberOfInstances{ 0 }; // This method is provided here just to avoid a "hidden" warning // related to the virtual method available in DataObject. @@ -519,7 +519,7 @@ class ITK_TEMPLATE_EXPORT Histogram : public Sample> std::vector> m_Max{}; mutable MeasurementVectorType m_TempMeasurementVector{}; - mutable IndexType m_TempIndex{}; + mutable IndexType m_TempIndex{}; bool m_ClipBinsAtEnds{ true }; }; diff --git a/Modules/Numerics/Statistics/include/itkHistogram.hxx b/Modules/Numerics/Statistics/include/itkHistogram.hxx index ced4d0adbd9..205d57df903 100644 --- a/Modules/Numerics/Statistics/include/itkHistogram.hxx +++ b/Modules/Numerics/Statistics/include/itkHistogram.hxx @@ -87,18 +87,18 @@ Histogram::GetBinMax(unsigned int dimension, template void -Histogram::SetBinMin(unsigned int dimension, +Histogram::SetBinMin(unsigned int dimension, InstanceIdentifier nbin, - MeasurementType min) + MeasurementType min) { m_Min[dimension][nbin] = min; } template void -Histogram::SetBinMax(unsigned int dimension, +Histogram::SetBinMax(unsigned int dimension, InstanceIdentifier nbin, - MeasurementType max) + MeasurementType max) { m_Max[dimension][nbin] = max; } @@ -213,7 +213,7 @@ Histogram::SetToZero() template void -Histogram::Initialize(const SizeType & size, +Histogram::Initialize(const SizeType & size, MeasurementVectorType & lowerBound, MeasurementVectorType & upperBound) { @@ -243,11 +243,11 @@ Histogram::Initialize(const SizeType & template bool Histogram::GetIndex(const MeasurementVectorType & measurement, - IndexType & index) const + IndexType & index) const { // now using something similar to binary search to find // index. - unsigned int dim; + unsigned int dim; const unsigned int measurementVectorSize = this->GetMeasurementVectorSize(); if (index.Size() != measurementVectorSize) { @@ -494,7 +494,7 @@ template inline void Histogram::SetFrequency(const AbsoluteFrequencyType value) { - typename Self::Iterator iter = this->Begin(); + typename Self::Iterator iter = this->Begin(); const typename Self::Iterator end = this->End(); while (iter != end) @@ -506,7 +506,7 @@ Histogram::SetFrequency(const AbsoluteFrequen template inline bool -Histogram::SetFrequencyOfIndex(const IndexType & index, +Histogram::SetFrequencyOfIndex(const IndexType & index, const AbsoluteFrequencyType value) { return this->SetFrequency(this->GetInstanceIdentifier(index), value); @@ -515,7 +515,7 @@ Histogram::SetFrequencyOfIndex(const IndexTyp template inline bool Histogram::SetFrequencyOfMeasurement(const MeasurementVectorType & measurement, - const AbsoluteFrequencyType value) + const AbsoluteFrequencyType value) { IndexType index; this->GetIndex(measurement, index); @@ -524,7 +524,7 @@ Histogram::SetFrequencyOfMeasurement(const Me template inline bool -Histogram::IncreaseFrequencyOfIndex(const IndexType & index, +Histogram::IncreaseFrequencyOfIndex(const IndexType & index, const AbsoluteFrequencyType value) { const bool result = this->IncreaseFrequency(this->GetInstanceIdentifier(index), value); @@ -535,7 +535,7 @@ Histogram::IncreaseFrequencyOfIndex(const Ind template inline bool Histogram::IncreaseFrequencyOfMeasurement(const MeasurementVectorType & measurement, - const AbsoluteFrequencyType value) + const AbsoluteFrequencyType value) { IndexType index; @@ -564,10 +564,10 @@ Histogram::GetFrequency(InstanceIdentifier n, -> AbsoluteFrequencyType { const InstanceIdentifier nextOffset = this->m_OffsetTable[dimension + 1]; - InstanceIdentifier current = this->m_OffsetTable[dimension] * n; + InstanceIdentifier current = this->m_OffsetTable[dimension] * n; const InstanceIdentifier includeLength = this->m_OffsetTable[dimension]; - InstanceIdentifier include; - InstanceIdentifier includeEnd; + InstanceIdentifier include; + InstanceIdentifier includeEnd; const InstanceIdentifier last = this->m_OffsetTable[this->GetMeasurementVectorSize()]; AbsoluteFrequencyType frequency = 0; @@ -600,7 +600,7 @@ Histogram::Quantile(unsigned int dimension, d const unsigned int size = this->GetSize(dimension); double cumulated = 0; - auto totalFrequency = static_cast(this->GetTotalFrequency()); + auto totalFrequency = static_cast(this->GetTotalFrequency()); double f_n; @@ -608,7 +608,7 @@ Histogram::Quantile(unsigned int dimension, d if (p < 0.5) { InstanceIdentifier n = 0; - double p_n = 0.0; + double p_n = 0.0; do { f_n = this->GetFrequency(n, dimension); @@ -620,8 +620,8 @@ Histogram::Quantile(unsigned int dimension, d const double binProportion = f_n / totalFrequency; - const auto min = static_cast(this->GetBinMin(dimension, n - 1)); - const auto max = static_cast(this->GetBinMax(dimension, n - 1)); + const auto min = static_cast(this->GetBinMin(dimension, n - 1)); + const auto max = static_cast(this->GetBinMax(dimension, n - 1)); const double interval = max - min; return min + ((p - p_n_prev) / binProportion) * interval; } @@ -629,7 +629,7 @@ Histogram::Quantile(unsigned int dimension, d { InstanceIdentifier n = size - 1; InstanceIdentifier m{}; - double p_n = 1.0; + double p_n = 1.0; do { f_n = this->GetFrequency(n, dimension); @@ -641,8 +641,8 @@ Histogram::Quantile(unsigned int dimension, d } while (m < size && p_n > p); const double binProportion = f_n / totalFrequency; - const auto min = static_cast(this->GetBinMin(dimension, n + 1)); - const auto max = static_cast(this->GetBinMax(dimension, n + 1)); + const auto min = static_cast(this->GetBinMin(dimension, n + 1)); + const auto max = static_cast(this->GetBinMax(dimension, n + 1)); const double interval = max - min; return max - ((p_n_prev - p) / binProportion) * interval; } @@ -653,8 +653,8 @@ double Histogram::Mean(unsigned int dimension) const { const unsigned int size = this->GetSize(dimension); - const double totalFrequency = this->GetTotalFrequency(); - double sum = 0; + const double totalFrequency = this->GetTotalFrequency(); + double sum = 0; for (unsigned int i = 0; i < size; ++i) { const double frequency = this->GetFrequency(i, dimension); diff --git a/Modules/Numerics/Statistics/include/itkHistogramToImageFilter.hxx b/Modules/Numerics/Statistics/include/itkHistogramToImageFilter.hxx index b14e53ef73e..2336227ab34 100644 --- a/Modules/Numerics/Statistics/include/itkHistogramToImageFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkHistogramToImageFilter.hxx @@ -78,10 +78,10 @@ HistogramToImageFilter::GenerateOutputInformation // Get the input and output pointers // Get from decorator const HistogramType * inputHistogram = this->GetInput(); - OutputImageType * outputImage = this->GetOutput(); + OutputImageType * outputImage = this->GetOutput(); - SizeType size; - PointType origin; + SizeType size; + PointType origin; SpacingType spacing; // Set the image size to the number of bins along each dimension. // TODO: is it possible to have a size 0 on one of the dimension? if yes, the size must be checked @@ -122,7 +122,7 @@ HistogramToImageFilter::GenerateData() // Get the input and output pointers // Get from decorator const HistogramType * inputHistogram = this->GetInput(); - OutputImageType * outputImage = this->GetOutput(); + OutputImageType * outputImage = this->GetOutput(); // Set the TotalFrequency in the functor this->SetTotalFrequency(static_cast(inputHistogram->GetTotalFrequency())); diff --git a/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.hxx b/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.hxx index 5cf9501102c..81b86571086 100644 --- a/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.hxx @@ -98,7 +98,7 @@ HistogramToRunLengthFeaturesFilter::GenerateData() continue; } const MeasurementVectorType measurement = hit.GetMeasurementVector(); - IndexType index = inputHistogram->GetIndex(hit.GetInstanceIdentifier()); + IndexType index = inputHistogram->GetIndex(hit.GetInstanceIdentifier()); auto i2 = static_cast((index[0] + 1) * (index[0] + 1)); auto j2 = static_cast((index[1] + 1) * (index[1] + 1)); diff --git a/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.hxx b/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.hxx index 58ee375fa64..e01886b171e 100644 --- a/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.hxx @@ -183,7 +183,7 @@ HistogramToTextureFeaturesFilter::ComputeMeansAndVariances(double & // Initialize everything const typename HistogramType::SizeValueType binsPerAxis = inputHistogram->GetSize(0); - const auto marginalSums = std::make_unique(binsPerAxis); + const auto marginalSums = std::make_unique(binsPerAxis); pixelMean = 0; auto rFreqIterator = m_RelativeFrequencyContainer.begin(); @@ -194,7 +194,7 @@ HistogramToTextureFeaturesFilter::ComputeMeansAndVariances(double & while (hit != inputHistogram->End()) { const RelativeFrequencyType frequency = *rFreqIterator; - IndexType index = inputHistogram->GetIndex(hit.GetInstanceIdentifier()); + IndexType index = inputHistogram->GetIndex(hit.GetInstanceIdentifier()); pixelMean += index[0] * frequency; marginalSums[index[0]] += frequency; ++hit; @@ -215,7 +215,7 @@ HistogramToTextureFeaturesFilter::ComputeMeansAndVariances(double & marginalDevSquared = 0; for (unsigned int arrayIndex = 1; arrayIndex < binsPerAxis; ++arrayIndex) { - const int k = arrayIndex + 1; + const int k = arrayIndex + 1; const double M_k_minus_1 = marginalMean; const double S_k_minus_1 = marginalDevSquared; const double x_k = marginalSums[arrayIndex]; @@ -234,7 +234,7 @@ HistogramToTextureFeaturesFilter::ComputeMeansAndVariances(double & for (hit = inputHistogram->Begin(); hit != inputHistogram->End(); ++hit) { const RelativeFrequencyType frequency = *rFreqIterator; - IndexType index = inputHistogram->GetIndex(hit.GetInstanceIdentifier()); + IndexType index = inputHistogram->GetIndex(hit.GetInstanceIdentifier()); pixelVariance += (index[0] - pixelMean) * (index[0] - pixelMean) * frequency; ++rFreqIterator; } diff --git a/Modules/Numerics/Statistics/include/itkImageClassifierFilter.hxx b/Modules/Numerics/Statistics/include/itkImageClassifierFilter.hxx index 86a84ce25b5..d4ac0b2a714 100644 --- a/Modules/Numerics/Statistics/include/itkImageClassifierFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkImageClassifierFilter.hxx @@ -153,7 +153,7 @@ ImageClassifierFilter::GenerateData() outputImage->Allocate(); ImageRegionConstIterator inpItr(inputImage, inputImage->GetBufferedRegion()); - ImageRegionIterator outItr(outputImage, outputImage->GetBufferedRegion()); + ImageRegionIterator outItr(outputImage, outputImage->GetBufferedRegion()); inpItr.GoToBegin(); outItr.GoToBegin(); diff --git a/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.h b/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.h index 7b9e88125b0..6c85fc2a0dd 100644 --- a/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.h +++ b/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.h @@ -184,7 +184,7 @@ class ITK_TEMPLATE_EXPORT ImageToHistogramFilter : public ImageSink void ApplyMarginalScale(HistogramMeasurementVectorType & min, HistogramMeasurementVectorType & max, - HistogramSizeType & size); + HistogramSizeType & size); }; } // end of namespace Statistics } // end of namespace itk diff --git a/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx b/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx index 8ece83d92f9..7f16137ebf8 100644 --- a/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx @@ -197,7 +197,7 @@ template void ImageToHistogramFilter::ThreadedComputeMinimumAndMaximum(const RegionType & inputRegionForThread) { - const unsigned int nbOfComponents = this->GetInput()->GetNumberOfComponentsPerPixel(); + const unsigned int nbOfComponents = this->GetInput()->GetNumberOfComponentsPerPixel(); HistogramMeasurementVectorType min(nbOfComponents); HistogramMeasurementVectorType max(nbOfComponents); @@ -231,7 +231,7 @@ template void ImageToHistogramFilter::ThreadedStreamedGenerateData(const RegionType & inputRegionForThread) { - const unsigned int nbOfComponents = this->GetInput()->GetNumberOfComponentsPerPixel(); + const unsigned int nbOfComponents = this->GetInput()->GetNumberOfComponentsPerPixel(); const HistogramType * outputHistogram = this->GetOutput(); HistogramPointer histogram = HistogramType::New(); @@ -282,7 +282,7 @@ ImageToHistogramFilter::ThreadedMergeHistogram(HistogramPointer && histo using HistogramIterator = typename HistogramType::ConstIterator; - HistogramIterator hit = tomergeHistogram->Begin(); + HistogramIterator hit = tomergeHistogram->Begin(); const HistogramIterator end = tomergeHistogram->End(); typename HistogramType::IndexType index; @@ -300,16 +300,16 @@ template void ImageToHistogramFilter::ApplyMarginalScale(HistogramMeasurementVectorType & min, HistogramMeasurementVectorType & max, - HistogramSizeType & size) + HistogramSizeType & size) { const unsigned int nbOfComponents = this->GetInput()->GetNumberOfComponentsPerPixel(); - bool clipHistograms = true; + bool clipHistograms = true; for (unsigned int i = 0; i < nbOfComponents; ++i) { if (!NumericTraits::is_integer) { const HistogramMeasurementType marginalScale = this->GetMarginalScale(); - const double margin = + const double margin = (static_cast(max[i] - min[i]) / static_cast(size[i])) / static_cast(marginalScale); diff --git a/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.h b/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.h index 998c1b55dcf..59641200acd 100644 --- a/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.h +++ b/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.h @@ -210,9 +210,9 @@ class ITK_TEMPLATE_EXPORT ImageToListSampleAdaptor {} private: - ImageConstIteratorType m_Iter; + ImageConstIteratorType m_Iter; mutable MeasurementVectorType m_MeasurementVectorCache; - InstanceIdentifier m_InstanceIdentifier; + InstanceIdentifier m_InstanceIdentifier; }; /** \class Iterator @@ -257,7 +257,7 @@ class ITK_TEMPLATE_EXPORT ImageToListSampleAdaptor Begin() { const ImagePointer nonConstImage = const_cast(m_Image.GetPointer()); - ImageIteratorType imageIterator(nonConstImage, nonConstImage->GetLargestPossibleRegion()); + ImageIteratorType imageIterator(nonConstImage, nonConstImage->GetLargestPossibleRegion()); imageIterator.GoToBegin(); const Iterator iter(imageIterator, 0); return iter; @@ -267,9 +267,9 @@ class ITK_TEMPLATE_EXPORT ImageToListSampleAdaptor Iterator End() { - const ImagePointer nonConstImage = const_cast(m_Image.GetPointer()); + const ImagePointer nonConstImage = const_cast(m_Image.GetPointer()); const typename ImageType::RegionType & largestRegion = nonConstImage->GetLargestPossibleRegion(); - ImageIteratorType imageIterator(nonConstImage, largestRegion); + ImageIteratorType imageIterator(nonConstImage, largestRegion); imageIterator.GoToEnd(); const Iterator iter(imageIterator, largestRegion.GetNumberOfPixels()); @@ -292,7 +292,7 @@ class ITK_TEMPLATE_EXPORT ImageToListSampleAdaptor End() const { const typename ImageType::RegionType & largestRegion = m_Image->GetLargestPossibleRegion(); - ImageConstIteratorType imageConstIterator(m_Image, largestRegion); + ImageConstIteratorType imageConstIterator(m_Image, largestRegion); imageConstIterator.GoToEnd(); const ConstIterator iter(imageConstIterator, largestRegion.GetNumberOfPixels()); @@ -306,7 +306,7 @@ class ITK_TEMPLATE_EXPORT ImageToListSampleAdaptor PrintSelf(std::ostream & os, Indent indent) const override; private: - ImageConstPointer m_Image{}; + ImageConstPointer m_Image{}; mutable MeasurementVectorType m_MeasurementVectorInternal{}; }; // end of class ImageToListSampleAdaptor diff --git a/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.hxx b/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.hxx index cca5d01adde..37a37ed0328 100644 --- a/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.hxx @@ -112,7 +112,7 @@ ImageToListSampleFilter::GenerateData() { auto * output = static_cast(this->ProcessObject::GetOutput(0)); - const ImageType * input = this->GetInput(); + const ImageType * input = this->GetInput(); const MaskImageType * maskImage = nullptr; // Verify whether the image and the mask have the same LargestPossibleRegion. diff --git a/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.h b/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.h index a2f436c3735..8ed039b1a77 100644 --- a/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.h +++ b/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.h @@ -227,7 +227,7 @@ class ITK_TEMPLATE_EXPORT ImageToNeighborhoodSampleAdaptor private: mutable MeasurementVectorType m_MeasurementVectorCache; - InstanceIdentifier m_InstanceIdentifier; + InstanceIdentifier m_InstanceIdentifier; }; /** @@ -317,14 +317,14 @@ class ITK_TEMPLATE_EXPORT ImageToNeighborhoodSampleAdaptor PrintSelf(std::ostream & os, Indent indent) const override; private: - ImageConstPointer m_Image{}; + ImageConstPointer m_Image{}; mutable MeasurementVectorType m_MeasurementVectorInternal{}; - mutable InstanceIdentifier m_InstanceIdentifierInternal{}; - mutable IndexType m_NeighborIndexInternal{}; - NeighborhoodRadiusType m_Radius{}; - RegionType m_Region{}; - bool m_UseImageRegion{ true }; - OffsetTableType m_OffsetTable{}; + mutable InstanceIdentifier m_InstanceIdentifierInternal{}; + mutable IndexType m_NeighborIndexInternal{}; + NeighborhoodRadiusType m_Radius{}; + RegionType m_Region{}; + bool m_UseImageRegion{ true }; + OffsetTableType m_OffsetTable{}; }; // end of class ImageToNeighborhoodSampleAdaptor diff --git a/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.h b/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.h index 04736899994..36fa21e8556 100644 --- a/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.h +++ b/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.h @@ -250,8 +250,8 @@ class ITK_TEMPLATE_EXPORT JointDomainImageToListSampleAdaptor } private: - mutable MeasurementVectorType m_MeasurementVectorCache; - InstanceIdentifier m_InstanceIdentifier; + mutable MeasurementVectorType m_MeasurementVectorCache; + InstanceIdentifier m_InstanceIdentifier; const JointDomainImageToListSampleAdaptor * m_Adaptor; }; @@ -334,13 +334,13 @@ class ITK_TEMPLATE_EXPORT JointDomainImageToListSampleAdaptor PrintSelf(std::ostream & os, Indent indent) const override; private: - NormalizationFactorsType m_NormalizationFactors{}; - mutable MeasurementVectorType m_TempVector{}; - mutable PointType m_TempPoint{}; - mutable ImageIndexType m_TempIndex{}; + NormalizationFactorsType m_NormalizationFactors{}; + mutable MeasurementVectorType m_TempVector{}; + mutable PointType m_TempPoint{}; + mutable ImageIndexType m_TempIndex{}; mutable RangeDomainMeasurementVectorType m_TempRangeVector{}; - ImageConstPointer m_Image{}; - bool m_UsePixelContainer{}; + ImageConstPointer m_Image{}; + bool m_UsePixelContainer{}; PixelContainerConstPointer m_PixelContainer{}; }; // end of class JointDomainImageToListSampleAdaptor diff --git a/Modules/Numerics/Statistics/include/itkKalmanLinearEstimator.h b/Modules/Numerics/Statistics/include/itkKalmanLinearEstimator.h index 7d23643ff5e..bc2fffe58b9 100644 --- a/Modules/Numerics/Statistics/include/itkKalmanLinearEstimator.h +++ b/Modules/Numerics/Statistics/include/itkKalmanLinearEstimator.h @@ -148,7 +148,7 @@ class KalmanLinearEstimator template void -KalmanLinearEstimator::UpdateWithNewMeasure(const ValueType & newMeasure, +KalmanLinearEstimator::UpdateWithNewMeasure(const ValueType & newMeasure, const VectorType & newPredictor) { const ValueType measurePrediction = dot_product(newPredictor, m_Estimator); diff --git a/Modules/Numerics/Statistics/include/itkKdTree.h b/Modules/Numerics/Statistics/include/itkKdTree.h index 0e227bcb402..06a4c96e1e7 100644 --- a/Modules/Numerics/Statistics/include/itkKdTree.h +++ b/Modules/Numerics/Statistics/include/itkKdTree.h @@ -241,11 +241,11 @@ struct ITK_TEMPLATE_EXPORT KdTreeNonterminalNode : public KdTreeNode } private: - unsigned int m_PartitionDimension{}; - MeasurementType m_PartitionValue{}; + unsigned int m_PartitionDimension{}; + MeasurementType m_PartitionValue{}; InstanceIdentifier m_InstanceIdentifier{}; - Superclass * m_Left{}; - Superclass * m_Right{}; + Superclass * m_Left{}; + Superclass * m_Right{}; }; // end of class /** @@ -375,14 +375,14 @@ struct ITK_TEMPLATE_EXPORT KdTreeWeightedCentroidNonterminalNode : public KdTree private: MeasurementVectorSizeType m_MeasurementVectorSize{}; - unsigned int m_PartitionDimension{}; - MeasurementType m_PartitionValue{}; - CentroidType m_WeightedCentroid{}; - CentroidType m_Centroid{}; - InstanceIdentifier m_InstanceIdentifier{}; - unsigned int m_Size{}; - Superclass * m_Left{}; - Superclass * m_Right{}; + unsigned int m_PartitionDimension{}; + MeasurementType m_PartitionValue{}; + CentroidType m_WeightedCentroid{}; + CentroidType m_Centroid{}; + InstanceIdentifier m_InstanceIdentifier{}; + unsigned int m_Size{}; + Superclass * m_Left{}; + Superclass * m_Right{}; }; // end of class /** @@ -625,7 +625,7 @@ class ITK_TEMPLATE_EXPORT KdTree : public Object { m_Identifiers[m_FarthestNeighborIndex] = id; m_Distances[m_FarthestNeighborIndex] = distance; - double farthestDistance = NumericTraits::min(); + double farthestDistance = NumericTraits::min(); const auto size = static_cast(m_Distances.size()); for (unsigned int i = 0; i < size; ++i) { diff --git a/Modules/Numerics/Statistics/include/itkKdTree.hxx b/Modules/Numerics/Statistics/include/itkKdTree.hxx index f99e917b55c..57a5f9fe2cf 100644 --- a/Modules/Numerics/Statistics/include/itkKdTree.hxx +++ b/Modules/Numerics/Statistics/include/itkKdTree.hxx @@ -24,10 +24,10 @@ namespace itk namespace Statistics { template -KdTreeNonterminalNode::KdTreeNonterminalNode(unsigned int partitionDimension, +KdTreeNonterminalNode::KdTreeNonterminalNode(unsigned int partitionDimension, MeasurementType partitionValue, - Superclass * left, - Superclass * right) + Superclass * left, + Superclass * right) : m_PartitionDimension(partitionDimension) , m_PartitionValue(partitionValue) , m_InstanceIdentifier(0) @@ -46,10 +46,10 @@ KdTreeNonterminalNode::GetParameters(unsigned int & partitionDimension, template KdTreeWeightedCentroidNonterminalNode::KdTreeWeightedCentroidNonterminalNode(unsigned int partitionDimension, MeasurementType partitionValue, - Superclass * left, - Superclass * right, - CentroidType & centroid, - unsigned int size) + Superclass * left, + Superclass * right, + CentroidType & centroid, + unsigned int size) { this->m_PartitionDimension = partitionDimension; this->m_PartitionValue = partitionValue; @@ -65,7 +65,7 @@ KdTreeWeightedCentroidNonterminalNode::KdTreeWeightedCentroidNontermina template void -KdTreeWeightedCentroidNonterminalNode::GetParameters(unsigned int & partitionDimension, +KdTreeWeightedCentroidNonterminalNode::GetParameters(unsigned int & partitionDimension, MeasurementType & partitionValue) const { partitionDimension = this->m_PartitionDimension; @@ -171,8 +171,8 @@ KdTree::SetBucketSize(unsigned int size) template void -KdTree::Search(const MeasurementVectorType & query, - unsigned int numberOfNeighborsRequested, +KdTree::Search(const MeasurementVectorType & query, + unsigned int numberOfNeighborsRequested, InstanceIdentifierVectorType & result) const { // This function has two different signatures. The other signature, that returns the distances vector too, @@ -183,10 +183,10 @@ KdTree::Search(const MeasurementVectorType & query, template void -KdTree::Search(const MeasurementVectorType & query, - unsigned int numberOfNeighborsRequested, +KdTree::Search(const MeasurementVectorType & query, + unsigned int numberOfNeighborsRequested, InstanceIdentifierVectorType & result, - std::vector & distances) const + std::vector & distances) const { if (numberOfNeighborsRequested > this->Size()) { @@ -222,15 +222,15 @@ KdTree::Search(const MeasurementVectorType & query, template inline int -KdTree::NearestNeighborSearchLoop(const KdTreeNodeType * node, +KdTree::NearestNeighborSearchLoop(const KdTreeNodeType * node, const MeasurementVectorType & query, - MeasurementVectorType & lowerBound, - MeasurementVectorType & upperBound, - NearestNeighbors & nearestNeighbors) const + MeasurementVectorType & lowerBound, + MeasurementVectorType & upperBound, + NearestNeighbors & nearestNeighbors) const { - unsigned int i; + unsigned int i; InstanceIdentifier tempId; - double tempDistance; + double tempDistance; if (node->IsTerminal()) { @@ -259,7 +259,7 @@ KdTree::NearestNeighborSearchLoop(const KdTreeNodeType * node, return 0; } - unsigned int partitionDimension; + unsigned int partitionDimension; MeasurementType partitionValue; MeasurementType tempValue; node->GetParameters(partitionDimension, partitionValue); @@ -352,15 +352,15 @@ KdTree::Search(const MeasurementVectorType & query, double radius, Inst template inline int -KdTree::SearchLoop(const KdTreeNodeType * node, - const MeasurementVectorType & query, - double radius, - MeasurementVectorType & lowerBound, - MeasurementVectorType & upperBound, +KdTree::SearchLoop(const KdTreeNodeType * node, + const MeasurementVectorType & query, + double radius, + MeasurementVectorType & lowerBound, + MeasurementVectorType & upperBound, InstanceIdentifierVectorType & neighbors) const { InstanceIdentifier tempId; - double tempDistance; + double tempDistance; if (node->IsTerminal()) { @@ -398,7 +398,7 @@ KdTree::SearchLoop(const KdTreeNodeType * node, } } - unsigned int partitionDimension; + unsigned int partitionDimension; MeasurementType partitionValue; MeasurementType tempValue; node->GetParameters(partitionDimension, partitionValue); @@ -456,9 +456,9 @@ KdTree::SearchLoop(const KdTreeNodeType * node, template inline bool KdTree::BallWithinBounds(const MeasurementVectorType & query, - MeasurementVectorType & lowerBound, - MeasurementVectorType & upperBound, - double radius) const + MeasurementVectorType & lowerBound, + MeasurementVectorType & upperBound, + double radius) const { for (unsigned int d = 0; d < this->m_MeasurementVectorSize; ++d) { @@ -474,9 +474,9 @@ KdTree::BallWithinBounds(const MeasurementVectorType & query, template inline bool KdTree::BoundsOverlapBall(const MeasurementVectorType & query, - MeasurementVectorType & lowerBound, - MeasurementVectorType & upperBound, - double radius) const + MeasurementVectorType & lowerBound, + MeasurementVectorType & upperBound, + double radius) const { const double squaredSearchRadius = itk::Math::sqr(radius); @@ -516,9 +516,9 @@ KdTree::PrintTree(std::ostream & os) const template void KdTree::PrintTree(KdTreeNodeType * node, - unsigned int level, - unsigned int activeDimension, - std::ostream & os) const + unsigned int level, + unsigned int activeDimension, + std::ostream & os) const { ++level; if (node->IsTerminal()) @@ -541,7 +541,7 @@ KdTree::PrintTree(KdTreeNodeType * node, return; } - unsigned int partitionDimension; + unsigned int partitionDimension; MeasurementType partitionValue; node->GetParameters(partitionDimension, partitionValue); @@ -583,7 +583,7 @@ template void KdTree::PlotTree(KdTreeNodeType * node, std::ostream & os) const { - unsigned int partitionDimension; + unsigned int partitionDimension; MeasurementType partitionValue; node->GetParameters(partitionDimension, partitionValue); diff --git a/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.h b/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.h index 8ea350a18fc..df04bbc4b90 100644 --- a/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.h +++ b/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.h @@ -182,7 +182,7 @@ class ITK_TEMPLATE_EXPORT KdTreeBasedKmeansEstimator : public Object { CentroidType Centroid; CentroidType WeightedCentroid; - int Size; + int Size; }; // end of struct virtual ~CandidateVector() = default; @@ -271,16 +271,16 @@ class ITK_TEMPLATE_EXPORT KdTreeBasedKmeansEstimator : public Object /** returns true if the pointA is farther than pointB to the boundary */ bool - IsFarther(ParameterType & pointA, - ParameterType & pointB, + IsFarther(ParameterType & pointA, + ParameterType & pointB, MeasurementVectorType & lowerBound, MeasurementVectorType & upperBound); /** recursive pruning algorithm. the validIndexes vector contains * only the indexes of the surviving candidates for the node */ void - Filter(KdTreeNodeType * node, - std::vector validIndexes, + Filter(KdTreeNodeType * node, + std::vector validIndexes, MeasurementVectorType & lowerBound, MeasurementVectorType & upperBound); @@ -325,10 +325,10 @@ class ITK_TEMPLATE_EXPORT KdTreeBasedKmeansEstimator : public Object ParameterType m_TempVertex{}; - bool m_UseClusterLabels{ false }; - bool m_GenerateClusterLabels{ false }; - ClusterLabelsType m_ClusterLabels{}; - MeasurementVectorSizeType m_MeasurementVectorSize{ 0 }; + bool m_UseClusterLabels{ false }; + bool m_GenerateClusterLabels{ false }; + ClusterLabelsType m_ClusterLabels{}; + MeasurementVectorSizeType m_MeasurementVectorSize{ 0 }; MembershipFunctionVectorObjectPointer m_MembershipFunctionsObject{}; }; // end of class } // end of namespace Statistics diff --git a/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.hxx b/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.hxx index 801d8b3d7c4..cc2f36ae9c8 100644 --- a/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.hxx +++ b/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.hxx @@ -66,8 +66,8 @@ double KdTreeBasedKmeansEstimator::GetSumOfSquaredPositionChanges(InternalParametersType & previous, InternalParametersType & current) { - double temp; - double sum = 0.0; + double temp; + double sum = 0.0; unsigned int i; for (i = 0; i < static_cast(previous.size()); ++i) @@ -82,7 +82,7 @@ template inline int KdTreeBasedKmeansEstimator::GetClosestCandidate(ParameterType & measurements, std::vector & validIndexes) { - int closest = 0; + int closest = 0; double closestDistance = NumericTraits::max(); double tempDistance; @@ -102,8 +102,8 @@ KdTreeBasedKmeansEstimator::GetClosestCandidate(ParameterType & measure template inline bool -KdTreeBasedKmeansEstimator::IsFarther(ParameterType & pointA, - ParameterType & pointB, +KdTreeBasedKmeansEstimator::IsFarther(ParameterType & pointA, + ParameterType & pointB, MeasurementVectorType & lowerBound, MeasurementVectorType & upperBound) { @@ -131,8 +131,8 @@ KdTreeBasedKmeansEstimator::IsFarther(ParameterType & pointA, template inline void -KdTreeBasedKmeansEstimator::Filter(KdTreeNodeType * node, - std::vector validIndexes, +KdTreeBasedKmeansEstimator::Filter(KdTreeNodeType * node, + std::vector validIndexes, MeasurementVectorType & lowerBound, MeasurementVectorType & upperBound) { @@ -171,9 +171,9 @@ KdTreeBasedKmeansEstimator::Filter(KdTreeNodeType * node, CentroidType centroid; node->GetCentroid(centroid); - const int closest = this->GetClosestCandidate(centroid, validIndexes); + const int closest = this->GetClosestCandidate(centroid, validIndexes); ParameterType closestPosition = m_CandidateVector[closest].Centroid; - auto iter = validIndexes.begin(); + auto iter = validIndexes.begin(); while (iter != validIndexes.end()) { @@ -204,7 +204,7 @@ KdTreeBasedKmeansEstimator::Filter(KdTreeNodeType * node, } else { - unsigned int partitionDimension; + unsigned int partitionDimension; MeasurementType partitionValue; MeasurementType tempValue; node->GetParameters(partitionDimension, partitionValue); @@ -392,7 +392,7 @@ KdTreeBasedKmeansEstimator::GetOutput() const -> const MembershipFuncti { // INSERT CHECKS if all the required inputs are set and optimization has been // run. - const unsigned int numberOfClasses = m_Parameters.size() / m_MeasurementVectorSize; + const unsigned int numberOfClasses = m_Parameters.size() / m_MeasurementVectorSize; MembershipFunctionVectorType & membershipFunctionsVector = m_MembershipFunctionsObject->Get(); for (unsigned int i = 0; i < numberOfClasses; ++i) diff --git a/Modules/Numerics/Statistics/include/itkKdTreeGenerator.h b/Modules/Numerics/Statistics/include/itkKdTreeGenerator.h index a8cbd51691f..54eddacf6b0 100644 --- a/Modules/Numerics/Statistics/include/itkKdTreeGenerator.h +++ b/Modules/Numerics/Statistics/include/itkKdTreeGenerator.h @@ -162,19 +162,19 @@ class ITK_TEMPLATE_EXPORT KdTreeGenerator : public Object /** Nonterminal node generation routine */ virtual KdTreeNodeType * - GenerateNonterminalNode(unsigned int beginIndex, - unsigned int endIndex, + GenerateNonterminalNode(unsigned int beginIndex, + unsigned int endIndex, MeasurementVectorType & lowerBound, MeasurementVectorType & upperBound, - unsigned int level); + unsigned int level); /** Tree generation loop */ KdTreeNodeType * - GenerateTreeLoop(unsigned int beginIndex, - unsigned int endIndex, + GenerateTreeLoop(unsigned int beginIndex, + unsigned int endIndex, MeasurementVectorType & lowerBound, MeasurementVectorType & upperBound, - unsigned int level); + unsigned int level); private: /** Pointer to the input (source) sample */ diff --git a/Modules/Numerics/Statistics/include/itkKdTreeGenerator.hxx b/Modules/Numerics/Statistics/include/itkKdTreeGenerator.hxx index 54b9ac0fecc..b57b8aea391 100644 --- a/Modules/Numerics/Statistics/include/itkKdTreeGenerator.hxx +++ b/Modules/Numerics/Statistics/include/itkKdTreeGenerator.hxx @@ -114,21 +114,21 @@ KdTreeGenerator::GenerateData() template inline auto -KdTreeGenerator::GenerateNonterminalNode(unsigned int beginIndex, - unsigned int endIndex, +KdTreeGenerator::GenerateNonterminalNode(unsigned int beginIndex, + unsigned int endIndex, MeasurementVectorType & lowerBound, MeasurementVectorType & upperBound, - unsigned int level) -> KdTreeNodeType * + unsigned int level) -> KdTreeNodeType * { using NodeType = typename KdTreeType::KdTreeNodeType; MeasurementType dimensionLowerBound; MeasurementType dimensionUpperBound; MeasurementType partitionValue; - unsigned int partitionDimension = 0; - unsigned int i; + unsigned int partitionDimension = 0; + unsigned int i; MeasurementType spread; MeasurementType maxSpread; - unsigned int medianIndex; + unsigned int medianIndex; const SubsamplePointer subsample = this->GetSubsample(); @@ -165,13 +165,13 @@ KdTreeGenerator::GenerateNonterminalNode(unsigned int beginI upperBound[partitionDimension] = partitionValue; const unsigned int beginLeftIndex = beginIndex; const unsigned int endLeftIndex = medianIndex; - NodeType * left = GenerateTreeLoop(beginLeftIndex, endLeftIndex, lowerBound, upperBound, level + 1); + NodeType * left = GenerateTreeLoop(beginLeftIndex, endLeftIndex, lowerBound, upperBound, level + 1); upperBound[partitionDimension] = dimensionUpperBound; lowerBound[partitionDimension] = partitionValue; const unsigned int beginRightIndex = medianIndex + 1; const unsigned int endRightIndex = endIndex; - NodeType * right = GenerateTreeLoop(beginRightIndex, endRightIndex, lowerBound, upperBound, level + 1); + NodeType * right = GenerateTreeLoop(beginRightIndex, endRightIndex, lowerBound, upperBound, level + 1); lowerBound[partitionDimension] = dimensionLowerBound; using KdTreeNonterminalNodeType = KdTreeNonterminalNode; @@ -185,11 +185,11 @@ KdTreeGenerator::GenerateNonterminalNode(unsigned int beginI template inline auto -KdTreeGenerator::GenerateTreeLoop(unsigned int beginIndex, - unsigned int endIndex, +KdTreeGenerator::GenerateTreeLoop(unsigned int beginIndex, + unsigned int endIndex, MeasurementVectorType & lowerBound, MeasurementVectorType & upperBound, - unsigned int level) -> KdTreeNodeType * + unsigned int level) -> KdTreeNodeType * { if (endIndex - beginIndex <= m_BucketSize) { diff --git a/Modules/Numerics/Statistics/include/itkListSample.h b/Modules/Numerics/Statistics/include/itkListSample.h index 6f0b9cec103..fd15a561066 100644 --- a/Modules/Numerics/Statistics/include/itkListSample.h +++ b/Modules/Numerics/Statistics/include/itkListSample.h @@ -200,7 +200,7 @@ class ITK_TEMPLATE_EXPORT ListSample : public Sample private: using InternalIterator = typename InternalDataContainerType::const_iterator; - InternalIterator m_Iter; + InternalIterator m_Iter; InstanceIdentifier m_InstanceIdentifier; }; diff --git a/Modules/Numerics/Statistics/include/itkListSample.hxx b/Modules/Numerics/Statistics/include/itkListSample.hxx index 9d450edc35e..b743b173ee8 100644 --- a/Modules/Numerics/Statistics/include/itkListSample.hxx +++ b/Modules/Numerics/Statistics/include/itkListSample.hxx @@ -80,8 +80,8 @@ ListSample::GetMeasurementVector(InstanceIdentifier instance template void -ListSample::SetMeasurement(InstanceIdentifier instanceId, - unsigned int dim, +ListSample::SetMeasurement(InstanceIdentifier instanceId, + unsigned int dim, const MeasurementType & value) { if (instanceId < m_InternalContainer.size()) diff --git a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.h b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.h index 49d764763b0..8059e555b17 100644 --- a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.h +++ b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.h @@ -130,7 +130,7 @@ class ITK_TEMPLATE_EXPORT MahalanobisDistanceMembershipFunction : public Members PrintSelf(std::ostream & os, Indent indent) const override; private: - MeanVectorType m_Mean{}; // mean + MeanVectorType m_Mean{}; // mean CovarianceMatrixType m_Covariance{}; // covariance matrix // inverse covariance matrix. automatically calculated diff --git a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.hxx b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.hxx index bdf1497ba7a..9a8a0ed0900 100644 --- a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.hxx +++ b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.hxx @@ -176,7 +176,7 @@ template typename LightObject::Pointer MahalanobisDistanceMembershipFunction::InternalClone() const { - LightObject::Pointer loPtr = Superclass::InternalClone(); + LightObject::Pointer loPtr = Superclass::InternalClone(); const typename Self::Pointer membershipFunction = dynamic_cast(loPtr.GetPointer()); if (membershipFunction.IsNull()) { diff --git a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.h b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.h index 4a997ec9bd2..9faf19420d1 100644 --- a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.h +++ b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.h @@ -122,7 +122,7 @@ class ITK_TEMPLATE_EXPORT MahalanobisDistanceMetric : public DistanceMetric::ThreadedComputeMinimumAndMaximum( const RegionType & inputRegionForThread) { - const unsigned int nbOfComponents = this->GetInput()->GetNumberOfComponentsPerPixel(); + const unsigned int nbOfComponents = this->GetInput()->GetNumberOfComponentsPerPixel(); HistogramMeasurementVectorType min(nbOfComponents); HistogramMeasurementVectorType max(nbOfComponents); const MaskPixelType maskValue = this->GetMaskValue(); - ImageRegionConstIterator inputIt(this->GetInput(), inputRegionForThread); + ImageRegionConstIterator inputIt(this->GetInput(), inputRegionForThread); ImageRegionConstIterator maskIt(this->GetMaskImage(), inputRegionForThread); inputIt.GoToBegin(); maskIt.GoToBegin(); @@ -78,7 +78,7 @@ template void MaskedImageToHistogramFilter::ThreadedStreamedGenerateData(const RegionType & inputRegionForThread) { - const unsigned int nbOfComponents = this->GetInput()->GetNumberOfComponentsPerPixel(); + const unsigned int nbOfComponents = this->GetInput()->GetNumberOfComponentsPerPixel(); const HistogramType * outputHistogram = this->GetOutput(); HistogramPointer histogram = HistogramType::New(); @@ -86,12 +86,12 @@ MaskedImageToHistogramFilter::ThreadedStreamedGenerateData(c histogram->SetMeasurementVectorSize(nbOfComponents); histogram->Initialize(outputHistogram->GetSize(), this->m_Minimum, this->m_Maximum); - ImageRegionConstIterator inputIt(this->GetInput(), inputRegionForThread); + ImageRegionConstIterator inputIt(this->GetInput(), inputRegionForThread); ImageRegionConstIterator maskIt(this->GetMaskImage(), inputRegionForThread); inputIt.GoToBegin(); maskIt.GoToBegin(); HistogramMeasurementVectorType m(nbOfComponents); - const MaskPixelType maskValue = this->GetMaskValue(); + const MaskPixelType maskValue = this->GetMaskValue(); typename HistogramType::IndexType index; while (!inputIt.IsAtEnd()) diff --git a/Modules/Numerics/Statistics/include/itkMeanSampleFilter.hxx b/Modules/Numerics/Statistics/include/itkMeanSampleFilter.hxx index 30b2d0804ef..d5049965aca 100644 --- a/Modules/Numerics/Statistics/include/itkMeanSampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkMeanSampleFilter.hxx @@ -125,7 +125,7 @@ MeanSampleFilter::GenerateData() using TotalFrequencyType = typename SampleType::TotalAbsoluteFrequencyType; TotalFrequencyType totalFrequency{}; - typename SampleType::ConstIterator iter = input->Begin(); + typename SampleType::ConstIterator iter = input->Begin(); const typename SampleType::ConstIterator end = input->End(); for (; iter != end; ++iter) diff --git a/Modules/Numerics/Statistics/include/itkMeasurementVectorTraits.h b/Modules/Numerics/Statistics/include/itkMeasurementVectorTraits.h index 931a053450a..15f0859c6c9 100644 --- a/Modules/Numerics/Statistics/include/itkMeasurementVectorTraits.h +++ b/Modules/Numerics/Statistics/include/itkMeasurementVectorTraits.h @@ -122,7 +122,7 @@ class MeasurementVectorTraits static MeasurementVectorLength Assert(const VariableLengthVector & a, const VariableLengthVector & b, - const char * errMsg = "Length Mismatch") + const char * errMsg = "Length Mismatch") { if (b.Size() != a.Size()) { @@ -135,7 +135,7 @@ class MeasurementVectorTraits static MeasurementVectorLength Assert(const VariableLengthVector * a, const VariableLengthVector * b, - const char * errMsg = "Length Mismatch") + const char * errMsg = "Length Mismatch") { if (b->Size() != a->Size()) { @@ -203,7 +203,7 @@ class MeasurementVectorTraits static MeasurementVectorLength Assert(const FixedArray &, const VariableLengthVector & b, - const char * errMsg = "Length Mismatch") + const char * errMsg = "Length Mismatch") { if (b.Size() == 0) { @@ -223,7 +223,7 @@ class MeasurementVectorTraits static MeasurementVectorLength Assert(const FixedArray *, const VariableLengthVector * b, - const char * errMsg = "Length Mismatch") + const char * errMsg = "Length Mismatch") { if (b->Size() == 0) { @@ -332,8 +332,8 @@ class MeasurementVectorTraits template static MeasurementVectorLength Assert(const VariableLengthVector & a, - const MeasurementVectorLength l, - const char * errMsg = "Length Mismatch") + const MeasurementVectorLength l, + const char * errMsg = "Length Mismatch") { if (((l != 0) && (a.Size() != l)) || (a.Size() == 0)) { @@ -349,8 +349,8 @@ class MeasurementVectorTraits template static MeasurementVectorLength Assert(const VariableLengthVector * a, - const MeasurementVectorLength l, - const char * errMsg = "Length Mismatch") + const MeasurementVectorLength l, + const char * errMsg = "Length Mismatch") { if (((l != 0) && (a->Size() != l)) || (a->Size() == 0)) { diff --git a/Modules/Numerics/Statistics/include/itkMembershipSample.h b/Modules/Numerics/Statistics/include/itkMembershipSample.h index 828a5ec3124..f1027b4010d 100644 --- a/Modules/Numerics/Statistics/include/itkMembershipSample.h +++ b/Modules/Numerics/Statistics/include/itkMembershipSample.h @@ -226,9 +226,9 @@ class ITK_TEMPLATE_EXPORT MembershipSample : public DataObject {} // typename SampleType::ConstIterator m_Iter; - const TSample * m_Sample; + const TSample * m_Sample; const MembershipSample * m_MembershipSample; - InstanceIdentifier m_InstanceIdentifier; + InstanceIdentifier m_InstanceIdentifier; }; class Iterator : public ConstIterator @@ -316,11 +316,11 @@ class ITK_TEMPLATE_EXPORT MembershipSample : public DataObject int GetInternalClassLabel(const ClassLabelType classLabel) const; - UniqueClassLabelsType m_UniqueClassLabels{}; - ClassLabelHolderType m_ClassLabelHolder{}; + UniqueClassLabelsType m_UniqueClassLabels{}; + ClassLabelHolderType m_ClassLabelHolder{}; std::vector m_ClassSamples{}; - SampleConstPointer m_Sample{}; - unsigned int m_NumberOfClasses{}; + SampleConstPointer m_Sample{}; + unsigned int m_NumberOfClasses{}; }; // end of class } // end of namespace Statistics } // end of namespace itk diff --git a/Modules/Numerics/Statistics/include/itkNormalVariateGenerator.h b/Modules/Numerics/Statistics/include/itkNormalVariateGenerator.h index 8e8ea41f686..4987235fb56 100644 --- a/Modules/Numerics/Statistics/include/itkNormalVariateGenerator.h +++ b/Modules/Numerics/Statistics/include/itkNormalVariateGenerator.h @@ -149,15 +149,15 @@ class ITKStatistics_EXPORT NormalVariateGenerator : public RandomVariateGenerato static constexpr int m_LMASK{ 4 * (m_LEN - 1) }; static constexpr int m_TLEN{ 8 * m_LEN }; - int m_Gaussfaze{}; + int m_Gaussfaze{}; int * m_Gausssave{}; double m_GScale{}; - int m_Vec1[m_TLEN]{}; - int m_Nslew{}; - int m_Irs{}; - int m_Lseed{}; + int m_Vec1[m_TLEN]{}; + int m_Nslew{}; + int m_Irs{}; + int m_Lseed{}; double m_Chic1{}; double m_Chic2{}; double m_ActualRSD{}; diff --git a/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.h b/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.h index 80203d45952..77c102f0873 100644 --- a/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.h +++ b/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.h @@ -178,7 +178,7 @@ class ITK_TEMPLATE_EXPORT PointSetToListSampleAdaptor : public ListSample::GenerateData() output->SetSample(this->GetInput()); output->SetNumberOfClasses(this->m_NumberOfClasses); - typename TSample::ConstIterator iter = sample->Begin(); + typename TSample::ConstIterator iter = sample->Begin(); const typename TSample::ConstIterator end = sample->End(); while (iter != end) diff --git a/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx b/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx index 4de60ef3e85..8a922dd1d96 100644 --- a/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx @@ -249,12 +249,12 @@ SampleToHistogramFilter::GenerateData() // the upper and lower bound from the FindSampleBound function outputHistogram->Initialize(histogramSize, h_lower, h_upper); - typename SampleType::ConstIterator iter = inputSample->Begin(); + typename SampleType::ConstIterator iter = inputSample->Begin(); const typename SampleType::ConstIterator last = inputSample->End(); typename SampleType::MeasurementVectorType lvector; - typename HistogramType::IndexType index(measurementVectorSize); + typename HistogramType::IndexType index(measurementVectorSize); typename HistogramType::MeasurementVectorType hvector(measurementVectorSize); unsigned int i; diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.h b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.h index 46b5064911c..c82d2772c53 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.h +++ b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.h @@ -213,13 +213,13 @@ class ITK_TEMPLATE_EXPORT ScalarImageToCooccurrenceMatrixFilter : public Process NormalizeHistogram(); OffsetVectorConstPointer m_Offsets{}; - PixelType m_Min{}; - PixelType m_Max{}; + PixelType m_Min{}; + PixelType m_Max{}; - unsigned int m_NumberOfBinsPerAxis{}; + unsigned int m_NumberOfBinsPerAxis{}; MeasurementVectorType m_LowerBound{}; MeasurementVectorType m_UpperBound{}; - bool m_Normalize{}; + bool m_Normalize{}; MaskPixelType m_InsidePixelValue{}; }; diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.hxx b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.hxx index 91fbe603889..49a36d0dc51 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.hxx @@ -140,7 +140,7 @@ ScalarImageToCooccurrenceMatrixFilterInitialize(size, m_LowerBound, m_UpperBound); // Next, find the minimum radius that encloses all the offsets. - unsigned int minRadius = 0; + unsigned int minRadius = 0; typename OffsetVector::ConstIterator offsets; for (offsets = m_Offsets->Begin(); offsets != m_Offsets->End(); ++offsets) { @@ -209,10 +209,10 @@ ScalarImageToCooccurrenceMatrixFilterBegin(); offsets != m_Offsets->End(); ++offsets) { - bool pixelInBounds; + bool pixelInBounds; const PixelType pixelIntensity = neighborIt.GetPixel(offsets.Value(), pixelInBounds); if (!pixelInBounds) @@ -245,8 +245,8 @@ ScalarImageToCooccurrenceMatrixFilter void ScalarImageToCooccurrenceMatrixFilter::FillHistogramWithMask( - RadiusType radius, - RegionType region, + RadiusType radius, + RegionType region, const MaskImageType * maskImage) { // Iterate over all of those pixels and offsets, adding each @@ -263,7 +263,7 @@ ScalarImageToCooccurrenceMatrixFilter; MaskNeighborhoodIteratorType maskNeighborIt(radius, maskImage, region); - MeasurementVectorType cooccur(output->GetMeasurementVectorSize()); + MeasurementVectorType cooccur(output->GetMeasurementVectorSize()); typename HistogramType::IndexType index; for (neighborIt.GoToBegin(), maskNeighborIt.GoToBegin(); !neighborIt.IsAtEnd(); ++neighborIt, ++maskNeighborIt) { @@ -288,7 +288,7 @@ ScalarImageToCooccurrenceMatrixFilter::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); os << indent << "Offsets: " << this->GetOffsets() << std::endl; diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.h b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.h index e15a12bed1a..3f046aa0cc2 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.h +++ b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.h @@ -222,11 +222,11 @@ class ITK_TEMPLATE_EXPORT ScalarImageToRunLengthFeaturesFilter : public ProcessO private: typename RunLengthMatrixFilterType::Pointer m_RunLengthMatrixGenerator{}; - FeatureValueVectorPointer m_FeatureMeans{}; - FeatureValueVectorPointer m_FeatureStandardDeviations{}; + FeatureValueVectorPointer m_FeatureMeans{}; + FeatureValueVectorPointer m_FeatureStandardDeviations{}; FeatureNameVectorConstPointer m_RequestedFeatures{}; - OffsetVectorConstPointer m_Offsets{}; - bool m_FastCalculations{}; + OffsetVectorConstPointer m_Offsets{}; + bool m_FastCalculations{}; }; } // end of namespace Statistics } // end of namespace itk diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.hxx b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.hxx index 1c65ba134e0..d885b35ce0d 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.hxx @@ -73,7 +73,7 @@ ScalarImageToRunLengthFeaturesFilter::Scal // select all "previous" neighbors that are face+edge+vertex // connected to the current pixel. do not include the center pixel. - const unsigned int centerIndex = hood.GetCenterNeighborhoodIndex(); + const unsigned int centerIndex = hood.GetCenterNeighborhoodIndex(); const OffsetVectorPointer offsets = OffsetVector::New(); for (unsigned int d = 0; d < centerIndex; ++d) { @@ -112,7 +112,7 @@ ScalarImageToRunLengthFeaturesFilter::Full { const size_t numOffsets = this->m_Offsets->size(); const size_t numFeatures = this->m_RequestedFeatures->size(); - auto ** features = new double *[numOffsets]; + auto ** features = new double *[numOffsets]; for (size_t i = 0; i < numOffsets; ++i) { features[i] = new double[numFeatures]; @@ -342,7 +342,7 @@ ScalarImageToRunLengthFeaturesFilter::SetI template void ScalarImageToRunLengthFeaturesFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); os << indent << "RequestedFeatures: " << this->GetRequestedFeatures() << std::endl; diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.h b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.h index fb4943a5333..c70a1d00545 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.h +++ b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.h @@ -266,15 +266,15 @@ class ITK_TEMPLATE_EXPORT ScalarImageToRunLengthMatrixFilter : public ProcessObj private: unsigned int m_NumberOfBinsPerAxis{}; - PixelType m_Min{}; - PixelType m_Max{}; - RealType m_MinDistance{}; - RealType m_MaxDistance{}; - PixelType m_InsidePixelValue{}; + PixelType m_Min{}; + PixelType m_Max{}; + RealType m_MinDistance{}; + RealType m_MaxDistance{}; + PixelType m_InsidePixelValue{}; MeasurementVectorType m_LowerBound{}; MeasurementVectorType m_UpperBound{}; - OffsetVectorPointer m_Offsets{}; + OffsetVectorPointer m_Offsets{}; }; } // end of namespace Statistics } // end of namespace itk diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.hxx b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.hxx index b62ccc68774..8f94ecbd4c6 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.hxx @@ -139,14 +139,14 @@ ScalarImageToRunLengthMatrixFilter::Ge this->m_UpperBound[1] = this->m_MaxDistance; output->Initialize(size, this->m_LowerBound, this->m_UpperBound); - MeasurementVectorType run(output->GetMeasurementVectorSize()); + MeasurementVectorType run(output->GetMeasurementVectorSize()); typename HistogramType::IndexType hIndex; // Iterate over all of those pixels and offsets, adding each // distance/intensity pair to the histogram using NeighborhoodIteratorType = ConstNeighborhoodIterator; - auto radius = MakeFilled(1); + auto radius = MakeFilled(1); NeighborhoodIteratorType neighborIt(radius, inputImage, inputImage->GetRequestedRegion()); @@ -189,10 +189,10 @@ ScalarImageToRunLengthMatrixFilter::Ge const MeasurementType centerBinMax = this->GetOutput()->GetBinMaxFromValue(0, centerPixelIntensity); const MeasurementType lastBinMax = this->GetOutput()->GetDimensionMaxs(0)[this->GetOutput()->GetSize(0) - 1]; - auto pixelIntensity(PixelType{}); + auto pixelIntensity(PixelType{}); IndexType index = centerIndex + offset; IndexType lastGoodIndex = centerIndex; - bool runLengthSegmentAlreadyVisited = false; + bool runLengthSegmentAlreadyVisited = false; // Scan from the current pixel at index, following // the direction of offset. Run length is computed as the @@ -297,7 +297,7 @@ ScalarImageToRunLengthMatrixFilter::Se template void ScalarImageToRunLengthMatrixFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -323,7 +323,7 @@ ScalarImageToRunLengthMatrixFilter::No { itkDebugMacro("old offset = " << offset << std::endl); - int sign = 1; + int sign = 1; bool metLastNonZero = false; for (int i = offset.GetOffsetDimension() - 1; i >= 0; i--) { diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.h b/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.h index e84709d2128..7c2fa643ea8 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.h +++ b/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.h @@ -239,11 +239,11 @@ class ITK_TEMPLATE_EXPORT ScalarImageToTextureFeaturesFilter : public ProcessObj typename TextureFeaturesFilterType::Pointer m_GLCMCalculator{}; - FeatureValueVectorPointer m_FeatureMeans{}; - FeatureValueVectorPointer m_FeatureStandardDeviations{}; + FeatureValueVectorPointer m_FeatureMeans{}; + FeatureValueVectorPointer m_FeatureStandardDeviations{}; FeatureNameVectorConstPointer m_RequestedFeatures{}; - OffsetVectorConstPointer m_Offsets{}; - bool m_FastCalculations{}; + OffsetVectorConstPointer m_Offsets{}; + bool m_FastCalculations{}; }; } // end of namespace Statistics } // end of namespace itk diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.hxx b/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.hxx index 2a0ff5e6599..fce046bf403 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.hxx @@ -72,8 +72,8 @@ ScalarImageToTextureFeaturesFiltersize(); const size_t numFeatures = m_RequestedFeatures->size(); - auto ** features = new double *[numOffsets]; + auto ** features = new double *[numOffsets]; for (size_t i = 0; i < numOffsets; ++i) { features[i] = new double[numFeatures]; @@ -319,7 +319,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); os << indent << "RequestedFeatures: " << this->GetRequestedFeatures() << std::endl; diff --git a/Modules/Numerics/Statistics/include/itkSparseFrequencyContainer2.h b/Modules/Numerics/Statistics/include/itkSparseFrequencyContainer2.h index 0eb303fc61d..2361ae8051e 100644 --- a/Modules/Numerics/Statistics/include/itkSparseFrequencyContainer2.h +++ b/Modules/Numerics/Statistics/include/itkSparseFrequencyContainer2.h @@ -111,7 +111,7 @@ class ITKStatistics_EXPORT SparseFrequencyContainer2 : public Object private: // Container of histogram - FrequencyContainerType m_FrequencyContainer{}; + FrequencyContainerType m_FrequencyContainer{}; TotalAbsoluteFrequencyType m_TotalFrequency{}; }; // end of class } // end of namespace Statistics diff --git a/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.h b/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.h index d8d2749bd2f..2b5433273a5 100644 --- a/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.h +++ b/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.h @@ -124,7 +124,7 @@ class ITK_TEMPLATE_EXPORT SpatialNeighborSubsampler : public RegionConstrainedSu PrintSelf(std::ostream & os, Indent indent) const override; RadiusType m_Radius{}; - bool m_RadiusInitialized{}; + bool m_RadiusInitialized{}; }; // end of class SpatialNeighborSubsampler } // end of namespace Statistics diff --git a/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.hxx b/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.hxx index 9030f68436c..afeabe9f994 100644 --- a/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.hxx +++ b/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.hxx @@ -96,14 +96,14 @@ SpatialNeighborSubsampler::Search(const InstanceIdentifier & q results->SetSample(this->m_Sample); RegionType searchRegion; - IndexType searchIndex; - SizeType searchSize; - IndexType endIndex; + IndexType searchIndex; + SizeType searchSize; + IndexType endIndex; IndexType constraintIndex = this->m_RegionConstraint.GetIndex(); - SizeType constraintSize = this->m_RegionConstraint.GetSize(); + SizeType constraintSize = this->m_RegionConstraint.GetSize(); - IndexType queryIndex; + IndexType queryIndex; typename RegionType::OffsetTableType offsetTable; this->m_SampleRegion.ComputeOffsetTable(offsetTable); ImageHelperType::ComputeIndex(this->m_SampleRegion.GetIndex(), query, offsetTable, queryIndex); @@ -141,8 +141,8 @@ SpatialNeighborSubsampler::Search(const InstanceIdentifier & q return; } - IndexType positionIndex = searchIndex; - bool someRemaining = true; + IndexType positionIndex = searchIndex; + bool someRemaining = true; typename RegionType::OffsetValueType offset = 0; // The trouble with decoupling the region from the sample is that diff --git a/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.hxx b/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.hxx index fff6f3e58f4..655b7682a00 100644 --- a/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.hxx @@ -141,7 +141,7 @@ StandardDeviationPerComponentSampleFilter::GenerateData() using TotalAbsoluteFrequencyType = typename TSample::TotalAbsoluteFrequencyType; TotalAbsoluteFrequencyType totalFrequency{}; - typename TSample::ConstIterator iter = input->Begin(); + typename TSample::ConstIterator iter = input->Begin(); const typename TSample::ConstIterator end = input->End(); MeasurementVectorType diff; diff --git a/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.h b/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.h index c8e01882417..f7fd1f5d2cf 100644 --- a/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.h +++ b/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.h @@ -51,18 +51,18 @@ MedianOfThree(const TValue a, const TValue b, const TValue c); */ template void -FindSampleBound(const TSample * sample, - const typename TSample::ConstIterator & begin, - const typename TSample::ConstIterator & end, +FindSampleBound(const TSample * sample, + const typename TSample::ConstIterator & begin, + const typename TSample::ConstIterator & end, typename TSample::MeasurementVectorType & min, typename TSample::MeasurementVectorType & max); /** The endIndex should points one point after the last elements. */ template void -FindSampleBoundAndMean(const TSubsample * sample, - int beginIndex, - int endIndex, +FindSampleBoundAndMean(const TSubsample * sample, + int beginIndex, + int endIndex, typename TSubsample::MeasurementVectorType & min, typename TSubsample::MeasurementVectorType & max, typename TSubsample::MeasurementVectorType & mean); @@ -90,10 +90,10 @@ FindSampleBoundAndMean(const TSubsample * sample, */ template int -Partition(TSubsample * sample, - unsigned int activeDimension, - int beginIndex, - int endIndex, +Partition(TSubsample * sample, + unsigned int activeDimension, + int beginIndex, + int endIndex, const typename TSubsample::MeasurementType partitionValue); /** QuickSelect is an algorithm for finding the k-th largest element of a list. @@ -115,11 +115,11 @@ Partition(TSubsample * sample, */ template typename TSubsample::MeasurementType -QuickSelect(TSubsample * sample, - unsigned int activeDimension, - int beginIndex, - int endIndex, - int kth, +QuickSelect(TSubsample * sample, + unsigned int activeDimension, + int beginIndex, + int endIndex, + int kth, typename TSubsample::MeasurementType medianGuess); /** QuickSelect is an algorithm for finding the k-th largest element of a list. @@ -168,10 +168,10 @@ template void IntrospectiveSortLoop(TSubsample * sample, unsigned int activeDimension, - int beginIndex, - int endIndex, - int depthLimit, - int sizeThreshold); + int beginIndex, + int endIndex, + int depthLimit, + int sizeThreshold); template void diff --git a/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.hxx b/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.hxx index 2692244378d..5b16d7b6fae 100644 --- a/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.hxx +++ b/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.hxx @@ -42,10 +42,10 @@ FloorLog(TSize size) template inline int -Partition(TSubsample * sample, - unsigned int activeDimension, - int beginIndex, - int endIndex, +Partition(TSubsample * sample, + unsigned int activeDimension, + int beginIndex, + int endIndex, const typename TSubsample::MeasurementType partitionValue) { using SampleMeasurementType = typename TSubsample::MeasurementType; @@ -241,9 +241,9 @@ MedianOfThree(const TValue a, const TValue b, const TValue c) template inline void -FindSampleBound(const TSample * sample, - const typename TSample::ConstIterator & begin, - const typename TSample::ConstIterator & end, +FindSampleBound(const TSample * sample, + const typename TSample::ConstIterator & begin, + const typename TSample::ConstIterator & end, typename TSample::MeasurementVectorType & min, typename TSample::MeasurementVectorType & max) { @@ -289,9 +289,9 @@ FindSampleBound(const TSample * sample, template inline void -FindSampleBoundAndMean(const TSubsample * sample, - int beginIndex, - int endIndex, +FindSampleBoundAndMean(const TSubsample * sample, + int beginIndex, + int endIndex, typename TSubsample::MeasurementVectorType & min, typename TSubsample::MeasurementVectorType & max, typename TSubsample::MeasurementVectorType & mean) @@ -309,7 +309,7 @@ FindSampleBoundAndMean(const TSubsample * sample, Array sum(Dimension); MeasurementVectorSizeType dimension; - MeasurementVectorType temp; + MeasurementVectorType temp; NumericTraits::SetLength(temp, Dimension); NumericTraits::SetLength(mean, Dimension); @@ -348,17 +348,17 @@ FindSampleBoundAndMean(const TSubsample * sample, template inline typename TSubsample::MeasurementType -QuickSelect(TSubsample * sample, - unsigned int activeDimension, - int beginIndex, - int endIndex, - int kth, +QuickSelect(TSubsample * sample, + unsigned int activeDimension, + int beginIndex, + int endIndex, + int kth, typename TSubsample::MeasurementType medianGuess) { using SampleMeasurementType = typename TSubsample::MeasurementType; - int begin = beginIndex; - int end = endIndex - 1; + int begin = beginIndex; + int end = endIndex - 1; const int kthIndex = kth + beginIndex; SampleMeasurementType tempMedian; @@ -372,8 +372,8 @@ QuickSelect(TSubsample * sample, } else { - const int length = end - begin; - const int middle = begin + length / 2; + const int length = end - begin; + const int middle = begin + length / 2; const SampleMeasurementType v1 = sample->GetMeasurementVectorByIndex(begin)[activeDimension]; const SampleMeasurementType v2 = sample->GetMeasurementVectorByIndex(end)[activeDimension]; const SampleMeasurementType v3 = sample->GetMeasurementVectorByIndex(middle)[activeDimension]; @@ -406,7 +406,7 @@ QuickSelect(TSubsample * sample, break; } - const int length = end - begin; + const int length = end - begin; const SampleMeasurementType v1 = sample->GetMeasurementVectorByIndex(begin)[activeDimension]; const SampleMeasurementType v2 = sample->GetMeasurementVectorByIndex(end)[activeDimension]; @@ -420,7 +420,7 @@ QuickSelect(TSubsample * sample, break; } - const int middle = begin + length / 2; + const int middle = begin + length / 2; const SampleMeasurementType v3 = sample->GetMeasurementVectorByIndex(middle)[activeDimension]; tempMedian = MedianOfThree(v1, v2, v3); } @@ -440,10 +440,10 @@ QuickSelect(TSubsample * sample, unsigned int activeDimension, int beginIndex, i template inline int -UnguardedPartition(TSubsample * sample, - unsigned int activeDimension, - int beginIndex, - int endIndex, +UnguardedPartition(TSubsample * sample, + unsigned int activeDimension, + int beginIndex, + int endIndex, typename TSubsample::MeasurementType pivotValue) { using MeasurementType = typename TSubsample::MeasurementType; @@ -559,9 +559,9 @@ DownHeap(TSubsample * sample, unsigned int activeDimension, int beginIndex, int using SampleMeasurementType = typename TSubsample::MeasurementType; const SampleMeasurementType currentNodeValue = sample->GetMeasurementVectorByIndex(currentNode)[activeDimension]; - SampleMeasurementType leftChildValue; - SampleMeasurementType rightChildValue; - SampleMeasurementType largerChildValue; + SampleMeasurementType leftChildValue; + SampleMeasurementType rightChildValue; + SampleMeasurementType largerChildValue; while (true) { @@ -624,10 +624,10 @@ template inline void IntrospectiveSortLoop(TSubsample * sample, unsigned int activeDimension, - int beginIndex, - int endIndex, - int depthLimit, - int sizeThreshold) + int beginIndex, + int endIndex, + int depthLimit, + int sizeThreshold) { using SampleMeasurementType = typename TSubsample::MeasurementType; diff --git a/Modules/Numerics/Statistics/include/itkSubsample.h b/Modules/Numerics/Statistics/include/itkSubsample.h index 8dd94233a85..0d296a56bc5 100644 --- a/Modules/Numerics/Statistics/include/itkSubsample.h +++ b/Modules/Numerics/Statistics/include/itkSubsample.h @@ -206,7 +206,7 @@ class ITK_TEMPLATE_EXPORT Subsample : public TSample typename InstanceIdentifierHolder::const_iterator m_Iter; // Pointer to Subsample object - const Self * m_Subsample; + const Self * m_Subsample; const TSample * m_Sample; private: @@ -293,9 +293,9 @@ class ITK_TEMPLATE_EXPORT Subsample : public TSample PrintSelf(std::ostream & os, Indent indent) const override; private: - const TSample * m_Sample{}; - InstanceIdentifierHolder m_IdHolder{}; - unsigned int m_ActiveDimension{}; + const TSample * m_Sample{}; + InstanceIdentifierHolder m_IdHolder{}; + unsigned int m_ActiveDimension{}; TotalAbsoluteFrequencyType m_TotalFrequency{}; }; // end of class } // end of namespace Statistics diff --git a/Modules/Numerics/Statistics/include/itkSubsample.hxx b/Modules/Numerics/Statistics/include/itkSubsample.hxx index ff6a988e069..ae8dc25e591 100644 --- a/Modules/Numerics/Statistics/include/itkSubsample.hxx +++ b/Modules/Numerics/Statistics/include/itkSubsample.hxx @@ -75,8 +75,8 @@ void Subsample::InitializeWithAllInstances() { m_IdHolder.resize(m_Sample->Size()); - auto idIter = m_IdHolder.begin(); - typename TSample::ConstIterator iter = m_Sample->Begin(); + auto idIter = m_IdHolder.begin(); + typename TSample::ConstIterator iter = m_Sample->Begin(); const typename TSample::ConstIterator last = m_Sample->End(); m_TotalFrequency = AbsoluteFrequencyType{}; while (iter != last) diff --git a/Modules/Numerics/Statistics/include/itkSubsamplerBase.h b/Modules/Numerics/Statistics/include/itkSubsamplerBase.h index 4a9e0afdfc8..fd71829be86 100644 --- a/Modules/Numerics/Statistics/include/itkSubsamplerBase.h +++ b/Modules/Numerics/Statistics/include/itkSubsamplerBase.h @@ -130,9 +130,9 @@ class ITK_TEMPLATE_EXPORT SubsamplerBase : public Object PrintSelf(std::ostream & os, Indent indent) const override; SampleConstPointer m_Sample{}; - bool m_RequestMaximumNumberOfResults{}; - bool m_CanSelectQuery{}; - SeedType m_Seed{}; + bool m_RequestMaximumNumberOfResults{}; + bool m_CanSelectQuery{}; + SeedType m_Seed{}; }; // end of class SubsamplerBase } // end of namespace Statistics diff --git a/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.h b/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.h index c38c044f75c..35cc4ecdec7 100644 --- a/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.h +++ b/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.h @@ -158,9 +158,9 @@ class ITK_TEMPLATE_EXPORT UniformRandomSpatialNeighborSubsampler : public Spatia virtual RandomIntType GetIntegerVariate(RandomIntType lowerBound, RandomIntType upperBound, RandomIntType itkNotUsed(mean)); - SearchSizeType m_NumberOfResultsRequested{}; + SearchSizeType m_NumberOfResultsRequested{}; RandomGeneratorType::Pointer m_RandomNumberGenerator{}; - bool m_UseClockForSeed{}; + bool m_UseClockForSeed{}; }; // end of class UniformRandomSpatialNeighborSubsampler } // end of namespace Statistics diff --git a/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.hxx b/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.hxx index 5d331703e92..d6fe6453074 100644 --- a/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.hxx +++ b/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.hxx @@ -54,7 +54,7 @@ UniformRandomSpatialNeighborSubsampler::InternalClone() const template void UniformRandomSpatialNeighborSubsampler::Search(const InstanceIdentifier & query, - SubsamplePointer & results) + SubsamplePointer & results) { if (!this->m_RadiusInitialized) { @@ -76,9 +76,9 @@ UniformRandomSpatialNeighborSubsampler::Search(const InstanceI IndexType searchEndIndex; IndexType constraintIndex = this->m_RegionConstraint.GetIndex(); - SizeType constraintSize = this->m_RegionConstraint.GetSize(); + SizeType constraintSize = this->m_RegionConstraint.GetSize(); - IndexType queryIndex; + IndexType queryIndex; typename RegionType::OffsetTableType offsetTable; this->m_SampleRegion.ComputeOffsetTable(offsetTable); ImageHelperType::ComputeIndex(this->m_SampleRegion.GetIndex(), query, offsetTable, queryIndex); @@ -123,7 +123,7 @@ UniformRandomSpatialNeighborSubsampler::Search(const InstanceI unsigned int pointsFound = 0; - const std::set usedIds; + const std::set usedIds; typename RegionType::OffsetValueType offset; // The trouble with decoupling the region from the sample is that diff --git a/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.h b/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.h index dc44d8c34ed..be66fd96d56 100644 --- a/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.h +++ b/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.h @@ -171,7 +171,7 @@ class ITK_TEMPLATE_EXPORT VectorContainerToListSampleAdaptor : public ListSample private: VectorContainerConstIterator m_Iter; - InstanceIdentifier m_InstanceIdentifier; + InstanceIdentifier m_InstanceIdentifier; }; /** \class Iterator diff --git a/Modules/Numerics/Statistics/include/itkWeightedCentroidKdTreeGenerator.h b/Modules/Numerics/Statistics/include/itkWeightedCentroidKdTreeGenerator.h index 54839ea90bb..86d48adbf40 100644 --- a/Modules/Numerics/Statistics/include/itkWeightedCentroidKdTreeGenerator.h +++ b/Modules/Numerics/Statistics/include/itkWeightedCentroidKdTreeGenerator.h @@ -101,11 +101,11 @@ class ITK_TEMPLATE_EXPORT WeightedCentroidKdTreeGenerator : public KdTreeGenerat /** Nonterminal node generation routine */ KdTreeNodeType * - GenerateNonterminalNode(unsigned int beginIndex, - unsigned int endIndex, + GenerateNonterminalNode(unsigned int beginIndex, + unsigned int endIndex, MeasurementVectorType & lowerBound, MeasurementVectorType & upperBound, - unsigned int level) override; + unsigned int level) override; private: MeasurementVectorType m_TempLowerBound{}; diff --git a/Modules/Numerics/Statistics/include/itkWeightedCentroidKdTreeGenerator.hxx b/Modules/Numerics/Statistics/include/itkWeightedCentroidKdTreeGenerator.hxx index c109d9f34c9..c326a0b4c47 100644 --- a/Modules/Numerics/Statistics/include/itkWeightedCentroidKdTreeGenerator.hxx +++ b/Modules/Numerics/Statistics/include/itkWeightedCentroidKdTreeGenerator.hxx @@ -33,21 +33,21 @@ WeightedCentroidKdTreeGenerator::PrintSelf(std::ostream & os, Indent in template inline auto -WeightedCentroidKdTreeGenerator::GenerateNonterminalNode(unsigned int beginIndex, - unsigned int endIndex, +WeightedCentroidKdTreeGenerator::GenerateNonterminalNode(unsigned int beginIndex, + unsigned int endIndex, MeasurementVectorType & lowerBound, MeasurementVectorType & upperBound, - unsigned int level) -> KdTreeNodeType * + unsigned int level) -> KdTreeNodeType * { MeasurementType dimensionLowerBound; MeasurementType dimensionUpperBound; MeasurementType partitionValue; - unsigned int partitionDimension = 0; - unsigned int i; - unsigned int j; + unsigned int partitionDimension = 0; + unsigned int i; + unsigned int j; MeasurementType spread; MeasurementType maxSpread; - unsigned int medianIndex; + unsigned int medianIndex; const SubsamplePointer subsample = this->GetSubsample(); @@ -107,13 +107,13 @@ WeightedCentroidKdTreeGenerator::GenerateNonterminalNode(unsigned int upperBound[partitionDimension] = partitionValue; const unsigned int beginLeftIndex = beginIndex; const unsigned int endLeftIndex = medianIndex; - KdTreeNodeType * left = this->GenerateTreeLoop(beginLeftIndex, endLeftIndex, lowerBound, upperBound, level + 1); + KdTreeNodeType * left = this->GenerateTreeLoop(beginLeftIndex, endLeftIndex, lowerBound, upperBound, level + 1); upperBound[partitionDimension] = dimensionUpperBound; lowerBound[partitionDimension] = partitionValue; const unsigned int beginRightIndex = medianIndex + 1; const unsigned int endRighIndex = endIndex; - KdTreeNodeType * right = this->GenerateTreeLoop(beginRightIndex, endRighIndex, lowerBound, upperBound, level + 1); + KdTreeNodeType * right = this->GenerateTreeLoop(beginRightIndex, endRighIndex, lowerBound, upperBound, level + 1); lowerBound[partitionDimension] = dimensionLowerBound; using KdTreeNonterminalNodeType = KdTreeWeightedCentroidNonterminalNode; diff --git a/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.hxx b/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.hxx index 0369069207a..001eb68e502 100644 --- a/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.hxx @@ -96,7 +96,7 @@ WeightedCovarianceSampleFilter::ComputeCovarianceMatrixWithWeightingFun WeightValueType totalSquaredWeight{}; - typename SampleType::ConstIterator iter = input->Begin(); + typename SampleType::ConstIterator iter = input->Begin(); const typename SampleType::ConstIterator end = input->End(); // fills the lower triangle and the diagonal cells in the covariance matrix @@ -193,7 +193,7 @@ WeightedCovarianceSampleFilter::ComputeCovarianceMatrixWithWeights() WeightValueType totalSquaredWeight{}; - typename SampleType::ConstIterator iter = input->Begin(); + typename SampleType::ConstIterator iter = input->Begin(); const typename SampleType::ConstIterator end = input->End(); // fills the lower triangle and the diagonal cells in the covariance matrix diff --git a/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.hxx b/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.hxx index 8485392dfc1..e77c7c08988 100644 --- a/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.hxx @@ -83,7 +83,7 @@ WeightedMeanSampleFilter::ComputeMeanWithWeights() WeightValueType totalWeight{}; - typename SampleType::ConstIterator iter = input->Begin(); + typename SampleType::ConstIterator iter = input->Begin(); const typename SampleType::ConstIterator end = input->End(); for (unsigned int sampleVectorIndex = 0; iter != end; ++iter, ++sampleVectorIndex) @@ -144,7 +144,7 @@ WeightedMeanSampleFilter::ComputeMeanWithWeightingFunction() WeightValueType totalWeight{}; - typename SampleType::ConstIterator iter = input->Begin(); + typename SampleType::ConstIterator iter = input->Begin(); const typename SampleType::ConstIterator end = input->End(); for (; iter != end; ++iter) diff --git a/Modules/Numerics/Statistics/src/itkChiSquareDistribution.cxx b/Modules/Numerics/Statistics/src/itkChiSquareDistribution.cxx index f38afb1e0c4..cda18bb36ac 100644 --- a/Modules/Numerics/Statistics/src/itkChiSquareDistribution.cxx +++ b/Modules/Numerics/Statistics/src/itkChiSquareDistribution.cxx @@ -75,7 +75,7 @@ ChiSquareDistribution::GetDegreesOfFreedom() const double ChiSquareDistribution::PDF(double x, SizeValueType degreesOfFreedom) { - auto dof = static_cast(degreesOfFreedom); + auto dof = static_cast(degreesOfFreedom); double dofon2 = 0.5 * dof; double pdf = 0.0; @@ -139,11 +139,11 @@ ChiSquareDistribution::InverseCDF(double p, SizeValueType degreesOfFreedom) } // Based on Abramowitz and Stegun 26.4.17 - auto dof = static_cast(degreesOfFreedom); + auto dof = static_cast(degreesOfFreedom); const double nx = GaussianDistribution::InverseCDF(p); const double f = 2.0 / (9.0 * dof); - double x = dof * std::pow(1.0 - f + nx * std::sqrt(f), 3.0); + double x = dof * std::pow(1.0 - f + nx * std::sqrt(f), 3.0); // The approximation above is only accurate for large degrees of // freedom. We'll improve the approximation by a few Newton iterations. diff --git a/Modules/Numerics/Statistics/src/itkGaussianDistribution.cxx b/Modules/Numerics/Statistics/src/itkGaussianDistribution.cxx index f5f24c30f95..08ccb45f1be 100644 --- a/Modules/Numerics/Statistics/src/itkGaussianDistribution.cxx +++ b/Modules/Numerics/Statistics/src/itkGaussianDistribution.cxx @@ -56,7 +56,7 @@ GaussianDistribution::SetMean(double mean) if (m_Parameters.GetSize() != 2) { - bool cache = false; + bool cache = false; double t = 1.0; // cache current variance if there is one @@ -116,7 +116,7 @@ GaussianDistribution::SetVariance(double variance) if (m_Parameters.GetSize() != 2) { - bool cache = false; + bool cache = false; double t = 0.0; // cache current mean if there is one @@ -230,7 +230,7 @@ GaussianDistribution::InverseCDF(double p) /** Step 1: use 26.2.23 from Abramowitz and Stegun */ const double dt = std::sqrt(-2.0 * std::log(dp)); - double dx = dt - ((.010328e+0 * dt + .802853e+0) * dt + 2.515517e+0) / + double dx = dt - ((.010328e+0 * dt + .802853e+0) * dt + 2.515517e+0) / (((.001308e+0 * dt + .189269e+0) * dt + 1.432788e+0) * dt + 1.e+0); /** Step 2: do 3 Newton steps to improve this */ diff --git a/Modules/Numerics/Statistics/src/itkNormalVariateGenerator.cxx b/Modules/Numerics/Statistics/src/itkNormalVariateGenerator.cxx index ab632cb4a32..da5b52bbaf5 100644 --- a/Modules/Numerics/Statistics/src/itkNormalVariateGenerator.cxx +++ b/Modules/Numerics/Statistics/src/itkNormalVariateGenerator.cxx @@ -109,24 +109,24 @@ NormalVariateGenerator::GetVariate() double NormalVariateGenerator::FastNorm() { - int i; - int inc = 0; - int skew; - int stride; - int mask = 0; - int p; - int q; - int r; - int s; - int t; - int * pa = nullptr; - int * pb = nullptr; - int * pc = nullptr; - int * pd = nullptr; - int * pe; - int * p0 = nullptr; - int mtype; - int stype; + int i; + int inc = 0; + int skew; + int stride; + int mask = 0; + int p; + int q; + int r; + int s; + int t; + int * pa = nullptr; + int * pb = nullptr; + int * pc = nullptr; + int * pd = nullptr; + int * pe; + int * p0 = nullptr; + int mtype; + int stype; double ts; double tr; double tx; diff --git a/Modules/Numerics/Statistics/src/itkTDistribution.cxx b/Modules/Numerics/Statistics/src/itkTDistribution.cxx index d1893334825..ae5dfa2b820 100644 --- a/Modules/Numerics/Statistics/src/itkTDistribution.cxx +++ b/Modules/Numerics/Statistics/src/itkTDistribution.cxx @@ -76,9 +76,9 @@ TDistribution::GetDegreesOfFreedom() const double TDistribution::PDF(double x, SizeValueType degreesOfFreedom) { - auto dof = static_cast(degreesOfFreedom); - double dofplusoneon2 = 0.5 * (dof + 1.0); - double dofon2 = 0.5 * dof; + auto dof = static_cast(degreesOfFreedom); + double dofplusoneon2 = 0.5 * (dof + 1.0); + double dofon2 = 0.5 * dof; const double pdf = (dgamma_(&dofplusoneon2) / dgamma_(&dofon2)) / (std::sqrt(dof * itk::Math::pi) * std::pow(1.0 + ((x * x) / dof), dofplusoneon2)); @@ -124,9 +124,9 @@ TDistribution::CDF(double x, SizeValueType degreesOfFreedom) // = 1 - 0.5 * Ix(v/2, 1/2) const auto dof = static_cast(degreesOfFreedom); - double bx = dof / (dof + (x * x)); - double pin = dof / 2.0; - double qin = 0.5; + double bx = dof / (dof + (x * x)); + double pin = dof / 2.0; + double qin = 0.5; if (x >= 0.0) { @@ -162,7 +162,7 @@ TDistribution::InverseCDF(double p, SizeValueType degreesOfFreedom) } // Based on Abramowitz and Stegun 26.7.5 - const auto dof = static_cast(degreesOfFreedom); + const auto dof = static_cast(degreesOfFreedom); const double dof2 = dof * dof; const double dof3 = dof * dof2; const double dof4 = dof * dof3; diff --git a/Modules/Numerics/Statistics/test/itkChiSquareDistributionTest.cxx b/Modules/Numerics/Statistics/test/itkChiSquareDistributionTest.cxx index 6fdabe6a8cc..ed3404e2af0 100644 --- a/Modules/Numerics/Statistics/test/itkChiSquareDistributionTest.cxx +++ b/Modules/Numerics/Statistics/test/itkChiSquareDistributionTest.cxx @@ -493,7 +493,7 @@ itkChiSquareDistributionTest(int, char *[]) std::cout << "GetVariance() = " << distributionFunction->GetVariance() << std::endl; - const unsigned int wrongNumberOfParameters = distributionFunction->GetNumberOfParameters() * 42; + const unsigned int wrongNumberOfParameters = distributionFunction->GetNumberOfParameters() * 42; DistributionType::ParametersType wrongParameters(wrongNumberOfParameters); wrongParameters.Fill(1.0); diff --git a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest.cxx index 288b1a61786..ac0d325e142 100644 --- a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest.cxx @@ -36,9 +36,9 @@ itkCovarianceSampleFilterTest(int, char *[]) using ImageType = itk::Image; using MaskImageType = itk::Image; - auto image = ImageType::New(); - ImageType::RegionType region; - ImageType::SizeType size; + auto image = ImageType::New(); + ImageType::RegionType region; + ImageType::SizeType size; constexpr ImageType::IndexType index{}; size.Fill(5); region.SetIndex(index); @@ -51,7 +51,7 @@ itkCovarianceSampleFilterTest(int, char *[]) using ImageIterator = itk::ImageRegionIterator; ImageIterator iter(image, region); - unsigned int count = 0; + unsigned int count = 0; MeasurementVectorType temp{}; // fill the image @@ -139,7 +139,7 @@ itkCovarianceSampleFilterTest(int, char *[]) const CovarianceSampleFilterType::MatrixDecoratedType * decorator = covarianceFilter->GetCovarianceMatrixOutput(); - const CovarianceSampleFilterType::MatrixType covarianceMatrix = decorator->Get(); + const CovarianceSampleFilterType::MatrixType covarianceMatrix = decorator->Get(); std::cout << "Covariance matrix: " << covarianceMatrix << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest2.cxx b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest2.cxx index 9ff7822593e..935eaa953a6 100644 --- a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest2.cxx @@ -69,12 +69,12 @@ itkCovarianceSampleFilterTest2(int, char *[]) std::cout << "Mean: " << filter->GetMean() << std::endl; const FilterType::MatrixDecoratedType * decorator = filter->GetCovarianceMatrixOutput(); - FilterType::MatrixType covarianceOutput = decorator->Get(); + FilterType::MatrixType covarianceOutput = decorator->Get(); std::cout << "Covariance Matrix: " << covarianceOutput << std::endl; const FilterType::MeasurementVectorDecoratedType * meanDecorator = filter->GetMeanOutput(); - FilterType::MeasurementVectorRealType mean = meanDecorator->Get(); + FilterType::MeasurementVectorRealType mean = meanDecorator->Get(); // Check the results diff --git a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest3.cxx b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest3.cxx index 55677570cc2..6a7c64c3749 100644 --- a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest3.cxx @@ -73,7 +73,7 @@ itkCovarianceSampleFilterTest3(int, char *[]) auto histogram = HistogramType::New(); - HistogramType::SizeType size(MeasurementVectorSize); + HistogramType::SizeType size(MeasurementVectorSize); HistogramType::MeasurementVectorType lowerBound(MeasurementVectorSize); HistogramType::MeasurementVectorType upperBound(MeasurementVectorSize); @@ -93,7 +93,7 @@ itkCovarianceSampleFilterTest3(int, char *[]) using MeanVectorType = MembershipFunctionType::MeanVectorType; using CovarianceMatrixType = MembershipFunctionType::CovarianceMatrixType; - MeanVectorType mean(MeasurementVectorSize); + MeanVectorType mean(MeasurementVectorSize); CovarianceMatrixType covariance(MeasurementVectorSize, MeasurementVectorSize); mean[0] = 50; @@ -120,7 +120,7 @@ itkCovarianceSampleFilterTest3(int, char *[]) memberFunction->SetMean(mean); memberFunction->SetCovariance(covariance); - HistogramType::Iterator itr = histogram->Begin(); + HistogramType::Iterator itr = histogram->Begin(); const HistogramType::Iterator end = histogram->End(); using AbsoluteFrequencyType = HistogramType::AbsoluteFrequencyType; @@ -168,7 +168,7 @@ itkCovarianceSampleFilterTest3(int, char *[]) } const FilterType::MatrixDecoratedType * decorator = filter->GetCovarianceMatrixOutput(); - FilterType::MatrixType covarianceOutput = decorator->Get(); + FilterType::MatrixType covarianceOutput = decorator->Get(); FilterType::MeasurementVectorRealType meanOutput = filter->GetMean(); diff --git a/Modules/Numerics/Statistics/test/itkDenseFrequencyContainer2Test.cxx b/Modules/Numerics/Statistics/test/itkDenseFrequencyContainer2Test.cxx index 73fc210ba41..19f0f25f189 100644 --- a/Modules/Numerics/Statistics/test/itkDenseFrequencyContainer2Test.cxx +++ b/Modules/Numerics/Statistics/test/itkDenseFrequencyContainer2Test.cxx @@ -51,7 +51,7 @@ itkDenseFrequencyContainer2Test(int, char *[]) for (unsigned int bin = 0; bin < numberOfBins; ++bin) { // Test if the values can be read back - const auto frequency = static_cast(bin * bin); + const auto frequency = static_cast(bin * bin); const AbsoluteFrequencyType stored = container->GetFrequency(bin); if (stored != frequency) { @@ -64,7 +64,7 @@ itkDenseFrequencyContainer2Test(int, char *[]) // Test Set/Get frequency of an out of bound bin constexpr unsigned int binOutOfBound = numberOfBins; - constexpr auto frequency = static_cast(binOutOfBound * binOutOfBound); + constexpr auto frequency = static_cast(binOutOfBound * binOutOfBound); if (container->SetFrequency(binOutOfBound, frequency)) { @@ -108,7 +108,7 @@ itkDenseFrequencyContainer2Test(int, char *[]) // Test if the values can be read back for (unsigned int bin = 0; bin < numberOfBins; ++bin) { - const auto frequency = static_cast(bin * bin + bin); + const auto frequency = static_cast(bin * bin + bin); const AbsoluteFrequencyType stored = container->GetFrequency(bin); if (stored != frequency) { @@ -119,7 +119,7 @@ itkDenseFrequencyContainer2Test(int, char *[]) } } constexpr unsigned int binOutOfBound = numberOfBins; - constexpr auto frequency = static_cast(binOutOfBound); + constexpr auto frequency = static_cast(binOutOfBound); if (container->IncreaseFrequency(binOutOfBound, frequency)) { diff --git a/Modules/Numerics/Statistics/test/itkDistanceMetricTest.cxx b/Modules/Numerics/Statistics/test/itkDistanceMetricTest.cxx index 72d60b5ab3e..f9360498ad2 100644 --- a/Modules/Numerics/Statistics/test/itkDistanceMetricTest.cxx +++ b/Modules/Numerics/Statistics/test/itkDistanceMetricTest.cxx @@ -114,7 +114,7 @@ itkDistanceMetricTest(int, char *[]) // try setting an origin vector with a different size it should throw an exception try { - DistanceMetricType::OriginType origin; + DistanceMetricType::OriginType origin; constexpr MeasurementVectorSizeType newSize = 25; origin.SetSize(newSize); distance->SetOrigin(origin); diff --git a/Modules/Numerics/Statistics/test/itkDistanceMetricTest2.cxx b/Modules/Numerics/Statistics/test/itkDistanceMetricTest2.cxx index 2dc1ffdd86c..eea362d1204 100644 --- a/Modules/Numerics/Statistics/test/itkDistanceMetricTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkDistanceMetricTest2.cxx @@ -106,7 +106,7 @@ itkDistanceMetricTest2(int, char *[]) // try setting an origin vector with a different size it should throw an exception try { - DistanceMetricType::OriginType origin; + DistanceMetricType::OriginType origin; constexpr MeasurementVectorSizeType newSize = 4; origin.SetSize(newSize); distance->SetOrigin(origin); diff --git a/Modules/Numerics/Statistics/test/itkDistanceToCentroidMembershipFunctionTest.cxx b/Modules/Numerics/Statistics/test/itkDistanceToCentroidMembershipFunctionTest.cxx index 3324c4c6c13..7e45244d254 100644 --- a/Modules/Numerics/Statistics/test/itkDistanceToCentroidMembershipFunctionTest.cxx +++ b/Modules/Numerics/Statistics/test/itkDistanceToCentroidMembershipFunctionTest.cxx @@ -99,7 +99,7 @@ itkDistanceToCentroidMembershipFunctionTest(int, char *[]) measurement[2] = 4.0; constexpr double trueValue = 3.31662; - const double distanceComputed = function->Evaluate(measurement); + const double distanceComputed = function->Evaluate(measurement); if (itk::Math::abs(distanceComputed - trueValue) > tolerance) { diff --git a/Modules/Numerics/Statistics/test/itkEuclideanDistanceMetricTest.cxx b/Modules/Numerics/Statistics/test/itkEuclideanDistanceMetricTest.cxx index 1b5a4f6e593..cd12ae98272 100644 --- a/Modules/Numerics/Statistics/test/itkEuclideanDistanceMetricTest.cxx +++ b/Modules/Numerics/Statistics/test/itkEuclideanDistanceMetricTest.cxx @@ -77,7 +77,7 @@ itkEuclideanDistanceMetricTest(int, char *[]) measurement[2] = 4.0; constexpr double trueValue = 3.31662; - const double distanceComputed = distance->Evaluate(measurement); + const double distanceComputed = distance->Evaluate(measurement); constexpr double tolerance = 0.001; if (itk::Math::abs(distanceComputed - trueValue) > tolerance) @@ -95,7 +95,7 @@ itkEuclideanDistanceMetricTest(int, char *[]) measurement2[2] = 3.5; constexpr double trueValue2 = 1.136; - const double distanceComputed2 = distance->Evaluate(measurement, measurement2); + const double distanceComputed2 = distance->Evaluate(measurement, measurement2); if (itk::Math::abs(distanceComputed2 - trueValue2) > tolerance) { diff --git a/Modules/Numerics/Statistics/test/itkEuclideanSquareDistanceMetricTest.cxx b/Modules/Numerics/Statistics/test/itkEuclideanSquareDistanceMetricTest.cxx index 08b66495bf8..b3bffe75aa9 100644 --- a/Modules/Numerics/Statistics/test/itkEuclideanSquareDistanceMetricTest.cxx +++ b/Modules/Numerics/Statistics/test/itkEuclideanSquareDistanceMetricTest.cxx @@ -79,7 +79,7 @@ itkEuclideanSquareDistanceMetricTest(int, char *[]) measurement[2] = 4.0; constexpr double trueValue = 11.0; - const double distanceComputed = distance->Evaluate(measurement); + const double distanceComputed = distance->Evaluate(measurement); constexpr double tolerance = 0.001; if (itk::Math::abs(distanceComputed - trueValue) > tolerance) @@ -97,7 +97,7 @@ itkEuclideanSquareDistanceMetricTest(int, char *[]) measurement2[2] = 3.5; constexpr double trueValue2 = 1.29; - const double distanceComputed2 = distance->Evaluate(measurement, measurement2); + const double distanceComputed2 = distance->Evaluate(measurement, measurement2); if (itk::Math::abs(distanceComputed2 - trueValue2) > tolerance) { diff --git a/Modules/Numerics/Statistics/test/itkExpectationMaximizationMixtureModelEstimatorTest.cxx b/Modules/Numerics/Statistics/test/itkExpectationMaximizationMixtureModelEstimatorTest.cxx index 7626b0a3a08..76153c8cb12 100644 --- a/Modules/Numerics/Statistics/test/itkExpectationMaximizationMixtureModelEstimatorTest.cxx +++ b/Modules/Numerics/Statistics/test/itkExpectationMaximizationMixtureModelEstimatorTest.cxx @@ -41,14 +41,14 @@ itkExpectationMaximizationMixtureModelEstimatorTest(int argc, char * argv[]) return EXIT_FAILURE; } - char * dataFileName = argv[1]; + char * dataFileName = argv[1]; constexpr int dataSize = 2000; constexpr int maximumIteration = 200; using ParametersType = itk::Array; - constexpr double minStandardDeviation = 28.54746; - constexpr unsigned int numberOfClasses = 2; + constexpr double minStandardDeviation = 28.54746; + constexpr unsigned int numberOfClasses = 2; std::vector trueParameters(numberOfClasses); - ParametersType params(6); + ParametersType params(6); params[0] = 99.261; params[1] = 100.078; params[2] = 814.95741; @@ -92,15 +92,15 @@ itkExpectationMaximizationMixtureModelEstimatorTest(int argc, char * argv[]) initialProportions[1] = 0.5; /* Loading point data */ - auto pointSet = PointSetType::New(); + auto pointSet = PointSetType::New(); const PointSetType::PointsContainerPointer pointsContainer = PointSetType::PointsContainer::New(); pointsContainer->Reserve(dataSize); pointSet->SetPoints(pointsContainer); PointSetType::PointsContainerIterator p_iter = pointsContainer->Begin(); - PointSetType::PointType point; - double temp; - std::ifstream dataStream(dataFileName); + PointSetType::PointType point; + double temp; + std::ifstream dataStream(dataFileName); if (!dataStream) { std::cout << "ERROR: fail to open the data file." << std::endl; @@ -150,8 +150,8 @@ itkExpectationMaximizationMixtureModelEstimatorTest(int argc, char * argv[]) std::cout << "DEBUG: current iteration = " << estimator->GetCurrentIteration() << std::endl; - bool passed = true; - double displacement; + bool passed = true; + double displacement; const unsigned int measurementVectorSize = sample->GetMeasurementVectorSize(); for (unsigned int i = 0; i < numberOfClasses; ++i) { diff --git a/Modules/Numerics/Statistics/test/itkGaussianDistributionTest.cxx b/Modules/Numerics/Statistics/test/itkGaussianDistributionTest.cxx index c4006862206..06b41d6e7b0 100644 --- a/Modules/Numerics/Statistics/test/itkGaussianDistributionTest.cxx +++ b/Modules/Numerics/Statistics/test/itkGaussianDistributionTest.cxx @@ -41,7 +41,7 @@ itkGaussianDistributionTest(int, char *[]) distributionFunction->Print(std::cout); - int i; + int i; double x; double value; double diff; @@ -318,7 +318,7 @@ itkGaussianDistributionTest(int, char *[]) std::cout << "EvaluateInverseCDF(-10.0,m,v) = " << distributionFunction->EvaluateInverseCDF(-10.0, mean1, variance1) << std::endl; - const unsigned int wrongNumberOfParameters = distributionFunction->GetNumberOfParameters() * 42; + const unsigned int wrongNumberOfParameters = distributionFunction->GetNumberOfParameters() * 42; DistributionType::ParametersType wrongParameters(wrongNumberOfParameters); wrongParameters.Fill(1.0); distributionFunction->SetParameters(wrongParameters); diff --git a/Modules/Numerics/Statistics/test/itkGaussianMembershipFunctionTest.cxx b/Modules/Numerics/Statistics/test/itkGaussianMembershipFunctionTest.cxx index 704b510aaf8..454e1318fdf 100644 --- a/Modules/Numerics/Statistics/test/itkGaussianMembershipFunctionTest.cxx +++ b/Modules/Numerics/Statistics/test/itkGaussianMembershipFunctionTest.cxx @@ -80,7 +80,7 @@ itkGaussianMembershipFunctionTest(int, char *[]) measurement[0] = 1.5; constexpr double trueValue = 0.3989; - const double distanceComputed = function->Evaluate(measurement); + const double distanceComputed = function->Evaluate(measurement); if (itk::Math::abs(distanceComputed - trueValue) > tolerance) { diff --git a/Modules/Numerics/Statistics/test/itkGaussianMixtureModelComponentTest.cxx b/Modules/Numerics/Statistics/test/itkGaussianMixtureModelComponentTest.cxx index 325fa0e647d..6d7e6bfed93 100644 --- a/Modules/Numerics/Statistics/test/itkGaussianMixtureModelComponentTest.cxx +++ b/Modules/Numerics/Statistics/test/itkGaussianMixtureModelComponentTest.cxx @@ -36,7 +36,7 @@ itkGaussianMixtureModelComponentTest(int argc, char * argv[]) return EXIT_FAILURE; } - char * dataFileName = argv[1]; + char * dataFileName = argv[1]; constexpr int dataSize = 2000; using ParametersType = itk::Array; constexpr unsigned int numberOfClasses = 2; @@ -69,15 +69,15 @@ itkGaussianMixtureModelComponentTest(int argc, char * argv[]) initialProportions[1] = 0.5; /* Loading point data */ - auto pointSet = PointSetType::New(); + auto pointSet = PointSetType::New(); const PointSetType::PointsContainerPointer pointsContainer = PointSetType::PointsContainer::New(); pointsContainer->Reserve(dataSize); pointSet->SetPoints(pointsContainer); PointSetType::PointsContainerIterator p_iter = pointsContainer->Begin(); - PointSetType::PointType point; - double temp; - std::ifstream dataStream(dataFileName); + PointSetType::PointType point; + double temp; + std::ifstream dataStream(dataFileName); if (!dataStream) { std::cout << "ERROR: fail to open the data file." << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkGaussianRandomSpatialNeighborSubsamplerTest.cxx b/Modules/Numerics/Statistics/test/itkGaussianRandomSpatialNeighborSubsamplerTest.cxx index 4dde1299106..7446cd1046c 100644 --- a/Modules/Numerics/Statistics/test/itkGaussianRandomSpatialNeighborSubsamplerTest.cxx +++ b/Modules/Numerics/Statistics/test/itkGaussianRandomSpatialNeighborSubsamplerTest.cxx @@ -48,10 +48,10 @@ itkGaussianRandomSpatialNeighborSubsamplerTest(int argc, char * argv[]) using SamplerType = itk::Statistics::GaussianRandomSpatialNeighborSubsampler; using WriterType = itk::ImageFileWriter; - auto inImage = FloatImage::New(); - auto sz = SizeType::Filled(35); + auto inImage = FloatImage::New(); + auto sz = SizeType::Filled(35); constexpr IndexType idx{}; - const RegionType region{ idx, sz }; + const RegionType region{ idx, sz }; inImage->SetRegions(region); inImage->AllocateInitialized(); diff --git a/Modules/Numerics/Statistics/test/itkHistogramTest.cxx b/Modules/Numerics/Statistics/test/itkHistogramTest.cxx index 3e2793d9164..a204a60c33c 100644 --- a/Modules/Numerics/Statistics/test/itkHistogramTest.cxx +++ b/Modules/Numerics/Statistics/test/itkHistogramTest.cxx @@ -335,7 +335,7 @@ itkHistogramTest(int, char *[]) for (unsigned int kid0 = 0; kid0 < numberOfComponents; ++kid0) { constexpr float expectedValF = 8.0; - const float obtainedValF = measurement[kid0]; + const float obtainedValF = measurement[kid0]; if (itk::Math::NotAlmostEquals(obtainedValF, expectedValF)) { std::cerr << "Test failed!" << std::endl; @@ -353,7 +353,7 @@ itkHistogramTest(int, char *[]) for (unsigned int kid1 = 0; kid1 < numberOfComponents; ++kid1) { constexpr float expectedValF = 8.0; - const float obtainedValF = measurement[kid1]; + const float obtainedValF = measurement[kid1]; if (itk::Math::NotAlmostEquals(obtainedValF, expectedValF)) { std::cerr << "Test failed!" << std::endl; @@ -370,7 +370,7 @@ itkHistogramTest(int, char *[]) for (unsigned int kid2 = 0; kid2 < numberOfComponents; ++kid2) { constexpr float expectedValF = 8.0; - const float obtainedValF = measurement[kid2]; + const float obtainedValF = measurement[kid2]; if (itk::Math::NotAlmostEquals(obtainedValF, expectedValF)) { std::cerr << "Test failed!" << std::endl; @@ -395,7 +395,7 @@ itkHistogramTest(int, char *[]) histogram->SetClipBinsAtEnds(false); IndexType index1(numberOfComponents); - bool getindex1 = histogram->GetIndex(outOfLowerRange, index1); + bool getindex1 = histogram->GetIndex(outOfLowerRange, index1); std::cout << "GetIndex() with SetClipBinsAtEnds() = false " << std::endl; std::cout << "Boolean " << getindex1 << " Index " << index1 << std::endl; @@ -420,7 +420,7 @@ itkHistogramTest(int, char *[]) histogram->SetClipBinsAtEnds(false); IndexType index2(numberOfComponents); - bool getindex2 = histogram->GetIndex(outOfUpperRange, index2); + bool getindex2 = histogram->GetIndex(outOfUpperRange, index2); std::cout << "GetIndex() with SetClipBinsAtEnds() = false " << std::endl; std::cout << "Boolean " << getindex2 << " Index " << index2 << std::endl; @@ -503,7 +503,7 @@ itkHistogramTest(int, char *[]) // Get the mean value for a dimension constexpr unsigned int dimension = 0; - const double mean = histogram->Mean(dimension); + const double mean = histogram->Mean(dimension); std::cout << "Mean value along dimension " << dimension << " : " << mean << std::endl; HistogramType::Iterator itr = histogram->Begin(); @@ -536,7 +536,7 @@ itkHistogramTest(int, char *[]) // Exercise GetMin / GetMax methods { - constexpr double epsilon = 1e-6; + constexpr double epsilon = 1e-6; HistogramType::SizeType size2 = histogram->GetSize(); HistogramType::BinMinContainerType binMinimums = histogram->GetMins(); @@ -615,7 +615,7 @@ itkHistogramTest(int, char *[]) { using IteratorType = HistogramType::Iterator; const IteratorType iter = histogram->Begin(); - IteratorType iter2 = histogram->End(); + IteratorType iter2 = histogram->End(); iter2 = iter; ITK_TEST_EXPECT_TRUE(iter == iter2); @@ -639,7 +639,7 @@ itkHistogramTest(int, char *[]) ITK_TEST_EXPECT_TRUE(iter5 == iter2); constexpr itk::Statistics::Sample::InstanceIdentifier id2 = 7; - const IteratorType iter6(id2, histogram); + const IteratorType iter6(id2, histogram); ITK_TEST_EXPECT_EQUAL(iter6.GetInstanceIdentifier(), id2); } @@ -647,7 +647,7 @@ itkHistogramTest(int, char *[]) { using ConstIteratorType = HistogramType::ConstIterator; const ConstIteratorType iter = histogram->Begin(); - ConstIteratorType iter2 = histogram->End(); + ConstIteratorType iter2 = histogram->End(); iter2 = iter; ITK_TEST_EXPECT_TRUE(!(iter != iter2)); @@ -666,11 +666,11 @@ itkHistogramTest(int, char *[]) const ConstIteratorType iter7(histogram); ITK_TEST_EXPECT_TRUE(iter6 == iter7); - const ConstIteratorType iter8(histogram); + const ConstIteratorType iter8(histogram); constexpr itk::Statistics::Sample::InstanceIdentifier id3 = 0; ITK_TEST_EXPECT_EQUAL(iter8.GetInstanceIdentifier(), id3); - unsigned int counter = 0; + unsigned int counter = 0; ConstIteratorType iter10(constHistogram); ITK_TEST_EXPECT_TRUE(constHistogram->Begin() == iter10); diff --git a/Modules/Numerics/Statistics/test/itkHistogramToTextureFeaturesFilterNaNTest.cxx b/Modules/Numerics/Statistics/test/itkHistogramToTextureFeaturesFilterNaNTest.cxx index 3e4b28b47da..601de6f6075 100644 --- a/Modules/Numerics/Statistics/test/itkHistogramToTextureFeaturesFilterNaNTest.cxx +++ b/Modules/Numerics/Statistics/test/itkHistogramToTextureFeaturesFilterNaNTest.cxx @@ -30,9 +30,9 @@ itkHistogramToTextureFeaturesFilterNaNTest(int, char *[]) using ImageType = itk::Image; // Build a constant image - auto image = ImageType::New(); + auto image = ImageType::New(); ImageType::RegionType region; - auto size = ImageType::SizeType::Filled(256); + auto size = ImageType::SizeType::Filled(256); region.SetSize(size); image->SetRegions(region); image->Allocate(); diff --git a/Modules/Numerics/Statistics/test/itkHistogramToTextureFeaturesFilterTest.cxx b/Modules/Numerics/Statistics/test/itkHistogramToTextureFeaturesFilterTest.cxx index 180b5aaf40d..70abcfaded0 100644 --- a/Modules/Numerics/Statistics/test/itkHistogramToTextureFeaturesFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkHistogramToTextureFeaturesFilterTest.cxx @@ -57,7 +57,7 @@ itkHistogramToTextureFeaturesFilterTest(int, char *[]) index[0] = 0; index[1] = 0; HistogramType::AbsoluteFrequencyType frequency = 10; - HistogramType::InstanceIdentifier identifier = histogram->GetInstanceIdentifier(index); + HistogramType::InstanceIdentifier identifier = histogram->GetInstanceIdentifier(index); histogram->SetFrequency(identifier, frequency); index[0] = 3; diff --git a/Modules/Numerics/Statistics/test/itkImageToHistogramFilterTest.cxx b/Modules/Numerics/Statistics/test/itkImageToHistogramFilterTest.cxx index c13d046597c..796d6a7b5de 100644 --- a/Modules/Numerics/Statistics/test/itkImageToHistogramFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToHistogramFilterTest.cxx @@ -38,8 +38,8 @@ itkImageToHistogramFilterTest(int, char *[]) auto image = RGBImageType::New(); RGBImageType::RegionType region; - RGBImageType::SizeType size; - RGBImageType::IndexType start; + RGBImageType::SizeType size; + RGBImageType::IndexType start; size[0] = 127; size[1] = 127; @@ -60,7 +60,7 @@ itkImageToHistogramFilterTest(int, char *[]) itk::ImageRegionIteratorWithIndex it(image, region); it.GoToBegin(); - RGBPixelType pixel; + RGBPixelType pixel; RGBImageType::IndexType index; while (!it.IsAtEnd()) @@ -80,7 +80,7 @@ itkImageToHistogramFilterTest(int, char *[]) using HistogramSizeType = HistogramFilterType::HistogramSizeType; using HistogramType = HistogramFilterType::HistogramType; - auto filter = HistogramFilterType::New(); + auto filter = HistogramFilterType::New(); const itk::SimpleFilterWatcher watcher(filter, "filter"); ITK_EXERCISE_BASIC_OBJECT_METHODS(filter, ImageToHistogramFilter, ImageSink); diff --git a/Modules/Numerics/Statistics/test/itkImageToHistogramFilterTest2.cxx b/Modules/Numerics/Statistics/test/itkImageToHistogramFilterTest2.cxx index 0bb99fd8d5e..a85887b9005 100644 --- a/Modules/Numerics/Statistics/test/itkImageToHistogramFilterTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToHistogramFilterTest2.cxx @@ -58,7 +58,7 @@ itkImageToHistogramFilterTest2(int argc, char * argv[]) using HistogramFilterType = itk::Statistics::ImageToHistogramFilter; - auto histogramFilter = HistogramFilterType::New(); + auto histogramFilter = HistogramFilterType::New(); const itk::SimpleFilterWatcher watcher(histogramFilter, "filter"); using HistogramMeasurementVectorType = HistogramFilterType::HistogramMeasurementVectorType; diff --git a/Modules/Numerics/Statistics/test/itkImageToListSampleAdaptorTest.cxx b/Modules/Numerics/Statistics/test/itkImageToListSampleAdaptorTest.cxx index 13e2a91b97d..36e862350f2 100644 --- a/Modules/Numerics/Statistics/test/itkImageToListSampleAdaptorTest.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToListSampleAdaptorTest.cxx @@ -34,7 +34,7 @@ itkImageToListSampleAdaptorTestTemplate() using SourceType = itk::RandomImageSource; auto source = SourceType::New(); - itk::SizeValueType size[Dimension] = { 17, 8, 20 }; + itk::SizeValueType size[Dimension] = { 17, 8, 20 }; const itk::SizeValueType totalSize = size[0] * size[1] * size[2]; source->SetSize(size); @@ -242,7 +242,7 @@ itkImageToListSampleAdaptorTestTemplate() // copy from non-const iterator const typename ImageToListSampleAdaptorType::Iterator nonconst_iter = sample->Begin(); - typename ImageToListSampleAdaptorType::ConstIterator s2_iter(nonconst_iter); + typename ImageToListSampleAdaptorType::ConstIterator s2_iter(nonconst_iter); if (s2_iter != s_iter) { std::cerr << "Iterator::Copy Constructor (from non-const) failed" << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkImageToListSampleAdaptorTest2.cxx b/Modules/Numerics/Statistics/test/itkImageToListSampleAdaptorTest2.cxx index eda2f4c6d75..84e64a05699 100644 --- a/Modules/Numerics/Statistics/test/itkImageToListSampleAdaptorTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToListSampleAdaptorTest2.cxx @@ -35,7 +35,7 @@ itkImageToListSampleAdaptorTest2(int, char *[]) auto image = ImageType::New(); ImageType::IndexType start; - ImageType::SizeType size; + ImageType::SizeType size; start.Fill(0); size.Fill(10); @@ -122,7 +122,7 @@ itkImageToListSampleAdaptorTest2(int, char *[]) auto vImage = VariableLengthImageType::New(); VariableLengthImageType::IndexType vStart; - VariableLengthImageType::SizeType vSize; + VariableLengthImageType::SizeType vSize; vStart.Fill(0); vSize.Fill(10); @@ -198,7 +198,7 @@ itkImageToListSampleAdaptorTest2(int, char *[]) auto rgbImage = RGBImageType::New(); RGBImageType::IndexType rgbStart; - RGBImageType::SizeType rgbSize; + RGBImageType::SizeType rgbSize; rgbStart.Fill(0); rgbSize.Fill(10); diff --git a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest.cxx index 8fd2405d068..fb740e502ba 100644 --- a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest.cxx @@ -36,7 +36,7 @@ CreateImage() auto image = ImageType::New(); ImageType::IndexType start; - ImageType::SizeType size; + ImageType::SizeType size; start.Fill(0); @@ -63,9 +63,9 @@ CreateImage() static MaskImageType::Pointer CreateMaskImage() { - auto image = MaskImageType::New(); + auto image = MaskImageType::New(); MaskImageType::IndexType start; - MaskImageType::SizeType size; + MaskImageType::SizeType size; start.Fill(0); size.Fill(10); @@ -75,7 +75,7 @@ CreateMaskImage() image->AllocateInitialized(); MaskImageType::IndexType startMask; - MaskImageType::SizeType sizeMask; + MaskImageType::SizeType sizeMask; startMask[0] = 2; startMask[1] = 3; @@ -103,7 +103,7 @@ CreateLargerMaskImage() auto image = MaskImageType::New(); MaskImageType::IndexType start; - MaskImageType::SizeType size; + MaskImageType::SizeType size; start[0] = 0; start[1] = 0; @@ -121,14 +121,14 @@ CreateLargerMaskImage() int itkImageToListSampleFilterTest(int, char *[]) { - const ImageType::Pointer image = CreateImage(); + const ImageType::Pointer image = CreateImage(); const MaskImageType::Pointer maskImage = CreateMaskImage(); // Generate a list sample from "image" confined to the mask, "maskImage". using ImageToListSampleFilterType = itk::Statistics::ImageToListSampleFilter; auto filter = ImageToListSampleFilterType::New(); - bool pass = true; + bool pass = true; std::string failureMeassage = ""; // Invoke update before adding an input. An exception should be @@ -187,7 +187,7 @@ itkImageToListSampleFilterTest(int, char *[]) // Check the sum of the pixels in the list sample. This should // be 945 ListSampleType::ConstIterator lit = list->Begin(); - unsigned int sum = 0; + unsigned int sum = 0; while (lit != list->End()) { sum += lit.GetMeasurementVector()[0]; diff --git a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest2.cxx b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest2.cxx index 0ef9c730bba..cc1b9481e8b 100644 --- a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest2.cxx @@ -35,9 +35,9 @@ itkImageToListSampleFilterTest2(int, char *[]) using MaskImageType = itk::Image; - auto image = ImageType::New(); + auto image = ImageType::New(); ImageType::IndexType start; - ImageType::SizeType size; + ImageType::SizeType size; start.Fill(0); size.Fill(10); @@ -63,7 +63,7 @@ itkImageToListSampleFilterTest2(int, char *[]) maskImage->SetRegions(region); maskImage->AllocateInitialized(); MaskImageType::IndexType startMask; - MaskImageType::SizeType sizeMask; + MaskImageType::SizeType sizeMask; startMask[0] = 2; startMask[1] = 3; @@ -107,7 +107,7 @@ itkImageToListSampleFilterTest2(int, char *[]) // Check the sum of the pixels in the list sample. This should // be 420 ListSampleType::ConstIterator lit = list->Begin(); - unsigned int sum = 0; + unsigned int sum = 0; while (lit != list->End()) { diff --git a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest3.cxx b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest3.cxx index 99168a5a195..dec3cf7557c 100644 --- a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest3.cxx @@ -42,7 +42,7 @@ itkImageToListSampleFilterTest3(int, char *[]) image->SetNumberOfComponentsPerPixel(MeasurementVectorSize); ImageType::IndexType start; - ImageType::SizeType size; + ImageType::SizeType size; start.Fill(0); size.Fill(10); @@ -72,7 +72,7 @@ itkImageToListSampleFilterTest3(int, char *[]) maskImage->AllocateInitialized(); MaskImageType::IndexType startMask; - MaskImageType::SizeType sizeMask; + MaskImageType::SizeType sizeMask; startMask[0] = 2; startMask[1] = 3; @@ -116,7 +116,7 @@ itkImageToListSampleFilterTest3(int, char *[]) // Check the sum of the pixels in the list sample. This should // be 420.0 ListSampleType::ConstIterator lit = list->Begin(); - float sum = 0.0; + float sum = 0.0; while (lit != list->End()) { diff --git a/Modules/Numerics/Statistics/test/itkJointDomainImageToListSampleAdaptorTest.cxx b/Modules/Numerics/Statistics/test/itkJointDomainImageToListSampleAdaptorTest.cxx index 52c55d9c1bd..781aa93ede8 100644 --- a/Modules/Numerics/Statistics/test/itkJointDomainImageToListSampleAdaptorTest.cxx +++ b/Modules/Numerics/Statistics/test/itkJointDomainImageToListSampleAdaptorTest.cxx @@ -35,12 +35,12 @@ itkJointDomainImageToListSampleAdaptorTest(int, char *[]) auto image = ImageType::New(); ImageType::IndexType start; - ImageType::SizeType size; + ImageType::SizeType size; start.Fill(0); size.Fill(10); - const unsigned long totalSize = size[0] * size[1] * size[2]; + const unsigned long totalSize = size[0] * size[1] * size[2]; const ImageType::RegionType region(start, size); image->SetRegions(region); image->Allocate(); @@ -315,7 +315,7 @@ itkJointDomainImageToListSampleAdaptorTest(int, char *[]) // copy from non-const iterator const JointDomainImageToListSampleAdaptorType::Iterator nonconst_iter = adaptor->Begin(); - JointDomainImageToListSampleAdaptorType::ConstIterator s2_iter(nonconst_iter); + JointDomainImageToListSampleAdaptorType::ConstIterator s2_iter(nonconst_iter); if (s2_iter != s_iter) { std::cerr << "Iterator::Copy Constructor (from non-const) failed" << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkKalmanLinearEstimatorTest.cxx b/Modules/Numerics/Statistics/test/itkKalmanLinearEstimatorTest.cxx index 61684e68143..9abfc9be04d 100644 --- a/Modules/Numerics/Statistics/test/itkKalmanLinearEstimatorTest.cxx +++ b/Modules/Numerics/Statistics/test/itkKalmanLinearEstimatorTest.cxx @@ -90,7 +90,7 @@ itkKalmanLinearEstimatorTest(int, char *[]) std::cout << estimation; const VectorType error = estimation - planeEquation; - const ValueType errorMagnitude = dot_product(error, error); + const ValueType errorMagnitude = dot_product(error, error); std::cout << std::endl << "Errors : " << std::endl; std::cout << error; diff --git a/Modules/Numerics/Statistics/test/itkKdTreeBasedKmeansEstimatorTest.cxx b/Modules/Numerics/Statistics/test/itkKdTreeBasedKmeansEstimatorTest.cxx index a061529ce32..45f393dbada 100644 --- a/Modules/Numerics/Statistics/test/itkKdTreeBasedKmeansEstimatorTest.cxx +++ b/Modules/Numerics/Statistics/test/itkKdTreeBasedKmeansEstimatorTest.cxx @@ -39,10 +39,10 @@ itkKdTreeBasedKmeansEstimatorTest(int argc, char * argv[]) } - char * dataFileName = argv[1]; + char * dataFileName = argv[1]; constexpr int dataSize = 2000; - const int bucketSize = std::stoi(argv[2]); - const double minStandardDeviation = std::stod(argv[3]); + const int bucketSize = std::stoi(argv[2]); + const double minStandardDeviation = std::stod(argv[3]); itk::Array trueMeans(4); trueMeans[0] = 99.261; @@ -59,15 +59,15 @@ itkKdTreeBasedKmeansEstimatorTest(int argc, char * argv[]) /* Loading point data */ using PointSetType = itk::PointSet; - auto pointSet = PointSetType::New(); + auto pointSet = PointSetType::New(); const PointSetType::PointsContainerPointer pointsContainer = PointSetType::PointsContainer::New(); pointsContainer->Reserve(dataSize); pointSet->SetPoints(pointsContainer); PointSetType::PointsContainerIterator pIter = pointsContainer->Begin(); - PointSetType::PointType point; - double temp; - std::ifstream dataStream(dataFileName); + PointSetType::PointType point; + double temp; + std::ifstream dataStream(dataFileName); while (pIter != pointsContainer->End()) { for (unsigned int i = 0; i < PointSetType::PointDimension; ++i) @@ -127,8 +127,8 @@ itkKdTreeBasedKmeansEstimatorTest(int argc, char * argv[]) estimator->StartOptimization(); Estimator::ParametersType estimatedMeans = estimator->GetParameters(); - bool passed = true; - int index; + bool passed = true; + int index; const unsigned int numberOfMeasurements = sample->GetMeasurementVectorSize(); const unsigned int numberOfClasses = trueMeans.size() / numberOfMeasurements; for (unsigned int i = 0; i < numberOfClasses; ++i) diff --git a/Modules/Numerics/Statistics/test/itkKdTreeGeneratorTest.cxx b/Modules/Numerics/Statistics/test/itkKdTreeGeneratorTest.cxx index b1fb74050c8..4470fb6b16e 100644 --- a/Modules/Numerics/Statistics/test/itkKdTreeGeneratorTest.cxx +++ b/Modules/Numerics/Statistics/test/itkKdTreeGeneratorTest.cxx @@ -74,7 +74,7 @@ itkKdTreeGeneratorTest(int, char *[]) } unsigned int partitionDimension; - float partitionValue; + float partitionValue; root->GetParameters(partitionDimension, partitionValue); std::cout << "Dimension chosen to split the space = " << partitionDimension << std::endl; std::cout << "Split point on the partition dimension = " << partitionValue << std::endl; @@ -88,7 +88,7 @@ itkKdTreeGeneratorTest(int, char *[]) queryPoint[1] = 7.0; using DistanceMetricType = itk::Statistics::EuclideanDistanceMetric; - auto distanceMetric = DistanceMetricType::New(); + auto distanceMetric = DistanceMetricType::New(); DistanceMetricType::OriginType origin(measurementVectorSize); for (unsigned int i = 0; i < measurementVectorSize; ++i) { @@ -96,7 +96,7 @@ itkKdTreeGeneratorTest(int, char *[]) } distanceMetric->SetOrigin(origin); - constexpr unsigned int numberOfNeighbors = 3; + constexpr unsigned int numberOfNeighbors = 3; TreeType::InstanceIdentifierVectorType neighbors; tree->Search(queryPoint, numberOfNeighbors, neighbors); @@ -165,7 +165,7 @@ itkKdTreeGeneratorTest(int, char *[]) } unsigned int partitionDimension; - float partitionValue; + float partitionValue; root->GetParameters(partitionDimension, partitionValue); std::cout << "Dimension chosen to split the space = " << partitionDimension << std::endl; std::cout << "Split point on the partition dimension = " << partitionValue << std::endl; @@ -179,7 +179,7 @@ itkKdTreeGeneratorTest(int, char *[]) queryPoint[1] = 7.0; using DistanceMetricType = itk::Statistics::EuclideanDistanceMetric; - auto distanceMetric = DistanceMetricType::New(); + auto distanceMetric = DistanceMetricType::New(); DistanceMetricType::OriginType origin(2); for (unsigned int i = 0; i < MeasurementVectorType::Length; ++i) { @@ -187,7 +187,7 @@ itkKdTreeGeneratorTest(int, char *[]) } distanceMetric->SetOrigin(origin); - constexpr unsigned int numberOfNeighbors = 3; + constexpr unsigned int numberOfNeighbors = 3; TreeType::InstanceIdentifierVectorType neighbors; tree->Search(queryPoint, numberOfNeighbors, neighbors); diff --git a/Modules/Numerics/Statistics/test/itkKdTreeTest1.cxx b/Modules/Numerics/Statistics/test/itkKdTreeTest1.cxx index 49afdf364f5..ab72e954c5f 100644 --- a/Modules/Numerics/Statistics/test/itkKdTreeTest1.cxx +++ b/Modules/Numerics/Statistics/test/itkKdTreeTest1.cxx @@ -51,7 +51,7 @@ itkKdTreeTest1(int argc, char * argv[]) // // Generate a sample of random points // - const unsigned int numberOfDataPoints = std::stoi(argv[1]); + const unsigned int numberOfDataPoints = std::stoi(argv[1]); MeasurementVectorType mv(measurementVectorSize); for (unsigned int i = 0; i < numberOfDataPoints; ++i) { @@ -77,7 +77,7 @@ itkKdTreeTest1(int argc, char * argv[]) MeasurementVectorType queryPoint(measurementVectorSize); - constexpr unsigned int numberOfNeighbors = 1; + constexpr unsigned int numberOfNeighbors = 1; TreeType::InstanceIdentifierVectorType neighbors; MeasurementVectorType result(measurementVectorSize); diff --git a/Modules/Numerics/Statistics/test/itkKdTreeTest2.cxx b/Modules/Numerics/Statistics/test/itkKdTreeTest2.cxx index 338ac41878a..62875970955 100644 --- a/Modules/Numerics/Statistics/test/itkKdTreeTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkKdTreeTest2.cxx @@ -104,7 +104,7 @@ itkKdTreeTest2(int argc, char * argv[]) distanceMetric->SetOrigin(origin); - constexpr unsigned int numberOfNeighbors = 1; + constexpr unsigned int numberOfNeighbors = 1; TreeType::InstanceIdentifierVectorType neighbors; tree->Search(queryPoint, numberOfNeighbors, neighbors); diff --git a/Modules/Numerics/Statistics/test/itkKdTreeTest3.cxx b/Modules/Numerics/Statistics/test/itkKdTreeTest3.cxx index 8ed46c88365..0f2ec58744a 100644 --- a/Modules/Numerics/Statistics/test/itkKdTreeTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkKdTreeTest3.cxx @@ -52,7 +52,7 @@ itkKdTreeTest3(int argc, char * argv[]) // // Generate a sample of random points // - const unsigned int numberOfDataPoints = std::stoi(argv[1]); + const unsigned int numberOfDataPoints = std::stoi(argv[1]); MeasurementVectorType mv(measurementVectorSize); for (unsigned int i = 0; i < numberOfDataPoints; ++i) { diff --git a/Modules/Numerics/Statistics/test/itkKdTreeTestSamplePoints.cxx b/Modules/Numerics/Statistics/test/itkKdTreeTestSamplePoints.cxx index a219a2326b2..db5a377c739 100644 --- a/Modules/Numerics/Statistics/test/itkKdTreeTestSamplePoints.cxx +++ b/Modules/Numerics/Statistics/test/itkKdTreeTestSamplePoints.cxx @@ -32,7 +32,7 @@ itkKdTreeTestSamplePoints(int, char *[]) sample->SetMeasurementVectorSize(measurementVectorSize); constexpr unsigned int numberOfDataPoints = 5; - MeasurementVectorType mv(measurementVectorSize); + MeasurementVectorType mv(measurementVectorSize); mv[0] = 0.0342; mv[1] = 0.5175; sample->PushBack(mv); @@ -72,7 +72,7 @@ itkKdTreeTestSamplePoints(int, char *[]) MeasurementVectorType queryPoint(measurementVectorSize); - constexpr unsigned int numberOfNeighbors = 1; + constexpr unsigned int numberOfNeighbors = 1; TreeType::InstanceIdentifierVectorType neighbors; MeasurementVectorType result(measurementVectorSize); diff --git a/Modules/Numerics/Statistics/test/itkListSampleTest.cxx b/Modules/Numerics/Statistics/test/itkListSampleTest.cxx index dea175cd8ce..ae488ca62c6 100644 --- a/Modules/Numerics/Statistics/test/itkListSampleTest.cxx +++ b/Modules/Numerics/Statistics/test/itkListSampleTest.cxx @@ -287,7 +287,7 @@ itkListSampleTest(int argc, char * argv[]) // copy from non-const iterator std::cerr << "Trying Iterator::Copy Constructor (from non-const)..."; const SampleType::Iterator nonconst_iter = sample->Begin(); - SampleType::ConstIterator s2_iter(nonconst_iter); + SampleType::ConstIterator s2_iter(nonconst_iter); if (s2_iter != s_iter) { std::cerr << "FAILED" << std::endl; @@ -407,7 +407,7 @@ itkListSampleTest(int argc, char * argv[]) } VariableSizeMeasurementVectorType variableLengthVector; - constexpr unsigned int newsize = 42; + constexpr unsigned int newsize = 42; variableLengthVector.SetSize(newsize); variableSizeSample->Clear(); @@ -446,7 +446,7 @@ itkListSampleTest(int argc, char * argv[]) // Exercise the exception throwing when requesting // an element id that is outside the list range. const unsigned int largestId = sample->Size(); - bool exceptionWorks = false; + bool exceptionWorks = false; try { const MeasurementVectorType measurement = sample->GetMeasurementVector(largestId + 10); @@ -493,7 +493,7 @@ itkListSampleTest(int argc, char * argv[]) { using IteratorType = SampleType::Iterator; const IteratorType iter = sample->Begin(); - IteratorType iter2 = sample->Begin(); + IteratorType iter2 = sample->Begin(); std::cerr << "Trying Iterator operator=()..."; iter2 = iter; @@ -584,7 +584,7 @@ itkListSampleTest(int argc, char * argv[]) std::cerr << "Trying ConstIterator operator!=() and operator=()..."; using ConstIteratorType = SampleType::ConstIterator; const ConstIteratorType iter = sample->Begin(); - ConstIteratorType iter2 = sample->End(); + ConstIteratorType iter2 = sample->End(); iter2 = iter; @@ -679,7 +679,7 @@ itkListSampleTest(int argc, char * argv[]) std::cerr << "PASSED" << std::endl; std::cerr << "Trying ConstIterator constructor from sample..."; - unsigned int counter = 0; + unsigned int counter = 0; ConstIteratorType iter10(constSample); if (iter10 != constSample->Begin()) { diff --git a/Modules/Numerics/Statistics/test/itkMahalanobisDistanceMetricTest.cxx b/Modules/Numerics/Statistics/test/itkMahalanobisDistanceMetricTest.cxx index 2d38c13a1e4..c1e3ebf0914 100644 --- a/Modules/Numerics/Statistics/test/itkMahalanobisDistanceMetricTest.cxx +++ b/Modules/Numerics/Statistics/test/itkMahalanobisDistanceMetricTest.cxx @@ -117,7 +117,7 @@ itkMahalanobisDistanceMetricTest(int, char *[]) // Test if an exception is thrown if a covariance matrix is set with different // size - DistanceMetricType::CovarianceMatrixType covarianceMatrix2; + DistanceMetricType::CovarianceMatrixType covarianceMatrix2; constexpr DistanceMetricType::MeasurementVectorSizeType measurementSize2 = 4; covarianceMatrix2.set_size(measurementSize2, measurementSize2); diff --git a/Modules/Numerics/Statistics/test/itkManhattanDistanceMetricTest.cxx b/Modules/Numerics/Statistics/test/itkManhattanDistanceMetricTest.cxx index ebd9218abb4..589387d2678 100644 --- a/Modules/Numerics/Statistics/test/itkManhattanDistanceMetricTest.cxx +++ b/Modules/Numerics/Statistics/test/itkManhattanDistanceMetricTest.cxx @@ -78,7 +78,7 @@ itkManhattanDistanceMetricTest(int, char *[]) measurement[2] = 4.0; constexpr double trueValue = 5.0; - const double distanceComputed = distance->Evaluate(measurement); + const double distanceComputed = distance->Evaluate(measurement); constexpr double tolerance = 0.001; if (itk::Math::abs(distanceComputed - trueValue) > tolerance) @@ -96,7 +96,7 @@ itkManhattanDistanceMetricTest(int, char *[]) measurement2[2] = 3.5; constexpr double trueValue2 = 1.7; - const double distanceComputed2 = distance->Evaluate(measurement, measurement2); + const double distanceComputed2 = distance->Evaluate(measurement, measurement2); if (itk::Math::abs(distanceComputed2 - trueValue2) > tolerance) { diff --git a/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest.cxx index 11e9409473a..7f1d10a3f6b 100644 --- a/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest.cxx @@ -23,7 +23,7 @@ int itkMeanSampleFilterTest(int, char *[]) { std::cout << "MeanSampleFilter test \n \n"; - bool pass = true; + bool pass = true; std::string failureMeassage = ""; constexpr unsigned int MeasurementVectorSize = 2; @@ -90,7 +90,7 @@ itkMeanSampleFilterTest(int, char *[]) } const FilterType::MeasurementVectorDecoratedType * decorator = filter->GetOutput(); - FilterType::MeasurementVectorType meanOutput = decorator->Get(); + FilterType::MeasurementVectorType meanOutput = decorator->Get(); FilterType::MeasurementVectorType mean; diff --git a/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest2.cxx b/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest2.cxx index 597824a7d61..6c7af4f77e4 100644 --- a/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest2.cxx @@ -23,7 +23,7 @@ int itkMeanSampleFilterTest2(int, char *[]) { std::cout << "MeanSampleFilter test \n \n"; - bool pass = true; + bool pass = true; std::string failureMeassage = ""; constexpr unsigned int MeasurementVectorSize = 2; @@ -69,7 +69,7 @@ itkMeanSampleFilterTest2(int, char *[]) } const FilterType::MeasurementVectorDecoratedType * decorator = filter->GetOutput(); - FilterType::MeasurementVectorRealType meanOutput = decorator->Get(); + FilterType::MeasurementVectorRealType meanOutput = decorator->Get(); FilterType::MeasurementVectorRealType expectedMean; diff --git a/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest3.cxx b/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest3.cxx index 44df31d26d2..fd484cc02f3 100644 --- a/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest3.cxx @@ -34,7 +34,7 @@ itkMeanSampleFilterTest3(int, char *[]) auto histogram = HistogramType::New(); - HistogramType::SizeType size(MeasurementVectorSize); + HistogramType::SizeType size(MeasurementVectorSize); HistogramType::MeasurementVectorType lowerBound(MeasurementVectorSize); HistogramType::MeasurementVectorType upperBound(MeasurementVectorSize); @@ -54,7 +54,7 @@ itkMeanSampleFilterTest3(int, char *[]) using MeanVectorType = MembershipFunctionType::MeanVectorType; using CovarianceMatrixType = MembershipFunctionType::CovarianceMatrixType; - MeanVectorType mean(MeasurementVectorSize); + MeanVectorType mean(MeasurementVectorSize); CovarianceMatrixType covariance(MeasurementVectorSize, MeasurementVectorSize); mean[0] = 50; @@ -81,7 +81,7 @@ itkMeanSampleFilterTest3(int, char *[]) memberFunction->SetMean(mean); memberFunction->SetCovariance(covariance); - HistogramType::Iterator itr = histogram->Begin(); + HistogramType::Iterator itr = histogram->Begin(); const HistogramType::Iterator end = histogram->End(); using AbsoluteFrequencyType = HistogramType::AbsoluteFrequencyType; diff --git a/Modules/Numerics/Statistics/test/itkMeasurementVectorTraitsTest.cxx b/Modules/Numerics/Statistics/test/itkMeasurementVectorTraitsTest.cxx index b2fc3b78480..d9d799373ae 100644 --- a/Modules/Numerics/Statistics/test/itkMeasurementVectorTraitsTest.cxx +++ b/Modules/Numerics/Statistics/test/itkMeasurementVectorTraitsTest.cxx @@ -131,7 +131,7 @@ itkMeasurementVectorTraitsTest(int, char *[]) itkAssertSameLengthTest(measure4b, measure4b); // against same type with different length - MeasurementVectorType1 measure1bb; + MeasurementVectorType1 measure1bb; MeasurementVectorType2b measure2bb; MeasurementVectorType3b measure3bb; MeasurementVectorType4b measure4bb; diff --git a/Modules/Numerics/Statistics/test/itkMembershipSampleTest1.cxx b/Modules/Numerics/Statistics/test/itkMembershipSampleTest1.cxx index 78c4423c9ca..88136cf0c10 100644 --- a/Modules/Numerics/Statistics/test/itkMembershipSampleTest1.cxx +++ b/Modules/Numerics/Statistics/test/itkMembershipSampleTest1.cxx @@ -60,7 +60,7 @@ itkMembershipSampleTest1(int, char *[]) // Add measurement vectors to the list sample constexpr unsigned int sampleSize = 10; - MeasurementVectorType mv; + MeasurementVectorType mv; std::cout << "Sample length = " << sample->GetMeasurementVectorSize() << std::endl; std::cout << "Vector length = " << itk::NumericTraits::GetLength(mv) << std::endl; @@ -199,7 +199,7 @@ itkMembershipSampleTest1(int, char *[]) // copy from non-const iterator const MembershipSampleType::Iterator nonconst_iter = membershipSample->Begin(); - MembershipSampleType::ConstIterator s2_iter(nonconst_iter); + MembershipSampleType::ConstIterator s2_iter(nonconst_iter); if (s2_iter != s_iter) { std::cerr << "Iterator::Copy Constructor (from non-const) failed" << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkMembershipSampleTest2.cxx b/Modules/Numerics/Statistics/test/itkMembershipSampleTest2.cxx index c89b639567e..dd81d66c954 100644 --- a/Modules/Numerics/Statistics/test/itkMembershipSampleTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkMembershipSampleTest2.cxx @@ -60,7 +60,7 @@ itkMembershipSampleTest2(int, char *[]) // Add measurement vectors to the list sample constexpr unsigned int sampleSize = 10; - MeasurementVectorType mv; + MeasurementVectorType mv; itk::NumericTraits::SetLength(mv, MeasurementVectorSize); std::cout << "Sample length = " << sample->GetMeasurementVectorSize() << std::endl; @@ -200,7 +200,7 @@ itkMembershipSampleTest2(int, char *[]) // copy from non-const iterator const MembershipSampleType::Iterator nonconst_iter = membershipSample->Begin(); - MembershipSampleType::ConstIterator s2_iter(nonconst_iter); + MembershipSampleType::ConstIterator s2_iter(nonconst_iter); if (s2_iter != s_iter) { std::cerr << "Iterator::Copy Constructor (from non-const) failed" << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkMembershipSampleTest3.cxx b/Modules/Numerics/Statistics/test/itkMembershipSampleTest3.cxx index 1a51903de4b..8147ffe913a 100644 --- a/Modules/Numerics/Statistics/test/itkMembershipSampleTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkMembershipSampleTest3.cxx @@ -61,7 +61,7 @@ itkMembershipSampleTest3(int, char *[]) // Add measurement vectors to the list sample constexpr unsigned int sampleSize = 10; - MeasurementVectorType mv; + MeasurementVectorType mv; itk::NumericTraits::SetLength(mv, MeasurementVectorSize); std::cout << "Sample length = " << sample->GetMeasurementVectorSize() << std::endl; @@ -201,7 +201,7 @@ itkMembershipSampleTest3(int, char *[]) // copy from non-const iterator const MembershipSampleType::Iterator nonconst_iter = membershipSample->Begin(); - MembershipSampleType::ConstIterator s2_iter(nonconst_iter); + MembershipSampleType::ConstIterator s2_iter(nonconst_iter); if (s2_iter != s_iter) { std::cerr << "Iterator::Copy Constructor (from non-const) failed" << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkMembershipSampleTest4.cxx b/Modules/Numerics/Statistics/test/itkMembershipSampleTest4.cxx index 8498c037fa0..31d36131125 100644 --- a/Modules/Numerics/Statistics/test/itkMembershipSampleTest4.cxx +++ b/Modules/Numerics/Statistics/test/itkMembershipSampleTest4.cxx @@ -61,7 +61,7 @@ itkMembershipSampleTest4(int, char *[]) // Add measurement vectors to the list sample constexpr unsigned int sampleSize = 10; - MeasurementVectorType mv; + MeasurementVectorType mv; itk::NumericTraits::SetLength(mv, MeasurementVectorSize); std::cout << "Sample length = " << sample->GetMeasurementVectorSize() << std::endl; @@ -201,7 +201,7 @@ itkMembershipSampleTest4(int, char *[]) // copy from non-const iterator const MembershipSampleType::Iterator nonconst_iter = membershipSample->Begin(); - MembershipSampleType::ConstIterator s2_iter(nonconst_iter); + MembershipSampleType::ConstIterator s2_iter(nonconst_iter); if (s2_iter != s_iter) { std::cerr << "Iterator::Copy Constructor (from non-const) failed" << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkPointSetToListSampleAdaptorTest.cxx b/Modules/Numerics/Statistics/test/itkPointSetToListSampleAdaptorTest.cxx index ff3f7b802ba..82d5f5c8bda 100644 --- a/Modules/Numerics/Statistics/test/itkPointSetToListSampleAdaptorTest.cxx +++ b/Modules/Numerics/Statistics/test/itkPointSetToListSampleAdaptorTest.cxx @@ -27,7 +27,7 @@ itkPointSetToListSampleAdaptorTest(int, char *[]) using PointSetType = itk::PointSet; using PointSetToListSampleAdaptorType = itk::Statistics::PointSetToListSampleAdaptor; - auto pointSet = PointSetType::New(); + auto pointSet = PointSetType::New(); PointSetType::PointType point; constexpr unsigned int numberOfPoints = 10; @@ -148,7 +148,7 @@ itkPointSetToListSampleAdaptorTest(int, char *[]) for (unsigned int i = 0; i < numberOfPoints; ++i) { const PointSetToListSampleAdaptorType::InstanceIdentifier id = i; - PointSetType::PointType tempPointSet(0.0); + PointSetType::PointType tempPointSet(0.0); pointSet->GetPoint(i, &tempPointSet); if (listSample->GetMeasurementVector(id) != tempPointSet) @@ -243,7 +243,7 @@ itkPointSetToListSampleAdaptorTest(int, char *[]) // copy from non-const iterator const PointSetToListSampleAdaptorType::Iterator nonconst_iter = listSample->Begin(); - PointSetToListSampleAdaptorType::ConstIterator s2_iter(nonconst_iter); + PointSetToListSampleAdaptorType::ConstIterator s2_iter(nonconst_iter); if (s2_iter != s_iter) { std::cerr << "Iterator::Copy Constructor (from non-const) failed" << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkSampleTest.cxx b/Modules/Numerics/Statistics/test/itkSampleTest.cxx index d07d800f1cf..6800d2b43cc 100644 --- a/Modules/Numerics/Statistics/test/itkSampleTest.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleTest.cxx @@ -83,7 +83,7 @@ class MySample : public Sample GetTotalFrequency() const override { TotalAbsoluteFrequencyType sum{}; - auto itr = m_Frequencies.begin(); + auto itr = m_Frequencies.begin(); while (itr != m_Frequencies.end()) { sum += *itr; @@ -156,7 +156,7 @@ itkSampleTest(int, char *[]) sample->AddMeasurementVector(measure, frequency); - MeasurementVectorType measureBack = sample->GetMeasurementVector(0); + MeasurementVectorType measureBack = sample->GetMeasurementVector(0); const AbsoluteFrequencyType frequencyBack = sample->GetFrequency(0); if (frequencyBack != frequency) diff --git a/Modules/Numerics/Statistics/test/itkSampleTest2.cxx b/Modules/Numerics/Statistics/test/itkSampleTest2.cxx index 6554f0468cc..66997175a74 100644 --- a/Modules/Numerics/Statistics/test/itkSampleTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleTest2.cxx @@ -90,7 +90,7 @@ class MySample : public Sample GetTotalFrequency() const override { TotalAbsoluteFrequencyType sum{}; - auto itr = m_Frequencies.begin(); + auto itr = m_Frequencies.begin(); while (itr != m_Frequencies.end()) { sum += *itr; @@ -163,7 +163,7 @@ itkSampleTest2(int, char *[]) sample->AddMeasurementVector(measure, frequency); - MeasurementVectorType measureBack = sample->GetMeasurementVector(0); + MeasurementVectorType measureBack = sample->GetMeasurementVector(0); const AbsoluteFrequencyType frequencyBack = sample->GetFrequency(0); if (frequencyBack != frequency) diff --git a/Modules/Numerics/Statistics/test/itkSampleTest3.cxx b/Modules/Numerics/Statistics/test/itkSampleTest3.cxx index d3f84a571aa..ce6768b64a3 100644 --- a/Modules/Numerics/Statistics/test/itkSampleTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleTest3.cxx @@ -91,7 +91,7 @@ class MySample : public Sample GetTotalFrequency() const override { TotalAbsoluteFrequencyType sum{}; - auto itr = m_Frequencies.begin(); + auto itr = m_Frequencies.begin(); while (itr != m_Frequencies.end()) { sum += *itr; @@ -164,7 +164,7 @@ itkSampleTest3(int, char *[]) sample->AddMeasurementVector(measure, frequency); - MeasurementVectorType measureBack = sample->GetMeasurementVector(0); + MeasurementVectorType measureBack = sample->GetMeasurementVector(0); const AbsoluteFrequencyType frequencyBack = sample->GetFrequency(0); if (frequencyBack != frequency) diff --git a/Modules/Numerics/Statistics/test/itkSampleTest4.cxx b/Modules/Numerics/Statistics/test/itkSampleTest4.cxx index 0db8e193d29..60fe1cc9e3b 100644 --- a/Modules/Numerics/Statistics/test/itkSampleTest4.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleTest4.cxx @@ -91,7 +91,7 @@ class MySample : public Sample GetTotalFrequency() const override { TotalAbsoluteFrequencyType sum{}; - auto itr = m_Frequencies.begin(); + auto itr = m_Frequencies.begin(); while (itr != m_Frequencies.end()) { sum += *itr; @@ -164,7 +164,7 @@ itkSampleTest4(int, char *[]) sample->AddMeasurementVector(measure, frequency); - MeasurementVectorType measureBack = sample->GetMeasurementVector(0); + MeasurementVectorType measureBack = sample->GetMeasurementVector(0); const AbsoluteFrequencyType frequencyBack = sample->GetFrequency(0); if (frequencyBack != frequency) diff --git a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest3.cxx b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest3.cxx index 0fb76a17890..861812131fc 100644 --- a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest3.cxx @@ -127,7 +127,7 @@ itkSampleToHistogramFilterTest3(int, char *[]) } - HistogramType::ConstIterator histogramItr = histogram->Begin(); + HistogramType::ConstIterator histogramItr = histogram->Begin(); const HistogramType::ConstIterator histogramEnd = histogram->End(); constexpr unsigned int expectedFrequency1 = 1; diff --git a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest4.cxx b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest4.cxx index 6d3a34de95c..76d6433bf18 100644 --- a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest4.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest4.cxx @@ -143,7 +143,7 @@ itkSampleToHistogramFilterTest4(int, char *[]) } - HistogramType::ConstIterator histogramItr = histogram->Begin(); + HistogramType::ConstIterator histogramItr = histogram->Begin(); const HistogramType::ConstIterator histogramEnd = histogram->End(); constexpr unsigned int expectedFrequency1 = 1; diff --git a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest5.cxx b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest5.cxx index 86b84751dbf..b6dc1cd55fd 100644 --- a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest5.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest5.cxx @@ -113,7 +113,7 @@ itkSampleToHistogramFilterTest5(int argc, char * argv[]) } - HistogramType::ConstIterator histogramItr = histogram->Begin(); + HistogramType::ConstIterator histogramItr = histogram->Begin(); const HistogramType::ConstIterator histogramEnd = histogram->End(); using PrintType = itk::NumericTraits::PrintType; diff --git a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest6.cxx b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest6.cxx index 3d836a4b904..aa027fe0eec 100644 --- a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest6.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest6.cxx @@ -136,7 +136,7 @@ itkSampleToHistogramFilterTest6(int, char *[]) } - HistogramType::ConstIterator histogramItr = histogram->Begin(); + HistogramType::ConstIterator histogramItr = histogram->Begin(); const HistogramType::ConstIterator histogramEnd = histogram->End(); constexpr unsigned int expectedFrequency1 = 1; diff --git a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest7.cxx b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest7.cxx index 41a24b101db..52cb4104fdd 100644 --- a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest7.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest7.cxx @@ -127,7 +127,7 @@ itkSampleToHistogramFilterTest7(int, char *[]) } - HistogramType::ConstIterator histogramItr = histogram->Begin(); + HistogramType::ConstIterator histogramItr = histogram->Begin(); const HistogramType::ConstIterator histogramEnd = histogram->End(); constexpr unsigned int expectedFrequency1 = 1; diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceListSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceListSampleFilterTest.cxx index 81f06ac48f3..c377d8d1694 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceListSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceListSampleFilterTest.cxx @@ -41,7 +41,7 @@ itkScalarImageToCooccurrenceListSampleFilterTest(int, char *[]) constexpr InputImageType::SizeType inputImageSize = { { IMGWIDTH, IMGHEIGHT } }; constexpr InputImageType::IndexType index{}; - InputImageType::RegionType region; + InputImageType::RegionType region; region.SetSize(inputImageSize); region.SetIndex(index); diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest.cxx index c9cd875d432..432f175c9df 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest.cxx @@ -45,7 +45,7 @@ itkScalarImageToCooccurrenceMatrixFilterTest(int, char *[]) constexpr InputImageType::SizeType inputImageSize = { { IMGWIDTH, IMGHEIGHT } }; constexpr InputImageType::IndexType index{}; - InputImageType::RegionType region; + InputImageType::RegionType region; region.SetSize(inputImageSize); region.SetIndex(index); @@ -153,8 +153,8 @@ itkScalarImageToCooccurrenceMatrixFilterTest(int, char *[]) filter->SetInput(image); - constexpr InputImageType::OffsetType offset1 = { { 0, 1 } }; - constexpr InputImageType::OffsetType offset2 = { { 1, 0 } }; + constexpr InputImageType::OffsetType offset1 = { { 0, 1 } }; + constexpr InputImageType::OffsetType offset2 = { { 1, 0 } }; const FilterType::OffsetVectorPointer offsetV = FilterType::OffsetVector::New(); offsetV->push_back(offset1); offsetV->push_back(offset2); diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest2.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest2.cxx index 266b5c6285a..f70b59f73d1 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest2.cxx @@ -47,7 +47,7 @@ itkScalarImageToCooccurrenceMatrixFilterTest2(int, char *[]) constexpr InputImageType::SizeType inputImageSize = { { IMGWIDTH, IMGHEIGHT } }; constexpr InputImageType::IndexType index{}; - InputImageType::RegionType region; + InputImageType::RegionType region; region.SetSize(inputImageSize); region.SetIndex(index); @@ -128,8 +128,8 @@ itkScalarImageToCooccurrenceMatrixFilterTest2(int, char *[]) filter->SetInput(image); - constexpr InputImageType::OffsetType offset1 = { { 0, 1 } }; - constexpr InputImageType::OffsetType offset2 = { { 1, 0 } }; + constexpr InputImageType::OffsetType offset1 = { { 0, 1 } }; + constexpr InputImageType::OffsetType offset2 = { { 1, 0 } }; const FilterType::OffsetVectorPointer offsetV = FilterType::OffsetVector::New(); offsetV->push_back(offset1); offsetV->push_back(offset2); diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthFeaturesFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthFeaturesFilterTest.cxx index 2a5f75ffa24..383c9bc9b75 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthFeaturesFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthFeaturesFilterTest.cxx @@ -44,7 +44,7 @@ itkScalarImageToRunLengthFeaturesFilterTest(int, char *[]) constexpr InputImageType::SizeType inputImageSize = { { IMGWIDTH, IMGHEIGHT } }; constexpr InputImageType::IndexType index{}; - InputImageType::RegionType region; + InputImageType::RegionType region; region.SetSize(inputImageSize); region.SetIndex(index); diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthMatrixFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthMatrixFilterTest.cxx index d99fcfd6038..6e6480abc32 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthMatrixFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthMatrixFilterTest.cxx @@ -117,8 +117,8 @@ itkScalarImageToRunLengthMatrixFilterTest(int, char *[]) filter->SetInput(image); - constexpr InputImageType::OffsetType offset1 = { { 0, -1 } }; - constexpr InputImageType::OffsetType offset2 = { { -1, 0 } }; + constexpr InputImageType::OffsetType offset1 = { { 0, -1 } }; + constexpr InputImageType::OffsetType offset2 = { { -1, 0 } }; const FilterType::OffsetVectorPointer offsetV = FilterType::OffsetVector::New(); offsetV->push_back(offset1); offsetV->push_back(offset2); diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToTextureFeaturesFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToTextureFeaturesFilterTest.cxx index 917f17335e1..298259e0958 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToTextureFeaturesFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToTextureFeaturesFilterTest.cxx @@ -47,7 +47,7 @@ itkScalarImageToTextureFeaturesFilterTest(int, char *[]) constexpr InputImageType::SizeType inputImageSize = { { IMGWIDTH, IMGHEIGHT } }; constexpr InputImageType::IndexType index{}; - InputImageType::RegionType region; + InputImageType::RegionType region; region.SetSize(inputImageSize); region.SetIndex(index); diff --git a/Modules/Numerics/Statistics/test/itkSparseFrequencyContainer2Test.cxx b/Modules/Numerics/Statistics/test/itkSparseFrequencyContainer2Test.cxx index fbd57016f96..13c2344c71f 100644 --- a/Modules/Numerics/Statistics/test/itkSparseFrequencyContainer2Test.cxx +++ b/Modules/Numerics/Statistics/test/itkSparseFrequencyContainer2Test.cxx @@ -49,7 +49,7 @@ itkSparseFrequencyContainer2Test(int, char *[]) for (unsigned int bin = 0; bin < numberOfBins; ++bin) { // Test if the values can be read back - const auto frequency = static_cast(bin * bin); + const auto frequency = static_cast(bin * bin); const AbsoluteFrequencyType stored = container->GetFrequency(bin); if (stored != frequency) { @@ -98,7 +98,7 @@ itkSparseFrequencyContainer2Test(int, char *[]) // Test if the values can be read back for (unsigned int bin = 0; bin < numberOfBins; ++bin) { - const auto frequency = static_cast(bin * bin + bin); + const auto frequency = static_cast(bin * bin + bin); const AbsoluteFrequencyType stored = container->GetFrequency(bin); if (stored != frequency) { diff --git a/Modules/Numerics/Statistics/test/itkSpatialNeighborSubsamplerTest.cxx b/Modules/Numerics/Statistics/test/itkSpatialNeighborSubsamplerTest.cxx index ea2463a4fa2..4984ff0e786 100644 --- a/Modules/Numerics/Statistics/test/itkSpatialNeighborSubsamplerTest.cxx +++ b/Modules/Numerics/Statistics/test/itkSpatialNeighborSubsamplerTest.cxx @@ -74,10 +74,10 @@ itkSpatialNeighborSubsamplerTest(int, char *[]) using SamplerType = itk::Statistics::SpatialNeighborSubsampler; using IteratorType = itk::ImageRegionConstIteratorWithIndex; - auto inImage = ImageType::New(); - constexpr auto sz = SizeType::Filled(25); + auto inImage = ImageType::New(); + constexpr auto sz = SizeType::Filled(25); constexpr IndexType idx{}; - const RegionType region{ idx, sz }; + const RegionType region{ idx, sz }; inImage->SetRegions(region); inImage->AllocateInitialized(); @@ -134,7 +134,7 @@ itkSpatialNeighborSubsamplerTest(int, char *[]) } SamplerType::SubsamplePointer subsample = SamplerType::SubsampleType::New(); - IndexType queryIdx; + IndexType queryIdx; queryIdx[0] = 2; queryIdx[1] = 6; const ImageType::OffsetValueType queryOffset = inImage->ComputeOffset(queryIdx); diff --git a/Modules/Numerics/Statistics/test/itkStandardDeviationPerComponentSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkStandardDeviationPerComponentSampleFilterTest.cxx index 41e5ba13000..e2d65fc069e 100644 --- a/Modules/Numerics/Statistics/test/itkStandardDeviationPerComponentSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkStandardDeviationPerComponentSampleFilterTest.cxx @@ -37,9 +37,9 @@ itkStandardDeviationPerComponentSampleFilterTest(int, char *[]) using ImageType = itk::Image; using MaskImageType = itk::Image; - auto image = ImageType::New(); - ImageType::RegionType region; - ImageType::SizeType size; + auto image = ImageType::New(); + ImageType::RegionType region; + ImageType::SizeType size; constexpr ImageType::IndexType index{}; size.Fill(5); region.SetIndex(index); @@ -52,7 +52,7 @@ itkStandardDeviationPerComponentSampleFilterTest(int, char *[]) using ImageIterator = itk::ImageRegionIterator; ImageIterator iter(image, region); - unsigned int count = 0; + unsigned int count = 0; MeasurementVectorType temp{}; // fill the image diff --git a/Modules/Numerics/Statistics/test/itkStatisticsAlgorithmTest2.cxx b/Modules/Numerics/Statistics/test/itkStatisticsAlgorithmTest2.cxx index e604ea630c3..6b8e560f31f 100644 --- a/Modules/Numerics/Statistics/test/itkStatisticsAlgorithmTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkStatisticsAlgorithmTest2.cxx @@ -35,7 +35,7 @@ void resetData(itk::Image::Pointer image, std::vector & refVector) { ImageType::IndexType index; - ImageType::SizeType size = image->GetLargestPossibleRegion().GetSize(); + ImageType::SizeType size = image->GetLargestPossibleRegion().GetSize(); // fill the image with random values @@ -77,8 +77,8 @@ resetData(itk::Image::Pointer image, std::vector & refVector) bool isSortedOrderCorrect(std::vector & ref, itk::Statistics::Subsample::Pointer subsample) { - bool ret = true; - auto viter = ref.begin(); + bool ret = true; + auto viter = ref.begin(); SubsampleType::Iterator siter = subsample->Begin(); while (siter != subsample->End()) { @@ -98,7 +98,7 @@ int itkStatisticsAlgorithmTest2(int, char *[]) { std::cout << "Statistics Algorithm Test \n \n"; - bool pass = true; + bool pass = true; std::string whereFail = ""; // creates an image and allocate memory diff --git a/Modules/Numerics/Statistics/test/itkSubsampleTest.cxx b/Modules/Numerics/Statistics/test/itkSubsampleTest.cxx index 60a342be531..7b477ab6e83 100644 --- a/Modules/Numerics/Statistics/test/itkSubsampleTest.cxx +++ b/Modules/Numerics/Statistics/test/itkSubsampleTest.cxx @@ -26,7 +26,7 @@ int itkSubsampleTest(int, char *[]) { std::cout << "Subsample Test \n \n"; - bool pass = true; + bool pass = true; std::string whereFail = ""; using FloatImage = itk::Image; @@ -35,7 +35,7 @@ itkSubsampleTest(int, char *[]) using SourceType = itk::RandomImageSource; auto source = SourceType::New(); - itk::SizeValueType size[3] = { 17, 8, 20 }; + itk::SizeValueType size[3] = { 17, 8, 20 }; const itk::SizeValueType totalSize = size[0] * size[1] * size[2]; source->SetSize(size); @@ -166,7 +166,7 @@ itkSubsampleTest(int, char *[]) // try accessing a measurement vector by index that is out of range try { - const unsigned int index = listSample->Size() + 2; + const unsigned int index = listSample->Size() + 2; const MeasurementVectorType measurementVector = subsample->GetMeasurementVectorByIndex(index); std::cerr << "Exception should have been thrown since the index specified is outside the range of the sample container" @@ -184,7 +184,7 @@ itkSubsampleTest(int, char *[]) // try accessing a measurement vector frequency by index that is out of range try { - const unsigned int index = listSample->Size() + 2; + const unsigned int index = listSample->Size() + 2; const SubsampleType::AbsoluteFrequencyType frequency = subsample->GetFrequencyByIndex(index); std::cout << "Frequency: " << frequency << std::endl; std::cerr @@ -201,7 +201,7 @@ itkSubsampleTest(int, char *[]) // using an index that is out of range try { - const unsigned int index = listSample->Size() + 2; + const unsigned int index = listSample->Size() + 2; const ListSampleType::InstanceIdentifier id = subsample->GetInstanceIdentifier(index); std::cerr << "Exception should have been thrown since the index specified is outside the range of the sample container" @@ -223,7 +223,7 @@ itkSubsampleTest(int, char *[]) std::cout << subsample->GetTotalFrequency() << std::endl; auto index = ArrayPixelImageType::IndexType::Filled(2); // index {2, 2, 2} = instance identifier (offset from image) - ArrayPixelImageType::PixelType pixel = filter->GetInput()->GetPixel(index); + ArrayPixelImageType::PixelType pixel = filter->GetInput()->GetPixel(index); const ListSampleType::InstanceIdentifier ind = static_cast(filter->GetInput()->ComputeOffset(index)); @@ -238,7 +238,7 @@ itkSubsampleTest(int, char *[]) ImageIterator i_iter(filter->GetInput(), filter->GetInput()->GetLargestPossibleRegion()); SubsampleType::Iterator s_iter = subsample->Begin(); - unsigned int count = 0; + unsigned int count = 0; while (count < subsample->Size()) { if (itk::Math::NotExactlyEquals(i_iter.Get()[0], s_iter.GetMeasurementVector()[0])) diff --git a/Modules/Numerics/Statistics/test/itkSubsampleTest2.cxx b/Modules/Numerics/Statistics/test/itkSubsampleTest2.cxx index b9bca761f9f..f214fb96888 100644 --- a/Modules/Numerics/Statistics/test/itkSubsampleTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkSubsampleTest2.cxx @@ -174,7 +174,7 @@ itkSubsampleTest2(int, char *[]) // Testing methods specific to Iterators { const IteratorType iter7 = subSample2->Begin(); - IteratorType iter8 = subSample2->End(); + IteratorType iter8 = subSample2->End(); iter8 = iter7; if (iter8 != iter7) @@ -217,7 +217,7 @@ itkSubsampleTest2(int, char *[]) return EXIT_FAILURE; } - IteratorType iter6(subSample2); + IteratorType iter6(subSample2); constexpr unsigned int targetEntry = 2; for (unsigned int kk = 0; kk < targetEntry; ++kk) { @@ -237,7 +237,7 @@ itkSubsampleTest2(int, char *[]) // Testing methods specific to ConstIterators { const ConstIteratorType iter11 = subSample2->Begin(); - ConstIteratorType iter12 = subSample2->End(); + ConstIteratorType iter12 = subSample2->End(); iter12 = iter11; @@ -286,7 +286,7 @@ itkSubsampleTest2(int, char *[]) } - ConstIteratorType iter9(subSample2); + ConstIteratorType iter9(subSample2); constexpr unsigned int targetEntry = 2; for (unsigned int kk = 0; kk < targetEntry; ++kk) { @@ -308,7 +308,7 @@ itkSubsampleTest2(int, char *[]) } } - unsigned int counter = 0; + unsigned int counter = 0; ConstIteratorType iter10(constSample); if (iter10 != constSample->Begin()) { diff --git a/Modules/Numerics/Statistics/test/itkSubsampleTest3.cxx b/Modules/Numerics/Statistics/test/itkSubsampleTest3.cxx index 0d50e3b6151..04cf1ba4cad 100644 --- a/Modules/Numerics/Statistics/test/itkSubsampleTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkSubsampleTest3.cxx @@ -75,7 +75,7 @@ itkSubsampleTest3(int, char *[]) } const FilterType::MeasurementVectorDecoratedType * decorator = filter->GetOutput(); - FilterType::MeasurementVectorType meanOutput = decorator->Get(); + FilterType::MeasurementVectorType meanOutput = decorator->Get(); FilterType::MeasurementVectorType mean; diff --git a/Modules/Numerics/Statistics/test/itkTDistributionTest.cxx b/Modules/Numerics/Statistics/test/itkTDistributionTest.cxx index d6c90b86fd6..610dae4eae0 100644 --- a/Modules/Numerics/Statistics/test/itkTDistributionTest.cxx +++ b/Modules/Numerics/Statistics/test/itkTDistributionTest.cxx @@ -40,7 +40,7 @@ itkTDistributionTest(int, char *[]) distributionFunction->Print(std::cout); - int i; + int i; double x; double value; double diff; @@ -404,7 +404,7 @@ itkTDistributionTest(int, char *[]) std::cout << "InverseCDF(x,dof) = " << distributionFunction->InverseCDF(x, dof) << std::endl; - const unsigned int wrongNumberOfParameters = distributionFunction->GetNumberOfParameters() * 42; + const unsigned int wrongNumberOfParameters = distributionFunction->GetNumberOfParameters() * 42; DistributionType::ParametersType wrongParameters(wrongNumberOfParameters); wrongParameters.Fill(1.0); std::cout << "new number of parameters = " << wrongParameters.Size() << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkUniformRandomSpatialNeighborSubsamplerTest.cxx b/Modules/Numerics/Statistics/test/itkUniformRandomSpatialNeighborSubsamplerTest.cxx index 1859293b03f..e7d2b171687 100644 --- a/Modules/Numerics/Statistics/test/itkUniformRandomSpatialNeighborSubsamplerTest.cxx +++ b/Modules/Numerics/Statistics/test/itkUniformRandomSpatialNeighborSubsamplerTest.cxx @@ -49,11 +49,11 @@ itkUniformRandomSpatialNeighborSubsamplerTest(int argc, char * argv[]) using SamplerType = itk::Statistics::UniformRandomSpatialNeighborSubsampler; using WriterType = itk::ImageFileWriter; - auto inImage = FloatImage::New(); + auto inImage = FloatImage::New(); constexpr typename SizeType::value_type regionSizeVal = 35; - constexpr auto sz = SizeType::Filled(regionSizeVal); - constexpr IndexType idx{}; - const RegionType region{ idx, sz }; + constexpr auto sz = SizeType::Filled(regionSizeVal); + constexpr IndexType idx{}; + const RegionType region{ idx, sz }; inImage->SetRegions(region); inImage->AllocateInitialized(); @@ -67,7 +67,7 @@ itkUniformRandomSpatialNeighborSubsamplerTest(int argc, char * argv[]) SamplerType::InstanceIdentifier query(612); - SamplerType::SubsamplePointer subsample = SamplerType::SubsampleType::New(); + SamplerType::SubsamplePointer subsample = SamplerType::SubsampleType::New(); // Test exceptions ITK_TRY_EXPECT_EXCEPTION(samplerOrig->Search(query, subsample)); diff --git a/Modules/Numerics/Statistics/test/itkVectorContainerToListSampleAdaptorTest.cxx b/Modules/Numerics/Statistics/test/itkVectorContainerToListSampleAdaptorTest.cxx index 6a8c7200ac4..0eb01433dff 100644 --- a/Modules/Numerics/Statistics/test/itkVectorContainerToListSampleAdaptorTest.cxx +++ b/Modules/Numerics/Statistics/test/itkVectorContainerToListSampleAdaptorTest.cxx @@ -45,7 +45,7 @@ itkVectorContainerToListSampleAdaptorTest(int, char *[]) // Set the vector container constexpr unsigned int containerSize = 3; - auto container = ContainerType::New(); + auto container = ContainerType::New(); container->Reserve(containerSize); for (unsigned int i = 0; i < container->Size(); ++i) { @@ -57,15 +57,15 @@ itkVectorContainerToListSampleAdaptorTest(int, char *[]) ITK_TEST_SET_GET_VALUE(container, adaptor->GetVectorContainer()); constexpr typename AdaptorType::InstanceIdentifier expectedSize = 3; - const typename AdaptorType::InstanceIdentifier size = adaptor->Size(); + const typename AdaptorType::InstanceIdentifier size = adaptor->Size(); ITK_TEST_EXPECT_EQUAL(expectedSize, size); constexpr typename AdaptorType::AbsoluteFrequencyType expectedFreq = 1; - const typename AdaptorType::AbsoluteFrequencyType freq = adaptor->GetFrequency(instance); + const typename AdaptorType::AbsoluteFrequencyType freq = adaptor->GetFrequency(instance); ITK_TEST_EXPECT_EQUAL(expectedFreq, freq); constexpr typename AdaptorType::TotalAbsoluteFrequencyType expectedTotalFreq = 3; - const typename AdaptorType::TotalAbsoluteFrequencyType totalFreq = adaptor->GetTotalFrequency(); + const typename AdaptorType::TotalAbsoluteFrequencyType totalFreq = adaptor->GetTotalFrequency(); ITK_TEST_EXPECT_EQUAL(expectedTotalFreq, totalFreq); diff --git a/Modules/Numerics/Statistics/test/itkWeightedCentroidKdTreeGeneratorTest1.cxx b/Modules/Numerics/Statistics/test/itkWeightedCentroidKdTreeGeneratorTest1.cxx index 6d87e147228..246d7ba10f6 100644 --- a/Modules/Numerics/Statistics/test/itkWeightedCentroidKdTreeGeneratorTest1.cxx +++ b/Modules/Numerics/Statistics/test/itkWeightedCentroidKdTreeGeneratorTest1.cxx @@ -50,7 +50,7 @@ itkWeightedCentroidKdTreeGeneratorTest1(int argc, char * argv[]) // // Generate a sample of random points // - const unsigned int numberOfDataPoints = std::stoi(argv[1]); + const unsigned int numberOfDataPoints = std::stoi(argv[1]); MeasurementVectorType mv(measurementVectorSize); for (unsigned int i = 0; i < numberOfDataPoints; ++i) { @@ -77,7 +77,7 @@ itkWeightedCentroidKdTreeGeneratorTest1(int argc, char * argv[]) MeasurementVectorType queryPoint(measurementVectorSize); MeasurementVectorType origin(measurementVectorSize); - constexpr unsigned int numberOfNeighbors = 1; + constexpr unsigned int numberOfNeighbors = 1; TreeType::InstanceIdentifierVectorType neighbors; MeasurementVectorType result(measurementVectorSize); diff --git a/Modules/Numerics/Statistics/test/itkWeightedCentroidKdTreeGeneratorTest8.cxx b/Modules/Numerics/Statistics/test/itkWeightedCentroidKdTreeGeneratorTest8.cxx index 739b0e93af5..c6d7d545f1f 100644 --- a/Modules/Numerics/Statistics/test/itkWeightedCentroidKdTreeGeneratorTest8.cxx +++ b/Modules/Numerics/Statistics/test/itkWeightedCentroidKdTreeGeneratorTest8.cxx @@ -51,7 +51,7 @@ itkWeightedCentroidKdTreeGeneratorTest8(int argc, char * argv[]) // // Generate a sample of random points // - const unsigned int numberOfDataPoints = std::stoi(argv[1]); + const unsigned int numberOfDataPoints = std::stoi(argv[1]); MeasurementVectorType mv; for (unsigned int i = 0; i < numberOfDataPoints; ++i) { @@ -77,7 +77,7 @@ itkWeightedCentroidKdTreeGeneratorTest8(int argc, char * argv[]) MeasurementVectorType queryPoint; - constexpr unsigned int numberOfNeighbors = 1; + constexpr unsigned int numberOfNeighbors = 1; TreeType::InstanceIdentifierVectorType neighbors; MeasurementVectorType result; @@ -92,8 +92,8 @@ itkWeightedCentroidKdTreeGeneratorTest8(int argc, char * argv[]) // Check that for every point in the sample, its closest point is itself. // using DistanceMetricType = itk::Statistics::EuclideanDistanceMetric; - auto distanceMetric = DistanceMetricType::New(); - bool testFailed = false; + auto distanceMetric = DistanceMetricType::New(); + bool testFailed = false; DistanceMetricType::OriginType origin; itk::NumericTraits::SetLength(origin, measurementVectorSize); diff --git a/Modules/Numerics/Statistics/test/itkWeightedCentroidKdTreeGeneratorTest9.cxx b/Modules/Numerics/Statistics/test/itkWeightedCentroidKdTreeGeneratorTest9.cxx index 5da687fe64f..746e18af731 100644 --- a/Modules/Numerics/Statistics/test/itkWeightedCentroidKdTreeGeneratorTest9.cxx +++ b/Modules/Numerics/Statistics/test/itkWeightedCentroidKdTreeGeneratorTest9.cxx @@ -52,7 +52,7 @@ itkWeightedCentroidKdTreeGeneratorTest9(int argc, char * argv[]) // // Generate a sample of random points // - const unsigned int numberOfDataPoints = std::stoi(argv[1]); + const unsigned int numberOfDataPoints = std::stoi(argv[1]); MeasurementVectorType mv(measurementVectorSize); for (unsigned int i = 0; i < numberOfDataPoints; ++i) { @@ -78,7 +78,7 @@ itkWeightedCentroidKdTreeGeneratorTest9(int argc, char * argv[]) MeasurementVectorType queryPoint(measurementVectorSize); - constexpr unsigned int numberOfNeighbors = 1; + constexpr unsigned int numberOfNeighbors = 1; TreeType::InstanceIdentifierVectorType neighbors; MeasurementVectorType result(measurementVectorSize); diff --git a/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest.cxx index c0759d2cbe7..6a96b081fdd 100644 --- a/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest.cxx @@ -149,7 +149,7 @@ itkWeightedCovarianceSampleFilterTest(int, char *[]) } MeasurementVectorRealType mean = filter->GetMean(); - CovarianceMatrixType matrix = filter->GetCovarianceMatrix(); + CovarianceMatrixType matrix = filter->GetCovarianceMatrix(); std::cout << "Mean: " << mean << std::endl; std::cout << "Covariance Matrix: " << matrix << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest2.cxx b/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest2.cxx index d47effbb5ad..8dc6a4229ff 100644 --- a/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest2.cxx @@ -152,7 +152,7 @@ itkWeightedCovarianceSampleFilterTest2(int, char *[]) using MeasurementVectorRealType = FilterType::MeasurementVectorRealType; MeasurementVectorRealType mean = filter->GetMean(); - CovarianceMatrixType matrix = filter->GetCovarianceMatrix(); + CovarianceMatrixType matrix = filter->GetCovarianceMatrix(); std::cout << "Mean: " << mean << std::endl; std::cout << "Covariance Matrix: " << matrix << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkWeightedMeanSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkWeightedMeanSampleFilterTest.cxx index 90ebd91c84b..e68a7072e50 100644 --- a/Modules/Numerics/Statistics/test/itkWeightedMeanSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkWeightedMeanSampleFilterTest.cxx @@ -137,7 +137,7 @@ itkWeightedMeanSampleFilterTest(int, char *[]) } const FilterType::MeasurementVectorDecoratedType * decorator = filter->GetOutput(); - FilterType::MeasurementVectorRealType meanOutput = decorator->Get(); + FilterType::MeasurementVectorRealType meanOutput = decorator->Get(); FilterType::MeasurementVectorRealType mean; diff --git a/Modules/Registration/Common/include/itkBSplineExponentialDiffeomorphicTransformParametersAdaptor.h b/Modules/Registration/Common/include/itkBSplineExponentialDiffeomorphicTransformParametersAdaptor.h index 7c0a1f477de..4f3af7b08c4 100644 --- a/Modules/Registration/Common/include/itkBSplineExponentialDiffeomorphicTransformParametersAdaptor.h +++ b/Modules/Registration/Common/include/itkBSplineExponentialDiffeomorphicTransformParametersAdaptor.h @@ -126,10 +126,10 @@ class ITK_TEMPLATE_EXPORT BSplineExponentialDiffeomorphicTransformParametersAdap PrintSelf(std::ostream & os, Indent indent) const override; private: - ArrayType m_NumberOfControlPointsForTheConstantVelocityField{}; + ArrayType m_NumberOfControlPointsForTheConstantVelocityField{}; ModifiedTimeType m_NumberOfControlPointsForTheConstantVelocityFieldSetTime{}; - ArrayType m_NumberOfControlPointsForTheUpdateField{}; + ArrayType m_NumberOfControlPointsForTheUpdateField{}; ModifiedTimeType m_NumberOfControlPointsForTheUpdateFieldSetTime{}; }; // class BSplineExponentialDiffeomorphicTransformParametersAdaptor diff --git a/Modules/Registration/Common/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.h b/Modules/Registration/Common/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.h index 5a29e857a01..3347493398c 100644 --- a/Modules/Registration/Common/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.h +++ b/Modules/Registration/Common/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.h @@ -126,8 +126,8 @@ class ITK_TEMPLATE_EXPORT BSplineSmoothingOnUpdateDisplacementFieldTransformPara PrintSelf(std::ostream & os, Indent indent) const override; private: - ArrayType m_NumberOfControlPointsForTheUpdateField{}; - ArrayType m_NumberOfControlPointsForTheTotalField{}; + ArrayType m_NumberOfControlPointsForTheUpdateField{}; + ArrayType m_NumberOfControlPointsForTheTotalField{}; ModifiedTimeType m_NumberOfControlPointsForTheUpdateFieldSetTime{}; ModifiedTimeType m_NumberOfControlPointsForTheTotalFieldSetTime{}; diff --git a/Modules/Registration/Common/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.hxx b/Modules/Registration/Common/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.hxx index ce9baf7efae..d16a4e57a97 100644 --- a/Modules/Registration/Common/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.hxx +++ b/Modules/Registration/Common/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.hxx @@ -121,7 +121,7 @@ BSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor: template void BSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Registration/Common/include/itkBSplineTransformParametersAdaptor.h b/Modules/Registration/Common/include/itkBSplineTransformParametersAdaptor.h index 7cc952f05b2..981a36f023b 100644 --- a/Modules/Registration/Common/include/itkBSplineTransformParametersAdaptor.h +++ b/Modules/Registration/Common/include/itkBSplineTransformParametersAdaptor.h @@ -150,9 +150,9 @@ class ITK_TEMPLATE_EXPORT BSplineTransformParametersAdaptor : public TransformPa void UpdateRequiredFixedParameters(); - MeshSizeType m_RequiredTransformDomainMeshSize{}; - OriginType m_RequiredTransformDomainOrigin{}; - DirectionType m_RequiredTransformDomainDirection{}; + MeshSizeType m_RequiredTransformDomainMeshSize{}; + OriginType m_RequiredTransformDomainOrigin{}; + DirectionType m_RequiredTransformDomainDirection{}; PhysicalDimensionsType m_RequiredTransformDomainPhysicalDimensions{}; }; // class BSplineTransformParametersAdaptor diff --git a/Modules/Registration/Common/include/itkBSplineTransformParametersAdaptor.hxx b/Modules/Registration/Common/include/itkBSplineTransformParametersAdaptor.hxx index 9f901a03d98..f38dc656198 100644 --- a/Modules/Registration/Common/include/itkBSplineTransformParametersAdaptor.hxx +++ b/Modules/Registration/Common/include/itkBSplineTransformParametersAdaptor.hxx @@ -209,9 +209,9 @@ BSplineTransformParametersAdaptor::AdaptTransformParameters() return; } - SizeType newGridSize; - OriginType newGridOrigin; - SpacingType newGridSpacing; + SizeType newGridSize; + OriginType newGridOrigin; + SpacingType newGridSpacing; DirectionType newGridDirection; for (SizeValueType i = 0; i < SpaceDimension; ++i) { @@ -225,7 +225,7 @@ BSplineTransformParametersAdaptor::AdaptTransformParameters() } const RegionType & coefficientImageRegion = this->m_Transform->GetCoefficientImages()[0]->GetLargestPossibleRegion(); - const IndexType newGridIndex = coefficientImageRegion.GetIndex(); + const IndexType newGridIndex = coefficientImageRegion.GetIndex(); // Resample the coefficient images using CoefficientUpsampleFunctionType = BSplineResampleImageFunction; diff --git a/Modules/Registration/Common/include/itkBlockMatchingImageFilter.h b/Modules/Registration/Common/include/itkBlockMatchingImageFilter.h index f8d145d2f12..1caa757ca16 100644 --- a/Modules/Registration/Common/include/itkBlockMatchingImageFilter.h +++ b/Modules/Registration/Common/include/itkBlockMatchingImageFilter.h @@ -219,9 +219,9 @@ class ITK_TEMPLATE_EXPORT BlockMatchingImageFilter : public MeshToMeshFilter m_DisplacementsVectorsArray; - std::unique_ptr m_SimilaritiesValuesArray; + std::unique_ptr m_SimilaritiesValuesArray; }; } // end namespace itk diff --git a/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx b/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx index 6d2348d409b..87865b7d76f 100644 --- a/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx +++ b/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx @@ -56,7 +56,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -198,7 +198,7 @@ void BlockMatchingImageFilter:: AfterThreadedGenerateData() { - const FeaturePointsConstPointer featurePoints = this->GetFeaturePoints(); + const FeaturePointsConstPointer featurePoints = this->GetFeaturePoints(); const typename FeaturePointsType::PointsContainer * points; if (featurePoints) { @@ -253,7 +253,7 @@ ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION BlockMatchingImageFilter::ThreaderCallback( void * arg) { - auto * str = (ThreadStruct *)(((MultiThreaderBase::WorkUnitInfo *)(arg))->UserData); + auto * str = (ThreadStruct *)(((MultiThreaderBase::WorkUnitInfo *)(arg))->UserData); const ThreadIdType workUnitID = ((MultiThreaderBase::WorkUnitInfo *)(arg))->WorkUnitID; str->Filter->ThreadedGenerateData(workUnitID); @@ -270,14 +270,14 @@ void BlockMatchingImageFilter::ThreadedGenerateData( ThreadIdType threadId) { - const FixedImageConstPointer fixedImage = this->GetFixedImage(); - const MovingImageConstPointer movingImage = this->GetMovingImage(); + const FixedImageConstPointer fixedImage = this->GetFixedImage(); + const MovingImageConstPointer movingImage = this->GetMovingImage(); const FeaturePointsConstPointer featurePoints = this->GetFeaturePoints(); const SizeValueType workUnitCount = this->GetNumberOfWorkUnits(); // compute first point and number of points (count) for this thread - SizeValueType count = m_PointsCount / workUnitCount; + SizeValueType count = m_PointsCount / workUnitCount; const SizeValueType first = threadId * count; if (threadId + 1 == workUnitCount) // last thread { @@ -287,7 +287,7 @@ BlockMatchingImageFilterGetPoint(idx); - const auto fixedIndex = fixedImage->TransformPhysicalPointToIndex(originalLocation); - const auto movingIndex = movingImage->TransformPhysicalPointToIndex(originalLocation); + const auto fixedIndex = fixedImage->TransformPhysicalPointToIndex(originalLocation); + const auto movingIndex = movingImage->TransformPhysicalPointToIndex(originalLocation); // the block is selected for a minimum similarity metric SimilaritiesValue similarity{}; diff --git a/Modules/Registration/Common/include/itkCenteredTransformInitializer.h b/Modules/Registration/Common/include/itkCenteredTransformInitializer.h index eb3a131e812..60f53c002ce 100644 --- a/Modules/Registration/Common/include/itkCenteredTransformInitializer.h +++ b/Modules/Registration/Common/include/itkCenteredTransformInitializer.h @@ -154,7 +154,7 @@ class ITK_TEMPLATE_EXPORT CenteredTransformInitializer : public Object bool m_UseMoments{ false }; - const FixedImageCalculatorPointer m_FixedCalculator{ FixedImageCalculatorType::New() }; + const FixedImageCalculatorPointer m_FixedCalculator{ FixedImageCalculatorType::New() }; const MovingImageCalculatorPointer m_MovingCalculator{ MovingImageCalculatorType::New() }; }; // class CenteredTransformInitializer } // namespace itk diff --git a/Modules/Registration/Common/include/itkCenteredTransformInitializer.hxx b/Modules/Registration/Common/include/itkCenteredTransformInitializer.hxx index e72dc8e1f8d..29ca476a2b7 100644 --- a/Modules/Registration/Common/include/itkCenteredTransformInitializer.hxx +++ b/Modules/Registration/Common/include/itkCenteredTransformInitializer.hxx @@ -43,7 +43,7 @@ CenteredTransformInitializer::InitializeT m_FixedImage->UpdateSource(); m_MovingImage->UpdateSource(); - InputPointType rotationCenter; + InputPointType rotationCenter; OutputVectorType translationVector; if (m_UseMoments) @@ -69,8 +69,8 @@ CenteredTransformInitializer::InitializeT // Here use the geometrical center of each image. const typename FixedImageType::RegionType & fixedRegion = m_FixedImage->GetLargestPossibleRegion(); - const typename FixedImageType::IndexType & fixedIndex = fixedRegion.GetIndex(); - const typename FixedImageType::SizeType & fixedSize = fixedRegion.GetSize(); + const typename FixedImageType::IndexType & fixedIndex = fixedRegion.GetIndex(); + const typename FixedImageType::SizeType & fixedSize = fixedRegion.GetSize(); InputPointType centerFixedPoint; @@ -91,8 +91,8 @@ CenteredTransformInitializer::InitializeT m_FixedImage->TransformContinuousIndexToPhysicalPoint(centerFixedIndex, centerFixedPoint); const typename MovingImageType::RegionType & movingRegion = m_MovingImage->GetLargestPossibleRegion(); - const typename MovingImageType::IndexType & movingIndex = movingRegion.GetIndex(); - const typename MovingImageType::SizeType & movingSize = movingRegion.GetSize(); + const typename MovingImageType::IndexType & movingIndex = movingRegion.GetIndex(); + const typename MovingImageType::SizeType & movingSize = movingRegion.GetSize(); InputPointType centerMovingPoint; diff --git a/Modules/Registration/Common/include/itkCenteredVersorTransformInitializer.hxx b/Modules/Registration/Common/include/itkCenteredVersorTransformInitializer.hxx index c04b65b834d..9cf71225f8a 100644 --- a/Modules/Registration/Common/include/itkCenteredVersorTransformInitializer.hxx +++ b/Modules/Registration/Common/include/itkCenteredVersorTransformInitializer.hxx @@ -41,7 +41,7 @@ CenteredVersorTransformInitializer::InitializeTransfo using FixedMatrixType = typename Superclass::FixedImageCalculatorType::MatrixType; using MovingMatrixType = typename Superclass::MovingImageCalculatorType::MatrixType; - const FixedMatrixType fixedPrincipalAxis = this->GetFixedCalculator()->GetPrincipalAxes(); + const FixedMatrixType fixedPrincipalAxis = this->GetFixedCalculator()->GetPrincipalAxes(); const MovingMatrixType movingPrincipalAxis = this->GetMovingCalculator()->GetPrincipalAxes(); const MovingMatrixType rotationMatrix = movingPrincipalAxis * fixedPrincipalAxis.GetInverse(); diff --git a/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.h b/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.h index 41163337c59..b4f2155f2ec 100644 --- a/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.h @@ -153,12 +153,12 @@ class ITK_TEMPLATE_EXPORT CompareHistogramImageToImageMetric EvaluateMeasure(HistogramType & histogram) const override = 0; private: - FixedImageConstPointer m_TrainingFixedImage{}; + FixedImageConstPointer m_TrainingFixedImage{}; MovingImageConstPointer m_TrainingMovingImage{}; - TransformPointer m_TrainingTransform{}; - InterpolatorPointer m_TrainingInterpolator{}; - FixedImageRegionType m_TrainingFixedImageRegion{}; - HistogramPointerType m_TrainingHistogram{}; + TransformPointer m_TrainingTransform{}; + InterpolatorPointer m_TrainingInterpolator{}; + FixedImageRegionType m_TrainingFixedImageRegion{}; + HistogramPointerType m_TrainingHistogram{}; }; } // end namespace itk diff --git a/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.hxx b/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.hxx index 9f55b8cf013..de790337346 100644 --- a/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.hxx @@ -97,7 +97,7 @@ CompareHistogramImageToImageMetric::FormTrainingHisto this->Superclass::m_HistogramSize, this->Superclass::m_LowerBound, this->Superclass::m_UpperBound); using TrainingFixedIteratorType = itk::ImageRegionConstIteratorWithIndex; typename FixedImageType::IndexType index; - typename HistogramType::IndexType hIndex; + typename HistogramType::IndexType hIndex; TrainingFixedIteratorType ti(this->m_TrainingFixedImage, this->m_TrainingFixedImageRegion); diff --git a/Modules/Registration/Common/include/itkConstantVelocityFieldTransformParametersAdaptor.hxx b/Modules/Registration/Common/include/itkConstantVelocityFieldTransformParametersAdaptor.hxx index 8254022501f..3c2837c27d5 100644 --- a/Modules/Registration/Common/include/itkConstantVelocityFieldTransformParametersAdaptor.hxx +++ b/Modules/Registration/Common/include/itkConstantVelocityFieldTransformParametersAdaptor.hxx @@ -191,9 +191,9 @@ ConstantVelocityFieldTransformParametersAdaptor::AdaptTransformParam return; } - const SizeType newFieldSize = this->GetRequiredSize(); - const PointType newFieldOrigin = this->GetRequiredOrigin(); - const SpacingType newFieldSpacing = this->GetRequiredSpacing(); + const SizeType newFieldSize = this->GetRequiredSize(); + const PointType newFieldOrigin = this->GetRequiredOrigin(); + const SpacingType newFieldSpacing = this->GetRequiredSpacing(); const DirectionType newFieldDirection = this->GetRequiredDirection(); using IdentityTransformType = IdentityTransform; diff --git a/Modules/Registration/Common/include/itkCorrelationCoefficientHistogramImageToImageMetric.hxx b/Modules/Registration/Common/include/itkCorrelationCoefficientHistogramImageToImageMetric.hxx index 4fe57356a2f..5293e978a94 100644 --- a/Modules/Registration/Common/include/itkCorrelationCoefficientHistogramImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkCorrelationCoefficientHistogramImageToImageMetric.hxx @@ -42,7 +42,7 @@ CorrelationCoefficientHistogramImageToImageMetric::Me for (unsigned int i = 0; i < this->m_HistogramSize[0]; ++i) { - const MeasureType valX = histogram.GetMeasurement(i, 0); + const MeasureType valX = histogram.GetMeasurement(i, 0); const HistogramFrequencyType freq = histogram.GetFrequency(i, 0); meanX += valX * freq; } @@ -61,7 +61,7 @@ CorrelationCoefficientHistogramImageToImageMetric::Me for (unsigned int i = 0; i < this->m_HistogramSize[1]; ++i) { - const MeasureType valY = histogram.GetMeasurement(i, 1); + const MeasureType valY = histogram.GetMeasurement(i, 1); const HistogramFrequencyType freq = histogram.GetFrequency(i, 1); meanY += valY * freq; } @@ -108,7 +108,7 @@ auto CorrelationCoefficientHistogramImageToImageMetric::Covariance( HistogramType & histogram) const -> MeasureType { - MeasureType var{}; + MeasureType var{}; const MeasureType meanX = MeanX(histogram); const MeasureType meanY = MeanY(histogram); diff --git a/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.hxx b/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.hxx index 3e645606317..0b515eef7d0 100644 --- a/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.hxx +++ b/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.hxx @@ -187,9 +187,9 @@ DisplacementFieldTransformParametersAdaptor::AdaptTransformParameter return; } - const SizeType newFieldSize = this->GetRequiredSize(); - const PointType newFieldOrigin = this->GetRequiredOrigin(); - const SpacingType newFieldSpacing = this->GetRequiredSpacing(); + const SizeType newFieldSize = this->GetRequiredSize(); + const PointType newFieldOrigin = this->GetRequiredOrigin(); + const SpacingType newFieldSpacing = this->GetRequiredSpacing(); const DirectionType newFieldDirection = this->GetRequiredDirection(); using IdentityTransformType = IdentityTransform; diff --git a/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.h b/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.h index b7dc6bda4be..2adb929a4e6 100644 --- a/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.h +++ b/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.h @@ -100,8 +100,8 @@ class ITK_TEMPLATE_EXPORT EuclideanDistancePointMetric /** Get value and derivatives for multiple valued optimizers. */ void GetValueAndDerivative(const TransformParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const; + MeasureType & value, + DerivativeType & derivative) const; /** Set/Get the distance map. */ itkSetConstObjectMacro(DistanceMap, DistanceMapType); @@ -124,7 +124,7 @@ class ITK_TEMPLATE_EXPORT EuclideanDistancePointMetric private: DistanceMapPointer m_DistanceMap{}; - bool m_ComputeSquaredDistance{ false }; + bool m_ComputeSquaredDistance{ false }; }; } // end namespace itk diff --git a/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.hxx b/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.hxx index e34b6f62731..ee52835bea3 100644 --- a/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.hxx +++ b/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.hxx @@ -62,7 +62,7 @@ EuclideanDistancePointMetric::Get itkExceptionMacro("Moving point set has not been assigned"); } - MovingPointIterator pointItr = movingPointSet->GetPoints()->Begin(); + MovingPointIterator pointItr = movingPointSet->GetPoints()->Begin(); const MovingPointIterator pointEnd = movingPointSet->GetPoints()->End(); MeasureType measure; @@ -78,7 +78,7 @@ EuclideanDistancePointMetric::Get const typename Superclass::OutputPointType transformedPoint = this->m_Transform->TransformPoint(inputPoint); double minimumDistance = NumericTraits::max(); - bool closestPoint = false; + bool closestPoint = false; // Try to use the distance map to solve the closest point if (m_DistanceMap) @@ -99,7 +99,7 @@ EuclideanDistancePointMetric::Get // points and find the closest distance if (!closestPoint) { - FixedPointIterator pointItr2 = fixedPointSet->GetPoints()->Begin(); + FixedPointIterator pointItr2 = fixedPointSet->GetPoints()->Begin(); const FixedPointIterator pointEnd2 = fixedPointSet->GetPoints()->End(); while (pointItr2 != pointEnd2) @@ -132,15 +132,15 @@ template ::GetDerivative( const TransformParametersType & itkNotUsed(parameters), - DerivativeType & itkNotUsed(derivative)) const + DerivativeType & itkNotUsed(derivative)) const {} template void EuclideanDistancePointMetric::GetValueAndDerivative( const TransformParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const + MeasureType & value, + DerivativeType & derivative) const { value = this->GetValue(parameters); this->GetDerivative(parameters, derivative); @@ -149,7 +149,7 @@ EuclideanDistancePointMetric::Get template void EuclideanDistancePointMetric::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Registration/Common/include/itkGaussianExponentialDiffeomorphicTransformParametersAdaptor.h b/Modules/Registration/Common/include/itkGaussianExponentialDiffeomorphicTransformParametersAdaptor.h index e4caf85c48a..57427c8f57e 100644 --- a/Modules/Registration/Common/include/itkGaussianExponentialDiffeomorphicTransformParametersAdaptor.h +++ b/Modules/Registration/Common/include/itkGaussianExponentialDiffeomorphicTransformParametersAdaptor.h @@ -74,8 +74,8 @@ class ITK_TEMPLATE_EXPORT GaussianExponentialDiffeomorphicTransformParametersAda PrintSelf(std::ostream & os, Indent indent) const override; private: - ScalarType m_GaussianSmoothingVarianceForTheConstantVelocityField{}; - ScalarType m_GaussianSmoothingVarianceForTheUpdateField{}; + ScalarType m_GaussianSmoothingVarianceForTheConstantVelocityField{}; + ScalarType m_GaussianSmoothingVarianceForTheUpdateField{}; ModifiedTimeType m_GaussianSmoothingVarianceForTheConstantVelocityFieldSetTime{ 0 }; ModifiedTimeType m_GaussianSmoothingVarianceForTheUpdateFieldSetTime{ 0 }; diff --git a/Modules/Registration/Common/include/itkGaussianExponentialDiffeomorphicTransformParametersAdaptor.hxx b/Modules/Registration/Common/include/itkGaussianExponentialDiffeomorphicTransformParametersAdaptor.hxx index cae7665d960..febb792ff80 100644 --- a/Modules/Registration/Common/include/itkGaussianExponentialDiffeomorphicTransformParametersAdaptor.hxx +++ b/Modules/Registration/Common/include/itkGaussianExponentialDiffeomorphicTransformParametersAdaptor.hxx @@ -80,7 +80,7 @@ GaussianExponentialDiffeomorphicTransformParametersAdaptor::AdaptTra template void GaussianExponentialDiffeomorphicTransformParametersAdaptor::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Registration/Common/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.hxx b/Modules/Registration/Common/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.hxx index 2ee86a6c216..d59e058941d 100644 --- a/Modules/Registration/Common/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.hxx +++ b/Modules/Registration/Common/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.hxx @@ -78,7 +78,7 @@ GaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor template void GaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.h b/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.h index 92de8af1702..8740fd36567 100644 --- a/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.h @@ -127,8 +127,8 @@ class ITK_TEMPLATE_EXPORT GradientDifferenceImageToImageMetric : public ImageToI /** Get value and derivatives of the similarity measure for multiple valued optimizers. */ void GetValueAndDerivative(const TransformParametersType & parameters, - MeasureType & Value, - DerivativeType & Derivative) const override; + MeasureType & Value, + DerivativeType & Derivative) const override; /** Initialize the Metric by making sure that all the components are present and plugged together correctly. */ void diff --git a/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.hxx b/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.hxx index bd98066d239..f19358b420e 100644 --- a/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.hxx @@ -180,7 +180,7 @@ template void GradientDifferenceImageToImageMetric::ComputeMovedGradientRange() const { - unsigned int iDimension; + unsigned int iDimension; MovedGradientPixelType gradient; for (iDimension = 0; iDimension < FixedImageDimension; ++iDimension) @@ -217,8 +217,8 @@ template void GradientDifferenceImageToImageMetric::ComputeVariance() const { - unsigned int iDimension; - SizeValueType nPixels; + unsigned int iDimension; + SizeValueType nPixels; FixedGradientPixelType mean[FixedImageDimension]; FixedGradientPixelType gradient; @@ -290,7 +290,7 @@ template auto GradientDifferenceImageToImageMetric::ComputeMeasure( const TransformParametersType & parameters, - const double * subtractionFactor) const -> MeasureType + const double * subtractionFactor) const -> MeasureType { unsigned int iDimension; @@ -376,7 +376,7 @@ GradientDifferenceImageToImageMetric::GetValue( // Compute the similarity measure MovedGradientPixelType subtractionFactor[FixedImageDimension]; - MeasureType currentMeasure; + MeasureType currentMeasure; for (iDimension = 0; iDimension < FixedImageDimension; ++iDimension) { @@ -393,7 +393,7 @@ template void GradientDifferenceImageToImageMetric::GetDerivative( const TransformParametersType & parameters, - DerivativeType & derivative) const + DerivativeType & derivative) const { TransformParametersType testPoint = parameters; @@ -415,8 +415,8 @@ template void GradientDifferenceImageToImageMetric::GetValueAndDerivative( const TransformParametersType & parameters, - MeasureType & Value, - DerivativeType & Derivative) const + MeasureType & Value, + DerivativeType & Derivative) const { Value = this->GetValue(parameters); this->GetDerivative(parameters, Derivative); diff --git a/Modules/Registration/Common/include/itkHistogramImageToImageMetric.h b/Modules/Registration/Common/include/itkHistogramImageToImageMetric.h index 2dace36414e..c2f32328efe 100644 --- a/Modules/Registration/Common/include/itkHistogramImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkHistogramImageToImageMetric.h @@ -141,8 +141,8 @@ class ITK_TEMPLATE_EXPORT HistogramImageToImageMetric : public ImageToImageMetri /** Get value and derivatives for multiple valued optimizers. */ void GetValueAndDerivative(const TransformParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const override; + MeasureType & value, + DerivativeType & derivative) const override; /** Set the lower bounds of the intensities to be considered for computing * the histogram. This option allows to focus the computation of the Metric in @@ -196,9 +196,9 @@ class ITK_TEMPLATE_EXPORT HistogramImageToImageMetric : public ImageToImageMetri passed to the function. */ void ComputeHistogram(const TransformParametersType & parameters, - unsigned int parameter, - double step, - HistogramType & histogram) const; + unsigned int parameter, + double step, + HistogramType & histogram) const; /** Copies a histogram. */ void diff --git a/Modules/Registration/Common/include/itkHistogramImageToImageMetric.hxx b/Modules/Registration/Common/include/itkHistogramImageToImageMetric.hxx index 4e3aea94ec9..533fed1c083 100644 --- a/Modules/Registration/Common/include/itkHistogramImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkHistogramImageToImageMetric.hxx @@ -90,7 +90,7 @@ HistogramImageToImageMetric::Initialize() if (!m_LowerBoundSetByUser || !m_UpperBoundSetByUser) { // Calculate min and max image values in fixed image. - const FixedImageConstPointerType pFixedImage = this->m_FixedImage; + const FixedImageConstPointerType pFixedImage = this->m_FixedImage; ImageRegionConstIterator fiIt(pFixedImage, pFixedImage->GetBufferedRegion()); fiIt.GoToBegin(); FixedImagePixelType minFixed = fiIt.Value(); @@ -113,7 +113,7 @@ HistogramImageToImageMetric::Initialize() } // Calculate min and max image values in moving image. - const MovingImageConstPointerType pMovingImage = this->m_MovingImage; + const MovingImageConstPointerType pMovingImage = this->m_MovingImage; ImageRegionConstIterator miIt(pMovingImage, pMovingImage->GetBufferedRegion()); miIt.GoToBegin(); MovingImagePixelType minMoving = miIt.Value(); @@ -178,7 +178,7 @@ HistogramImageToImageMetric::GetValue(const Transform template void HistogramImageToImageMetric::GetDerivative(const TransformParametersType & parameters, - DerivativeType & derivative) const + DerivativeType & derivative) const { itkDebugMacro("GetDerivative( " << parameters << " ) "); @@ -230,8 +230,8 @@ template void HistogramImageToImageMetric::GetValueAndDerivative( const TransformParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const + MeasureType & value, + DerivativeType & derivative) const { value = GetValue(parameters); this->GetDerivative(parameters, derivative); @@ -251,9 +251,9 @@ HistogramImageToImageMetric::ComputeHistogram(const T using FixedIteratorType = itk::ImageRegionConstIteratorWithIndex; - typename FixedImageType::IndexType index; + typename FixedImageType::IndexType index; typename FixedImageType::RegionType fixedRegion; - typename HistogramType::IndexType hIndex; + typename HistogramType::IndexType hIndex; fixedRegion = this->GetFixedImageRegion(); FixedIteratorType ti(fixedImage, fixedRegion); @@ -340,9 +340,9 @@ HistogramImageToImageMetric::CopyHistogram(HistogramT target.Initialize(size, min, max); // Copy the values. - typename HistogramType::Iterator sourceIt = source.Begin(); + typename HistogramType::Iterator sourceIt = source.Begin(); const typename HistogramType::Iterator sourceEnd = source.End(); - typename HistogramType::Iterator targetIt = target.Begin(); + typename HistogramType::Iterator targetIt = target.Begin(); const typename HistogramType::Iterator targetEnd = target.End(); while (sourceIt != sourceEnd && targetIt != targetEnd) diff --git a/Modules/Registration/Common/include/itkImageRegistrationMethod.h b/Modules/Registration/Common/include/itkImageRegistrationMethod.h index 5d82c9cf4ce..2580303e635 100644 --- a/Modules/Registration/Common/include/itkImageRegistrationMethod.h +++ b/Modules/Registration/Common/include/itkImageRegistrationMethod.h @@ -219,19 +219,19 @@ class ITK_TEMPLATE_EXPORT ImageRegistrationMethod : public ProcessObject StartOptimization(); private: - MetricPointer m_Metric{}; + MetricPointer m_Metric{}; OptimizerType::Pointer m_Optimizer{}; MovingImageConstPointer m_MovingImage{}; - FixedImageConstPointer m_FixedImage{}; + FixedImageConstPointer m_FixedImage{}; - TransformPointer m_Transform{}; + TransformPointer m_Transform{}; InterpolatorPointer m_Interpolator{}; ParametersType m_InitialTransformParameters{}; ParametersType m_LastTransformParameters{}; - bool m_FixedImageRegionDefined{}; + bool m_FixedImageRegionDefined{}; FixedImageRegionType m_FixedImageRegion{}; }; } // end namespace itk diff --git a/Modules/Registration/Common/include/itkImageRegistrationMethodImageSource.h b/Modules/Registration/Common/include/itkImageRegistrationMethodImageSource.h index 066af165df2..98b6596f8cb 100644 --- a/Modules/Registration/Common/include/itkImageRegistrationMethodImageSource.h +++ b/Modules/Registration/Common/include/itkImageRegistrationMethodImageSource.h @@ -99,7 +99,7 @@ class ImageRegistrationMethodImageSource : public itk::Object const double s = static_cast(region.GetSize()[0]) / 2.0; - itk::Point p; + itk::Point p; itk::Vector d; /* Set the displacement */ @@ -109,7 +109,7 @@ class ImageRegistrationMethodImageSource : public itk::Object MovingImageIteratorType ri(m_MovingImage, region); - FixedImageIteratorType ti(m_FixedImage, region); + FixedImageIteratorType ti(m_FixedImage, region); while (!ri.IsAtEnd()) { p[0] = ri.GetIndex()[0]; @@ -148,7 +148,7 @@ class ImageRegistrationMethodImageSource : public itk::Object } private: - typename FixedImageType::Pointer m_FixedImage{}; + typename FixedImageType::Pointer m_FixedImage{}; typename MovingImageType::Pointer m_MovingImage{}; ParametersType m_Parameters{}; diff --git a/Modules/Registration/Common/include/itkImageToImageMetric.h b/Modules/Registration/Common/include/itkImageToImageMetric.h index 814a238b963..d1f813a5190 100644 --- a/Modules/Registration/Common/include/itkImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkImageToImageMetric.h @@ -385,14 +385,14 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetric : public SingleValuedCostFunction public: FixedImagePointType point; - double value; - unsigned int valueIndex; + double value; + unsigned int valueIndex; }; - bool m_UseFixedImageIndexes{ false }; + bool m_UseFixedImageIndexes{ false }; FixedImageIndexContainer m_FixedImageIndexes{}; - bool m_UseFixedImageSamplesIntensityThreshold{ false }; + bool m_UseFixedImageSamplesIntensityThreshold{ false }; FixedImagePixelType m_FixedImageSamplesIntensityThreshold{}; /** FixedImageSamplePoint type alias support */ @@ -427,7 +427,7 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetric : public SingleValuedCostFunction // onto this accumulator variable. mutable SizeValueType m_NumberOfPixelsCounted{ 0 }; - FixedImageConstPointer m_FixedImage{}; + FixedImageConstPointer m_FixedImage{}; MovingImageConstPointer m_MovingImage{}; /** Main transform to be used in thread = 0 */ @@ -438,10 +438,10 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetric : public SingleValuedCostFunction InterpolatorPointer m_Interpolator{}; - bool m_ComputeGradient{ true }; + bool m_ComputeGradient{ true }; GradientImagePointer m_GradientImage{}; - FixedImageMaskConstPointer m_FixedImageMask{}; + FixedImageMaskConstPointer m_FixedImageMask{}; MovingImageMaskConstPointer m_MovingImageMask{}; ThreadIdType m_NumberOfWorkUnits{ 1 }; @@ -500,18 +500,18 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetric : public SingleValuedCostFunction BSplineTransformWeightsArrayType m_BSplineTransformWeightsArray{}; BSplineTransformIndicesArrayType m_BSplineTransformIndicesArray{}; - MovingImagePointArrayType m_BSplinePreTransformPointsArray{}; - BooleanArrayType m_WithinBSplineSupportRegionArray{}; + MovingImagePointArrayType m_BSplinePreTransformPointsArray{}; + BooleanArrayType m_WithinBSplineSupportRegionArray{}; BSplineParametersOffsetType m_BSplineParametersOffset{}; // Variables needed for optionally caching values when using a BSpline // transform. - bool m_UseCachingOfBSplineWeights{ true }; - mutable BSplineTransformWeightsType m_BSplineTransformWeights{}; + bool m_UseCachingOfBSplineWeights{ true }; + mutable BSplineTransformWeightsType m_BSplineTransformWeights{}; mutable BSplineTransformIndexArrayType m_BSplineTransformIndices{}; - mutable std::unique_ptr m_ThreaderBSplineTransformWeights; + mutable std::unique_ptr m_ThreaderBSplineTransformWeights; mutable std::unique_ptr m_ThreaderBSplineTransformIndices; /** Cache pre-transformed points, weights and indices. */ @@ -523,23 +523,23 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetric : public SingleValuedCostFunction * This function also checks if mapped point is within support region. */ virtual void - TransformPoint(unsigned int sampleNumber, + TransformPoint(unsigned int sampleNumber, MovingImagePointType & mappedPoint, - bool & sampleOk, - double & movingImageValue, - ThreadIdType threadId) const; + bool & sampleOk, + double & movingImageValue, + ThreadIdType threadId) const; /** Transform a point from FixedImage domain to MovingImage domain. * * This function also checks if mapped point is within support region. */ virtual void - TransformPointWithDerivatives(unsigned int sampleNumber, + TransformPointWithDerivatives(unsigned int sampleNumber, MovingImagePointType & mappedPoint, - bool & sampleOk, - double & movingImageValue, + bool & sampleOk, + double & movingImageValue, ImageDerivativesType & movingImageGradient, - ThreadIdType threadId) const; + ThreadIdType threadId) const; #ifndef ITK_FUTURE_LEGACY_REMOVE /** Boolean to indicate if the interpolator BSpline. @@ -559,8 +559,8 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetric : public SingleValuedCostFunction */ virtual void ComputeImageDerivatives(const MovingImagePointType & mappedPoint, - ImageDerivativesType & gradient, - ThreadIdType threadId) const; + ImageDerivativesType & gradient, + ThreadIdType threadId) const; /** * Types and variables related to multi-threading @@ -618,11 +618,11 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetric : public SingleValuedCostFunction const typename MultiThreaderType::WorkUnitInfo * m_WorkUnitInfo; }; - MultiThreaderType::Pointer m_Threader{}; + MultiThreaderType::Pointer m_Threader{}; std::unique_ptr m_ConstSelfWrapper; mutable std::unique_ptr m_ThreaderNumberOfMovingImageSamples; - bool m_WithinThreadPreProcess{ false }; - bool m_WithinThreadPostProcess{ false }; + bool m_WithinThreadPreProcess{ false }; + bool m_WithinThreadPostProcess{ false }; void GetValueMultiThreadedInitiate() const; @@ -647,10 +647,10 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetric : public SingleValuedCostFunction GetValueThreadPreProcess(ThreadIdType itkNotUsed(threadId), bool itkNotUsed(withinSampleThread)) const {} virtual inline bool - GetValueThreadProcessSample(ThreadIdType itkNotUsed(threadId), - SizeValueType itkNotUsed(fixedImageSample), + GetValueThreadProcessSample(ThreadIdType itkNotUsed(threadId), + SizeValueType itkNotUsed(fixedImageSample), const MovingImagePointType & itkNotUsed(mappedPoint), - double itkNotUsed(movingImageValue)) const + double itkNotUsed(movingImageValue)) const { return false; } @@ -677,10 +677,10 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetric : public SingleValuedCostFunction GetValueAndDerivativeThreadPreProcess(ThreadIdType itkNotUsed(threadId), bool itkNotUsed(withinSampleThread)) const {} virtual inline bool - GetValueAndDerivativeThreadProcessSample(ThreadIdType itkNotUsed(threadId), - SizeValueType itkNotUsed(fixedImageSample), + GetValueAndDerivativeThreadProcessSample(ThreadIdType itkNotUsed(threadId), + SizeValueType itkNotUsed(fixedImageSample), const MovingImagePointType & itkNotUsed(mappedPoint), - double itkNotUsed(movingImageValue), + double itkNotUsed(movingImageValue), const ImageDerivativesType & itkNotUsed(movingImageGradientValue)) const { return false; diff --git a/Modules/Registration/Common/include/itkImageToImageMetric.hxx b/Modules/Registration/Common/include/itkImageToImageMetric.hxx index d31db0e9300..eea5b8f236e 100644 --- a/Modules/Registration/Common/include/itkImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkImageToImageMetric.hxx @@ -472,7 +472,7 @@ ImageToImageMetric::SampleFixedImageRegion(FixedImage randIter.ReinitializeSeed(m_RandomSeed++); } typename FixedImageSampleContainer::iterator iter; - const auto end = samples.end(); + const auto end = samples.end(); if (m_FixedImageMask.IsNotNull() || m_UseFixedImageSamplesIntensityThreshold) { @@ -582,7 +582,7 @@ ImageToImageMetric::SampleFullFixedImageRegion(FixedI regionIter.GoToBegin(); typename FixedImageSampleContainer::iterator iter; - const auto end = samples.end(); + const auto end = samples.end(); if (m_FixedImageMask.IsNotNull() || m_UseFixedImageSamplesIntensityThreshold) { @@ -666,7 +666,7 @@ ImageToImageMetric::ComputeGradient() gradientFilter->SetInput(m_MovingImage); const typename MovingImageType::SpacingType & spacing = m_MovingImage->GetSpacing(); - double maximumSpacing = 0.0; + double maximumSpacing = 0.0; for (unsigned int i = 0; i < MovingImageDimension; ++i) { if (spacing[i] > maximumSpacing) @@ -725,15 +725,15 @@ ImageToImageMetric::PreComputeTransformValues() m_Transform->SetParameters(dummyParameters); // Cycle through each sampled fixed image point - BSplineTransformWeightsType weights; + BSplineTransformWeightsType weights; BSplineTransformIndexArrayType indices; - bool valid; - MovingImagePointType mappedPoint; + bool valid; + MovingImagePointType mappedPoint; // Declare iterators for iteration over the sample container typename FixedImageSampleContainer::const_iterator fiter; - const auto fend = m_FixedImageSamples.end(); - SizeValueType counter = 0; + const auto fend = m_FixedImageSamples.end(); + SizeValueType counter = 0; for (fiter = m_FixedImageSamples.begin(); fiter != fend; ++fiter, counter++) { @@ -755,11 +755,11 @@ ImageToImageMetric::PreComputeTransformValues() template void -ImageToImageMetric::TransformPoint(unsigned int sampleNumber, +ImageToImageMetric::TransformPoint(unsigned int sampleNumber, MovingImagePointType & mappedPoint, - bool & sampleOk, - double & movingImageValue, - ThreadIdType threadId) const + bool & sampleOk, + double & movingImageValue, + ThreadIdType threadId) const { sampleOk = true; TransformType * transform; @@ -790,7 +790,7 @@ ImageToImageMetric::TransformPoint(unsigned int // If the transform is BSplineDeformable, we can use the precomputed // weights and indices to obtained the mapped position const WeightsValueType * weights = m_BSplineTransformWeightsArray[sampleNumber]; - const IndexValueType * indices = m_BSplineTransformIndicesArray[sampleNumber]; + const IndexValueType * indices = m_BSplineTransformIndicesArray[sampleNumber]; for (unsigned int j = 0; j < FixedImageDimension; ++j) { @@ -809,7 +809,7 @@ ImageToImageMetric::TransformPoint(unsigned int } else { - BSplineTransformWeightsType * weightsHelper; + BSplineTransformWeightsType * weightsHelper; BSplineTransformIndexArrayType * indicesHelper; if (threadId > 0) @@ -863,12 +863,12 @@ ImageToImageMetric::TransformPoint(unsigned int template void -ImageToImageMetric::TransformPointWithDerivatives(unsigned int sampleNumber, +ImageToImageMetric::TransformPointWithDerivatives(unsigned int sampleNumber, MovingImagePointType & mappedPoint, - bool & sampleOk, - double & movingImageValue, + bool & sampleOk, + double & movingImageValue, ImageDerivativesType & movingImageGradient, - ThreadIdType threadId) const + ThreadIdType threadId) const { TransformType * transform; @@ -900,7 +900,7 @@ ImageToImageMetric::TransformPointWithDerivatives(uns // If the transform is BSplineDeformable, we can use the precomputed // weights and indices to obtained the mapped position const WeightsValueType * weights = m_BSplineTransformWeightsArray[sampleNumber]; - const IndexValueType * indices = m_BSplineTransformIndicesArray[sampleNumber]; + const IndexValueType * indices = m_BSplineTransformIndicesArray[sampleNumber]; const ParametersType & Local_Parameters = this->m_Transform->GetParameters(); for (unsigned int j = 0; j < FixedImageDimension; ++j) @@ -919,7 +919,7 @@ ImageToImageMetric::TransformPointWithDerivatives(uns } else { - BSplineTransformWeightsType * weightsHelper; + BSplineTransformWeightsType * weightsHelper; BSplineTransformIndexArrayType * indicesHelper; if (threadId > 0) @@ -978,8 +978,8 @@ ImageToImageMetric::TransformPointWithDerivatives(uns template void ImageToImageMetric::ComputeImageDerivatives(const MovingImagePointType & mappedPoint, - ImageDerivativesType & gradient, - ThreadIdType threadId) const + ImageDerivativesType & gradient, + ThreadIdType threadId) const { if (m_BSplineInterpolator) { @@ -1072,8 +1072,8 @@ ImageToImageMetric::GetValueThread(ThreadIdType threa for (int count = 0; count < chunkSize; ++count, ++fixedImageSample) { MovingImagePointType mappedPoint; - bool sampleOk; - double movingImageValue; + bool sampleOk; + double movingImageValue; // Get moving image value this->TransformPoint(fixedImageSample, mappedPoint, sampleOk, movingImageValue, threadId); @@ -1169,8 +1169,8 @@ ImageToImageMetric::GetValueAndDerivativeThread(Threa // Process the samples MovingImagePointType mappedPoint; - bool sampleOk; - double movingImageValue; + bool sampleOk; + double movingImageValue; ImageDerivativesType movingImageGradientValue; for (int count = 0; count < chunkSize; ++count, ++fixedImageSample) { diff --git a/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.h b/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.h index abb9d0c80b3..2029dea727c 100644 --- a/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.h +++ b/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.h @@ -141,8 +141,8 @@ class ITK_TEMPLATE_EXPORT ImageToSpatialObjectMetric : public SingleValuedCostFu /** Get Value and Derivatives for MultipleValuedOptimizers */ void GetValueAndDerivative(const ParametersType & parameters, - MeasureType & Value, - DerivativeType & Derivative) const override = 0; + MeasureType & Value, + DerivativeType & Derivative) const override = 0; /** Return the number of parameters required by the Transform. */ unsigned int @@ -166,14 +166,14 @@ class ITK_TEMPLATE_EXPORT ImageToSpatialObjectMetric : public SingleValuedCostFu void PrintSelf(std::ostream & os, Indent indent) const override; - MeasureType m_MatchMeasure{ 0 }; - DerivativeType m_MatchMeasureDerivatives{}; + MeasureType m_MatchMeasure{ 0 }; + DerivativeType m_MatchMeasureDerivatives{}; mutable TransformPointer m_Transform{}; - InterpolatorPointer m_Interpolator{}; + InterpolatorPointer m_Interpolator{}; MovingSpatialObjectConstPointer m_MovingSpatialObject{}; - FixedImageConstPointer m_FixedImage{}; - ParametersType m_LastTransformParameters{}; + FixedImageConstPointer m_FixedImage{}; + ParametersType m_LastTransformParameters{}; }; } // end namespace itk diff --git a/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.h b/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.h index a6367c9687c..6fa08d3a8c7 100644 --- a/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.h +++ b/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.h @@ -201,13 +201,13 @@ class ITK_TEMPLATE_EXPORT ImageToSpatialObjectRegistrationMethod : public Proces ParametersType m_LastTransformParameters{}; private: - MetricPointer m_Metric{}; + MetricPointer m_Metric{}; OptimizerType::Pointer m_Optimizer{}; MovingSpatialObjectConstPointer m_MovingSpatialObject{}; - FixedImageConstPointer m_FixedImage{}; + FixedImageConstPointer m_FixedImage{}; - TransformPointer m_Transform{}; + TransformPointer m_Transform{}; InterpolatorPointer m_Interpolator{}; }; } // end namespace itk diff --git a/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx b/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx index fe8d2ce5982..4428a30740b 100644 --- a/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx +++ b/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx @@ -220,7 +220,7 @@ ImageToSpatialObjectRegistrationMethod::GetMT template void ImageToSpatialObjectRegistrationMethod::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); os << indent << "Metric: " << m_Metric.GetPointer() << std::endl; diff --git a/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.h b/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.h index 46cf02cb188..c1acc57088a 100644 --- a/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.h @@ -107,8 +107,8 @@ class ITK_TEMPLATE_EXPORT KappaStatisticImageToImageMetric : public ImageToImage \c GetValue() and the \c GetDerivative() method. */ void GetValueAndDerivative(const TransformParametersType & parameters, - MeasureType & Value, - DerivativeType & Derivative) const override; + MeasureType & Value, + DerivativeType & Derivative) const override; /** This method allows the user to set the foreground value. The default * value is 255. */ @@ -131,7 +131,7 @@ class ITK_TEMPLATE_EXPORT KappaStatisticImageToImageMetric : public ImageToImage private: RealType m_ForegroundValue{}; - bool m_Complement{ false }; + bool m_Complement{ false }; }; } // end namespace itk diff --git a/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.hxx b/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.hxx index c009b278586..884ad28f8fe 100644 --- a/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.hxx @@ -53,7 +53,7 @@ KappaStatisticImageToImageMetric::GetValue(const Tran // using FixedIteratorType = ImageRegionConstIteratorWithIndex; typename FixedImageType::IndexType fixedIndex; - FixedIteratorType fi(fixedImage, fixedImage->GetBufferedRegion()); + FixedIteratorType fi(fixedImage, fixedImage->GetBufferedRegion()); // Get the moving image // @@ -299,16 +299,16 @@ KappaStatisticImageToImageMetric::ComputeGradient() using MovingIteratorType = ImageRegionConstIteratorWithIndex; GradientIteratorType git(tempGradientImage, tempGradientImage->GetBufferedRegion()); - MovingIteratorType mit(this->m_MovingImage, this->m_MovingImage->GetBufferedRegion()); + MovingIteratorType mit(this->m_MovingImage, this->m_MovingImage->GetBufferedRegion()); git.GoToBegin(); mit.GoToBegin(); - typename MovingImageType::IndexType minusIndex; - typename MovingImageType::IndexType plusIndex; - typename MovingImageType::IndexType currIndex; + typename MovingImageType::IndexType minusIndex; + typename MovingImageType::IndexType plusIndex; + typename MovingImageType::IndexType currIndex; typename GradientImageType::PixelType tempGradPixel; - typename MovingImageType::SizeType movingSize = this->m_MovingImage->GetBufferedRegion().GetSize(); + typename MovingImageType::SizeType movingSize = this->m_MovingImage->GetBufferedRegion().GetSize(); while (!mit.IsAtEnd()) { currIndex = mit.GetIndex(); @@ -355,8 +355,8 @@ template void KappaStatisticImageToImageMetric::GetValueAndDerivative( const TransformParametersType & parameters, - MeasureType & Value, - DerivativeType & Derivative) const + MeasureType & Value, + DerivativeType & Derivative) const { Value = this->GetValue(parameters); this->GetDerivative(parameters, Derivative); diff --git a/Modules/Registration/Common/include/itkKullbackLeiblerCompareHistogramImageToImageMetric.hxx b/Modules/Registration/Common/include/itkKullbackLeiblerCompareHistogramImageToImageMetric.hxx index 675e50ff5cf..60847bbce15 100644 --- a/Modules/Registration/Common/include/itkKullbackLeiblerCompareHistogramImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkKullbackLeiblerCompareHistogramImageToImageMetric.hxx @@ -51,10 +51,10 @@ KullbackLeiblerCompareHistogramImageToImageMetric::Ev MeasureType KullbackLeibler{}; - HistogramIteratorType measured_it = histogram.Begin(); + HistogramIteratorType measured_it = histogram.Begin(); const HistogramIteratorType measured_end = histogram.End(); - HistogramIteratorType training_it = this->GetTrainingHistogram()->Begin(); + HistogramIteratorType training_it = this->GetTrainingHistogram()->Begin(); const HistogramIteratorType training_end = this->GetTrainingHistogram()->End(); while (measured_it != measured_end) @@ -94,7 +94,7 @@ KullbackLeiblerCompareHistogramImageToImageMetric::Ev template void KullbackLeiblerCompareHistogramImageToImageMetric::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.h b/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.h index 1c7ad80566a..44bc690c4dc 100644 --- a/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.h +++ b/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.h @@ -216,14 +216,14 @@ class ITK_TEMPLATE_EXPORT LandmarkBasedTransformInitializer : public Object CreateMatrix(itk::Matrix &, const itk::Matrix); - FixedImagePointer m_ReferenceImage{}; - TransformPointer m_Transform{}; + FixedImagePointer m_ReferenceImage{}; + TransformPointer m_Transform{}; LandmarkPointContainer m_FixedLandmarks{}; LandmarkPointContainer m_MovingLandmarks{}; /** Weights for affine landmarks. */ LandmarkWeightType m_LandmarkWeight{}; - unsigned int m_BSplineNumberOfControlPoints{ 4 }; + unsigned int m_BSplineNumberOfControlPoints{ 4 }; }; // class LandmarkBasedTransformInitializer } // namespace itk diff --git a/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.hxx b/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.hxx index 580202c0df4..3a91ac321e0 100644 --- a/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.hxx +++ b/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.hxx @@ -135,9 +135,9 @@ LandmarkBasedTransformInitializer::Intern pointSet->SetPointData(static_cast(i), vectorTmp); } - const typename VectorImageType::SizeType size = this->m_ReferenceImage->GetLargestPossibleRegion().GetSize(); - const typename VectorImageType::PointType origin = this->m_ReferenceImage->GetOrigin(); - const typename VectorImageType::SpacingType spacing = this->m_ReferenceImage->GetSpacing(); + const typename VectorImageType::SizeType size = this->m_ReferenceImage->GetLargestPossibleRegion().GetSize(); + const typename VectorImageType::PointType origin = this->m_ReferenceImage->GetOrigin(); + const typename VectorImageType::SpacingType spacing = this->m_ReferenceImage->GetSpacing(); const typename VectorImageType::DirectionType direction = this->m_ReferenceImage->GetDirection(); auto filter = FilterType::New(); @@ -233,7 +233,7 @@ LandmarkBasedTransformInitializer::Intern // q // dim+1=4 * numberOfLandmarks matrix vnl_matrix q(ImageDimension + 1, numberOfLandmarks, 0.0F); - auto fixedIt = this->m_FixedLandmarks.begin(); + auto fixedIt = this->m_FixedLandmarks.begin(); for (unsigned int i = 0; fixedIt != this->m_FixedLandmarks.end(); ++i, ++fixedIt) { for (unsigned int dim = 0; dim < ImageDimension; ++dim) @@ -247,7 +247,7 @@ LandmarkBasedTransformInitializer::Intern // p // dim=3 * numberOfLandmarks matrix vnl_matrix p(ImageDimension, numberOfLandmarks, 0.0F); - auto movingIt = this->m_MovingLandmarks.begin(); + auto movingIt = this->m_MovingLandmarks.begin(); for (unsigned int i = 0; movingIt != this->m_MovingLandmarks.end(); ++i, ++movingIt) { for (unsigned int dim = 0; dim < ImageDimension; ++dim) @@ -315,7 +315,7 @@ LandmarkBasedTransformInitializer::Intern // :: Solving code is from // https://www.itk.org/pipermail/insight-users/2008-December/028207.html const vnl_matrix transposeAffine = vnl_qr(Q).solve(C); - vnl_matrix Affine = transposeAffine.transpose(); + vnl_matrix Affine = transposeAffine.transpose(); const vnl_matrix AffineRotation(Affine.get_n_columns(0, ImageDimension)); @@ -323,7 +323,7 @@ LandmarkBasedTransformInitializer::Intern // // Define Matrix Type. const itk::Matrix mA(AffineRotation); - itk::Vector mT; + itk::Vector mT; for (unsigned int t = 0; t < ImageDimension; ++t) { mT[t] = Affine(t, ImageDimension); @@ -644,7 +644,7 @@ LandmarkBasedTransformInitializer::Intern // Compute the centroids. PointType fixedCentroid{}; - auto fixedItr = this->m_FixedLandmarks.begin(); + auto fixedItr = this->m_FixedLandmarks.begin(); while (fixedItr != this->m_FixedLandmarks.end()) { fixedCentroid[0] += (*fixedItr)[0]; @@ -655,7 +655,7 @@ LandmarkBasedTransformInitializer::Intern fixedCentroid[0] /= this->m_FixedLandmarks.size(); fixedCentroid[1] /= this->m_FixedLandmarks.size(); - auto movingItr = this->m_MovingLandmarks.begin(); + auto movingItr = this->m_MovingLandmarks.begin(); PointType movingCentroid{}; while (movingItr != this->m_MovingLandmarks.end()) { @@ -768,7 +768,7 @@ LandmarkBasedTransformInitializer::Comput { // Compute the centroids. PointType3D centroid{}; - auto fixedItr = inputLandmarks.begin(); + auto fixedItr = inputLandmarks.begin(); while (fixedItr != inputLandmarks.end()) { centroid[0] += (*fixedItr)[0]; @@ -787,7 +787,7 @@ LandmarkBasedTransformInitializer::Comput template void LandmarkBasedTransformInitializer::CreateMatrix( - itk::Matrix & N, + itk::Matrix & N, const itk::Matrix M) { // On-diagonal elements. @@ -811,7 +811,7 @@ LandmarkBasedTransformInitializer::Create template void LandmarkBasedTransformInitializer::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { using namespace print_helper; diff --git a/Modules/Registration/Common/include/itkMatchCardinalityImageToImageMetric.h b/Modules/Registration/Common/include/itkMatchCardinalityImageToImageMetric.h index 12a52c711c8..e129785e718 100644 --- a/Modules/Registration/Common/include/itkMatchCardinalityImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkMatchCardinalityImageToImageMetric.h @@ -178,8 +178,8 @@ class ITK_TEMPLATE_EXPORT MatchCardinalityImageToImageMetric : public ImageToIma private: // default to measure percentage of pixel matches - bool m_MeasureMatches{ true }; - std::vector m_ThreadMatches{}; + bool m_MeasureMatches{ true }; + std::vector m_ThreadMatches{}; std::vector m_ThreadCounts{}; /** Support processing data in multiple threads. Used by subclasses diff --git a/Modules/Registration/Common/include/itkMatchCardinalityImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMatchCardinalityImageToImageMetric.hxx index 4335f908458..aab42debfd5 100644 --- a/Modules/Registration/Common/include/itkMatchCardinalityImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMatchCardinalityImageToImageMetric.hxx @@ -110,7 +110,7 @@ template void MatchCardinalityImageToImageMetric::ThreadedGetValue( const FixedImageRegionType & regionForThread, - ThreadIdType threadId) + ThreadIdType threadId) { const FixedImageConstPointer fixedImage = this->GetFixedImage(); @@ -122,7 +122,7 @@ MatchCardinalityImageToImageMetric::ThreadedGetValue( using FixedIteratorType = ImageRegionConstIteratorWithIndex; FixedIteratorType ti(fixedImage, regionForThread); - MeasureType threadMeasure{}; + MeasureType threadMeasure{}; SizeValueType threadNumberOfPixelsCounted = 0; while (!ti.IsAtEnd()) { @@ -172,8 +172,8 @@ MatchCardinalityImageToImageMetric::ThreadedGetValue( template ThreadIdType -MatchCardinalityImageToImageMetric::SplitFixedRegion(ThreadIdType i, - int num, +MatchCardinalityImageToImageMetric::SplitFixedRegion(ThreadIdType i, + int num, FixedImageRegionType & splitRegion) { // Get the output pointer @@ -182,7 +182,7 @@ MatchCardinalityImageToImageMetric::SplitFixedRegion( // Initialize the splitRegion to the output requested region splitRegion = this->GetFixedImageRegion(); typename FixedImageRegionType::IndexType splitIndex = splitRegion.GetIndex(); - typename FixedImageRegionType::SizeType splitSize = splitRegion.GetSize(); + typename FixedImageRegionType::SizeType splitSize = splitRegion.GetSize(); // split on the outermost dimension available int splitAxis = this->GetFixedImage()->GetImageDimension() - 1; @@ -198,7 +198,7 @@ MatchCardinalityImageToImageMetric::SplitFixedRegion( // determine the actual number of pieces that will be generated const typename FixedImageRegionType::SizeType::SizeValueType range = fixedRegionSize[splitAxis]; - auto valuesPerThread = Math::Ceil(range / static_cast(num)); + auto valuesPerThread = Math::Ceil(range / static_cast(num)); const ThreadIdType maxThreadIdUsed = Math::Ceil(range / static_cast(valuesPerThread)) - 1; // Split the region @@ -235,7 +235,7 @@ MatchCardinalityImageToImageMetric::ThreaderCallback( // execute the actual method with appropriate computation region // first find out how many pieces extent can be split into. FixedImageRegionType splitRegion; - const ThreadIdType total = str->Metric->SplitFixedRegion(workUnitID, workUnitCount, splitRegion); + const ThreadIdType total = str->Metric->SplitFixedRegion(workUnitID, workUnitCount, splitRegion); if (workUnitID < total) { diff --git a/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.h b/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.h index 24b219fd3ad..152fbf6ba7b 100644 --- a/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.h @@ -180,8 +180,8 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetric /** Get the value and derivatives for single valued optimizers. */ void GetValueAndDerivative(const ParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const override; + MeasureType & value, + DerivativeType & derivative) const override; /** Number of bins to used in the histogram. * According to Mattes et al the optimum value is 50. @@ -288,11 +288,11 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetric /** Compute PDF derivative contribution for each parameter. */ void - ComputePDFDerivatives(ThreadIdType threadId, - unsigned int sampleNumber, - int pdfMovingIndex, + ComputePDFDerivatives(ThreadIdType threadId, + unsigned int sampleNumber, + int pdfMovingIndex, const ImageDerivativesType & movingImageGradientValue, - PDFValueType cubicBSplineDerivativeValue) const; + PDFValueType cubicBSplineDerivativeValue) const; void GetValueThreadPreProcess(ThreadIdType threadId, bool withinSampleThread) const override; @@ -300,10 +300,10 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetric GetValueThreadPostProcess(ThreadIdType threadId, bool withinSampleThread) const override; // NOTE: The signature in base class requires that movingImageValue is of type double bool - GetValueThreadProcessSample(ThreadIdType threadId, - SizeValueType fixedImageSample, + GetValueThreadProcessSample(ThreadIdType threadId, + SizeValueType fixedImageSample, const MovingImagePointType & mappedPoint, - double movingImageValue) const override; + double movingImageValue) const override; void GetValueAndDerivativeThreadPreProcess(ThreadIdType threadId, bool withinSampleThread) const override; @@ -311,22 +311,22 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetric GetValueAndDerivativeThreadPostProcess(ThreadIdType threadId, bool withinSampleThread) const override; // NOTE: The signature in base class requires that movingImageValue is of type double bool - GetValueAndDerivativeThreadProcessSample(ThreadIdType threadId, - SizeValueType fixedImageSample, + GetValueAndDerivativeThreadProcessSample(ThreadIdType threadId, + SizeValueType fixedImageSample, const MovingImagePointType & mappedPoint, - double movingImageValue, + double movingImageValue, const ImageDerivativesType & movingImageGradientValue) const override; /** Variables to define the marginal and joint histograms. */ SizeValueType m_NumberOfHistogramBins{ 50 }; - PDFValueType m_MovingImageNormalizedMin{ 0.0 }; - PDFValueType m_FixedImageNormalizedMin{ 0.0 }; - PDFValueType m_FixedImageTrueMin{ 0.0 }; - PDFValueType m_FixedImageTrueMax{ 0.0 }; - PDFValueType m_MovingImageTrueMin{ 0.0 }; - PDFValueType m_MovingImageTrueMax{ 0.0 }; - PDFValueType m_FixedImageBinSize{ 0.0 }; - PDFValueType m_MovingImageBinSize{ 0.0 }; + PDFValueType m_MovingImageNormalizedMin{ 0.0 }; + PDFValueType m_FixedImageNormalizedMin{ 0.0 }; + PDFValueType m_FixedImageTrueMin{ 0.0 }; + PDFValueType m_FixedImageTrueMax{ 0.0 }; + PDFValueType m_MovingImageTrueMin{ 0.0 }; + PDFValueType m_MovingImageTrueMax{ 0.0 }; + PDFValueType m_FixedImageBinSize{ 0.0 }; + PDFValueType m_MovingImageBinSize{ 0.0 }; /** Helper array for storing the values of the JointPDF ratios. */ using PRatioType = PDFValueType; @@ -349,7 +349,7 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetric DerivativeType MetricDerivative; /** The joint PDF and PDF derivatives. */ - typename JointPDFType::Pointer JointPDF; + typename JointPDFType::Pointer JointPDF; typename JointPDFDerivativesType::Pointer JointPDFDerivatives; typename TransformType::JacobianType Jacobian; @@ -368,7 +368,7 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetric std::unique_ptr m_MMIMetricPerThreadVariables; #endif - bool m_UseExplicitPDFDerivatives{ true }; + bool m_UseExplicitPDFDerivatives{ true }; mutable bool m_ImplicitDerivativesSecondPass{ false }; }; } // end namespace itk diff --git a/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx index fcce50848ea..56eb01caa18 100644 --- a/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx @@ -104,7 +104,7 @@ MattesMutualInformationImageToImageMetric::Initialize // We need to make robust measures only over the requested mask region itk::ImageRegionConstIteratorWithIndex fi(this->m_FixedImage, this->m_FixedImage->GetBufferedRegion()); - const bool fixedMaskIsPresent = !(this->m_FixedImageMask.IsNull()); + const bool fixedMaskIsPresent = !(this->m_FixedImageMask.IsNull()); if (fixedMaskIsPresent) { typename TFixedImage::PointType fixedSpacePhysicalPoint; @@ -135,7 +135,7 @@ MattesMutualInformationImageToImageMetric::Initialize { itk::ImageRegionConstIteratorWithIndex mi(this->m_MovingImage, this->m_MovingImage->GetBufferedRegion()); - const bool movingMaskIsPresent = !(this->m_MovingImageMask.IsNull()); + const bool movingMaskIsPresent = !(this->m_MovingImageMask.IsNull()); if (movingMaskIsPresent) { typename TMovingImage::PointType movingSpacePhysicalPoint; @@ -353,7 +353,7 @@ template inline void MattesMutualInformationImageToImageMetric::GetValueThreadPreProcess( ThreadIdType threadId, - bool withinSampleThread) const + bool withinSampleThread) const { this->Superclass::GetValueThreadPreProcess(threadId, withinSampleThread); @@ -366,10 +366,10 @@ MattesMutualInformationImageToImageMetric::GetValueTh template inline bool MattesMutualInformationImageToImageMetric::GetValueThreadProcessSample( - ThreadIdType threadId, - SizeValueType fixedImageSample, + ThreadIdType threadId, + SizeValueType fixedImageSample, const MovingImagePointType & itkNotUsed(mappedPoint), - double movingImageValue) const + double movingImageValue) const { /** * Compute this sample's contribution to the marginal and @@ -434,12 +434,12 @@ template inline void MattesMutualInformationImageToImageMetric::GetValueThreadPostProcess( ThreadIdType threadId, - bool itkNotUsed(withinSampleThread)) const + bool itkNotUsed(withinSampleThread)) const { const int maxI = this->m_NumberOfHistogramBins * (this->m_MMIMetricPerThreadVariables[threadId].JointPDFEndBin - this->m_MMIMetricPerThreadVariables[threadId].JointPDFStartBin + 1); - const unsigned int tPdfPtrOffset = (this->m_MMIMetricPerThreadVariables[threadId].JointPDFStartBin * + const unsigned int tPdfPtrOffset = (this->m_MMIMetricPerThreadVariables[threadId].JointPDFStartBin * this->m_MMIMetricPerThreadVariables[0].JointPDF->GetOffsetTable()[1]); JointPDFValueType * const pdfPtrStart = this->m_MMIMetricPerThreadVariables[0].JointPDF->GetBufferPointer() + tPdfPtrOffset; @@ -448,7 +448,7 @@ MattesMutualInformationImageToImageMetric::GetValueTh // independent parts of the PDF. for (unsigned int t = 1; t < this->m_NumberOfWorkUnits; ++t) { - JointPDFValueType * pdfPtr = pdfPtrStart; + JointPDFValueType * pdfPtr = pdfPtrStart; const JointPDFValueType * tPdfPtr = this->m_MMIMetricPerThreadVariables[t].JointPDF->GetBufferPointer() + tPdfPtrOffset; const JointPDFValueType * const tPdfPtrEnd = tPdfPtr + maxI; @@ -543,7 +543,7 @@ template inline void MattesMutualInformationImageToImageMetric::GetValueAndDerivativeThreadPreProcess( ThreadIdType threadId, - bool itkNotUsed(withinSampleThread)) const + bool itkNotUsed(withinSampleThread)) const { this->m_MMIMetricPerThreadVariables[threadId].FixedImageMarginalPDF = std::vector(m_NumberOfHistogramBins, 0.0F); @@ -557,10 +557,10 @@ MattesMutualInformationImageToImageMetric::GetValueAn template inline bool MattesMutualInformationImageToImageMetric::GetValueAndDerivativeThreadProcessSample( - ThreadIdType threadId, - SizeValueType fixedImageSample, + ThreadIdType threadId, + SizeValueType fixedImageSample, const MovingImagePointType & itkNotUsed(mappedPoint), - double movingImageValue, + double movingImageValue, const ImageDerivativesType & movingImageGradientValue) const { /** @@ -596,7 +596,7 @@ MattesMutualInformationImageToImageMetric::GetValueAn } } // Move the pointer to the fist affected bin - int pdfMovingIndex = static_cast(movingImageParzenWindowIndex) - 1; + int pdfMovingIndex = static_cast(movingImageParzenWindowIndex) - 1; const int pdfMovingIndexMax = static_cast(movingImageParzenWindowIndex) + 2; const unsigned int fixedImageParzenWindowIndex = this->m_FixedImageSamples[fixedImageSample].valueIndex; @@ -651,7 +651,7 @@ template inline void MattesMutualInformationImageToImageMetric::GetValueAndDerivativeThreadPostProcess( ThreadIdType threadId, - bool withinSampleThread) const + bool withinSampleThread) const { this->GetValueThreadPostProcess(threadId, withinSampleThread); @@ -668,7 +668,7 @@ MattesMutualInformationImageToImageMetric::GetValueAn const unsigned int tPdfDPtrOffset = this->m_MMIMetricPerThreadVariables[threadId].JointPDFStartBin * rowSize; for (unsigned int t = 1; t < this->m_NumberOfWorkUnits; ++t) { - JointPDFDerivativesValueType * pdfDPtr = pdfDPtrStart; + JointPDFDerivativesValueType * pdfDPtr = pdfDPtrStart; const JointPDFDerivativesValueType * tPdfDPtr = this->m_MMIMetricPerThreadVariables[t].JointPDFDerivatives->GetBufferPointer() + tPdfDPtrOffset; const JointPDFDerivativesValueType * const tPdfDPtrEnd = tPdfDPtr + maxI; @@ -681,7 +681,7 @@ MattesMutualInformationImageToImageMetric::GetValueAn const PDFValueType nFactor = 1.0 / (this->m_MovingImageBinSize * this->m_NumberOfPixelsCounted); - JointPDFDerivativesValueType * pdfDPtr = pdfDPtrStart; + JointPDFDerivativesValueType * pdfDPtr = pdfDPtrStart; const JointPDFDerivativesValueType * const tPdfDPtrEnd = pdfDPtrStart + maxI; // for(int i = 0; i < maxI; i++) while (pdfDPtr < tPdfDPtrEnd) @@ -695,8 +695,8 @@ template void MattesMutualInformationImageToImageMetric::GetValueAndDerivative( const ParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const + MeasureType & value, + DerivativeType & derivative) const { // Set output values to zero value = MeasureType{}; @@ -749,7 +749,7 @@ MattesMutualInformationImageToImageMetric::GetValueAn JointPDFValueType * jointPDFPtr = this->m_MMIMetricPerThreadVariables[0].JointPDF->GetBufferPointer(); // Initialize sum to zero - PDFValueType sum = 0.0; + PDFValueType sum = 0.0; const PDFValueType nFactor = 1.0 / (this->m_MovingImageBinSize * this->m_NumberOfPixelsCounted); for (unsigned int fixedIndex = 0; fixedIndex < this->m_NumberOfHistogramBins; ++fixedIndex) { @@ -840,7 +840,7 @@ MattesMutualInformationImageToImageMetric::CommonGetV totalMassOfPDF += this->m_MMIMetricPerThreadVariables[0].FixedImageMarginalPDF[i]; } - const PDFValueType normalizationFactor = 1.0 / this->m_MMIMetricPerThreadVariables[0].JointPDFSum; + const PDFValueType normalizationFactor = 1.0 / this->m_MMIMetricPerThreadVariables[0].JointPDFSum; JointPDFValueType * pdfPtr = this->m_MMIMetricPerThreadVariables[0].JointPDF->GetBufferPointer(); for (unsigned int i = 0; i < this->m_NumberOfHistogramBins; ++i) { @@ -883,11 +883,11 @@ MattesMutualInformationImageToImageMetric::GetDerivat template void MattesMutualInformationImageToImageMetric::ComputePDFDerivatives( - ThreadIdType threadId, - unsigned int sampleNumber, - int pdfMovingIndex, + ThreadIdType threadId, + unsigned int sampleNumber, + int pdfMovingIndex, const ImageDerivativesType & movingImageGradientValue, - PDFValueType cubicBSplineDerivativeValue) const + PDFValueType cubicBSplineDerivativeValue) const { // Update bins in the PDF derivatives for the current intensity pair // Could pre-compute @@ -962,9 +962,9 @@ MattesMutualInformationImageToImageMetric::ComputePDF else { const WeightsValueType * weights = nullptr; - const IndexValueType * indices = nullptr; + const IndexValueType * indices = nullptr; - BSplineTransformWeightsType * weightsHelper = nullptr; + BSplineTransformWeightsType * weightsHelper = nullptr; BSplineTransformIndexArrayType * indicesHelper = nullptr; if (this->m_UseCachingOfBSplineWeights) @@ -1004,7 +1004,7 @@ MattesMutualInformationImageToImageMetric::ComputePDF * possible dimensions) which is multiplied by the moving image * gradient. */ PDFValueType innerProduct; - int parameterIndex; + int parameterIndex; if (this->m_UseCachingOfBSplineWeights) { innerProduct = movingImageGradientValue[dim] * weights[mu]; diff --git a/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferenceImageToImageMetric.h b/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferenceImageToImageMetric.h index b5cb1207f03..e88987ec408 100644 --- a/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferenceImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferenceImageToImageMetric.h @@ -87,8 +87,8 @@ class ITK_TEMPLATE_EXPORT MeanReciprocalSquareDifferenceImageToImageMetric /** Get value and derivatives for multiple valued optimizers. */ void GetValueAndDerivative(const TransformParametersType & parameters, - MeasureType & Value, - DerivativeType & Derivative) const override; + MeasureType & Value, + DerivativeType & Derivative) const override; /** Set/Get Lambda value. This factor regulates the capture radius of this metric */ diff --git a/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferenceImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferenceImageToImageMetric.hxx index a46df9f2f17..5da779eb691 100644 --- a/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferenceImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferenceImageToImageMetric.hxx @@ -34,7 +34,7 @@ MeanReciprocalSquareDifferenceImageToImageMetric void MeanReciprocalSquareDifferenceImageToImageMetric::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -110,7 +110,7 @@ template void MeanReciprocalSquareDifferenceImageToImageMetric::GetDerivative( const TransformParametersType & parameters, - DerivativeType & derivative) const + DerivativeType & derivative) const { TransformParametersType testPoint = parameters; @@ -132,8 +132,8 @@ template void MeanReciprocalSquareDifferenceImageToImageMetric::GetValueAndDerivative( const TransformParametersType & parameters, - MeasureType & Value, - DerivativeType & Derivative) const + MeasureType & Value, + DerivativeType & Derivative) const { Value = this->GetValue(parameters); this->GetDerivative(parameters, Derivative); diff --git a/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.h b/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.h index ad41669f82d..e48ca230b81 100644 --- a/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.h +++ b/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.h @@ -92,8 +92,8 @@ class ITK_TEMPLATE_EXPORT MeanReciprocalSquareDifferencePointSetToImageMetric /** Get value and derivatives for multiple valued optimizers. */ void GetValueAndDerivative(const TransformParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const override; + MeasureType & value, + DerivativeType & derivative) const override; /** Set/Get the lambda distance. (controls the capture radius of the metric). */ diff --git a/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.hxx b/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.hxx index fb5ae4262f9..f889e8da641 100644 --- a/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.hxx @@ -42,10 +42,10 @@ MeanReciprocalSquareDifferencePointSetToImageMetricGetPoints()->Begin(); + PointIterator pointItr = fixedPointSet->GetPoints()->Begin(); const PointIterator pointEnd = fixedPointSet->GetPoints()->End(); - PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); + PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); const PointDataIterator pointDataEnd = fixedPointSet->GetPointData()->End(); MeasureType measure{}; @@ -66,7 +66,7 @@ MeanReciprocalSquareDifferencePointSetToImageMetricm_Interpolator->Evaluate(transformedPoint); const RealType fixedValue = pointDataItr.Value(); const RealType diff = movingValue - fixedValue; - const double diffSquared = diff * diff; + const double diffSquared = diff * diff; measure += 1.0 / (lambdaSquared + diffSquared); this->m_NumberOfPixelsCounted++; } @@ -91,7 +91,7 @@ template void MeanReciprocalSquareDifferencePointSetToImageMetric::GetDerivative( const TransformParametersType & parameters, - DerivativeType & derivative) const + DerivativeType & derivative) const { if (!this->GetGradientImage()) { @@ -115,10 +115,10 @@ MeanReciprocalSquareDifferencePointSetToImageMetricGetPoints()->Begin(); + PointIterator pointItr = fixedPointSet->GetPoints()->Begin(); const PointIterator pointEnd = fixedPointSet->GetPoints()->End(); - PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); + PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); const PointDataIterator pointDataEnd = fixedPointSet->GetPointData()->End(); TransformJacobianType jacobian(TMovingImage::ImageDimension, this->m_Transform->GetNumberOfParameters()); @@ -188,8 +188,8 @@ template void MeanReciprocalSquareDifferencePointSetToImageMetric::GetValueAndDerivative( const TransformParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const + MeasureType & value, + DerivativeType & derivative) const { if (!this->GetGradientImage()) { @@ -213,10 +213,10 @@ MeanReciprocalSquareDifferencePointSetToImageMetricGetPoints()->Begin(); + PointIterator pointItr = fixedPointSet->GetPoints()->Begin(); const PointIterator pointEnd = fixedPointSet->GetPoints()->End(); - PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); + PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); const PointDataIterator pointDataEnd = fixedPointSet->GetPointData()->End(); TransformJacobianType jacobian(TMovingImage::ImageDimension, this->m_Transform->GetNumberOfParameters()); diff --git a/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.h b/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.h index 217fcedf5d8..1f24bc0d482 100644 --- a/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.h +++ b/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.h @@ -160,8 +160,8 @@ class ITK_TEMPLATE_EXPORT MeanSquareRegistrationFunction */ PixelType ComputeUpdate(const NeighborhoodType & neighborhood, - void * globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0)) override; + void * globalData, + const FloatOffsetType & offset = FloatOffsetType(0.0)) override; protected: MeanSquareRegistrationFunction(); diff --git a/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.hxx b/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.hxx index 526943eb7c4..ed36a6b925e 100644 --- a/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.hxx +++ b/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.hxx @@ -27,7 +27,7 @@ namespace itk template MeanSquareRegistrationFunction::MeanSquareRegistrationFunction() { - RadiusType r; + RadiusType r; unsigned int j; for (j = 0; j < ImageDimension; ++j) @@ -52,7 +52,7 @@ MeanSquareRegistrationFunction::M template void MeanSquareRegistrationFunction::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -94,16 +94,16 @@ template ::ComputeUpdate( const NeighborhoodType & it, - void * itkNotUsed(globalData), - const FloatOffsetType & itkNotUsed(offset)) -> PixelType + void * itkNotUsed(globalData), + const FloatOffsetType & itkNotUsed(offset)) -> PixelType { // Get fixed image related information // Note: no need to check the index is within // fixed image buffer. This is done by the external filter. - const IndexType index = it.GetIndex(); - const auto fixedValue = static_cast(this->GetFixedImage()->GetPixel(index)); + const IndexType index = it.GetIndex(); + const auto fixedValue = static_cast(this->GetFixedImage()->GetPixel(index)); const CovariantVectorType fixedGradient = m_FixedImageGradientCalculator->EvaluateAtIndex(index); - double fixedGradientSquaredMagnitude = 0; + double fixedGradientSquaredMagnitude = 0; for (unsigned int j = 0; j < ImageDimension; ++j) { @@ -112,7 +112,7 @@ MeanSquareRegistrationFunction::C // Get moving image related information const DisplacementFieldPixelType itvec = this->GetDisplacementField()->GetPixel(index); - PointType mappedPoint; + PointType mappedPoint; this->GetFixedImage()->TransformIndexToPhysicalPoint(index, mappedPoint); for (unsigned int j = 0; j < ImageDimension; ++j) { @@ -129,7 +129,7 @@ MeanSquareRegistrationFunction::C this->m_Energy += speedValue * speedValue; const bool normalizemetric = this->GetNormalizeGradient(); - double denominator = 1.0; + double denominator = 1.0; if (normalizemetric) { denominator = speedValue * speedValue * fixedGradientSquaredMagnitude; diff --git a/Modules/Registration/Common/include/itkMeanSquaresHistogramImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMeanSquaresHistogramImageToImageMetric.hxx index f693e1cb732..44ad8b0dccf 100644 --- a/Modules/Registration/Common/include/itkMeanSquaresHistogramImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMeanSquaresHistogramImageToImageMetric.hxx @@ -26,10 +26,10 @@ auto MeanSquaresHistogramImageToImageMetric::EvaluateMeasure(HistogramType & histogram) const -> MeasureType { - MeasureType measure{}; - HistogramIteratorType it = histogram.Begin(); + MeasureType measure{}; + HistogramIteratorType it = histogram.Begin(); const HistogramIteratorType end = histogram.End(); - HistogramFrequencyType totalNumberOfSamples{}; + HistogramFrequencyType totalNumberOfSamples{}; while (it != end) { diff --git a/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.h b/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.h index ae0ba562006..c2e8a2ec85b 100644 --- a/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.h @@ -101,8 +101,8 @@ class ITK_TEMPLATE_EXPORT MeanSquaresImageToImageMetric : public ImageToImageMet /** Get the value and derivatives for single valued optimizers. */ void GetValueAndDerivative(const ParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const override; + MeasureType & value, + DerivativeType & derivative) const override; protected: MeanSquaresImageToImageMetric(); @@ -112,23 +112,23 @@ class ITK_TEMPLATE_EXPORT MeanSquaresImageToImageMetric : public ImageToImageMet private: bool - GetValueThreadProcessSample(ThreadIdType threadId, - SizeValueType fixedImageSample, + GetValueThreadProcessSample(ThreadIdType threadId, + SizeValueType fixedImageSample, const MovingImagePointType & mappedPoint, - double movingImageValue) const override; + double movingImageValue) const override; bool - GetValueAndDerivativeThreadProcessSample(ThreadIdType threadId, - SizeValueType fixedImageSample, + GetValueAndDerivativeThreadProcessSample(ThreadIdType threadId, + SizeValueType fixedImageSample, const MovingImagePointType & mappedPoint, - double movingImageValue, + double movingImageValue, const ImageDerivativesType & movingImageGradientValue) const override; struct PerThreadS { TransformJacobianType m_Jacobian; - MeasureType m_MSE; - DerivativeType m_MSEDerivative; + MeasureType m_MSE; + DerivativeType m_MSEDerivative; }; itkAlignedTypedef(64, PerThreadS, AlignedPerThreadType); diff --git a/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx index 2142c931b15..39d58e9ea6e 100644 --- a/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx @@ -76,10 +76,10 @@ MeanSquaresImageToImageMetric::Initialize() template inline bool MeanSquaresImageToImageMetric::GetValueThreadProcessSample( - ThreadIdType threadId, - SizeValueType fixedImageSample, + ThreadIdType threadId, + SizeValueType fixedImageSample, const MovingImagePointType & itkNotUsed(mappedPoint), - double movingImageValue) const + double movingImageValue) const { const double diff = movingImageValue - this->m_FixedImageSamples[fixedImageSample].value; @@ -133,10 +133,10 @@ MeanSquaresImageToImageMetric::GetValue(const Paramet template inline bool MeanSquaresImageToImageMetric::GetValueAndDerivativeThreadProcessSample( - ThreadIdType threadId, - SizeValueType fixedImageSample, + ThreadIdType threadId, + SizeValueType fixedImageSample, const MovingImagePointType & itkNotUsed(mappedPoint), - double movingImageValue, + double movingImageValue, const ImageDerivativesType & movingImageGradientValue) const { const double diff = movingImageValue - this->m_FixedImageSamples[fixedImageSample].value; @@ -182,8 +182,8 @@ MeanSquaresImageToImageMetric::GetValueAndDerivativeT template void MeanSquaresImageToImageMetric::GetValueAndDerivative(const ParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const + MeasureType & value, + DerivativeType & derivative) const { if (!this->m_FixedImage) { @@ -243,7 +243,7 @@ MeanSquaresImageToImageMetric::GetValueAndDerivative( template void MeanSquaresImageToImageMetric::GetDerivative(const ParametersType & parameters, - DerivativeType & derivative) const + DerivativeType & derivative) const { if (!this->m_FixedImage) { diff --git a/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.h b/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.h index 8c266cd9c58..84840929088 100644 --- a/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.h +++ b/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.h @@ -86,8 +86,8 @@ class ITK_TEMPLATE_EXPORT MeanSquaresPointSetToImageMetric : public PointSetToIm /** Get value and derivatives for multiple valued optimizers. */ void GetValueAndDerivative(const TransformParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const override; + MeasureType & value, + DerivativeType & derivative) const override; protected: MeanSquaresPointSetToImageMetric() = default; diff --git a/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.hxx b/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.hxx index 23859e38646..5c1f31c3c30 100644 --- a/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.hxx @@ -37,10 +37,10 @@ MeanSquaresPointSetToImageMetric::GetValue( itkExceptionMacro("Fixed point set has not been assigned"); } - PointIterator pointItr = fixedPointSet->GetPoints()->Begin(); + PointIterator pointItr = fixedPointSet->GetPoints()->Begin(); const PointIterator pointEnd = fixedPointSet->GetPoints()->End(); - PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); + PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); const PointDataIterator pointDataEnd = fixedPointSet->GetPointData()->End(); MeasureType measure{}; @@ -88,7 +88,7 @@ template void MeanSquaresPointSetToImageMetric::GetDerivative( const TransformParametersType & parameters, - DerivativeType & derivative) const + DerivativeType & derivative) const { if (!this->GetGradientImage()) { @@ -110,10 +110,10 @@ MeanSquaresPointSetToImageMetric::GetDerivative( derivative = DerivativeType(ParametersDimension); derivative.Fill(typename DerivativeType::ValueType{}); - PointIterator pointItr = fixedPointSet->GetPoints()->Begin(); + PointIterator pointItr = fixedPointSet->GetPoints()->Begin(); const PointIterator pointEnd = fixedPointSet->GetPoints()->End(); - PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); + PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); const PointDataIterator pointDataEnd = fixedPointSet->GetPointData()->End(); TransformJacobianType jacobian(TMovingImage::ImageDimension, this->m_Transform->GetNumberOfParameters()); @@ -183,8 +183,8 @@ template void MeanSquaresPointSetToImageMetric::GetValueAndDerivative( const TransformParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const + MeasureType & value, + DerivativeType & derivative) const { if (!this->GetGradientImage()) { @@ -207,10 +207,10 @@ MeanSquaresPointSetToImageMetric::GetValueAndDeriv derivative = DerivativeType(ParametersDimension); derivative.Fill(typename DerivativeType::ValueType{}); - PointIterator pointItr = fixedPointSet->GetPoints()->Begin(); + PointIterator pointItr = fixedPointSet->GetPoints()->Begin(); const PointIterator pointEnd = fixedPointSet->GetPoints()->End(); - PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); + PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); const PointDataIterator pointDataEnd = fixedPointSet->GetPointData()->End(); TransformJacobianType jacobian(TMovingImage::ImageDimension, this->m_Transform->GetNumberOfParameters()); diff --git a/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.h b/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.h index f5397b42205..1bfdeb84c4a 100644 --- a/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.h +++ b/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.h @@ -246,23 +246,23 @@ class ITK_TEMPLATE_EXPORT MultiResolutionImageRegistrationMethod : public Proces itkSetMacro(CurrentLevel, SizeValueType); private: - MetricPointer m_Metric{}; + MetricPointer m_Metric{}; OptimizerType::Pointer m_Optimizer{}; MovingImageConstPointer m_MovingImage{}; - FixedImageConstPointer m_FixedImage{}; + FixedImageConstPointer m_FixedImage{}; - TransformPointer m_Transform{}; + TransformPointer m_Transform{}; InterpolatorPointer m_Interpolator{}; MovingImagePyramidPointer m_MovingImagePyramid{}; - FixedImagePyramidPointer m_FixedImagePyramid{}; + FixedImagePyramidPointer m_FixedImagePyramid{}; ParametersType m_InitialTransformParameters{}; ParametersType m_InitialTransformParametersOfNextLevel{}; ParametersType m_LastTransformParameters{}; - FixedImageRegionType m_FixedImageRegion{}; + FixedImageRegionType m_FixedImageRegion{}; std::vector m_FixedImageRegionPyramid{}; SizeValueType m_NumberOfLevels{}; diff --git a/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx b/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx index fd5e58886da..a2916f0a1f4 100644 --- a/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx +++ b/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx @@ -227,7 +227,7 @@ MultiResolutionImageRegistrationMethod::PreparePyrami const ScheduleType movingschedule = m_MovingImagePyramid->GetSchedule(); itkDebugMacro("MovingImage schedule: " << movingschedule); - SizeType inputSize = m_FixedImageRegion.GetSize(); + SizeType inputSize = m_FixedImageRegion.GetSize(); IndexType inputStart = m_FixedImageRegion.GetIndex(); const SizeValueType numberOfLevels = m_FixedImagePyramid->GetNumberOfLevels(); @@ -240,7 +240,7 @@ MultiResolutionImageRegistrationMethod::PreparePyrami // since the regions should be compatible. for (unsigned int level = 0; level < numberOfLevels; ++level) { - SizeType size; + SizeType size; IndexType start; for (unsigned int dim = 0; dim < TFixedImage::ImageDimension; ++dim) { diff --git a/Modules/Registration/Common/include/itkMultiResolutionPyramidImageFilter.hxx b/Modules/Registration/Common/include/itkMultiResolutionPyramidImageFilter.hxx index 53db4abfce3..e306f2d36b3 100644 --- a/Modules/Registration/Common/include/itkMultiResolutionPyramidImageFilter.hxx +++ b/Modules/Registration/Common/include/itkMultiResolutionPyramidImageFilter.hxx @@ -220,7 +220,7 @@ MultiResolutionPyramidImageFilter::GenerateData() // only one of these pointers is going to be valid, depending on the // value of UseShrinkImageFilter flag typename ResampleShrinkerType::Pointer resampleShrinker; - typename ShrinkerType::Pointer shrinker; + typename ShrinkerType::Pointer shrinker; if (this->GetUseShrinkImageFilter()) { @@ -247,7 +247,7 @@ MultiResolutionPyramidImageFilter::GenerateData() unsigned int factors[ImageDimension]; - double variance[ImageDimension]; + double variance[ImageDimension]; for (unsigned int ilevel = 0; ilevel < m_NumberOfLevels; ++ilevel) { @@ -315,11 +315,11 @@ MultiResolutionPyramidImageFilter::GenerateOutputInfo itkExceptionMacro("Input has not been set"); } - const typename InputImageType::PointType & inputOrigin = inputPtr->GetOrigin(); - const typename InputImageType::SpacingType & inputSpacing = inputPtr->GetSpacing(); + const typename InputImageType::PointType & inputOrigin = inputPtr->GetOrigin(); + const typename InputImageType::SpacingType & inputSpacing = inputPtr->GetSpacing(); const typename InputImageType::DirectionType & inputDirection = inputPtr->GetDirection(); - const typename InputImageType::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); - const typename InputImageType::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); + const typename InputImageType::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename InputImageType::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); using SizeType = typename OutputImageType::SizeType; using IndexType = typename OutputImageType::IndexType; @@ -334,8 +334,8 @@ MultiResolutionPyramidImageFilter::GenerateOutputInfo continue; } - SizeType outputSize; - IndexType outputStartIndex; + SizeType outputSize; + IndexType outputStartIndex; typename OutputImageType::SpacingType outputSpacing; for (unsigned int idim = 0; idim < OutputImageType::ImageDimension; ++idim) { @@ -414,11 +414,11 @@ MultiResolutionPyramidImageFilter::GenerateOutputRequ { // compute requested regions for the other outputs based on // the requested region of the reference output - IndexType outputIndex; - SizeType outputSize; + IndexType outputIndex; + SizeType outputSize; RegionType outputRegion; - IndexType baseIndex = ptr->GetRequestedRegion().GetIndex(); - SizeType baseSize = ptr->GetRequestedRegion().GetSize(); + IndexType baseIndex = ptr->GetRequestedRegion().GetIndex(); + SizeType baseSize = ptr->GetRequestedRegion().GetSize(); for (unsigned int idim = 0; idim < TOutputImage::ImageDimension; ++idim) { @@ -482,8 +482,8 @@ MultiResolutionPyramidImageFilter::GenerateInputReque using RegionType = typename OutputImageType::RegionType; unsigned int refLevel = m_NumberOfLevels - 1; - SizeType baseSize = this->GetOutput(refLevel)->GetRequestedRegion().GetSize(); - IndexType baseIndex = this->GetOutput(refLevel)->GetRequestedRegion().GetIndex(); + SizeType baseSize = this->GetOutput(refLevel)->GetRequestedRegion().GetSize(); + IndexType baseIndex = this->GetOutput(refLevel)->GetRequestedRegion().GetIndex(); for (unsigned int idim = 0; idim < ImageDimension; ++idim) { diff --git a/Modules/Registration/Common/include/itkMutualInformationHistogramImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMutualInformationHistogramImageToImageMetric.hxx index 0844a8cd42a..3ab04c85747 100644 --- a/Modules/Registration/Common/include/itkMutualInformationHistogramImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMutualInformationHistogramImageToImageMetric.hxx @@ -57,7 +57,7 @@ MutualInformationHistogramImageToImageMetric::Evaluat entropyY = -entropyY / static_cast(totalFreq) + std::log(totalFreq); - HistogramIteratorType it = histogram.Begin(); + HistogramIteratorType it = histogram.Begin(); const HistogramIteratorType end = histogram.End(); while (it != end) { diff --git a/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.h b/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.h index 5cb16ca95dd..daff91fd48a 100644 --- a/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.h @@ -144,8 +144,8 @@ class ITK_TEMPLATE_EXPORT MutualInformationImageToImageMetric : public ImageToIm /** Get the value and derivatives for single valued optimizers. */ void GetValueAndDerivative(const ParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const override; + MeasureType & value, + DerivativeType & derivative) const override; /** Set the number of spatial samples. This is the number of image * samples used to calculate the joint probability distribution. @@ -204,8 +204,8 @@ class ITK_TEMPLATE_EXPORT MutualInformationImageToImageMetric : public ImageToIm ~SpatialSample() = default; FixedImagePointType FixedImagePointValue; - double FixedImageValue{ 0.0 }; - double MovingImageValue{ 0.0 }; + double FixedImageValue{ 0.0 }; + double MovingImageValue{ 0.0 }; }; /** SpatialSampleContainer type alias support */ @@ -220,9 +220,9 @@ class ITK_TEMPLATE_EXPORT MutualInformationImageToImageMetric : public ImageToIm mutable SpatialSampleContainer m_SampleB{}; unsigned int m_NumberOfSpatialSamples{}; - double m_MovingImageStandardDeviation{}; - double m_FixedImageStandardDeviation{}; - double m_MinProbability{}; + double m_MovingImageStandardDeviation{}; + double m_FixedImageStandardDeviation{}; + double m_MinProbability{}; typename KernelFunctionType::Pointer m_KernelFunction{}; diff --git a/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.hxx index 44f904df8c6..746c41a69b9 100644 --- a/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.hxx @@ -100,7 +100,7 @@ MutualInformationImageToImageMetric::SampleFixedImage randIter.GoToBegin(); typename SpatialSampleContainer::iterator iter; - const auto end = samples.end(); + const auto end = samples.end(); bool allOutside = true; @@ -112,7 +112,7 @@ MutualInformationImageToImageMetric::SampleFixedImage // Number of random picks made from the portion of fixed image within the // fixed mask - SizeValueType numberOfFixedImagePixelsVisited = 0; + SizeValueType numberOfFixedImagePixelsVisited = 0; const SizeValueType dryRunTolerance = this->GetFixedImageRegion().GetNumberOfPixels(); for (iter = samples.begin(); iter != end; ++iter) { @@ -202,9 +202,9 @@ MutualInformationImageToImageMetric::GetValue(const P SumType dSumJoint; typename SpatialSampleContainer::const_iterator aiter; - const auto aend = m_SampleA.end(); + const auto aend = m_SampleA.end(); typename SpatialSampleContainer::const_iterator biter; - const auto bend = m_SampleB.end(); + const auto bend = m_SampleB.end(); for (biter = m_SampleB.begin(); biter != bend; ++biter) { dSumFixed.ResetToZero(); @@ -263,12 +263,12 @@ MutualInformationImageToImageMetric::GetValue(const P template void MutualInformationImageToImageMetric::GetValueAndDerivative(const ParametersType & parameters, - MeasureType & value, + MeasureType & value, DerivativeType & derivative) const { value = MeasureType{}; const unsigned int numberOfParameters = this->m_Transform->GetNumberOfParameters(); - DerivativeType temp(numberOfParameters); + DerivativeType temp(numberOfParameters); temp.Fill(0); derivative = temp; @@ -294,9 +294,9 @@ MutualInformationImageToImageMetric::GetValueAndDeriv SumType dDenominatorJoint; typename SpatialSampleContainer::iterator aiter; - const auto aend = m_SampleA.end(); + const auto aend = m_SampleA.end(); typename SpatialSampleContainer::iterator biter; - const auto bend = m_SampleB.end(); + const auto bend = m_SampleB.end(); // precalculate all the image derivatives for sample A using DerivativeContainer = std::vector; @@ -304,8 +304,8 @@ MutualInformationImageToImageMetric::GetValueAndDeriv sampleADerivatives.resize(m_NumberOfSpatialSamples); typename DerivativeContainer::iterator aditer; - DerivativeType tempDeriv(numberOfParameters); - TransformJacobianType jacobian(numberOfParameters, numberOfParameters); + DerivativeType tempDeriv(numberOfParameters); + TransformJacobianType jacobian(numberOfParameters, numberOfParameters); for (aiter = m_SampleA.begin(), aditer = sampleADerivatives.begin(); aiter != aend; ++aiter, ++aditer) { /** FIXME: is there a way to avoid the extra copying step? */ @@ -404,7 +404,7 @@ MutualInformationImageToImageMetric::GetValueAndDeriv template void MutualInformationImageToImageMetric::GetDerivative(const ParametersType & parameters, - DerivativeType & derivative) const + DerivativeType & derivative) const { MeasureType value; @@ -416,8 +416,8 @@ template void MutualInformationImageToImageMetric::CalculateDerivatives( const FixedImagePointType & point, - DerivativeType & derivatives, - TransformJacobianType & jacobian) const + DerivativeType & derivatives, + TransformJacobianType & jacobian) const { const MovingImagePointType mappedPoint = this->m_Transform->TransformPoint(point); diff --git a/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.h b/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.h index 13979876fe3..baadee1722a 100644 --- a/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.h @@ -88,8 +88,8 @@ class ITK_TEMPLATE_EXPORT NormalizedCorrelationImageToImageMetric : public Image /** Get value and derivatives for multiple valued optimizers. */ void GetValueAndDerivative(const TransformParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const override; + MeasureType & value, + DerivativeType & derivative) const override; /** Set/Get SubtractMean boolean. If true, the sample mean is subtracted * from the sample values in the cross-correlation formula and diff --git a/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.hxx b/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.hxx index b89b5d19dfe..11eeb46849b 100644 --- a/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.hxx @@ -125,7 +125,7 @@ template void NormalizedCorrelationImageToImageMetric::GetDerivative( const TransformParametersType & parameters, - DerivativeType & derivative) const + DerivativeType & derivative) const { if (!this->GetGradientImage()) { @@ -307,8 +307,8 @@ template void NormalizedCorrelationImageToImageMetric::GetValueAndDerivative( const TransformParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const + MeasureType & value, + DerivativeType & derivative) const { if (!this->GetGradientImage()) { diff --git a/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.h b/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.h index 1af7a34767d..a22c202b04e 100644 --- a/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.h +++ b/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.h @@ -90,8 +90,8 @@ class ITK_TEMPLATE_EXPORT NormalizedCorrelationPointSetToImageMetric /** Get value and derivatives for multiple valued optimizers. */ void GetValueAndDerivative(const TransformParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const override; + MeasureType & value, + DerivativeType & derivative) const override; /** Set/Get SubtractMean boolean. If true, the sample mean is subtracted * from the sample values in the cross-correlation formula and diff --git a/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.hxx b/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.hxx index 6497bd8f6ea..2d8a957240d 100644 --- a/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.hxx @@ -41,10 +41,10 @@ NormalizedCorrelationPointSetToImageMetric::GetVal itkExceptionMacro("Fixed point set has not been assigned"); } - PointIterator pointItr = fixedPointSet->GetPoints()->Begin(); + PointIterator pointItr = fixedPointSet->GetPoints()->Begin(); const PointIterator pointEnd = fixedPointSet->GetPoints()->End(); - PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); + PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); const PointDataIterator pointDataEnd = fixedPointSet->GetPointData()->End(); MeasureType measure; @@ -111,7 +111,7 @@ template void NormalizedCorrelationPointSetToImageMetric::GetDerivative( const TransformParametersType & parameters, - DerivativeType & derivative) const + DerivativeType & derivative) const { if (!this->GetGradientImage()) { @@ -152,10 +152,10 @@ NormalizedCorrelationPointSetToImageMetric::GetDer DerivativeType derivativeO(ParametersDimension); derivativeO.Fill(typename DerivativeType::ValueType{}); - PointIterator pointItr = fixedPointSet->GetPoints()->Begin(); + PointIterator pointItr = fixedPointSet->GetPoints()->Begin(); const PointIterator pointEnd = fixedPointSet->GetPoints()->End(); - PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); + PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); const PointDataIterator pointDataEnd = fixedPointSet->GetPointData()->End(); TransformJacobianType jacobian(TMovingImage::ImageDimension, this->m_Transform->GetNumberOfParameters()); @@ -253,8 +253,8 @@ template void NormalizedCorrelationPointSetToImageMetric::GetValueAndDerivative( const TransformParametersType & parameters, - MeasureType & value, - DerivativeType & derivative) const + MeasureType & value, + DerivativeType & derivative) const { if (!this->GetGradientImage()) { @@ -295,10 +295,10 @@ NormalizedCorrelationPointSetToImageMetric::GetVal DerivativeType derivativeO(ParametersDimension); derivativeO.Fill(typename DerivativeType::ValueType{}); - PointIterator pointItr = fixedPointSet->GetPoints()->Begin(); + PointIterator pointItr = fixedPointSet->GetPoints()->Begin(); const PointIterator pointEnd = fixedPointSet->GetPoints()->End(); - PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); + PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin(); const PointDataIterator pointDataEnd = fixedPointSet->GetPointData()->End(); TransformJacobianType jacobian(TMovingImage::ImageDimension, this->m_Transform->GetNumberOfParameters()); diff --git a/Modules/Registration/Common/include/itkNormalizedMutualInformationHistogramImageToImageMetric.hxx b/Modules/Registration/Common/include/itkNormalizedMutualInformationHistogramImageToImageMetric.hxx index d993a3fbfab..8ebc6de0d7a 100644 --- a/Modules/Registration/Common/include/itkNormalizedMutualInformationHistogramImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkNormalizedMutualInformationHistogramImageToImageMetric.hxx @@ -59,7 +59,7 @@ NormalizedMutualInformationHistogramImageToImageMetric(totalFreq) + std::log(totalFreq); - HistogramIteratorType it = histogram.Begin(); + HistogramIteratorType it = histogram.Begin(); const HistogramIteratorType end = histogram.End(); while (it != end) { diff --git a/Modules/Registration/Common/include/itkPointSetToImageMetric.hxx b/Modules/Registration/Common/include/itkPointSetToImageMetric.hxx index 575d48b90f3..316356f2d58 100644 --- a/Modules/Registration/Common/include/itkPointSetToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkPointSetToImageMetric.hxx @@ -84,7 +84,7 @@ PointSetToImageMetric::Initialize() gradientFilter->SetInput(m_MovingImage); const typename MovingImageType::SpacingType & spacing = m_MovingImage->GetSpacing(); - double maximumSpacing = 0.0; + double maximumSpacing = 0.0; for (unsigned int i = 0; i < MovingImageDimension; ++i) { if (spacing[i] > maximumSpacing) diff --git a/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.h b/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.h index ab72976c485..98be5737da2 100644 --- a/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.h +++ b/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.h @@ -179,13 +179,13 @@ class ITK_TEMPLATE_EXPORT PointSetToImageRegistrationMethod : public ProcessObje GenerateData() override; private: - MetricPointer m_Metric{}; + MetricPointer m_Metric{}; OptimizerType::Pointer m_Optimizer{}; - MovingImageConstPointer m_MovingImage{}; + MovingImageConstPointer m_MovingImage{}; FixedPointSetConstPointer m_FixedPointSet{}; - TransformPointer m_Transform{}; + TransformPointer m_Transform{}; InterpolatorPointer m_Interpolator{}; ParametersType m_InitialTransformParameters{}; diff --git a/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.h b/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.h index cf9e30c707b..d531e0deaf9 100644 --- a/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.h +++ b/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.h @@ -170,11 +170,11 @@ class ITK_TEMPLATE_EXPORT PointSetToPointSetRegistrationMethod : public ProcessO GenerateData() override; private: - MetricPointer m_Metric{}; + MetricPointer m_Metric{}; OptimizerType::Pointer m_Optimizer{}; MovingPointSetConstPointer m_MovingPointSet{}; - FixedPointSetConstPointer m_FixedPointSet{}; + FixedPointSetConstPointer m_FixedPointSet{}; TransformPointer m_Transform{}; diff --git a/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.h b/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.h index c53637c6c0a..20e5ffe7f1a 100644 --- a/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.h +++ b/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.h @@ -91,7 +91,7 @@ class ITK_TEMPLATE_EXPORT PointSetToSpatialObjectDemonsRegistration : public Pro private: MovingSpatialObjectConstPointer m_MovingSpatialObject{}; - FixedPointSetConstPointer m_FixedPointSet{}; + FixedPointSetConstPointer m_FixedPointSet{}; }; } // end namespace itk diff --git a/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.hxx b/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.hxx index bd42c3f1b8a..89104c54ea4 100644 --- a/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.hxx +++ b/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.hxx @@ -33,7 +33,7 @@ PointSetToSpatialObjectDemonsRegistration void PointSetToSpatialObjectDemonsRegistration::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Registration/Common/include/itkPointsLocator.h b/Modules/Registration/Common/include/itkPointsLocator.h index 21bddb0bb5e..c804cdbf6c7 100644 --- a/Modules/Registration/Common/include/itkPointsLocator.h +++ b/Modules/Registration/Common/include/itkPointsLocator.h @@ -115,9 +115,9 @@ class ITK_TEMPLATE_EXPORT PointsLocator : public Object private: PointsContainerPointer m_Points{}; - SampleAdaptorPointer m_SampleAdaptor{}; - TreeGeneratorPointer m_KdTreeGenerator{}; - TreeConstPointer m_Tree{}; + SampleAdaptorPointer m_SampleAdaptor{}; + TreeGeneratorPointer m_KdTreeGenerator{}; + TreeConstPointer m_Tree{}; }; } // end namespace itk diff --git a/Modules/Registration/Common/include/itkPointsLocator.hxx b/Modules/Registration/Common/include/itkPointsLocator.hxx index fa19d593dc9..a217f792507 100644 --- a/Modules/Registration/Common/include/itkPointsLocator.hxx +++ b/Modules/Registration/Common/include/itkPointsLocator.hxx @@ -70,8 +70,8 @@ PointsLocator::FindClosestPoint(const PointType & query) const template void -PointsLocator::FindClosestNPoints(const PointType & query, - unsigned int numberOfNeighborsRequested, +PointsLocator::FindClosestNPoints(const PointType & query, + unsigned int numberOfNeighborsRequested, NeighborsIdentifierType & identifiers) const { unsigned int N = numberOfNeighborsRequested; @@ -87,10 +87,10 @@ PointsLocator::FindClosestNPoints(const PointType & qu template void -PointsLocator::FindClosestNPoints(const PointType & query, - unsigned int numberOfNeighborsRequested, +PointsLocator::FindClosestNPoints(const PointType & query, + unsigned int numberOfNeighborsRequested, NeighborsIdentifierType & identifiers, - std::vector & distances) const + std::vector & distances) const { unsigned int N = numberOfNeighborsRequested; if (N > this->m_Points->Size()) @@ -105,8 +105,8 @@ PointsLocator::FindClosestNPoints(const PointType & qu template void -PointsLocator::FindPointsWithinRadius(const PointType & query, - double radius, +PointsLocator::FindPointsWithinRadius(const PointType & query, + double radius, NeighborsIdentifierType & identifiers) const { this->m_Tree->Search(query, radius, identifiers); diff --git a/Modules/Registration/Common/include/itkRecursiveMultiResolutionPyramidImageFilter.hxx b/Modules/Registration/Common/include/itkRecursiveMultiResolutionPyramidImageFilter.hxx index 329541fe9ae..3d1fdbf015e 100644 --- a/Modules/Registration/Common/include/itkRecursiveMultiResolutionPyramidImageFilter.hxx +++ b/Modules/Registration/Common/include/itkRecursiveMultiResolutionPyramidImageFilter.hxx @@ -69,7 +69,7 @@ RecursiveMultiResolutionPyramidImageFilter::GenerateD // only one of these pointers is going to be valid, depending on the // value of UseShrinkImageFilter flag typename ResampleShrinkerType::Pointer resampleShrinker; - typename ShrinkerType::Pointer shrinker; + typename ShrinkerType::Pointer shrinker; if (this->GetUseShrinkImageFilter()) { @@ -108,9 +108,9 @@ RecursiveMultiResolutionPyramidImageFilter::GenerateD const typename TOutputImage::RegionType LPRegion = outputPtr->GetLargestPossibleRegion(); // Check shrink factors and compute variances - bool allOnes = true; + bool allOnes = true; unsigned int factors[ImageDimension]; - double variance[ImageDimension]; + double variance[ImageDimension]; for (unsigned int idim = 0; idim < ImageDimension; ++idim) { if (ilevel == static_cast(this->GetNumberOfLevels()) - 1) @@ -235,8 +235,8 @@ RecursiveMultiResolutionPyramidImageFilter::GenerateO typename TInputImage::SizeType radius; RegionType requestedRegion; - SizeType requestedSize; - IndexType requestedIndex; + SizeType requestedSize; + IndexType requestedIndex; // compute requested regions for lower levels for (int ilevel = refLevel + 1; ilevel < static_cast(this->GetNumberOfLevels()); ++ilevel) @@ -341,8 +341,8 @@ RecursiveMultiResolutionPyramidImageFilter::GenerateI using RegionType = typename OutputImageType::RegionType; unsigned int refLevel = this->GetNumberOfLevels() - 1; - SizeType baseSize = this->GetOutput(refLevel)->GetRequestedRegion().GetSize(); - IndexType baseIndex = this->GetOutput(refLevel)->GetRequestedRegion().GetIndex(); + SizeType baseSize = this->GetOutput(refLevel)->GetRequestedRegion().GetSize(); + IndexType baseIndex = this->GetOutput(refLevel)->GetRequestedRegion().GetIndex(); unsigned int idim; for (idim = 0; idim < ImageDimension; ++idim) diff --git a/Modules/Registration/Common/include/itkSimpleMultiResolutionImageRegistrationUI.h b/Modules/Registration/Common/include/itkSimpleMultiResolutionImageRegistrationUI.h index 06e46432afe..c77cbcfc9ea 100644 --- a/Modules/Registration/Common/include/itkSimpleMultiResolutionImageRegistrationUI.h +++ b/Modules/Registration/Common/include/itkSimpleMultiResolutionImageRegistrationUI.h @@ -62,7 +62,7 @@ class SimpleMultiResolutionImageRegistrationUI protected: typename TRegistrator::Pointer m_Registrator{}; - unsigned long m_Tag{}; + unsigned long m_Tag{}; }; @@ -133,7 +133,7 @@ class ITK_TEMPLATE_EXPORT SimpleMultiResolutionImageRegistrationUI2 private: itk::Array m_NumberOfIterations{}; - itk::Array m_LearningRates{}; + itk::Array m_LearningRates{}; }; diff --git a/Modules/Registration/Common/include/itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.h b/Modules/Registration/Common/include/itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.h index 826aba9dc53..f97b08190ce 100644 --- a/Modules/Registration/Common/include/itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.h +++ b/Modules/Registration/Common/include/itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.h @@ -213,11 +213,11 @@ class ITK_TEMPLATE_EXPORT TimeVaryingBSplineVelocityFieldTransformParametersAdap void UpdateRequiredFixedParameters(); - MeshSizeType m_RequiredTransformDomainMeshSize{}; - OriginType m_RequiredTransformDomainOrigin{}; + MeshSizeType m_RequiredTransformDomainMeshSize{}; + OriginType m_RequiredTransformDomainOrigin{}; DirectionType m_RequiredTransformDomainDirection{}; - SpacingType m_RequiredTransformDomainSpacing{}; - SizeType m_RequiredTransformDomainSize{}; + SpacingType m_RequiredTransformDomainSpacing{}; + SizeType m_RequiredTransformDomainSize{}; SizeValueType m_SplineOrder{}; diff --git a/Modules/Registration/Common/include/itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.hxx b/Modules/Registration/Common/include/itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.hxx index 2b4b834c1bc..d7af047d49b 100644 --- a/Modules/Registration/Common/include/itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.hxx +++ b/Modules/Registration/Common/include/itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.hxx @@ -251,9 +251,9 @@ TimeVaryingBSplineVelocityFieldTransformParametersAdaptor::AdaptTran return; } - const SizeType requiredLatticeSize = this->GetRequiredControlPointLatticeSize(); - const OriginType requiredLatticeOrigin = this->GetRequiredControlPointLatticeOrigin(); - const SpacingType requiredLatticeSpacing = this->GetRequiredControlPointLatticeSpacing(); + const SizeType requiredLatticeSize = this->GetRequiredControlPointLatticeSize(); + const OriginType requiredLatticeOrigin = this->GetRequiredControlPointLatticeOrigin(); + const SpacingType requiredLatticeSpacing = this->GetRequiredControlPointLatticeSpacing(); const DirectionType requiredLatticeDirection = this->GetRequiredControlPointLatticeDirection(); const RegionType & latticeRegion = @@ -311,7 +311,7 @@ TimeVaryingBSplineVelocityFieldTransformParametersAdaptor::AdaptTran decompositionFilter->SetInput(upsampler->GetOutput()); decompositionFilter->Update(); - ImageRegionConstIterator ItD(decompositionFilter->GetOutput(), + ImageRegionConstIterator ItD(decompositionFilter->GetOutput(), decompositionFilter->GetOutput()->GetLargestPossibleRegion()); ImageRegionIterator ItL( requiredLattice, requiredLattice->GetLargestPossibleRegion()); diff --git a/Modules/Registration/Common/include/itkTimeVaryingVelocityFieldTransformParametersAdaptor.hxx b/Modules/Registration/Common/include/itkTimeVaryingVelocityFieldTransformParametersAdaptor.hxx index f671a2386c8..d2b39e844ab 100644 --- a/Modules/Registration/Common/include/itkTimeVaryingVelocityFieldTransformParametersAdaptor.hxx +++ b/Modules/Registration/Common/include/itkTimeVaryingVelocityFieldTransformParametersAdaptor.hxx @@ -187,9 +187,9 @@ TimeVaryingVelocityFieldTransformParametersAdaptor::AdaptTransformPa return; } - const SizeType newFieldSize = this->GetRequiredSize(); - const PointType newFieldOrigin = this->GetRequiredOrigin(); - const SpacingType newFieldSpacing = this->GetRequiredSpacing(); + const SizeType newFieldSize = this->GetRequiredSize(); + const PointType newFieldOrigin = this->GetRequiredOrigin(); + const SpacingType newFieldSpacing = this->GetRequiredSpacing(); const DirectionType newFieldDirection = this->GetRequiredDirection(); using IdentityTransformType = IdentityTransform; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration10.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration10.cxx index 5145935f6a7..0238fe6fd73 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration10.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration10.cxx @@ -101,7 +101,7 @@ main(int argc, char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); @@ -112,7 +112,7 @@ main(int argc, char * argv[]) using FixedImageCasterType = itk::CastImageFilter; using MovingImageCasterType = itk::CastImageFilter; - const FixedImageCasterType::Pointer fixedImageCaster = FixedImageCasterType::New(); + const FixedImageCasterType::Pointer fixedImageCaster = FixedImageCasterType::New(); const MovingImageCasterType::Pointer movingImageCaster = MovingImageCasterType::New(); fixedImageCaster->SetInput(fixedImageReader->GetOutput()); @@ -156,9 +156,9 @@ main(int argc, char * argv[]) using WarperType = itk::WarpImageFilter; using InterpolatorType = itk::LinearInterpolateImageFunction; - const WarperType::Pointer warper = WarperType::New(); + const WarperType::Pointer warper = WarperType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); - const FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); + const FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); warper->SetInput(movingImageReader->GetOutput()); warper->SetInterpolator(interpolator); @@ -173,7 +173,7 @@ main(int argc, char * argv[]) using CastFilterType = itk::CastImageFilter; using WriterType = itk::ImageFileWriter; - const WriterType::Pointer writer = WriterType::New(); + const WriterType::Pointer writer = WriterType::New(); const CastFilterType::Pointer caster = CastFilterType::New(); writer->SetFileName(argv[3]); diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration12.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration12.cxx index 2ea6e16db18..5560b1374c2 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration12.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration12.cxx @@ -154,8 +154,8 @@ main(int argc, char * argv[]) using RegistrationType = itk::ImageRegistrationMethod; - const MetricType::Pointer metric = MetricType::New(); - const OptimizerType::Pointer optimizer = OptimizerType::New(); + const MetricType::Pointer metric = MetricType::New(); + const OptimizerType::Pointer optimizer = OptimizerType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); const RegistrationType::Pointer registration = RegistrationType::New(); @@ -177,7 +177,7 @@ main(int argc, char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); @@ -198,8 +198,8 @@ main(int argc, char * argv[]) constexpr unsigned int numberOfGridNodesInOneDimension = 7; TransformType::PhysicalDimensionsType fixedPhysicalDimensions; - TransformType::MeshSizeType meshSize; - TransformType::OriginType fixedOrigin; + TransformType::MeshSizeType meshSize; + TransformType::OriginType fixedOrigin; for (unsigned int i = 0; i < SpaceDimension; ++i) { @@ -238,8 +238,8 @@ main(int argc, char * argv[]) OptimizerType::BoundSelectionType boundSelect(transform->GetNumberOfParameters()); - OptimizerType::BoundValueType upperBound(transform->GetNumberOfParameters()); - OptimizerType::BoundValueType lowerBound(transform->GetNumberOfParameters()); + OptimizerType::BoundValueType upperBound(transform->GetNumberOfParameters()); + OptimizerType::BoundValueType lowerBound(transform->GetNumberOfParameters()); boundSelect.Fill(0); upperBound.Fill(0.0); @@ -288,7 +288,7 @@ main(int argc, char * argv[]) metric->ReinitializeSeed(121212); // Add time and memory probes - itk::TimeProbesCollectorBase chronometer; + itk::TimeProbesCollectorBase chronometer; itk::MemoryProbesCollectorBase memorymeter; std::cout << std::endl << "Starting Registration" << std::endl; @@ -350,7 +350,7 @@ main(int argc, char * argv[]) using WriterType = itk::ImageFileWriter; - const WriterType::Pointer writer = WriterType::New(); + const WriterType::Pointer writer = WriterType::New(); const CastFilterType::Pointer caster = CastFilterType::New(); @@ -439,8 +439,8 @@ main(int argc, char * argv[]) fi.GoToBegin(); - TransformType::InputPointType fixedPoint; - TransformType::OutputPointType movingPoint; + TransformType::InputPointType fixedPoint; + TransformType::OutputPointType movingPoint; DisplacementFieldType::IndexType index; VectorType displacement; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration4.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration4.cxx index d78e567f236..59b7b00c38c 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration4.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration4.cxx @@ -117,8 +117,8 @@ main(int argc, char * argv[]) using RegistrationType = itk::ImageRegistrationMethod; - const MetricType::Pointer metric = MetricType::New(); - const OptimizerType::Pointer optimizer = OptimizerType::New(); + const MetricType::Pointer metric = MetricType::New(); + const OptimizerType::Pointer optimizer = OptimizerType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); const RegistrationType::Pointer registration = RegistrationType::New(); @@ -140,7 +140,7 @@ main(int argc, char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); @@ -159,8 +159,8 @@ main(int argc, char * argv[]) TransformType::PhysicalDimensionsType fixedPhysicalDimensions; - TransformType::MeshSizeType meshSize; - TransformType::OriginType fixedOrigin; + TransformType::MeshSizeType meshSize; + TransformType::OriginType fixedOrigin; constexpr unsigned int numberOfGridNodesInOneDimension = 8; @@ -208,7 +208,7 @@ main(int argc, char * argv[]) optimizer->SetMaximumNumberOfFunctionEvaluations(1000); // Add time and memory probes - itk::TimeProbesCollectorBase chronometer; + itk::TimeProbesCollectorBase chronometer; itk::MemoryProbesCollectorBase memorymeter; std::cout << std::endl << "Starting Registration" << std::endl; @@ -278,7 +278,7 @@ main(int argc, char * argv[]) using WriterType = itk::ImageFileWriter; - const WriterType::Pointer writer = WriterType::New(); + const WriterType::Pointer writer = WriterType::New(); const CastFilterType::Pointer caster = CastFilterType::New(); @@ -365,8 +365,8 @@ main(int argc, char * argv[]) fi.GoToBegin(); - TransformType::InputPointType fixedPoint; - TransformType::OutputPointType movingPoint; + TransformType::InputPointType fixedPoint; + TransformType::OutputPointType movingPoint; DisplacementFieldType::IndexType index; VectorType displacement; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration6.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration6.cxx index 75897ac2140..8ed0dd3b388 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration6.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration6.cxx @@ -108,8 +108,8 @@ main(int argc, char * argv[]) using RegistrationType = itk::ImageRegistrationMethod; - const MetricType::Pointer metric = MetricType::New(); - const OptimizerType::Pointer optimizer = OptimizerType::New(); + const MetricType::Pointer metric = MetricType::New(); + const OptimizerType::Pointer optimizer = OptimizerType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); const RegistrationType::Pointer registration = RegistrationType::New(); @@ -134,7 +134,7 @@ main(int argc, char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); @@ -154,8 +154,8 @@ main(int argc, char * argv[]) unsigned int numberOfGridNodes = 8; TransformType::PhysicalDimensionsType fixedPhysicalDimensions; - TransformType::MeshSizeType meshSize; - TransformType::OriginType fixedOrigin; + TransformType::MeshSizeType meshSize; + TransformType::OriginType fixedOrigin; for (unsigned int i = 0; i < SpaceDimension; ++i) { @@ -339,7 +339,7 @@ main(int argc, char * argv[]) using WriterType = itk::ImageFileWriter; - const WriterType::Pointer writer = WriterType::New(); + const WriterType::Pointer writer = WriterType::New(); const CastFilterType::Pointer caster = CastFilterType::New(); @@ -426,8 +426,8 @@ main(int argc, char * argv[]) fi.GoToBegin(); - TransformType::InputPointType fixedPoint; - TransformType::OutputPointType movingPoint; + TransformType::InputPointType fixedPoint; + TransformType::OutputPointType movingPoint; DisplacementFieldType::IndexType index; VectorType displacement; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration7.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration7.cxx index fda0e272706..ebeb20d0c9a 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration7.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration7.cxx @@ -155,8 +155,8 @@ main(int argc, char * argv[]) using RegistrationType = itk::ImageRegistrationMethod; - const MetricType::Pointer metric = MetricType::New(); - const OptimizerType::Pointer optimizer = OptimizerType::New(); + const MetricType::Pointer metric = MetricType::New(); + const OptimizerType::Pointer optimizer = OptimizerType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); const RegistrationType::Pointer registration = RegistrationType::New(); @@ -178,7 +178,7 @@ main(int argc, char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); @@ -198,8 +198,8 @@ main(int argc, char * argv[]) constexpr unsigned int numberOfGridNodes = 8; TransformType::PhysicalDimensionsType fixedPhysicalDimensions; - TransformType::MeshSizeType meshSize; - TransformType::OriginType fixedOrigin; + TransformType::MeshSizeType meshSize; + TransformType::OriginType fixedOrigin; for (unsigned int i = 0; i < SpaceDimension; ++i) { @@ -238,8 +238,8 @@ main(int argc, char * argv[]) // Next we set the parameters of the LBFGSB Optimizer. // OptimizerType::BoundSelectionType boundSelect(transform->GetNumberOfParameters()); - OptimizerType::BoundValueType upperBound(transform->GetNumberOfParameters()); - OptimizerType::BoundValueType lowerBound(transform->GetNumberOfParameters()); + OptimizerType::BoundValueType upperBound(transform->GetNumberOfParameters()); + OptimizerType::BoundValueType lowerBound(transform->GetNumberOfParameters()); boundSelect.Fill(0); upperBound.Fill(0.0); @@ -262,7 +262,7 @@ main(int argc, char * argv[]) // Add a time probe - itk::TimeProbesCollectorBase chronometer; + itk::TimeProbesCollectorBase chronometer; itk::MemoryProbesCollectorBase memorymeter; std::cout << std::endl << "Starting Registration" << std::endl; @@ -322,7 +322,7 @@ main(int argc, char * argv[]) using WriterType = itk::ImageFileWriter; - const WriterType::Pointer writer = WriterType::New(); + const WriterType::Pointer writer = WriterType::New(); const CastFilterType::Pointer caster = CastFilterType::New(); @@ -411,8 +411,8 @@ main(int argc, char * argv[]) fi.GoToBegin(); - TransformType::InputPointType fixedPoint; - TransformType::OutputPointType movingPoint; + TransformType::InputPointType fixedPoint; + TransformType::OutputPointType movingPoint; DisplacementFieldType::IndexType index; VectorType displacement; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration8.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration8.cxx index b886aed39f6..ba83b0e2b16 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration8.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration8.cxx @@ -155,8 +155,8 @@ main(int argc, char * argv[]) using RegistrationType = itk::ImageRegistrationMethod; - const MetricType::Pointer metric = MetricType::New(); - const OptimizerType::Pointer optimizer = OptimizerType::New(); + const MetricType::Pointer metric = MetricType::New(); + const OptimizerType::Pointer optimizer = OptimizerType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); const RegistrationType::Pointer registration = RegistrationType::New(); @@ -179,7 +179,7 @@ main(int argc, char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); @@ -205,8 +205,8 @@ main(int argc, char * argv[]) TransformType::PhysicalDimensionsType fixedPhysicalDimensions; - TransformType::MeshSizeType meshSize; - TransformType::OriginType fixedOrigin; + TransformType::MeshSizeType meshSize; + TransformType::OriginType fixedOrigin; for (unsigned int i = 0; i < SpaceDimension; ++i) { @@ -244,10 +244,10 @@ main(int argc, char * argv[]) // - const unsigned int numParameters = transform->GetNumberOfParameters(); + const unsigned int numParameters = transform->GetNumberOfParameters(); OptimizerType::BoundSelectionType boundSelect(numParameters); - OptimizerType::BoundValueType upperBound(numParameters); - OptimizerType::BoundValueType lowerBound(numParameters); + OptimizerType::BoundValueType upperBound(numParameters); + OptimizerType::BoundValueType lowerBound(numParameters); boundSelect.Fill(0); upperBound.Fill(0.0); @@ -310,7 +310,7 @@ main(int argc, char * argv[]) // Add time and memory probes - itk::TimeProbesCollectorBase chronometer; + itk::TimeProbesCollectorBase chronometer; itk::MemoryProbesCollectorBase memorymeter; std::cout << std::endl << "Starting Registration" << std::endl; @@ -372,7 +372,7 @@ main(int argc, char * argv[]) using WriterType = itk::ImageFileWriter; - const WriterType::Pointer writer = WriterType::New(); + const WriterType::Pointer writer = WriterType::New(); const CastFilterType::Pointer caster = CastFilterType::New(); @@ -461,8 +461,8 @@ main(int argc, char * argv[]) fi.GoToBegin(); - TransformType::InputPointType fixedPoint; - TransformType::OutputPointType movingPoint; + TransformType::InputPointType fixedPoint; + TransformType::OutputPointType movingPoint; DisplacementFieldType::IndexType index; VectorType displacement; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration1.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration1.cxx index 08e6dbc2deb..a2644ee09a7 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration1.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration1.cxx @@ -167,9 +167,9 @@ main(int argc, char * argv[]) // \doxygen{SmartPointer}. // - const MetricType::Pointer metric = MetricType::New(); - const TransformType::Pointer transform = TransformType::New(); - const OptimizerType::Pointer optimizer = OptimizerType::New(); + const MetricType::Pointer metric = MetricType::New(); + const TransformType::Pointer transform = TransformType::New(); + const OptimizerType::Pointer optimizer = OptimizerType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); const RegistrationType::Pointer registration = RegistrationType::New(); @@ -192,7 +192,7 @@ main(int argc, char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); @@ -505,7 +505,7 @@ main(int argc, char * argv[]) // method. // - const WriterType::Pointer writer = WriterType::New(); + const WriterType::Pointer writer = WriterType::New(); const CastFilterType::Pointer caster = CastFilterType::New(); diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration11.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration11.cxx index b94179439c1..7c339c99850 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration11.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration11.cxx @@ -131,8 +131,8 @@ main(int argc, char * argv[]) using MetricType = itk::MattesMutualInformationImageToImageMetric; - const TransformType::Pointer transform = TransformType::New(); - const OptimizerType::Pointer optimizer = OptimizerType::New(); + const TransformType::Pointer transform = TransformType::New(); + const OptimizerType::Pointer optimizer = OptimizerType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); const RegistrationType::Pointer registration = RegistrationType::New(); @@ -158,7 +158,7 @@ main(int argc, char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); @@ -301,7 +301,7 @@ main(int argc, char * argv[]) using CastFilterType = itk::CastImageFilter; using WriterType = itk::ImageFileWriter; - const WriterType::Pointer writer = WriterType::New(); + const WriterType::Pointer writer = WriterType::New(); const CastFilterType::Pointer caster = CastFilterType::New(); writer->SetFileName(argv[3]); diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration12.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration12.cxx index 72fda730491..a40c7d0b80e 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration12.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration12.cxx @@ -115,8 +115,8 @@ main(int argc, char * argv[]) using InterpolatorType = itk::LinearInterpolateImageFunction; using RegistrationType = itk::ImageRegistrationMethod; - MetricType::Pointer metric = MetricType::New(); - OptimizerType::Pointer optimizer = OptimizerType::New(); + MetricType::Pointer metric = MetricType::New(); + OptimizerType::Pointer optimizer = OptimizerType::New(); InterpolatorType::Pointer interpolator = InterpolatorType::New(); RegistrationType::Pointer registration = RegistrationType::New(); @@ -129,7 +129,7 @@ main(int argc, char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); @@ -158,7 +158,7 @@ main(int argc, char * argv[]) using OptimizerScalesType = OptimizerType::ScalesType; OptimizerScalesType optimizerScales(transform->GetNumberOfParameters()); - const double translationScale = 1.0 / 1000.0; + const double translationScale = 1.0 / 1000.0; optimizerScales[0] = 1.0; optimizerScales[1] = translationScale; @@ -272,7 +272,7 @@ main(int argc, char * argv[]) const double finalTranslationY = finalParameters[4]; const unsigned int numberOfIterations = optimizer->GetCurrentIteration(); - const double bestValue = optimizer->GetValue(); + const double bestValue = optimizer->GetValue(); // Print out results // @@ -343,7 +343,7 @@ main(int argc, char * argv[]) using WriterType = itk::ImageFileWriter; - WriterType::Pointer writer = WriterType::New(); + WriterType::Pointer writer = WriterType::New(); CastFilterType::Pointer caster = CastFilterType::New(); writer->SetFileName(argv[4]); diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration13.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration13.cxx index 73c9a34d8bd..0cb9a2fda1e 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration13.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration13.cxx @@ -112,8 +112,8 @@ main(int argc, char * argv[]) using MetricType = itk::MattesMutualInformationImageToImageMetric; - const TransformType::Pointer transform = TransformType::New(); - const OptimizerType::Pointer optimizer = OptimizerType::New(); + const TransformType::Pointer transform = TransformType::New(); + const OptimizerType::Pointer optimizer = OptimizerType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); const RegistrationType::Pointer registration = RegistrationType::New(); @@ -156,7 +156,7 @@ main(int argc, char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration14.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration14.cxx index 8459708bf2e..ea630bc058f 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration14.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration14.cxx @@ -119,8 +119,8 @@ main(int argc, char * argv[]) using MetricType = itk::NormalizedMutualInformationHistogramImageToImageMetric; - const TransformType::Pointer transform = TransformType::New(); - const OptimizerType::Pointer optimizer = OptimizerType::New(); + const TransformType::Pointer transform = TransformType::New(); + const OptimizerType::Pointer optimizer = OptimizerType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); const RegistrationType::Pointer registration = RegistrationType::New(); @@ -159,7 +159,7 @@ main(int argc, char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); @@ -205,8 +205,8 @@ main(int argc, char * argv[]) OptimizerScalesType optimizerScales(transform->GetNumberOfParameters()); const FixedImageType::RegionType region = fixedImage->GetLargestPossibleRegion(); - FixedImageType::SizeType size = region.GetSize(); - FixedImageType::SpacingType spacing = fixedImage->GetSpacing(); + FixedImageType::SizeType size = region.GetSize(); + FixedImageType::SpacingType spacing = fixedImage->GetSpacing(); optimizerScales[0] = 1.0 / 0.1; // make angle move slowly optimizerScales[1] = 10000.0; // prevent the center from moving @@ -257,14 +257,14 @@ main(int argc, char * argv[]) using ParametersType = RegistrationType::ParametersType; ParametersType finalParameters = registration->GetLastTransformParameters(); - const double finalAngle = finalParameters[0]; - const double finalRotationCenterX = finalParameters[1]; - const double finalRotationCenterY = finalParameters[2]; - const double finalTranslationX = finalParameters[3]; - const double finalTranslationY = finalParameters[4]; + const double finalAngle = finalParameters[0]; + const double finalRotationCenterX = finalParameters[1]; + const double finalRotationCenterY = finalParameters[2]; + const double finalTranslationX = finalParameters[3]; + const double finalTranslationY = finalParameters[4]; const unsigned int numberOfIterations = optimizer->GetCurrentIteration(); - const double bestValue = optimizer->GetValue(); + const double bestValue = optimizer->GetValue(); // Print out results const double finalAngleInDegrees = finalAngle * 180.0 / itk::Math::pi; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration3.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration3.cxx index adb32974572..2b9fee16068 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration3.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration3.cxx @@ -249,8 +249,8 @@ main(int argc, char * argv[]) using MetricType = itk::MeanSquaresImageToImageMetric; - const TransformType::Pointer transform = TransformType::New(); - const OptimizerType::Pointer optimizer = OptimizerType::New(); + const TransformType::Pointer transform = TransformType::New(); + const OptimizerType::Pointer optimizer = OptimizerType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); const RegistrationType::Pointer registration = RegistrationType::New(); @@ -265,7 +265,7 @@ main(int argc, char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); @@ -441,7 +441,7 @@ main(int argc, char * argv[]) using WriterType = itk::ImageFileWriter; - const WriterType::Pointer writer = WriterType::New(); + const WriterType::Pointer writer = WriterType::New(); const CastFilterType::Pointer caster = CastFilterType::New(); diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration4.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration4.cxx index a882d87f287..c64f66565db 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration4.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration4.cxx @@ -140,8 +140,8 @@ main(int argc, char * argv[]) using MetricType = itk::MattesMutualInformationImageToImageMetric; - const TransformType::Pointer transform = TransformType::New(); - const OptimizerType::Pointer optimizer = OptimizerType::New(); + const TransformType::Pointer transform = TransformType::New(); + const OptimizerType::Pointer optimizer = OptimizerType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); const RegistrationType::Pointer registration = RegistrationType::New(); @@ -218,7 +218,7 @@ main(int argc, char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); @@ -363,7 +363,7 @@ main(int argc, char * argv[]) using WriterType = itk::ImageFileWriter; - const WriterType::Pointer writer = WriterType::New(); + const WriterType::Pointer writer = WriterType::New(); const CastFilterType::Pointer caster = CastFilterType::New(); writer->SetFileName(argv[3]); diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration5.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration5.cxx index 31e94f7a8d1..579a65b038d 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration5.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration5.cxx @@ -143,8 +143,8 @@ main(int argc, char * argv[]) using InterpolatorType = itk::LinearInterpolateImageFunction; using RegistrationType = itk::ImageRegistrationMethod; - const MetricType::Pointer metric = MetricType::New(); - const OptimizerType::Pointer optimizer = OptimizerType::New(); + const MetricType::Pointer metric = MetricType::New(); + const OptimizerType::Pointer optimizer = OptimizerType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); const RegistrationType::Pointer registration = RegistrationType::New(); @@ -169,7 +169,7 @@ main(int argc, char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); @@ -209,9 +209,9 @@ main(int argc, char * argv[]) const FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); const SpacingType fixedSpacing = fixedImage->GetSpacing(); - const OriginType fixedOrigin = fixedImage->GetOrigin(); - const RegionType fixedRegion = fixedImage->GetLargestPossibleRegion(); - const SizeType fixedSize = fixedRegion.GetSize(); + const OriginType fixedOrigin = fixedImage->GetOrigin(); + const RegionType fixedRegion = fixedImage->GetLargestPossibleRegion(); + const SizeType fixedSize = fixedRegion.GetSize(); TransformType::InputPointType centerFixed; @@ -226,9 +226,9 @@ main(int argc, char * argv[]) const MovingImageType::Pointer movingImage = movingImageReader->GetOutput(); const SpacingType movingSpacing = movingImage->GetSpacing(); - const OriginType movingOrigin = movingImage->GetOrigin(); - const RegionType movingRegion = movingImage->GetLargestPossibleRegion(); - const SizeType movingSize = movingRegion.GetSize(); + const OriginType movingOrigin = movingImage->GetOrigin(); + const RegionType movingRegion = movingImage->GetLargestPossibleRegion(); + const SizeType movingSize = movingRegion.GetSize(); TransformType::InputPointType centerMoving; @@ -276,7 +276,7 @@ main(int argc, char * argv[]) using OptimizerScalesType = OptimizerType::ScalesType; OptimizerScalesType optimizerScales(transform->GetNumberOfParameters()); - constexpr double translationScale = 1.0 / 1000.0; + constexpr double translationScale = 1.0 / 1000.0; optimizerScales[0] = 1.0; optimizerScales[1] = translationScale; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration6.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration6.cxx index 33106a91cb2..6880b1cb2d0 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration6.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration6.cxx @@ -165,8 +165,8 @@ main(int argc, char * argv[]) using InterpolatorType = itk::LinearInterpolateImageFunction; using RegistrationType = itk::ImageRegistrationMethod; - const MetricType::Pointer metric = MetricType::New(); - const OptimizerType::Pointer optimizer = OptimizerType::New(); + const MetricType::Pointer metric = MetricType::New(); + const OptimizerType::Pointer optimizer = OptimizerType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); const RegistrationType::Pointer registration = RegistrationType::New(); @@ -192,7 +192,7 @@ main(int argc, char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); @@ -274,7 +274,7 @@ main(int argc, char * argv[]) using OptimizerScalesType = OptimizerType::ScalesType; OptimizerScalesType optimizerScales(transform->GetNumberOfParameters()); - constexpr double translationScale = 1.0 / 1000.0; + constexpr double translationScale = 1.0 / 1000.0; optimizerScales[0] = 1.0; optimizerScales[1] = translationScale; @@ -317,7 +317,7 @@ main(int argc, char * argv[]) const double finalTranslationY = finalParameters[4]; const unsigned int numberOfIterations = optimizer->GetCurrentIteration(); - const double bestValue = optimizer->GetValue(); + const double bestValue = optimizer->GetValue(); // Print out results // @@ -522,7 +522,7 @@ main(int argc, char * argv[]) using WriterType = itk::ImageFileWriter; - const WriterType::Pointer writer = WriterType::New(); + const WriterType::Pointer writer = WriterType::New(); const CastFilterType::Pointer caster = CastFilterType::New(); diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration7.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration7.cxx index 82101f61912..bf786e38654 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration7.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration7.cxx @@ -156,8 +156,8 @@ main(int argc, char * argv[]) using InterpolatorType = itk::LinearInterpolateImageFunction; using RegistrationType = itk::ImageRegistrationMethod; - const MetricType::Pointer metric = MetricType::New(); - const OptimizerType::Pointer optimizer = OptimizerType::New(); + const MetricType::Pointer metric = MetricType::New(); + const OptimizerType::Pointer optimizer = OptimizerType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); const RegistrationType::Pointer registration = RegistrationType::New(); @@ -182,7 +182,7 @@ main(int argc, char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); @@ -266,7 +266,7 @@ main(int argc, char * argv[]) using OptimizerScalesType = OptimizerType::ScalesType; OptimizerScalesType optimizerScales(transform->GetNumberOfParameters()); - constexpr double translationScale = 1.0 / 100.0; + constexpr double translationScale = 1.0 / 100.0; optimizerScales[0] = 10.0; optimizerScales[1] = 1.0; @@ -461,7 +461,7 @@ main(int argc, char * argv[]) using WriterType = itk::ImageFileWriter; - const WriterType::Pointer writer = WriterType::New(); + const WriterType::Pointer writer = WriterType::New(); const CastFilterType::Pointer caster = CastFilterType::New(); diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration8.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration8.cxx index e73e136fdff..5a414e3b5e6 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration8.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration8.cxx @@ -156,8 +156,8 @@ main(int argc, char * argv[]) using InterpolatorType = itk::LinearInterpolateImageFunction; using RegistrationType = itk::ImageRegistrationMethod; - const MetricType::Pointer metric = MetricType::New(); - const OptimizerType::Pointer optimizer = OptimizerType::New(); + const MetricType::Pointer metric = MetricType::New(); + const OptimizerType::Pointer optimizer = OptimizerType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); const RegistrationType::Pointer registration = RegistrationType::New(); @@ -178,7 +178,7 @@ main(int argc, char * argv[]) registration->SetTransform(transform); using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); movingImageReader->SetFileName(argv[2]); @@ -257,7 +257,7 @@ main(int argc, char * argv[]) registration->SetInitialTransformParameters(transform->GetParameters()); using OptimizerScalesType = OptimizerType::ScalesType; OptimizerScalesType optimizerScales(transform->GetNumberOfParameters()); - constexpr double translationScale = 1.0 / 1000.0; + constexpr double translationScale = 1.0 / 1000.0; optimizerScales[0] = 1.0; optimizerScales[1] = 1.0; optimizerScales[2] = 1.0; @@ -288,14 +288,14 @@ main(int argc, char * argv[]) } OptimizerType::ParametersType finalParameters = registration->GetLastTransformParameters(); - const double versorX = finalParameters[0]; - const double versorY = finalParameters[1]; - const double versorZ = finalParameters[2]; - const double finalTranslationX = finalParameters[3]; - const double finalTranslationY = finalParameters[4]; - const double finalTranslationZ = finalParameters[5]; + const double versorX = finalParameters[0]; + const double versorY = finalParameters[1]; + const double versorZ = finalParameters[2]; + const double finalTranslationX = finalParameters[3]; + const double finalTranslationY = finalParameters[4]; + const double finalTranslationZ = finalParameters[5]; const unsigned int numberOfIterations = optimizer->GetCurrentIteration(); - const double bestValue = optimizer->GetValue(); + const double bestValue = optimizer->GetValue(); // Print out results // @@ -474,7 +474,7 @@ main(int argc, char * argv[]) using CastFilterType = itk::CastImageFilter; using WriterType = itk::ImageFileWriter; - const WriterType::Pointer writer = WriterType::New(); + const WriterType::Pointer writer = WriterType::New(); const CastFilterType::Pointer caster = CastFilterType::New(); writer->SetFileName(argv[3]); @@ -528,8 +528,8 @@ main(int argc, char * argv[]) extractor->InPlaceOn(); const FixedImageType::RegionType inputRegion = fixedImage->GetLargestPossibleRegion(); - FixedImageType::SizeType size = inputRegion.GetSize(); - FixedImageType::IndexType start = inputRegion.GetIndex(); + FixedImageType::SizeType size = inputRegion.GetSize(); + FixedImageType::IndexType start = inputRegion.GetIndex(); // Select one slice as output size[2] = 0; start[2] = 90; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration9.cxx b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration9.cxx index 7042b77e3ea..375de96d7e0 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration9.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/ImageRegistration9.cxx @@ -104,7 +104,7 @@ class CommandIterationUpdate : public itk::Command p[0][1] = static_cast(optimizer->GetCurrentPosition()[1]); p[1][0] = static_cast(optimizer->GetCurrentPosition()[2]); p[1][1] = static_cast(optimizer->GetCurrentPosition()[3]); - vnl_svd svd(p); + vnl_svd svd(p); vnl_matrix r(2, 2); r = svd.U() * vnl_transpose(svd.V()); const double angle = std::asin(r[1][0]); @@ -157,8 +157,8 @@ main(int argc, char * argv[]) using InterpolatorType = itk::LinearInterpolateImageFunction; using RegistrationType = itk::ImageRegistrationMethod; - const MetricType::Pointer metric = MetricType::New(); - const OptimizerType::Pointer optimizer = OptimizerType::New(); + const MetricType::Pointer metric = MetricType::New(); + const OptimizerType::Pointer optimizer = OptimizerType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); const RegistrationType::Pointer registration = RegistrationType::New(); @@ -182,7 +182,7 @@ main(int argc, char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(argv[1]); movingImageReader->SetFileName(argv[2]); @@ -337,7 +337,7 @@ main(int argc, char * argv[]) const double finalTranslationY = finalParameters[5]; const unsigned int numberOfIterations = optimizer->GetCurrentIteration(); - const double bestValue = optimizer->GetValue(); + const double bestValue = optimizer->GetValue(); // Print out results @@ -359,7 +359,7 @@ main(int argc, char * argv[]) p[0][1] = static_cast(finalParameters[1]); p[1][0] = static_cast(finalParameters[2]); p[1][1] = static_cast(finalParameters[3]); - vnl_svd svd(p); + vnl_svd svd(p); vnl_matrix r(2, 2); r = svd.U() * vnl_transpose(svd.V()); const double angle = std::asin(r[1][0]); @@ -491,7 +491,7 @@ main(int argc, char * argv[]) using WriterType = itk::ImageFileWriter; - const WriterType::Pointer writer = WriterType::New(); + const WriterType::Pointer writer = WriterType::New(); const CastFilterType::Pointer caster = CastFilterType::New(); diff --git a/Modules/Registration/Common/test/RegistrationITKv3/MultiResImageRegistration1.cxx b/Modules/Registration/Common/test/RegistrationITKv3/MultiResImageRegistration1.cxx index 7f612dfb135..ad5a9e52223 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/MultiResImageRegistration1.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/MultiResImageRegistration1.cxx @@ -266,12 +266,12 @@ main(int argc, const char * argv[]) const std::string fixedImageFile = argv[1]; const std::string movingImageFile = argv[2]; const std::string outImagefile = argv[3]; - const PixelType backgroundGrayLevel = (argc > 4) ? std::stoi(argv[4]) : 100; + const PixelType backgroundGrayLevel = (argc > 4) ? std::stoi(argv[4]) : 100; const std::string checkerBoardBefore = (argc > 5) ? argv[5] : ""; const std::string checkerBoardAfter = (argc > 6) ? argv[6] : ""; - const bool useExplicitPDFderivatives = (argc > 7) ? static_cast(std::stoi(argv[7])) : false; - const int numberOfBins = (argc > 8) ? std::stoi(argv[8]) : 0; - const int numberOfSamples = (argc > 9) ? std::stoi(argv[9]) : 0; + const bool useExplicitPDFderivatives = (argc > 7) ? static_cast(std::stoi(argv[7])) : false; + const int numberOfBins = (argc > 8) ? std::stoi(argv[8]) : 0; + const int numberOfSamples = (argc > 9) ? std::stoi(argv[9]) : 0; using FixedImageType = itk::Image; using MovingImageType = itk::Image; @@ -314,13 +314,13 @@ main(int argc, const char * argv[]) // All the components are instantiated using their \code{New()} method // and connected to the registration object as in previous example. // - const TransformType::Pointer transform = TransformType::New(); - const OptimizerType::Pointer optimizer = OptimizerType::New(); + const TransformType::Pointer transform = TransformType::New(); + const OptimizerType::Pointer optimizer = OptimizerType::New(); const InterpolatorType::Pointer interpolator = InterpolatorType::New(); const RegistrationType::Pointer registration = RegistrationType::New(); - const MetricType::Pointer metric = MetricType::New(); + const MetricType::Pointer metric = MetricType::New(); - const FixedImagePyramidType::Pointer fixedImagePyramid = FixedImagePyramidType::New(); + const FixedImagePyramidType::Pointer fixedImagePyramid = FixedImagePyramidType::New(); const MovingImagePyramidType::Pointer movingImagePyramid = MovingImagePyramidType::New(); registration->SetOptimizer(optimizer); @@ -334,7 +334,7 @@ main(int argc, const char * argv[]) using FixedImageReaderType = itk::ImageFileReader; using MovingImageReaderType = itk::ImageFileReader; - const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); + const FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); const MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName(fixedImageFile); @@ -349,7 +349,7 @@ main(int argc, const char * argv[]) using FixedCastFilterType = itk::CastImageFilter; using MovingCastFilterType = itk::CastImageFilter; - const FixedCastFilterType::Pointer fixedCaster = FixedCastFilterType::New(); + const FixedCastFilterType::Pointer fixedCaster = FixedCastFilterType::New(); const MovingCastFilterType::Pointer movingCaster = MovingCastFilterType::New(); // @@ -549,7 +549,7 @@ main(int argc, const char * argv[]) using WriterType = itk::ImageFileWriter; - const WriterType::Pointer writer = WriterType::New(); + const WriterType::Pointer writer = WriterType::New(); const CastFilterType::Pointer caster = CastFilterType::New(); diff --git a/Modules/Registration/Common/test/itkBSplineExponentialDiffeomorphicTransformParametersAdaptorTest.cxx b/Modules/Registration/Common/test/itkBSplineExponentialDiffeomorphicTransformParametersAdaptorTest.cxx index 18bd5de1704..94bc0dfeaa0 100644 --- a/Modules/Registration/Common/test/itkBSplineExponentialDiffeomorphicTransformParametersAdaptorTest.cxx +++ b/Modules/Registration/Common/test/itkBSplineExponentialDiffeomorphicTransformParametersAdaptorTest.cxx @@ -68,11 +68,11 @@ itkBSplineExponentialDiffeomorphicTransformParametersAdaptorTest(int, char *[]) transform->SetConstantVelocityField(displacementField); transform->IntegrateVelocityField(); - auto point = itk::MakeFilled(50.0); + auto point = itk::MakeFilled(50.0); const TransformType::OutputPointType outputPointBeforeAdapt = transform->TransformPoint(point); const SpacingType spacingBefore = transform->GetConstantVelocityField()->GetSpacing(); - const SizeType sizeBefore = transform->GetConstantVelocityField()->GetLargestPossibleRegion().GetSize(); + const SizeType sizeBefore = transform->GetConstantVelocityField()->GetLargestPossibleRegion().GetSize(); /** * Instantiate the adaptor @@ -82,7 +82,7 @@ itkBSplineExponentialDiffeomorphicTransformParametersAdaptorTest(int, char *[]) std::cout << "Instantiate adaptor." << std::endl; - auto requiredSpacing = itk::MakeFilled(0.6); + auto requiredSpacing = itk::MakeFilled(0.6); SizeType requiredSize; for (unsigned int d = 0; d < SpaceDimension; ++d) { @@ -117,7 +117,7 @@ itkBSplineExponentialDiffeomorphicTransformParametersAdaptorTest(int, char *[]) const SpacingType spacingAfter = transform->GetConstantVelocityField()->GetSpacing(); - const SizeType sizeAfter = transform->GetConstantVelocityField()->GetLargestPossibleRegion().GetSize(); + const SizeType sizeAfter = transform->GetConstantVelocityField()->GetLargestPossibleRegion().GetSize(); std::cout << "Spacing: " << spacingBefore << "(before), " << spacingAfter << "(after)." << std::endl; std::cout << "Size: " << sizeBefore << "(before), " << sizeAfter << "(after)." << std::endl; diff --git a/Modules/Registration/Common/test/itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest.cxx b/Modules/Registration/Common/test/itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest.cxx index aac2ef7afad..48bf3bae52c 100644 --- a/Modules/Registration/Common/test/itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest.cxx +++ b/Modules/Registration/Common/test/itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest.cxx @@ -68,11 +68,11 @@ itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest(int, auto transform = TransformType::New(); transform->SetDisplacementField(displacementField); - auto point = itk::MakeFilled(50.0); + auto point = itk::MakeFilled(50.0); const TransformType::OutputPointType outputPointBeforeAdapt = transform->TransformPoint(point); const SpacingType spacingBefore = transform->GetDisplacementField()->GetSpacing(); - const SizeType sizeBefore = transform->GetDisplacementField()->GetLargestPossibleRegion().GetSize(); + const SizeType sizeBefore = transform->GetDisplacementField()->GetLargestPossibleRegion().GetSize(); /** * Instantiate the adaptor @@ -82,7 +82,7 @@ itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest(int, std::cout << "Instantiate adaptor." << std::endl; - auto requiredSpacing = itk::MakeFilled(0.6); + auto requiredSpacing = itk::MakeFilled(0.6); SizeType requiredSize; for (unsigned int d = 0; d < SpaceDimension; ++d) { @@ -123,7 +123,7 @@ itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest(int, const SpacingType spacingAfter = transform->GetDisplacementField()->GetSpacing(); - const SizeType sizeAfter = transform->GetDisplacementField()->GetLargestPossibleRegion().GetSize(); + const SizeType sizeAfter = transform->GetDisplacementField()->GetLargestPossibleRegion().GetSize(); std::cout << "Spacing: " << spacingBefore << "(before), " << spacingAfter << "(after)." << std::endl; std::cout << "Size: " << sizeBefore << "(before), " << sizeAfter << "(after)." << std::endl; diff --git a/Modules/Registration/Common/test/itkBSplineTransformParametersAdaptorTest.cxx b/Modules/Registration/Common/test/itkBSplineTransformParametersAdaptorTest.cxx index a777d7ca330..32ad25ccb4e 100644 --- a/Modules/Registration/Common/test/itkBSplineTransformParametersAdaptorTest.cxx +++ b/Modules/Registration/Common/test/itkBSplineTransformParametersAdaptorTest.cxx @@ -58,7 +58,7 @@ itkBSplineTransformParametersAdaptorTest(int, char *[]) */ using ParametersType = TransformType::ParametersType; const unsigned long numberOfParameters = transform->GetNumberOfParameters(); - ParametersType parameters(numberOfParameters); + ParametersType parameters(numberOfParameters); parameters.Fill(ParametersType::ValueType{}); /** diff --git a/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx b/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx index f27fe6035ed..eb888a21676 100644 --- a/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx +++ b/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx @@ -103,7 +103,7 @@ itkBlockMatchingImageFilterTest(int argc, char * argv[]) // Create transformed image from input to match with using TranslationTransformType = itk::TranslationTransform; - auto transform = TranslationTransformType::New(); + auto transform = TranslationTransformType::New(); TranslationTransformType::OutputVectorType translation; // move each pixel in input image 5 pixels along first(0) dimension translation[0] = 20.0; @@ -171,9 +171,9 @@ itkBlockMatchingImageFilterTest(int argc, char * argv[]) using PointIteratorType = PointSetType::PointsContainer::ConstIterator; using PointDataIteratorType = BlockMatchingFilterType::DisplacementsType::PointDataContainer::ConstIterator; - PointIteratorType pointItr = featureSelectionFilter->GetOutput()->GetPoints()->Begin(); + PointIteratorType pointItr = featureSelectionFilter->GetOutput()->GetPoints()->Begin(); const PointIteratorType pointEnd = featureSelectionFilter->GetOutput()->GetPoints()->End(); - PointDataIteratorType displItr = displacements->GetPointData()->Begin(); + PointDataIteratorType displItr = displacements->GetPointData()->Begin(); // define colors OutputPixelType red; diff --git a/Modules/Registration/Common/test/itkCenteredTransformInitializerTest.cxx b/Modules/Registration/Common/test/itkCenteredTransformInitializerTest.cxx index 8ffa7d3885f..8f45f0c664d 100644 --- a/Modules/Registration/Common/test/itkCenteredTransformInitializerTest.cxx +++ b/Modules/Registration/Common/test/itkCenteredTransformInitializerTest.cxx @@ -46,9 +46,9 @@ RunTest(itk::SmartPointer fixedImage, itk::SmartPointer; const typename FixedImageType::RegionType & fixedRegion = fixedImage->GetLargestPossibleRegion(); - const typename FixedImageType::SizeType & fixedSize = fixedRegion.GetSize(); - const typename FixedImageType::IndexType & fixedIndex = fixedRegion.GetIndex(); - ContinuousIndexType fixedCenterIndex; + const typename FixedImageType::SizeType & fixedSize = fixedRegion.GetSize(); + const typename FixedImageType::IndexType & fixedIndex = fixedRegion.GetIndex(); + ContinuousIndexType fixedCenterIndex; for (unsigned int i = 0; i < Dimension; ++i) { assert(0 < fixedSize[i]); @@ -57,9 +57,9 @@ RunTest(itk::SmartPointer fixedImage, itk::SmartPointerTransformContinuousIndexToPhysicalPoint(fixedCenterIndex, fixedCenter); const typename MovingImageType::RegionType & movingRegion = movingImage->GetLargestPossibleRegion(); - const typename MovingImageType::SizeType & movingSize = movingRegion.GetSize(); - const typename MovingImageType::IndexType & movingIndex = movingRegion.GetIndex(); - ContinuousIndexType movingCenterIndex; + const typename MovingImageType::SizeType & movingSize = movingRegion.GetSize(); + const typename MovingImageType::IndexType & movingIndex = movingRegion.GetIndex(); + ContinuousIndexType movingCenterIndex; for (unsigned int i = 0; i < Dimension; ++i) { assert(0 < movingSize[i]); @@ -88,10 +88,10 @@ RunTest(itk::SmartPointer fixedImage, itk::SmartPointerPrint( std::cout ); - const TransformType::InputPointType & center1 = transform->GetCenter(); + const TransformType::InputPointType & center1 = transform->GetCenter(); const TransformType::OutputVectorType & translation1 = transform->GetTranslation(); - const TransformType::OffsetType & offset1 = transform->GetOffset(); - constexpr double tolerance = 1e-3; + const TransformType::OffsetType & offset1 = transform->GetOffset(); + constexpr double tolerance = 1e-3; // Verfications for the Geometry Mode for (unsigned int k = 0; k < Dimension; ++k) @@ -130,9 +130,9 @@ RunTest(itk::SmartPointer fixedImage, itk::SmartPointerPrint( std::cout ); - const TransformType::InputPointType & center2 = transform->GetCenter(); + const TransformType::InputPointType & center2 = transform->GetCenter(); const TransformType::OutputVectorType & translation2 = transform->GetTranslation(); - const TransformType::OffsetType & offset2 = transform->GetOffset(); + const TransformType::OffsetType & offset2 = transform->GetOffset(); // Verfications for the Moments Mode for (unsigned int k = 0; k < Dimension; ++k) @@ -180,12 +180,12 @@ PopulateImage(itk::SmartPointer image) using IndexType = typename ImageType::IndexType; const RegionType & region = image->GetLargestPossibleRegion(); - const SizeType & size = region.GetSize(); - const IndexType & index = region.GetIndex(); + const SizeType & size = region.GetSize(); + const IndexType & index = region.GetIndex(); RegionType internalRegion; - SizeType internalSize; - IndexType internalIndex; + SizeType internalSize; + IndexType internalIndex; constexpr unsigned int border = 20; diff --git a/Modules/Registration/Common/test/itkCenteredVersorTransformInitializerTest.cxx b/Modules/Registration/Common/test/itkCenteredVersorTransformInitializerTest.cxx index df2168bf58c..a99befb47d9 100644 --- a/Modules/Registration/Common/test/itkCenteredVersorTransformInitializerTest.cxx +++ b/Modules/Registration/Common/test/itkCenteredVersorTransformInitializerTest.cxx @@ -97,8 +97,8 @@ itkCenteredVersorTransformInitializerTest(int, char *[]) movingImage->FillBuffer(0); RegionType internalRegion; - SizeType internalSize; - IndexType internalIndex; + SizeType internalSize; + IndexType internalIndex; internalIndex[0] = index[0] + 20; internalIndex[1] = index[1] + 30; @@ -164,7 +164,7 @@ itkCenteredVersorTransformInitializerTest(int, char *[]) initializer->InitializeTransform(); TransformType::OutputVectorType translation2 = transform->GetTranslation(); - TransformType::OffsetType offset2 = transform->GetOffset(); + TransformType::OffsetType offset2 = transform->GetOffset(); { // Verfications TransformType::InputPointType fixedCenter; diff --git a/Modules/Registration/Common/test/itkCompareHistogramImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkCompareHistogramImageToImageMetricTest.cxx index 29d0d39a98e..3b5793bee70 100644 --- a/Modules/Registration/Common/test/itkCompareHistogramImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkCompareHistogramImageToImageMetricTest.cxx @@ -43,13 +43,13 @@ itkCompareHistogramImageToImageMetricTest(int, char *[]) using FixedImageSourceType = itk::GaussianImageSource; // Note: the following declarations are classical arrays - FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; + FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; MovingImageType::SizeValueType movingImageSize[] = { 100, 100 }; - FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; + FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; MovingImageType::SpacingValueType movingImageSpacing[] = { 1.0f, 1.0f }; - constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; + constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; constexpr MovingImageType::PointValueType movingImageOrigin[] = { 0.0f, 0.0f }; auto movingImageSource = MovingImageSourceType::New(); @@ -71,7 +71,7 @@ itkCompareHistogramImageToImageMetricTest(int, char *[]) ITK_TRY_EXPECT_NO_EXCEPTION(fixedImageSource->Update()); // Force the filter to run const MovingImageType::Pointer movingImage = movingImageSource->GetOutput(); - const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); + const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); // Set up the metric. using MetricType = itk::KullbackLeiblerCompareHistogramImageToImageMetric; @@ -89,7 +89,7 @@ itkCompareHistogramImageToImageMetricTest(int, char *[]) metric->SetEpsilon(epsilon); ITK_TEST_SET_GET_VALUE(epsilon, metric->GetEpsilon()); - constexpr unsigned int nBins = 256; + constexpr unsigned int nBins = 256; MetricType::HistogramType::SizeType histSize; histSize.SetSize(2); @@ -159,7 +159,7 @@ itkCompareHistogramImageToImageMetricTest(int, char *[]) // Print out metric value and derivative. const MetricType::MeasureType measure = metric->GetValue(parameters); - MetricType::DerivativeType derivative; + MetricType::DerivativeType derivative; metric->GetDerivative(parameters, derivative); std::cout << "Metric value = " << measure << std::endl << "Derivative = " << derivative << std::endl; diff --git a/Modules/Registration/Common/test/itkCorrelationCoefficientHistogramImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkCorrelationCoefficientHistogramImageToImageMetricTest.cxx index d707967a56b..b66691fa4cf 100644 --- a/Modules/Registration/Common/test/itkCorrelationCoefficientHistogramImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkCorrelationCoefficientHistogramImageToImageMetricTest.cxx @@ -43,13 +43,13 @@ itkCorrelationCoefficientHistogramImageToImageMetricTest(int, char *[]) using FixedImageSourceType = itk::GaussianImageSource; // Note: the following declarations are classical arrays - FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; + FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; MovingImageType::SizeValueType movingImageSize[] = { 100, 100 }; - FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; + FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; MovingImageType::SpacingValueType movingImageSpacing[] = { 1.0f, 1.0f }; - constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; + constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; constexpr MovingImageType::PointValueType movingImageOrigin[] = { 0.0f, 0.0f }; auto movingImageSource = MovingImageSourceType::New(); @@ -71,7 +71,7 @@ itkCorrelationCoefficientHistogramImageToImageMetricTest(int, char *[]) fixedImageSource->Update(); // Force the filter to run const MovingImageType::Pointer movingImage = movingImageSource->GetOutput(); - const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); + const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); // Set up the metric. using MetricType = itk::CorrelationCoefficientHistogramImageToImageMetric; @@ -81,7 +81,7 @@ itkCorrelationCoefficientHistogramImageToImageMetricTest(int, char *[]) auto metric = MetricType::New(); - constexpr unsigned int nBins = 256; + constexpr unsigned int nBins = 256; MetricType::HistogramType::SizeType histSize; histSize.SetSize(2); histSize[0] = nBins; @@ -131,7 +131,7 @@ itkCorrelationCoefficientHistogramImageToImageMetricTest(int, char *[]) // Print out metric value and derivative. const MetricType::MeasureType measure = metric->GetValue(parameters); - MetricType::DerivativeType derivative; + MetricType::DerivativeType derivative; metric->GetDerivative(parameters, derivative); std::cout << "Metric value = " << measure << std::endl << "Derivative = " << derivative << std::endl; diff --git a/Modules/Registration/Common/test/itkDisplacementFieldTransformParametersAdaptorTest.cxx b/Modules/Registration/Common/test/itkDisplacementFieldTransformParametersAdaptorTest.cxx index 0bdc0504ee9..720cd5bb8a2 100644 --- a/Modules/Registration/Common/test/itkDisplacementFieldTransformParametersAdaptorTest.cxx +++ b/Modules/Registration/Common/test/itkDisplacementFieldTransformParametersAdaptorTest.cxx @@ -66,11 +66,11 @@ itkDisplacementFieldTransformParametersAdaptorTest(int, char *[]) auto transform = TransformType::New(); transform->SetDisplacementField(displacementField); - auto point = itk::MakeFilled(50.0); + auto point = itk::MakeFilled(50.0); const TransformType::OutputPointType outputPointBeforeAdapt = transform->TransformPoint(point); const SpacingType spacingBefore = transform->GetDisplacementField()->GetSpacing(); - const SizeType sizeBefore = transform->GetDisplacementField()->GetLargestPossibleRegion().GetSize(); + const SizeType sizeBefore = transform->GetDisplacementField()->GetLargestPossibleRegion().GetSize(); /** * Instantiate the adaptor @@ -80,7 +80,7 @@ itkDisplacementFieldTransformParametersAdaptorTest(int, char *[]) std::cout << "Instantiate adaptor." << std::endl; - auto requiredSpacing = itk::MakeFilled(0.6); + auto requiredSpacing = itk::MakeFilled(0.6); SizeType requiredSize; for (unsigned int d = 0; d < SpaceDimension; ++d) { @@ -105,7 +105,7 @@ itkDisplacementFieldTransformParametersAdaptorTest(int, char *[]) } const SpacingType spacingAfter = transform->GetDisplacementField()->GetSpacing(); - const SizeType sizeAfter = transform->GetDisplacementField()->GetLargestPossibleRegion().GetSize(); + const SizeType sizeAfter = transform->GetDisplacementField()->GetLargestPossibleRegion().GetSize(); std::cout << "Spacing: " << spacingBefore << "(before), " << spacingAfter << "(after)." << std::endl; std::cout << "Size: " << sizeBefore << "(before), " << sizeAfter << "(after)." << std::endl; diff --git a/Modules/Registration/Common/test/itkGaussianExponentialDiffeomorphicTransformParametersAdaptorTest.cxx b/Modules/Registration/Common/test/itkGaussianExponentialDiffeomorphicTransformParametersAdaptorTest.cxx index dbcffc9a84f..bf00a08788e 100644 --- a/Modules/Registration/Common/test/itkGaussianExponentialDiffeomorphicTransformParametersAdaptorTest.cxx +++ b/Modules/Registration/Common/test/itkGaussianExponentialDiffeomorphicTransformParametersAdaptorTest.cxx @@ -69,11 +69,11 @@ itkGaussianExponentialDiffeomorphicTransformParametersAdaptorTest(int, char *[]) transform->SetConstantVelocityField(displacementField); transform->IntegrateVelocityField(); - auto point = itk::MakeFilled(50.0); + auto point = itk::MakeFilled(50.0); const TransformType::OutputPointType outputPointBeforeAdapt = transform->TransformPoint(point); const SpacingType spacingBefore = transform->GetConstantVelocityField()->GetSpacing(); - const SizeType sizeBefore = transform->GetConstantVelocityField()->GetLargestPossibleRegion().GetSize(); + const SizeType sizeBefore = transform->GetConstantVelocityField()->GetLargestPossibleRegion().GetSize(); /** * Instantiate the adaptor @@ -83,7 +83,7 @@ itkGaussianExponentialDiffeomorphicTransformParametersAdaptorTest(int, char *[]) std::cout << "Instantiate adaptor." << std::endl; - auto requiredSpacing = itk::MakeFilled(0.6); + auto requiredSpacing = itk::MakeFilled(0.6); SizeType requiredSize; for (unsigned int d = 0; d < SpaceDimension; ++d) { @@ -115,7 +115,7 @@ itkGaussianExponentialDiffeomorphicTransformParametersAdaptorTest(int, char *[]) const SpacingType spacingAfter = transform->GetConstantVelocityField()->GetSpacing(); - const SizeType sizeAfter = transform->GetConstantVelocityField()->GetLargestPossibleRegion().GetSize(); + const SizeType sizeAfter = transform->GetConstantVelocityField()->GetLargestPossibleRegion().GetSize(); std::cout << "Spacing: " << spacingBefore << "(before), " << spacingAfter << "(after)." << std::endl; std::cout << "Size: " << sizeBefore << "(before), " << sizeAfter << "(after)." << std::endl; diff --git a/Modules/Registration/Common/test/itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest.cxx b/Modules/Registration/Common/test/itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest.cxx index ffd96dad00f..cfafa536de9 100644 --- a/Modules/Registration/Common/test/itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest.cxx +++ b/Modules/Registration/Common/test/itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest.cxx @@ -68,11 +68,11 @@ itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest(int, auto transform = TransformType::New(); transform->SetDisplacementField(displacementField); - auto point = itk::MakeFilled(50.0); + auto point = itk::MakeFilled(50.0); const TransformType::OutputPointType outputPointBeforeAdapt = transform->TransformPoint(point); const SpacingType spacingBefore = transform->GetDisplacementField()->GetSpacing(); - const SizeType sizeBefore = transform->GetDisplacementField()->GetLargestPossibleRegion().GetSize(); + const SizeType sizeBefore = transform->GetDisplacementField()->GetLargestPossibleRegion().GetSize(); /** * Instantiate the adaptor @@ -82,7 +82,7 @@ itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest(int, std::cout << "Instantiate adaptor." << std::endl; - auto requiredSpacing = itk::MakeFilled(0.6); + auto requiredSpacing = itk::MakeFilled(0.6); SizeType requiredSize; for (unsigned int d = 0; d < SpaceDimension; ++d) { @@ -110,7 +110,7 @@ itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest(int, const SpacingType spacingAfter = transform->GetDisplacementField()->GetSpacing(); - const SizeType sizeAfter = transform->GetDisplacementField()->GetLargestPossibleRegion().GetSize(); + const SizeType sizeAfter = transform->GetDisplacementField()->GetLargestPossibleRegion().GetSize(); std::cout << "Spacing: " << spacingBefore << "(before), " << spacingAfter << "(after)." << std::endl; std::cout << "Size: " << sizeBefore << "(before), " << sizeAfter << "(after)." << std::endl; diff --git a/Modules/Registration/Common/test/itkGradientDifferenceImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkGradientDifferenceImageToImageMetricTest.cxx index 45ce9e02d70..4b850492644 100644 --- a/Modules/Registration/Common/test/itkGradientDifferenceImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkGradientDifferenceImageToImageMetricTest.cxx @@ -39,13 +39,13 @@ itkGradientDifferenceImageToImageMetricTest(int, char *[]) using FixedImageSourceType = itk::GaussianImageSource; // Note: the following declarations are classical arrays - FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; + FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; MovingImageType::SizeValueType movingImageSize[] = { 100, 100 }; - FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; + FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; MovingImageType::SpacingValueType movingImageSpacing[] = { 1.0f, 1.0f }; - constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; + constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; constexpr MovingImageType::PointValueType movingImageOrigin[] = { 0.0f, 0.0f }; auto movingImageSource = MovingImageSourceType::New(); @@ -67,7 +67,7 @@ itkGradientDifferenceImageToImageMetricTest(int, char *[]) fixedImageSource->Update(); // Force the filter to run const MovingImageType::Pointer movingImage = movingImageSource->GetOutput(); - const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); + const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); // Set up the metric. using MetricType = itk::GradientDifferenceImageToImageMetric; @@ -121,7 +121,7 @@ itkGradientDifferenceImageToImageMetricTest(int, char *[]) metric->Initialize(); // Do some work - DerivativeType derivatives(numberOfParameters); + DerivativeType derivatives(numberOfParameters); MetricType::MeasureType value; for (double y = -10.0; y <= 10.0; y += 5.0) { diff --git a/Modules/Registration/Common/test/itkHistogramImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkHistogramImageToImageMetricTest.cxx index fea9dd07ea4..418656b1674 100644 --- a/Modules/Registration/Common/test/itkHistogramImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkHistogramImageToImageMetricTest.cxx @@ -39,13 +39,13 @@ itkHistogramImageToImageMetricTest(int, char *[]) using FixedImageSourceType = itk::GaussianImageSource; // Note: the following declarations are classical arrays - FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; + FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; MovingImageType::SizeValueType movingImageSize[] = { 100, 100 }; - FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; + FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; MovingImageType::SpacingValueType movingImageSpacing[] = { 1.0f, 1.0f }; - constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; + constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; constexpr MovingImageType::PointValueType movingImageOrigin[] = { 0.0f, 0.0f }; auto movingImageSource = MovingImageSourceType::New(); @@ -67,7 +67,7 @@ itkHistogramImageToImageMetricTest(int, char *[]) fixedImageSource->Update(); // Force the filter to run const MovingImageType::Pointer movingImage = movingImageSource->GetOutput(); - const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); + const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); // Set up the metric. using MetricType = itk::MeanSquaresHistogramImageToImageMetric; @@ -78,7 +78,7 @@ itkHistogramImageToImageMetricTest(int, char *[]) auto metric = MetricType::New(); - constexpr unsigned int nBins = 256; + constexpr unsigned int nBins = 256; MetricType::HistogramType::SizeType histSize; histSize.SetSize(2); histSize[0] = nBins; @@ -162,7 +162,7 @@ itkHistogramImageToImageMetricTest(int, char *[]) } // Do some work - DerivativeType derivatives(numberOfParameters); + DerivativeType derivatives(numberOfParameters); MetricType::MeasureType value; for (double y = -50.0; y <= 50.0; y += 25.0) { @@ -218,8 +218,8 @@ itkHistogramImageToImageMetricTest(int, char *[]) try { const ParametersType parameters2(2); - DerivativeType derivatives2(2); - const ScalesType badScales(1); + DerivativeType derivatives2(2); + const ScalesType badScales(1); metric->SetDerivativeStepLengthScales(badScales); metric->Initialize(); metric->GetDerivative(parameters2, derivatives2); diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_1.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_1.cxx index 971debbd775..b439086e919 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_1.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_1.cxx @@ -88,7 +88,7 @@ itkImageRegistrationMethodTest_1(int argc, char * argv[]) imageSource->GenerateImages(size); - const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); + const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); const MovingImageType::ConstPointer movingImage = imageSource->GetMovingImage(); // @@ -116,8 +116,8 @@ itkImageRegistrationMethodTest_1(int argc, char * argv[]) unsigned long numberOfIterations = 100; - double translationScale = 1e-6; - double learningRate = 1e-8; + double translationScale = 1e-6; + double learningRate = 1e-8; if (argc > 1) { diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_10.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_10.cxx index c0ddbb2b2c8..89880523431 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_10.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_10.cxx @@ -83,7 +83,7 @@ itkImageRegistrationMethodTest_10(int argc, char * argv[]) imageSource->GenerateImages(size); - const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); + const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); const MovingImageType::ConstPointer movingImage = imageSource->GetMovingImage(); // @@ -111,10 +111,10 @@ itkImageRegistrationMethodTest_10(int argc, char * argv[]) unsigned long numberOfIterations = 100; - double translationScale = 1e-6; - double maximumStepLength = 10.0; // no step will be larger than this - double minimumStepLength = 0.1; // convergence criterion - double gradientTolerance = 0.01; // convergence criterion + double translationScale = 1e-6; + double maximumStepLength = 10.0; // no step will be larger than this + double minimumStepLength = 0.1; // convergence criterion + double gradientTolerance = 0.01; // convergence criterion if (argc > 1) { @@ -179,7 +179,7 @@ itkImageRegistrationMethodTest_10(int argc, char * argv[]) // We know that for the Affine transform the Translation parameters are at // the end of the list of parameters. const unsigned int offsetOrder = finalParameters.Size() - actualParameters.Size(); - constexpr double tolerance = 1.0; // equivalent to 1 pixel. + constexpr double tolerance = 1.0; // equivalent to 1 pixel. for (unsigned int i = 0; i < numbeOfParameters; ++i) { diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_11.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_11.cxx index 3be75a77af1..e5fd8dd8429 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_11.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_11.cxx @@ -117,11 +117,11 @@ itkImageRegistrationMethodTest_11(int, char *[]) // // Now verify that they can be set to nullptr // - const MetricType::Pointer metric3 = nullptr; - const TransformType::Pointer transform3 = nullptr; - const OptimizerType::Pointer optimizer3 = nullptr; - const FixedImageType::Pointer fixedImage3 = nullptr; - const MovingImageType::Pointer movingImage3 = nullptr; + const MetricType::Pointer metric3 = nullptr; + const TransformType::Pointer transform3 = nullptr; + const OptimizerType::Pointer optimizer3 = nullptr; + const FixedImageType::Pointer fixedImage3 = nullptr; + const MovingImageType::Pointer movingImage3 = nullptr; const InterpolatorType::Pointer interpolator3 = nullptr; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_12.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_12.cxx index 3958d6c48de..3e0a2431d73 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_12.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_12.cxx @@ -84,7 +84,7 @@ itkImageRegistrationMethodTest_12(int argc, char * argv[]) imageSource->GenerateImages(size); - const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); + const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); const MovingImageType::ConstPointer movingImage = imageSource->GetMovingImage(); // @@ -112,10 +112,10 @@ itkImageRegistrationMethodTest_12(int argc, char * argv[]) unsigned long numberOfIterations = 100; - double translationScale = 1e-6; - double maximumStepLength = 10.0; // no step will be larger than this - double minimumStepLength = 0.1; // convergence criterion - double gradientTolerance = 0.01; // convergence criterion + double translationScale = 1e-6; + double maximumStepLength = 10.0; // no step will be larger than this + double minimumStepLength = 0.1; // convergence criterion + double gradientTolerance = 0.01; // convergence criterion if (argc > 1) { diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_13.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_13.cxx index b2390ea6379..b4596481a9b 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_13.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_13.cxx @@ -99,7 +99,7 @@ itkImageRegistrationMethodTest_13(int, char *[]) bool pass = true; constexpr unsigned int dimension = 3; - unsigned int j; + unsigned int j; using PixelType = float; @@ -140,9 +140,9 @@ itkImageRegistrationMethodTest_13(int, char *[]) constexpr double displacement[dimension] = { 7, 3, 2 }; constexpr double scale[dimension] = { 0.80, 1.0, 1.0 }; - FixedImageType::SizeType size = { { 100, 100, 40 } }; + FixedImageType::SizeType size = { { 100, 100, 40 } }; constexpr FixedImageType::IndexType index = { { 0, 0, 0 } }; - const FixedImageType::RegionType region{ index, size }; + const FixedImageType::RegionType region{ index, size }; fixedImage->SetRegions(region); fixedImage->Allocate(); @@ -160,11 +160,11 @@ itkImageRegistrationMethodTest_13(int, char *[]) center[j] = 0.5 * static_cast(region.GetSize()[j]); } - itk::Point p; + itk::Point p; itk::Vector d; MovingImageIterator mIter(movingImage, region); - FixedImageIterator fIter(fixedImage, region); + FixedImageIterator fIter(fixedImage, region); while (!mIter.IsAtEnd()) { @@ -254,7 +254,7 @@ itkImageRegistrationMethodTest_13(int, char *[]) ************************************************************/ constexpr unsigned int numberOfLoops = 3; constexpr unsigned int iter[numberOfLoops] = { 300, 300, 350 }; - constexpr double rates[numberOfLoops] = { 1e-3, 5e-4, 1e-4 }; + constexpr double rates[numberOfLoops] = { 1e-3, 5e-4, 1e-4 }; for (j = 0; j < numberOfLoops; ++j) { @@ -389,11 +389,11 @@ namespace double F(itk::Vector & v) { - double x = v[0]; - double y = v[1]; - double z = v[2]; + double x = v[0]; + double y = v[1]; + double z = v[2]; constexpr double s = 50; - double value = 200.0 * std::exp(-(x * x + y * y + z * z) / (s * s)); + double value = 200.0 * std::exp(-(x * x + y * y + z * z) / (s * s)); x -= 8; y += 3; z += 0; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_14.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_14.cxx index 057921bd25e..2ae011e8643 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_14.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_14.cxx @@ -146,9 +146,9 @@ itkImageRegistrationMethodTest_14(int, char *[]) constexpr double displacement[dimension] = { 7, 3, 2 }; constexpr double angle = 10.0 / 180.0 * itk::Math::pi; - FixedImageType::SizeType size = { { 100, 100, 40 } }; + FixedImageType::SizeType size = { { 100, 100, 40 } }; constexpr FixedImageType::IndexType index = { { 0, 0, 0 } }; - const FixedImageType::RegionType region{ index, size }; + const FixedImageType::RegionType region{ index, size }; fixedImage->SetRegions(region); fixedImage->Allocate(); @@ -166,7 +166,7 @@ itkImageRegistrationMethodTest_14(int, char *[]) } MovingImageIterator mIter(movingImage, region); - FixedImageIterator fIter(fixedImage, region); + FixedImageIterator fIter(fixedImage, region); while (!mIter.IsAtEnd()) { @@ -263,7 +263,7 @@ itkImageRegistrationMethodTest_14(int, char *[]) ************************************************************/ constexpr unsigned int numberOfLoops = 3; constexpr unsigned int iter[numberOfLoops] = { 300, 300, 350 }; - constexpr double rates[numberOfLoops] = { 1e-3, 5e-4, 1e-4 }; + constexpr double rates[numberOfLoops] = { 1e-3, 5e-4, 1e-4 }; for (unsigned int j = 0; j < numberOfLoops; ++j) { @@ -397,11 +397,11 @@ namespace double F(itk::Vector & v) { - double x = v[0]; - double y = v[1]; - double z = v[2]; + double x = v[0]; + double y = v[1]; + double z = v[2]; constexpr double s = 50; - double value = 200.0 * std::exp(-(x * x + y * y + z * z) / (s * s)); + double value = 200.0 * std::exp(-(x * x + y * y + z * z) / (s * s)); x -= 8; y += 3; z += 0; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_15.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_15.cxx index 3da2187e975..f9022d1b810 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_15.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_15.cxx @@ -82,7 +82,7 @@ itkImageRegistrationMethodTest_15(int, char *[]) bool pass = true; constexpr unsigned int dimension = 3; - unsigned int j; + unsigned int j; using PixelType = float; @@ -123,8 +123,8 @@ itkImageRegistrationMethodTest_15(int, char *[]) constexpr double displacement[dimension] = { 3, 1, 1 }; constexpr double scale[dimension] = { 0.90, 1.0, 1.0 }; - FixedImageType::SizeType size = { { 100, 100, 40 } }; - FixedImageType::IndexType index = { { 0, 0, 0 } }; + FixedImageType::SizeType size = { { 100, 100, 40 } }; + FixedImageType::IndexType index = { { 0, 0, 0 } }; FixedImageType::RegionType region{ index, size }; fixedImage->SetRegions(region); @@ -143,11 +143,11 @@ itkImageRegistrationMethodTest_15(int, char *[]) center[j] = 0.5 * static_cast(region.GetSize()[j]); } - itk::Point p; + itk::Point p; itk::Vector d; MovingImageIterator mIter(movingImage, region); - FixedImageIterator fIter(fixedImage, region); + FixedImageIterator fIter(fixedImage, region); while (!mIter.IsAtEnd()) { @@ -252,7 +252,7 @@ itkImageRegistrationMethodTest_15(int, char *[]) ************************************************************/ constexpr unsigned int numberOfLoops = 2; constexpr unsigned int iter[numberOfLoops] = { 50, 0 }; - constexpr double rates[numberOfLoops] = { 1e-3, 5e-4 }; + constexpr double rates[numberOfLoops] = { 1e-3, 5e-4 }; for (j = 0; j < numberOfLoops; ++j) @@ -332,11 +332,11 @@ namespace double F(itk::Vector & v) { - double x = v[0]; - double y = v[1]; - double z = v[2]; + double x = v[0]; + double y = v[1]; + double z = v[2]; constexpr double s = 50; - double value = 200.0 * std::exp(-(x * x + y * y + z * z) / (s * s)); + double value = 200.0 * std::exp(-(x * x + y * y + z * z) / (s * s)); x -= 8; y += 3; z += 0; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_16.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_16.cxx index fd031e84d41..c57cd154bfb 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_16.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_16.cxx @@ -91,7 +91,7 @@ DoRegistration() imageSource->GenerateImages(size); - const typename FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); + const typename FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); const typename MovingImageType::ConstPointer movingImage = imageSource->GetMovingImage(); // @@ -119,8 +119,8 @@ DoRegistration() constexpr unsigned long numberOfIterations = 100; - constexpr double translationScale = 1e-6; - constexpr double learningRate = 1e-8; + constexpr double translationScale = 1e-6; + constexpr double learningRate = 1e-8; for (unsigned int i = 0; i < dimension; ++i) { @@ -157,7 +157,7 @@ DoRegistration() // We know that for the Affine transform the Translation parameters are at // the end of the list of parameters. const unsigned int offsetOrder = finalParameters.Size() - actualParameters.Size(); - constexpr double tolerance = 1.0; // equivalent to 1 pixel. + constexpr double tolerance = 1.0; // equivalent to 1 pixel. for (unsigned int i = 0; i < numbeOfParameters; ++i) { diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_17.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_17.cxx index 9fbb75b86fc..e68db28c2b9 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_17.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_17.cxx @@ -88,7 +88,7 @@ itkImageRegistrationMethodTest_17(int, char *[]) bool pass = true; constexpr unsigned int dimension = 3; - unsigned int j; + unsigned int j; using PixelType = float; @@ -129,8 +129,8 @@ itkImageRegistrationMethodTest_17(int, char *[]) constexpr double displacement[dimension] = { 3, 1, 1 }; constexpr double scale[dimension] = { 0.90, 1.0, 1.0 }; - FixedImageType::SizeType size = { { 100, 100, 40 } }; - FixedImageType::IndexType index = { { 0, 0, 0 } }; + FixedImageType::SizeType size = { { 100, 100, 40 } }; + FixedImageType::IndexType index = { { 0, 0, 0 } }; FixedImageType::RegionType region{ index, size }; fixedImage->SetRegions(region); @@ -149,11 +149,11 @@ itkImageRegistrationMethodTest_17(int, char *[]) center[j] = 0.5 * static_cast(region.GetSize()[j]); } - itk::Point p; + itk::Point p; itk::Vector d; MovingImageIterator mIter(movingImage, region); - FixedImageIterator fIter(fixedImage, region); + FixedImageIterator fIter(fixedImage, region); while (!mIter.IsAtEnd()) { @@ -260,7 +260,7 @@ itkImageRegistrationMethodTest_17(int, char *[]) ************************************************************/ constexpr unsigned int numberOfLoops = 2; constexpr unsigned int iter[numberOfLoops] = { 50, 0 }; - constexpr double rates[numberOfLoops] = { 1e-3, 5e-4 }; + constexpr double rates[numberOfLoops] = { 1e-3, 5e-4 }; for (j = 0; j < numberOfLoops; ++j) @@ -340,11 +340,11 @@ namespace double F(itk::Vector & v) { - double x = v[0]; - double y = v[1]; - double z = v[2]; + double x = v[0]; + double y = v[1]; + double z = v[2]; constexpr double s = 50; - double value = 200.0 * std::exp(-(x * x + y * y + z * z) / (s * s)); + double value = 200.0 * std::exp(-(x * x + y * y + z * z) / (s * s)); x -= 8; y += 3; z += 0; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_2.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_2.cxx index 8120bade60e..92c396ec173 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_2.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_2.cxx @@ -83,7 +83,7 @@ itkImageRegistrationMethodTest_2(int argc, char * argv[]) imageSource->GenerateImages(size); - const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); + const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); const MovingImageType::ConstPointer movingImage = imageSource->GetMovingImage(); // @@ -111,10 +111,10 @@ itkImageRegistrationMethodTest_2(int argc, char * argv[]) unsigned long numberOfIterations = 100; - double translationScale = 1e-6; - double maximumStepLength = 10.0; // no step will be larger than this - double minimumStepLength = 0.1; // convergence criterion - double gradientTolerance = 0.01; // convergence criterion + double translationScale = 1e-6; + double maximumStepLength = 10.0; // no step will be larger than this + double minimumStepLength = 0.1; // convergence criterion + double gradientTolerance = 0.01; // convergence criterion if (argc > 1) { @@ -179,7 +179,7 @@ itkImageRegistrationMethodTest_2(int argc, char * argv[]) // We know that for the Affine transform the Translation parameters are at // the end of the list of parameters. const unsigned int offsetOrder = finalParameters.Size() - actualParameters.Size(); - constexpr double tolerance = 1.0; // equivalent to 1 pixel. + constexpr double tolerance = 1.0; // equivalent to 1 pixel. for (unsigned int i = 0; i < numbeOfParameters; ++i) { diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_3.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_3.cxx index 5a9bc997581..e6d6ec5587b 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_3.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_3.cxx @@ -84,7 +84,7 @@ itkImageRegistrationMethodTest_3(int argc, char * argv[]) imageSource->GenerateImages(size); - const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); + const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); const MovingImageType::ConstPointer movingImage = imageSource->GetMovingImage(); // @@ -114,8 +114,8 @@ itkImageRegistrationMethodTest_3(int argc, char * argv[]) unsigned long numberOfIterations = 50; - double translationScale = 1.0; - double learningRate = 1e-2; + double translationScale = 1.0; + double learningRate = 1e-2; if (argc > 1) { diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_4.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_4.cxx index ea04de89b10..886c1ac607a 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_4.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_4.cxx @@ -84,7 +84,7 @@ itkImageRegistrationMethodTest_4(int argc, char * argv[]) imageSource->GenerateImages(size); - const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); + const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); const MovingImageType::ConstPointer movingImage = imageSource->GetMovingImage(); // @@ -112,10 +112,10 @@ itkImageRegistrationMethodTest_4(int argc, char * argv[]) unsigned long numberOfIterations = 50; - double translationScale = 1.0; - double maximumStepLength = 10.0; // no step will be larger than this - double minimumStepLength = 0.1; // convergence criterion - double gradientTolerance = 0.01; // convergence criterion + double translationScale = 1.0; + double maximumStepLength = 10.0; // no step will be larger than this + double minimumStepLength = 0.1; // convergence criterion + double gradientTolerance = 0.01; // convergence criterion if (argc > 1) { diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_5.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_5.cxx index ae109dadfb3..f5bb74dffd5 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_5.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_5.cxx @@ -83,7 +83,7 @@ itkImageRegistrationMethodTest_5_Func(int argc, char * argv[], bool subtractMean imageSource->GenerateImages(size); - const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); + const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); const MovingImageType::ConstPointer movingImage = imageSource->GetMovingImage(); // @@ -114,8 +114,8 @@ itkImageRegistrationMethodTest_5_Func(int argc, char * argv[], bool subtractMean unsigned long numberOfIterations = 20; - double translationScale = 1e-7; - double learningRate = 1e-4; + double translationScale = 1e-7; + double learningRate = 1e-4; if (subtractMean) { @@ -175,7 +175,7 @@ itkImageRegistrationMethodTest_5_Func(int argc, char * argv[], bool subtractMean // We know that for the Affine transform the Translation parameters are at // the end of the list of parameters. const unsigned int offsetOrder = finalParameters.Size() - actualParameters.Size(); - constexpr double tolerance = 1.0; // equivalent to 1 pixel. + constexpr double tolerance = 1.0; // equivalent to 1 pixel. for (unsigned int i = 0; i < numbeOfParameters; ++i) { diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_6.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_6.cxx index c205fd26568..78a2e6be1f5 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_6.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_6.cxx @@ -83,7 +83,7 @@ itkImageRegistrationMethodTest_6(int argc, char * argv[]) imageSource->GenerateImages(size); - const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); + const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); const MovingImageType::ConstPointer movingImage = imageSource->GetMovingImage(); // @@ -111,10 +111,10 @@ itkImageRegistrationMethodTest_6(int argc, char * argv[]) unsigned long numberOfIterations = 30; - double translationScale = 1e-8; - double maximumStepLength = 30.0; // no step will be larger than this - double minimumStepLength = 0.01; // convergence criterion - double gradientTolerance = 0.01; // convergence criterion + double translationScale = 1e-8; + double maximumStepLength = 30.0; // no step will be larger than this + double minimumStepLength = 0.01; // convergence criterion + double gradientTolerance = 0.01; // convergence criterion if (argc > 1) { @@ -178,7 +178,7 @@ itkImageRegistrationMethodTest_6(int argc, char * argv[]) // We know that for the Affine transform the Translation parameters are at // the end of the list of parameters. const unsigned int offsetOrder = finalParameters.Size() - actualParameters.Size(); - constexpr double tolerance = 1.0; // equivalent to 1 pixel. + constexpr double tolerance = 1.0; // equivalent to 1 pixel. for (unsigned int i = 0; i < numbeOfParameters; ++i) { diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_7.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_7.cxx index c972c63226e..6ee67318edb 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_7.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_7.cxx @@ -84,7 +84,7 @@ itkImageRegistrationMethodTest_7(int argc, char * argv[]) imageSource->GenerateImages(size); - const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); + const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); const MovingImageType::ConstPointer movingImage = imageSource->GetMovingImage(); // @@ -112,8 +112,8 @@ itkImageRegistrationMethodTest_7(int argc, char * argv[]) unsigned long numberOfIterations = 20; - double translationScale = 1e-7; - double learningRate = 1e-4; + double translationScale = 1e-7; + double learningRate = 1e-4; if (argc > 1) { diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_8.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_8.cxx index a8d0c928b2d..2ddcf4dd691 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_8.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_8.cxx @@ -84,7 +84,7 @@ itkImageRegistrationMethodTest_8(int argc, char * argv[]) imageSource->GenerateImages(size); - const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); + const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); const MovingImageType::ConstPointer movingImage = imageSource->GetMovingImage(); // @@ -112,10 +112,10 @@ itkImageRegistrationMethodTest_8(int argc, char * argv[]) unsigned long numberOfIterations = 30; - double translationScale = 1e-8; - double maximumStepLength = 30.0; // no step will be larger than this - double minimumStepLength = 0.01; // convergence criterion - double gradientTolerance = 0.01; // convergence criterion + double translationScale = 1e-8; + double maximumStepLength = 30.0; // no step will be larger than this + double minimumStepLength = 0.01; // convergence criterion + double gradientTolerance = 0.01; // convergence criterion if (argc > 1) { diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_9.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_9.cxx index e213c29f952..29930c94695 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_9.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_9.cxx @@ -85,7 +85,7 @@ itkImageRegistrationMethodTest_9(int argc, char * argv[]) imageSource->GenerateImages(size); - const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); + const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); const MovingImageType::ConstPointer movingImage = imageSource->GetMovingImage(); // @@ -154,7 +154,7 @@ itkImageRegistrationMethodTest_9(int argc, char * argv[]) constexpr double G_Tolerance = 1e-4; // Gradient magnitude tolerance constexpr double X_Tolerance = 1e-8; // Search space tolerance constexpr double Epsilon_Function = 1e-10; // Step - constexpr int Max_Iterations = 100; // Maximum number of iterations + constexpr int Max_Iterations = 100; // Maximum number of iterations vnlOptimizer->set_f_tolerance(F_Tolerance); vnlOptimizer->set_g_tolerance(G_Tolerance); diff --git a/Modules/Registration/Common/test/itkImageToSpatialObjectRegistrationTest.cxx b/Modules/Registration/Common/test/itkImageToSpatialObjectRegistrationTest.cxx index 43526242978..3f40111547b 100644 --- a/Modules/Registration/Common/test/itkImageToSpatialObjectRegistrationTest.cxx +++ b/Modules/Registration/Common/test/itkImageToSpatialObjectRegistrationTest.cxx @@ -174,7 +174,7 @@ class SimpleImageToSpatialObjectMetric : public ImageToSpatialObjectMetricm_Transform->TransformPoint(*it); - Index<2> index = this->m_FixedImage->TransformPhysicalPointToIndex(transformedPoint); + Index<2> index = this->m_FixedImage->TransformPhysicalPointToIndex(transformedPoint); if (index[0] > 0L && index[1] > 0L && index[0] < static_cast(this->m_FixedImage->GetLargestPossibleRegion().GetSize()[0]) && index[1] < static_cast(this->m_FixedImage->GetLargestPossibleRegion().GetSize()[1])) @@ -189,8 +189,8 @@ class SimpleImageToSpatialObjectMetric : public ImageToSpatialObjectMetricGetValue(parameters); this->GetDerivative(parameters, Derivative); diff --git a/Modules/Registration/Common/test/itkKappaStatisticImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkKappaStatisticImageToImageMetricTest.cxx index e78b2565c81..39319d8d4cb 100644 --- a/Modules/Registration/Common/test/itkKappaStatisticImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkKappaStatisticImageToImageMetricTest.cxx @@ -143,7 +143,7 @@ itkKappaStatisticImageToImageMetricTest(int, char *[]) // // The value 0.620753 was computed by hand for these two images - double expectedMatchMeasure = 0.620753; + double expectedMatchMeasure = 0.620753; MetricType::MeasureType value = metric->GetValue(parameters); if (!itk::Math::FloatAlmostEqual(static_cast(value), expectedMatchMeasure, 10, epsilon)) { diff --git a/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx index 42651d49f59..86d0540158b 100644 --- a/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx @@ -52,9 +52,9 @@ itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char *[]) ImageDimension = MovingImageType::ImageDimension }; - constexpr MovingImageType::SizeType size = { { 16, 16 } }; + constexpr MovingImageType::SizeType size = { { 16, 16 } }; constexpr MovingImageType::IndexType index = { { 0, 0 } }; - const MovingImageType::RegionType region{ index, size }; + const MovingImageType::RegionType region{ index, size }; auto imgMoving = MovingImageType::New(); imgMoving->SetRegions(region); @@ -82,11 +82,11 @@ itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char *[]) center[0] = static_cast(region.GetSize()[0]) / 2.0; center[1] = static_cast(region.GetSize()[1]) / 2.0; - const double s = static_cast(region.GetSize()[0]) / 2.0; + const double s = static_cast(region.GetSize()[0]) / 2.0; constexpr double mag = 200.0; constexpr double noisemag = 0.0; // ended up yielding best results - itk::Point p; + itk::Point p; itk::Vector d; // Set the displacement @@ -94,10 +94,10 @@ itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char *[]) displacement[0] = 5; displacement[1] = 0; - ReferenceIteratorType ri(imgMoving, region); - TargetIteratorType ti(imgFixed, region); + ReferenceIteratorType ri(imgMoving, region); + TargetIteratorType ti(imgFixed, region); TrainingReferenceIteratorType gri(imgTrainingMoving, region); - TrainingTargetIteratorType gti(imgTrainingFixed, region); + TrainingTargetIteratorType gti(imgTrainingFixed, region); ri.GoToBegin(); while (!ri.IsAtEnd()) @@ -196,7 +196,7 @@ itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char *[]) // set the number of samples to use // metric->SetNumberOfSpatialSamples( 100 ); - constexpr unsigned int nBins = 64; + constexpr unsigned int nBins = 64; MetricType::HistogramType::SizeType histSize; histSize.SetSize(2); histSize[0] = nBins; @@ -234,7 +234,7 @@ itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char *[]) // Set up an affine transform parameters //------------------------------------------------------------ const unsigned int numberOfParameters = transformer->GetNumberOfParameters(); - ParametersType parameters(numberOfParameters); + ParametersType parameters(numberOfParameters); // set the parameters to the identity unsigned long count = 0; @@ -265,7 +265,7 @@ itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char *[]) // for parameters[4] = {-10,10} //--------------------------------------------------------- - MetricType::MeasureType measure; + MetricType::MeasureType measure; MetricType::DerivativeType derivative(numberOfParameters); itk::TimeProbesCollectorBase collector; diff --git a/Modules/Registration/Common/test/itkLandmarkBasedTransformInitializerTest.cxx b/Modules/Registration/Common/test/itkLandmarkBasedTransformInitializerTest.cxx index ce9705943e3..7134837afef 100644 --- a/Modules/Registration/Common/test/itkLandmarkBasedTransformInitializerTest.cxx +++ b/Modules/Registration/Common/test/itkLandmarkBasedTransformInitializerTest.cxx @@ -31,8 +31,8 @@ CreateTestImage() auto image = FixedImageType::New(); typename FixedImageType::RegionType fRegion; - typename FixedImageType::SizeType fSize; - typename FixedImageType::IndexType fIndex; + typename FixedImageType::SizeType fSize; + typename FixedImageType::IndexType fIndex; fSize.Fill(30); // size 30 x 30 x 30 fIndex.Fill(0); fRegion.SetSize(fSize); @@ -49,7 +49,7 @@ template void Init3DPoints(typename TTransformInitializer::LandmarkPointContainer & fixedLandmarks, typename TTransformInitializer::LandmarkPointContainer & movingLandmarks, - int scaleFactor) + int scaleFactor) { const double nPI = 4.0 * std::atan(1.0); @@ -139,10 +139,10 @@ Init3DPoints(typename TTransformInitializer::LandmarkPointContainer & fixedLandm template bool -ExecuteAndExamine(typename TransformInitializerType::Pointer initializer, +ExecuteAndExamine(typename TransformInitializerType::Pointer initializer, typename TransformInitializerType::LandmarkPointContainer fixedLandmarks, typename TransformInitializerType::LandmarkPointContainer movingLandmarks, - unsigned int failLimit = 0) + unsigned int failLimit = 0) { const typename TransformInitializerType::TransformType::Pointer transform = TransformInitializerType::TransformType::New(); @@ -160,9 +160,9 @@ ExecuteAndExamine(typename TransformInitializerType::Pointer init auto mitr = movingLandmarks.begin(); using OutputVectorType = typename TransformInitializerType::OutputVectorType; - OutputVectorType error; + OutputVectorType error; const typename OutputVectorType::RealValueType tolerance = 0.1; - unsigned int failed = 0; + unsigned int failed = 0; while (mitr != movingLandmarks.end()) { @@ -249,7 +249,7 @@ itkLandmarkBasedTransformInitializerTest(int, char *[]) using FixedImageType = itk::Image; using MovingImageType = itk::Image; - const FixedImageType::Pointer fixedImage = CreateTestImage(); + const FixedImageType::Pointer fixedImage = CreateTestImage(); const MovingImageType::Pointer movingImage = CreateTestImage(); // Set the transform type @@ -265,8 +265,8 @@ itkLandmarkBasedTransformInitializerTest(int, char *[]) // Set fixed and moving landmarks TransformInitializerType::LandmarkPointContainer fixedLandmarks; TransformInitializerType::LandmarkPointContainer movingLandmarks; - TransformInitializerType::LandmarkPointType point; - TransformInitializerType::LandmarkPointType tmp; + TransformInitializerType::LandmarkPointType point; + TransformInitializerType::LandmarkPointType tmp; // Moving Landmarks = Fixed Landmarks rotated by 'angle' degrees and then // translated by the 'translation'. Offset can be used to move the fixed @@ -349,7 +349,7 @@ itkLandmarkBasedTransformInitializerTest(int, char *[]) ITK_TRY_EXPECT_EXCEPTION(initializer->InitializeTransform()); constexpr unsigned int numLandmarks(8); - constexpr double fixedLandMarkInit[numLandmarks][3] = { + constexpr double fixedLandMarkInit[numLandmarks][3] = { { -1.33671, -279.739, 176.001 }, { 28.0989, -346.692, 183.367 }, { -1.36713, -257.43, 155.36 }, @@ -374,7 +374,7 @@ itkLandmarkBasedTransformInitializerTest(int, char *[]) { // First Test with working Landmarks // These landmark should match properly - constexpr unsigned int numWorkingLandmark = 6; + constexpr unsigned int numWorkingLandmark = 6; TransformInitializerType::LandmarkPointContainer fixedLandmarks; fixedLandmarks.reserve(numWorkingLandmark); TransformInitializerType::LandmarkPointContainer movingLandmarks; @@ -406,7 +406,7 @@ itkLandmarkBasedTransformInitializerTest(int, char *[]) { // Test with dummy points // dummy points should not matched based on given weights - constexpr unsigned int numDummyLandmark = 8; + constexpr unsigned int numDummyLandmark = 8; TransformInitializerType::LandmarkPointContainer fixedLandmarks; fixedLandmarks.reserve(numDummyLandmark); TransformInitializerType::LandmarkPointContainer movingLandmarks; @@ -443,7 +443,7 @@ itkLandmarkBasedTransformInitializerTest(int, char *[]) using FixedImageType = itk::Image; using MovingImageType = itk::Image; - const FixedImageType::Pointer fixedImage = CreateTestImage(); + const FixedImageType::Pointer fixedImage = CreateTestImage(); const MovingImageType::Pointer movingImage = CreateTestImage(); auto origin = itk::MakeFilled(-5); @@ -465,7 +465,7 @@ itkLandmarkBasedTransformInitializerTest(int, char *[]) Init3DPoints(fixedLandmarks, movingLandmarks, 1); constexpr unsigned int numLandmarks = 4; - constexpr double weights[numLandmarks] = { 1, 3, 0.01, 0.5 }; + constexpr double weights[numLandmarks] = { 1, 3, 0.01, 0.5 }; TransformInitializerType::LandmarkWeightType landmarkWeights; for (const double weight : weights) diff --git a/Modules/Registration/Common/test/itkMatchCardinalityImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMatchCardinalityImageToImageMetricTest.cxx index c6b6aed04fb..392b66b0be5 100644 --- a/Modules/Registration/Common/test/itkMatchCardinalityImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMatchCardinalityImageToImageMetricTest.cxx @@ -108,7 +108,7 @@ itkMatchCardinalityImageToImageMetricTest(int argc, char * argv[]) const MetricType::ParametersType parameters = transform->GetParameters(); - MetricType::DerivativeType derivative; + MetricType::DerivativeType derivative; metric->GetDerivative(parameters, derivative); const MetricType::DerivativeType derivative1{}; diff --git a/Modules/Registration/Common/test/itkMattesMutualInformationImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMattesMutualInformationImageToImageMetricTest.cxx index ea018015467..29ae32a1013 100644 --- a/Modules/Registration/Common/test/itkMattesMutualInformationImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMattesMutualInformationImageToImageMetricTest.cxx @@ -42,9 +42,9 @@ template int TestMattesMetricWithAffineTransform(TInterpolator * interpolator, - bool useSampling, - bool useExplicitJointPDFDerivatives, - bool useCachingBSplineWeights) + bool useSampling, + bool useExplicitJointPDFDerivatives, + bool useCachingBSplineWeights) { //------------------------------------------------------------ @@ -59,8 +59,8 @@ TestMattesMetricWithAffineTransform(TInterpolator * interpolator, ImageDimension = MovingImageType::ImageDimension }; - typename MovingImageType::SizeType size = { { 100, 100 } }; - typename MovingImageType::IndexType index = { { 0, 0 } }; + typename MovingImageType::SizeType size = { { 100, 100 } }; + typename MovingImageType::IndexType index = { { 0, 0 } }; typename MovingImageType::RegionType region{ index, size }; typename MovingImageType::SpacingType imgSpacing; @@ -93,7 +93,7 @@ TestMattesMetricWithAffineTransform(TInterpolator * interpolator, const double s = static_cast(region.GetSize()[0]) / 2.0; - itk::Point p; + itk::Point p; itk::Vector d; // Set the displacement @@ -102,7 +102,7 @@ TestMattesMetricWithAffineTransform(TInterpolator * interpolator, displacement[1] = 5; ReferenceIteratorType ri(imgMoving, region); - TargetIteratorType ti(imgFixed, region); + TargetIteratorType ti(imgFixed, region); ri.GoToBegin(); while (!ri.IsAtEnd()) { @@ -154,7 +154,7 @@ TestMattesMetricWithAffineTransform(TInterpolator * interpolator, } { - int count = 0; + int count = 0; TargetIteratorType ti1(imgFixedMask, region); ti1.GoToBegin(); while (!ti1.IsAtEnd()) // Set a subset of fixed mask voxels to 1, so that requested number can be made more than @@ -301,7 +301,7 @@ TestMattesMetricWithAffineTransform(TInterpolator * interpolator, // Set up an affine transform parameters //------------------------------------------------------------ const unsigned int numberOfParameters = transformer->GetNumberOfParameters(); - ParametersType parameters(numberOfParameters); + ParametersType parameters(numberOfParameters); // set the parameters to the identity unsigned long count = 0; @@ -355,8 +355,8 @@ TestMattesMetricWithAffineTransform(TInterpolator * interpolator, parameters[4] = 0; metric->GetValueAndDerivative(parameters, measure, derivative); - ParametersType parametersPlus(numberOfParameters); - ParametersType parametersMinus(numberOfParameters); + ParametersType parametersPlus(numberOfParameters); + ParametersType parametersMinus(numberOfParameters); typename MetricType::MeasureType measurePlus; typename MetricType::MeasureType measureMinus; @@ -441,9 +441,9 @@ TestMattesMetricWithAffineTransform(TInterpolator * interpolator, template int TestMattesMetricWithBSplineTransform(TInterpolator * interpolator, - bool useSampling, - bool useExplicitJointPDFDerivatives, - bool useCachingBSplineWeights) + bool useSampling, + bool useExplicitJointPDFDerivatives, + bool useCachingBSplineWeights) { //------------------------------------------------------------ @@ -458,8 +458,8 @@ TestMattesMetricWithBSplineTransform(TInterpolator * interpolator, ImageDimension = MovingImageType::ImageDimension }; - const typename MovingImageType::SizeType size = { { 100, 100 } }; - const typename MovingImageType::IndexType index = { { 0, 0 } }; + const typename MovingImageType::SizeType size = { { 100, 100 } }; + const typename MovingImageType::IndexType index = { { 0, 0 } }; const typename MovingImageType::RegionType region{ index, size }; typename MovingImageType::SpacingType imgSpacing; @@ -492,7 +492,7 @@ TestMattesMetricWithBSplineTransform(TInterpolator * interpolator, const double s = static_cast(region.GetSize()[0]) / 2.0; - itk::Point p; + itk::Point p; itk::Vector d; // Set the displacement @@ -501,7 +501,7 @@ TestMattesMetricWithBSplineTransform(TInterpolator * interpolator, displacement[1] = 5; ReferenceIteratorType ri(imgMoving, region); - TargetIteratorType ti(imgFixed, region); + TargetIteratorType ti(imgFixed, region); ri.GoToBegin(); while (!ri.IsAtEnd()) { @@ -591,7 +591,7 @@ TestMattesMetricWithBSplineTransform(TInterpolator * interpolator, // Set up a B-spline deformable transform parameters //------------------------------------------------------------ const unsigned int numberOfParameters = transformer->GetNumberOfParameters(); - ParametersType parameters(numberOfParameters); + ParametersType parameters(numberOfParameters); parameters.Fill(0.0); //--------------------------------------------------------- @@ -600,7 +600,7 @@ TestMattesMetricWithBSplineTransform(TInterpolator * interpolator, //--------------------------------------------------------- typename MetricType::DerivativeType derivative(numberOfParameters); - const unsigned int q = numberOfParameters / 4; + const unsigned int q = numberOfParameters / 4; std::cout << "q = " << q << std::endl; std::cout << "param[q]\tMI\tMI2\tdMI/dparam[q]" << std::endl; @@ -627,8 +627,8 @@ TestMattesMetricWithBSplineTransform(TInterpolator * interpolator, typename MetricType::MeasureType measure; metric->GetValueAndDerivative(parameters, measure, derivative); } - ParametersType parametersPlus(numberOfParameters); - ParametersType parametersMinus(numberOfParameters); + ParametersType parametersPlus(numberOfParameters); + ParametersType parametersMinus(numberOfParameters); typename MetricType::MeasureType measurePlus; typename MetricType::MeasureType measureMinus; diff --git a/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferenceImageMetricTest.cxx b/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferenceImageMetricTest.cxx index a43f753d8ff..7378e4db939 100644 --- a/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferenceImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferenceImageMetricTest.cxx @@ -61,13 +61,13 @@ itkMeanReciprocalSquareDifferenceImageMetricTest(int, char *[]) using FixedImageSourceType = itk::GaussianImageSource; // Note: the following declarations are classical arrays - FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; + FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; MovingImageType::SizeValueType movingImageSize[] = { 100, 100 }; - FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; + FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; MovingImageType::SpacingValueType movingImageSpacing[] = { 1.0f, 1.0f }; - constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; + constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; constexpr MovingImageType::PointValueType movingImageOrigin[] = { 0.0f, 0.0f }; auto movingImageSource = MovingImageSourceType::New(); @@ -89,7 +89,7 @@ itkMeanReciprocalSquareDifferenceImageMetricTest(int, char *[]) fixedImageSource->Update(); // Force the filter to run const MovingImageType::Pointer movingImage = movingImageSource->GetOutput(); - const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); + const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); //----------------------------------------------------------- @@ -190,7 +190,7 @@ itkMeanReciprocalSquareDifferenceImageMetricTest(int, char *[]) // for parameters[1] = {-10,10} (arbitrary choice...) //--------------------------------------------------------- - MetricType::MeasureType measure; + MetricType::MeasureType measure; MetricType::DerivativeType derivative; std::cout << "param[1] Metric d(Metric)/d(param[1] " << std::endl; diff --git a/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx index 6acab4b31be..00c626133b3 100644 --- a/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx @@ -62,13 +62,13 @@ itkMeanReciprocalSquareDifferencePointSetToImageMetricTest(int, char *[]) using FixedImageSourceType = itk::GaussianImageSource; // Note: the following declarations are classical arrays - FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; + FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; MovingImageType::SizeValueType movingImageSize[] = { 100, 100 }; - FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; + FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; MovingImageType::SpacingValueType movingImageSpacing[] = { 1.0f, 1.0f }; - constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; + constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; constexpr MovingImageType::PointValueType movingImageOrigin[] = { 0.0f, 0.0f }; auto movingImageSource = MovingImageSourceType::New(); @@ -90,7 +90,7 @@ itkMeanReciprocalSquareDifferencePointSetToImageMetricTest(int, char *[]) fixedImageSource->Update(); // Force the filter to run const MovingImageType::Pointer movingImage = movingImageSource->GetOutput(); - const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); + const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); //----------------------------------------------------------- // Create the point set and load it with data by sampling @@ -113,7 +113,7 @@ itkMeanReciprocalSquareDifferencePointSetToImageMetricTest(int, char *[]) unsigned int counter = 0; FixedPointSetType::PointIdentifier pointId = 0; - FixedPointSetType::PointType point; + FixedPointSetType::PointType point; it.GoToBegin(); while (!it.IsAtEnd()) @@ -136,7 +136,7 @@ itkMeanReciprocalSquareDifferencePointSetToImageMetricTest(int, char *[]) } // print the points accessed via iterator - FixedPointSetType::PointsContainer::ConstIterator pointItr = fixedPointSet->GetPoints()->Begin(); + FixedPointSetType::PointsContainer::ConstIterator pointItr = fixedPointSet->GetPoints()->Begin(); const FixedPointSetType::PointsContainer::ConstIterator pointEnd = fixedPointSet->GetPoints()->End(); while (pointItr != pointEnd) { @@ -227,7 +227,7 @@ itkMeanReciprocalSquareDifferencePointSetToImageMetricTest(int, char *[]) // for parameters[1] = {-10,10} (arbitrary choice...) //--------------------------------------------------------- - MetricType::MeasureType measure; + MetricType::MeasureType measure; MetricType::DerivativeType derivative; std::cout << "param[1] Metric d(Metric)/d(param[1] " << std::endl; diff --git a/Modules/Registration/Common/test/itkMeanSquaresHistogramImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMeanSquaresHistogramImageToImageMetricTest.cxx index 156d74e5a2d..946da9784b8 100644 --- a/Modules/Registration/Common/test/itkMeanSquaresHistogramImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMeanSquaresHistogramImageToImageMetricTest.cxx @@ -44,13 +44,13 @@ itkMeanSquaresHistogramImageToImageMetricTest(int, char *[]) using FixedImageSourceType = itk::GaussianImageSource; // Note: the following declarations are classical arrays - FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; + FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; MovingImageType::SizeValueType movingImageSize[] = { 100, 100 }; - FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; + FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; MovingImageType::SpacingValueType movingImageSpacing[] = { 1.0f, 1.0f }; - constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; + constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; constexpr MovingImageType::PointValueType movingImageOrigin[] = { 0.0f, 0.0f }; auto movingImageSource = MovingImageSourceType::New(); @@ -72,7 +72,7 @@ itkMeanSquaresHistogramImageToImageMetricTest(int, char *[]) fixedImageSource->Update(); // Force the filter to run const MovingImageType::Pointer movingImage = movingImageSource->GetOutput(); - const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); + const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); // Set up the metric. using MetricType = itk::MeanSquaresHistogramImageToImageMetric; @@ -82,7 +82,7 @@ itkMeanSquaresHistogramImageToImageMetricTest(int, char *[]) auto metric = MetricType::New(); - constexpr unsigned int nBins = 256; + constexpr unsigned int nBins = 256; MetricType::HistogramType::SizeType histSize; histSize.SetSize(2); histSize[0] = nBins; @@ -134,7 +134,7 @@ itkMeanSquaresHistogramImageToImageMetricTest(int, char *[]) // Print out metric value and derivative. const MetricType::MeasureType measure = metric->GetValue(parameters); - MetricType::DerivativeType derivative; + MetricType::DerivativeType derivative; metric->GetDerivative(parameters, derivative); std::cout << "Metric value = " << measure << std::endl << "Derivative = " << derivative << std::endl; diff --git a/Modules/Registration/Common/test/itkMeanSquaresImageMetricTest.cxx b/Modules/Registration/Common/test/itkMeanSquaresImageMetricTest.cxx index 50933120c33..249e70616de 100644 --- a/Modules/Registration/Common/test/itkMeanSquaresImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMeanSquaresImageMetricTest.cxx @@ -60,13 +60,13 @@ itkMeanSquaresImageMetricTest(int, char *[]) using FixedImageSourceType = itk::GaussianImageSource; // Note: the following declarations are classical arrays - FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; + FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; MovingImageType::SizeValueType movingImageSize[] = { 100, 100 }; - FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; + FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; MovingImageType::SpacingValueType movingImageSpacing[] = { 1.0f, 1.0f }; - constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; + constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; constexpr MovingImageType::PointValueType movingImageOrigin[] = { 0.0f, 0.0f }; auto movingImageSource = MovingImageSourceType::New(); @@ -88,7 +88,7 @@ itkMeanSquaresImageMetricTest(int, char *[]) fixedImageSource->Update(); // Force the filter to run const MovingImageType::Pointer movingImage = movingImageSource->GetOutput(); - const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); + const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); //----------------------------------------------------------- @@ -174,7 +174,7 @@ itkMeanSquaresImageMetricTest(int, char *[]) // for parameters[1] = {-10,10} (arbitrary choice...) //--------------------------------------------------------- - MetricType::MeasureType measure; + MetricType::MeasureType measure; MetricType::DerivativeType derivative; std::cout << "param[1] Metric d(Metric)/d(param[1]) " << std::endl; @@ -206,7 +206,7 @@ itkMeanSquaresImageMetricTest(int, char *[]) metric->SetNumberOfWorkUnits(1); metric->Initialize(); parameters[1] = 2.0; - MetricType::DerivativeType referenceDerivative; + MetricType::DerivativeType referenceDerivative; const MetricType::MeasureType referenceMeasure = metric->GetValue(parameters); metric->GetDerivative(parameters, referenceDerivative); diff --git a/Modules/Registration/Common/test/itkMeanSquaresPointSetToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMeanSquaresPointSetToImageMetricTest.cxx index fee4dba781f..af0bcd59e62 100644 --- a/Modules/Registration/Common/test/itkMeanSquaresPointSetToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMeanSquaresPointSetToImageMetricTest.cxx @@ -61,13 +61,13 @@ itkMeanSquaresPointSetToImageMetricTest(int, char *[]) using FixedImageSourceType = itk::GaussianImageSource; // Note: the following declarations are classical arrays - FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; + FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; MovingImageType::SizeValueType movingImageSize[] = { 100, 100 }; - FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; + FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; MovingImageType::SpacingValueType movingImageSpacing[] = { 1.0f, 1.0f }; - constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; + constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; constexpr MovingImageType::PointValueType movingImageOrigin[] = { 0.0f, 0.0f }; auto movingImageSource = MovingImageSourceType::New(); @@ -89,7 +89,7 @@ itkMeanSquaresPointSetToImageMetricTest(int, char *[]) fixedImageSource->Update(); // Force the filter to run const MovingImageType::Pointer movingImage = movingImageSource->GetOutput(); - const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); + const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); //----------------------------------------------------------- // Create the point set and load it with data by sampling @@ -112,7 +112,7 @@ itkMeanSquaresPointSetToImageMetricTest(int, char *[]) unsigned int counter = 0; FixedPointSetType::PointIdentifier pointId = 0; - FixedPointSetType::PointType point; + FixedPointSetType::PointType point; it.GoToBegin(); while (!it.IsAtEnd()) @@ -135,7 +135,7 @@ itkMeanSquaresPointSetToImageMetricTest(int, char *[]) } // print the points accessed via iterator - FixedPointSetType::PointsContainer::ConstIterator pointItr = fixedPointSet->GetPoints()->Begin(); + FixedPointSetType::PointsContainer::ConstIterator pointItr = fixedPointSet->GetPoints()->Begin(); const FixedPointSetType::PointsContainer::ConstIterator pointEnd = fixedPointSet->GetPoints()->End(); while (pointItr != pointEnd) { @@ -221,7 +221,7 @@ itkMeanSquaresPointSetToImageMetricTest(int, char *[]) // for parameters[1] = {-10,10} (arbitrary choice...) //--------------------------------------------------------- - MetricType::MeasureType measure; + MetricType::MeasureType measure; MetricType::DerivativeType derivative; std::cout << "param[1] Metric d(Metric)/d(param[1] " << std::endl; diff --git a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_1.cxx b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_1.cxx index 52fcd9f85eb..4f0d4200d38 100644 --- a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_1.cxx +++ b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_1.cxx @@ -80,7 +80,7 @@ itkMultiResolutionImageRegistrationMethodTest_1(int, char *[]) bool pass = true; constexpr unsigned int dimension = 3; - unsigned int j; + unsigned int j; using PixelType = float; @@ -121,9 +121,9 @@ itkMultiResolutionImageRegistrationMethodTest_1(int, char *[]) constexpr double displacement[dimension] = { 7, 3, 2 }; constexpr double scale[dimension] = { 0.80, 1.0, 1.0 }; - FixedImageType::SizeType size = { { 100, 100, 40 } }; + FixedImageType::SizeType size = { { 100, 100, 40 } }; constexpr FixedImageType::IndexType index = { { 0, 0, 0 } }; - const FixedImageType::RegionType region{ index, size }; + const FixedImageType::RegionType region{ index, size }; fixedImage->SetRegions(region); fixedImage->Allocate(); @@ -141,11 +141,11 @@ itkMultiResolutionImageRegistrationMethodTest_1(int, char *[]) center[j] = 0.5 * static_cast(region.GetSize()[j]); } - itk::Point p; + itk::Point p; itk::Vector d; MovingImageIterator mIter(movingImage, region); - FixedImageIterator fIter(fixedImage, region); + FixedImageIterator fIter(fixedImage, region); while (!mIter.IsAtEnd()) { @@ -252,7 +252,7 @@ itkMultiResolutionImageRegistrationMethodTest_1(int, char *[]) constexpr unsigned short numberOfLevels = 3; itk::Array niter(numberOfLevels); - itk::Array rates(numberOfLevels); + itk::Array rates(numberOfLevels); niter[0] = 100; niter[1] = 300; @@ -476,7 +476,7 @@ itkMultiResolutionImageRegistrationMethodTest_1(int, char *[]) constexpr unsigned short numberOfLevels = 3; itk::Array niter(numberOfLevels); - itk::Array rates(numberOfLevels); + itk::Array rates(numberOfLevels); niter[0] = 100; niter[1] = 300; @@ -563,11 +563,11 @@ namespace double F(itk::Vector & v) { - double x = v[0]; - double y = v[1]; - double z = v[2]; + double x = v[0]; + double y = v[1]; + double z = v[2]; constexpr double s = 50; - double value = 200.0 * std::exp(-(x * x + y * y + z * z) / (s * s)); + double value = 200.0 * std::exp(-(x * x + y * y + z * z) / (s * s)); x -= 8; y += 3; z += 0; diff --git a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_2.cxx b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_2.cxx index 65dc1f019ca..8f00ae67f8a 100644 --- a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_2.cxx +++ b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_2.cxx @@ -117,9 +117,9 @@ itkMultiResolutionImageRegistrationMethodTest_2(int, char *[]) constexpr double displacement[dimension] = { 7, 3, 2 }; constexpr double angle = 10.0 / 180.0 * itk::Math::pi; - FixedImageType::SizeType size = { { 100, 100, 40 } }; + FixedImageType::SizeType size = { { 100, 100, 40 } }; constexpr FixedImageType::IndexType index = { { 0, 0, 0 } }; - const FixedImageType::RegionType region{ index, size }; + const FixedImageType::RegionType region{ index, size }; fixedImage->SetRegions(region); fixedImage->Allocate(); @@ -137,7 +137,7 @@ itkMultiResolutionImageRegistrationMethodTest_2(int, char *[]) } MovingImageIterator mIter(movingImage, region); - FixedImageIterator fIter(fixedImage, region); + FixedImageIterator fIter(fixedImage, region); while (!mIter.IsAtEnd()) { @@ -377,11 +377,11 @@ namespace double F(itk::Vector & v) { - double x = v[0]; - double y = v[1]; - double z = v[2]; + double x = v[0]; + double y = v[1]; + double z = v[2]; constexpr double s = 50; - double value = 200.0 * std::exp(-(x * x + y * y + z * z) / (s * s)); + double value = 200.0 * std::exp(-(x * x + y * y + z * z) / (s * s)); x -= 8; y += 3; z += 0; diff --git a/Modules/Registration/Common/test/itkMultiResolutionPyramidImageFilterTest.cxx b/Modules/Registration/Common/test/itkMultiResolutionPyramidImageFilterTest.cxx index 5bf83f94e9e..1b33b2c7d0b 100644 --- a/Modules/Registration/Common/test/itkMultiResolutionPyramidImageFilterTest.cxx +++ b/Modules/Registration/Common/test/itkMultiResolutionPyramidImageFilterTest.cxx @@ -33,7 +33,7 @@ double F(double x, double y, double z) { constexpr double s = 50; - double value = 200.0 * std::exp(-(x * x + y * y + z * z) / (s * s)); + double value = 200.0 * std::exp(-(x * x + y * y + z * z) / (s * s)); x -= 8; y += 3; z += 0; @@ -133,9 +133,9 @@ itkMultiResolutionPyramidImageFilterTest(int argc, char * argv[]) // When shrink factors are not divisible, this still does // a best does the best possible job. // InputImageType::SizeType size = {{101,101,41}}; - InputImageType::SizeType size = { { 128, 132, 48 } }; + InputImageType::SizeType size = { { 128, 132, 48 } }; constexpr InputImageType::IndexType index{}; - const InputImageType::RegionType region{ index, size }; + const InputImageType::RegionType region{ index, size }; InputImageType::SpacingType spacing; spacing[0] = 0.5; @@ -162,7 +162,7 @@ itkMultiResolutionPyramidImageFilterTest(int argc, char * argv[]) center[1] = static_cast(region.GetSize()[1]) / 2.0; center[2] = static_cast(region.GetSize()[2]) / 2.0; - itk::Point p; + itk::Point p; itk::Vector d; Iterator ti(imgTarget, region); @@ -212,7 +212,7 @@ itkMultiResolutionPyramidImageFilterTest(int argc, char * argv[]) pyramid->SetUseShrinkImageFilter(useShrinkFilter); pyramid->SetInput(imgTarget); - unsigned int numLevels; + unsigned int numLevels; itk::Vector factors; // set schedule by specifying the number of levels; @@ -299,7 +299,7 @@ itkMultiResolutionPyramidImageFilterTest(int argc, char * argv[]) std::cout << "Run MultiResolutionPyramidImageFilter in standalone mode with progress"; std::cout << std::endl; - ShowProgressObject progressWatch(pyramid); + ShowProgressObject progressWatch(pyramid); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); @@ -315,7 +315,7 @@ itkMultiResolutionPyramidImageFilterTest(int argc, char * argv[]) InputImageType::SizeType inputSize = pyramid->GetInput()->GetLargestPossibleRegion().GetSize(); // const InputImageType::PointType& inputOrigin = // pyramid->GetInput()->GetOrigin(); - const OutputImageType::PointType InputCenterOfMass = GetCenterOfMass(pyramid->GetInput()); + const OutputImageType::PointType InputCenterOfMass = GetCenterOfMass(pyramid->GetInput()); const InputImageType::SpacingType & inputSpacing = pyramid->GetInput()->GetSpacing(); OutputImageType::SizeType outputSize = pyramid->GetOutput(testLevel)->GetLargestPossibleRegion().GetSize(); @@ -337,8 +337,8 @@ itkMultiResolutionPyramidImageFilterTest(int argc, char * argv[]) // if( OutputCenterOfMass != InputCenterOfMass ) { const OutputImageType::PointType::VectorType ErrorCenterOfMass = OutputCenterOfMass - InputCenterOfMass; - constexpr double CenterOfMassEpsilonAllowed = 0.001; - const double ErrorPercentage = + constexpr double CenterOfMassEpsilonAllowed = 0.001; + const double ErrorPercentage = (ErrorCenterOfMass.GetNorm() / pyramid->GetOutput(testLevel)->GetSpacing().GetNorm()); if (ErrorPercentage > CenterOfMassEpsilonAllowed) { diff --git a/Modules/Registration/Common/test/itkMutualInformationHistogramImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMutualInformationHistogramImageToImageMetricTest.cxx index 262dbfd3aca..f5c665f2639 100644 --- a/Modules/Registration/Common/test/itkMutualInformationHistogramImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMutualInformationHistogramImageToImageMetricTest.cxx @@ -43,13 +43,13 @@ itkMutualInformationHistogramImageToImageMetricTest(int, char *[]) using FixedImageSourceType = itk::GaussianImageSource; // Note: the following declarations are classical arrays - FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; + FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; MovingImageType::SizeValueType movingImageSize[] = { 100, 100 }; - FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; + FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; MovingImageType::SpacingValueType movingImageSpacing[] = { 1.0f, 1.0f }; - constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; + constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; constexpr MovingImageType::PointValueType movingImageOrigin[] = { 0.0f, 0.0f }; auto movingImageSource = MovingImageSourceType::New(); @@ -71,7 +71,7 @@ itkMutualInformationHistogramImageToImageMetricTest(int, char *[]) fixedImageSource->Update(); // Force the filter to run const MovingImageType::Pointer movingImage = movingImageSource->GetOutput(); - const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); + const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); // Set up the metric. using MetricType = itk::MutualInformationHistogramImageToImageMetric; @@ -81,7 +81,7 @@ itkMutualInformationHistogramImageToImageMetricTest(int, char *[]) auto metric = MetricType::New(); - constexpr unsigned int nBins = 256; + constexpr unsigned int nBins = 256; MetricType::HistogramType::SizeType histSize; histSize.SetSize(2); histSize[0] = nBins; @@ -133,7 +133,7 @@ itkMutualInformationHistogramImageToImageMetricTest(int, char *[]) // Print out metric value and derivative. const MetricType::MeasureType measure = metric->GetValue(parameters); - MetricType::DerivativeType derivative; + MetricType::DerivativeType derivative; metric->GetDerivative(parameters, derivative); std::cout << "Metric value = " << measure << std::endl << "Derivative = " << derivative << std::endl; diff --git a/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx b/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx index a351887784c..b56a048f82b 100644 --- a/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx @@ -48,9 +48,9 @@ itkMutualInformationMetricTest(int, char *[]) ImageDimension = MovingImageType::ImageDimension }; - constexpr MovingImageType::SizeType size = { { 100, 100 } }; + constexpr MovingImageType::SizeType size = { { 100, 100 } }; constexpr MovingImageType::IndexType index = { { 0, 0 } }; - const MovingImageType::RegionType region{ index, size }; + const MovingImageType::RegionType region{ index, size }; auto imgMoving = MovingImageType::New(); imgMoving->SetRegions(region); @@ -70,7 +70,7 @@ itkMutualInformationMetricTest(int, char *[]) const double s = static_cast(region.GetSize()[0]) / 2.0; - itk::Point p; + itk::Point p; itk::Vector d; // Set the displacement @@ -79,7 +79,7 @@ itkMutualInformationMetricTest(int, char *[]) displacement[1] = 0; ReferenceIteratorType ri(imgMoving, region); - TargetIteratorType ti(imgFixed, region); + TargetIteratorType ti(imgFixed, region); ri.GoToBegin(); while (!ri.IsAtEnd()) { @@ -155,7 +155,7 @@ itkMutualInformationMetricTest(int, char *[]) // Set up an affine transform parameters //------------------------------------------------------------ const unsigned int numberOfParameters = transformer->GetNumberOfParameters(); - ParametersType parameters(numberOfParameters); + ParametersType parameters(numberOfParameters); // set the parameters to the identity unsigned long count = 0; @@ -187,7 +187,7 @@ itkMutualInformationMetricTest(int, char *[]) // for parameters[4] = {-10,10} //--------------------------------------------------------- - MetricType::MeasureType measure; + MetricType::MeasureType measure; MetricType::DerivativeType derivative(numberOfParameters); itk::TimeProbesCollectorBase collector; diff --git a/Modules/Registration/Common/test/itkNormalizedCorrelationImageMetricTest.cxx b/Modules/Registration/Common/test/itkNormalizedCorrelationImageMetricTest.cxx index a5053dfbe0e..f5305e4ef62 100644 --- a/Modules/Registration/Common/test/itkNormalizedCorrelationImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkNormalizedCorrelationImageMetricTest.cxx @@ -61,13 +61,13 @@ itkNormalizedCorrelationImageMetricTest(int, char *[]) using FixedImageSourceType = itk::GaussianImageSource; // Note: the following declarations are classical arrays - FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; + FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; MovingImageType::SizeValueType movingImageSize[] = { 100, 100 }; - FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; + FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; MovingImageType::SpacingValueType movingImageSpacing[] = { 1.0f, 1.0f }; - constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; + constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; constexpr MovingImageType::PointValueType movingImageOrigin[] = { 0.0f, 0.0f }; auto movingImageSource = MovingImageSourceType::New(); @@ -89,7 +89,7 @@ itkNormalizedCorrelationImageMetricTest(int, char *[]) fixedImageSource->Update(); // Force the filter to run const MovingImageType::Pointer movingImage = movingImageSource->GetOutput(); - const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); + const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); //----------------------------------------------------------- @@ -177,7 +177,7 @@ itkNormalizedCorrelationImageMetricTest(int, char *[]) // for parameters[1] = {-10,10} (arbitrary choice...) //--------------------------------------------------------- - MetricType::MeasureType measure; + MetricType::MeasureType measure; MetricType::DerivativeType derivative; std::cout << "param[1] Metric d(Metric)/d(param[1] " << std::endl; diff --git a/Modules/Registration/Common/test/itkNormalizedCorrelationPointSetToImageMetricTest.cxx b/Modules/Registration/Common/test/itkNormalizedCorrelationPointSetToImageMetricTest.cxx index 46383f0905b..f99f943cd4f 100644 --- a/Modules/Registration/Common/test/itkNormalizedCorrelationPointSetToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkNormalizedCorrelationPointSetToImageMetricTest.cxx @@ -62,13 +62,13 @@ itkNormalizedCorrelationPointSetToImageMetricTest(int, char *[]) using FixedImageSourceType = itk::GaussianImageSource; // Note: the following declarations are classical arrays - FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; + FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; MovingImageType::SizeValueType movingImageSize[] = { 100, 100 }; - constexpr FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; + constexpr FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; constexpr MovingImageType::SpacingValueType movingImageSpacing[] = { 1.0f, 1.0f }; - constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; + constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; constexpr MovingImageType::PointValueType movingImageOrigin[] = { 0.0f, 0.0f }; auto movingImageSource = MovingImageSourceType::New(); @@ -90,7 +90,7 @@ itkNormalizedCorrelationPointSetToImageMetricTest(int, char *[]) fixedImageSource->Update(); // Force the filter to run const MovingImageType::Pointer movingImage = movingImageSource->GetOutput(); - const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); + const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); //----------------------------------------------------------- // Create the point set and load it with data by sampling @@ -113,7 +113,7 @@ itkNormalizedCorrelationPointSetToImageMetricTest(int, char *[]) unsigned int counter = 0; FixedPointSetType::PointIdentifier pointId = 0; - FixedPointSetType::PointType point; + FixedPointSetType::PointType point; it.GoToBegin(); while (!it.IsAtEnd()) @@ -214,7 +214,7 @@ itkNormalizedCorrelationPointSetToImageMetricTest(int, char *[]) // for parameters[1] = {-10,10} (arbitrary choice...) //--------------------------------------------------------- - MetricType::MeasureType measure; + MetricType::MeasureType measure; MetricType::DerivativeType derivative; std::cout << "param[1] Metric d(Metric)/d(param[1] " << std::endl; diff --git a/Modules/Registration/Common/test/itkNormalizedMutualInformationHistogramImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkNormalizedMutualInformationHistogramImageToImageMetricTest.cxx index 25fd2a7e12b..c37eb41a7f5 100644 --- a/Modules/Registration/Common/test/itkNormalizedMutualInformationHistogramImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkNormalizedMutualInformationHistogramImageToImageMetricTest.cxx @@ -44,13 +44,13 @@ itkNormalizedMutualInformationHistogramImageToImageMetricTest(int, char *[]) using FixedImageSourceType = itk::GaussianImageSource; // Note: the following declarations are classical arrays - FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; + FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; MovingImageType::SizeValueType movingImageSize[] = { 100, 100 }; - FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; + FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; MovingImageType::SpacingValueType movingImageSpacing[] = { 1.0f, 1.0f }; - constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; + constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; constexpr MovingImageType::PointValueType movingImageOrigin[] = { 0.0f, 0.0f }; auto movingImageSource = MovingImageSourceType::New(); @@ -72,7 +72,7 @@ itkNormalizedMutualInformationHistogramImageToImageMetricTest(int, char *[]) fixedImageSource->Update(); // Force the filter to run const MovingImageType::Pointer movingImage = movingImageSource->GetOutput(); - const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); + const FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); // Set up the metric. using MetricType = itk::NormalizedMutualInformationHistogramImageToImageMetric; @@ -82,7 +82,7 @@ itkNormalizedMutualInformationHistogramImageToImageMetricTest(int, char *[]) auto metric = MetricType::New(); - constexpr unsigned int nBins = 256; + constexpr unsigned int nBins = 256; MetricType::HistogramType::SizeType histSize; histSize.SetSize(2); histSize[0] = nBins; @@ -134,7 +134,7 @@ itkNormalizedMutualInformationHistogramImageToImageMetricTest(int, char *[]) // Print out metric value and derivative. const MetricType::MeasureType measure = metric->GetValue(parameters); - MetricType::DerivativeType derivative; + MetricType::DerivativeType derivative; metric->GetDerivative(parameters, derivative); std::cout << "Metric value = " << measure << std::endl << "Derivative = " << derivative << std::endl; diff --git a/Modules/Registration/Common/test/itkPointSetToImageRegistrationTest.cxx b/Modules/Registration/Common/test/itkPointSetToImageRegistrationTest.cxx index cc25edf903c..cffa96d9d11 100644 --- a/Modules/Registration/Common/test/itkPointSetToImageRegistrationTest.cxx +++ b/Modules/Registration/Common/test/itkPointSetToImageRegistrationTest.cxx @@ -60,7 +60,7 @@ itkPointSetToImageRegistrationTest(int, char *[]) // Create the two images const MovingImageType::ConstPointer movingImage = imageSource->GetMovingImage(); - const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); + const FixedImageType::ConstPointer fixedImage = imageSource->GetFixedImage(); // Create the point set and load it with data by sampling // the fixed image. @@ -84,7 +84,7 @@ itkPointSetToImageRegistrationTest(int, char *[]) unsigned int counter = 0; FixedPointSetType::PointIdentifier pointId = 0; - FixedPointSetType::PointType point; + FixedPointSetType::PointType point; it.GoToBegin(); while (!it.IsAtEnd()) @@ -143,9 +143,9 @@ itkPointSetToImageRegistrationTest(int, char *[]) scales.Fill(1.0); constexpr unsigned long numberOfIterations = 50; - constexpr double maximumStepLength = 1.0; // no step will be larger than this - constexpr double minimumStepLength = 0.01; - constexpr double gradientTolerance = 1e-6; // convergence criterion + constexpr double maximumStepLength = 1.0; // no step will be larger than this + constexpr double minimumStepLength = 0.01; + constexpr double gradientTolerance = 1e-6; // convergence criterion optimizer->SetScales(scales); optimizer->SetNumberOfIterations(numberOfIterations); diff --git a/Modules/Registration/Common/test/itkPointSetToPointSetRegistrationTest.cxx b/Modules/Registration/Common/test/itkPointSetToPointSetRegistrationTest.cxx index 96d95211774..8fd135df9e7 100644 --- a/Modules/Registration/Common/test/itkPointSetToPointSetRegistrationTest.cxx +++ b/Modules/Registration/Common/test/itkPointSetToPointSetRegistrationTest.cxx @@ -118,9 +118,9 @@ itkPointSetToPointSetRegistrationTest(int, char *[]) scales.Fill(1.0); constexpr unsigned long numberOfIterations = 100; - constexpr double gradientTolerance = 1e-1; // convergence criterion - constexpr double valueTolerance = 1e-1; // convergence criterion - constexpr double epsilonFunction = 1e-9; // convergence criterion + constexpr double gradientTolerance = 1e-1; // convergence criterion + constexpr double valueTolerance = 1e-1; // convergence criterion + constexpr double epsilonFunction = 1e-9; // convergence criterion optimizer->SetScales(scales); optimizer->SetNumberOfIterations(numberOfIterations); diff --git a/Modules/Registration/Common/test/itkRecursiveMultiResolutionPyramidImageFilterTest.cxx b/Modules/Registration/Common/test/itkRecursiveMultiResolutionPyramidImageFilterTest.cxx index fbf188505b0..ec1c29d7881 100644 --- a/Modules/Registration/Common/test/itkRecursiveMultiResolutionPyramidImageFilterTest.cxx +++ b/Modules/Registration/Common/test/itkRecursiveMultiResolutionPyramidImageFilterTest.cxx @@ -33,7 +33,7 @@ double F(double x, double y, double z) { constexpr double s = 50; - double value = 200.0 * std::exp(-(x * x + y * y + z * z) / (s * s)); + double value = 200.0 * std::exp(-(x * x + y * y + z * z) / (s * s)); x -= 8; y += 3; z += 0; @@ -95,9 +95,9 @@ itkRecursiveMultiResolutionPyramidImageFilterTest(int argc, char * argv[]) std::cout << std::endl; } - InputImageType::SizeType size = { { 100, 100, 40 } }; + InputImageType::SizeType size = { { 100, 100, 40 } }; constexpr InputImageType::IndexType index = { { 0, 0, 0 } }; - const InputImageType::RegionType region{ index, size }; + const InputImageType::RegionType region{ index, size }; auto imgTarget = InputImageType::New(); imgTarget->SetRegions(region); @@ -121,9 +121,9 @@ itkRecursiveMultiResolutionPyramidImageFilterTest(int argc, char * argv[]) p[1] = ti.GetIndex()[1]; p[2] = ti.GetIndex()[2]; itk::Vector d = p - center; - const double x = d[0]; - const double y = d[1]; - const double z = d[2]; + const double x = d[0]; + const double y = d[1]; + const double z = d[2]; ti.Set((PixelType)F(x, y, z)); ++ti; } @@ -150,7 +150,7 @@ itkRecursiveMultiResolutionPyramidImageFilterTest(int argc, char * argv[]) // set schedule by specifying the number of levels; unsigned int numLevels = 3; - auto factors = itk::MakeFilled>(1 << (numLevels - 1)); + auto factors = itk::MakeFilled>(1 << (numLevels - 1)); pyramid->SetNumberOfLevels(numLevels); // check the schedule @@ -233,7 +233,7 @@ itkRecursiveMultiResolutionPyramidImageFilterTest(int argc, char * argv[]) std::cout << "Run RecursiveMultiResolutionPyramidImageFilter in standalone mode with progress"; std::cout << std::endl; - ShowProgressObject progressWatch(pyramid); + ShowProgressObject progressWatch(pyramid); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); @@ -249,10 +249,10 @@ itkRecursiveMultiResolutionPyramidImageFilterTest(int argc, char * argv[]) testLevel = 2; // check the output image information - InputImageType::SizeType inputSize = pyramid->GetInput()->GetLargestPossibleRegion().GetSize(); + InputImageType::SizeType inputSize = pyramid->GetInput()->GetLargestPossibleRegion().GetSize(); const InputImageType::SpacingType & inputSpacing = pyramid->GetInput()->GetSpacing(); - OutputImageType::SizeType outputSize = pyramid->GetOutput(testLevel)->GetLargestPossibleRegion().GetSize(); + OutputImageType::SizeType outputSize = pyramid->GetOutput(testLevel)->GetLargestPossibleRegion().GetSize(); const OutputImageType::SpacingType & outputSpacing = pyramid->GetOutput(testLevel)->GetSpacing(); { unsigned int j = 0; diff --git a/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.h b/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.h index 9b90623dc5d..5eae230e7ff 100644 --- a/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.h +++ b/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.h @@ -321,21 +321,21 @@ class ITK_TEMPLATE_EXPORT FiniteDifferenceFunctionLoad : public LoadElement FiniteDifferenceFunctionLoad(); // cannot be private until we always use smart pointers MovingPointer m_MovingImage{}; - FixedPointer m_FixedImage{}; + FixedPointer m_FixedImage{}; /** Used by the metric to set the region size for the fixed image. */ MovingRadiusType m_MetricRadius{}; - typename MovingImageType::SizeType m_MovingSize{}; - typename FixedImageType::SizeType m_FixedSize{}; - unsigned int m_NumberOfIntegrationPoints{ 0 }; - unsigned int m_SolutionIndex{ 1 }; - unsigned int m_SolutionIndex2{ 0 }; - Float m_Gamma{}; - typename Solution::ConstPointer m_Solution{ nullptr }; - float m_GradSigma{ 0.0f }; - float m_Sign{ 1.0f }; - float m_WhichMetric{ 0.0f }; + typename MovingImageType::SizeType m_MovingSize{}; + typename FixedImageType::SizeType m_FixedSize{}; + unsigned int m_NumberOfIntegrationPoints{ 0 }; + unsigned int m_SolutionIndex{ 1 }; + unsigned int m_SolutionIndex2{ 0 }; + Float m_Gamma{}; + typename Solution::ConstPointer m_Solution{ nullptr }; + float m_GradSigma{ 0.0f }; + float m_Sign{ 1.0f }; + float m_WhichMetric{ 0.0f }; FiniteDifferenceFunctionTypePointer m_DifferenceFunction{}; typename DisplacementFieldType::Pointer m_DisplacementField{}; diff --git a/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.hxx b/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.hxx index d84a128993c..84e13eba11f 100644 --- a/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.hxx +++ b/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.hxx @@ -40,7 +40,7 @@ itk::LightObject::Pointer FiniteDifferenceFunctionLoad::CreateAnother() const { itk::LightObject::Pointer smartPtr; - Pointer copyPtr = Self::New(); + Pointer copyPtr = Self::New(); copyPtr->m_MovingImage = this->m_MovingImage; copyPtr->m_FixedImage = this->m_FixedImage; @@ -130,14 +130,14 @@ FiniteDifferenceFunctionLoad::EvaluateMetricGivenSolution(Eleme typename Element::VectorType ip, shapef; typename Element::MatrixType solmat; - typename Element::Float w; + typename Element::Float w; if ((el == nullptr) || (el->Size() < 1)) { return 10.0; } - Element::Pointer element = el->GetElement(0); + Element::Pointer element = el->GetElement(0); const unsigned int numNodes = element->GetNumberOfNodes(); FEMVectorType gPos; @@ -213,7 +213,7 @@ FiniteDifferenceFunctionLoad::Fe(FEMVectorType Gpos) -> FEMVect // the translation parameters as provided by the vector field at p. // - VectorType OutVec; + VectorType OutVec; FEMVectorType femVec; femVec.set_size(ImageDimension); @@ -291,7 +291,7 @@ FiniteDifferenceFunctionLoad::ApplyLoad(Element::ConstPointer e const unsigned int numNodes = element->GetNumberOfNodes(); Element::VectorType force(numDegreesOfFreedom, 0.0), ip, gip, force_tmp, shapef; - Element::Float w, detJ; + Element::Float w, detJ; F.set_size(element->GetNumberOfDegreesOfFreedom()); F.fill(0.0); diff --git a/Modules/Registration/FEM/include/itkFEMRegistrationFilter.h b/Modules/Registration/FEM/include/itkFEMRegistrationFilter.h index 205d0b28515..608b540ffb3 100644 --- a/Modules/Registration/FEM/include/itkFEMRegistrationFilter.h +++ b/Modules/Registration/FEM/include/itkFEMRegistrationFilter.h @@ -73,7 +73,7 @@ class FEMRegistrationFilterEnums }; // Define how to print enumeration extern ITKFEMRegistration_EXPORT std::ostream & - operator<<(std::ostream & out, const FEMRegistrationFilterEnums::Sign value); +operator<<(std::ostream & out, const FEMRegistrationFilterEnums::Sign value); /** \class FEMRegistrationFilter * \brief FEM Image registration filter. @@ -673,10 +673,10 @@ class ITK_TEMPLATE_EXPORT FEMRegistrationFilter : public ImageToImageFilter m_NumberOfIntegrationPoints{}; // resolution of integration vnl_vector m_MetricWidth{}; // number of iterations at each level vnl_vector m_Maxiters{}; - unsigned int m_TotalIterations{ 0 }; // total number of iterations that were run - unsigned int m_MaxLevel{ 1 }; - unsigned int m_FileCount{ 0 }; // keeps track of number of files written - unsigned int m_CurrentLevel{ 0 }; // current resolution level + unsigned int m_TotalIterations{ 0 }; // total number of iterations that were run + unsigned int m_MaxLevel{ 1 }; + unsigned int m_FileCount{ 0 }; // keeps track of number of files written + unsigned int m_CurrentLevel{ 0 }; // current resolution level typename FixedImageType::SizeType m_CurrentLevelImageSize{}; @@ -686,58 +686,58 @@ class ITK_TEMPLATE_EXPORT FEMRegistrationFilter : public ImageToImageFilter m_MeshPixelsPerElementAtEachResolution{}; - Float m_TimeStep{ 1 }; + Float m_TimeStep{ 1 }; vnl_vector m_E{}; vnl_vector m_Rho{}; vnl_vector m_Gamma{}; - Float m_Energy{ 0.0 }; // current value of energy - Float m_MinE{}; // minimum recorded energy - Float m_MinJacobian{ 1.0 }; // minimum recorded energy - Float m_Alpha{ 1.0 }; - - bool m_UseLandmarks{ false }; - bool m_UseMassMatrix{ true }; - bool m_UseNormalizedGradient{ false }; - bool m_CreateMeshFromImage{ true }; - unsigned int m_EmployRegridding{ 1 }; - SignEnum m_DescentDirection{ SignEnum::positive }; - Float m_EnergyReductionFactor{ 0.0 }; + Float m_Energy{ 0.0 }; // current value of energy + Float m_MinE{}; // minimum recorded energy + Float m_MinJacobian{ 1.0 }; // minimum recorded energy + Float m_Alpha{ 1.0 }; + + bool m_UseLandmarks{ false }; + bool m_UseMassMatrix{ true }; + bool m_UseNormalizedGradient{ false }; + bool m_CreateMeshFromImage{ true }; + unsigned int m_EmployRegridding{ 1 }; + SignEnum m_DescentDirection{ SignEnum::positive }; + Float m_EnergyReductionFactor{ 0.0 }; ImageSizeType m_FullImageSize{}; ImageSizeType m_ImageOrigin{}; /** Gives the ratio of original image size to current image size - for * dealing with multi-resolution. */ - ImageSizeType m_ImageScaling{}; - ImageSizeType m_CurrentImageScaling{}; + ImageSizeType m_ImageScaling{}; + ImageSizeType m_CurrentImageScaling{}; typename FieldType::RegionType m_FieldRegion{}; - typename FieldType::SizeType m_FieldSize{}; - typename FieldType::Pointer m_Field{}; + typename FieldType::SizeType m_FieldSize{}; + typename FieldType::Pointer m_Field{}; // Only use TotalField if re-gridding is employed. - typename FieldType::Pointer m_TotalField{}; + typename FieldType::Pointer m_TotalField{}; typename ImageMetricLoadType::Pointer m_Load{}; // Defines the load to use // Define the warper typename WarperType::Pointer m_Warper{}; // Declare a new image to hold the warped reference - typename FixedImageType::Pointer m_WarpedImage{}; - typename FloatImageType::Pointer m_FloatImage{}; + typename FixedImageType::Pointer m_WarpedImage{}; + typename FloatImageType::Pointer m_FloatImage{}; typename FixedImageType::RegionType m_Wregion{}; - typename FixedImageType::IndexType m_Windex{}; + typename FixedImageType::IndexType m_Windex{}; // Declare images for target and reference typename MovingImageType::Pointer m_MovingImage{}; typename MovingImageType::Pointer m_OriginalMovingImage{}; - typename FixedImageType::Pointer m_FixedImage{}; + typename FixedImageType::Pointer m_FixedImage{}; // Element and metric pointers - typename Element::Pointer m_Element{}; - typename MaterialType::Pointer m_Material{}; - MetricBaseTypePointer m_Metric{}; + typename Element::Pointer m_Element{}; + typename MaterialType::Pointer m_Material{}; + MetricBaseTypePointer m_Metric{}; typename FEMObjectType::Pointer m_FEMObject{}; - LandmarkArrayType m_LandmarkArray{}; + LandmarkArrayType m_LandmarkArray{}; InterpolatorPointer m_Interpolator{}; double m_MaximumError{ 0.1 }; diff --git a/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx b/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx index dad8c68f7ea..2b6c81cfba2 100644 --- a/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx +++ b/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx @@ -325,7 +325,7 @@ FEMRegistrationFilter::CreateMesh(unsigne template void FEMRegistrationFilter::ApplyImageLoads(TMovingImage * movingimg, - TFixedImage * fixedimg) + TFixedImage * fixedimg) { m_Load = FEMRegistrationFilter::ImageMetricLoadType::New(); m_Load->SetMovingImage(movingimg); @@ -507,13 +507,13 @@ FEMRegistrationFilter::IterativeSolve(Sol itkExceptionMacro("No Load set"); } - bool Done = false; + bool Done = false; unsigned int iters = 0; m_MinE = 10.e99; Float deltE = 0; while (!Done && iters < m_Maxiters[m_CurrentLevel]) { - const Float lastdeltE = deltE; + const Float lastdeltE = deltE; const unsigned int DLS = m_DoLineSearchOnImageEnergy; // Reset the variational similarity term to zero. @@ -677,7 +677,7 @@ FEMRegistrationFilter::InterpolateVectorF { eltp->GetLocalFromGlobalCoordinates(Gpt, Pos); - unsigned int Nnodes = eltp->GetNumberOfNodes(); + unsigned int Nnodes = eltp->GetNumberOfNodes(); typename Element::VectorType shapef(Nnodes); shapef = eltp->ShapeFunctions(Pos); Float solval; @@ -719,7 +719,7 @@ FEMRegistrationFilter::InterpolateVectorF Pos[1] = s; Pos[2] = t; - unsigned int numNodes = eltp->GetNumberOfNodes(); + unsigned int numNodes = eltp->GetNumberOfNodes(); typename Element::VectorType shapef(numNodes); #define FASTHEX @@ -737,8 +737,8 @@ FEMRegistrationFilter::InterpolateVectorF shapef = (*eltp)->ShapeFunctions(Pos); #endif - Float solval, posval; - bool inimage = true; + Float solval, posval; + bool inimage = true; typename FixedImageType::PointType physicalPoint; for (unsigned int f = 0; f < ImageDimension; ++f) @@ -796,9 +796,9 @@ FEMRegistrationFilter::ComputeJacobian() template void -FEMRegistrationFilter::EnforceDiffeomorphism(float thresh, +FEMRegistrationFilter::EnforceDiffeomorphism(float thresh, SolverType * solver, - bool onlywriteimages) + bool onlywriteimages) { itkDebugMacro(" Checking Jacobian using threshold " << thresh); @@ -893,7 +893,7 @@ FEMRegistrationFilter::EnforceDiffeomorph m_Interpolator->SetInputImage(m_Field); typename FixedImageType::IndexType index; - FieldIterator totalFieldIter(m_TotalField, m_TotalField->GetLargestPossibleRegion()); + FieldIterator totalFieldIter(m_TotalField, m_TotalField->GetLargestPossibleRegion()); totalFieldIter.GoToBegin(); unsigned int jj; itkDebugStatement(float pathsteplength = 0); @@ -911,7 +911,7 @@ FEMRegistrationFilter::EnforceDiffeomorph interpolatedValue = m_Interpolator->EvaluateAtContinuousIndex(inputIndex); } VectorType interped; - float temp = 0.0; + float temp = 0.0; for (jj = 0; jj < ImageDimension; ++jj) { interped[jj] = interpolatedValue[jj]; @@ -1030,9 +1030,9 @@ FEMRegistrationFilter::SampleVectorFieldA { // Here, we need to iterate through the nodes, get the nodal coordinates, // sample the VF at the node and place the values in the SolutionVector. - int numNodes = solver->GetOutput()->GetNumberOfNodes(); + int numNodes = solver->GetOutput()->GetNumberOfNodes(); Element::VectorType coord; - VectorType SolutionAtNode; + VectorType SolutionAtNode; m_Interpolator->SetInputImage(m_Field); for (int i = 0; i < numNodes; ++i) @@ -1137,7 +1137,7 @@ FEMRegistrationFilter::MultiResSolve() // nzelts=((2*numnodesperelt*ndofpernode*ndof > 25*ndof) ? 2*numnodesperelt*ndofpernode*ndof : 25*ndof); LinearSystemWrapperItpack itpackWrapper; - unsigned int maxits = 2 * solver->GetInput()->GetNumberOfDegreesOfFreedom(); + unsigned int maxits = 2 * solver->GetInput()->GetNumberOfDegreesOfFreedom(); itpackWrapper.SetMaximumNumberIterations(maxits); itpackWrapper.SetTolerance(1.e-1); itpackWrapper.JacobianConjugateGradient(); @@ -1191,19 +1191,19 @@ FEMRegistrationFilter::EvaluateResidual(S template void FEMRegistrationFilter::FindBracketingTriplet(SolverType * solver, - Float * a, - Float * b, - Float * c) + Float * a, + Float * b, + Float * c) { // See Numerical Recipes constexpr Float Gold = 1.618034; constexpr Float Glimit = 100.0; - const Float Tiny = 1.e-20; - Float ax = 0.0; - Float bx = 1.0; - Float fa = itk::Math::abs(this->EvaluateResidual(solver, ax)); - Float fb = itk::Math::abs(this->EvaluateResidual(solver, bx)); + const Float Tiny = 1.e-20; + Float ax = 0.0; + Float bx = 1.0; + Float fa = itk::Math::abs(this->EvaluateResidual(solver, ax)); + Float fb = itk::Math::abs(this->EvaluateResidual(solver, bx)); Float dum; @@ -1300,7 +1300,7 @@ FEMRegistrationFilter::FindBracketingTrip template Element::Float FEMRegistrationFilter::GoldenSection(SolverType * solver, - Float tol, + Float tol, unsigned int MaxIters) { // We should now have a, b and c, as well as f(a), f(b), f(c), @@ -1310,7 +1310,7 @@ FEMRegistrationFilter::GoldenSection(Solv this->FindBracketingTriplet(solver, &ax, &bx, &cx); constexpr Float R = 0.6180339; - const Float C = (1.0 - R); + const Float C = (1.0 - R); Float x0 = ax; Float x1; @@ -1327,8 +1327,8 @@ FEMRegistrationFilter::GoldenSection(Solv x1 = bx - C * (bx - ax); } - Float f1 = itk::Math::abs(this->EvaluateResidual(solver, x1)); - Float f2 = itk::Math::abs(this->EvaluateResidual(solver, x2)); + Float f1 = itk::Math::abs(this->EvaluateResidual(solver, x1)); + Float f2 = itk::Math::abs(this->EvaluateResidual(solver, x2)); unsigned int iters = 0; while (itk::Math::abs(x3 - x0) > tol * (itk::Math::abs(x1) + itk::Math::abs(x2)) && iters < MaxIters) { @@ -1393,8 +1393,8 @@ FEMRegistrationFilter::AddLandmark(PointT template void FEMRegistrationFilter::InsertLandmark(unsigned int index, - PointType source, - PointType target) + PointType source, + PointType target) { auto newLandmark = LoadLandmark::New(); @@ -1432,8 +1432,8 @@ FEMRegistrationFilter::ClearLandmarks() template void FEMRegistrationFilter::GetLandmark(unsigned int index, - PointType & source, - PointType & target) + PointType & source, + PointType & target) { Element::VectorType localSource; Element::VectorType localTarget = m_LandmarkArray[index]->GetTarget(); diff --git a/Modules/Registration/FEM/include/itkMIRegistrationFunction.h b/Modules/Registration/FEM/include/itkMIRegistrationFunction.h index 57e27fcaf07..48ce4a43024 100644 --- a/Modules/Registration/FEM/include/itkMIRegistrationFunction.h +++ b/Modules/Registration/FEM/include/itkMIRegistrationFunction.h @@ -158,8 +158,8 @@ class ITK_TEMPLATE_EXPORT MIRegistrationFunction * pixel that does not lie on a data set boundary. */ PixelType ComputeUpdate(const NeighborhoodType & neighborhood, - void * globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0)) override; + void * globalData, + const FloatOffsetType & offset = FloatOffsetType(0.0)) override; void SetMinNorm(float ts = 1.0) @@ -194,7 +194,7 @@ class ITK_TEMPLATE_EXPORT MIRegistrationFunction TimeStepType m_TimeStep{}; SpacingType m_FixedImageSpacing{}; - PointType m_FixedImageOrigin{}; + PointType m_FixedImageOrigin{}; GradientCalculatorPointer m_FixedImageGradientCalculator{}; GradientCalculatorPointer m_MovingImageGradientCalculator{}; @@ -211,7 +211,7 @@ class ITK_TEMPLATE_EXPORT MIRegistrationFunction unsigned int m_NumberOfSamples{ 1 }; unsigned int m_NumberOfBins{ 4 }; - float m_Minnorm{ 1.0 }; + float m_Minnorm{ 1.0 }; bool m_DoInverse{ false }; }; diff --git a/Modules/Registration/FEM/include/itkMIRegistrationFunction.hxx b/Modules/Registration/FEM/include/itkMIRegistrationFunction.hxx index a71a56e9f4f..3582bc7f151 100644 --- a/Modules/Registration/FEM/include/itkMIRegistrationFunction.hxx +++ b/Modules/Registration/FEM/include/itkMIRegistrationFunction.hxx @@ -85,8 +85,8 @@ template ::ComputeUpdate( const NeighborhoodType & it, - void * itkNotUsed(globalData), - const FloatOffsetType & itkNotUsed(offset)) -> PixelType + void * itkNotUsed(globalData), + const FloatOffsetType & itkNotUsed(offset)) -> PixelType { // We compute the derivative of MI w.r.t. the infinitesimal // displacement, following Viola and Wells. @@ -130,22 +130,22 @@ MIRegistrationFunction::ComputeUp typename FixedImageType::SizeType hradius = this->GetRadius(); - auto * img = const_cast(this->m_FixedImage.GetPointer()); + auto * img = const_cast(this->m_FixedImage.GetPointer()); typename FixedImageType::SizeType imagesize = img->GetLargestPossibleRegion().GetSize(); bool inimage; // Now collect the samples - sampleContainerType fixedSamplesA; - sampleContainerType movingSamplesA; - sampleContainerType fixedSamplesB; - sampleContainerType movingSamplesB; + sampleContainerType fixedSamplesA; + sampleContainerType movingSamplesA; + sampleContainerType fixedSamplesB; + sampleContainerType movingSamplesB; inImageIndexContainerType inImageIndicesA; - gradContainerType fixedGradientsA; - gradMagContainerType fixedGradMagsA; + gradContainerType fixedGradientsA; + gradMagContainerType fixedGradMagsA; inImageIndexContainerType inImageIndicesB; - gradContainerType fixedGradientsB; - gradMagContainerType fixedGradMagsB; + gradContainerType fixedGradientsB; + gradMagContainerType fixedGradMagsB; unsigned int samplestep = 2; // m_Radius[0]; @@ -243,7 +243,7 @@ MIRegistrationFunction::ComputeUp typename FixedImageType::RegionType region = img->GetLargestPossibleRegion(); ImageRandomIteratorWithIndex randasamit(img, region); - unsigned int numberOfSamples = 20; + unsigned int numberOfSamples = 20; randasamit.SetNumberOfSamples(numberOfSamples); indct = 0; @@ -269,7 +269,7 @@ MIRegistrationFunction::ComputeUp fixedValue = 0.; movingValue = 0.0; CovariantVectorType fixedGradient; - double fgm = 0; + double fgm = 0; // Get fixed image related information fixedValue = static_cast(this->m_FixedImage->GetPixel(index)); fixedGradient = m_FixedImageGradientCalculator->EvaluateAtIndex(index); @@ -281,7 +281,7 @@ MIRegistrationFunction::ComputeUp // Get moving image related information using DeformationPixelType = typename DisplacementFieldType::PixelType; const DeformationPixelType itvec = this->GetDisplacementField()->GetPixel(index); - PointType mappedPoint; + PointType mappedPoint; this->GetFixedImage()->TransformIndexToPhysicalPoint(index, mappedPoint); for (unsigned int j = 0; j < ImageDimension; ++j) { @@ -351,7 +351,7 @@ MIRegistrationFunction::ComputeUp // Get moving image related information const typename DisplacementFieldType::PixelType hooditvec = this->m_DisplacementField->GetPixel(index); - PointType mappedPoint; + PointType mappedPoint; this->GetFixedImage()->TransformIndexToPhysicalPoint(index, mappedPoint); for (unsigned int j = 0; j < ImageDimension; ++j) { @@ -378,7 +378,7 @@ MIRegistrationFunction::ComputeUp const double numsamplesB{ static_cast(fixedSamplesB.size()) }; const double numsamplesA{ static_cast(fixedSamplesA.size()) }; - double nsamp = numsamplesB; + double nsamp = numsamplesB; // if (maxf == minf && maxm == minm) return update; // else std::cout << " b samples " << fixedSamplesB.size() // << " a samples " << fixedSamplesA.size() << @@ -412,7 +412,7 @@ MIRegistrationFunction::ComputeUp } fsigma = std::sqrt(fsigma / numsamplesA); - float sigmaw = 0.8; + float sigmaw = 0.8; double m_FixedImageStandardDeviation = fsigma * sigmaw; msigma = std::sqrt(msigma / numsamplesA); double m_MovingImageStandardDeviation = msigma * sigmaw; @@ -423,8 +423,8 @@ MIRegistrationFunction::ComputeUp return update; } - double m_MinProbability = 0.0001; - double dLogSumFixed = 0., dLogSumMoving = 0., dLogSumJoint = 0.0; + double m_MinProbability = 0.0001; + double dLogSumFixed = 0., dLogSumMoving = 0., dLogSumJoint = 0.0; unsigned int bsamples; unsigned int asamples; diff --git a/Modules/Registration/FEM/include/itkNCCRegistrationFunction.h b/Modules/Registration/FEM/include/itkNCCRegistrationFunction.h index 88631be5c80..89b1b30f4b4 100644 --- a/Modules/Registration/FEM/include/itkNCCRegistrationFunction.h +++ b/Modules/Registration/FEM/include/itkNCCRegistrationFunction.h @@ -160,8 +160,8 @@ class ITK_TEMPLATE_EXPORT NCCRegistrationFunction * pixel that does not lie on a data set boundary. */ PixelType ComputeUpdate(const NeighborhoodType & neighborhood, - void * globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0)) override; + void * globalData, + const FloatOffsetType & offset = FloatOffsetType(0.0)) override; protected: NCCRegistrationFunction(); diff --git a/Modules/Registration/FEM/include/itkNCCRegistrationFunction.hxx b/Modules/Registration/FEM/include/itkNCCRegistrationFunction.hxx index 7b330a3d80a..abedb56c421 100644 --- a/Modules/Registration/FEM/include/itkNCCRegistrationFunction.hxx +++ b/Modules/Registration/FEM/include/itkNCCRegistrationFunction.hxx @@ -78,13 +78,13 @@ template ::ComputeUpdate( const NeighborhoodType & it, - void * itkNotUsed(globalData), - const FloatOffsetType & itkNotUsed(offset)) -> PixelType + void * itkNotUsed(globalData), + const FloatOffsetType & itkNotUsed(offset)) -> PixelType { const IndexType oindex = it.GetIndex(); const typename FixedImageType::SizeType hradius = it.GetRadius(); - auto * img = const_cast(this->m_FixedImage.GetPointer()); + auto * img = const_cast(this->m_FixedImage.GetPointer()); const typename FixedImageType::SizeType imagesize = img->GetLargestPossibleRegion().GetSize(); NeighborhoodIterator hoodIt(hradius, img, img->GetRequestedRegion()); @@ -106,7 +106,7 @@ NCCRegistrationFunction::ComputeU for (unsigned int indct = 0; indct < hoodlen - 1; ++indct) { const IndexType index = hoodIt.GetIndex(indct); - bool inimage = true; + bool inimage = true; for (unsigned int dd = 0; dd < ImageDimension; ++dd) { if (index[dd] < 0 || index[dd] > static_cast(imagesize[dd] - 1)) @@ -119,9 +119,9 @@ NCCRegistrationFunction::ComputeU // Get fixed image related information. // Note: no need to check the index is within fixed image buffer. // This is done by the external filter. - const auto fixedValue = static_cast(this->m_FixedImage->GetPixel(index)); + const auto fixedValue = static_cast(this->m_FixedImage->GetPixel(index)); const CovariantVectorType fixedGradient = m_FixedImageGradientCalculator->EvaluateAtIndex(index); - double fixedGradientSquaredMagnitude = 0; + double fixedGradientSquaredMagnitude = 0; for (unsigned int j = 0; j < ImageDimension; ++j) { fixedGradientSquaredMagnitude += itk::Math::sqr(fixedGradient[j]) * m_FixedImageSpacing[j]; @@ -130,7 +130,7 @@ NCCRegistrationFunction::ComputeU // Get moving image related information using DeformationPixelType = typename TDisplacementField::PixelType; const DeformationPixelType vec = this->GetDisplacementField()->GetPixel(index); - PointType mappedPoint; + PointType mappedPoint; this->GetFixedImage()->TransformIndexToPhysicalPoint(index, mappedPoint); for (unsigned int j = 0; j < ImageDimension; ++j) { @@ -156,7 +156,7 @@ NCCRegistrationFunction::ComputeU } PixelType update{}; - double updatenorm = 0.0; + double updatenorm = 0.0; if ((sff * smm) != 0.0) { const double factor = 1.0 / std::sqrt(sff * smm); @@ -185,7 +185,7 @@ NCCRegistrationFunction::ComputeU template void NCCRegistrationFunction::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Registration/FEM/include/itkPhysicsBasedNonRigidRegistrationMethod.h b/Modules/Registration/FEM/include/itkPhysicsBasedNonRigidRegistrationMethod.h index 8aedfb8a80d..7bee31f80ef 100644 --- a/Modules/Registration/FEM/include/itkPhysicsBasedNonRigidRegistrationMethod.h +++ b/Modules/Registration/FEM/include/itkPhysicsBasedNonRigidRegistrationMethod.h @@ -165,16 +165,16 @@ class ITK_TEMPLATE_EXPORT PhysicsBasedNonRigidRegistrationMethod GenerateData() override; private: - double m_SelectFraction{ 0.1 }; - unsigned int m_NonConnectivity{ 0 }; + double m_SelectFraction{ 0.1 }; + unsigned int m_NonConnectivity{ 0 }; ImageSizeType m_BlockRadius{}; ImageSizeType m_SearchRadius{}; - unsigned int m_ApproximationSteps{ 10 }; - unsigned int m_OutlierRejectionSteps{ 10 }; + unsigned int m_ApproximationSteps{ 10 }; + unsigned int m_OutlierRejectionSteps{ 10 }; typename FeatureSelectionFilterType::Pointer m_FeatureSelectionFilter{}; - typename BlockMatchingFilterType::Pointer m_BlockMatchingFilter{}; - typename FEMFilterType::Pointer m_FEMFilter{}; + typename BlockMatchingFilterType::Pointer m_BlockMatchingFilter{}; + typename FEMFilterType::Pointer m_FEMFilter{}; }; } // end namespace fem } // end namespace itk diff --git a/Modules/Registration/FEM/include/itkPhysicsBasedNonRigidRegistrationMethod.hxx b/Modules/Registration/FEM/include/itkPhysicsBasedNonRigidRegistrationMethod.hxx index a9f47fab15b..619d2522bc2 100644 --- a/Modules/Registration/FEM/include/itkPhysicsBasedNonRigidRegistrationMethod.hxx +++ b/Modules/Registration/FEM/include/itkPhysicsBasedNonRigidRegistrationMethod.hxx @@ -100,7 +100,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Registration/FEM/test/itkFEMFiniteDifferenceFunctionLoadTest.cxx b/Modules/Registration/FEM/test/itkFEMFiniteDifferenceFunctionLoadTest.cxx index 422f491493e..659c0828e1a 100644 --- a/Modules/Registration/FEM/test/itkFEMFiniteDifferenceFunctionLoadTest.cxx +++ b/Modules/Registration/FEM/test/itkFEMFiniteDifferenceFunctionLoadTest.cxx @@ -70,9 +70,9 @@ FillImage(TImage * image, typename TImage::PixelType value) // Template function to fill in an image with a circle. template void -FillWithCircle(TImage * image, - double * center, - double radius, +FillWithCircle(TImage * image, + double * center, + double radius, typename TImage::PixelType foregnd, typename TImage::PixelType backgnd) { @@ -80,7 +80,7 @@ FillWithCircle(TImage * image, Iterator it(image, image->GetBufferedRegion()); typename TImage::IndexType index; - double r2 = itk::Math::sqr(radius); + double r2 = itk::Math::sqr(radius); for (it.GoToBegin(); !it.IsAtEnd(); ++it) { index = it.GetIndex(); @@ -150,16 +150,16 @@ CreateMesh(InputImageType * image, unsigned int elementWidth = 1) } int -RunTest(InputImageType * fixedImage, - InputImageType * movingImage, +RunTest(InputImageType * fixedImage, + InputImageType * movingImage, DeformationFieldImageType * initField, DeformationFieldImageType * outField, - SolverType * solver, - unsigned int metricType, - std::string filenamePrefix) + SolverType * solver, + unsigned int metricType, + std::string filenamePrefix) { InputImageType::SpacingType spacing = fixedImage->GetSpacing(); - InputImageType::PointType origin = fixedImage->GetOrigin(); + InputImageType::PointType origin = fixedImage->GetOrigin(); auto load = ImageMetricLoadType::New(); @@ -368,8 +368,8 @@ itkFEMFiniteDifferenceFunctionLoadTest(int argc, char * argv[]) // Generate input images and initial deformation field - SpacingType spacing; - float origin[ImageDimension]; + SpacingType spacing; + float origin[ImageDimension]; InputImageType::SizeValueType sizeArray[ImageDimension]; for (unsigned int i = 0; i < ImageDimension; ++i) @@ -439,7 +439,7 @@ itkFEMFiniteDifferenceFunctionLoadTest(int argc, char * argv[]) FillImage(initField, zeroVec); using ImageWriterType = itk::ImageFileWriter; - auto writer = ImageWriterType::New(); + auto writer = ImageWriterType::New(); std::string filename(filenamePrefix); writer->SetInput(movingImage); @@ -453,7 +453,7 @@ itkFEMFiniteDifferenceFunctionLoadTest(int argc, char * argv[]) // Create mesh from image FEMObjectType::Pointer femObject = CreateMesh(fixedImage, PixelsPerElement); - auto solver = SolverType::New(); + auto solver = SolverType::New(); solver->SetInput(femObject); // Test FinitDifferenceFunctionLoad with four metric types diff --git a/Modules/Registration/FEM/test/itkFEMRegistrationFilter2DTest.cxx b/Modules/Registration/FEM/test/itkFEMRegistrationFilter2DTest.cxx index 0c131070137..9c51277a09a 100644 --- a/Modules/Registration/FEM/test/itkFEMRegistrationFilter2DTest.cxx +++ b/Modules/Registration/FEM/test/itkFEMRegistrationFilter2DTest.cxx @@ -52,9 +52,9 @@ FillImage(TImage * image, typename TImage::PixelType value) // Template function to fill in an image with a circle. template void -FillWithCircle(TImage * image, - double * center, - double radius, +FillWithCircle(TImage * image, + double * center, + double radius, typename TImage::PixelType foregnd, typename TImage::PixelType backgnd) { @@ -62,7 +62,7 @@ FillWithCircle(TImage * image, Iterator it(image, image->GetBufferedRegion()); typename TImage::IndexType index; - double r2 = itk::Math::sqr(radius); + double r2 = itk::Math::sqr(radius); for (it.GoToBegin(); !it.IsAtEnd(); ++it) { index = it.GetIndex(); @@ -123,8 +123,8 @@ itkFEMRegistrationFilter2DTest(int argc, char * argv[]) initField->SetBufferedRegion(region); initField->Allocate(); - double center[ImageDimension]; - double radius; + double center[ImageDimension]; + double radius; InputImagePixelType fgnd = 250; InputImagePixelType bgnd = 15; @@ -302,7 +302,7 @@ itkFEMRegistrationFilter2DTest(int argc, char * argv[]) if (argc == 2) { - std::string outFileName = argv[1]; + std::string outFileName = argv[1]; std::stringstream ss; ss << met; outFileName += ss.str(); @@ -316,7 +316,7 @@ itkFEMRegistrationFilter2DTest(int argc, char * argv[]) if (argc == 3) { - std::string outFileName = argv[2]; + std::string outFileName = argv[2]; std::stringstream ss; ss << met; outFileName += ss.str(); diff --git a/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest.cxx b/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest.cxx index b411aed2d0c..22217f4c687 100644 --- a/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest.cxx +++ b/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest.cxx @@ -53,9 +53,9 @@ FillImage(TImage * image, typename TImage::PixelType value) // Template function to fill in an image with a circle. template void -FillWithCircle(TImage * image, - double * center, - double radius, +FillWithCircle(TImage * image, + double * center, + double radius, typename TImage::PixelType foregnd, typename TImage::PixelType backgnd) { @@ -63,7 +63,7 @@ FillWithCircle(TImage * image, Iterator it(image, image->GetBufferedRegion()); typename TImage::IndexType index; - double r2 = itk::Math::sqr(radius); + double r2 = itk::Math::sqr(radius); for (it.GoToBegin(); !it.IsAtEnd(); ++it) { index = it.GetIndex(); @@ -124,8 +124,8 @@ itkFEMRegistrationFilterTest(int argc, char * argv[]) initField->SetBufferedRegion(region); initField->Allocate(); - double center[ImageDimension]; - double radius; + double center[ImageDimension]; + double radius; InputImagePixelType fgnd = 250; InputImagePixelType bgnd = 15; @@ -306,7 +306,7 @@ itkFEMRegistrationFilterTest(int argc, char * argv[]) if (argc == 2) { - std::string outFileName = argv[1]; + std::string outFileName = argv[1]; std::stringstream ss; ss << met; outFileName += ss.str(); @@ -320,7 +320,7 @@ itkFEMRegistrationFilterTest(int argc, char * argv[]) if (argc == 3) { - std::string outFileName = argv[2]; + std::string outFileName = argv[2]; std::stringstream ss; ss << met; outFileName += ss.str(); diff --git a/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest2.cxx b/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest2.cxx index d5c046dd2ea..f35e4f3b3ef 100644 --- a/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest2.cxx +++ b/Modules/Registration/FEM/test/itkFEMRegistrationFilterTest2.cxx @@ -56,9 +56,9 @@ FillImage(TImage * image, typename TImage::PixelType value) // Template function to fill in an image with a circle. template void -FillWithCircle(TImage * image, - double * center, - double radius, +FillWithCircle(TImage * image, + double * center, + double radius, typename TImage::PixelType foregnd, typename TImage::PixelType backgnd) { @@ -66,7 +66,7 @@ FillWithCircle(TImage * image, Iterator it(image, image->GetBufferedRegion()); typename TImage::IndexType index; - double r2 = itk::Math::sqr(radius); + double r2 = itk::Math::sqr(radius); for (it.GoToBegin(); !it.IsAtEnd(); ++it) { index = it.GetIndex(); @@ -104,7 +104,7 @@ itkFEMRegistrationFilterTest2(int argc, char * argv[]) imageOrigin[1] = 50.0; imageOrigin[2] = 200.0; - SpacingType spacing; + SpacingType spacing; InputImageType::SizeValueType sizeArray[ImageDimension]; for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -142,8 +142,8 @@ itkFEMRegistrationFilterTest2(int argc, char * argv[]) initField->SetSpacing(spacing); initField->Allocate(); - double center[ImageDimension]; - double radius; + double center[ImageDimension]; + double radius; InputImagePixelType fgnd = 250; InputImagePixelType bgnd = 15; @@ -329,7 +329,7 @@ itkFEMRegistrationFilterTest2(int argc, char * argv[]) if (argc == 2) { - std::string outFileName = argv[1]; + std::string outFileName = argv[1]; std::stringstream ss; ss << met; outFileName += ss.str(); @@ -343,7 +343,7 @@ itkFEMRegistrationFilterTest2(int argc, char * argv[]) if (argc == 3) { - std::string outFileName = argv[2]; + std::string outFileName = argv[2]; std::stringstream ss; ss << met; outFileName += ss.str(); diff --git a/Modules/Registration/FEM/test/itkMIRegistrationFunctionTest.cxx b/Modules/Registration/FEM/test/itkMIRegistrationFunctionTest.cxx index cbc61e33449..1147ced9a6f 100644 --- a/Modules/Registration/FEM/test/itkMIRegistrationFunctionTest.cxx +++ b/Modules/Registration/FEM/test/itkMIRegistrationFunctionTest.cxx @@ -48,13 +48,13 @@ itkMIRegistrationFunctionTest(int, char *[]) using FixedImageSourceType = itk::GaussianImageSource; // Create the two images - FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; + FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; MovingImageType::SizeValueType movingImageSize[] = { 100, 100 }; - FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; + FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; MovingImageType::SpacingValueType movingImageSpacing[] = { 1.0f, 1.0f }; - FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; + FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; MovingImageType::PointValueType movingImageOrigin[] = { 0.0f, 0.0f }; auto movingImageSource = MovingImageSourceType::New(); @@ -76,7 +76,7 @@ itkMIRegistrationFunctionTest(int, char *[]) fixedImageSource->Update(); MovingImageType::Pointer movingImage = movingImageSource->GetOutput(); - FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); + FixedImageType::Pointer fixedImage = fixedImageSource->GetOutput(); // Set up the metric using MetricFunctionType = itk::MIRegistrationFunction; diff --git a/Modules/Registration/FEM/test/itkVTKTetrahedralMeshReader.hxx b/Modules/Registration/FEM/test/itkVTKTetrahedralMeshReader.hxx index bc0538a4fe8..763ef8917a1 100644 --- a/Modules/Registration/FEM/test/itkVTKTetrahedralMeshReader.hxx +++ b/Modules/Registration/FEM/test/itkVTKTetrahedralMeshReader.hxx @@ -223,7 +223,7 @@ VTKTetrahedralMeshReader::GenerateData() // unsigned long numberOfCellPoints; - long ids[4]; + long ids[4]; for (CellIdentifier cellId = 0; cellId < numberOfCells; ++cellId) { diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFilter.hxx b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFilter.hxx index b43f647eb0a..2a51337feae 100644 --- a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFilter.hxx +++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFilter.hxx @@ -36,7 +36,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { GPUSuperclass::PrintSelf(os, indent); diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h index d23b24b55fb..5ce41613078 100644 --- a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h +++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h @@ -185,8 +185,8 @@ class ITK_TEMPLATE_EXPORT GPUDemonsRegistrationFunction */ PixelType ComputeUpdate(const NeighborhoodType & neighborhood, - void * globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0)) override; + void * globalData, + const FloatOffsetType & offset = FloatOffsetType(0.0)) override; /** Compute update at the specified neighbourhood. */ void @@ -248,9 +248,9 @@ class ITK_TEMPLATE_EXPORT GPUDemonsRegistrationFunction * information for computing the metric. */ struct GlobalDataStruct { - double m_SumOfSquaredDifference; + double m_SumOfSquaredDifference; SizeValueType m_NumberOfPixelsProcessed; - double m_SumOfSquaredChange; + double m_SumOfSquaredChange; }; /* GPU kernel handle for GPUComputeUpdate */ @@ -261,14 +261,14 @@ class ITK_TEMPLATE_EXPORT GPUDemonsRegistrationFunction // SpacingType m_FixedImageSpacing; // PointType m_FixedImageOrigin; PixelType m_ZeroUpdateReturn{}; - double m_Normalizer{}; + double m_Normalizer{}; /** Function to compute derivatives of the fixed image. */ GradientCalculatorPointer m_FixedImageGradientCalculator{}; /** Function to compute derivatives of the moving image. */ MovingImageGradientCalculatorPointer m_MovingImageGradientCalculator{}; - bool m_UseMovingImageGradient{}; + bool m_UseMovingImageGradient{}; /** Function to interpolate the moving image. */ InterpolatorPointer m_MovingImageInterpolator{}; @@ -285,13 +285,13 @@ class ITK_TEMPLATE_EXPORT GPUDemonsRegistrationFunction /** The metric value is the mean square difference in intensity between * the fixed image and transforming moving image computed over the * the overlapping region between the two images. */ - mutable double m_Metric{}; - mutable double m_SumOfSquaredDifference{}; + mutable double m_Metric{}; + mutable double m_SumOfSquaredDifference{}; mutable SizeValueType m_NumberOfPixelsProcessed{}; - mutable double m_RMSChange{}; - mutable double m_SumOfSquaredChange{}; + mutable double m_RMSChange{}; + mutable double m_SumOfSquaredChange{}; - mutable GPUReduction::Pointer m_GPUPixelCounter{}; + mutable GPUReduction::Pointer m_GPUPixelCounter{}; mutable GPUReduction::Pointer m_GPUSquaredChange{}; mutable GPUReduction::Pointer m_GPUSquaredDifference{}; diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.hxx b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.hxx index e3e04f13fd6..8b234d3db4a 100644 --- a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.hxx +++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.hxx @@ -27,7 +27,7 @@ namespace itk template GPUDemonsRegistrationFunction::GPUDemonsRegistrationFunction() { - RadiusType r; + RadiusType r; unsigned int j; for (j = 0; j < ImageDimension; ++j) @@ -94,7 +94,7 @@ GPUDemonsRegistrationFunction::GP template void GPUDemonsRegistrationFunction::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -210,10 +210,10 @@ void GPUDemonsRegistrationFunction::GPUComputeUpdate( DisplacementFieldTypePointer output, DisplacementFieldTypePointer update, - void * itkNotUsed(gd)) + void * itkNotUsed(gd)) { - auto * fixedImage = const_cast(this->GetFixedImage()); - auto * movingImage = const_cast(this->GetMovingImage()); + auto * fixedImage = const_cast(this->GetFixedImage()); + auto * movingImage = const_cast(this->GetMovingImage()); typename DisplacementFieldType::SizeType outSize = output->GetLargestPossibleRegion().GetSize(); int imgSize[3]; @@ -285,14 +285,14 @@ template ::ComputeUpdate( const NeighborhoodType & it, - void * gd, - const FloatOffsetType & itkNotUsed(offset)) -> PixelType + void * gd, + const FloatOffsetType & itkNotUsed(offset)) -> PixelType { // Get fixed image related information // Note: no need to check the index is within // fixed image buffer. This is done by the external filter. const IndexType index = it.GetIndex(); - const auto fixedValue = static_cast(this->GetFixedImage()->GetPixel(index)); + const auto fixedValue = static_cast(this->GetFixedImage()->GetPixel(index)); // Get moving image related information PointType mappedPoint; diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h b/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h index 1a403d4e56f..d5b90334886 100644 --- a/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h +++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h @@ -169,9 +169,9 @@ class ITK_TEMPLATE_EXPORT GPUPDEDeformableRegistrationFilter * The smoothed field may be m_DisplacementField or m_UpdateBuffer. */ virtual void - GPUSmoothVectorField(DisplacementFieldPointer field, + GPUSmoothVectorField(DisplacementFieldPointer field, typename GPUDataManager::Pointer GPUSmoothingKernels[], - int GPUSmoothingKernelSizes[]); + int GPUSmoothingKernelSizes[]); virtual void AllocateSmoothingBuffer(); @@ -219,16 +219,16 @@ class ITK_TEMPLATE_EXPORT GPUPDEDeformableRegistrationFilter private: /** Memory buffer for smoothing kernels of the displacement field. */ - int m_SmoothingKernelSizes[ImageDimension]{}; - DeformationScalarType * m_SmoothingKernels[ImageDimension]{}; + int m_SmoothingKernelSizes[ImageDimension]{}; + DeformationScalarType * m_SmoothingKernels[ImageDimension]{}; typename GPUDataManager::Pointer m_GPUSmoothingKernels[ImageDimension]{}; /** Memory buffer for smoothing kernels of the update field. */ - int m_UpdateFieldSmoothingKernelSizes[ImageDimension]{}; - DeformationScalarType * m_UpdateFieldSmoothingKernels[ImageDimension]{}; + int m_UpdateFieldSmoothingKernelSizes[ImageDimension]{}; + DeformationScalarType * m_UpdateFieldSmoothingKernels[ImageDimension]{}; typename GPUDataManager::Pointer m_UpdateFieldGPUSmoothingKernels[ImageDimension]{}; - int * m_ImageSizes{}; + int * m_ImageSizes{}; typename GPUDataManager::Pointer m_GPUImageSizes{}; /* GPU kernel handle for GPUSmoothDisplacementField */ diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.hxx b/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.hxx index 5a4a34ec20d..378e7871680 100644 --- a/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.hxx +++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.hxx @@ -77,7 +77,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { GPUSuperclass::PrintSelf(os, indent); @@ -140,7 +140,7 @@ GPUPDEDeformableRegistrationFilterGetMovingImage(); - FixedImageConstPointer fixedPtr = this->GetFixedImage(); + FixedImageConstPointer fixedPtr = this->GetFixedImage(); if (!movingPtr || !fixedPtr) { @@ -244,7 +244,7 @@ GPUPDEDeformableRegistrationFilter(this->GetInput()); DisplacementFieldPointer outputPtr = this->GetOutput(); - FixedImagePointer fixedPtr = const_cast(this->GetFixedImage()); + FixedImagePointer fixedPtr = const_cast(this->GetFixedImage()); if (inputPtr) { @@ -311,9 +311,9 @@ GPUPDEDeformableRegistrationFilter void GPUPDEDeformableRegistrationFilter:: - GPUSmoothVectorField(DisplacementFieldPointer field, + GPUSmoothVectorField(DisplacementFieldPointer field, typename GPUDataManager::Pointer GPUSmoothingKernels[], - int GPUSmoothingKernelSizes[]) + int GPUSmoothingKernelSizes[]) { using GPUBufferImage = typename itk::GPUTraits::Type; using GPUOutputImage = typename itk::GPUTraits::Type; @@ -338,9 +338,9 @@ GPUPDEDeformableRegistrationFilterm_GPUKernelManager->GetKernelWorkGroupInfo( m_SmoothDisplacementFieldGPUKernelHandle, CL_KERNEL_WORK_GROUP_SIZE, &kernelWorkGroupSize); diff --git a/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest.cxx b/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest.cxx index 0876e82fff3..de8cede0217 100644 --- a/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest.cxx +++ b/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest.cxx @@ -72,10 +72,10 @@ class ShowProgressObject : public itk::Object }; constexpr unsigned int numberOfRepeatedTests = 1; -constexpr float displacementFieldSmoothingSigma = 1.0; -constexpr float updateFieldSmoothingSigma = 1.0; -constexpr float maximumRMSError = 0.01; -const bool smoothUpdateField = true; +constexpr float displacementFieldSmoothingSigma = 1.0; +constexpr float updateFieldSmoothingSigma = 1.0; +constexpr float maximumRMSError = 0.01; +const bool smoothUpdateField = true; itk::TimeProbe m_GPUTime; itk::TimeProbe m_CPUTime; @@ -97,7 +97,7 @@ AppendFileName(char * src, const char * postfix) size_t destLength = strlen(src) + strlen(postfix) + 1; char * dest = new char[destLength]; char * pos = strrchr(src, '.'); - int skip = pos - src; + int skip = pos - src; snprintf(dest, destLength, "%s", src); snprintf(dest + skip, destLength - skip, "%s%s", postfix, pos); @@ -143,8 +143,8 @@ int GPUDemonsRegistrationFilterTestTemplate(int argc, char * argv[]) { const unsigned int ImageDimension = VDimension; - bool passed; - unsigned int size1 = 0, size2 = 0; + bool passed; + unsigned int size1 = 0, size2 = 0; using InternalPixelType = float; using VectorPixelType = itk::Vector; @@ -226,7 +226,7 @@ TDisplacementFieldPointer itkGPUDemons(int, char * argv[]) { const unsigned int Dimension = VDimension; - unsigned int numOfIterations = std::stoi(argv[2]); + unsigned int numOfIterations = std::stoi(argv[2]); using PixelType = unsigned short; @@ -301,8 +301,8 @@ itkGPUDemons(int, char * argv[]) // warp the image with the deformation field using WarperType = itk::WarpImageFilter; using InterpolatorType = itk::LinearInterpolateImageFunction; - auto warper = WarperType::New(); - auto interpolator = InterpolatorType::New(); + auto warper = WarperType::New(); + auto interpolator = InterpolatorType::New(); typename FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); warper->SetInput(movingImageReader->GetOutput()); @@ -340,7 +340,7 @@ TDisplacementFieldPointer itkCPUDemons(int, char * argv[]) { const unsigned int Dimension = VDimension; - unsigned int numOfIterations = std::stoi(argv[2]); + unsigned int numOfIterations = std::stoi(argv[2]); using PixelType = unsigned short; @@ -388,7 +388,7 @@ itkCPUDemons(int, char * argv[]) auto filter = RegistrationFilterType::New(); using ProgressType = ShowProgressObject; - ProgressType progressWatch(filter); + ProgressType progressWatch(filter); typename itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ProgressType::ShowProgress); filter->AddObserver(itk::ProgressEvent(), command); @@ -409,8 +409,8 @@ itkCPUDemons(int, char * argv[]) // warp the image with the deformation field using WarperType = itk::WarpImageFilter; using InterpolatorType = itk::LinearInterpolateImageFunction; - auto warper = WarperType::New(); - auto interpolator = InterpolatorType::New(); + auto warper = WarperType::New(); + auto interpolator = InterpolatorType::New(); typename FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); warper->SetInput(movingImageReader->GetOutput()); diff --git a/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest2.cxx b/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest2.cxx index cc273ca8077..89cf2fa256d 100644 --- a/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest2.cxx +++ b/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest2.cxx @@ -56,9 +56,9 @@ class ShowProgressObject // Template function to fill in an image with a circle. template void -FillWithCircle(TImage * image, - double * center, - double radius, +FillWithCircle(TImage * image, + double * center, + double radius, typename TImage::PixelType foregnd, typename TImage::PixelType backgnd) { @@ -68,7 +68,7 @@ FillWithCircle(TImage * image, it.GoToBegin(); typename TImage::IndexType index; - double r2 = itk::Math::sqr(radius); + double r2 = itk::Math::sqr(radius); while (!it.IsAtEnd()) { @@ -131,7 +131,7 @@ itkGPUDemonsRegistrationFilterTest2(int argc, char * argv[]) std::cout << "Generate input images and initial deformation field" << std::endl; ImageType::SizeValueType sizeArray[ImageDimension] = { 128, 128 }; - SizeType size; + SizeType size; size.SetSize(sizeArray); IndexType index{}; @@ -154,8 +154,8 @@ itkGPUDemonsRegistrationFilterTest2(int argc, char * argv[]) initField->SetBufferedRegion(region); initField->Allocate(); - double center[ImageDimension]; - double radius; + double center[ImageDimension]; + double radius; PixelType fgnd = 250; PixelType bgnd = 15; @@ -224,7 +224,7 @@ itkGPUDemonsRegistrationFilterTest2(int argc, char * argv[]) registrator->SetStandardDeviations(v); using ProgressType = ShowProgressObject; - ProgressType progressWatch(registrator); + ProgressType progressWatch(registrator); itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ProgressType::ShowProgress); registrator->AddObserver(itk::ProgressEvent(), command); diff --git a/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h index ff01a719fae..5197d871764 100644 --- a/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h @@ -122,12 +122,12 @@ class ITK_TEMPLATE_EXPORT ANTSNeighborhoodCorrelationImageToImageMetricv4GetValu QueueRealType sFixedFixed; QueueRealType sMovingMoving; - FixedImageGradientType fixedImageGradient; + FixedImageGradientType fixedImageGradient; MovingImageGradientType movingImageGradient; - FixedImagePointType mappedFixedPoint; + FixedImagePointType mappedFixedPoint; MovingImagePointType mappedMovingPoint; - VirtualPointType virtualPoint; + VirtualPointType virtualPoint; }; // For dense scan over one image region @@ -135,14 +135,14 @@ class ITK_TEMPLATE_EXPORT ANTSNeighborhoodCorrelationImageToImageMetricv4GetValu { // const values during scanning ImageRegionType scanRegion; - SizeValueType numberOfFillZero; // for each queue - SizeValueType windowLength; // number of voxels in the scanning window - IndexValueType scanRegionBeginIndexDim0; + SizeValueType numberOfFillZero; // for each queue + SizeValueType windowLength; // number of voxels in the scanning window + IndexValueType scanRegionBeginIndexDim0; - typename FixedImageType::ConstPointer fixedImage; - typename MovingImageType::ConstPointer movingImage; + typename FixedImageType::ConstPointer fixedImage; + typename MovingImageType::ConstPointer movingImage; typename VirtualImageType::ConstPointer virtualImage; - RadiusType radius; + RadiusType radius; }; protected: @@ -186,7 +186,7 @@ class ITK_TEMPLATE_EXPORT ANTSNeighborhoodCorrelationImageToImageMetricv4GetValu bool ProcessVirtualPoint(const VirtualIndexType & virtualIndex, const VirtualPointType & virtualPoint, - const ThreadIdType threadId) override + const ThreadIdType threadId) override { return ProcessVirtualPoint_impl(IdentityHelper(), virtualIndex, virtualPoint, threadId); } @@ -194,17 +194,17 @@ class ITK_TEMPLATE_EXPORT ANTSNeighborhoodCorrelationImageToImageMetricv4GetValu /* specific overloading for sparse CC metric */ bool ProcessVirtualPoint_impl(IdentityHelper itkNotUsed(self), - const VirtualIndexType & virtualIndex, - const VirtualPointType & virtualPoint, - const ThreadIdType threadId); + const VirtualIndexType & virtualIndex, + const VirtualPointType & virtualPoint, + const ThreadIdType threadId); /* for other default case */ template bool - ProcessVirtualPoint_impl(IdentityHelper itkNotUsed(self), + ProcessVirtualPoint_impl(IdentityHelper itkNotUsed(self), const VirtualIndexType & virtualIndex, const VirtualPointType & virtualPoint, - const ThreadIdType threadId) + const ThreadIdType threadId) { return Superclass::ProcessVirtualPoint(virtualIndex, virtualPoint, threadId); } @@ -214,17 +214,17 @@ class ITK_TEMPLATE_EXPORT ANTSNeighborhoodCorrelationImageToImageMetricv4GetValu * It is not used for either sparse or dense threader. * */ bool - ProcessPoint(const VirtualIndexType & itkNotUsed(virtualIndex), - const VirtualPointType & itkNotUsed(virtualPoint), - const FixedImagePointType & itkNotUsed(mappedFixedPoint), - const FixedImagePixelType & itkNotUsed(mappedFixedPixelValue), - const FixedImageGradientType & itkNotUsed(mappedFixedImageGradient), - const MovingImagePointType & itkNotUsed(mappedMovingPoint), - const MovingImagePixelType & itkNotUsed(mappedMovingPixelValue), + ProcessPoint(const VirtualIndexType & itkNotUsed(virtualIndex), + const VirtualPointType & itkNotUsed(virtualPoint), + const FixedImagePointType & itkNotUsed(mappedFixedPoint), + const FixedImagePixelType & itkNotUsed(mappedFixedPixelValue), + const FixedImageGradientType & itkNotUsed(mappedFixedImageGradient), + const MovingImagePointType & itkNotUsed(mappedMovingPoint), + const MovingImagePixelType & itkNotUsed(mappedMovingPixelValue), const MovingImageGradientType & itkNotUsed(mappedMovingImageGradient), - MeasureType & itkNotUsed(metricValueReturn), - DerivativeType & itkNotUsed(localDerivativeReturn), - const ThreadIdType itkNotUsed(threadId)) const override + MeasureType & itkNotUsed(metricValueReturn), + DerivativeType & itkNotUsed(localDerivativeReturn), + const ThreadIdType itkNotUsed(threadId)) const override { itkExceptionMacro("ProcessPoint should never be reached in ANTS CC metric threader class."); } @@ -239,8 +239,8 @@ class ITK_TEMPLATE_EXPORT ANTSNeighborhoodCorrelationImageToImageMetricv4GetValu void ThreadedExecution_impl( IdentityHelper> itkNotUsed(self), - const DomainType & virtualImageSubRegion, - const ThreadIdType threadId); + const DomainType & virtualImageSubRegion, + const ThreadIdType threadId); /* for other default case */ template @@ -252,54 +252,54 @@ class ITK_TEMPLATE_EXPORT ANTSNeighborhoodCorrelationImageToImageMetricv4GetValu /** Create an iterator over the virtual sub region */ void InitializeScanning(const ImageRegionType & scanRegion, - ScanIteratorType & scanIt, - ScanMemType & scanMem, - ScanParametersType & scanParameters) const; + ScanIteratorType & scanIt, + ScanMemType & scanMem, + ScanParametersType & scanParameters) const; /** Update the queues for the next point. Calls either \c * UpdateQueuesAtBeginningOfLine or \c UpdateQueuesToNextScanWindow. */ void - UpdateQueues(const ScanIteratorType & scanIt, - ScanMemType & scanMem, + UpdateQueues(const ScanIteratorType & scanIt, + ScanMemType & scanMem, const ScanParametersType & scanParameters, - const ThreadIdType threadId) const; + const ThreadIdType threadId) const; void - UpdateQueuesAtBeginningOfLine(const ScanIteratorType & scanIt, - ScanMemType & scanMem, + UpdateQueuesAtBeginningOfLine(const ScanIteratorType & scanIt, + ScanMemType & scanMem, const ScanParametersType & scanParameters, - const ThreadIdType threadId) const; + const ThreadIdType threadId) const; /** Increment the iterator and check to see if we're at the end of the * line. If so, go to the next line. Otherwise, add the * the values for the next hyperplane. */ void - UpdateQueuesToNextScanWindow(const ScanIteratorType & scanIt, - ScanMemType & scanMem, + UpdateQueuesToNextScanWindow(const ScanIteratorType & scanIt, + ScanMemType & scanMem, const ScanParametersType & scanParameters, - const ThreadIdType threadId) const; + const ThreadIdType threadId) const; /** Test to see if there are any voxels we need to handle in the current * window. */ bool - ComputeInformationFromQueues(const ScanIteratorType & scanIt, - ScanMemType & scanMem, + ComputeInformationFromQueues(const ScanIteratorType & scanIt, + ScanMemType & scanMem, const ScanParametersType & scanParameters, - const ThreadIdType threadId) const; + const ThreadIdType threadId) const; void - ComputeMovingTransformDerivative(const ScanIteratorType & scanIt, - ScanMemType & scanMem, + ComputeMovingTransformDerivative(const ScanIteratorType & scanIt, + ScanMemType & scanMem, const ScanParametersType & scanParameters, - DerivativeType & deriv, - MeasureType & localCC, - const ThreadIdType threadId) const; + DerivativeType & deriv, + MeasureType & localCC, + const ThreadIdType threadId) const; private: /** Internal pointer to the metric object in use by this threader. * This will avoid costly dynamic casting in tight loops. */ TNeighborhoodCorrelationMetric * m_ANTSAssociate{}; - std::once_flag m_ANTSAssociateOnceFlag{}; + std::once_flag m_ANTSAssociateOnceFlag{}; }; diff --git a/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx b/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx index 55fa0ce1d9d..7264c309104 100644 --- a/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx +++ b/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx @@ -29,8 +29,8 @@ ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader:: ThreadedExecution_impl( IdentityHelper> itkNotUsed(self), - const DomainType & virtualImageSubRegion, - const ThreadIdType threadId) + const DomainType & virtualImageSubRegion, + const ThreadIdType threadId) { /* Store the casted pointer to avoid dynamic casting in tight loops. */ auto associate = dynamic_cast(this->m_Associate); @@ -41,13 +41,13 @@ ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreaderm_ANTSAssociateOnceFlag, [this, &associate]() { this->m_ANTSAssociate = associate; }); - VirtualPointType virtualPoint; - MeasureType metricValueResult{}; - MeasureType metricValueSum{}; - bool pointIsValid; - ScanIteratorType scanIt; + VirtualPointType virtualPoint; + MeasureType metricValueResult{}; + MeasureType metricValueSum{}; + bool pointIsValid; + ScanIteratorType scanIt; ScanParametersType scanParameters; - ScanMemType scanMem; + ScanMemType scanMem; DerivativeType & localDerivativeResult = this->m_GetValueAndDerivativePerThreadVariables[threadId].LocalDerivatives; @@ -109,7 +109,7 @@ void ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, - TNeighborhoodCorrelationMetric>::ThreadedExecution_impl(IdentityHelper itkNotUsed(self), + TNeighborhoodCorrelationMetric>::ThreadedExecution_impl(IdentityHelper itkNotUsed(self), const DomainType & domain, const ThreadIdType threadId) { @@ -131,8 +131,8 @@ void ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, - TNeighborhoodCorrelationMetric>::UpdateQueuesAtBeginningOfLine(const ScanIteratorType & scanIt, - ScanMemType & scanMem, + TNeighborhoodCorrelationMetric>::UpdateQueuesAtBeginningOfLine(const ScanIteratorType & scanIt, + ScanMemType & scanMem, const ScanParametersType & scanParameters, const ThreadIdType) const { @@ -166,7 +166,7 @@ ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< { typename ScanIteratorType::OffsetType internalIndex; typename ScanIteratorType::OffsetType offset; - const bool isInBounds = scanIt.IndexInBounds(indct, internalIndex, offset); + const bool isInBounds = scanIt.IndexInBounds(indct, internalIndex, offset); if (!isInBounds) { // std::cout << "DEBUG: error" << std::endl; @@ -175,9 +175,9 @@ ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< const typename VirtualImageType::IndexType index = scanIt.GetIndex(indct); - VirtualPointType virtualPoint; - FixedImagePointType mappedFixedPoint; - FixedImagePixelType fixedImageValue; + VirtualPointType virtualPoint; + FixedImagePointType mappedFixedPoint; + FixedImagePixelType fixedImageValue; MovingImagePointType mappedMovingPoint; MovingImagePixelType movingImageValue; @@ -226,8 +226,8 @@ void ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, - TNeighborhoodCorrelationMetric>::UpdateQueuesToNextScanWindow(const ScanIteratorType & scanIt, - ScanMemType & scanMem, + TNeighborhoodCorrelationMetric>::UpdateQueuesToNextScanWindow(const ScanIteratorType & scanIt, + ScanMemType & scanMem, const ScanParametersType & scanParameters, const ThreadIdType) const { @@ -250,7 +250,7 @@ ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< { typename ScanIteratorType::OffsetType internalIndex; typename ScanIteratorType::OffsetType offset; - const bool isInBounds = scanIt.IndexInBounds(indct, internalIndex, offset); + const bool isInBounds = scanIt.IndexInBounds(indct, internalIndex, offset); if (!isInBounds) { @@ -259,9 +259,9 @@ ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< const typename VirtualImageType::IndexType index = scanIt.GetIndex(indct); - VirtualPointType virtualPoint; - FixedImagePointType mappedFixedPoint; - FixedImagePixelType fixedImageValue; + VirtualPointType virtualPoint; + FixedImagePointType mappedFixedPoint; + FixedImagePixelType fixedImageValue; MovingImagePointType mappedMovingPoint; MovingImagePixelType movingImageValue; @@ -315,9 +315,9 @@ ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric>::InitializeScanning(const ImageRegionType & scanRegion, - ScanIteratorType & scanIt, - ScanMemType & scanMem, - ScanParametersType & scanParameters) const + ScanIteratorType & scanIt, + ScanMemType & scanMem, + ScanParametersType & scanParameters) const { scanParameters.scanRegion = scanRegion; scanParameters.fixedImage = this->m_ANTSAssociate->m_FixedImage; @@ -355,10 +355,10 @@ void ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, - TNeighborhoodCorrelationMetric>::UpdateQueues(const ScanIteratorType & scanIt, - ScanMemType & scanMem, + TNeighborhoodCorrelationMetric>::UpdateQueues(const ScanIteratorType & scanIt, + ScanMemType & scanMem, const ScanParametersType & scanParameters, - const ThreadIdType threadId) const + const ThreadIdType threadId) const { if (scanIt.GetIndex()[0] == scanParameters.scanRegionBeginIndexDim0) { @@ -377,7 +377,7 @@ ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric>::ComputeInformationFromQueues(const ScanIteratorType & scanIt, - ScanMemType & scanMem, + ScanMemType & scanMem, const ScanParametersType &, const ThreadIdType) const { @@ -406,11 +406,11 @@ ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< LocalRealType sumFixed = localZero; LocalRealType sumMoving = localZero; LocalRealType sumFixedMoving = localZero; - auto itFixed2 = scanMem.QsumFixed2.begin(); - auto itMoving2 = scanMem.QsumMoving2.begin(); - auto itFixed = scanMem.QsumFixed.begin(); - auto itMoving = scanMem.QsumMoving.begin(); - auto itFixedMoving = scanMem.QsumFixedMoving.begin(); + auto itFixed2 = scanMem.QsumFixed2.begin(); + auto itMoving2 = scanMem.QsumMoving2.begin(); + auto itFixed = scanMem.QsumFixed.begin(); + auto itMoving = scanMem.QsumMoving.begin(); + auto itFixedMoving = scanMem.QsumFixedMoving.begin(); while (itFixed2 != scanMem.QsumFixed2.end()) { @@ -439,14 +439,14 @@ ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< const typename VirtualImageType::IndexType oindex = scanIt.GetIndex(); - VirtualPointType virtualPoint; - FixedImagePointType mappedFixedPoint; - FixedImagePixelType fixedImageValue; - FixedImageGradientType fixedImageGradient; - MovingImagePointType mappedMovingPoint; - MovingImagePixelType movingImageValue; + VirtualPointType virtualPoint; + FixedImagePointType mappedFixedPoint; + FixedImagePixelType fixedImageValue; + FixedImageGradientType fixedImageGradient; + MovingImagePointType mappedMovingPoint; + MovingImagePixelType movingImageValue; MovingImageGradientType movingImageGradient; - bool pointIsValid; + bool pointIsValid; this->m_ANTSAssociate->TransformVirtualIndexToPhysicalPoint(oindex, virtualPoint); @@ -512,8 +512,8 @@ ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TNeighborhoodCorrelationMetric>::ComputeMovingTransformDerivative(const ScanIteratorType &, ScanMemType & scanMem, const ScanParametersType &, - DerivativeType & deriv, - MeasureType & localCC, + DerivativeType & deriv, + MeasureType & localCC, const ThreadIdType threadId) const { MovingImageGradientType derivWRTImage; @@ -585,22 +585,22 @@ ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader:: ProcessVirtualPoint_impl(IdentityHelper itkNotUsed(self), - const VirtualIndexType & virtualIndex, - const VirtualPointType & itkNotUsed(virtualPoint), - const ThreadIdType threadId) + const VirtualIndexType & virtualIndex, + const VirtualPointType & itkNotUsed(virtualPoint), + const ThreadIdType threadId) { - MeasureType metricValueResult{}; - bool pointIsValid; - ScanIteratorType scanIt; + MeasureType metricValueResult{}; + bool pointIsValid; + ScanIteratorType scanIt; ScanParametersType scanParameters; - ScanMemType scanMem; + ScanMemType scanMem; DerivativeType & localDerivativeResult = this->m_GetValueAndDerivativePerThreadVariables[threadId].LocalDerivatives; // convert virtualPoint to a single point region - auto singlePointSize = ImageRegionType::SizeType::Filled(1); + auto singlePointSize = ImageRegionType::SizeType::Filled(1); const ImageRegionType singlePointRegion(virtualIndex, singlePointSize); // use scanning variables just for a single point region diff --git a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.h index 5ac296e574e..ef39a567047 100644 --- a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.h @@ -115,8 +115,8 @@ class ITK_TEMPLATE_EXPORT CorrelationImageToImageMetricv4 /* Image dimension accessors */ static constexpr typename TVirtualImage::ImageDimensionType VirtualImageDimension = TVirtualImage::ImageDimension; - static constexpr typename TFixedImage::ImageDimensionType FixedImageDimension = TFixedImage::ImageDimension; - static constexpr typename TMovingImage::ImageDimensionType MovingImageDimension = TMovingImage::ImageDimension; + static constexpr typename TFixedImage::ImageDimensionType FixedImageDimension = TFixedImage::ImageDimension; + static constexpr typename TMovingImage::ImageDimensionType MovingImageDimension = TMovingImage::ImageDimension; protected: CorrelationImageToImageMetricv4(); @@ -166,7 +166,7 @@ class ITK_TEMPLATE_EXPORT CorrelationImageToImageMetricv4 using CorrelationHelperSparseThreaderType = CorrelationImageToImageMetricv4HelperThreader; - typename CorrelationHelperDenseThreaderType::Pointer m_HelperDenseThreader{}; + typename CorrelationHelperDenseThreaderType::Pointer m_HelperDenseThreader{}; typename CorrelationHelperSparseThreaderType::Pointer m_HelperSparseThreader{}; /* These values are computed during InitializeForIteration(), diff --git a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h index feeeb3d8145..636ab2630da 100644 --- a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h @@ -102,23 +102,23 @@ class ITK_TEMPLATE_EXPORT CorrelationImageToImageMetricv4GetValueAndDerivativeTh bool ProcessVirtualPoint(const VirtualIndexType & virtualIndex, const VirtualPointType & virtualPoint, - const ThreadIdType threadId) override; + const ThreadIdType threadId) override; /** This function computes the local voxel-wise contribution of * the metric to the global integral of the metric/derivative. */ bool - ProcessPoint(const VirtualIndexType & virtualIndex, - const VirtualPointType & virtualPoint, - const FixedImagePointType & mappedFixedPoint, - const FixedImagePixelType & fixedImageValue, - const FixedImageGradientType & mappedFixedImageGradient, - const MovingImagePointType & mappedMovingPoint, - const MovingImagePixelType & movingImageValue, + ProcessPoint(const VirtualIndexType & virtualIndex, + const VirtualPointType & virtualPoint, + const FixedImagePointType & mappedFixedPoint, + const FixedImagePixelType & fixedImageValue, + const FixedImageGradientType & mappedFixedImageGradient, + const MovingImagePointType & mappedMovingPoint, + const MovingImagePixelType & movingImageValue, const MovingImageGradientType & movingImageGradient, - MeasureType & metricValueReturn, - DerivativeType & localDerivativeReturn, - const ThreadIdType threadId) const override; + MeasureType & metricValueReturn, + DerivativeType & localDerivativeReturn, + const ThreadIdType threadId) const override; private: /* @@ -131,14 +131,14 @@ class ITK_TEMPLATE_EXPORT CorrelationImageToImageMetricv4GetValueAndDerivativeTh * image: see the comments below */ struct CorrelationMetricValueDerivativePerThreadStruct - { // keep cumulative summation over points for: - InternalComputationValueType fm; // (f_i - \bar f) * (m_i - \bar m) - InternalComputationValueType m2; // (m_i - \bar m)^2 - InternalComputationValueType f2; // (f_i - \bar m)^2 - InternalComputationValueType m; // m_i - InternalComputationValueType f; // f_i - DerivativeType fdm; // (f_i - \bar f) * dm_i/dp - DerivativeType mdm; // (m_i - \bar m) * dm_i/dp + { // keep cumulative summation over points for: + InternalComputationValueType fm; // (f_i - \bar f) * (m_i - \bar m) + InternalComputationValueType m2; // (m_i - \bar m)^2 + InternalComputationValueType f2; // (f_i - \bar m)^2 + InternalComputationValueType m; // m_i + InternalComputationValueType f; // f_i + DerivativeType fdm; // (f_i - \bar f) * dm_i/dp + DerivativeType mdm; // (m_i - \bar m) * dm_i/dp }; itkPadStruct(ITK_CACHE_LINE_ALIGNMENT, diff --git a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx index aabae7cf9c4..3982c055384 100644 --- a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx +++ b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx @@ -86,7 +86,7 @@ CorrelationImageToImageMetricv4GetValueAndDerivativeThreaderGetCachedNumberOfParameters(); - const ThreadIdType numWorkUnitsUsed = this->GetNumberOfWorkUnitsUsed(); + const ThreadIdType numWorkUnitsUsed = this->GetNumberOfWorkUnitsUsed(); /* Store the number of valid points the enclosing class \c * m_NumberOfValidPoints by collecting the valid points per thread. */ @@ -167,12 +167,12 @@ CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TImageToImageMetric, TCorrelationMetric>::ProcessVirtualPoint(const VirtualIndexType & virtualIndex, const VirtualPointType & virtualPoint, - const ThreadIdType threadId) + const ThreadIdType threadId) { - FixedImagePointType mappedFixedPoint; - FixedImagePixelType mappedFixedPixelValue; + FixedImagePointType mappedFixedPoint; + FixedImagePixelType mappedFixedPixelValue; FixedImageGradientType mappedFixedImageGradient; - bool pointIsValid = false; + bool pointIsValid = false; /* Transform the point into fixed and moving spaces, and evaluate. * Different behavior with pre-warping enabled is handled transparently. * Do this in a try block to catch exceptions and print more useful info @@ -200,8 +200,8 @@ CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< return pointIsValid; } - MovingImagePointType mappedMovingPoint; - MovingImagePixelType mappedMovingPixelValue; + MovingImagePointType mappedMovingPoint; + MovingImagePixelType mappedMovingPixelValue; MovingImageGradientType mappedMovingImageGradient; try { @@ -263,17 +263,17 @@ bool CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, - TCorrelationMetric>::ProcessPoint(const VirtualIndexType & itkNotUsed(virtualIndex), - const VirtualPointType & virtualPoint, - const FixedImagePointType & itkNotUsed(mappedFixedPoint), - const FixedImagePixelType & fixedImageValue, - const FixedImageGradientType & itkNotUsed(mappedFixedImageGradient), - const MovingImagePointType & itkNotUsed(mappedMovingPoint), - const MovingImagePixelType & movingImageValue, + TCorrelationMetric>::ProcessPoint(const VirtualIndexType & itkNotUsed(virtualIndex), + const VirtualPointType & virtualPoint, + const FixedImagePointType & itkNotUsed(mappedFixedPoint), + const FixedImagePixelType & fixedImageValue, + const FixedImageGradientType & itkNotUsed(mappedFixedImageGradient), + const MovingImagePointType & itkNotUsed(mappedMovingPoint), + const MovingImagePixelType & movingImageValue, const MovingImageGradientType & movingImageGradient, - MeasureType & itkNotUsed(metricValueReturn), - DerivativeType & itkNotUsed(localDerivativeReturn), - const ThreadIdType threadId) const + MeasureType & itkNotUsed(metricValueReturn), + DerivativeType & itkNotUsed(localDerivativeReturn), + const ThreadIdType threadId) const { /* diff --git a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.h b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.h index 09659141245..01b81b9164f 100644 --- a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.h +++ b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.h @@ -101,7 +101,7 @@ class ITK_TEMPLATE_EXPORT CorrelationImageToImageMetricv4HelperThreader bool ProcessVirtualPoint(const VirtualIndexType & virtualIndex, const VirtualPointType & virtualPoint, - const ThreadIdType threadId) override; + const ThreadIdType threadId) override; /** diff --git a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.hxx b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.hxx index c0be5965cc6..bca298b8184 100644 --- a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.hxx +++ b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.hxx @@ -96,13 +96,13 @@ bool CorrelationImageToImageMetricv4HelperThreader:: ProcessVirtualPoint(const VirtualIndexType & itkNotUsed(virtualIndex), const VirtualPointType & virtualPoint, - const ThreadIdType threadId) + const ThreadIdType threadId) { - FixedImagePointType mappedFixedPoint; - FixedImagePixelType mappedFixedPixelValue; + FixedImagePointType mappedFixedPoint; + FixedImagePixelType mappedFixedPixelValue; MovingImagePointType mappedMovingPoint; MovingImagePixelType mappedMovingPixelValue; - bool pointIsValid = false; + bool pointIsValid = false; /* Transform the point into fixed and moving spaces, and evaluate. * Different behavior with pre-warping enabled is handled transparently. diff --git a/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4.hxx index 71168766bfe..68e76291723 100644 --- a/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4.hxx @@ -69,7 +69,7 @@ DemonsImageToImageMetricv4GetGradientSource() == ObjectToObjectMetricBaseTemplateEnums::GradientSource::GRADIENT_SOURCE_FIXED) { diff --git a/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h index 4d8c904a3ec..6cbb8d4dc10 100644 --- a/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h @@ -80,17 +80,17 @@ class ITK_TEMPLATE_EXPORT DemonsImageToImageMetricv4GetValueAndDerivativeThreade * the metric to the global integral of the metric/derivative. */ bool - ProcessPoint(const VirtualIndexType & virtualIndex, - const VirtualPointType & virtualPoint, - const FixedImagePointType & mappedFixedPoint, - const FixedImagePixelType & fixedImageValue, - const FixedImageGradientType & fixedImageGradient, - const MovingImagePointType & mappedMovingPoint, - const MovingImagePixelType & movingImageValue, + ProcessPoint(const VirtualIndexType & virtualIndex, + const VirtualPointType & virtualPoint, + const FixedImagePointType & mappedFixedPoint, + const FixedImagePixelType & fixedImageValue, + const FixedImageGradientType & fixedImageGradient, + const MovingImagePointType & mappedMovingPoint, + const MovingImagePixelType & movingImageValue, const MovingImageGradientType & movingImageGradient, - MeasureType & metricValueReturn, - DerivativeType & localDerivativeReturn, - const ThreadIdType threadId) const override; + MeasureType & metricValueReturn, + DerivativeType & localDerivativeReturn, + const ThreadIdType threadId) const override; private: /** Internal pointer to the Mattes metric object in use by this threader. diff --git a/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.hxx b/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.hxx index dc567871776..859a639e687 100644 --- a/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.hxx +++ b/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.hxx @@ -42,13 +42,13 @@ DemonsImageToImageMetricv4GetValueAndDerivativeThreaderm_DemonsAssociate->GetGradientSourceIncludesFixed()) { diff --git a/Modules/Registration/Metricsv4/include/itkEuclideanDistancePointSetToPointSetMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkEuclideanDistancePointSetToPointSetMetricv4.hxx index 213c97d8f7f..8ad2427cc68 100644 --- a/Modules/Registration/Metricsv4/include/itkEuclideanDistancePointSetToPointSetMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkEuclideanDistancePointSetToPointSetMetricv4.hxx @@ -47,10 +47,10 @@ typename EuclideanDistancePointSetToPointSetMetricv4 void EuclideanDistancePointSetToPointSetMetricv4:: - GetLocalNeighborhoodValueAndDerivative(const PointType & point, - MeasureType & measure, + GetLocalNeighborhoodValueAndDerivative(const PointType & point, + MeasureType & measure, LocalDerivativeType & localDerivative, - const PixelType & itkNotUsed(pixel)) const + const PixelType & itkNotUsed(pixel)) const { PointType closestPoint{}; @@ -77,7 +77,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); } diff --git a/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.h b/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.h index 01d9050aa7c..1458642b99f 100644 --- a/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.h @@ -135,9 +135,9 @@ class ITK_TEMPLATE_EXPORT ExpectationBasedPointSetToPointSetMetricv4 using NeighborsIterator = typename NeighborsIdentifierType::const_iterator; CoordinateType m_PointSetSigma{}; - MeasureType m_PreFactor{}; - MeasureType m_Denominator{}; - unsigned int m_EvaluationKNeighborhood{ 50 }; + MeasureType m_PreFactor{}; + MeasureType m_Denominator{}; + unsigned int m_EvaluationKNeighborhood{ 50 }; }; } // end namespace itk diff --git a/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.hxx index 27fb988d5f0..b0b47070fa2 100644 --- a/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.hxx @@ -60,7 +60,7 @@ typename ExpectationBasedPointSetToPointSetMetricv4m_MovingTransformedPointSet->GetPoint(*it); + const PointType neighbor = this->m_MovingTransformedPointSet->GetPoint(*it); const MeasureType distance = point.SquaredEuclideanDistanceTo(neighbor); localValue -= this->m_PreFactor * std::exp(-distance / this->m_Denominator); } @@ -71,10 +71,10 @@ typename ExpectationBasedPointSetToPointSetMetricv4 void ExpectationBasedPointSetToPointSetMetricv4:: - GetLocalNeighborhoodValueAndDerivative(const PointType & point, - MeasureType & measure, + GetLocalNeighborhoodValueAndDerivative(const PointType & point, + MeasureType & measure, LocalDerivativeType & localDerivative, - const PixelType & itkNotUsed(pixel)) const + const PixelType & itkNotUsed(pixel)) const { Array measureValues; measureValues.SetSize(this->m_EvaluationKNeighborhood); @@ -92,7 +92,7 @@ ExpectationBasedPointSetToPointSetMetricv4m_MovingTransformedPointSet->GetPoint(*it); + const PointType neighbor = this->m_MovingTransformedPointSet->GetPoint(*it); const MeasureType distance = point.SquaredEuclideanDistanceTo(neighbor); measureValues[it - neighborhood.begin()] = -this->m_PreFactor * std::exp(-distance / this->m_Denominator); measureSum += measureValues[it - neighborhood.begin()]; @@ -106,7 +106,7 @@ ExpectationBasedPointSetToPointSetMetricv4m_MovingTransformedPointSet->GetPoint(*it); + const PointType neighbor = this->m_MovingTransformedPointSet->GetPoint(*it); const VectorType neighborVector = neighbor.GetVectorFromOrigin(); weightedPoint += (neighborVector * measureValues[it - neighborhood.begin()] / measure); } @@ -141,7 +141,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h index 9bdbb72f843..a219c96cb71 100644 --- a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h @@ -685,14 +685,14 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4 */ bool TransformAndEvaluateFixedPoint(const VirtualPointType & virtualPoint, - FixedImagePointType & mappedFixedPoint, - FixedImagePixelType & mappedFixedPixelValue) const; + FixedImagePointType & mappedFixedPoint, + FixedImagePixelType & mappedFixedPixelValue) const; /** Transform and evaluate a point from VirtualImage domain to MovingImage domain. */ bool TransformAndEvaluateMovingPoint(const VirtualPointType & virtualPoint, - MovingImagePointType & mappedMovingPoint, - MovingImagePixelType & mappedMovingPixelValue) const; + MovingImagePointType & mappedMovingPoint, + MovingImagePixelType & mappedMovingPixelValue) const; /** Compute image derivatives for a Fixed point. */ virtual void @@ -733,13 +733,13 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4 /** Get accessor for flag to calculate derivative. */ itkGetConstMacro(ComputeDerivative, bool); - FixedImageConstPointer m_FixedImage{}; + FixedImageConstPointer m_FixedImage{}; MovingImageConstPointer m_MovingImage{}; /** Pointers to interpolators */ - FixedInterpolatorPointer m_FixedInterpolator{}; - MovingInterpolatorPointer m_MovingInterpolator{}; - typename FixedImageGradientInterpolatorType::Pointer m_FixedImageGradientInterpolator{}; + FixedInterpolatorPointer m_FixedInterpolator{}; + MovingInterpolatorPointer m_MovingInterpolator{}; + typename FixedImageGradientInterpolatorType::Pointer m_FixedImageGradientInterpolator{}; typename MovingImageGradientInterpolatorType::Pointer m_MovingImageGradientInterpolator{}; /** Flag to control use of precomputed gradient filter image or gradient @@ -748,25 +748,25 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4 bool m_UseMovingImageGradientFilter{}; /** Gradient filters */ - FixedImageGradientFilterPointer m_FixedImageGradientFilter{}; + FixedImageGradientFilterPointer m_FixedImageGradientFilter{}; MovingImageGradientFilterPointer m_MovingImageGradientFilter{}; /** Pointer to default gradient filter. Used for easier * initialization of the default filter. */ - typename DefaultFixedImageGradientFilter::Pointer m_DefaultFixedImageGradientFilter{}; + typename DefaultFixedImageGradientFilter::Pointer m_DefaultFixedImageGradientFilter{}; typename DefaultMovingImageGradientFilter::Pointer m_DefaultMovingImageGradientFilter{}; /** Pointer to default gradient calculators. Used for easier * initialization of the default filter. */ - typename DefaultFixedImageGradientCalculator::Pointer m_DefaultFixedImageGradientCalculator{}; + typename DefaultFixedImageGradientCalculator::Pointer m_DefaultFixedImageGradientCalculator{}; typename DefaultMovingImageGradientCalculator::Pointer m_DefaultMovingImageGradientCalculator{}; /** Gradient images to store gradient filter output. */ - mutable FixedImageGradientImagePointer m_FixedImageGradientImage{}; + mutable FixedImageGradientImagePointer m_FixedImageGradientImage{}; mutable MovingImageGradientImagePointer m_MovingImageGradientImage{}; /** Image gradient calculators */ - FixedImageGradientCalculatorPointer m_FixedImageGradientCalculator{}; + FixedImageGradientCalculatorPointer m_FixedImageGradientCalculator{}; MovingImageGradientCalculatorPointer m_MovingImageGradientCalculator{}; /** Derivative results holder. Uses a raw pointer so we can point it @@ -778,12 +778,12 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4 mutable DerivativeType * m_DerivativeResult{}; /** Masks */ - FixedImageMaskConstPointer m_FixedImageMask{}; + FixedImageMaskConstPointer m_FixedImageMask{}; MovingImageMaskConstPointer m_MovingImageMask{}; /** Sampled point sets */ FixedSampledPointSetConstPointer m_FixedSampledPointSet{}; - VirtualPointSetPointer m_VirtualSampledPointSet{}; + VirtualPointSetPointer m_VirtualSampledPointSet{}; /** Flag to use a SampledPointSet, i.e. Sparse sampling. */ bool m_UseSampledPointSet{}; @@ -806,14 +806,14 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4 /** Transform a point. Avoid cast if possible */ void LocalTransformPoint(const typename FixedTransformType::OutputPointType & virtualPoint, - typename FixedTransformType::OutputPointType & mappedFixedPoint) const + typename FixedTransformType::OutputPointType & mappedFixedPoint) const { mappedFixedPoint = this->m_FixedTransform->TransformPoint(virtualPoint); } // cast the virtual point template void - LocalTransformPoint(const TVirtualPoint & virtualPoint, + LocalTransformPoint(const TVirtualPoint & virtualPoint, typename FixedTransformType::OutputPointType & mappedFixedPoint) const { typename FixedTransformType::OutputPointType localVirtualPoint; @@ -826,7 +826,7 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4 template void LocalTransformPoint(const typename FixedTransformType::OutputPointType & virtualPoint, - TFixedImagePoint & mappedFixedPoint) const + TFixedImagePoint & mappedFixedPoint) const { typename FixedTransformType::OutputPointType localMappedFixedPoint; localMappedFixedPoint.CastFrom(mappedFixedPoint); @@ -857,7 +857,7 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4 * For informational purposes. */ SizeValueType m_NumberOfSkippedFixedSampledPoints{}; - bool m_UseFloatingPointCorrection{}; + bool m_UseFloatingPointCorrection{}; DerivativeValueType m_FloatingPointCorrectionResolution{}; MetricTraits m_MetricTraits{}; diff --git a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.hxx index f8cb55ecf56..8c77ebe1ad8 100644 --- a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.hxx @@ -304,8 +304,8 @@ template :: TransformAndEvaluateFixedPoint(const VirtualPointType & virtualPoint, - FixedImagePointType & mappedFixedPoint, - FixedImagePixelType & mappedFixedPixelValue) const + FixedImagePointType & mappedFixedPoint, + FixedImagePixelType & mappedFixedPixelValue) const { bool pointIsValid = true; mappedFixedPixelValue = FixedImagePixelType{}; @@ -345,8 +345,8 @@ template :: TransformAndEvaluateMovingPoint(const VirtualPointType & virtualPoint, - MovingImagePointType & mappedMovingPoint, - MovingImagePixelType & mappedMovingPixelValue) const + MovingImagePointType & mappedMovingPoint, + MovingImagePixelType & mappedMovingPixelValue) const { bool pointIsValid = true; mappedMovingPixelValue = MovingImagePixelType{}; @@ -480,7 +480,7 @@ ImageToImageMetricv4m_FixedImage->GetSpacing(); - double maximumSpacing = 0.0; + double maximumSpacing = 0.0; for (ImageDimensionType i = 0; i < FixedImageDimension; ++i) { if (spacing[i] > maximumSpacing) @@ -504,7 +504,7 @@ ImageToImageMetricv4m_MovingImage->GetSpacing(); - double maximumSpacing = 0.0; + double maximumSpacing = 0.0; for (ImageDimensionType i = 0; i < MovingImageDimension; ++i) { if (spacing[i] > maximumSpacing) @@ -609,7 +609,7 @@ ImageToImageMetricv4End()) { const typename FixedSampledPointSetType::PointType point = inverseTransform->TransformPoint(fixedIt.Value()); - typename VirtualImageType::IndexType tempIndex; + typename VirtualImageType::IndexType tempIndex; /* Verify that the point is valid. We may be working with a resized virtual domain, * and a fixed sampled point list that was created before the resizing. */ if (this->TransformPhysicalPointToVirtualIndex(point, tempIndex)) @@ -661,7 +661,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.hxx b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.hxx index ed36f9b59b8..24aa50721b2 100644 --- a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.hxx +++ b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.hxx @@ -50,13 +50,13 @@ ImageToImageMetricv4GetValueAndDerivativeThreaderm_Associate->GetVirtualSampledPointSet(); using ElementIdentifierType = typename TImageToImageMetricv4::VirtualPointSetType::MeshTraits::PointIdentifier; - const ElementIdentifierType begin = indexSubRange[0]; - const ElementIdentifierType end = indexSubRange[1]; + const ElementIdentifierType begin = indexSubRange[0]; + const ElementIdentifierType end = indexSubRange[1]; const typename VirtualImageType::ConstPointer virtualImage = this->m_Associate->GetVirtualImage(); for (ElementIdentifierType i = begin; i <= end; ++i) { const VirtualPointType & virtualPoint = virtualSampledPointSet->GetPoint(i); - const auto virtualIndex = virtualImage->TransformPhysicalPointToIndex(virtualPoint); + const auto virtualIndex = virtualImage->TransformPhysicalPointToIndex(virtualPoint); this->ProcessVirtualPoint(virtualIndex, virtualPoint, threadId); } // Finalize per thread actions diff --git a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h index 830495ff0ec..75bd13a2378 100644 --- a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h +++ b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h @@ -120,7 +120,7 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4GetValueAndDerivativeThreaderBase virtual bool ProcessVirtualPoint(const VirtualIndexType & virtualIndex, const VirtualPointType & virtualPoint, - const ThreadIdType threadId); + const ThreadIdType threadId); /** Method to calculate the metric value and derivative * given a point, value and image derivative for both fixed and moving @@ -151,17 +151,17 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4GetValueAndDerivativeThreaderBase * \warning This is called from the threader, and thus must be thread-safe. */ virtual bool - ProcessPoint(const VirtualIndexType & virtualIndex, - const VirtualPointType & virtualPoint, - const FixedImagePointType & mappedFixedPoint, - const FixedImagePixelType & mappedFixedPixelValue, - const FixedImageGradientType & mappedFixedImageGradient, - const MovingImagePointType & mappedMovingPoint, - const MovingImagePixelType & mappedMovingPixelValue, + ProcessPoint(const VirtualIndexType & virtualIndex, + const VirtualPointType & virtualPoint, + const FixedImagePointType & mappedFixedPoint, + const FixedImagePixelType & mappedFixedPixelValue, + const FixedImageGradientType & mappedFixedImageGradient, + const MovingImagePointType & mappedMovingPoint, + const MovingImagePixelType & mappedMovingPixelValue, const MovingImageGradientType & mappedMovingImageGradient, - MeasureType & metricValueReturn, - DerivativeType & localDerivativeReturn, - const ThreadIdType threadId) const = 0; + MeasureType & metricValueReturn, + DerivativeType & localDerivativeReturn, + const ThreadIdType threadId) const = 0; /** Store derivative result from a single point calculation. diff --git a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.hxx b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.hxx index 89a2d966797..0d5059e45a1 100644 --- a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.hxx +++ b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.hxx @@ -176,16 +176,16 @@ bool ImageToImageMetricv4GetValueAndDerivativeThreaderBase::ProcessVirtualPoint( const VirtualIndexType & virtualIndex, const VirtualPointType & virtualPoint, - const ThreadIdType threadId) + const ThreadIdType threadId) { - FixedImagePointType mappedFixedPoint; - FixedImagePixelType mappedFixedPixelValue; - FixedImageGradientType mappedFixedImageGradient; - MovingImagePointType mappedMovingPoint; - MovingImagePixelType mappedMovingPixelValue; + FixedImagePointType mappedFixedPoint; + FixedImagePixelType mappedFixedPixelValue; + FixedImageGradientType mappedFixedImageGradient; + MovingImagePointType mappedMovingPoint; + MovingImagePixelType mappedMovingPixelValue; MovingImageGradientType mappedMovingImageGradient; - bool pointIsValid = false; - MeasureType metricValueResult; + bool pointIsValid = false; + MeasureType metricValueResult; /* Transform the point into fixed and moving spaces, and evaluate. * Do this in a try block to catch exceptions and print more useful info diff --git a/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h b/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h index 4cf9ad3b080..afb64c522ff 100644 --- a/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h @@ -224,11 +224,11 @@ class ITK_TEMPLATE_EXPORT JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4 ~JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4() override = default; void - ComputeValueAndDerivative(const PointType & samplePoint, - MeasureType & value, + ComputeValueAndDerivative(const PointType & samplePoint, + MeasureType & value, LocalDerivativeType & derivativeReturn, - bool calcValue, - bool calcDerivative) const; + bool calcValue, + bool calcDerivative) const; void PrintSelf(std::ostream & os, Indent indent) const override; @@ -250,8 +250,8 @@ class ITK_TEMPLATE_EXPORT JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4 bool m_UseAnisotropicCovariances{ false }; - RealType m_PointSetSigma{}; - RealType m_KernelSigma{}; + RealType m_PointSetSigma{}; + RealType m_KernelSigma{}; unsigned int m_CovarianceKNeighborhood{}; unsigned int m_EvaluationKNeighborhood{}; diff --git a/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.hxx index ff10a850803..d97305bd203 100644 --- a/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.hxx @@ -68,7 +68,7 @@ typename JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4:: GetLocalNeighborhoodValue(const PointType & point, const PixelType & itkNotUsed(pixel)) const { - MeasureType value; + MeasureType value; LocalDerivativeType derivative; this->ComputeValueAndDerivative(point, value, derivative, true, false); return value; @@ -77,10 +77,10 @@ JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4 void JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4:: - GetLocalNeighborhoodValueAndDerivative(const PointType & point, - MeasureType & value, + GetLocalNeighborhoodValueAndDerivative(const PointType & point, + MeasureType & value, LocalDerivativeType & derivative, - const PixelType & itkNotUsed(pixel)) const + const PixelType & itkNotUsed(pixel)) const { this->ComputeValueAndDerivative(point, value, derivative, true, true); } @@ -88,11 +88,11 @@ JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4 void JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4:: - ComputeValueAndDerivative(const PointType & samplePoint, - MeasureType & value, + ComputeValueAndDerivative(const PointType & samplePoint, + MeasureType & value, LocalDerivativeType & derivativeReturn, - bool calcValue, - bool calcDerivative) const + bool calcValue, + bool calcDerivative) const { if (calcDerivative) { @@ -195,7 +195,7 @@ template void JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h index 732256460f4..fbfbaf56334 100644 --- a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h +++ b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h @@ -77,7 +77,7 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationComputeJointPDFThreader virtual void ProcessPoint(const VirtualIndexType & virtualIndex, const VirtualPointType & virtualPoint, - const ThreadIdType threadId); + const ThreadIdType threadId); /** Collect the results per and normalize. */ void @@ -88,7 +88,7 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationComputeJointPDFThreader struct JointHistogramMIPerThreadStruct { typename JointHistogramType::Pointer JointHistogram; - SizeValueType JointHistogramCount; + SizeValueType JointHistogramCount; }; itkPadStruct(ITK_CACHE_LINE_ALIGNMENT, JointHistogramMIPerThreadStruct, PaddedJointHistogramMIPerThreadStruct); itkAlignedTypedef(ITK_CACHE_LINE_ALIGNMENT, diff --git a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.hxx b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.hxx index 4cdf5b3a8be..805b1087207 100644 --- a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.hxx +++ b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.hxx @@ -58,13 +58,13 @@ void JointHistogramMutualInformationComputeJointPDFThreaderBase::ProcessPoint( const VirtualIndexType & itkNotUsed(virtualIndex), const VirtualPointType & virtualPoint, - const ThreadIdType threadId) + const ThreadIdType threadId) { - typename AssociateType::Superclass::FixedImagePointType mappedFixedPoint; - typename AssociateType::Superclass::FixedImagePixelType fixedImageValue; + typename AssociateType::Superclass::FixedImagePointType mappedFixedPoint; + typename AssociateType::Superclass::FixedImagePixelType fixedImageValue; typename AssociateType::Superclass::MovingImagePointType mappedMovingPoint; typename AssociateType::Superclass::MovingImagePixelType movingImageValue; - bool pointIsValid = false; + bool pointIsValid = false; try { diff --git a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.h index f5459f02f99..7357baad8a3 100644 --- a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.h @@ -91,17 +91,17 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationGetValueAndDerivativeTh AfterThreadedExecution() override; bool - ProcessPoint(const VirtualIndexType & virtualIndex, - const VirtualPointType & virtualPoint, - const FixedImagePointType & mappedFixedPoint, - const FixedImagePixelType & fixedImageValue, - const FixedImageGradientType & mappedFixedImageGradient, - const MovingImagePointType & mappedMovingPoint, - const MovingImagePixelType & movingImageValue, + ProcessPoint(const VirtualIndexType & virtualIndex, + const VirtualPointType & virtualPoint, + const FixedImagePointType & mappedFixedPoint, + const FixedImagePixelType & fixedImageValue, + const FixedImageGradientType & mappedFixedImageGradient, + const MovingImagePointType & mappedMovingPoint, + const MovingImagePixelType & movingImageValue, const MovingImageGradientType & movingImageGradient, - MeasureType & metricValueReturn, - DerivativeType & localDerivativeReturn, - const ThreadIdType threadId) const override; + MeasureType & metricValueReturn, + DerivativeType & localDerivativeReturn, + const ThreadIdType threadId) const override; inline InternalComputationValueType ComputeFixedImageMarginalPDFDerivative(const MarginalPDFPointType & margPDFpoint, const ThreadIdType threadId) const; @@ -111,11 +111,11 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationGetValueAndDerivativeTh inline InternalComputationValueType ComputeJointPDFDerivative(const JointPDFPointType & jointPDFpoint, - const ThreadIdType threadId, - const SizeValueType ind) const; + const ThreadIdType threadId, + const SizeValueType ind) const; struct JointHistogramMIPerThreadStruct { - JointPDFInterpolatorPointer JointPDFInterpolator; + JointPDFInterpolatorPointer JointPDFInterpolator; MarginalPDFInterpolatorPointer FixedImageMarginalPDFInterpolator; MarginalPDFInterpolatorPointer MovingImageMarginalPDFInterpolator; }; diff --git a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.hxx b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.hxx index 428563614c5..faea4620cfb 100644 --- a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.hxx +++ b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.hxx @@ -105,10 +105,10 @@ JointHistogramMutualInformationGetValueAndDerivativeThreader< const FixedImagePixelType & fixedImageValue, const FixedImageGradientType &, const MovingImagePointType &, - const MovingImagePixelType & movingImageValue, + const MovingImagePixelType & movingImageValue, const MovingImageGradientType & movingImageGradient, MeasureType &, - DerivativeType & localDerivativeReturn, + DerivativeType & localDerivativeReturn, const ThreadIdType threadId) const { // check that the moving image sample is within the range of the true min @@ -133,8 +133,8 @@ JointHistogramMutualInformationGetValueAndDerivativeThreader< } const InternalComputationValueType jointPDFValue = this->m_JointHistogramMIPerThreadVariables[threadId].JointPDFInterpolator->Evaluate(jointPDFpoint); - const SizeValueType ind = 1; - const InternalComputationValueType dJPDF = this->ComputeJointPDFDerivative(jointPDFpoint, threadId, ind); + const SizeValueType ind = 1; + const InternalComputationValueType dJPDF = this->ComputeJointPDFDerivative(jointPDFpoint, threadId, ind); typename MarginalPDFType::PointType mind; mind[0] = jointPDFpoint[ind]; const InternalComputationValueType movingImagePDFValue = @@ -144,7 +144,7 @@ JointHistogramMutualInformationGetValueAndDerivativeThreader< constexpr InternalComputationValueType eps = 1.e-16; if (jointPDFValue > eps && movingImagePDFValue > eps) { - const InternalComputationValueType pRatio = std::log(jointPDFValue) - std::log(movingImagePDFValue); + const InternalComputationValueType pRatio = std::log(jointPDFValue) - std::log(movingImagePDFValue); const InternalComputationValueType & term1 = dJPDF * pRatio; const InternalComputationValueType & term2 = this->m_JointAssociate->m_Log2 * dMmPDF * jointPDFValue / movingImagePDFValue; @@ -186,11 +186,11 @@ JointHistogramMutualInformationGetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TJointHistogramMetric>::ComputeFixedImageMarginalPDFDerivative(const MarginalPDFPointType & margPDFpoint, - const ThreadIdType threadId) const + const ThreadIdType threadId) const { InternalComputationValueType offset = 0.5 * this->m_JointPDFSpacing[0]; InternalComputationValueType eps = this->m_JointPDFSpacing[0]; - MarginalPDFPointType leftpoint = margPDFpoint; + MarginalPDFPointType leftpoint = margPDFpoint; leftpoint[0] -= offset; MarginalPDFPointType rightpoint = margPDFpoint; rightpoint[0] += offset; @@ -233,11 +233,11 @@ JointHistogramMutualInformationGetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TJointHistogramMetric>::ComputeMovingImageMarginalPDFDerivative(const MarginalPDFPointType & margPDFpoint, - const ThreadIdType threadId) const + const ThreadIdType threadId) const { const InternalComputationValueType offset = 0.5 * this->m_JointAssociate->m_JointPDFSpacing[0]; const InternalComputationValueType eps = this->m_JointAssociate->m_JointPDFSpacing[0]; - MarginalPDFPointType leftpoint = margPDFpoint; + MarginalPDFPointType leftpoint = margPDFpoint; leftpoint[0] -= offset; MarginalPDFPointType rightpoint = margPDFpoint; rightpoint[0] += offset; @@ -280,12 +280,12 @@ JointHistogramMutualInformationGetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TJointHistogramMetric>::ComputeJointPDFDerivative(const JointPDFPointType & jointPDFpoint, - const ThreadIdType threadId, - const SizeValueType ind) const + const ThreadIdType threadId, + const SizeValueType ind) const { const InternalComputationValueType offset = 0.5 * this->m_JointAssociate->m_JointPDFSpacing[ind]; const InternalComputationValueType eps = this->m_JointAssociate->m_JointPDFSpacing[ind]; - JointPDFPointType leftpoint = jointPDFpoint; + JointPDFPointType leftpoint = jointPDFpoint; leftpoint[ind] -= offset; JointPDFPointType rightpoint = jointPDFpoint; rightpoint[ind] += offset; @@ -311,7 +311,7 @@ JointHistogramMutualInformationGetValueAndDerivativeThreader< } const InternalComputationValueType delta = rightpoint[ind] - leftpoint[ind]; - InternalComputationValueType deriv{}; + InternalComputationValueType deriv{}; if (delta > InternalComputationValueType{}) { deriv = this->m_JointHistogramMIPerThreadVariables[threadId].JointPDFInterpolator->Evaluate(rightpoint) - diff --git a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.h index 4ba522fa636..a335683d0ff 100644 --- a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.h @@ -95,7 +95,7 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationImageToImageMetricv4 /* Image dimension accessors */ static constexpr typename TVirtualImage::ImageDimensionType VirtualImageDimension = TVirtualImage::ImageDimension; - static constexpr typename TMovingImage::ImageDimensionType MovingImageDimension = TMovingImage::ImageDimension; + static constexpr typename TMovingImage::ImageDimensionType MovingImageDimension = TMovingImage::ImageDimension; /** Value type of the PDF */ using PDFValueType = TInternalComputationValueType; @@ -166,9 +166,9 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationImageToImageMetricv4 /** Compute the point location with the JointPDF image. Returns false if the * point is not inside the image. */ inline void - ComputeJointPDFPoint(const FixedImagePixelType fixedImageValue, + ComputeJointPDFPoint(const FixedImagePixelType fixedImageValue, const MovingImagePixelType movingImageValue, - JointPDFPointType & jointPDFpoint) const; + JointPDFPointType & jointPDFpoint) const; friend class JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedImageRegionPartitioner, @@ -227,7 +227,7 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationImageToImageMetricv4 TInternalComputationValueType m_VarianceForJointPDFSmoothing{}; /** Variables to define the marginal and joint histograms. */ - SizeValueType m_NumberOfHistogramBins{}; + SizeValueType m_NumberOfHistogramBins{}; TInternalComputationValueType m_FixedImageTrueMin{}; TInternalComputationValueType m_FixedImageTrueMax{}; TInternalComputationValueType m_MovingImageTrueMin{}; @@ -236,10 +236,10 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationImageToImageMetricv4 TInternalComputationValueType m_MovingImageBinSize{}; TInternalComputationValueType m_JointPDFSum{}; - JointPDFSpacingType m_JointPDFSpacing{}; + JointPDFSpacingType m_JointPDFSpacing{}; TInternalComputationValueType m_Log2{}; - JointPDFIndexValueType m_Padding{}; + JointPDFIndexValueType m_Padding{}; }; } // end namespace itk diff --git a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.hxx index 1bb78fcd236..61b407818d3 100644 --- a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.hxx @@ -262,7 +262,7 @@ JointHistogramMutualInformationImageToImageMetricv4GetBufferedRegion()); linearIter.SetDirection(0); linearIter.GoToBegin(); - unsigned int fixedIndex = 0; + unsigned int fixedIndex = 0; CompensatedSummation sum; while (!linearIter.IsAtEnd()) { @@ -351,7 +351,7 @@ JointHistogramMutualInformationImageToImageMetricv4::epsilon(); + constexpr TInternalComputationValueType eps = NumericTraits::epsilon(); CompensatedSummation total_mi; for (SizeValueType ii = 0; ii < m_NumberOfHistogramBins; ++ii) { @@ -361,8 +361,8 @@ JointHistogramMutualInformationImageToImageMetricv4m_MovingImageMarginalPDF->GetPixel(mind); - TInternalComputationValueType denom = px * py; + TInternalComputationValueType py = this->m_MovingImageMarginalPDF->GetPixel(mind); + TInternalComputationValueType denom = px * py; const typename JointPDFType::IndexType index = { static_cast(ii), static_cast(jj) }; TInternalComputationValueType pxy = m_JointPDF->GetPixel(index); @@ -392,9 +392,9 @@ JointHistogramMutualInformationImageToImageMetricv4< TMovingImage, TVirtualImage, TInternalComputationValueType, - TMetricTraits>::ComputeJointPDFPoint(const FixedImagePixelType fixedImageValue, + TMetricTraits>::ComputeJointPDFPoint(const FixedImagePixelType fixedImageValue, const MovingImagePixelType movingImageValue, - JointPDFPointType & jointPDFpoint) const + JointPDFPointType & jointPDFpoint) const { TInternalComputationValueType a = (fixedImageValue - this->m_FixedImageTrueMin) / (this->m_FixedImageTrueMax - this->m_FixedImageTrueMin); diff --git a/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.h b/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.h index e44fb459376..f21cb43a8af 100644 --- a/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.h @@ -154,7 +154,7 @@ class ITK_TEMPLATE_EXPORT LabeledPointSetToPointSetMetricv4 MovingPointSetPointer GetLabeledMovingPointSet(const LabelType) const; - PointSetMetricPointer m_PointSetMetric{}; + PointSetMetricPointer m_PointSetMetric{}; std::vector m_PointSetMetricClones{}; LabelSetType m_FixedPointSetLabels{}; diff --git a/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.hxx index 7281318a651..8f62a39b1b6 100644 --- a/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.hxx @@ -65,7 +65,7 @@ LabeledPointSetToPointSetMetricv4GetLabeledFixedPointSet(*it); + const FixedPointSetPointer fixedPointSet = this->GetLabeledFixedPointSet(*it); const MovingPointSetPointer movingPointSet = this->GetLabeledMovingPointSet(*it); metric->SetFixedPointSet(fixedPointSet); @@ -97,7 +97,7 @@ LabeledPointSetToPointSetMetricv4m_CommonPointSetLabels.begin(); - const MeasureType value = this->m_PointSetMetricClones[labelIndex]->GetLocalNeighborhoodValue(point, label); + const MeasureType value = this->m_PointSetMetricClones[labelIndex]->GetLocalNeighborhoodValue(point, label); return value; } } @@ -105,10 +105,10 @@ LabeledPointSetToPointSetMetricv4 void LabeledPointSetToPointSetMetricv4:: - GetLocalNeighborhoodValueAndDerivative(const PointType & point, - MeasureType & measure, + GetLocalNeighborhoodValueAndDerivative(const PointType & point, + MeasureType & measure, LocalDerivativeType & localDerivative, - const LabelType & label) const + const LabelType & label) const { auto labelIt = std::find(this->m_CommonPointSetLabels.begin(), this->m_CommonPointSetLabels.end(), label); if (labelIt == this->m_CommonPointSetLabels.end()) @@ -134,7 +134,7 @@ typename LabeledPointSetToPointSetMetricv4m_FixedPointSet->GetPoints()->Begin(); - typename FixedPointSetType::PointDataContainerIterator ItD = this->m_FixedPointSet->GetPointData()->Begin(); + typename FixedPointSetType::PointDataContainerIterator ItD = this->m_FixedPointSet->GetPointData()->Begin(); while (It != this->m_FixedPointSet->GetPoints()->End()) { if (label == ItD.Value()) @@ -159,7 +159,7 @@ typename LabeledPointSetToPointSetMetricv4m_MovingPointSet->GetPoints()->Begin(); - typename MovingPointSetType::PointDataContainerIterator ItD = this->m_MovingPointSet->GetPointData()->Begin(); + typename MovingPointSetType::PointDataContainerIterator ItD = this->m_MovingPointSet->GetPointData()->Begin(); while (It != this->m_MovingPointSet->GetPoints()->End()) { if (label == ItD.Value()) @@ -238,7 +238,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { using namespace print_helper; diff --git a/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.h b/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.h index 27c44918c25..2e34a537f95 100644 --- a/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.h +++ b/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.h @@ -197,12 +197,12 @@ class ITK_TEMPLATE_EXPORT ManifoldParzenWindowsPointSetFunction unsigned int m_CovarianceKNeighborhood{ 5 }; unsigned int m_EvaluationKNeighborhood{ 50 }; - RealType m_RegularizationSigma{}; - RealType m_KernelSigma{}; + RealType m_RegularizationSigma{}; + RealType m_KernelSigma{}; GaussianContainerType m_Gaussians{}; - bool m_Normalize{ true }; - bool m_UseAnisotropicCovariances{ true }; + bool m_Normalize{ true }; + bool m_UseAnisotropicCovariances{ true }; MultiThreaderBase::Pointer m_MultiThreader{}; }; diff --git a/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.hxx b/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.hxx index a778bb550d3..7cf62fdbb94 100644 --- a/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.hxx +++ b/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.hxx @@ -197,7 +197,7 @@ ManifoldParzenWindowsPointSetFunction::GetGauss template void ManifoldParzenWindowsPointSetFunction::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h index 0a9db600d22..66c8c463381 100644 --- a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h @@ -146,8 +146,8 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetricv4 /* Image dimension accessors */ static constexpr typename TVirtualImage::ImageDimensionType VirtualImageDimension = TVirtualImage::ImageDimension; - static constexpr typename TFixedImage::ImageDimensionType FixedImageDimension = TFixedImage::ImageDimension; - static constexpr typename TMovingImage::ImageDimensionType MovingImageDimension = TMovingImage::ImageDimension; + static constexpr typename TFixedImage::ImageDimensionType FixedImageDimension = TFixedImage::ImageDimension; + static constexpr typename TMovingImage::ImageDimensionType MovingImageDimension = TMovingImage::ImageDimension; /** Number of bins to used in the histogram. Typical value is * 50. The minimum value is 5 due to the padding required by the Parzen @@ -246,14 +246,14 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetricv4 /** Variables to define the marginal and joint histograms. */ SizeValueType m_NumberOfHistogramBins{ 50 }; - PDFValueType m_MovingImageNormalizedMin{}; - PDFValueType m_FixedImageNormalizedMin{}; - PDFValueType m_FixedImageTrueMin{}; - PDFValueType m_FixedImageTrueMax{}; - PDFValueType m_MovingImageTrueMin{}; - PDFValueType m_MovingImageTrueMax{}; - PDFValueType m_FixedImageBinSize{}; - PDFValueType m_MovingImageBinSize{}; + PDFValueType m_MovingImageNormalizedMin{}; + PDFValueType m_FixedImageNormalizedMin{}; + PDFValueType m_FixedImageTrueMin{}; + PDFValueType m_FixedImageTrueMax{}; + PDFValueType m_MovingImageTrueMin{}; + PDFValueType m_MovingImageTrueMax{}; + PDFValueType m_FixedImageBinSize{}; + PDFValueType m_MovingImageBinSize{}; /** Helper array for storing the values of the JointPDF ratios. */ using PRatioType = PDFValueType; @@ -266,7 +266,7 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetricv4 mutable std::vector m_JointPdfIndex1DArray{}; /** The moving image marginal PDF. */ - mutable std::vector m_MovingImageMarginalPDF{}; + mutable std::vector m_MovingImageMarginalPDF{}; mutable std::vector> m_ThreaderFixedImageMarginalPDF{}; /** The joint PDF and PDF derivatives. */ @@ -292,9 +292,9 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetricv4 /* All these methods are thread safe except ReduceBuffer */ void - Initialize(size_t maxBufferLength, - const size_t cachedNumberOfLocalParameters, - std::mutex * parentDerivativeMutexPtr, + Initialize(size_t maxBufferLength, + const size_t cachedNumberOfLocalParameters, + std::mutex * parentDerivativeMutexPtr, typename JointPDFDerivativesType::Pointer parentJointPDFDerivatives); void @@ -348,19 +348,19 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetricv4 // Continguous chunk of memory for efficiency std::vector m_MemoryBlock; // The (number of lines in the buffer) * (cells per line) - size_t m_MemoryBlockSize; - std::vector m_BufferPDFValuesContainer; + size_t m_MemoryBlockSize; + std::vector m_BufferPDFValuesContainer; std::vector m_BufferOffsetContainer; - size_t m_CachedNumberOfLocalParameters; - size_t m_MaxBufferSize; + size_t m_CachedNumberOfLocalParameters; + size_t m_MaxBufferSize; // Pointer handle to parent version std::mutex * m_ParentJointPDFDerivativesMutexPtr; // Smart pointer handle to parent version typename JointPDFDerivativesType::Pointer m_ParentJointPDFDerivatives; }; - std::vector m_ThreaderDerivativeManager{}; - std::mutex m_JointPDFDerivativesLock{}; + std::vector m_ThreaderDerivativeManager{}; + std::mutex m_JointPDFDerivativesLock{}; typename JointPDFDerivativesType::Pointer m_JointPDFDerivatives{}; PDFValueType m_JointPDFSum{}; diff --git a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx index b3f8265c559..d74f73f19fa 100644 --- a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx @@ -124,7 +124,7 @@ MattesMutualInformationImageToImageMetricv4m_FixedTransform->TransformPoint(pit.Value()); typename TFixedImage::IndexType idx; - const bool isInside = this->m_FixedImage->TransformPhysicalPointToIndex(fixPnt, idx); + const bool isInside = this->m_FixedImage->TransformPhysicalPointToIndex(fixPnt, idx); if (isInside) { const typename TFixedImage::PixelType currValue = this->m_FixedImage->GetPixel(idx); @@ -319,7 +319,7 @@ MattesMutualInformationImageToImageMetricv4m_ThreaderJointPDF[0]; + const auto & l_JointPDF = this->m_ThreaderJointPDF[0]; std::vector & l_FixedImageMarginalPDF = this->m_ThreaderFixedImageMarginalPDF[0]; /* FixedMarginalPDF JointPDF @@ -337,7 +337,7 @@ MattesMutualInformationImageToImageMetricv4 JointPDFValueType { return c * normalizationFactor; }; - const size_t number_of_JointPDF_bins = this->m_NumberOfHistogramBins * this->m_NumberOfHistogramBins; + const size_t number_of_JointPDF_bins = this->m_NumberOfHistogramBins * this->m_NumberOfHistogramBins; JointPDFValueType * pdfPtr = l_JointPDF->GetBufferPointer(); std::transform(pdfPtr, pdfPtr + number_of_JointPDF_bins, pdfPtr, nomalize_labmda); std::transform( @@ -357,7 +357,7 @@ MattesMutualInformationImageToImageMetricv4::epsilon(); - const PDFValueType nFactor = 1.0 / (this->m_MovingImageBinSize * this->GetNumberOfValidPoints()); + const PDFValueType nFactor = 1.0 / (this->m_MovingImageBinSize * this->GetNumberOfValidPoints()); const auto temp_num_histogram_bins = this->m_NumberOfHistogramBins; /** @@ -380,7 +380,7 @@ MattesMutualInformationImageToImageMetricv4m_MovingImageMarginalPDF[movingIndex]; - const PDFValueType jointPDFValue = *(jointPDFRowPtr++); /* Get Value and goto next bin in row */ + const PDFValueType jointPDFValue = *(jointPDFRowPtr++); /* Get Value and goto next bin in row */ // check for non-zero bin contribution, if movingImageMarginalPDF <= closeToZero, then so is joinPDFValue if (movingImageMarginalPDF > closeToZero && @@ -459,13 +459,13 @@ MattesMutualInformationImageToImageMetricv4GetNumberOfWorkUnitsUsed(); - const SizeValueType numberOfVoxels = this->m_NumberOfHistogramBins * this->m_NumberOfHistogramBins; + const SizeValueType numberOfVoxels = this->m_NumberOfHistogramBins * this->m_NumberOfHistogramBins; JointPDFValueType * const pdfPtrStart = this->m_ThreaderJointPDF[0]->GetBufferPointer(); for (unsigned int t = 1; t < localNumberOfWorkUnitsUsed; ++t) { - JointPDFValueType * pdfPtr = pdfPtrStart; - const JointPDFValueType * tPdfPtr = this->m_ThreaderJointPDF[t]->GetBufferPointer(); + JointPDFValueType * pdfPtr = pdfPtrStart; + const JointPDFValueType * tPdfPtr = this->m_ThreaderJointPDF[t]->GetBufferPointer(); const JointPDFValueType * const tPdfPtrEnd = tPdfPtr + numberOfVoxels; while (tPdfPtr < tPdfPtrEnd) { @@ -478,7 +478,7 @@ MattesMutualInformationImageToImageMetricv4m_JointPDFSum that covers that part of the domain. - const JointPDFValueType * pdfPtr = pdfPtrStart; + const JointPDFValueType * pdfPtr = pdfPtrStart; CompensatedSummation jointPDFSum; for (SizeValueType i = 0; i < numberOfVoxels; ++i) { @@ -553,9 +553,9 @@ MattesMutualInformationImageToImageMetricv4::DerivativeBufferManager :: - Initialize(size_t maxBufferLength, - const size_t cachedNumberOfLocalParameters, - std::mutex * parentDerivativeMutexPtr, + Initialize(size_t maxBufferLength, + const size_t cachedNumberOfLocalParameters, + std::mutex * parentDerivativeMutexPtr, typename JointPDFDerivativesType::Pointer parentJointPDFDerivatives) { m_CurrentFillSize = 0; @@ -678,10 +678,10 @@ MattesMutualInformationImageToImageMetricv4m_ParentJointPDFDerivatives->GetBufferPointer() + ThisIndexOffset; - PDFValueType * derivativeContribution = *BufferPDFValuesContainerIter; + PDFValueType * derivativeContribution = *BufferPDFValuesContainerIter; const PDFValueType * const endContribution = derivativeContribution + m_CachedNumberOfLocalParameters; while (derivativeContribution < endContribution) { diff --git a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.h index b4d42bbe2fb..9b6a0de125a 100644 --- a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.h @@ -101,24 +101,24 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetricv4GetValueAnd * the metric to the global integral of the metric/derivative. */ bool - ProcessPoint(const VirtualIndexType & virtualIndex, - const VirtualPointType & virtualPoint, - const FixedImagePointType & mappedFixedPoint, - const FixedImagePixelType & fixedImageValue, - const FixedImageGradientType & mappedFixedImageGradient, - const MovingImagePointType & mappedMovingPoint, - const MovingImagePixelType & movingImageValue, + ProcessPoint(const VirtualIndexType & virtualIndex, + const VirtualPointType & virtualPoint, + const FixedImagePointType & mappedFixedPoint, + const FixedImagePixelType & fixedImageValue, + const FixedImageGradientType & mappedFixedImageGradient, + const MovingImagePointType & mappedMovingPoint, + const MovingImagePixelType & movingImageValue, const MovingImageGradientType & movingImageGradient, - MeasureType & metricValueReturn, - DerivativeType & localDerivativeReturn, - const ThreadIdType threadId) const override; + MeasureType & metricValueReturn, + DerivativeType & localDerivativeReturn, + const ThreadIdType threadId) const override; /** Compute PDF derivative contribution for each parameter of a displacement field. */ virtual void - ComputePDFDerivativesLocalSupportTransform(const JacobianType & jacobian, + ComputePDFDerivativesLocalSupportTransform(const JacobianType & jacobian, const MovingImageGradientType & movingImageGradient, - const PDFValueType & cubicBSplineDerivativeValue, - DerivativeValueType * localSupportDerivativeResultPtr) const; + const PDFValueType & cubicBSplineDerivativeValue, + DerivativeValueType * localSupportDerivativeResultPtr) const; private: /** Internal pointer to the Mattes metric object in use by this threader. diff --git a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.hxx b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.hxx index 7b2432bdf7b..b9f34601224 100644 --- a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.hxx +++ b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.hxx @@ -59,7 +59,7 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< PDFValueType{}); const ThreadIdType mattesAssociateNumWorkUnitsUsed = this->m_MattesAssociate->GetNumberOfWorkUnitsUsed(); - const bool reinitializeThreaderFixedImageMarginalPDF = + const bool reinitializeThreaderFixedImageMarginalPDF = (this->m_MattesAssociate->m_ThreaderFixedImageMarginalPDF.size() != mattesAssociateNumWorkUnitsUsed); if (reinitializeThreaderFixedImageMarginalPDF) @@ -223,7 +223,7 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< const FixedImagePixelType & fixedImageValue, const FixedImageGradientType &, const MovingImagePointType &, - const MovingImagePixelType & movingImageValue, + const MovingImagePixelType & movingImageValue, const MovingImageGradientType & movingImageGradient, MeasureType &, DerivativeType &, @@ -263,7 +263,7 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< } } // Move the pointer to the first affected bin - OffsetValueType pdfMovingIndex = static_cast(movingImageParzenWindowIndex) - 1; + OffsetValueType pdfMovingIndex = static_cast(movingImageParzenWindowIndex) - 1; const OffsetValueType pdfMovingIndexMax = static_cast(movingImageParzenWindowIndex) + 2; const OffsetValueType fixedImageParzenWindowIndex = @@ -391,10 +391,10 @@ void MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader:: - ComputePDFDerivativesLocalSupportTransform(const JacobianType & jacobian, + ComputePDFDerivativesLocalSupportTransform(const JacobianType & jacobian, const MovingImageGradientType & movingImageGradient, - const PDFValueType & cubicBSplineDerivativeValue, - DerivativeValueType * localSupportDerivativeResultPtr) const + const PDFValueType & cubicBSplineDerivativeValue, + DerivativeValueType * localSupportDerivativeResultPtr) const { for (NumberOfParametersType mu = 0, maxElement = this->GetCachedNumberOfLocalParameters(); mu < maxElement; ++mu) { @@ -448,7 +448,7 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< JointPDFDerivativesValueType * const accumulatorPdfDPtrStart = this->m_MattesAssociate->m_JointPDFDerivatives->GetBufferPointer(); - JointPDFDerivativesValueType * accumulatorPdfDPtr = accumulatorPdfDPtrStart; + JointPDFDerivativesValueType * accumulatorPdfDPtr = accumulatorPdfDPtrStart; const JointPDFDerivativesValueType * const tempThreadPdfDPtrEnd = accumulatorPdfDPtrStart + histogramTotalElementsSize; while (accumulatorPdfDPtr < tempThreadPdfDPtrEnd) diff --git a/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4.h index 62f96708ae1..f8194ee4edb 100644 --- a/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4.h @@ -81,8 +81,8 @@ class ITK_TEMPLATE_EXPORT MeanSquaresImageToImageMetricv4 /* Image dimension accessors */ static constexpr typename TVirtualImage::ImageDimensionType VirtualImageDimension = TVirtualImage::ImageDimension; - static constexpr typename TFixedImage::ImageDimensionType FixedImageDimension = TFixedImage::ImageDimension; - static constexpr typename TMovingImage::ImageDimensionType MovingImageDimension = TMovingImage::ImageDimension; + static constexpr typename TFixedImage::ImageDimensionType FixedImageDimension = TFixedImage::ImageDimension; + static constexpr typename TMovingImage::ImageDimensionType MovingImageDimension = TMovingImage::ImageDimension; protected: MeanSquaresImageToImageMetricv4(); diff --git a/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h index 4f48b4cb11d..c78a3f74d84 100644 --- a/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h @@ -70,17 +70,17 @@ class ITK_TEMPLATE_EXPORT MeanSquaresImageToImageMetricv4GetValueAndDerivativeTh * the metric to the global integral of the metric/derivative. */ bool - ProcessPoint(const VirtualIndexType & virtualIndex, - const VirtualPointType & virtualPoint, - const FixedImagePointType & mappedFixedPoint, - const FixedImagePixelType & fixedImageValue, - const FixedImageGradientType & mappedFixedImageGradient, - const MovingImagePointType & mappedMovingPoint, - const MovingImagePixelType & movingImageValue, + ProcessPoint(const VirtualIndexType & virtualIndex, + const VirtualPointType & virtualPoint, + const FixedImagePointType & mappedFixedPoint, + const FixedImagePixelType & fixedImageValue, + const FixedImageGradientType & mappedFixedImageGradient, + const MovingImagePointType & mappedMovingPoint, + const MovingImagePixelType & movingImageValue, const MovingImageGradientType & movingImageGradient, - MeasureType & metricValueReturn, - DerivativeType & localDerivativeReturn, - const ThreadIdType threadId) const override; + MeasureType & metricValueReturn, + DerivativeType & localDerivativeReturn, + const ThreadIdType threadId) const override; }; } // end namespace itk diff --git a/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.hxx b/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.hxx index 8bee8315dab..a97b9a98472 100644 --- a/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.hxx +++ b/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.hxx @@ -34,15 +34,15 @@ MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader< const FixedImagePixelType & fixedImageValue, const FixedImageGradientType &, const MovingImagePointType &, - const MovingImagePixelType & movingImageValue, + const MovingImagePixelType & movingImageValue, const MovingImageGradientType & movingImageGradient, - MeasureType & metricValueReturn, - DerivativeType & localDerivativeReturn, - const ThreadIdType threadId) const + MeasureType & metricValueReturn, + DerivativeType & localDerivativeReturn, + const ThreadIdType threadId) const { /** Only the voxelwise contribution given the point pairs. */ const FixedImagePixelType diff = fixedImageValue - movingImageValue; - const unsigned int nComponents = NumericTraits::GetLength(diff); + const unsigned int nComponents = NumericTraits::GetLength(diff); metricValueReturn = MeasureType{}; for (unsigned int nc = 0; nc < nComponents; ++nc) diff --git a/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.h b/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.h index 68c3720fd8f..b01682ca214 100644 --- a/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.h @@ -227,8 +227,8 @@ class ITK_TEMPLATE_EXPORT ObjectToObjectMultiMetricv4 PrintSelf(std::ostream & os, Indent indent) const override; private: - MetricQueueType m_MetricQueue{}; - WeightsArrayType m_MetricWeights{}; + MetricQueueType m_MetricQueue{}; + WeightsArrayType m_MetricWeights{}; mutable MetricValueArrayType m_MetricValueArray{}; }; diff --git a/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.hxx index 89f684b42d7..2ba85390625 100644 --- a/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.hxx @@ -292,7 +292,7 @@ ObjectToObjectMultiMetricv4m_MetricValueArray[j] = metricValue; const DerivativeValueType magnitude = metricDerivative.magnitude(); - DerivativeValueType weightOverMagnitude{}; + DerivativeValueType weightOverMagnitude{}; totalMagnitude += magnitude; if (magnitude > NumericTraits::epsilon()) @@ -401,7 +401,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { os << indent << "Weights of metric derivatives: " << this->m_MetricWeights << std::endl; os << indent << "The multivariate contains the following metrics: " << std::endl << std::endl; diff --git a/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricWithIndexv4.h b/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricWithIndexv4.h index ac807aa4c7b..4cb1fa13b36 100644 --- a/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricWithIndexv4.h +++ b/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricWithIndexv4.h @@ -324,12 +324,12 @@ class ITK_TEMPLATE_EXPORT PointSetToPointSetMetricWithIndexv4 void PrintSelf(std::ostream & os, Indent indent) const override; - typename FixedPointSetType::ConstPointer m_FixedPointSet{}; + typename FixedPointSetType::ConstPointer m_FixedPointSet{}; mutable typename FixedTransformedPointSetType::Pointer m_FixedTransformedPointSet{}; mutable typename PointsLocatorType::Pointer m_FixedTransformedPointsLocator{}; - typename MovingPointSetType::ConstPointer m_MovingPointSet{}; + typename MovingPointSetType::ConstPointer m_MovingPointSet{}; mutable typename MovingTransformedPointSetType::Pointer m_MovingTransformedPointSet{}; mutable typename PointsLocatorType::Pointer m_MovingTransformedPointsLocator{}; diff --git a/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricWithIndexv4.hxx b/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricWithIndexv4.hxx index 359a9197d2c..cad4cf2a521 100644 --- a/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricWithIndexv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricWithIndexv4.hxx @@ -175,12 +175,12 @@ typename PointSetToPointSetMetricWithIndexv4m_FixedTransformedPointSet->GetPoints()->CastToSTLConstContainer(); - PointIdentifierRanges ranges = this->CreateRanges(); + PointIdentifierRanges ranges = this->CreateRanges(); std::vector> threadValues(ranges.size()); - const std::function sumNeighborhoodValues = + const std::function sumNeighborhoodValues = [this, &threadValues, &ranges, &virtualTransformedPointSet, &fixedTransformedPointSet](SizeValueType rangeIndex) { CompensatedSummation threadValue = 0; - PixelType pixel; + PixelType pixel; NumericTraits::SetLength(pixel, 1); @@ -213,7 +213,7 @@ typename PointSetToPointSetMetricWithIndexv4VerifyNumberOfValidPoints(valueSum, derivative)) { valueSum /= static_cast(this->m_NumberOfValidPoints); @@ -267,11 +267,11 @@ PointSetToPointSetMetricWithIndexv4GetNumberOfLocalParameters(); - PointIdentifierRanges ranges = this->CreateRanges(); + NumberOfParametersType numberOfLocalParameters = this->GetNumberOfLocalParameters(); + PointIdentifierRanges ranges = this->CreateRanges(); std::vector> threadValues(ranges.size()); using CompensatedDerivative = typename std::vector>; - std::vector threadDerivatives(ranges.size()); + std::vector threadDerivatives(ranges.size()); const std::function sumNeighborhoodValues = [this, &derivative, &threadDerivatives, &threadValues, &ranges, &calculateValue, &numberOfLocalParameters]( SizeValueType rangeIndex) { @@ -293,11 +293,11 @@ PointSetToPointSetMetricWithIndexv4 threadValue; - PixelType pixel; + PixelType pixel; NumericTraits::SetLength(pixel, 1); for (PointIdentifier index = ranges[rangeIndex].first; index < ranges[rangeIndex].second; ++index) { - MeasureType pointValue{}; + MeasureType pointValue{}; LocalDerivativeType pointDerivative; /* Verify the virtual point is in the virtual domain. @@ -421,7 +421,7 @@ PointSetToPointSetMetricWithIndexv4m_VirtualTransformedPointSet->GetPoints()->Begin(); while (virtualIt != this->m_VirtualTransformedPointSet->GetPoints()->End()) { @@ -438,8 +438,8 @@ template :: StorePointDerivative(const VirtualPointType & virtualPoint, - const DerivativeType & pointDerivative, - DerivativeType & field) const + const DerivativeType & pointDerivative, + DerivativeType & field) const { // Update derivative field at some index. // This requires the active transform displacement field to be the @@ -470,10 +470,10 @@ typename PointSetToPointSetMetricWithIndexv4:: GetLocalNeighborhoodDerivativeWithIndex(const PointIdentifier & id, - const PointType & point, - const PixelType & pixel) const + const PointType & point, + const PixelType & pixel) const { - MeasureType measure; + MeasureType measure; LocalDerivativeType localDerivative; this->GetLocalNeighborhoodValueAndDerivativeWithIndex(id, point, measure, localDerivative, pixel); return localDerivative; @@ -631,12 +631,12 @@ const typename PointSetToPointSetMetricWithIndexv4m_FixedTransformedPointSet->GetNumberOfPoints(); - PointIdentifier nWorkUnits = MultiThreaderBase::New()->GetNumberOfWorkUnits(); + PointIdentifier nWorkUnits = MultiThreaderBase::New()->GetNumberOfWorkUnits(); if (nWorkUnits > nPoints || MultiThreaderBase::New()->GetMaximumNumberOfThreads() <= 1) { nWorkUnits = 1; } - PointIdentifier startRange = 0; + PointIdentifier startRange = 0; PointIdentifierRanges ranges; for (PointIdentifier p = 1; p < nWorkUnits; ++p) { @@ -653,7 +653,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h b/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h index 23498ce78d7..0f51f681a0b 100644 --- a/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h @@ -226,10 +226,10 @@ class ITK_TEMPLATE_EXPORT PointSetToPointSetMetricv4 void GetLocalNeighborhoodValueAndDerivativeWithIndex(const PointIdentifier &, - const PointType & point, - MeasureType & measure, + const PointType & point, + MeasureType & measure, LocalDerivativeType & derivative, - const PixelType & pixel) const override + const PixelType & pixel) const override { this->GetLocalNeighborhoodValueAndDerivative(point, measure, derivative, pixel); } diff --git a/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.hxx index af89e2eb420..832c12141e1 100644 --- a/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.hxx @@ -27,7 +27,7 @@ typename PointSetToPointSetMetricv4:: GetLocalNeighborhoodDerivative(const PointType & point, const PixelType & pixel) const { - MeasureType measure; + MeasureType measure; LocalDerivativeType localDerivative; this->GetLocalNeighborhoodValueAndDerivative(point, measure, localDerivative, pixel); return localDerivative; diff --git a/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageMetricv4Test.cxx index ff05125082e..57b447c24d3 100644 --- a/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageMetricv4Test.cxx @@ -30,8 +30,8 @@ template void -ANTSNeighborhoodCorrelationImageToImageMetricv4Test_PrintDerivativeAsVectorImage(ImagePointerType image, - DerivativeType & derivative, +ANTSNeighborhoodCorrelationImageToImageMetricv4Test_PrintDerivativeAsVectorImage(ImagePointerType image, + DerivativeType & derivative, itk::SizeValueType vecdim) { @@ -151,9 +151,9 @@ itkANTSNeighborhoodCorrelationImageToImageMetricv4Test(int, char ** const) constexpr itk::SizeValueType imageSize = 6; - auto size = ImageType::SizeType::Filled(imageSize); + auto size = ImageType::SizeType::Filled(imageSize); constexpr ImageType::IndexType index{}; - const ImageType::RegionType region{ index, size }; + const ImageType::RegionType region{ index, size }; /* Create simple test images. */ auto fixedImage = ImageType::New(); @@ -184,7 +184,7 @@ itkANTSNeighborhoodCorrelationImageToImageMetricv4Test(int, char ** const) ++itMoving; } - VectorType zero; + VectorType zero; constexpr float def_value = -0.5; zero.Fill(def_value); @@ -255,7 +255,7 @@ itkANTSNeighborhoodCorrelationImageToImageMetricv4Test(int, char ** const) // Evaluate - MetricType::MeasureType valueReturn1; + MetricType::MeasureType valueReturn1; MetricType::DerivativeType derivativeReturn; ITK_TRY_EXPECT_NO_EXCEPTION(metric->GetValueAndDerivative(valueReturn1, derivativeReturn)); @@ -295,7 +295,7 @@ itkANTSNeighborhoodCorrelationImageToImageMetricv4Test(int, char ** const) const PointSetType::Pointer pset(PointSetType::New()); - unsigned int ind = 0; + unsigned int ind = 0; itk::ImageRegionIteratorWithIndex It(fixedImage, fixedImage->GetLargestPossibleRegion()); for (It.GoToBegin(); !It.IsAtEnd(); ++It) { @@ -322,7 +322,7 @@ itkANTSNeighborhoodCorrelationImageToImageMetricv4Test(int, char ** const) ITK_TRY_EXPECT_NO_EXCEPTION(metricSparse->Initialize()); - MetricType::MeasureType valueReturnSparse; + MetricType::MeasureType valueReturnSparse; MetricType::DerivativeType derivativeReturnSparse; ITK_TRY_EXPECT_NO_EXCEPTION(metricSparse->GetValueAndDerivative(valueReturnSparse, derivativeReturnSparse)); diff --git a/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageRegistrationTest.cxx index 019ac6c4ca7..f73fe46082c 100644 --- a/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageRegistrationTest.cxx @@ -79,8 +79,8 @@ itkANTSNeighborhoodCorrelationImageToImageRegistrationTest(int argc, char * argv std::cout << argc << std::endl; unsigned int numberOfIterations = 10; - double learningRate = 0.1; - double deformationLearningRate = 1; + double learningRate = 0.1; + double deformationLearningRate = 1; if (argc >= 5) { numberOfIterations = std::stoi(argv[4]); @@ -234,8 +234,8 @@ itkANTSNeighborhoodCorrelationImageToImageRegistrationTest(int argc, char * argv using PointSetType = MetricType::FixedSampledPointSetType; using PointType = PointSetType::PointType; std::cout << "Using sparse point set..." << std::endl; - const PointSetType::Pointer pset(PointSetType::New()); - unsigned int ind = 0; + const PointSetType::Pointer pset(PointSetType::New()); + unsigned int ind = 0; itk::ImageRegionIteratorWithIndex It(fixedImage, fixedImage->GetLargestPossibleRegion()); for (It.GoToBegin(); !It.IsAtEnd(); ++It) { diff --git a/Modules/Registration/Metricsv4/test/itkCorrelationImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkCorrelationImageToImageMetricv4Test.cxx index 05b844b1776..1bb1a118b58 100644 --- a/Modules/Registration/Metricsv4/test/itkCorrelationImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkCorrelationImageToImageMetricv4Test.cxx @@ -28,10 +28,10 @@ */ template double -itkCorrelationImageToImageMetricv4Test_GetToyImagePixelValue(TIndexType index, - TPointType offset, +itkCorrelationImageToImageMetricv4Test_GetToyImagePixelValue(TIndexType index, + TPointType offset, const unsigned int Dim, - double c) + double c) { double v = 0.0; for (unsigned int i = 0; i < Dim; ++i) @@ -47,8 +47,8 @@ itkCorrelationImageToImageMetricv4Test_GetToyImagePixelValue(TIndexType template int -itkCorrelationImageToImageMetricv4Test_WithSpecifiedThreads(TMetricPointer & metric, - TValue & value, +itkCorrelationImageToImageMetricv4Test_WithSpecifiedThreads(TMetricPointer & metric, + TValue & value, TDerivativeType & derivative) { using MetricType = typename TMetricPointer::ObjectType; @@ -66,7 +66,7 @@ itkCorrelationImageToImageMetricv4Test_WithSpecifiedThreads(TMetricPointer & me } // Evaluate with GetValueAndDerivative - typename MetricType::MeasureType valueReturn1; + typename MetricType::MeasureType valueReturn1; typename MetricType::DerivativeType derivativeReturn; try { @@ -128,9 +128,9 @@ itkCorrelationImageToImageMetricv4Test(int, char ** const) constexpr unsigned int imageDimensionality = 3; using ImageType = itk::Image; - auto size = ImageType::SizeType::Filled(imageSize); + auto size = ImageType::SizeType::Filled(imageSize); constexpr ImageType::IndexType index{}; - const ImageType::RegionType region{ index, size }; + const ImageType::RegionType region{ index, size }; /* Create simple test images. */ auto fixedImage = ImageType::New(); @@ -156,7 +156,7 @@ itkCorrelationImageToImageMetricv4Test(int, char ** const) while (!itFixed.IsAtEnd()) { const IndexType ind = itFixed.GetIndex(); - const double v = itkCorrelationImageToImageMetricv4Test_GetToyImagePixelValue(ind, p0, imageDimensionality, 0); + const double v = itkCorrelationImageToImageMetricv4Test_GetToyImagePixelValue(ind, p0, imageDimensionality, 0); itFixed.Set(v); ++itFixed; } @@ -173,7 +173,7 @@ itkCorrelationImageToImageMetricv4Test(int, char ** const) while (!itMoving.IsAtEnd()) { const IndexType ind = itMoving.GetIndex(); - const double v = itkCorrelationImageToImageMetricv4Test_GetToyImagePixelValue(ind, p1, imageDimensionality, 0); + const double v = itkCorrelationImageToImageMetricv4Test_GetToyImagePixelValue(ind, p1, imageDimensionality, 0); itMoving.Set(v); ++itMoving; } @@ -207,7 +207,7 @@ itkCorrelationImageToImageMetricv4Test(int, char ** const) metric->SetMaximumNumberOfWorkUnits(1); std::cerr << "Setting number of metric threads to " << metric->GetMaximumNumberOfWorkUnits() << std::endl; - MetricType::MeasureType value1; + MetricType::MeasureType value1; MetricType::DerivativeType derivative1; int ret = itkCorrelationImageToImageMetricv4Test_WithSpecifiedThreads(metric, value1, derivative1); @@ -215,7 +215,7 @@ itkCorrelationImageToImageMetricv4Test(int, char ** const) { result = EXIT_FAILURE; } - MetricType::MeasureType value2; + MetricType::MeasureType value2; MetricType::DerivativeType derivative2; metric->SetMaximumNumberOfWorkUnits(8); std::cerr << "Setting number of metric threads to " << metric->GetMaximumNumberOfWorkUnits() << std::endl; @@ -250,7 +250,7 @@ itkCorrelationImageToImageMetricv4Test(int, char ** const) movingTransform->SetParameters(parameters); constexpr MetricType::MeasureType expectedMetricMax = itk::NumericTraits::max(); std::cout << "Testing non-overlapping images. Expect a warning:" << std::endl; - MetricType::MeasureType valueReturn; + MetricType::MeasureType valueReturn; MetricType::DerivativeType derivativeReturn; metric->GetValueAndDerivative(valueReturn, derivativeReturn); if (metric->GetNumberOfValidPoints() != 0 || itk::Math::NotExactlyEquals(valueReturn, expectedMetricMax)) diff --git a/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4RegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4RegistrationTest.cxx index a053ac65b9e..52b12a9b1d9 100644 --- a/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4RegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4RegistrationTest.cxx @@ -95,8 +95,8 @@ itkDemonsImageToImageMetricv4RegistrationTest(int argc, char * argv[]) std::cout << argc << std::endl; unsigned int numberOfIterations = 10; - bool doSampling = false; - bool useImageGradientFilter = false; + bool doSampling = false; + bool useImageGradientFilter = false; if (argc >= 5) { numberOfIterations = std::stoi(argv[4]); @@ -206,8 +206,8 @@ itkDemonsImageToImageMetricv4RegistrationTest(int argc, char * argv[]) { using PointType = PointSetType::PointType; const PointSetType::Pointer pset(PointSetType::New()); - unsigned long ind = 0; - unsigned long ct = 0; + unsigned long ind = 0; + unsigned long ct = 0; for (itk::ImageRegionIteratorWithIndex It(fixedImage, fixedImage->GetLargestPossibleRegion()); !It.IsAtEnd(); @@ -288,7 +288,7 @@ itkDemonsImageToImageMetricv4RegistrationTest(int argc, char * argv[]) // write out the displacement field using DisplacementWriterType = itk::ImageFileWriter; - auto displacementwriter = DisplacementWriterType::New(); + auto displacementwriter = DisplacementWriterType::New(); const std::string outfilename(argv[3]); const std::string ext = itksys::SystemTools::GetFilenameExtension(outfilename); const std::string name = itksys::SystemTools::GetFilenameWithoutExtension(outfilename); diff --git a/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4Test.cxx index 68d17f8664e..d56fed52aa8 100644 --- a/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4Test.cxx @@ -36,9 +36,9 @@ itkDemonsImageToImageMetricv4Test(int, char ** const) constexpr unsigned int imageDimensionality = 3; using ImageType = itk::Image; - auto size = ImageType::SizeType::Filled(imageSize); + auto size = ImageType::SizeType::Filled(imageSize); constexpr ImageType::IndexType index{}; - const ImageType::RegionType region{ index, size }; + const ImageType::RegionType region{ index, size }; /* Create simple test images. */ @@ -127,7 +127,7 @@ itkDemonsImageToImageMetricv4Test(int, char ** const) } // Evaluate with GetValueAndDerivative - MetricType::MeasureType valueReturn1; + MetricType::MeasureType valueReturn1; MetricType::DerivativeType derivativeReturn; try { diff --git a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricRegistrationTest.cxx index 9f0411db290..be413b9980b 100644 --- a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricRegistrationTest.cxx @@ -67,11 +67,11 @@ using itkEuclideanDistancePointSetMetricRegistrationTestTransformType = itk::Tra ///////////////////////////////////////////////////////// template int -itkEuclideanDistancePointSetMetricRegistrationTestRun(unsigned int numberOfIterations, - double maximumPhysicalStepSize, - double pointMax, +itkEuclideanDistancePointSetMetricRegistrationTestRun(unsigned int numberOfIterations, + double maximumPhysicalStepSize, + double pointMax, typename TTransform::Pointer & transform, - typename TMetric::Pointer & metric) + typename TMetric::Pointer & metric) { using PointSetType = TPointSet; using PointType = typename PointSetType::PointType; @@ -84,7 +84,7 @@ itkEuclideanDistancePointSetMetricRegistrationTestRun(unsigned int // Create a few points and apply a small rotation to make the moving point set constexpr float theta = itk::Math::pi / static_cast(180.0) * static_cast(1.0); - PointType fixedPoint; + PointType fixedPoint; fixedPoint[0] = static_cast(0.0); fixedPoint[1] = static_cast(0.0); fixedPoints->SetPoint(0, fixedPoint); @@ -166,8 +166,8 @@ itkEuclideanDistancePointSetMetricRegistrationTestRun(unsigned int // applying the resultant transform and verify result std::cout << "Fixed\tMoving\tMovingTransformed\tFixedTransformed\tDiff" << std::endl; - bool passed = true; - auto tolerance = static_cast(1e-4); + bool passed = true; + auto tolerance = static_cast(1e-4); const typename TTransform::InverseTransformBasePointer fixedInverse = metric->GetFixedTransform()->GetInverseTransform(); for (unsigned int n = 0; n < numberOfPoints; ++n) @@ -205,7 +205,7 @@ itkEuclideanDistancePointSetMetricRegistrationTest(int argc, char * argv[]) int finalResult = EXIT_SUCCESS; unsigned int numberOfIterations = 100; - auto maximumPhysicalStepSize = static_cast(2.0); + auto maximumPhysicalStepSize = static_cast(2.0); if (argc > 1) { numberOfIterations = std::stoi(argv[1]); diff --git a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest.cxx b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest.cxx index e85c5c09826..c343b19f28e 100644 --- a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest.cxx @@ -41,7 +41,7 @@ itkEuclideanDistancePointSetMetricTestRun() offset[d] = 1.1 + d; } unsigned long count = 0; - const float pointSetRadius = 100.0; + const float pointSetRadius = 100.0; for (float theta = 0; theta < 2.0 * itk::Math::pi; theta += 0.1) { PointType fixedPoint; @@ -81,9 +81,9 @@ itkEuclideanDistancePointSetMetricTestRun() metric->Initialize(); const typename PointSetMetricType::MeasureType value = metric->GetValue(); - typename PointSetMetricType::DerivativeType derivative; + typename PointSetMetricType::DerivativeType derivative; metric->GetDerivative(derivative); - typename PointSetMetricType::MeasureType value2; + typename PointSetMetricType::MeasureType value2; typename PointSetMetricType::DerivativeType derivative2; metric->GetValueAndDerivative(value2, derivative2); diff --git a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest2.cxx b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest2.cxx index 4243a5a886d..453a7178b41 100644 --- a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest2.cxx +++ b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest2.cxx @@ -41,7 +41,7 @@ itkEuclideanDistancePointSetMetricTest2Run() auto movingPoints = PointSetType::New(); // Create a few points and apply a small offset to make the moving points - auto pointMax = static_cast(100.0); + auto pointMax = static_cast(100.0); PointType fixedPoint{}; fixedPoint[0] = 0.0; fixedPoint[1] = 0.0; @@ -103,7 +103,7 @@ itkEuclideanDistancePointSetMetricTest2Run() const RegionType region{ regionIndex, regionSize }; - auto displacementField = FieldType::New(); + auto displacementField = FieldType::New(); typename FieldType::DirectionType direction{}; for (unsigned int d = 0; d < Dimension; ++d) { @@ -124,7 +124,7 @@ itkEuclideanDistancePointSetMetricTest2Run() metric->SetMovingTransform(displacementTransform); // If we don't set this explicitly, it will still work because it will be taken from the // displacement field during initialization. - auto spacing = itk::MakeFilled(1.0); + auto spacing = itk::MakeFilled(1.0); const typename FieldType::PointType origin{}; metric->SetVirtualDomain(spacing, origin, direction, region); @@ -132,10 +132,10 @@ itkEuclideanDistancePointSetMetricTest2Run() // test const typename PointSetMetricType::MeasureType value = metric->GetValue(); - typename PointSetMetricType::DerivativeType derivative; + typename PointSetMetricType::DerivativeType derivative; metric->GetDerivative(derivative); - typename PointSetMetricType::MeasureType value2; + typename PointSetMetricType::MeasureType value2; typename PointSetMetricType::DerivativeType derivative2; metric->GetValueAndDerivative(value2, derivative2); @@ -220,7 +220,7 @@ itkEuclideanDistancePointSetMetricTest2Run() // Test with invalid virtual domain, i.e. // one that doesn't match the displacement field. - auto badSize = RegionType::SizeType::Filled(static_cast(pointMax / 2.0)); + auto badSize = RegionType::SizeType::Filled(static_cast(pointMax / 2.0)); const RegionType badRegion{ regionIndex, badSize }; metric->SetVirtualDomain(spacing, origin, direction, badRegion); ITK_TRY_EXPECT_EXCEPTION(metric->Initialize()); diff --git a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest3.cxx b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest3.cxx index 6c9bc9975d8..948280c9f53 100644 --- a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest3.cxx +++ b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricTest3.cxx @@ -42,7 +42,7 @@ itkEuclideanDistancePointSetMetricTest3Run(double distanceThreshold) auto movingPoints = PointSetType::New(); // Create a few points and apply a small offset to make the moving points - auto pointMax = static_cast(1.0); + auto pointMax = static_cast(1.0); PointType fixedPoint{}; fixedPoint[0] = 0.0; fixedPoint[1] = 0.0; @@ -123,9 +123,9 @@ itkEuclideanDistancePointSetMetricTest3Run(double distanceThreshold) // test const typename PointSetMetricType::MeasureType value = metric->GetValue(); - typename PointSetMetricType::DerivativeType derivative; + typename PointSetMetricType::DerivativeType derivative; metric->GetDerivative(derivative); - typename PointSetMetricType::MeasureType value2; + typename PointSetMetricType::MeasureType value2; typename PointSetMetricType::DerivativeType derivative2; metric->GetValueAndDerivative(value2, derivative2); diff --git a/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricRegistrationTest.cxx index bf1dbb6c3ea..a8e05e92824 100644 --- a/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricRegistrationTest.cxx @@ -109,7 +109,7 @@ itkExpectationBasedPointSetMetricRegistrationTest(int argc, char * argv[]) unsigned long count = 0; for (float theta = 0; theta < 2.0 * itk::Math::pi; theta += 0.1) { - PointType fixedPoint; + PointType fixedPoint; constexpr float radius = 100.0; fixedPoint[0] = radius * std::cos(theta); fixedPoint[1] = radius * std::sin(theta); @@ -178,8 +178,8 @@ itkExpectationBasedPointSetMetricRegistrationTest(int argc, char * argv[]) // applying the resultant transform to moving points and verify result std::cout << "Fixed\tMoving\tMovingTransformed\tFixedTransformed\tDiff" << std::endl; - bool passed = true; - constexpr PointType::ValueType tolerance = 1e-4; + bool passed = true; + constexpr PointType::ValueType tolerance = 1e-4; const AffineTransformType::InverseTransformBasePointer movingInverse = metric->GetMovingTransform()->GetInverseTransform(); const AffineTransformType::InverseTransformBasePointer fixedInverse = diff --git a/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricTest.cxx b/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricTest.cxx index 13ef6b26c80..49a183200a4 100644 --- a/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricTest.cxx @@ -44,7 +44,7 @@ itkExpectationBasedPointSetMetricTestRun() unsigned long count = 0; for (float theta = 0; theta < 2.0 * itk::Math::pi; theta += 0.1) { - PointType fixedPoint; + PointType fixedPoint; constexpr float radius = 100.0; fixedPoint[0] = radius * std::cos(theta); fixedPoint[1] = radius * std::sin(theta); @@ -91,10 +91,10 @@ itkExpectationBasedPointSetMetricTestRun() metric->Initialize(); const typename PointSetMetricType::MeasureType value = metric->GetValue(); - typename PointSetMetricType::DerivativeType derivative; + typename PointSetMetricType::DerivativeType derivative; metric->GetDerivative(derivative); - typename PointSetMetricType::MeasureType value2; + typename PointSetMetricType::MeasureType value2; typename PointSetMetricType::DerivativeType derivative2; metric->GetValueAndDerivative(value2, derivative2); diff --git a/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4RegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4RegistrationTest.cxx index 67d5e47f0ee..9281c431918 100644 --- a/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4RegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4RegistrationTest.cxx @@ -40,17 +40,17 @@ template int -ImageToImageMetricv4RegistrationTestRun(typename TMetric::Pointer metric, - int numberOfIterations, +ImageToImageMetricv4RegistrationTestRun(typename TMetric::Pointer metric, + int numberOfIterations, typename TImage::PixelType maximumStepSize, - bool doSampling, - bool doGradientFilter) + bool doSampling, + bool doGradientFilter) { using PixelType = typename TImage::PixelType; using CoordinateRepresentationType = PixelType; // Create two simple images - const itk::SizeValueType ImageSize = (Dimension == 3) ? 60 : 100; + const itk::SizeValueType ImageSize = (Dimension == 3) ? 60 : 100; const itk::OffsetValueType boundary = (Dimension == 3) ? 4 : 6; // Declare Gaussian Sources @@ -89,8 +89,8 @@ ImageToImageMetricv4RegistrationTestRun(typename TMetric::Pointer metric, // shift the fixed image to get the moving image using CyclicShiftFilterType = itk::CyclicShiftImageFilter; - auto shiftFilter = CyclicShiftFilterType::New(); - typename CyclicShiftFilterType::OffsetType imageShift; + auto shiftFilter = CyclicShiftFilterType::New(); + typename CyclicShiftFilterType::OffsetType imageShift; const typename CyclicShiftFilterType::OffsetValueType maxImageShift = boundary - 1; imageShift.Fill(maxImageShift); imageShift[0] = maxImageShift / 2; @@ -123,9 +123,9 @@ ImageToImageMetricv4RegistrationTestRun(typename TMetric::Pointer metric, { using PointSetType = typename TMetric::FixedSampledPointSetType; using PointType = typename PointSetType::PointType; - const typename PointSetType::Pointer pset(PointSetType::New()); - itk::SizeValueType ind = 0; - itk::SizeValueType ct = 0; + const typename PointSetType::Pointer pset(PointSetType::New()); + itk::SizeValueType ind = 0; + itk::SizeValueType ct = 0; itk::ImageRegionIteratorWithIndex itS(fixedImage, fixedImage->GetLargestPossibleRegion()); for (itS.GoToBegin(); !itS.IsAtEnd(); ++itS) { @@ -215,12 +215,12 @@ itkImageToImageMetricv4RegistrationTestRunAll(int argc, char * argv[]) // options // we have two options for iterations and step size to accomodate // the different behavior of metrics - int numberOfIterations1 = 50; + int numberOfIterations1 = 50; typename ImageType::PixelType maximumStepSize1 = 1.0; - int numberOfIterations2 = 120; + int numberOfIterations2 = 120; typename ImageType::PixelType maximumStepSize2 = 0.1; - bool doSampling = false; - bool doGradientFilter = false; + bool doSampling = false; + bool doGradientFilter = false; if (argc > 1) { diff --git a/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx index 84771f78c69..2c7646b70d1 100644 --- a/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx @@ -71,17 +71,17 @@ class TestImageToImageGetValueAndDerivativeThreader /* Provide the worker routine to process each point */ bool - ProcessPoint(const VirtualIndexType & itkNotUsed(virtualIndex), - const VirtualPointType & itkNotUsed(virtualPoint), - const FixedImagePointType & itkNotUsed(mappedFixedPoint), - const FixedImagePixelType & mappedFixedPixelValue, - const FixedImageGradientType & mappedFixedImageGradient, - const MovingImagePointType & itkNotUsed(mappedMovingPoint), - const MovingImagePixelType & mappedMovingPixelValue, + ProcessPoint(const VirtualIndexType & itkNotUsed(virtualIndex), + const VirtualPointType & itkNotUsed(virtualPoint), + const FixedImagePointType & itkNotUsed(mappedFixedPoint), + const FixedImagePixelType & mappedFixedPixelValue, + const FixedImageGradientType & mappedFixedImageGradient, + const MovingImagePointType & itkNotUsed(mappedMovingPoint), + const MovingImagePixelType & mappedMovingPixelValue, const MovingImageGradientType & mappedMovingImageGradient, - MeasureType & metricValueResult, - DerivativeType & localDerivativeReturn, - const itk::ThreadIdType itkNotUsed(threadId)) const override + MeasureType & metricValueResult, + DerivativeType & localDerivativeReturn, + const itk::ThreadIdType itkNotUsed(threadId)) const override { /* Just return some test values that can verify proper mechanics */ metricValueResult = mappedFixedPixelValue + mappedMovingPixelValue; @@ -138,7 +138,7 @@ class ImageToImageMetricv4TestMetric : public itk::ImageToImageMetricv4, @@ -194,17 +194,17 @@ using ImageToImageMetricv4TestMetricPointer = ImageToImageMetricv4TestMetricType // Compute truth values for the identity-transform tests // void -ImageToImageMetricv4TestComputeIdentityTruthValues(const ImageToImageMetricv4TestMetricPointer & metric, - const ImageToImageMetricv4TestImageType::Pointer & fixedImage, - const ImageToImageMetricv4TestImageType::Pointer & movingImage, - ImageToImageMetricv4TestMetricType::MeasureType & truthValue, +ImageToImageMetricv4TestComputeIdentityTruthValues(const ImageToImageMetricv4TestMetricPointer & metric, + const ImageToImageMetricv4TestImageType::Pointer & fixedImage, + const ImageToImageMetricv4TestImageType::Pointer & movingImage, + ImageToImageMetricv4TestMetricType::MeasureType & truthValue, ImageToImageMetricv4TestMetricType::DerivativeType & truthDerivative) { // Make sure the metric is initialized std::cout << "truth values: Initialize" << std::endl; metric->Initialize(); // Call once to setup gradient images if applicable - ImageToImageMetricv4TestMetricType::MeasureType tempValue; + ImageToImageMetricv4TestMetricType::MeasureType tempValue; ImageToImageMetricv4TestMetricType::DerivativeType tempDerivative; metric->GetValueAndDerivative(tempValue, tempDerivative); @@ -233,7 +233,7 @@ ImageToImageMetricv4TestComputeIdentityTruthValues(const ImageToImageMetricv4Tes // NOTE: relying on the metric's gradient image isn't a // complete test, but it does test the rest of the mechanics. ImageToImageMetricv4TestMetricType::MovingImageGradientType movingImageDerivative; - ImageToImageMetricv4TestMetricType::FixedImageGradientType fixedImageDerivative; + ImageToImageMetricv4TestMetricType::FixedImageGradientType fixedImageDerivative; if (metric->GetUseFixedImageGradientFilter()) { const ImageToImageMetricv4TestMetricType::FixedImageGradientImageType::ConstPointer fixedGradientImage = @@ -307,11 +307,11 @@ ImageToImageMetricv4TestComputeIdentityTruthValues(const ImageToImageMetricv4Tes // Otherwise, this will compare the results of calling the metric // with truthValue and truthDerivative. int -ImageToImageMetricv4TestRunSingleTest(const ImageToImageMetricv4TestMetricPointer & metric, - ImageToImageMetricv4TestMetricType::MeasureType & truthValue, +ImageToImageMetricv4TestRunSingleTest(const ImageToImageMetricv4TestMetricPointer & metric, + ImageToImageMetricv4TestMetricType::MeasureType & truthValue, ImageToImageMetricv4TestMetricType::DerivativeType & truthDerivative, - itk::SizeValueType expectedNumberOfPoints, - bool setTruthValues) + itk::SizeValueType expectedNumberOfPoints, + bool setTruthValues) { int result = EXIT_SUCCESS; @@ -326,7 +326,7 @@ ImageToImageMetricv4TestRunSingleTest(const ImageToImageMetricv4TestMetricPointe ITK_TRY_EXPECT_NO_EXCEPTION(metric->Initialize()); // Evaluate using GetValueAndDerivative - ImageToImageMetricv4TestMetricType::MeasureType valueReturn2; + ImageToImageMetricv4TestMetricType::MeasureType valueReturn2; ImageToImageMetricv4TestMetricType::DerivativeType derivativeReturn; ITK_TRY_EXPECT_NO_EXCEPTION(metric->GetValueAndDerivative(valueReturn2, derivativeReturn)); @@ -385,9 +385,9 @@ itkImageToImageMetricv4Test(int, char ** const) using DimensionSizeType = unsigned int; constexpr DimensionSizeType imageSize = 4; - constexpr ImageToImageMetricv4TestImageType::SizeType size = { { imageSize, imageSize } }; + constexpr ImageToImageMetricv4TestImageType::SizeType size = { { imageSize, imageSize } }; constexpr ImageToImageMetricv4TestImageType::IndexType index = { { 0, 0 } }; - const ImageToImageMetricv4TestImageType::RegionType region{ index, size }; + const ImageToImageMetricv4TestImageType::RegionType region{ index, size }; // Create simple test images. @@ -458,7 +458,7 @@ itkImageToImageMetricv4Test(int, char ** const) // Evaluate the metric and verify results, using identity transforms. // Test with different numbers of threads. // Run through all the permutations image gradient calculation method. - ImageToImageMetricv4TestMetricType::MeasureType truthValue; + ImageToImageMetricv4TestMetricType::MeasureType truthValue; ImageToImageMetricv4TestMetricType::DerivativeType truthDerivative; for (itk::ThreadIdType numberOfThreads = 1; numberOfThreads < 6; ++numberOfThreads) { @@ -544,8 +544,8 @@ itkImageToImageMetricv4Test(int, char ** const) using FieldType = DisplacementTransformType::DisplacementFieldType; auto field = FieldType::New(); // This is based on itk::Image - FieldType::SizeType defsize; - FieldType::IndexType start; + FieldType::SizeType defsize; + FieldType::IndexType start; FieldType::RegionType defregion; defsize.Fill(imageSize); start.Fill(0); @@ -617,7 +617,7 @@ itkImageToImageMetricv4Test(int, char ** const) using PointType = PointSetType::PointType; PointSetType::CoordinateType testPointCoords[2]; - const PointSetType::Pointer pset(PointSetType::New()); + const PointSetType::Pointer pset(PointSetType::New()); std::cout << "Creating point set..." << std::endl; DimensionSizeType ind = 0; diff --git a/Modules/Registration/Metricsv4/test/itkJensenHavrdaCharvatTsallisPointSetMetricRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkJensenHavrdaCharvatTsallisPointSetMetricRegistrationTest.cxx index 8e87e6a08d3..5fe896bb4b5 100644 --- a/Modules/Registration/Metricsv4/test/itkJensenHavrdaCharvatTsallisPointSetMetricRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkJensenHavrdaCharvatTsallisPointSetMetricRegistrationTest.cxx @@ -113,7 +113,7 @@ itkJensenHavrdaCharvatTsallisPointSetMetricRegistrationTest(int argc, char * arg unsigned long count = 0; for (float theta = 0; theta < 2.0 * itk::Math::pi; theta += 0.1) { - PointType fixedPoint; + PointType fixedPoint; constexpr float radius = 100.0; fixedPoint[0] = radius * std::cos(theta); fixedPoint[1] = radius * std::sin(theta); @@ -186,8 +186,8 @@ itkJensenHavrdaCharvatTsallisPointSetMetricRegistrationTest(int argc, char * arg // applying the resultant transform to moving points and verify result std::cout << "Fixed\tMoving\tMovingTransformed\tFixedTransformed\tDiff" << std::endl; - bool passed = true; - constexpr PointType::ValueType tolerance = 1e-2; + bool passed = true; + constexpr PointType::ValueType tolerance = 1e-2; const AffineTransformType::InverseTransformBasePointer movingInverse = metric->GetMovingTransform()->GetInverseTransform(); const AffineTransformType::InverseTransformBasePointer fixedInverse = diff --git a/Modules/Registration/Metricsv4/test/itkJensenHavrdaCharvatTsallisPointSetMetricTest.cxx b/Modules/Registration/Metricsv4/test/itkJensenHavrdaCharvatTsallisPointSetMetricTest.cxx index 83d98136b7f..6f78ca33dff 100644 --- a/Modules/Registration/Metricsv4/test/itkJensenHavrdaCharvatTsallisPointSetMetricTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkJensenHavrdaCharvatTsallisPointSetMetricTest.cxx @@ -51,7 +51,7 @@ itkJensenHavrdaCharvatTsallisPointSetMetricTestRun() for (float theta = 0; theta < 2.0 * itk::Math::pi; theta += 0.1) { constexpr float radius = 100.0; - PointType fixedPoint; + PointType fixedPoint; fixedPoint[0] = radius * std::cos(theta); fixedPoint[1] = radius * std::sin(theta); // simplistic point set test: @@ -84,10 +84,10 @@ itkJensenHavrdaCharvatTsallisPointSetMetricTestRun() // check various alpha values between accepted values of [1.0, 2.0] constexpr unsigned int numberOfAlphaValues = 6; - constexpr float alphaValues[] = { 1.0f, 1.2f, 1.4f, 1.6f, 1.8f, 2.0f }; + constexpr float alphaValues[] = { 1.0f, 1.2f, 1.4f, 1.6f, 1.8f, 2.0f }; constexpr unsigned int evaluationKNeighborhood = 50; - auto useAnisotropicCovariances = false; + auto useAnisotropicCovariances = false; constexpr unsigned int covarianceKNeighborhood = 5; for (unsigned int i = 0; i < numberOfAlphaValues; ++i) @@ -129,9 +129,9 @@ itkJensenHavrdaCharvatTsallisPointSetMetricTestRun() metric->Initialize(); const typename PointSetMetricType::MeasureType value = metric->GetValue(); - typename PointSetMetricType::DerivativeType derivative; + typename PointSetMetricType::DerivativeType derivative; metric->GetDerivative(derivative); - typename PointSetMetricType::MeasureType value2; + typename PointSetMetricType::MeasureType value2; typename PointSetMetricType::DerivativeType derivative2; metric->GetValueAndDerivative(value2, derivative2); diff --git a/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageMetricv4Test.cxx index 1dd48d1e4d7..7600c2acf69 100644 --- a/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageMetricv4Test.cxx @@ -35,9 +35,9 @@ itkJointHistogramMutualInformationImageToImageMetricv4Test(int, char *[]) constexpr unsigned int imageDimensionality = 3; using ImageType = itk::Image; - auto size = ImageType::SizeType::Filled(imageSize); + auto size = ImageType::SizeType::Filled(imageSize); constexpr ImageType::IndexType index{}; - const ImageType::RegionType region{ index, size }; + const ImageType::RegionType region{ index, size }; /* Create simple test images. */ auto fixedImage = ImageType::New(); @@ -104,7 +104,7 @@ itkJointHistogramMutualInformationImageToImageMetricv4Test(int, char *[]) MetricType::MeasureType valueReturn1; ITK_TRY_EXPECT_NO_EXCEPTION(valueReturn1 = metric->GetValue()); - MetricType::MeasureType valueReturn2; + MetricType::MeasureType valueReturn2; MetricType::DerivativeType derivativeReturn; ITK_TRY_EXPECT_NO_EXCEPTION(metric->GetValueAndDerivative(valueReturn2, derivativeReturn)); diff --git a/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx index 7b426c41502..5719aeea38e 100644 --- a/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx @@ -91,9 +91,9 @@ class JointPDFStatus : public itk::Command std::cout << "Current optimizer iteration: " << optimizer->GetCurrentIteration() << '\n'; std::cout << "Current optimizer value: " << optimizer->GetCurrentMetricValue() << '\n'; - const std::string ext = itksys::SystemTools::GetFilenameExtension(this->m_OutputFileNameBase); - const std::string name = itksys::SystemTools::GetFilenameWithoutExtension(this->m_OutputFileNameBase); - const std::string path = itksys::SystemTools::GetFilenamePath(this->m_OutputFileNameBase); + const std::string ext = itksys::SystemTools::GetFilenameExtension(this->m_OutputFileNameBase); + const std::string name = itksys::SystemTools::GetFilenameWithoutExtension(this->m_OutputFileNameBase); + const std::string path = itksys::SystemTools::GetFilenamePath(this->m_OutputFileNameBase); std::ostringstream ostrm; ostrm << name << "_jointpdf_" << this->m_Count << ext; std::cout << "Writing joint pdf to: " << ostrm.str() << std::endl; @@ -109,7 +109,7 @@ class JointPDFStatus : public itk::Command // Check for correct normalization. using IteratorType = itk::ImageRegionConstIterator; IteratorType it(jointPDF, jointPDF->GetBufferedRegion()); - double sum = 0.0; + double sum = 0.0; for (it.GoToBegin(); !it.IsAtEnd(); ++it) { sum += it.Get(); @@ -131,7 +131,7 @@ class JointPDFStatus : public itk::Command const MIMetricType * m_MIMetric; unsigned int m_Count{ 0 }; - std::string m_OutputFileNameBase; + std::string m_OutputFileNameBase; using WriterType = typename itk::ImageFileWriter; typename WriterType::Pointer m_Writer; @@ -156,7 +156,7 @@ itkJointHistogramMutualInformationImageToImageRegistrationTest(int argc, char * std::cout << argc << std::endl; unsigned int numberOfIterations = 10; unsigned int numberOfDisplacementIterations = 10; - bool useScalesEstimator = true; + bool useScalesEstimator = true; if (argc >= 5) { numberOfIterations = std::stoi(argv[4]); @@ -242,9 +242,9 @@ itkJointHistogramMutualInformationImageToImageRegistrationTest(int argc, char * metric->SetNumberOfHistogramBins(20); using PointType = PointSetType::PointType; - const PointSetType::Pointer pset(PointSetType::New()); - unsigned long ind = 0; - unsigned long ct = 0; + const PointSetType::Pointer pset(PointSetType::New()); + unsigned long ind = 0; + unsigned long ct = 0; itk::ImageRegionIteratorWithIndex It(fixedImage, fixedImage->GetLargestPossibleRegion()); for (It.GoToBegin(); !It.IsAtEnd(); ++It) { @@ -359,7 +359,7 @@ itkJointHistogramMutualInformationImageToImageRegistrationTest(int argc, char * // write out the displacement field using DisplacementWriterType = itk::ImageFileWriter; - auto displacementwriter = DisplacementWriterType::New(); + auto displacementwriter = DisplacementWriterType::New(); const std::string outfilename(argv[3]); const std::string ext = itksys::SystemTools::GetFilenameExtension(outfilename); const std::string name = itksys::SystemTools::GetFilenameWithoutExtension(outfilename); diff --git a/Modules/Registration/Metricsv4/test/itkLabeledPointSetMetricRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkLabeledPointSetMetricRegistrationTest.cxx index f901809a0bb..ed44acf5fec 100644 --- a/Modules/Registration/Metricsv4/test/itkLabeledPointSetMetricRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkLabeledPointSetMetricRegistrationTest.cxx @@ -84,7 +84,7 @@ itkLabeledPointSetMetricRegistrationTestPerMetric(unsigned int numberOfIteration { auto label = static_cast(1.5 + count / 35); - PointType fixedPoint; + PointType fixedPoint; constexpr float radius = 100.0; fixedPoint[0] = radius * std::cos(theta); fixedPoint[1] = radius * std::sin(theta); @@ -153,8 +153,8 @@ itkLabeledPointSetMetricRegistrationTestPerMetric(unsigned int numberOfIteration // applying the resultant transform to moving points and verify result std::cout << "Fixed\tMoving\tMovingTransformed\tFixedTransformed\tDiff" << std::endl; - bool passed = true; - const typename PointType::ValueType tolerance = 1e-2; + bool passed = true; + const typename PointType::ValueType tolerance = 1e-2; const typename AffineTransformType::InverseTransformBasePointer movingInverse = metric->GetMovingTransform()->GetInverseTransform(); const typename AffineTransformType::InverseTransformBasePointer fixedInverse = @@ -199,7 +199,7 @@ itkLabeledPointSetMetricRegistrationTest(int argc, char * argv[]) { using PointSetMetricType = itk::EuclideanDistancePointSetToPointSetMetricv4; - auto metric = PointSetMetricType::New(); + auto metric = PointSetMetricType::New(); const int success = itkLabeledPointSetMetricRegistrationTestPerMetric(numberOfIterations, metric.GetPointer()); diff --git a/Modules/Registration/Metricsv4/test/itkLabeledPointSetMetricTest.cxx b/Modules/Registration/Metricsv4/test/itkLabeledPointSetMetricTest.cxx index ea4bf4dd02e..4e05c62a000 100644 --- a/Modules/Registration/Metricsv4/test/itkLabeledPointSetMetricTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkLabeledPointSetMetricTest.cxx @@ -45,7 +45,7 @@ itkLabeledPointSetMetricTestRun() offset[d] = 1.1 + d; } unsigned long count = 0; - const float pointSetRadius = 100.0; + const float pointSetRadius = 100.0; for (float theta = 0; theta < 2.0 * itk::Math::pi; theta += 0.1) { LabelType label = 1; @@ -103,9 +103,9 @@ itkLabeledPointSetMetricTestRun() metric->Initialize(); const typename PointSetMetricType::MeasureType value = metric->GetValue(); - typename PointSetMetricType::DerivativeType derivative; + typename PointSetMetricType::DerivativeType derivative; metric->GetDerivative(derivative); - typename PointSetMetricType::MeasureType value2; + typename PointSetMetricType::MeasureType value2; typename PointSetMetricType::DerivativeType derivative2; metric->GetValueAndDerivative(value2, derivative2); diff --git a/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4RegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4RegistrationTest.cxx index 2bda3e6166c..8f372ec5759 100644 --- a/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4RegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4RegistrationTest.cxx @@ -58,7 +58,7 @@ itkMattesMutualInformationImageToImageMetricv4RegistrationTest(int argc, char * std::cout << argc << std::endl; unsigned int numberOfIterations = 10; unsigned int numberOfDisplacementIterations = 10; - bool doSampling = false; + bool doSampling = false; if (argc >= 5) { @@ -153,9 +153,9 @@ itkMattesMutualInformationImageToImageMetricv4RegistrationTest(int argc, char * else { using PointType = PointSetType::PointType; - const PointSetType::Pointer pset(PointSetType::New()); - unsigned long ind = 0; - unsigned long ct = 0; + const PointSetType::Pointer pset(PointSetType::New()); + unsigned long ind = 0; + unsigned long ct = 0; itk::ImageRegionIteratorWithIndex It(fixedImage, fixedImage->GetLargestPossibleRegion()); for (It.GoToBegin(); !It.IsAtEnd(); ++It) { @@ -266,7 +266,7 @@ itkMattesMutualInformationImageToImageMetricv4RegistrationTest(int argc, char * // write out the displacement field using DisplacementWriterType = itk::ImageFileWriter; - auto displacementwriter = DisplacementWriterType::New(); + auto displacementwriter = DisplacementWriterType::New(); const std::string outfilename(argv[3]); const std::string ext = itksys::SystemTools::GetFilenameExtension(outfilename); const std::string name = itksys::SystemTools::GetFilenameWithoutExtension(outfilename); diff --git a/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx index 215cd983810..9d28e4a296a 100644 --- a/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx @@ -63,9 +63,9 @@ TestMattesMetricWithAffineTransform(TInterpolator * const interpolator, const bo const unsigned int ImageDimension = MovingImageType::ImageDimension; // Image size is scaled to represent sqrt(256^3) - const typename MovingImageType::SizeType size = { { static_cast(imageSize), - static_cast(imageSize) } }; - const typename MovingImageType::IndexType index = { { 0, 0 } }; + const typename MovingImageType::SizeType size = { { static_cast(imageSize), + static_cast(imageSize) } }; + const typename MovingImageType::IndexType index = { { 0, 0 } }; const typename MovingImageType::RegionType region{ index, size }; typename MovingImageType::SpacingType imgSpacing; @@ -128,8 +128,8 @@ TestMattesMetricWithAffineTransform(TInterpolator * const interpolator, const bo p[0] = ti.GetIndex()[0]; p[1] = ti.GetIndex()[1]; itk::Vector d = p - center; - const double x = d[0]; - const double y = d[1]; + const double x = d[0]; + const double y = d[1]; ti.Set(static_cast(200.0 * std::exp(-(x * x + y * y) / (s * s)))); ++ti; } @@ -149,7 +149,7 @@ TestMattesMetricWithAffineTransform(TInterpolator * const interpolator, const bo { { // Set up a mask that only has every third voxel listed is used in fixed image region - int count = 0; + int count = 0; ReferenceIteratorType ri1(imgMovingMask, region); ri1.GoToBegin(); while (!ri1.IsAtEnd()) // Set all moving mask voxels to 1 @@ -165,7 +165,7 @@ TestMattesMetricWithAffineTransform(TInterpolator * const interpolator, const bo { // Set up a mask that only has every other voxel listed is used in fixed image region - int count = 0; + int count = 0; TargetIteratorType ti1(imgFixedMask, region); ti1.GoToBegin(); while (!ti1.IsAtEnd()) // Set a subset of fixed mask voxels to 1, so that requested number can be made more than @@ -253,9 +253,9 @@ TestMattesMetricWithAffineTransform(TInterpolator * const interpolator, const bo { using PointSetType = typename MetricType::FixedSampledPointSetType; using PointType = typename PointSetType::PointType; - const typename PointSetType::Pointer pset(PointSetType::New()); - unsigned int ind = 0; - unsigned int ct = 0; + const typename PointSetType::Pointer pset(PointSetType::New()); + unsigned int ind = 0; + unsigned int ct = 0; itk::ImageRegionIteratorWithIndex It(imgFixed, imgFixed->GetLargestPossibleRegion()); for (It.GoToBegin(); !It.IsAtEnd(); ++It) { @@ -283,15 +283,15 @@ TestMattesMetricWithAffineTransform(TInterpolator * const interpolator, const bo //------------------------------------------------------------ transformer->SetIdentity(); const unsigned int numberOfParameters = transformer->GetNumberOfParameters(); - ParametersType parameters = transformer->GetParameters(); + ParametersType parameters = transformer->GetParameters(); //--------------------------------------------------------- // Print out mutual information values // for parameters[4] = {-10,10} (arbitrary choice) //--------------------------------------------------------- - typename MetricType::MeasureType metricValueWithDerivative; - typename MetricType::MeasureType metricValueOnly; + typename MetricType::MeasureType metricValueWithDerivative; + typename MetricType::MeasureType metricValueOnly; typename MetricType::DerivativeType derivative(numberOfParameters); @@ -454,7 +454,7 @@ itkMattesMutualInformationImageToImageMetricv4Test(int, char *[]) std::cout << "Test metric with a linear interpolator." << std::endl; bool useSampling = false; - int failed = true; + int failed = true; failed = TestMattesMetricWithAffineTransform(linearInterpolator, useSampling, imageSize); if (failed) diff --git a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4OnVectorTest.cxx b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4OnVectorTest.cxx index 17740eed34f..3758e93756a 100644 --- a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4OnVectorTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4OnVectorTest.cxx @@ -38,9 +38,9 @@ itkMeanSquaresImageToImageMetricv4OnVectorTest(int, char ** const) using VectorType = itk::Vector; using ImageType = itk::Image; - auto size = ImageType::SizeType::Filled(imageSize); + auto size = ImageType::SizeType::Filled(imageSize); constexpr ImageType::IndexType index{}; - const ImageType::RegionType region{ index, size }; + const ImageType::RegionType region{ index, size }; /* Create simple test images. */ auto fixedImage = ImageType::New(); @@ -121,7 +121,7 @@ itkMeanSquaresImageToImageMetricv4OnVectorTest(int, char ** const) std::cout << "Initialized" << std::endl; /* Evaluate with GetValueAndDerivative */ - MetricType::MeasureType valueReturn1; + MetricType::MeasureType valueReturn1; MetricType::DerivativeType derivativeReturn; try { diff --git a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4OnVectorTest2.cxx b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4OnVectorTest2.cxx index abcd4f5c047..01f29516fd3 100644 --- a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4OnVectorTest2.cxx +++ b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4OnVectorTest2.cxx @@ -26,7 +26,7 @@ template int -itkMeanSquaresImageToImageMetricv4OnVectorTest2Run(typename TMetric::MeasureType & measureReturn, +itkMeanSquaresImageToImageMetricv4OnVectorTest2Run(typename TMetric::MeasureType & measureReturn, typename TMetric::DerivativeType & derivativeReturn) { constexpr unsigned int imageSize = 5; @@ -34,8 +34,8 @@ itkMeanSquaresImageToImageMetricv4OnVectorTest2Run(typename TMetric::MeasureType using ImageType = typename TMetric::FixedImageType; - auto size = ImageType::SizeType::Filled(imageSize); - const typename ImageType::IndexType index{}; + auto size = ImageType::SizeType::Filled(imageSize); + const typename ImageType::IndexType index{}; const typename ImageType::RegionType region{ index, size }; /* Create simple test images. */ @@ -52,7 +52,7 @@ itkMeanSquaresImageToImageMetricv4OnVectorTest2Run(typename TMetric::MeasureType */ using PixelType = typename ImageType::PixelType; - itk::ImageRegionIterator itFixed(fixedImage, region); + itk::ImageRegionIterator itFixed(fixedImage, region); itk::ImageRegionIteratorWithIndex itMoving(movingImage, region); itFixed.GoToBegin(); @@ -138,7 +138,7 @@ itkMeanSquaresImageToImageMetricv4OnVectorTest2(int, char ** const) using VectorMetricType = itk::MeanSquaresImageToImageMetricv4; - VectorMetricType::MeasureType vectorMeasure = 0.0; + VectorMetricType::MeasureType vectorMeasure = 0.0; VectorMetricType::DerivativeType vectorDerivative{}; itkMeanSquaresImageToImageMetricv4OnVectorTest2Run(vectorMeasure, vectorDerivative); @@ -148,7 +148,7 @@ itkMeanSquaresImageToImageMetricv4OnVectorTest2(int, char ** const) using ScalarImageType = itk::Image; using ScalarMetricType = itk::MeanSquaresImageToImageMetricv4; - ScalarMetricType::MeasureType scalarMeasure = 0.0; + ScalarMetricType::MeasureType scalarMeasure = 0.0; ScalarMetricType::DerivativeType scalarDerivative{}; itkMeanSquaresImageToImageMetricv4OnVectorTest2Run(scalarMeasure, scalarDerivative); diff --git a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest.cxx index 982048dc95f..04b0146f3e1 100644 --- a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest.cxx @@ -57,7 +57,7 @@ itkMeanSquaresImageToImageMetricv4RegistrationTest(int argc, char * argv[]) std::cout << argc << std::endl; unsigned int numberOfIterations = 2; unsigned int numberOfDisplacementIterations = 2; - bool useScalesEstimator = true; + bool useScalesEstimator = true; if (argc >= 5) { numberOfIterations = std::stoi(argv[4]); @@ -142,9 +142,9 @@ itkMeanSquaresImageToImageMetricv4RegistrationTest(int argc, char * argv[]) auto metric = MetricType::New(); using PointType = PointSetType::PointType; - const PointSetType::Pointer pset(PointSetType::New()); - unsigned long ind = 0; - unsigned long ct = 0; + const PointSetType::Pointer pset(PointSetType::New()); + unsigned long ind = 0; + unsigned long ct = 0; itk::ImageRegionIteratorWithIndex It(fixedImage, fixedImage->GetLargestPossibleRegion()); for (It.GoToBegin(); !It.IsAtEnd(); ++It) @@ -258,7 +258,7 @@ itkMeanSquaresImageToImageMetricv4RegistrationTest(int argc, char * argv[]) // write out the displacement field using DisplacementWriterType = itk::ImageFileWriter; - auto displacementwriter = DisplacementWriterType::New(); + auto displacementwriter = DisplacementWriterType::New(); const std::string outfilename(argv[3]); const std::string ext = itksys::SystemTools::GetFilenameExtension(outfilename); const std::string name = itksys::SystemTools::GetFilenameWithoutExtension(outfilename); diff --git a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest2.cxx b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest2.cxx index 41e6c936db6..3b0b5dc7787 100644 --- a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest2.cxx +++ b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4RegistrationTest2.cxx @@ -56,10 +56,10 @@ itkMeanSquaresImageToImageMetricv4RegistrationTest2(int argc, char * argv[]) } double gTolerance = 1e-4; // Gradient magnitude tolerance - int maxIterations = 100; // Maximum number of iterations + int maxIterations = 100; // Maximum number of iterations double lineSearchTol = 0.9; // Line search tolerance double stepLength = 1.0; // Default step length - bool trace = false; // Tracing + bool trace = false; // Tracing if (argc > 4) { @@ -133,8 +133,8 @@ itkMeanSquaresImageToImageMetricv4RegistrationTest2(int argc, char * argv[]) auto metric = MetricType::New(); using PointType = PointSetType::PointType; - const PointSetType::Pointer pset(PointSetType::New()); - unsigned long ind = 0; + const PointSetType::Pointer pset(PointSetType::New()); + unsigned long ind = 0; itk::ImageRegionIteratorWithIndex it(fixedImage, fixedImage->GetLargestPossibleRegion()); for (it.GoToBegin(); !it.IsAtEnd(); ++it) diff --git a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4SpeedTest.cxx b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4SpeedTest.cxx index 60c8c8d1662..58ff6a529b3 100644 --- a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4SpeedTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4SpeedTest.cxx @@ -39,9 +39,9 @@ itkMeanSquaresImageToImageMetricv4SpeedTest(int argc, char * argv[]) constexpr unsigned int imageDimensionality = 3; using ImageType = itk::Image; - auto size = ImageType::SizeType::Filled(imageSize); + auto size = ImageType::SizeType::Filled(imageSize); constexpr ImageType::IndexType index{}; - const ImageType::RegionType region{ index, size }; + const ImageType::RegionType region{ index, size }; /* Create simple test images. */ auto fixedImage = ImageType::New(); @@ -103,7 +103,7 @@ itkMeanSquaresImageToImageMetricv4SpeedTest(int argc, char * argv[]) metric->Initialize(); // Evaluate with GetValueAndDerivative - MetricType::MeasureType valueReturn1; + MetricType::MeasureType valueReturn1; MetricType::DerivativeType derivativeReturn; MetricType::MeasureType sum{}; diff --git a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4Test.cxx index bef389199f2..f32698dc4f5 100644 --- a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4Test.cxx @@ -34,9 +34,9 @@ itkMeanSquaresImageToImageMetricv4Test(int, char ** const) constexpr unsigned int imageDimensionality = 3; using ImageType = itk::Image; - auto size = ImageType::SizeType::Filled(imageSize); + auto size = ImageType::SizeType::Filled(imageSize); constexpr ImageType::IndexType index{}; - const ImageType::RegionType region{ index, size }; + const ImageType::RegionType region{ index, size }; /* Create simple test images. */ auto fixedImage = ImageType::New(); @@ -106,7 +106,7 @@ itkMeanSquaresImageToImageMetricv4Test(int, char ** const) } // Evaluate with GetValueAndDerivative - MetricType::MeasureType valueReturn1; + MetricType::MeasureType valueReturn1; MetricType::DerivativeType derivativeReturn; try { diff --git a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4VectorRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4VectorRegistrationTest.cxx index 93ed7218034..4bcb88eb34e 100644 --- a/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4VectorRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4VectorRegistrationTest.cxx @@ -59,7 +59,7 @@ itkMeanSquaresImageToImageMetricv4VectorRegistrationTest(int argc, char * argv[] std::cout << argc << std::endl; unsigned int numberOfAffineIterations = 2; unsigned int numberOfDisplacementIterations = 2; - bool useScalesEstimator = true; + bool useScalesEstimator = true; if (argc >= 5) { numberOfAffineIterations = std::stoi(argv[4]); @@ -150,9 +150,9 @@ itkMeanSquaresImageToImageMetricv4VectorRegistrationTest(int argc, char * argv[] auto metric = MetricType::New(); using PointType = PointSetType::PointType; - const PointSetType::Pointer pset(PointSetType::New()); - unsigned long ind = 0; - unsigned long ct = 0; + const PointSetType::Pointer pset(PointSetType::New()); + unsigned long ind = 0; + unsigned long ct = 0; itk::ImageRegionIteratorWithIndex It(fixedImage, fixedImage->GetLargestPossibleRegion()); for (It.GoToBegin(); !It.IsAtEnd(); ++It) @@ -289,7 +289,7 @@ itkMeanSquaresImageToImageMetricv4VectorRegistrationTest(int argc, char * argv[] // write out the displacement field using DisplacementWriterType = itk::ImageFileWriter; - auto displacementwriter = DisplacementWriterType::New(); + auto displacementwriter = DisplacementWriterType::New(); const std::string outfilename(argv[3]); const std::string ext = itksys::SystemTools::GetFilenameExtension(outfilename); const std::string name = itksys::SystemTools::GetFilenameWithoutExtension(outfilename); diff --git a/Modules/Registration/Metricsv4/test/itkMetricImageGradientTest.cxx b/Modules/Registration/Metricsv4/test/itkMetricImageGradientTest.cxx index a0e3994117e..2deac07375a 100644 --- a/Modules/Registration/Metricsv4/test/itkMetricImageGradientTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkMetricImageGradientTest.cxx @@ -51,11 +51,11 @@ */ template double -itkMetricImageGradientTestRunTest(unsigned int imageSize, +itkMetricImageGradientTestRunTest(unsigned int imageSize, typename TTransform::Pointer transform, - double rotation, - bool verbose, - std::string & outputPath); + double rotation, + bool verbose, + std::string & outputPath); namespace itk { @@ -105,17 +105,17 @@ class VanilaImageToImageMetricv4GetValueAndDerivativeThreader * the metric to the global integral of the metric/derivative. */ bool - ProcessPoint(const VirtualIndexType & itkNotUsed(virtualIndex), - const VirtualPointType & itkNotUsed(virtualPoint), - const FixedImagePointType & itkNotUsed(mappedFixedPoint), - const FixedImagePixelType & itkNotUsed(mappedFixedPixelValue), - const FixedImageGradientType & itkNotUsed(mappedFixedImageGradient), - const MovingImagePointType & itkNotUsed(mappedMovingPoint), - const MovingImagePixelType & itkNotUsed(mappedMovingPixelValue), + ProcessPoint(const VirtualIndexType & itkNotUsed(virtualIndex), + const VirtualPointType & itkNotUsed(virtualPoint), + const FixedImagePointType & itkNotUsed(mappedFixedPoint), + const FixedImagePixelType & itkNotUsed(mappedFixedPixelValue), + const FixedImageGradientType & itkNotUsed(mappedFixedImageGradient), + const MovingImagePointType & itkNotUsed(mappedMovingPoint), + const MovingImagePixelType & itkNotUsed(mappedMovingPixelValue), const MovingImageGradientType & itkNotUsed(mappedMovingImageGradient), - MeasureType & itkNotUsed(metricValueReturn), - DerivativeType & itkNotUsed(localDerivativeReturn), - const ThreadIdType itkNotUsed(threadId)) const override + MeasureType & itkNotUsed(metricValueReturn), + DerivativeType & itkNotUsed(localDerivativeReturn), + const ThreadIdType itkNotUsed(threadId)) const override { return false; } @@ -166,8 +166,8 @@ class VanillaImageToImageMetricv4 : public ImageToImageMetricv4 // template <> friend double ::itkMetricImageGradientTestRunTest( - unsigned int imageSize, + unsigned int imageSize, typename MovingTransformType::Pointer transform, - double rotation, - bool verbose, - std::string & outputPath); + double rotation, + bool verbose, + std::string & outputPath); using VanillaDenseGetValueAndDerivativeThreaderType = VanilaImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner, @@ -199,20 +199,20 @@ class VanillaImageToImageMetricv4 : public ImageToImageMetricv4 double -itkMetricImageGradientTestRunTest(unsigned int imageSize, +itkMetricImageGradientTestRunTest(unsigned int imageSize, typename TTransform::Pointer transform, - double rotation, - bool verbose, - std::string & outputPath) + double rotation, + bool verbose, + std::string & outputPath) { // verbose = true; using ImageType = itk::Image; - auto size = ImageType::SizeType::Filled(imageSize); - typename ImageType::IndexType virtualIndex{}; + auto size = ImageType::SizeType::Filled(imageSize); + typename ImageType::IndexType virtualIndex{}; const typename ImageType::RegionType region{ virtualIndex, size }; - typename ImageType::DirectionType direction; + typename ImageType::DirectionType direction; direction.SetIdentity(); // Create simple test images. @@ -303,7 +303,7 @@ itkMetricImageGradientTestRunTest(unsigned int imageSize, // compute Dm using Metricv4 routine typename ImageType::PointType mappedMovingPoint; typename ImageType::PixelType mappedMovingPixelValue; - auto metric = MetricType::New(); + auto metric = MetricType::New(); metric->SetFixedImage(image); metric->SetMovingImage(movingImage); @@ -368,11 +368,11 @@ itkMetricImageGradientTest(int argc, char * argv[]) { using DimensionSizeType = unsigned int; constexpr DimensionSizeType imageSize = 60; - unsigned int dimensionality = 3; - double minimumAverage = itk::NumericTraits::max(); - double rotationDegrees = 0.0; // (3.0); - constexpr double maxDegrees = 359.0; - constexpr double degreeStep = 15.0; //(3.0); + unsigned int dimensionality = 3; + double minimumAverage = itk::NumericTraits::max(); + double rotationDegrees = 0.0; // (3.0); + constexpr double maxDegrees = 359.0; + constexpr double degreeStep = 15.0; //(3.0); std::string outputPath(""); if (argc >= 2) diff --git a/Modules/Registration/Metricsv4/test/itkMultiGradientImageToImageMetricv4RegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkMultiGradientImageToImageMetricv4RegistrationTest.cxx index 6a2cda343f1..2557df202d3 100644 --- a/Modules/Registration/Metricsv4/test/itkMultiGradientImageToImageMetricv4RegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkMultiGradientImageToImageMetricv4RegistrationTest.cxx @@ -57,7 +57,7 @@ itkMultiGradientImageToImageMetricv4RegistrationTest(int argc, char * argv[]) std::cout << argc << std::endl; unsigned int numberOfIterations = 10; - bool useSubSampling = true; + bool useSubSampling = true; if (argc >= 5) { numberOfIterations = std::stoi(argv[4]); @@ -126,9 +126,9 @@ itkMultiGradientImageToImageMetricv4RegistrationTest(int argc, char * argv[]) else { using PointType = PointSetType::PointType; - const PointSetType::Pointer pset(PointSetType::New()); - unsigned long ind = 0; - unsigned long ct = 0; + const PointSetType::Pointer pset(PointSetType::New()); + unsigned long ind = 0; + unsigned long ct = 0; itk::ImageRegionIteratorWithIndex It(fixedImage, fixedImage->GetLargestPossibleRegion()); for (It.GoToBegin(); !It.IsAtEnd(); ++It) { diff --git a/Modules/Registration/Metricsv4/test/itkMultiStartImageToImageMetricv4RegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkMultiStartImageToImageMetricv4RegistrationTest.cxx index 0cdb4ae0b1d..59cd9e867ec 100644 --- a/Modules/Registration/Metricsv4/test/itkMultiStartImageToImageMetricv4RegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkMultiStartImageToImageMetricv4RegistrationTest.cxx @@ -152,9 +152,9 @@ itkMultiStartImageToImageMetricv4RegistrationTest(int argc, char * argv[]) auto metric = MetricType::New(); // metric->SetNumberOfHistogramBins(20); using PointType = PointSetType::PointType; - const PointSetType::Pointer pset(PointSetType::New()); - unsigned long ind = 0; - unsigned long ct = 0; + const PointSetType::Pointer pset(PointSetType::New()); + unsigned long ind = 0; + unsigned long ct = 0; itk::ImageRegionIteratorWithIndex It(fixedImage, fixedImage->GetLargestPossibleRegion()); for (It.GoToBegin(); !It.IsAtEnd(); ++It) { @@ -198,9 +198,9 @@ itkMultiStartImageToImageMetricv4RegistrationTest(int argc, char * argv[]) optimizer->SetMinimumConvergenceValue(-1.e-5); using MOptimizerType = itk::MultiStartOptimizerv4; - auto MOptimizer = MOptimizerType::New(); + auto MOptimizer = MOptimizerType::New(); MOptimizerType::ParametersListType parametersList = MOptimizer->GetParametersList(); - constexpr float rotplus = 10; + constexpr float rotplus = 10; // for ( float i = 180; i <= 180; i+=rotplus ) for (float i = 0; i < 360; i += rotplus) { diff --git a/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4RegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4RegistrationTest.cxx index 721a4feb782..5de40690906 100644 --- a/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4RegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4RegistrationTest.cxx @@ -75,15 +75,15 @@ class itkObjectToObjectMultiMetricv4RegistrationTestCommandIterationUpdate : pub template void -ObjectToObjectMultiMetricv4RegistrationTestCreateImages(typename TImage::Pointer & fixedImage, - typename TImage::Pointer & movingImage, +ObjectToObjectMultiMetricv4RegistrationTestCreateImages(typename TImage::Pointer & fixedImage, + typename TImage::Pointer & movingImage, typename TImage::OffsetType & imageShift) { using PixelType = typename TImage::PixelType; using CoordinateRepresentationType = PixelType; // Create two simple images - constexpr itk::SizeValueType ImageSize = 100; + constexpr itk::SizeValueType ImageSize = 100; constexpr itk::OffsetValueType boundary = 6; // Declare Gaussian Sources @@ -122,7 +122,7 @@ ObjectToObjectMultiMetricv4RegistrationTestCreateImages(typename TImage::Pointer // shift the fixed image to get the moving image using CyclicShiftFilterType = itk::CyclicShiftImageFilter; - auto shiftFilter = CyclicShiftFilterType::New(); + auto shiftFilter = CyclicShiftFilterType::New(); const typename CyclicShiftFilterType::OffsetValueType maxImageShift = boundary - 1; imageShift.Fill(maxImageShift); imageShift[0] = maxImageShift / 2; @@ -136,12 +136,12 @@ ObjectToObjectMultiMetricv4RegistrationTestCreateImages(typename TImage::Pointer template int -ObjectToObjectMultiMetricv4RegistrationTestRun(typename TMetric::Pointer & metric, - int numberOfIterations, - typename TMetric::MeasureType & valueResult, - typename TMetric::DerivativeType & derivativeResult, +ObjectToObjectMultiMetricv4RegistrationTestRun(typename TMetric::Pointer & metric, + int numberOfIterations, + typename TMetric::MeasureType & valueResult, + typename TMetric::DerivativeType & derivativeResult, typename TMetric::InternalComputationValueType maxStep, - bool estimateStepOnce) + bool estimateStepOnce) { // calculate initial metric value metric->Initialize(); @@ -210,8 +210,8 @@ itkObjectToObjectMultiMetricv4RegistrationTest(int argc, char * argv[]) translationTransform->SetIdentity(); // create images - ImageType::Pointer fixedImage = nullptr; - ImageType::Pointer movingImage = nullptr; + ImageType::Pointer fixedImage = nullptr; + ImageType::Pointer movingImage = nullptr; ImageType::OffsetType imageShift{}; ObjectToObjectMultiMetricv4RegistrationTestCreateImages(fixedImage, movingImage, imageShift); @@ -225,7 +225,7 @@ itkObjectToObjectMultiMetricv4RegistrationTest(int argc, char * argv[]) translationTransform->SetIdentity(); std::cout << std::endl << "*** Single image metric: " << std::endl; - CorrelationMetricType::MeasureType singleValueResult = 0.0; + CorrelationMetricType::MeasureType singleValueResult = 0.0; CorrelationMetricType::DerivativeType singleDerivativeResult{}; ObjectToObjectMultiMetricv4RegistrationTestRun( correlationMetric, numberOfIterations, singleValueResult, singleDerivativeResult, 1.0, true); @@ -245,7 +245,7 @@ itkObjectToObjectMultiMetricv4RegistrationTest(int argc, char * argv[]) translationTransform->SetIdentity(); - CorrelationMetricType::MeasureType multiValueResult = 0.0; + CorrelationMetricType::MeasureType multiValueResult = 0.0; CorrelationMetricType::DerivativeType multiDerivativeResult{}; ObjectToObjectMultiMetricv4RegistrationTestRun( multiMetric, numberOfIterations, multiValueResult, multiDerivativeResult, 1.0, true); diff --git a/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4Test.cxx index 1b2953db3cd..f79f1523369 100644 --- a/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4Test.cxx @@ -52,7 +52,7 @@ itkObjectToObjectMultiMetricv4TestEvaluate(ObjectToObjectMultiMetricv4TestMultiM // Setup weights MultiMetricType::WeightsArrayType origMetricWeights(multiVariateMetric->GetNumberOfMetrics()); - MultiMetricType::WeightValueType weightSum = 0; + MultiMetricType::WeightValueType weightSum = 0; for (itk::SizeValueType n = 0; n < multiVariateMetric->GetNumberOfMetrics(); ++n) { origMetricWeights[n] = static_cast(n + 1); @@ -67,7 +67,7 @@ itkObjectToObjectMultiMetricv4TestEvaluate(ObjectToObjectMultiMetricv4TestMultiM // Print out metric value and derivative. using MeasureType = MultiMetricType::MeasureType; - MeasureType measure = 0; + MeasureType measure = 0; MultiMetricType::DerivativeType DerivResultOfGetValueAndDerivative; std::cout << "GetValueAndDerivative" << std::endl; try @@ -213,10 +213,10 @@ itkObjectToObjectMultiMetricv4TestRun(bool useDisplacementTransform) using FixedImageSourceType = itk::GaussianImageSource; // Note: the following declarations are classical arrays - FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; - FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; + FixedImageType::SizeValueType fixedImageSize[] = { 100, 100 }; + FixedImageType::SpacingValueType fixedImageSpacing[] = { 1.0f, 1.0f }; constexpr FixedImageType::PointValueType fixedImageOrigin[] = { 0.0f, 0.0f }; - auto fixedImageSource = FixedImageSourceType::New(); + auto fixedImageSource = FixedImageSourceType::New(); fixedImageSource->SetSize(fixedImageSize); fixedImageSource->SetOrigin(fixedImageOrigin); @@ -462,7 +462,7 @@ itkObjectToObjectMultiMetricv4TestRun(bool useDisplacementTransform) shiftScaleEstimator->EstimateScales(scales); std::cout << "Estimated scales: " << scales << std::endl; - ScalesEstimatorMultiType::FloatType stepScale; + ScalesEstimatorMultiType::FloatType stepScale; ScalesEstimatorMultiType::ParametersType step; step.SetSize(multiVariateMetric->GetNumberOfParameters()); step.Fill(itk::NumericTraits::OneValue()); diff --git a/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.hxx b/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.hxx index 00a2e96a84e..941426e5c63 100644 --- a/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.hxx +++ b/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.hxx @@ -72,7 +72,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); } @@ -204,9 +204,9 @@ CurvatureRegistrationFilterGetUpdateBuffer(); - ImageRegionConstIterator itInDeformation; - ImageRegionIterator itOutDeformation; - ImageRegionConstIterator itInUpdate; + ImageRegionConstIterator itInDeformation; + ImageRegionIterator itOutDeformation; + ImageRegionConstIterator itInUpdate; ImageRegionConstIteratorWithIndex fixedImageIteratorWithIndex; itInDeformation = ImageRegionConstIterator( @@ -253,7 +253,7 @@ CurvatureRegistrationFilter::DemonsR template void DemonsRegistrationFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.h b/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.h index ba431e53707..9e3274e8761 100644 --- a/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.h +++ b/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.h @@ -221,9 +221,9 @@ class ITK_TEMPLATE_EXPORT DemonsRegistrationFunction * information for computing the metric. */ struct GlobalDataStruct { - double m_SumOfSquaredDifference; + double m_SumOfSquaredDifference; SizeValueType m_NumberOfPixelsProcessed; - double m_SumOfSquaredChange; + double m_SumOfSquaredChange; }; private: @@ -231,14 +231,14 @@ class ITK_TEMPLATE_EXPORT DemonsRegistrationFunction // SpacingType m_FixedImageSpacing; // PointType m_FixedImageOrigin; PixelType m_ZeroUpdateReturn{}; - double m_Normalizer{}; + double m_Normalizer{}; /** Function to compute derivatives of the fixed image. */ GradientCalculatorPointer m_FixedImageGradientCalculator{}; /** Function to compute derivatives of the moving image. */ MovingImageGradientCalculatorPointer m_MovingImageGradientCalculator{}; - bool m_UseMovingImageGradient{}; + bool m_UseMovingImageGradient{}; /** Function to interpolate the moving image. */ InterpolatorPointer m_MovingImageInterpolator{}; @@ -255,11 +255,11 @@ class ITK_TEMPLATE_EXPORT DemonsRegistrationFunction /** The metric value is the mean square difference in intensity between * the fixed image and transforming moving image computed over the * the overlapping region between the two images. */ - mutable double m_Metric{}; - mutable double m_SumOfSquaredDifference{}; + mutable double m_Metric{}; + mutable double m_SumOfSquaredDifference{}; mutable SizeValueType m_NumberOfPixelsProcessed{}; - mutable double m_RMSChange{}; - mutable double m_SumOfSquaredChange{}; + mutable double m_RMSChange{}; + mutable double m_SumOfSquaredChange{}; /** Mutex lock to protect modification to metric. */ mutable std::mutex m_MetricCalculationMutex{}; diff --git a/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.hxx b/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.hxx index bdae8ba341c..64aac169104 100644 --- a/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.hxx +++ b/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.hxx @@ -27,7 +27,7 @@ namespace itk template DemonsRegistrationFunction::DemonsRegistrationFunction() { - RadiusType r; + RadiusType r; unsigned int j; for (j = 0; j < ImageDimension; ++j) @@ -63,7 +63,7 @@ DemonsRegistrationFunction::Demon template void DemonsRegistrationFunction::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -144,14 +144,14 @@ template ::ComputeUpdate( const NeighborhoodType & it, - void * gd, - const FloatOffsetType & itkNotUsed(offset)) -> PixelType + void * gd, + const FloatOffsetType & itkNotUsed(offset)) -> PixelType { // Get fixed image related information // Note: no need to check the index is within // fixed image buffer. This is done by the external filter. const IndexType index = it.GetIndex(); - const auto fixedValue = static_cast(this->GetFixedImage()->GetPixel(index)); + const auto fixedValue = static_cast(this->GetFixedImage()->GetPixel(index)); // Get moving image related information PointType mappedPoint; diff --git a/Modules/Registration/PDEDeformable/include/itkDiffeomorphicDemonsRegistrationFilter.h b/Modules/Registration/PDEDeformable/include/itkDiffeomorphicDemonsRegistrationFilter.h index 0faf4c02246..48eba77f4b4 100644 --- a/Modules/Registration/PDEDeformable/include/itkDiffeomorphicDemonsRegistrationFilter.h +++ b/Modules/Registration/PDEDeformable/include/itkDiffeomorphicDemonsRegistrationFilter.h @@ -212,9 +212,9 @@ class ITK_TEMPLATE_EXPORT DiffeomorphicDemonsRegistrationFilter MultiplyByConstantPointer m_Multiplier{}; FieldExponentiatorPointer m_Exponentiator{}; - VectorWarperPointer m_Warper{}; - AdderPointer m_Adder{}; - bool m_UseFirstOrderExp{ false }; + VectorWarperPointer m_Warper{}; + AdderPointer m_Adder{}; + bool m_UseFirstOrderExp{ false }; }; } // end namespace itk diff --git a/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.h b/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.h index 74654d3a32d..3eef58f347b 100644 --- a/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.h +++ b/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.h @@ -277,17 +277,17 @@ class ITK_TEMPLATE_EXPORT ESMDemonsRegistrationFunction * iterators for the fixed image. */ struct GlobalDataStruct { - double m_SumOfSquaredDifference; + double m_SumOfSquaredDifference; SizeValueType m_NumberOfPixelsProcessed; - double m_SumOfSquaredChange; + double m_SumOfSquaredChange; }; private: /** Cache fixed image information. */ - PointType m_FixedImageOrigin{}; - SpacingType m_FixedImageSpacing{}; + PointType m_FixedImageOrigin{}; + SpacingType m_FixedImageSpacing{}; DirectionType m_FixedImageDirection{}; - double m_Normalizer{}; + double m_Normalizer{}; /** Function to compute derivatives of the fixed image. */ GradientCalculatorPointer m_FixedImageGradientCalculator{}; @@ -320,11 +320,11 @@ class ITK_TEMPLATE_EXPORT ESMDemonsRegistrationFunction /** The metric value is the mean square difference in intensity between * the fixed image and transforming moving image computed over the * the overlapping region between the two images. */ - mutable double m_Metric{}; - mutable double m_SumOfSquaredDifference{}; + mutable double m_Metric{}; + mutable double m_SumOfSquaredDifference{}; mutable SizeValueType m_NumberOfPixelsProcessed{}; - mutable double m_RMSChange{}; - mutable double m_SumOfSquaredChange{}; + mutable double m_RMSChange{}; + mutable double m_SumOfSquaredChange{}; /** Mutex lock to protect modification to metric. */ mutable std::mutex m_MetricCalculationMutex{}; diff --git a/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.hxx b/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.hxx index ee80ab76be0..7a9ef8b1575 100644 --- a/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.hxx +++ b/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.hxx @@ -26,7 +26,7 @@ namespace itk template ESMDemonsRegistrationFunction::ESMDemonsRegistrationFunction() { - RadiusType r; + RadiusType r; unsigned int j; for (j = 0; j < ImageDimension; ++j) @@ -75,7 +75,7 @@ ESMDemonsRegistrationFunction::ES template void ESMDemonsRegistrationFunction::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -168,10 +168,10 @@ template ::ComputeUpdate( const NeighborhoodType & it, - void * gd, - const FloatOffsetType & itkNotUsed(offset)) -> PixelType + void * gd, + const FloatOffsetType & itkNotUsed(offset)) -> PixelType { - auto * globalData = (GlobalDataStruct *)gd; + auto * globalData = (GlobalDataStruct *)gd; PixelType update; IndexType FirstIndex = this->GetFixedImage()->GetLargestPossibleRegion().GetIndex(); IndexType LastIndex = this->GetFixedImage()->GetLargestPossibleRegion().GetIndex() + @@ -207,7 +207,7 @@ ESMDemonsRegistrationFunction::Co // we don't use a CentralDifferenceImageFunction here to be able to // check for NumericTraits::max() CovariantVectorType warpedMovingGradient; - IndexType tmpIndex = index; + IndexType tmpIndex = index; for (unsigned int dim = 0; dim < ImageDimension; ++dim) { // bounds checking diff --git a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.h b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.h index e51d9843314..728eaa84598 100644 --- a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.h +++ b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.h @@ -191,7 +191,7 @@ class ITK_TEMPLATE_EXPORT FastSymmetricForcesDemonsRegistrationFilter DownCastDifferenceFunctionType() const; MultiplyByConstantPointer m_Multiplier{}; - AdderPointer m_Adder{}; + AdderPointer m_Adder{}; }; } // end namespace itk diff --git a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.hxx b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.hxx index 8b035d0b6eb..50e5db3be84 100644 --- a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.hxx +++ b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.hxx @@ -226,7 +226,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); os << indent << "Intensity difference threshold: " << this->GetIntensityDifferenceThreshold() << std::endl; diff --git a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.h b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.h index 7f52ffe6872..a6a64475f1e 100644 --- a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.h +++ b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.h @@ -164,8 +164,8 @@ class ITK_TEMPLATE_EXPORT FastSymmetricForcesDemonsRegistrationFunction */ PixelType ComputeUpdate(const NeighborhoodType & neighborhood, - void * globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0)) override; + void * globalData, + const FloatOffsetType & offset = FloatOffsetType(0.0)) override; /** Get the metric value. The metric value is the mean square difference * in intensity between the fixed image and transforming moving image @@ -206,9 +206,9 @@ class ITK_TEMPLATE_EXPORT FastSymmetricForcesDemonsRegistrationFunction * iterators for the fixed image. */ struct GlobalDataStruct { - double m_SumOfSquaredDifference; + double m_SumOfSquaredDifference; SizeValueType m_NumberOfPixelsProcessed; - double m_SumOfSquaredChange; + double m_SumOfSquaredChange; }; private: @@ -239,11 +239,11 @@ class ITK_TEMPLATE_EXPORT FastSymmetricForcesDemonsRegistrationFunction /** The metric value is the mean square difference in intensity between * the fixed image and transforming moving image computed over the * the overlapping region between the two images. */ - mutable double m_Metric{}; - mutable double m_SumOfSquaredDifference{}; + mutable double m_Metric{}; + mutable double m_SumOfSquaredDifference{}; mutable SizeValueType m_NumberOfPixelsProcessed{}; - mutable double m_RMSChange{}; - mutable double m_SumOfSquaredChange{}; + mutable double m_RMSChange{}; + mutable double m_SumOfSquaredChange{}; /** Mutex lock to protect modification to metric. */ mutable std::mutex m_MetricCalculationMutex{}; diff --git a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.hxx b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.hxx index d742dbd9adf..4af60252ffe 100644 --- a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.hxx +++ b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.hxx @@ -28,7 +28,7 @@ template :: FastSymmetricForcesDemonsRegistrationFunction() { - RadiusType r; + RadiusType r; unsigned int j; for (j = 0; j < ImageDimension; ++j) @@ -64,7 +64,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -148,10 +148,10 @@ template ::ComputeUpdate( const NeighborhoodType & it, - void * gd, - const FloatOffsetType & itkNotUsed(offset)) -> PixelType + void * gd, + const FloatOffsetType & itkNotUsed(offset)) -> PixelType { - auto * globalData = (GlobalDataStruct *)gd; + auto * globalData = (GlobalDataStruct *)gd; const IndexType FirstIndex = this->GetFixedImage()->GetLargestPossibleRegion().GetIndex(); const IndexType LastIndex = this->GetFixedImage()->GetLargestPossibleRegion().GetIndex() + this->GetFixedImage()->GetLargestPossibleRegion().GetSize(); @@ -161,12 +161,12 @@ FastSymmetricForcesDemonsRegistrationFunction(this->GetFixedImage()->GetPixel(index)); + const auto fixedValue = static_cast(this->GetFixedImage()->GetPixel(index)); const CovariantVectorType fixedGradient = m_FixedImageGradientCalculator->EvaluateAtIndex(index); // Get moving image related information // use warped moving image to get moving value and gradient fast(er). - const auto movingValue = static_cast(m_MovingImageWarper->GetOutput()->GetPixel(index)); + const auto movingValue = static_cast(m_MovingImageWarper->GetOutput()->GetPixel(index)); const CovariantVectorType movingGradient = m_WarpedMovingImageGradientCalculator->EvaluateAtIndex(index); // unfortunately (since it's a little redundant) we still need the mapped @@ -217,7 +217,7 @@ FastSymmetricForcesDemonsRegistrationFunction: template void LevelSetMotionRegistrationFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.h b/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.h index 45da10f83d8..bbff1417447 100644 --- a/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.h +++ b/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.h @@ -245,16 +245,16 @@ class ITK_TEMPLATE_EXPORT LevelSetMotionRegistrationFunction * information for computing the metric. */ struct GlobalDataStruct { - double m_SumOfSquaredDifference; + double m_SumOfSquaredDifference; SizeValueType m_NumberOfPixelsProcessed; - double m_SumOfSquaredChange; - double m_MaxL1Norm; + double m_SumOfSquaredChange; + double m_MaxL1Norm; }; private: /** Cache fixed image information. */ SpacingType m_FixedImageSpacing{}; - PointType m_FixedImageOrigin{}; + PointType m_FixedImageOrigin{}; /** Function to compute derivatives of the moving image. */ MovingImageSmoothingFilterPointer m_MovingImageSmoothingFilter{}; @@ -279,11 +279,11 @@ class ITK_TEMPLATE_EXPORT LevelSetMotionRegistrationFunction /** The metric value is the mean square difference in intensity between * the fixed image and transforming moving image computed over the * the overlapping region between the two images. */ - mutable double m_Metric{}; - mutable double m_SumOfSquaredDifference{}; + mutable double m_Metric{}; + mutable double m_SumOfSquaredDifference{}; mutable SizeValueType m_NumberOfPixelsProcessed{}; - mutable double m_RMSChange{}; - mutable double m_SumOfSquaredChange{}; + mutable double m_RMSChange{}; + mutable double m_SumOfSquaredChange{}; /** Mutex lock to protect modification to metric. */ mutable std::mutex m_MetricCalculationMutex{}; diff --git a/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.hxx b/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.hxx index 4d4ca9dd587..1afae1d8cea 100644 --- a/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.hxx +++ b/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.hxx @@ -27,7 +27,7 @@ namespace itk template LevelSetMotionRegistrationFunction::LevelSetMotionRegistrationFunction() { - RadiusType r; + RadiusType r; unsigned int j; for (j = 0; j < ImageDimension; ++j) @@ -201,8 +201,8 @@ template ::ComputeUpdate( const NeighborhoodType & it, - void * gd, - const FloatOffsetType & itkNotUsed(offset)) -> PixelType + void * gd, + const FloatOffsetType & itkNotUsed(offset)) -> PixelType { const IndexType index = it.GetIndex(); @@ -220,7 +220,7 @@ LevelSetMotionRegistrationFunctionIsInsideBuffer(mappedPoint)) { movingValue = m_MovingImageInterpolator->Evaluate(mappedPoint); @@ -248,10 +248,10 @@ LevelSetMotionRegistrationFunctionEvaluate(mPoint); - double forwardDifferences[ImageDimension]; - double backwardDifferences[ImageDimension]; + double forwardDifferences[ImageDimension]; + double backwardDifferences[ImageDimension]; for (unsigned int j = 0; j < ImageDimension; ++j) { mPoint[j] += mSpacing[j]; @@ -288,13 +288,13 @@ LevelSetMotionRegistrationFunction 0.0) { const double bvalue = itk::Math::abs(backwardDifferences[j]); - double gvalue = itk::Math::abs(forwardDifferences[j]); + double gvalue = itk::Math::abs(forwardDifferences[j]); if (gvalue > bvalue) { gvalue = bvalue; diff --git a/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.h b/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.h index d6bc2157a20..2b2be4d9278 100644 --- a/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.h +++ b/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.h @@ -287,14 +287,14 @@ class ITK_TEMPLATE_EXPORT MultiResolutionPDEDeformableRegistration {} private: - RegistrationPointer m_RegistrationFilter{}; - FixedImagePyramidPointer m_FixedImagePyramid{}; + RegistrationPointer m_RegistrationFilter{}; + FixedImagePyramidPointer m_FixedImagePyramid{}; MovingImagePyramidPointer m_MovingImagePyramid{}; - FieldExpanderPointer m_FieldExpander{}; - DisplacementFieldPointer m_InitialDisplacementField{}; + FieldExpanderPointer m_FieldExpander{}; + DisplacementFieldPointer m_InitialDisplacementField{}; - unsigned int m_NumberOfLevels{}; - unsigned int m_CurrentLevel{}; + unsigned int m_NumberOfLevels{}; + unsigned int m_CurrentLevel{}; NumberOfIterationsType m_NumberOfIterations{}; /** Flag to indicate user stop registration request. */ diff --git a/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.hxx b/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.hxx index eb417a6bace..c5a23307b73 100644 --- a/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.hxx +++ b/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.hxx @@ -276,7 +276,7 @@ MultiResolutionPDEDeformableRegistrationGetMovingImage(); - const FixedImageConstPointer fixedImage = this->GetFixedImage(); + const FixedImageConstPointer fixedImage = this->GetFixedImage(); if (!movingImage || !fixedImage) { @@ -605,7 +605,7 @@ MultiResolutionPDEDeformableRegistration(this->GetInput()); const DisplacementFieldPointer outputPtr = this->GetOutput(); - const FixedImagePointer fixedPtr = const_cast(this->GetFixedImage()); + const FixedImagePointer fixedPtr = const_cast(this->GetFixedImage()); if (inputPtr) { diff --git a/Modules/Registration/PDEDeformable/include/itkPDEDeformableRegistrationFilter.hxx b/Modules/Registration/PDEDeformable/include/itkPDEDeformableRegistrationFilter.hxx index 5aa3b45b512..86f46c11e0b 100644 --- a/Modules/Registration/PDEDeformable/include/itkPDEDeformableRegistrationFilter.hxx +++ b/Modules/Registration/PDEDeformable/include/itkPDEDeformableRegistrationFilter.hxx @@ -135,7 +135,7 @@ PDEDeformableRegistrationFilter:: template void PDEDeformableRegistrationFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -157,7 +157,7 @@ void PDEDeformableRegistrationFilter::InitializeIteration() { const MovingImageConstPointer movingPtr = this->GetMovingImage(); - const FixedImageConstPointer fixedPtr = this->GetFixedImage(); + const FixedImageConstPointer fixedPtr = this->GetFixedImage(); if (!movingPtr || !fixedPtr) { @@ -253,7 +253,7 @@ PDEDeformableRegistrationFilter:: // the fixed image and initial deformation field. const DisplacementFieldPointer inputPtr = const_cast(this->GetInput()); const DisplacementFieldPointer outputPtr = this->GetOutput(); - const FixedImagePointer fixedPtr = const_cast(this->GetFixedImage()); + const FixedImagePointer fixedPtr = const_cast(this->GetFixedImage()); if (inputPtr) { @@ -303,7 +303,7 @@ PDEDeformableRegistrationFilter:: using SmootherType = VectorNeighborhoodOperatorImageFilter; OperatorType oper; - auto smoother = SmootherType::New(); + auto smoother = SmootherType::New(); using PixelContainerPointer = typename DisplacementFieldType::PixelContainerPointer; PixelContainerPointer swapPtr; @@ -353,7 +353,7 @@ PDEDeformableRegistrationFilter:: using OperatorType = GaussianOperator; using SmootherType = VectorNeighborhoodOperatorImageFilter; - OperatorType opers[ImageDimension]; + OperatorType opers[ImageDimension]; typename SmootherType::Pointer smoothers[ImageDimension]; for (unsigned int j = 0; j < ImageDimension; ++j) diff --git a/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.h b/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.h index 4dc10fbcb53..6783ea984ee 100644 --- a/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.h +++ b/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.h @@ -211,16 +211,16 @@ class ITK_TEMPLATE_EXPORT SymmetricForcesDemonsRegistrationFunction * iterators for the fixed image. */ struct GlobalDataStruct { - double m_SumOfSquaredDifference; + double m_SumOfSquaredDifference; SizeValueType m_NumberOfPixelsProcessed; - double m_SumOfSquaredChange; + double m_SumOfSquaredChange; }; private: /** Cache fixed image information. */ SpacingType m_FixedImageSpacing{}; - PointType m_FixedImageOrigin{}; - double m_Normalizer{}; + PointType m_FixedImageOrigin{}; + double m_Normalizer{}; /** Function to compute derivatives of the fixed image. */ GradientCalculatorPointer m_FixedImageGradientCalculator{}; @@ -240,11 +240,11 @@ class ITK_TEMPLATE_EXPORT SymmetricForcesDemonsRegistrationFunction /** The metric value is the mean square difference in intensity between * the fixed image and transforming moving image computed over the * the overlapping region between the two images. */ - mutable double m_Metric{}; - mutable double m_SumOfSquaredDifference{}; + mutable double m_Metric{}; + mutable double m_SumOfSquaredDifference{}; mutable SizeValueType m_NumberOfPixelsProcessed{}; - mutable double m_RMSChange{}; - mutable double m_SumOfSquaredChange{}; + mutable double m_RMSChange{}; + mutable double m_SumOfSquaredChange{}; /** Mutex lock to protect modification to metric. */ mutable std::mutex m_MetricCalculationMutex{}; diff --git a/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.hxx b/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.hxx index b1094ec8148..588f52d14ec 100644 --- a/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.hxx +++ b/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.hxx @@ -134,10 +134,10 @@ template ::ComputeUpdate( const NeighborhoodType & it, - void * gd, - const FloatOffsetType & itkNotUsed(offset)) -> PixelType + void * gd, + const FloatOffsetType & itkNotUsed(offset)) -> PixelType { - auto * globalData = (GlobalDataStruct *)gd; + auto * globalData = (GlobalDataStruct *)gd; const IndexType FirstIndex = this->GetFixedImage()->GetLargestPossibleRegion().GetIndex(); const IndexType LastIndex = this->GetFixedImage()->GetLargestPossibleRegion().GetIndex() + this->GetFixedImage()->GetLargestPossibleRegion().GetSize(); @@ -146,13 +146,13 @@ SymmetricForcesDemonsRegistrationFunction(this->GetFixedImage()->GetPixel(index)); + const auto fixedValue = static_cast(this->GetFixedImage()->GetPixel(index)); const CovariantVectorType fixedGradient = m_FixedImageGradientCalculator->EvaluateAtIndex(index); // Get moving image related information - IndexType tmpIndex = index; - PointType mappedNeighPoint; - CovariantVectorType movingGradient; + IndexType tmpIndex = index; + PointType mappedNeighPoint; + CovariantVectorType movingGradient; const DisplacementFieldType * const field = this->GetDisplacementField(); using DisplacementPixelType = typename DisplacementFieldType::PixelType; @@ -245,7 +245,7 @@ SymmetricForcesDemonsRegistrationFunction void -FillWithCircle(TImage * image, - double * center, - double radius, +FillWithCircle(TImage * image, + double * center, + double radius, typename TImage::PixelType foregnd, typename TImage::PixelType backgnd) { @@ -63,7 +63,7 @@ FillWithCircle(TImage * image, it.Begin(); typename TImage::IndexType index; - double r2 = itk::Math::sqr(radius); + double r2 = itk::Math::sqr(radius); while (!it.IsAtEnd()) { @@ -122,7 +122,7 @@ itkCurvatureRegistrationFilterTest(int, char *[]) std::cout << std::endl; ImageType::SizeValueType sizeArray[ImageDimension] = { 128, 128 }; - SizeType size; + SizeType size; size.SetSize(sizeArray); IndexType index{}; @@ -145,8 +145,8 @@ itkCurvatureRegistrationFilterTest(int, char *[]) initField->SetBufferedRegion(region); initField->Allocate(); - double center[ImageDimension]; - double radius; + double center[ImageDimension]; + double radius; PixelType fgnd = 250; PixelType bgnd = 0; @@ -188,7 +188,7 @@ itkCurvatureRegistrationFilterTest(int, char *[]) // exercise other member variables std::cout << "No. Iterations: " << registrator->GetNumberOfIterations() << std::endl; - ShowProgressObject progressWatch(registrator); + ShowProgressObject progressWatch(registrator); itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); registrator->AddObserver(itk::ProgressEvent(), command); @@ -219,7 +219,7 @@ itkCurvatureRegistrationFilterTest(int, char *[]) itk::ImageRegionIterator fixedIter(fixed, fixed->GetBufferedRegion()); itk::ImageRegionIterator warpedIter(warper->GetOutput(), fixed->GetBufferedRegion()); - size_t ofs = 0; + size_t ofs = 0; unsigned int numPixelsDifferent = 0; while (!fixedIter.IsAtEnd()) { diff --git a/Modules/Registration/PDEDeformable/test/itkDemonsRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkDemonsRegistrationFilterTest.cxx index f7093857f0d..4108a262d12 100644 --- a/Modules/Registration/PDEDeformable/test/itkDemonsRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkDemonsRegistrationFilterTest.cxx @@ -54,9 +54,9 @@ class ShowProgressObject // Template function to fill in an image with a circle. template void -FillWithCircle(TImage * image, - double * center, - double radius, +FillWithCircle(TImage * image, + double * center, + double radius, typename TImage::PixelType foregnd, typename TImage::PixelType backgnd) { @@ -66,7 +66,7 @@ FillWithCircle(TImage * image, it.GoToBegin(); typename TImage::IndexType index; - const double r2 = itk::Math::sqr(radius); + const double r2 = itk::Math::sqr(radius); while (!it.IsAtEnd()) { @@ -121,7 +121,7 @@ itkDemonsRegistrationFilterTest(int, char *[]) std::cout << "Generate input images and initial deformation field" << std::endl; ImageType::SizeValueType sizeArray[ImageDimension] = { 128, 128 }; - SizeType size; + SizeType size; size.SetSize(sizeArray); constexpr IndexType index{}; @@ -144,7 +144,7 @@ itkDemonsRegistrationFilterTest(int, char *[]) initField->SetBufferedRegion(region); initField->Allocate(); - double center[ImageDimension]; + double center[ImageDimension]; constexpr PixelType fgnd = 250; constexpr PixelType bgnd = 15; @@ -190,7 +190,7 @@ itkDemonsRegistrationFilterTest(int, char *[]) registrator->SetNumberOfIterations(numberOfIterations); ITK_TEST_SET_GET_VALUE(numberOfIterations, registrator->GetNumberOfIterations()); - constexpr double standardDeviationsVal = 1.0; + constexpr double standardDeviationsVal = 1.0; const RegistrationType::StandardDeviationsType standardDeviations{ standardDeviationsVal }; registrator->SetStandardDeviations(standardDeviationsVal); ITK_TEST_SET_GET_VALUE(standardDeviations, registrator->GetStandardDeviations()); @@ -216,7 +216,7 @@ itkDemonsRegistrationFilterTest(int, char *[]) auto smoothUpdateField = false; ITK_TEST_SET_GET_BOOLEAN(registrator, SmoothUpdateField, smoothUpdateField); - constexpr double updateFieldStandardDeviationsVal = 1.0; + constexpr double updateFieldStandardDeviationsVal = 1.0; const RegistrationType::StandardDeviationsType updateFieldStandardDeviations{ updateFieldStandardDeviationsVal }; registrator->SetUpdateFieldStandardDeviations(updateFieldStandardDeviationsVal); ITK_TEST_SET_GET_VALUE(updateFieldStandardDeviations, registrator->GetUpdateFieldStandardDeviations()); @@ -240,7 +240,7 @@ itkDemonsRegistrationFilterTest(int, char *[]) } using ProgressType = ShowProgressObject; - ProgressType progressWatch(registrator); + ProgressType progressWatch(registrator); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ProgressType::ShowProgress); registrator->AddObserver(itk::ProgressEvent(), command); diff --git a/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest.cxx index 71129e92ffe..a1cfc36e4d1 100644 --- a/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest.cxx @@ -47,9 +47,9 @@ class DiffeomorphicDemonsShowProgressObject // Template function to fill in an image with a circle. template void -FillWithCircle(TImage * image, - double * center, - double radius, +FillWithCircle(TImage * image, + double * center, + double radius, typename TImage::PixelType foregnd, typename TImage::PixelType backgnd) { @@ -59,7 +59,7 @@ FillWithCircle(TImage * image, it.GoToBegin(); typename TImage::IndexType index; - const double r2 = itk::Math::sqr(radius); + const double r2 = itk::Math::sqr(radius); for (; !it.IsAtEnd(); ++it) { @@ -133,7 +133,7 @@ itkDiffeomorphicDemonsRegistrationFilterTest(int argc, char * argv[]) std::cout << std::endl; ImageType::SizeValueType sizeArray[ImageDimension] = { 128, 128 }; - SizeType size; + SizeType size; size.SetSize(sizeArray); constexpr IndexType index{}; @@ -163,7 +163,7 @@ itkDiffeomorphicDemonsRegistrationFilterTest(int argc, char * argv[]) initField->Allocate(); initField->SetDirection(direction); - double center[ImageDimension]; + double center[ImageDimension]; constexpr PixelType fgnd = 250; constexpr PixelType bgnd = 15; @@ -204,11 +204,11 @@ itkDiffeomorphicDemonsRegistrationFilterTest(int argc, char * argv[]) registrator->SetMovingImage(moving); registrator->SetFixedImage(fixed); - const double intensityDifferenceThreshold = std::stod(argv[3]); - const double maximumUpdateStepLength = std::stod(argv[4]); + const double intensityDifferenceThreshold = std::stod(argv[3]); + const double maximumUpdateStepLength = std::stod(argv[4]); const unsigned int numberOfIterations = std::stoi(argv[5]); - const double standardDeviations = std::stod(argv[6]); - const double maximumError = std::stod(argv[7]); + const double standardDeviations = std::stod(argv[6]); + const double maximumError = std::stod(argv[7]); const unsigned int maximumKernelWidth = std::stoi(argv[8]); registrator->SetIntensityDifferenceThreshold(intensityDifferenceThreshold); @@ -265,7 +265,7 @@ itkDiffeomorphicDemonsRegistrationFilterTest(int argc, char * argv[]) using ProgressType = DiffeomorphicDemonsShowProgressObject; - ProgressType progressWatch(registrator); + ProgressType progressWatch(registrator); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ProgressType::ShowProgress); registrator->AddObserver(itk::ProgressEvent(), command); diff --git a/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest2.cxx b/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest2.cxx index dac0f574b1d..d852741bca0 100644 --- a/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest2.cxx +++ b/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest2.cxx @@ -115,7 +115,7 @@ itkDiffeomorphicDemonsRegistrationFilterTest2(int argc, char * argv[]) const std::string gradientTypeString{ argv[4] }; - const int gradientType = std::stoi(gradientTypeString); + const int gradientType = std::stoi(gradientTypeString); using FunctionType = RegistrationType::DemonsRegistrationFunctionType; @@ -138,7 +138,7 @@ itkDiffeomorphicDemonsRegistrationFilterTest2(int argc, char * argv[]) std::cout << "GradientEnum = " << static_cast(registrator->GetUseGradientType()) << std::endl; const std::string useFirstOrderExponentialString{ argv[5] }; - const int useFirstOrderExponential = std::stoi(useFirstOrderExponentialString); + const int useFirstOrderExponential = std::stoi(useFirstOrderExponentialString); if (useFirstOrderExponential == 0) { @@ -170,7 +170,7 @@ itkDiffeomorphicDemonsRegistrationFilterTest2(int argc, char * argv[]) registrator->SetStandardDeviations(v); using ProgressType = ShowProgressObject; - ProgressType progressWatch(registrator); + ProgressType progressWatch(registrator); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ProgressType::ShowProgress); registrator->AddObserver(itk::ProgressEvent(), command); diff --git a/Modules/Registration/PDEDeformable/test/itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx index c83c797f2ae..45d29d9283a 100644 --- a/Modules/Registration/PDEDeformable/test/itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx @@ -53,9 +53,9 @@ class ShowProgressObject // Template function to fill in an image with a circle. template void -FillWithCircle(TImage * image, - double * center, - double radius, +FillWithCircle(TImage * image, + double * center, + double radius, typename TImage::PixelType foregnd, typename TImage::PixelType backgnd) { @@ -65,7 +65,7 @@ FillWithCircle(TImage * image, it.GoToBegin(); typename TImage::IndexType index; - const double r2 = itk::Math::sqr(radius); + const double r2 = itk::Math::sqr(radius); for (; !it.IsAtEnd(); ++it) { @@ -120,7 +120,7 @@ itkFastSymmetricForcesDemonsRegistrationFilterTest(int, char *[]) std::cout << "Generate input images and initial deformation field" << std::endl; ImageType::SizeValueType sizeArray[ImageDimension] = { 128, 128 }; - SizeType size; + SizeType size; size.SetSize(sizeArray); constexpr IndexType index{}; @@ -143,7 +143,7 @@ itkFastSymmetricForcesDemonsRegistrationFilterTest(int, char *[]) initField->SetBufferedRegion(region); initField->Allocate(); - double center[ImageDimension]; + double center[ImageDimension]; constexpr PixelType fgnd = 250; constexpr PixelType bgnd = 15; @@ -190,7 +190,7 @@ itkFastSymmetricForcesDemonsRegistrationFilterTest(int, char *[]) registrator->SetNumberOfIterations(numberOfIterations); ITK_TEST_SET_GET_VALUE(numberOfIterations, registrator->GetNumberOfIterations()); - constexpr double standardDeviationsVal = 1.0; + constexpr double standardDeviationsVal = 1.0; const RegistrationType::StandardDeviationsType standardDeviations{ standardDeviationsVal }; registrator->SetStandardDeviations(standardDeviationsVal); ITK_TEST_SET_GET_VALUE(standardDeviations, registrator->GetStandardDeviations()); @@ -216,7 +216,7 @@ itkFastSymmetricForcesDemonsRegistrationFilterTest(int, char *[]) auto smoothUpdateField = false; ITK_TEST_SET_GET_BOOLEAN(registrator, SmoothUpdateField, smoothUpdateField); - constexpr double updateFieldStandardDeviationsVal = 1.0; + constexpr double updateFieldStandardDeviationsVal = 1.0; const RegistrationType::StandardDeviationsType updateFieldStandardDeviations{ updateFieldStandardDeviationsVal }; registrator->SetUpdateFieldStandardDeviations(updateFieldStandardDeviationsVal); ITK_TEST_SET_GET_VALUE(updateFieldStandardDeviations, registrator->GetUpdateFieldStandardDeviations()); @@ -233,7 +233,7 @@ itkFastSymmetricForcesDemonsRegistrationFilterTest(int, char *[]) fptr->Print(std::cout); using ProgressType = ShowProgressObject; - ProgressType progressWatch(registrator); + ProgressType progressWatch(registrator); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ProgressType::ShowProgress); registrator->AddObserver(itk::ProgressEvent(), command); diff --git a/Modules/Registration/PDEDeformable/test/itkLevelSetMotionRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkLevelSetMotionRegistrationFilterTest.cxx index 4eadb788403..a69874d4e0a 100644 --- a/Modules/Registration/PDEDeformable/test/itkLevelSetMotionRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkLevelSetMotionRegistrationFilterTest.cxx @@ -59,8 +59,8 @@ class ShowProgressObject template void FillWithCircle(typename TImage::Pointer & image, - double * center, - double radius, + double * center, + double radius, typename TImage::PixelType foregnd, typename TImage::PixelType backgnd) { @@ -71,7 +71,7 @@ FillWithCircle(typename TImage::Pointer & image, it.GoToBegin(); typename TImage::IndexType index; - const double r2 = itk::Math::sqr(radius); + const double r2 = itk::Math::sqr(radius); while (!it.IsAtEnd()) { @@ -136,7 +136,7 @@ itkLevelSetMotionRegistrationFilterTest(int argc, char * argv[]) std::cout << std::endl; ImageType::SizeValueType sizeArray[ImageDimension] = { 128, 128 }; - SizeType size; + SizeType size; size.SetSize(sizeArray); constexpr IndexType index{}; @@ -159,7 +159,7 @@ itkLevelSetMotionRegistrationFilterTest(int argc, char * argv[]) initField->SetBufferedRegion(region); initField->Allocate(); - double center[ImageDimension]; + double center[ImageDimension]; constexpr PixelType fgnd = 250; constexpr PixelType bgnd = 15; diff --git a/Modules/Registration/PDEDeformable/test/itkMultiResolutionPDEDeformableRegistrationTest.cxx b/Modules/Registration/PDEDeformable/test/itkMultiResolutionPDEDeformableRegistrationTest.cxx index 79682732459..c7ba8f2ad41 100644 --- a/Modules/Registration/PDEDeformable/test/itkMultiResolutionPDEDeformableRegistrationTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkMultiResolutionPDEDeformableRegistrationTest.cxx @@ -49,7 +49,7 @@ class ShowProgressPDEObject std::cout << "Level Completed" << std::endl; } itk::ProcessObject::Pointer m_Process; - std::string m_Prefix; + std::string m_Prefix; }; template @@ -92,9 +92,9 @@ FillImage(TImage * image, typename TImage::PixelType value) // Template function to fill in an image with a circle. template void -FillWithCircle(TImage * image, - double * center, - double radius, +FillWithCircle(TImage * image, + double * center, + double radius, typename TImage::PixelType foregnd, typename TImage::PixelType backgnd) { @@ -104,7 +104,7 @@ FillWithCircle(TImage * image, it.GoToBegin(); typename TImage::IndexType index; - const double r2 = itk::Math::sqr(radius); + const double r2 = itk::Math::sqr(radius); while (!it.IsAtEnd()) { @@ -201,8 +201,8 @@ itkMultiResolutionPDEDeformableRegistrationTest(int argc, char * argv[]) initField->SetOrigin(origin); initField->SetSpacing(spacing); - double center[ImageDimension]; - double radius; + double center[ImageDimension]; + double radius; constexpr PixelType fgnd = 250; constexpr PixelType bgnd = 15; @@ -242,7 +242,7 @@ itkMultiResolutionPDEDeformableRegistrationTest(int argc, char * argv[]) registrator->GetModifiableMovingImagePyramid()->UseShrinkImageFilterOn(); constexpr unsigned int numLevel = 3; - unsigned int numIterations[numLevel]; + unsigned int numIterations[numLevel]; numIterations[0] = 64; unsigned int ilevel; @@ -277,7 +277,7 @@ itkMultiResolutionPDEDeformableRegistrationTest(int argc, char * argv[]) using CommandType = itk::SimpleMemberCommand; ShowProgressPDEObject progressWatch(registrator); - auto command = CommandType::New(); + auto command = CommandType::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressPDEObject::ShowIteration); registrator->AddObserver(itk::IterationEvent(), command); diff --git a/Modules/Registration/PDEDeformable/test/itkSymmetricForcesDemonsRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkSymmetricForcesDemonsRegistrationFilterTest.cxx index 2770404cfc3..1634a1177d7 100644 --- a/Modules/Registration/PDEDeformable/test/itkSymmetricForcesDemonsRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkSymmetricForcesDemonsRegistrationFilterTest.cxx @@ -44,9 +44,9 @@ class ShowProgressObject // Template function to fill in an image with a circle. template void -FillWithCircle(TImage * image, - double * center, - double radius, +FillWithCircle(TImage * image, + double * center, + double radius, typename TImage::PixelType foregnd, typename TImage::PixelType backgnd) { @@ -56,7 +56,7 @@ FillWithCircle(TImage * image, it.GoToBegin(); typename TImage::IndexType index; - const double r2 = itk::Math::sqr(radius); + const double r2 = itk::Math::sqr(radius); while (!it.IsAtEnd()) { @@ -113,7 +113,7 @@ itkSymmetricForcesDemonsRegistrationFilterTest(int, char *[]) std::cout << std::endl; FloatImageType::SizeValueType sizeArray[ImageDimension] = { 128, 128 }; - SizeType size; + SizeType size; size.SetSize(sizeArray); constexpr IndexType index{}; @@ -136,7 +136,7 @@ itkSymmetricForcesDemonsRegistrationFilterTest(int, char *[]) initField->SetBufferedRegion(region); initField->Allocate(); - double center[ImageDimension]; + double center[ImageDimension]; constexpr PixelType fgnd = 250; constexpr PixelType bgnd = 15; @@ -194,7 +194,7 @@ itkSymmetricForcesDemonsRegistrationFilterTest(int, char *[]) } registrator->SetStandardDeviations(v); - ShowProgressObject progressWatch(registrator); + ShowProgressObject progressWatch(registrator); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.hxx b/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.hxx index 0c9aba5a4e7..e1dd48ddb16 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.hxx +++ b/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.hxx @@ -218,15 +218,15 @@ template :: DisplacementFieldPointer BSplineSyNImageRegistrationMethod:: - ComputeUpdateField(const FixedImagesContainerType fixedImages, - const PointSetsContainerType fixedPointSets, - const TransformBaseType * fixedTransform, - const MovingImagesContainerType movingImages, - const PointSetsContainerType movingPointSets, - const TransformBaseType * movingTransform, - const FixedImageMasksContainerType fixedImageMasks, + ComputeUpdateField(const FixedImagesContainerType fixedImages, + const PointSetsContainerType fixedPointSets, + const TransformBaseType * fixedTransform, + const MovingImagesContainerType movingImages, + const PointSetsContainerType movingPointSets, + const TransformBaseType * movingTransform, + const FixedImageMasksContainerType fixedImageMasks, const MovingImageMasksContainerType movingImageMasks, - MeasureType & value) + MeasureType & value) { DisplacementFieldPointer metricGradientField = nullptr; DisplacementFieldPointer updateField = nullptr; @@ -364,9 +364,9 @@ typename BSplineSyNImageRegistrationMethod:: BSplineSmoothDisplacementField(const DisplacementFieldType * field, - const ArrayType & numberOfControlPoints, + const ArrayType & numberOfControlPoints, const WeightedMaskImageType * mask, - const BSplinePointSetType * gradientPointSet) + const BSplinePointSetType * gradientPointSet) { using DuplicatorType = ImageDuplicator; auto duplicator = DuplicatorType::New(); diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h b/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h index 70593ae9f58..146a4b93721 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h +++ b/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h @@ -235,7 +235,7 @@ class ITK_TEMPLATE_EXPORT ImageRegistrationMethodv4 : public ProcessObject return this->GetFixedImage(0); } virtual void - SetFixedImage(SizeValueType, const FixedImageType *); + SetFixedImage(SizeValueType, const FixedImageType *); virtual const FixedImageType * GetFixedImage(SizeValueType) const; /** Set the moving images. */ @@ -250,7 +250,7 @@ class ITK_TEMPLATE_EXPORT ImageRegistrationMethodv4 : public ProcessObject return this->GetMovingImage(0); } virtual void - SetMovingImage(SizeValueType, const MovingImageType *); + SetMovingImage(SizeValueType, const MovingImageType *); virtual const MovingImageType * GetMovingImage(SizeValueType) const; /** Set/get the fixed point sets. */ @@ -265,7 +265,7 @@ class ITK_TEMPLATE_EXPORT ImageRegistrationMethodv4 : public ProcessObject return this->GetFixedPointSet(0); } virtual void - SetFixedPointSet(SizeValueType, const PointSetType *); + SetFixedPointSet(SizeValueType, const PointSetType *); virtual const PointSetType * GetFixedPointSet(SizeValueType) const; /** Set the moving point sets. */ @@ -280,7 +280,7 @@ class ITK_TEMPLATE_EXPORT ImageRegistrationMethodv4 : public ProcessObject return this->GetMovingPointSet(0); } virtual void - SetMovingPointSet(SizeValueType, const PointSetType *); + SetMovingPointSet(SizeValueType, const PointSetType *); virtual const PointSetType * GetMovingPointSet(SizeValueType) const; /** Set/Get the optimizer. */ @@ -533,36 +533,36 @@ class ITK_TEMPLATE_EXPORT ImageRegistrationMethodv4 : public ProcessObject SizeValueType m_CurrentLevel{}; SizeValueType m_NumberOfLevels{ 0 }; SizeValueType m_CurrentIteration{}; - RealType m_CurrentMetricValue{}; - RealType m_CurrentConvergenceValue{}; - bool m_IsConverged{}; + RealType m_CurrentMetricValue{}; + RealType m_CurrentConvergenceValue{}; + bool m_IsConverged{}; - FixedImagesContainerType m_FixedSmoothImages{}; - MovingImagesContainerType m_MovingSmoothImages{}; - FixedImageMasksContainerType m_FixedImageMasks{}; + FixedImagesContainerType m_FixedSmoothImages{}; + MovingImagesContainerType m_MovingSmoothImages{}; + FixedImageMasksContainerType m_FixedImageMasks{}; MovingImageMasksContainerType m_MovingImageMasks{}; - VirtualImagePointer m_VirtualDomainImage{}; - PointSetsContainerType m_FixedPointSets{}; - PointSetsContainerType m_MovingPointSets{}; - SizeValueType m_NumberOfFixedObjects{}; - SizeValueType m_NumberOfMovingObjects{}; + VirtualImagePointer m_VirtualDomainImage{}; + PointSetsContainerType m_FixedPointSets{}; + PointSetsContainerType m_MovingPointSets{}; + SizeValueType m_NumberOfFixedObjects{}; + SizeValueType m_NumberOfMovingObjects{}; - OptimizerPointer m_Optimizer{}; + OptimizerPointer m_Optimizer{}; OptimizerWeightsType m_OptimizerWeights{}; - bool m_OptimizerWeightsAreIdentity{}; + bool m_OptimizerWeightsAreIdentity{}; - MetricPointer m_Metric{}; - MetricSamplingStrategyEnum m_MetricSamplingStrategy{}; - MetricSamplingPercentageArrayType m_MetricSamplingPercentagePerLevel{}; - SizeValueType m_NumberOfMetrics{}; - int m_FirstImageMetricIndex{}; + MetricPointer m_Metric{}; + MetricSamplingStrategyEnum m_MetricSamplingStrategy{}; + MetricSamplingPercentageArrayType m_MetricSamplingPercentagePerLevel{}; + SizeValueType m_NumberOfMetrics{}; + int m_FirstImageMetricIndex{}; std::vector m_ShrinkFactorsPerLevel{}; - SmoothingSigmasArrayType m_SmoothingSigmasPerLevel{}; - bool m_SmoothingSigmasAreSpecifiedInPhysicalUnits{}; + SmoothingSigmasArrayType m_SmoothingSigmasPerLevel{}; + bool m_SmoothingSigmasAreSpecifiedInPhysicalUnits{}; bool m_ReseedIterator{}; - int m_RandomSeed{}; - int m_CurrentRandomSeed{}; + int m_RandomSeed{}; + int m_CurrentRandomSeed{}; TransformParametersAdaptorsContainerType m_TransformParametersAdaptorsPerLevel{}; diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx b/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx index ff4d74a536b..d7da35ace4b 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx +++ b/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx @@ -125,7 +125,7 @@ ImageRegistrationMethodv4 void ImageRegistrationMethodv4::SetFixedImage( - SizeValueType index, + SizeValueType index, const FixedImageType * image) { itkDebugMacro("setting fixed image input " << index << " to " << image); @@ -154,7 +154,7 @@ const typename ImageRegistrationMethodv4 void ImageRegistrationMethodv4::SetMovingImage( - SizeValueType index, + SizeValueType index, const MovingImageType * image) { itkDebugMacro("setting moving image input " << index << " to " << image); @@ -184,7 +184,7 @@ const typename ImageRegistrationMethodv4 void ImageRegistrationMethodv4::SetFixedPointSet( - SizeValueType index, + SizeValueType index, const PointSetType * pointSet) { itkDebugMacro("setting fixed point set input " << index << " to " << pointSet); @@ -213,7 +213,7 @@ const typename ImageRegistrationMethodv4 void ImageRegistrationMethodv4::SetMovingPointSet( - SizeValueType index, + SizeValueType index, const PointSetType * pointSet) { itkDebugMacro("setting moving point set input " << index << " to " << pointSet); @@ -739,7 +739,7 @@ void ImageRegistrationMethodv4::AllocateOutputs() { const DecoratedInitialTransformType * decoratedInitialTransform = this->GetInitialTransformInput(); - DecoratedOutputTransformType * decoratedOutputTransform = this->GetOutput(); + DecoratedOutputTransformType * decoratedOutputTransform = this->GetOutput(); if (decoratedInitialTransform) { @@ -891,7 +891,7 @@ ImageRegistrationMethodv4GetRequestedRegion(); + const VirtualDomainRegionType & virtualDomainRegion = virtualImage->GetRequestedRegion(); const typename VirtualDomainImageType::SpacingType oneThirdVirtualSpacing = virtualImage->GetSpacing() / 3.0; for (SizeValueType n = 0; n < numberOfLocalMetrics; ++n) @@ -990,7 +990,7 @@ ImageRegistrationMethodv4(static_cast(totalVirtualDomainVoxels) * this->m_MetricSamplingPercentagePerLevel[this->m_CurrentLevel]); ImageRandomConstIteratorWithIndex ItR(virtualImage, virtualDomainRegion); @@ -1131,7 +1131,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { using namespace print_helper; diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.h b/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.h index 39037875e00..2ef7a4addac 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.h +++ b/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.h @@ -249,12 +249,12 @@ class ITK_TEMPLATE_EXPORT SyNImageRegistrationMethod OutputTransformPointer m_MovingToMiddleTransform{ nullptr }; OutputTransformPointer m_FixedToMiddleTransform{ nullptr }; - RealType m_ConvergenceThreshold{ static_cast(1.0e-6) }; + RealType m_ConvergenceThreshold{ static_cast(1.0e-6) }; unsigned int m_ConvergenceWindowSize{ 10 }; NumberOfIterationsArrayType m_NumberOfIterationsPerLevel{}; - bool m_DownsampleImagesForMetricDerivatives{ true }; - bool m_AverageMidPointGradients{ false }; + bool m_DownsampleImagesForMetricDerivatives{ true }; + bool m_AverageMidPointGradients{ false }; private: RealType m_GaussianSmoothingVarianceForTheUpdateField{ 3.0 }; diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.hxx b/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.hxx index 9d736e2317d..0aab61d6e76 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.hxx +++ b/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.hxx @@ -262,15 +262,15 @@ template :: DisplacementFieldPointer SyNImageRegistrationMethod::ComputeUpdateField( - const FixedImagesContainerType fixedImages, - const PointSetsContainerType fixedPointSets, - const TransformBaseType * fixedTransform, - const MovingImagesContainerType movingImages, - const PointSetsContainerType movingPointSets, - const TransformBaseType * movingTransform, - const FixedImageMasksContainerType fixedImageMasks, + const FixedImagesContainerType fixedImages, + const PointSetsContainerType fixedPointSets, + const TransformBaseType * fixedTransform, + const MovingImagesContainerType movingImages, + const PointSetsContainerType movingPointSets, + const TransformBaseType * movingTransform, + const FixedImageMasksContainerType fixedImageMasks, const MovingImageMasksContainerType movingImageMasks, - MeasureType & value) + MeasureType & value) { const DisplacementFieldPointer metricGradientField = this->ComputeMetricGradientField(fixedImages, fixedPointSets, @@ -298,15 +298,15 @@ template :: DisplacementFieldPointer SyNImageRegistrationMethod:: - ComputeMetricGradientField(const FixedImagesContainerType fixedImages, - const PointSetsContainerType fixedPointSets, - const TransformBaseType * fixedTransform, - const MovingImagesContainerType movingImages, - const PointSetsContainerType movingPointSets, - const TransformBaseType * movingTransform, - const FixedImageMasksContainerType fixedImageMasks, + ComputeMetricGradientField(const FixedImagesContainerType fixedImages, + const PointSetsContainerType fixedPointSets, + const TransformBaseType * fixedTransform, + const MovingImagesContainerType movingImages, + const PointSetsContainerType movingPointSets, + const TransformBaseType * movingTransform, + const FixedImageMasksContainerType fixedImageMasks, const MovingImageMasksContainerType movingImageMasks, - MeasureType & value) + MeasureType & value) { const typename MultiMetricType::Pointer multiMetric = dynamic_cast(this->m_Metric.GetPointer()); @@ -780,15 +780,15 @@ typename SyNImageRegistrationMethodGetLargestPossibleRegion(); - const typename DisplacementFieldType::SizeType size = region.GetSize(); - const typename DisplacementFieldType::IndexType startIndex = region.GetIndex(); + const typename DisplacementFieldType::SizeType size = region.GetSize(); + const typename DisplacementFieldType::IndexType startIndex = region.GetIndex(); ImageRegionConstIteratorWithIndex ItF(field, field->GetLargestPossibleRegion()); - ImageRegionIteratorWithIndex ItS(smoothField, smoothField->GetLargestPossibleRegion()); + ImageRegionIteratorWithIndex ItS(smoothField, smoothField->GetLargestPossibleRegion()); for (ItF.GoToBegin(), ItS.GoToBegin(); !ItF.IsAtEnd(); ++ItF, ++ItS) { typename DisplacementFieldType::IndexType index = ItF.GetIndex(); - bool isOnBoundary = false; + bool isOnBoundary = false; for (unsigned int d = 0; d < ImageDimension; ++d) { if (index[d] == startIndex[d] || index[d] == static_cast(size[d]) - startIndex[d] - 1) @@ -861,7 +861,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.h b/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.h index cba17904597..e90850892ea 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.h +++ b/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.h @@ -243,7 +243,7 @@ class ITK_TEMPLATE_EXPORT TimeVaryingBSplineVelocityFieldImageRegistrationMethod RealType m_LearningRate{}; - RealType m_ConvergenceThreshold{}; + RealType m_ConvergenceThreshold{}; unsigned int m_ConvergenceWindowSize{ 10 }; NumberOfIterationsArrayType m_NumberOfIterationsPerLevel{}; diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.hxx b/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.hxx index 6efe78419b7..04f9dc01b47 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.hxx +++ b/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.hxx @@ -75,15 +75,15 @@ TimeVaryingBSplineVelocityFieldImageRegistrationMethod(latticeRegion.GetNumberOfPixels() / numberOfTimeControlPoints); // Warp the moving image based on the composite transform (not including the current // time varying velocity field transform to be optimized). - typename OutputTransformType::VelocityFieldPointType sampledVelocityFieldOrigin; - typename OutputTransformType::VelocityFieldSpacingType sampledVelocityFieldSpacing; - typename OutputTransformType::VelocityFieldSizeType sampledVelocityFieldSize; + typename OutputTransformType::VelocityFieldPointType sampledVelocityFieldOrigin; + typename OutputTransformType::VelocityFieldSpacingType sampledVelocityFieldSpacing; + typename OutputTransformType::VelocityFieldSizeType sampledVelocityFieldSize; typename OutputTransformType::VelocityFieldDirectionType sampledVelocityFieldDirection; sampledVelocityFieldOrigin.Fill(0.0); @@ -91,7 +91,7 @@ TimeVaryingBSplineVelocityFieldImageRegistrationMethodm_NumberOfTimePointSamples); sampledVelocityFieldDirection.SetIdentity(); - const VirtualImageBaseConstPointer virtualDomainImage = this->GetCurrentLevelVirtualDomainImage(); + const VirtualImageBaseConstPointer virtualDomainImage = this->GetCurrentLevelVirtualDomainImage(); typename FixedImageMaskType::ConstPointer fixedImageMask = nullptr; if (virtualDomainImage.IsNull()) @@ -209,9 +209,9 @@ TimeVaryingBSplineVelocityFieldImageRegistrationMethod; - FaceCalculatorType faceCalculator; + FaceCalculatorType faceCalculator; typename FaceCalculatorType::FaceListType faceList = faceCalculator(velocityField, velocityField->GetLargestPossibleRegion(), radius); @@ -314,7 +314,7 @@ TimeVaryingBSplineVelocityFieldImageRegistrationMethod::GetMetricDerivativePointSetForAllTimePoints(VelocityFieldPointSetType * velocityFieldPointSet, - WeightsContainerType * velocityFieldWeights) + WeightsContainerType * velocityFieldWeights) { this->m_CurrentMetricValue = MeasureType{}; @@ -454,7 +454,7 @@ TimeVaryingBSplineVelocityFieldImageRegistrationMethod< this->m_Metric->Initialize(); typename ImageMetricType::DerivativeType metricDerivative; - MeasureType value{}; + MeasureType value{}; this->m_Metric->GetValueAndDerivative(value, metricDerivative); @@ -602,15 +602,15 @@ TimeVaryingBSplineVelocityFieldImageRegistrationMethod< TMovingImage, TTransform, TVirtualImage, - TPointSet>::AttachMetricGradientPointSetAtSpecificTimePoint(const RealType normalizedTimePoint, - VelocityFieldPointSetType * velocityFieldPoints, - WeightsContainerType * velocityFieldWeights, - const FixedImagesContainerType fixedImages, - const PointSetsContainerType fixedPointSets, - const TransformBaseType * fixedTransform, - const MovingImagesContainerType movingImages, - const PointSetsContainerType movingPointSets, - const TransformBaseType * movingTransform, + TPointSet>::AttachMetricGradientPointSetAtSpecificTimePoint(const RealType normalizedTimePoint, + VelocityFieldPointSetType * velocityFieldPoints, + WeightsContainerType * velocityFieldWeights, + const FixedImagesContainerType fixedImages, + const PointSetsContainerType fixedPointSets, + const TransformBaseType * fixedTransform, + const MovingImagesContainerType movingImages, + const PointSetsContainerType movingPointSets, + const TransformBaseType * movingTransform, const FixedImageMasksContainerType fixedImageMasks) { const VirtualImageBaseConstPointer virtualDomainImage = this->GetCurrentLevelVirtualDomainImage(); @@ -767,7 +767,7 @@ TimeVaryingBSplineVelocityFieldImageRegistrationMethod< gradientField->Allocate(); typename DisplacementFieldType::IndexType gradientFieldIndex = gradientField->GetRequestedRegion().GetIndex(); - typename DisplacementFieldType::SizeType gradientFieldSize = gradientField->GetRequestedRegion().GetSize(); + typename DisplacementFieldType::SizeType gradientFieldSize = gradientField->GetRequestedRegion().GetSize(); SizeValueType localCount = 0; for (ImageRegionConstIteratorWithOnlyIndex ItG(gradientField, diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h b/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h index e7ed0053449..6c83a72ca48 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h +++ b/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h @@ -180,7 +180,7 @@ class ITK_TEMPLATE_EXPORT TimeVaryingVelocityFieldImageRegistrationMethodv4 private: RealType m_LearningRate{}; - RealType m_ConvergenceThreshold{}; + RealType m_ConvergenceThreshold{}; unsigned int m_ConvergenceWindowSize{ 10 }; NumberOfIterationsArrayType m_NumberOfIterationsPerLevel{}; diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.hxx b/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.hxx index f6c483d1561..6c9a54d3624 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.hxx +++ b/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.hxx @@ -362,7 +362,7 @@ TimeVaryingVelocityFieldImageRegistrationMethodv4; - FaceCalculatorType faceCalculator; + FaceCalculatorType faceCalculator; typename FaceCalculatorType::FaceListType faceList = faceCalculator(velocityField, velocityField->GetLargestPossibleRegion(), radius); @@ -377,7 +377,7 @@ TimeVaryingVelocityFieldImageRegistrationMethodv4GetCurrentLevel(); + const unsigned int currentLevel = filter->GetCurrentLevel(); const typename TFilter::ShrinkFactorsPerDimensionContainerType shrinkFactors = filter->GetShrinkFactorsPerDimension(currentLevel); - typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); + typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); typename TFilter::TransformParametersAdaptorsContainerType adaptors = filter->GetTransformParametersAdaptorsPerLevel(); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineImageRegistrationTest.cxx index a7cfd9440e2..54fd3c7b3f3 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineImageRegistrationTest.cxx @@ -55,10 +55,10 @@ class CommandIterationUpdate : public itk::Command return; } - const unsigned int currentLevel = filter->GetCurrentLevel(); + const unsigned int currentLevel = filter->GetCurrentLevel(); const typename TFilter::ShrinkFactorsPerDimensionContainerType shrinkFactors = filter->GetShrinkFactorsPerDimension(currentLevel); - typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); + typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); typename TFilter::TransformParametersAdaptorsContainerType adaptors = filter->GetTransformParametersAdaptorsPerLevel(); @@ -248,7 +248,7 @@ PerformBSplineImageRegistration(int argc, char * argv[]) auto outputBSplineTransform = BSplineTransformType::New(); typename BSplineTransformType::PhysicalDimensionsType physicalDimensions; - typename BSplineTransformType::MeshSizeType meshSize; + typename BSplineTransformType::MeshSizeType meshSize; for (unsigned int d = 0; d < VImageDimension; ++d) { physicalDimensions[d] = diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNImageRegistrationTest.cxx index 1eb24613875..c2b35904baf 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNImageRegistrationTest.cxx @@ -58,10 +58,10 @@ class CommandIterationUpdate : public itk::Command return; } - const unsigned int currentLevel = filter->GetCurrentLevel(); + const unsigned int currentLevel = filter->GetCurrentLevel(); const typename TFilter::ShrinkFactorsPerDimensionContainerType shrinkFactors = filter->GetShrinkFactorsPerDimension(currentLevel); - typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); + typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); typename TFilter::TransformParametersAdaptorsContainerType adaptors = filter->GetTransformParametersAdaptorsPerLevel(); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNPointSetRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNPointSetRegistrationTest.cxx index 98f241c1c79..b2b5886633a 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNPointSetRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNPointSetRegistrationTest.cxx @@ -54,7 +54,7 @@ itkBSplineSyNPointSetRegistrationTest(int itkNotUsed(argc), char * itkNotUsed(ar { auto label = static_cast(1.5 + count / 100); - PointType fixedPoint; + PointType fixedPoint; constexpr float radius = 100.0; fixedPoint[0] = radius * std::cos(theta); fixedPoint[1] = radius * std::sin(theta); @@ -80,10 +80,10 @@ itkBSplineSyNPointSetRegistrationTest(int itkNotUsed(argc), char * itkNotUsed(ar // virtual image domain is [-110,-110] [110,110] - FixedImageType::SizeType fixedImageSize; - FixedImageType::PointType fixedImageOrigin; + FixedImageType::SizeType fixedImageSize; + FixedImageType::PointType fixedImageOrigin; FixedImageType::DirectionType fixedImageDirection; - FixedImageType::SpacingType fixedImageSpacing; + FixedImageType::SpacingType fixedImageSpacing; fixedImageSize.Fill(221); fixedImageOrigin.Fill(-110); @@ -241,7 +241,7 @@ itkBSplineSyNPointSetRegistrationTest(int itkNotUsed(argc), char * itkNotUsed(ar PointType transformedMovingPoint = displacementFieldRegistration->GetModifiableTransform()->GetInverseTransform()->TransformPoint( movingPoints->GetPoint(n)); - PointType fixedPoint = fixedPoints->GetPoint(n); + PointType fixedPoint = fixedPoints->GetPoint(n); const PointType transformedFixedPoint = displacementFieldRegistration->GetModifiableTransform()->TransformPoint(fixedPoints->GetPoint(n)); PointType difference; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkExponentialImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkExponentialImageRegistrationTest.cxx index 1e4929edb95..bf7878be021 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkExponentialImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkExponentialImageRegistrationTest.cxx @@ -61,10 +61,10 @@ class CommandIterationUpdate : public itk::Command return; } - const unsigned int currentLevel = filter->GetCurrentLevel(); + const unsigned int currentLevel = filter->GetCurrentLevel(); const typename TFilter::ShrinkFactorsPerDimensionContainerType shrinkFactors = filter->GetShrinkFactorsPerDimension(currentLevel); - typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); + typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); typename TFilter::TransformParametersAdaptorsContainerType adaptors = filter->GetTransformParametersAdaptorsPerLevel(); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkImageRegistrationSamplingTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkImageRegistrationSamplingTest.cxx index aba6321f8cb..9f2d573405b 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkImageRegistrationSamplingTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkImageRegistrationSamplingTest.cxx @@ -37,7 +37,7 @@ itkImageRegistrationSamplingTest(int, char *[]) ITK_TRY_EXPECT_NO_EXCEPTION(registrationMethod->SetMetricSamplingPercentage(0.1)); - constexpr unsigned int NUM_ERRORS = 3; + constexpr unsigned int NUM_ERRORS = 3; constexpr RegistrationType::RealType errorValues[NUM_ERRORS] = { -0.1, 0.0, 1.1 }; for (const double errorValue : errorValues) { diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkQuasiNewtonOptimizerv4RegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkQuasiNewtonOptimizerv4RegistrationTest.cxx index 5019dd20489..59945907f7b 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkQuasiNewtonOptimizerv4RegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkQuasiNewtonOptimizerv4RegistrationTest.cxx @@ -54,8 +54,8 @@ int itkQuasiNewtonOptimizerv4RegistrationTestMain(int argc, char * argv[]) { const std::string metricString = argv[2]; - unsigned int numberOfIterations = 10; - unsigned int numberOfDisplacementIterations = 10; + unsigned int numberOfIterations = 10; + unsigned int numberOfDisplacementIterations = 10; if (argc >= 7) { @@ -149,9 +149,9 @@ itkQuasiNewtonOptimizerv4RegistrationTestMain(int argc, char * argv[]) miMetric->SetNumberOfHistogramBins(20); using PointType = typename PointSetType::PointType; - const typename PointSetType::Pointer pset(PointSetType::New()); - unsigned long ind = 0; - unsigned long ct = 0; + const typename PointSetType::Pointer pset(PointSetType::New()); + unsigned long ind = 0; + unsigned long ct = 0; itk::ImageRegionIteratorWithIndex It(fixedImage, fixedImage->GetLargestPossibleRegion()); for (It.GoToBegin(); !It.IsAtEnd(); ++It) { @@ -275,7 +275,7 @@ itkQuasiNewtonOptimizerv4RegistrationTestMain(int argc, char * argv[]) resample->Update(); // write out the displacement field using DisplacementWriterType = itk::ImageFileWriter; - auto displacementwriter = DisplacementWriterType::New(); + auto displacementwriter = DisplacementWriterType::New(); const std::string outfilename(argv[5]); const std::string ext = itksys::SystemTools::GetFilenameExtension(outfilename); const std::string name = itksys::SystemTools::GetFilenameWithoutExtension(outfilename); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx index 75fa5281873..90f602ddd7d 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx @@ -68,10 +68,10 @@ class CommandIterationUpdate : public itk::Command return; } - const unsigned int currentLevel = filter->GetCurrentLevel(); + const unsigned int currentLevel = filter->GetCurrentLevel(); const typename TFilter::ShrinkFactorsPerDimensionContainerType shrinkFactors = filter->GetShrinkFactorsPerDimension(currentLevel); - typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); + typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); typename TFilter::TransformParametersAdaptorsContainerType adaptors = filter->GetTransformParametersAdaptorsPerLevel(); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest2.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest2.cxx index 1b13c3d75ff..64af0d32340 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest2.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest2.cxx @@ -80,10 +80,10 @@ class CommandIterationUpdate : public itk::Command return; } - const unsigned int currentLevel = filter->GetCurrentLevel(); + const unsigned int currentLevel = filter->GetCurrentLevel(); const typename TFilter::ShrinkFactorsPerDimensionContainerType shrinkFactors = filter->GetShrinkFactorsPerDimension(currentLevel); - typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); + typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); typename TFilter::TransformParametersAdaptorsContainerType adaptors = filter->GetTransformParametersAdaptorsPerLevel(); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest3.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest3.cxx index 3cfd6f835aa..f84396e3d29 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest3.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest3.cxx @@ -101,10 +101,10 @@ class CommandIterationUpdate : public itk::Command return; } - const unsigned int currentLevel = filter->GetCurrentLevel(); + const unsigned int currentLevel = filter->GetCurrentLevel(); const typename TFilter::ShrinkFactorsPerDimensionContainerType shrinkFactors = filter->GetShrinkFactorsPerDimension(currentLevel); - typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); + typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); typename TFilter::TransformParametersAdaptorsContainerType adaptors = filter->GetTransformParametersAdaptorsPerLevel(); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest4.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest4.cxx index 66a2a1b78bd..2bba42bbed8 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest4.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest4.cxx @@ -128,7 +128,7 @@ ImageRegistration(int argc, char * argv[]) optimizer->SetMinimumConvergenceValue(1e-5); optimizer->SetConvergenceWindowSize(2); - double scaleData[] = { 200000, 1.0, 1.0 }; + double scaleData[] = { 200000, 1.0, 1.0 }; const typename Optimizerv4Type::ScalesType::Superclass scales(scaleData, 3); optimizer->SetScales(scales); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTestWithMaskAndSampling.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTestWithMaskAndSampling.cxx index 0171efb8345..368f9ef2cde 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTestWithMaskAndSampling.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTestWithMaskAndSampling.cxx @@ -68,10 +68,10 @@ class CommandIterationUpdate : public itk::Command return; } - const unsigned int currentLevel = filter->GetCurrentLevel(); + const unsigned int currentLevel = filter->GetCurrentLevel(); const typename TFilter::ShrinkFactorsPerDimensionContainerType shrinkFactors = filter->GetShrinkFactorsPerDimension(currentLevel); - typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); + typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); typename TFilter::TransformParametersAdaptorsContainerType adaptors = filter->GetTransformParametersAdaptorsPerLevel(); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimplePointSetRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimplePointSetRegistrationTest.cxx index 0a25e2cdadc..98a44c7321f 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimplePointSetRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimplePointSetRegistrationTest.cxx @@ -62,7 +62,7 @@ class CommandIterationUpdate : public itk::Command return; } - const unsigned int currentLevel = filter->GetCurrentLevel(); + const unsigned int currentLevel = filter->GetCurrentLevel(); typename TFilter::TransformParametersAdaptorsContainerType adaptors = filter->GetTransformParametersAdaptorsPerLevel(); @@ -135,7 +135,7 @@ itkSimplePointSetRegistrationTest(int itkNotUsed(argc), char * itkNotUsed(argv)[ { auto label = static_cast(1.5 + count / 100); - PointType fixedPoint; + PointType fixedPoint; constexpr float radius = 100.0; fixedPoint[0] = radius * std::cos(theta); fixedPoint[1] = radius * std::sin(theta); @@ -161,10 +161,10 @@ itkSimplePointSetRegistrationTest(int itkNotUsed(argc), char * itkNotUsed(argv)[ // virtual image domain is [-110,-110] [110,110] - FixedImageType::SizeType fixedImageSize; - FixedImageType::PointType fixedImageOrigin; + FixedImageType::SizeType fixedImageSize; + FixedImageType::PointType fixedImageOrigin; FixedImageType::DirectionType fixedImageDirection; - FixedImageType::SpacingType fixedImageSpacing; + FixedImageType::SpacingType fixedImageSpacing; fixedImageSize.Fill(221); fixedImageOrigin.Fill(-110); @@ -231,15 +231,15 @@ itkSimplePointSetRegistrationTest(int itkNotUsed(argc), char * itkNotUsed(argv)[ // applying the resultant transform to moving points and verify result std::cout << "Fixed\tMoving\tMovingTransformed\tFixedTransformed\tDiff" << std::endl; - bool passed = true; - constexpr PointType::ValueType tolerance = 1e-2; + bool passed = true; + constexpr PointType::ValueType tolerance = 1e-2; const AffineTransformType::InverseTransformBasePointer affineInverseTransform = affineSimple->GetModifiableTransform()->GetInverseTransform(); for (unsigned int n = 0; n < movingPoints->GetNumberOfPoints(); ++n) { // compare the points in virtual domain - PointType transformedMovingPoint = affineInverseTransform->TransformPoint(movingPoints->GetPoint(n)); - PointType fixedPoint = fixedPoints->GetPoint(n); + PointType transformedMovingPoint = affineInverseTransform->TransformPoint(movingPoints->GetPoint(n)); + PointType fixedPoint = fixedPoints->GetPoint(n); const PointType transformedFixedPoint = affineSimple->GetModifiableTransform()->TransformPoint(fixedPoints->GetPoint(n)); PointType difference; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSyNImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSyNImageRegistrationTest.cxx index 32cf0ce1ae1..aeee68c68a2 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSyNImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSyNImageRegistrationTest.cxx @@ -65,10 +65,10 @@ class CommandIterationUpdate : public itk::Command return; } - const unsigned int currentLevel = filter->GetCurrentLevel(); + const unsigned int currentLevel = filter->GetCurrentLevel(); const typename TFilter::ShrinkFactorsPerDimensionContainerType shrinkFactors = filter->GetShrinkFactorsPerDimension(currentLevel); - typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); + typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); typename TFilter::TransformParametersAdaptorsContainerType adaptors = filter->GetTransformParametersAdaptorsPerLevel(); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSyNPointSetRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSyNPointSetRegistrationTest.cxx index b0c19dc9ed6..38ecd0bdd1d 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSyNPointSetRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSyNPointSetRegistrationTest.cxx @@ -55,7 +55,7 @@ itkSyNPointSetRegistrationTest(int itkNotUsed(argc), char * itkNotUsed(argv)[]) { auto label = static_cast(1.5 + count / 100); - PointType fixedPoint; + PointType fixedPoint; constexpr float radius = 100.0; fixedPoint[0] = radius * std::cos(theta); fixedPoint[1] = radius * std::sin(theta); @@ -81,10 +81,10 @@ itkSyNPointSetRegistrationTest(int itkNotUsed(argc), char * itkNotUsed(argv)[]) // virtual image domain is [-110,-110] [110,110] - FixedImageType::SizeType fixedImageSize; - FixedImageType::PointType fixedImageOrigin; + FixedImageType::SizeType fixedImageSize; + FixedImageType::PointType fixedImageOrigin; FixedImageType::DirectionType fixedImageDirection; - FixedImageType::SpacingType fixedImageSpacing; + FixedImageType::SpacingType fixedImageSpacing; fixedImageSize.Fill(221); fixedImageOrigin.Fill(-110); @@ -212,7 +212,7 @@ itkSyNPointSetRegistrationTest(int itkNotUsed(argc), char * itkNotUsed(argv)[]) PointType transformedMovingPoint = displacementFieldRegistration->GetModifiableTransform()->GetInverseTransform()->TransformPoint( movingPoints->GetPoint(n)); - PointType fixedPoint = fixedPoints->GetPoint(n); + PointType fixedPoint = fixedPoints->GetPoint(n); const PointType transformedFixedPoint = displacementFieldRegistration->GetModifiableTransform()->TransformPoint(fixedPoints->GetPoint(n)); PointType difference; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx index c9e56847773..1a8efc9afeb 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx @@ -57,10 +57,10 @@ class CommandIterationUpdate : public itk::Command return; } - const unsigned int currentLevel = filter->GetCurrentLevel(); + const unsigned int currentLevel = filter->GetCurrentLevel(); const typename TFilter::ShrinkFactorsPerDimensionContainerType shrinkFactors = filter->GetShrinkFactorsPerDimension(currentLevel); - typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); + typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); typename TFilter::TransformParametersAdaptorsContainerType adaptors = filter->GetTransformParametersAdaptorsPerLevel(); @@ -77,12 +77,12 @@ int PerformTimeVaryingBSplineVelocityFieldImageRegistration(int argc, char * argv[]) { - int numberOfAffineIterations = 100; - int numberOfDeformableIterationsLevel0 = 10; - int numberOfDeformableIterationsLevel1 = 20; - int numberOfDeformableIterationsLevel2 = 11; + int numberOfAffineIterations = 100; + int numberOfDeformableIterationsLevel0 = 10; + int numberOfDeformableIterationsLevel1 = 20; + int numberOfDeformableIterationsLevel2 = 11; double learningRate = 0.5; - auto convergenceWindowSize = 10U; + auto convergenceWindowSize = 10U; if (argc >= 6) { @@ -266,15 +266,15 @@ PerformTimeVaryingBSplineVelocityFieldImageRegistration(int argc, char * argv[]) // Determine the parameters (size, spacing, etc) for the time-varying velocity field - typename FixedImageType::SizeType fixedImageSize = fixedImage->GetBufferedRegion().GetSize(); - typename FixedImageType::PointType fixedImageOrigin = fixedImage->GetOrigin(); - typename FixedImageType::SpacingType fixedImageSpacing = fixedImage->GetSpacing(); + typename FixedImageType::SizeType fixedImageSize = fixedImage->GetBufferedRegion().GetSize(); + typename FixedImageType::PointType fixedImageOrigin = fixedImage->GetOrigin(); + typename FixedImageType::SpacingType fixedImageSpacing = fixedImage->GetSpacing(); typename FixedImageType::DirectionType fixedImageDirection = fixedImage->GetDirection(); - typename TimeVaryingVelocityFieldControlPointLatticeType::SizeType transformDomainMeshSize; - typename TimeVaryingVelocityFieldControlPointLatticeType::PointType transformDomainOrigin; - typename TimeVaryingVelocityFieldControlPointLatticeType::SpacingType transformDomainSpacing; - typename TimeVaryingVelocityFieldControlPointLatticeType::SizeType transformDomainSize; + typename TimeVaryingVelocityFieldControlPointLatticeType::SizeType transformDomainMeshSize; + typename TimeVaryingVelocityFieldControlPointLatticeType::PointType transformDomainOrigin; + typename TimeVaryingVelocityFieldControlPointLatticeType::SpacingType transformDomainSpacing; + typename TimeVaryingVelocityFieldControlPointLatticeType::SizeType transformDomainSize; typename TimeVaryingVelocityFieldControlPointLatticeType::DirectionType transformDomainDirection; transformDomainDirection.SetIdentity(); @@ -333,9 +333,9 @@ PerformTimeVaryingBSplineVelocityFieldImageRegistration(int argc, char * argv[]) velocityFieldLattice->Allocate(); velocityFieldLattice->FillBuffer(zeroVector); - typename TransformType::VelocityFieldPointType velocityFieldOrigin; - typename TransformType::VelocityFieldSpacingType velocityFieldSpacing; - typename TransformType::VelocityFieldSizeType velocityFieldSize; + typename TransformType::VelocityFieldPointType velocityFieldOrigin; + typename TransformType::VelocityFieldSpacingType velocityFieldSpacing; + typename TransformType::VelocityFieldSizeType velocityFieldSize; typename TransformType::VelocityFieldDirectionType velocityFieldDirection; velocityFieldOrigin.Fill(0.0); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest.cxx index 46956cef9a5..570ce94cf26 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest.cxx @@ -54,7 +54,7 @@ itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest(int itkNotUsed(argc), unsigned long count = 0; for (float theta = 0; theta < 2.0 * itk::Math::pi; theta += 0.1) { - PointType fixedPoint; + PointType fixedPoint; constexpr float radius = 100.0; fixedPoint[0] = radius * std::cos(theta); fixedPoint[1] = radius * std::sin(theta); @@ -76,10 +76,10 @@ itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest(int itkNotUsed(argc), count++; } - FixedImageType::SizeType fixedImageSize; - FixedImageType::PointType fixedImageOrigin; + FixedImageType::SizeType fixedImageSize; + FixedImageType::PointType fixedImageOrigin; FixedImageType::DirectionType fixedImageDirection; - FixedImageType::SpacingType fixedImageSpacing; + FixedImageType::SpacingType fixedImageSpacing; // virtual image domain is [-110,-110] [110,110] fixedImageSize.Fill(221); @@ -150,10 +150,10 @@ itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest(int itkNotUsed(argc), // Determine the parameters (size, spacing, etc) for the time-varying velocity field - TimeVaryingVelocityFieldControlPointLatticeType::SizeType transformDomainMeshSize; - TimeVaryingVelocityFieldControlPointLatticeType::PointType transformDomainOrigin; - TimeVaryingVelocityFieldControlPointLatticeType::SpacingType transformDomainSpacing; - TimeVaryingVelocityFieldControlPointLatticeType::SizeType transformDomainSize; + TimeVaryingVelocityFieldControlPointLatticeType::SizeType transformDomainMeshSize; + TimeVaryingVelocityFieldControlPointLatticeType::PointType transformDomainOrigin; + TimeVaryingVelocityFieldControlPointLatticeType::SpacingType transformDomainSpacing; + TimeVaryingVelocityFieldControlPointLatticeType::SizeType transformDomainSize; TimeVaryingVelocityFieldControlPointLatticeType::DirectionType transformDomainDirection; transformDomainDirection.SetIdentity(); @@ -195,9 +195,9 @@ itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest(int itkNotUsed(argc), velocityFieldLattice->Allocate(); velocityFieldLattice->FillBuffer(zeroVector); - TransformType::VelocityFieldPointType velocityFieldOrigin; - TransformType::VelocityFieldSpacingType velocityFieldSpacing; - TransformType::VelocityFieldSizeType velocityFieldSize; + TransformType::VelocityFieldPointType velocityFieldOrigin; + TransformType::VelocityFieldSpacingType velocityFieldSpacing; + TransformType::VelocityFieldSizeType velocityFieldSize; TransformType::VelocityFieldDirectionType velocityFieldDirection; velocityFieldOrigin.Fill(0.0); @@ -294,7 +294,7 @@ itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest(int itkNotUsed(argc), PointType transformedMovingPoint = velocityFieldRegistration->GetModifiableTransform()->GetInverseTransform()->TransformPoint( movingPoints->GetPoint(n)); - PointType fixedPoint = fixedPoints->GetPoint(n); + PointType fixedPoint = fixedPoints->GetPoint(n); const PointType transformedFixedPoint = velocityFieldRegistration->GetModifiableTransform()->TransformPoint(fixedPoints->GetPoint(n)); PointType difference; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingVelocityFieldImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingVelocityFieldImageRegistrationTest.cxx index 74d619bb4d0..45170549083 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingVelocityFieldImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingVelocityFieldImageRegistrationTest.cxx @@ -57,10 +57,10 @@ class CommandIterationUpdate : public itk::Command return; } - const unsigned int currentLevel = filter->GetCurrentLevel(); + const unsigned int currentLevel = filter->GetCurrentLevel(); const typename TFilter::ShrinkFactorsPerDimensionContainerType shrinkFactors = filter->GetShrinkFactorsPerDimension(currentLevel); - typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); + typename TFilter::SmoothingSigmasArrayType smoothingSigmas = filter->GetSmoothingSigmasPerLevel(); typename TFilter::TransformParametersAdaptorsContainerType adaptors = filter->GetTransformParametersAdaptorsPerLevel(); @@ -77,10 +77,10 @@ int PerformTimeVaryingVelocityFieldImageRegistration(int argc, char * argv[]) { - int numberOfAffineIterations = 100; - int numberOfDeformableIterationsLevel0 = 10; - int numberOfDeformableIterationsLevel1 = 20; - int numberOfDeformableIterationsLevel2 = 11; + int numberOfAffineIterations = 100; + int numberOfDeformableIterationsLevel0 = 10; + int numberOfDeformableIterationsLevel1 = 20; + int numberOfDeformableIterationsLevel2 = 11; double learningRate = 0.5; if (argc >= 6) @@ -194,12 +194,12 @@ PerformTimeVaryingVelocityFieldImageRegistration(int argc, char * argv[]) using TimeVaryingVelocityFieldType = itk::Image; auto velocityField = TimeVaryingVelocityFieldType::New(); - typename TimeVaryingVelocityFieldType::IndexType velocityFieldIndex; - typename TimeVaryingVelocityFieldType::SizeType velocityFieldSize; - typename TimeVaryingVelocityFieldType::PointType velocityFieldOrigin; - typename TimeVaryingVelocityFieldType::SpacingType velocityFieldSpacing; + typename TimeVaryingVelocityFieldType::IndexType velocityFieldIndex; + typename TimeVaryingVelocityFieldType::SizeType velocityFieldSize; + typename TimeVaryingVelocityFieldType::PointType velocityFieldOrigin; + typename TimeVaryingVelocityFieldType::SpacingType velocityFieldSpacing; typename TimeVaryingVelocityFieldType::DirectionType velocityFieldDirection; - typename TimeVaryingVelocityFieldType::RegionType velocityFieldRegion; + typename TimeVaryingVelocityFieldType::RegionType velocityFieldRegion; velocityFieldIndex.Fill(0); velocityFieldSize.Fill(4); @@ -207,10 +207,10 @@ PerformTimeVaryingVelocityFieldImageRegistration(int argc, char * argv[]) velocityFieldSpacing.Fill(1.0); velocityFieldDirection.SetIdentity(); - typename FixedImageType::IndexType fixedImageIndex = fixedImage->GetBufferedRegion().GetIndex(); - typename FixedImageType::SizeType fixedImageSize = fixedImage->GetBufferedRegion().GetSize(); - typename FixedImageType::PointType fixedImageOrigin = fixedImage->GetOrigin(); - typename FixedImageType::SpacingType fixedImageSpacing = fixedImage->GetSpacing(); + typename FixedImageType::IndexType fixedImageIndex = fixedImage->GetBufferedRegion().GetIndex(); + typename FixedImageType::SizeType fixedImageSize = fixedImage->GetBufferedRegion().GetSize(); + typename FixedImageType::PointType fixedImageOrigin = fixedImage->GetOrigin(); + typename FixedImageType::SpacingType fixedImageSpacing = fixedImage->GetSpacing(); typename FixedImageType::DirectionType fixedImageDirection = fixedImage->GetDirection(); for (unsigned int i = 0; i < ImageDimension; ++i) diff --git a/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.hxx b/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.hxx index c7ffef098d2..a78e282b3cc 100644 --- a/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.hxx +++ b/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.hxx @@ -157,8 +157,8 @@ BayesianClassifierImageFilterGetPosteriorImage()->GetBufferedRegion()); PosteriorsPixelType p; - const unsigned int numberOfClasses = this->GetPosteriorImage()->GetVectorLength(); + const unsigned int numberOfClasses = this->GetPosteriorImage()->GetVectorLength(); for (unsigned int iter = 0; iter < m_NumberOfSmoothingIterations; ++iter) { @@ -334,7 +334,7 @@ BayesianClassifierImageFilterGetOutput(), kmeansFilter->GetOutput()->GetBufferedRegion()); - CovarianceArrayType sumsOfSquares(m_NumberOfClasses); // sum of the + CovarianceArrayType sumsOfSquares(m_NumberOfClasses); // sum of the // square // intensities // for each @@ -137,9 +137,9 @@ BayesianClassifierInitializationImageFilterGetInput(); + const InputImageType * inputImage = this->GetInput(); const typename InputImageType::RegionType imageRegion = inputImage->GetLargestPossibleRegion(); - InputImageIteratorType itrInputImage(inputImage, imageRegion); + InputImageIteratorType itrInputImage(inputImage, imageRegion); itrInputImage.GoToBegin(); itrKMeansImage.GoToBegin(); @@ -224,7 +224,7 @@ BayesianClassifierInitializationImageFilterGetInput(); const typename InputImageType::RegionType imageRegion = inputImage->GetLargestPossibleRegion(); - InputImageIteratorType itrInputImage(inputImage, imageRegion); + InputImageIteratorType itrInputImage(inputImage, imageRegion); if (!m_UserSuppliesMembershipFunctions) { @@ -244,8 +244,8 @@ BayesianClassifierInitializationImageFilterGetOutput(); MembershipImageIteratorType itrMembershipImage(membershipImage, imageRegion); - MembershipPixelType membershipPixel(m_NumberOfClasses); - MeasurementVectorType mv; + MembershipPixelType membershipPixel(m_NumberOfClasses); + MeasurementVectorType mv; itrMembershipImage.GoToBegin(); itrInputImage.GoToBegin(); diff --git a/Modules/Segmentation/Classifiers/include/itkImageClassifierBase.hxx b/Modules/Segmentation/Classifiers/include/itkImageClassifierBase.hxx index 2fa7f4a3086..7288cd5378a 100644 --- a/Modules/Segmentation/Classifiers/include/itkImageClassifierBase.hxx +++ b/Modules/Segmentation/Classifiers/include/itkImageClassifierBase.hxx @@ -55,7 +55,7 @@ ImageClassifierBase::Classify() // Set the iterators and the pixel type definition for the input image const InputImageConstPointer inputImage = this->GetInputImage(); - InputImageConstIterator inIt(inputImage, inputImage->GetBufferedRegion()); + InputImageConstIterator inIt(inputImage, inputImage->GetBufferedRegion()); // Set the iterators and the pixel type definition for the classified image classifiedImage = this->GetClassifiedImage(); @@ -63,7 +63,7 @@ ImageClassifierBase::Classify() ClassifiedImageIterator classifiedIt(classifiedImage, classifiedImage->GetBufferedRegion()); // Set up the vector to store the image data - InputImagePixelType inputImagePixel; + InputImagePixelType inputImagePixel; ClassifiedImagePixelType outputClassifiedLabel; // Set up the storage containers to record the probability @@ -77,7 +77,7 @@ ImageClassifierBase::Classify() // support progress methods/callbacks const SizeValueType totalPixels = inputImage->GetBufferedRegion().GetNumberOfPixels(); - SizeValueType updateVisits = totalPixels / 10; + SizeValueType updateVisits = totalPixels / 10; if (updateVisits < 1) { updateVisits = 1; @@ -128,7 +128,7 @@ template std::vector ImageClassifierBase::GetPixelMembershipValue(const InputImagePixelType inputImagePixel) { - const unsigned int numberOfClasses = this->GetNumberOfClasses(); + const unsigned int numberOfClasses = this->GetNumberOfClasses(); std::vector pixelMembershipValue(numberOfClasses); for (unsigned int classIndex = 0; classIndex < numberOfClasses; ++classIndex) diff --git a/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.h b/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.h index 424ada4795a..1b4db498c0b 100644 --- a/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.h +++ b/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.h @@ -152,8 +152,8 @@ class ITK_TEMPLATE_EXPORT ImageGaussianModelEstimator : public ImageModelEstimat void EstimateGaussianModelParameters(); - MatrixType m_NumberOfSamples{}; - MatrixType m_Means{}; + MatrixType m_NumberOfSamples{}; + MatrixType m_Means{}; std::unique_ptr m_Covariance{ nullptr }; TrainingImagePointer m_TrainingImage{}; diff --git a/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.hxx b/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.hxx index eeda25ce1ae..905fa8be793 100644 --- a/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.hxx +++ b/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.hxx @@ -28,7 +28,7 @@ namespace itk template void ImageGaussianModelEstimator::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); @@ -95,8 +95,8 @@ ImageGaussianModelEstimator::E this->EstimateGaussianModelParameters(); // Populate the membership functions for all the classes - MembershipFunctionPointer membershipFunction; - typename MembershipFunctionType::MeanVectorType tmean; + MembershipFunctionPointer membershipFunction; + typename MembershipFunctionType::MeanVectorType tmean; typename MembershipFunctionType::CovarianceMatrixType tcov; NumericTraits::SetLength(tmean, VectorDimension); @@ -124,7 +124,7 @@ ImageGaussianModelEstimator::E { // Set the iterators and the pixel type definition for the input image const InputImageConstPointer inputImage = this->GetInputImage(); - InputImageConstIterator inIt(inputImage, inputImage->GetBufferedRegion()); + InputImageConstIterator inIt(inputImage, inputImage->GetBufferedRegion()); // Set the iterators and the pixel type definition for the training image const TrainingImageConstPointer trainingImage = this->GetTrainingImage(); diff --git a/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.h b/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.h index 32176a496a2..5a1bdae6112 100644 --- a/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.h +++ b/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.h @@ -275,19 +275,19 @@ class ITK_TEMPLATE_EXPORT ImageKmeansModelEstimator : public ImageModelEstimator double m_Threshold{}; double m_OffsetAdd{}; double m_OffsetMultiply{}; - int m_MaxSplitAttempts{}; + int m_MaxSplitAttempts{}; - bool m_ValidInCodebook{}; + bool m_ValidInCodebook{}; double m_DoubleMaximum{}; double m_OutputDistortion{}; - int m_OutputNumberOfEmptyCells{}; + int m_OutputNumberOfEmptyCells{}; SizeValueType m_VectorDimension{}; SizeValueType m_NumberOfCodewords{}; SizeValueType m_CurrentNumberOfCodewords{}; CodebookMatrixOfIntegerType m_CodewordHistogram{}; - CodebookMatrixOfDoubleType m_CodewordDistortion{}; + CodebookMatrixOfDoubleType m_CodewordDistortion{}; }; // class ImageKmeansModelEstimator } // end namespace itk diff --git a/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.hxx b/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.hxx index cee3a6410ff..988c7056186 100644 --- a/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.hxx +++ b/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.hxx @@ -352,7 +352,7 @@ ImageKmeansModelEstimator::WithCodebookUseGLA( for (unsigned int n = 0; n < m_CurrentNumberOfCodewords - emptycells; ++n) { double tempdistortion = 0.0; - int bestcodeword = 0; + int bestcodeword = 0; for (unsigned int i = 0; i < m_NumberOfCodewords; ++i) { if ((m_CodewordDistortion[i][0] >= tempdistortion) && (m_CodewordHistogram[i][0] > 0)) @@ -411,7 +411,7 @@ ImageKmeansModelEstimator::NearestNeighborSear // Declare the iterators for the image and the codebook const InputImageConstPointer inputImage = this->GetInputImage(); - InputImageConstIterator inputImageIt(inputImage, inputImage->GetBufferedRegion()); + InputImageConstIterator inputImageIt(inputImage, inputImage->GetBufferedRegion()); inputImageIt.GoToBegin(); // Calculate the number of vectors in the input data set @@ -432,7 +432,7 @@ ImageKmeansModelEstimator::NearestNeighborSear { // Keep convention that ties go to lower index double bestdistortion = m_DoubleMaximum; - int bestcodeword = 0; + int bestcodeword = 0; for (unsigned int i = 0; i < m_CurrentNumberOfCodewords; ++i) { @@ -536,7 +536,7 @@ ImageKmeansModelEstimator::SplitCodewords(int template void ImageKmeansModelEstimator::Perturb(double * oldCodeword, - int scale, + int scale, double * newCodeword) { const double addoffset = m_OffsetAdd / std::pow(2.0, static_cast(scale)); diff --git a/Modules/Segmentation/Classifiers/include/itkScalarImageKmeansImageFilter.hxx b/Modules/Segmentation/Classifiers/include/itkScalarImageKmeansImageFilter.hxx index ca068e22357..63ff3ba3e91 100644 --- a/Modules/Segmentation/Classifiers/include/itkScalarImageKmeansImageFilter.hxx +++ b/Modules/Segmentation/Classifiers/include/itkScalarImageKmeansImageFilter.hxx @@ -120,7 +120,7 @@ ScalarImageKmeansImageFilter::GenerateData() labelInterval = (NumericTraits::max() / numberOfClasses) - 1; } - unsigned int label = 0; + unsigned int label = 0; MembershipFunctionVectorType membershipFunctions; for (unsigned int k = 0; k < numberOfClasses; ++k) @@ -128,7 +128,7 @@ ScalarImageKmeansImageFilter::GenerateData() classLabels[k] = label; label += labelInterval; const MembershipFunctionPointer membershipFunction = MembershipFunctionType::New(); - MembershipFunctionOriginType origin(adaptor->GetMeasurementVectorSize()); + MembershipFunctionOriginType origin(adaptor->GetMeasurementVectorSize()); origin[0] = this->m_FinalMeans[k]; // A scalar image has a MeasurementVector // of dimension 1 membershipFunction->SetCentroid(origin); @@ -174,7 +174,7 @@ ScalarImageKmeansImageFilter::GenerateData() using LabelIterator = typename ClassifierOutputType::ConstIterator; - LabelIterator iter = membershipSample->Begin(); + LabelIterator iter = membershipSample->Begin(); const LabelIterator end = membershipSample->End(); while (iter != end) diff --git a/Modules/Segmentation/Classifiers/test/itkBayesianClassifierImageFilterTest.cxx b/Modules/Segmentation/Classifiers/test/itkBayesianClassifierImageFilterTest.cxx index 9daf4cb5ff3..cdc145e967e 100644 --- a/Modules/Segmentation/Classifiers/test/itkBayesianClassifierImageFilterTest.cxx +++ b/Modules/Segmentation/Classifiers/test/itkBayesianClassifierImageFilterTest.cxx @@ -32,9 +32,9 @@ template int TestBayesianClassifierImageFilterWithNoPriors(typename TInputImage::Pointer image, - unsigned int numberOfClasses, - unsigned int numberOfSmoothingIterations, - char * outputFilename) + unsigned int numberOfClasses, + unsigned int numberOfSmoothingIterations, + char * outputFilename) { using BayesianClassifierInitializerType = TBayesianClassifierInitializer; using BayesianClassifierFilterType = TBayesianClassifierFilter; @@ -98,11 +98,11 @@ TestBayesianClassifierImageFilterWithNoPriors(typename TInputImage::Pointer imag template int -TestBayesianClassifierImageFilterWithPriors(typename TInputImage::Pointer image, +TestBayesianClassifierImageFilterWithPriors(typename TInputImage::Pointer image, typename TBayesianClassifierFilter::PriorsImageType::Pointer priorsImage, unsigned int numberOfClasses, unsigned int numberOfSmoothingIterations, - char * outputFilename) + char * outputFilename) { using BayesianClassifierInitializerType = TBayesianClassifierInitializer; using BayesianClassifierFilterType = TBayesianClassifierFilter; @@ -199,10 +199,10 @@ itkBayesianClassifierImageFilterTest(int argc, char * argv[]) const ReaderType::OutputImageType::Pointer inputImage = reader->GetOutput(); - char * outputFilename = argv[2]; + char * outputFilename = argv[2]; const unsigned int numberOfClasses = std::stoi(argv[3]); const unsigned int numberOfSmoothingIterations = std::stoi(argv[4]); - const bool testPriors = std::stoi(argv[5]); + const bool testPriors = std::stoi(argv[5]); using LabelType = unsigned char; diff --git a/Modules/Segmentation/Classifiers/test/itkImageClassifierFilterTest.cxx b/Modules/Segmentation/Classifiers/test/itkImageClassifierFilterTest.cxx index 76559bfd9ba..e9e1056a21f 100644 --- a/Modules/Segmentation/Classifiers/test/itkImageClassifierFilterTest.cxx +++ b/Modules/Segmentation/Classifiers/test/itkImageClassifierFilterTest.cxx @@ -58,7 +58,7 @@ itkImageClassifierFilterTest(int argc, char * argv[]) auto image = InputImageType::New(); InputImageType::IndexType start; - InputImageType::SizeType size; + InputImageType::SizeType size; start.Fill(0); size.Fill(512); @@ -73,7 +73,7 @@ itkImageClassifierFilterTest(int argc, char * argv[]) constexpr double standardDeviation = 5.0; InputImageType::IndexType index; - const unsigned int halfSize = size[1] / 2; + const unsigned int halfSize = size[1] / 2; for (unsigned int y = 0; y < halfSize; ++y) { @@ -119,7 +119,7 @@ itkImageClassifierFilterTest(int argc, char * argv[]) /* Preparing the gaussian mixture components */ using ParametersType = itk::Array; std::vector initialParameters(numberOfClasses); - ParametersType params(2); + ParametersType params(2); params[0] = 8.0; params[1] = 0.1; initialParameters[0] = params; @@ -210,7 +210,7 @@ itkImageClassifierFilterTest(int argc, char * argv[]) while (functionIter != end) { const ImageClassifierFilterType::MembershipFunctionPointer membershipFunction = *functionIter; - const auto * gaussianMemberShpFunction = + const auto * gaussianMemberShpFunction = dynamic_cast(membershipFunction.GetPointer()); std::cout << "\tMembership function:\t " << counter << std::endl; std::cout << "\t\tMean=" << gaussianMemberShpFunction->GetMean() << std::endl; diff --git a/Modules/Segmentation/Classifiers/test/itkKmeansModelEstimatorTest.cxx b/Modules/Segmentation/Classifiers/test/itkKmeansModelEstimatorTest.cxx index 307bc03e7bf..d5acecbd654 100644 --- a/Modules/Segmentation/Classifiers/test/itkKmeansModelEstimatorTest.cxx +++ b/Modules/Segmentation/Classifiers/test/itkKmeansModelEstimatorTest.cxx @@ -67,7 +67,7 @@ itkKmeansModelEstimatorTest(int, char *[]) constexpr VecImageType::SizeType vecImgSize = { { IMGWIDTH, IMGHEIGHT, NFRAMES } }; constexpr VecImageType::IndexType index{}; - VecImageType::RegionType region; + VecImageType::RegionType region; region.SetSize(vecImgSize); region.SetIndex(index); @@ -250,8 +250,8 @@ itkKmeansModelEstimatorTest(int, char *[]) vnl_vector kmeansResultForClass; vnl_vector referenceCodebookForClass; vnl_vector errorForClass; - double error = 0; - double meanCDBKvalue = 0; + double error = 0; + double meanCDBKvalue = 0; for (unsigned int classIndex = 0; classIndex < membershipFunctions.size(); ++classIndex) { @@ -301,7 +301,7 @@ itkKmeansModelEstimatorTest(int, char *[]) // Testing the distance of the first pixel to the centroids; identify the class // closest to the fist pixel. unsigned int minidx = 0; - double mindist = 99999999; + double mindist = 99999999; for (unsigned int idx = 0; idx < membershipFunctions.size(); ++idx) { const double classdist = membershipFunctions[idx]->Evaluate(outIt.Get()); diff --git a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest2.cxx b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest2.cxx index 3f043c18ab3..8266ee0f03e 100644 --- a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest2.cxx +++ b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest2.cxx @@ -127,8 +127,8 @@ itkSampleClassifierFilterTest2(int, char *[]) MeasurementVectorType mv; itk::NumericTraits::SetLength(mv, numberOfComponents); - double mean = mean1[0]; - double standardDeviation = std::sqrt(covariance1[0][0]); + double mean = mean1[0]; + double standardDeviation = std::sqrt(covariance1[0][0]); constexpr unsigned int numberOfSampleEachClass = 10; for (unsigned int i = 0; i < numberOfSampleEachClass; ++i) { @@ -158,7 +158,7 @@ itkSampleClassifierFilterTest2(int, char *[]) } // Check if the measurement vectors are correctly labelled. - const FilterType::MembershipSampleType * membershipSample = filter->GetOutput(); + const FilterType::MembershipSampleType * membershipSample = filter->GetOutput(); FilterType::MembershipSampleType::ConstIterator iter = membershipSample->Begin(); unsigned int sampleCounter = 0; diff --git a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest3.cxx b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest3.cxx index 98fc675fe94..3d823e8cf2e 100644 --- a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest3.cxx +++ b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest3.cxx @@ -65,8 +65,8 @@ itkSampleClassifierFilterTest3(int, char *[]) MeasurementVectorType mv; itk::NumericTraits::SetLength(mv, numberOfComponents); - double mean = mean1[0]; - double standardDeviation = 0.1; + double mean = mean1[0]; + double standardDeviation = 0.1; constexpr unsigned int numberOfSampleEachClass = 10; // Add sample from the first gaussian @@ -145,7 +145,7 @@ itkSampleClassifierFilterTest3(int, char *[]) while (functionIter != end) { const FilterType::MembershipFunctionPointer membershipFunction = *functionIter; - const auto * distanceMemberShpFunction = + const auto * distanceMemberShpFunction = dynamic_cast(membershipFunction.GetPointer()); std::cout << "Centroid of the " << counter << " membership function " << distanceMemberShpFunction->GetCentroid() << std::endl; @@ -207,7 +207,7 @@ itkSampleClassifierFilterTest3(int, char *[]) // Check if the measurement vectors are correctly labelled. - const FilterType::MembershipSampleType * membershipSample = filter->GetOutput(); + const FilterType::MembershipSampleType * membershipSample = filter->GetOutput(); FilterType::MembershipSampleType::ConstIterator iter = membershipSample->Begin(); unsigned int sampleCounter = 0; diff --git a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest4.cxx b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest4.cxx index ad835dc9e29..b507a3acea8 100644 --- a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest4.cxx +++ b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest4.cxx @@ -61,9 +61,9 @@ itkSampleClassifierFilterTest4(int, char *[]) mean2, numberOfComponents); mean2[0] = 200.5; - MeasurementVectorType mv; - double mean = mean1[0]; - double standardDeviation = 0.1; + MeasurementVectorType mv; + double mean = mean1[0]; + double standardDeviation = 0.1; constexpr unsigned int numberOfSampleEachClass = 10; // Add sample from the first gaussian @@ -142,7 +142,7 @@ itkSampleClassifierFilterTest4(int, char *[]) while (functionIter != end) { const FilterType::MembershipFunctionPointer membershipFunction = *functionIter; - const auto * distanceMemberShpFunction = + const auto * distanceMemberShpFunction = dynamic_cast(membershipFunction.GetPointer()); std::cout << "Centroid of the " << counter << " membership function " << distanceMemberShpFunction->GetCentroid() << std::endl; @@ -170,7 +170,7 @@ itkSampleClassifierFilterTest4(int, char *[]) } // Check if the measurement vectors are correctly labelled. - const FilterType::MembershipSampleType * membershipSample = filter->GetOutput(); + const FilterType::MembershipSampleType * membershipSample = filter->GetOutput(); FilterType::MembershipSampleType::ConstIterator iter = membershipSample->Begin(); unsigned int sampleCounter = 0; diff --git a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest5.cxx b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest5.cxx index 4bb6b773723..79914f04261 100644 --- a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest5.cxx +++ b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest5.cxx @@ -65,8 +65,8 @@ itkSampleClassifierFilterTest5(int, char *[]) MeasurementVectorType mv; itk::NumericTraits::SetLength(mv, numberOfComponents); - double mean = mean1[0]; - double standardDeviation = 0.1; + double mean = mean1[0]; + double standardDeviation = 0.1; constexpr unsigned int numberOfSampleEachClass = 10; // Add sample from the first gaussian @@ -145,7 +145,7 @@ itkSampleClassifierFilterTest5(int, char *[]) while (functionIter != end) { const FilterType::MembershipFunctionPointer membershipFunction = *functionIter; - const auto * distanceMemberShpFunction = + const auto * distanceMemberShpFunction = dynamic_cast(membershipFunction.GetPointer()); std::cout << "Centroid of the " << counter << " membership function " << distanceMemberShpFunction->GetCentroid() << std::endl; @@ -173,7 +173,7 @@ itkSampleClassifierFilterTest5(int, char *[]) } // Check if the measurement vectors are correctly labelled. - const FilterType::MembershipSampleType * membershipSample = filter->GetOutput(); + const FilterType::MembershipSampleType * membershipSample = filter->GetOutput(); FilterType::MembershipSampleType::ConstIterator iter = membershipSample->Begin(); unsigned int sampleCounter = 0; diff --git a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest6.cxx b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest6.cxx index 05b8bf3743a..7d2d7375ab3 100644 --- a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest6.cxx +++ b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest6.cxx @@ -64,8 +64,8 @@ itkSampleClassifierFilterTest6(int, char *[]) MeasurementVectorType mv; itk::NumericTraits::SetLength(mv, numberOfComponents); - double mean = mean1[0]; - double standardDeviation = 0.1; + double mean = mean1[0]; + double standardDeviation = 0.1; constexpr unsigned int numberOfSampleEachClass = 10; // Add sample from the first gaussian @@ -144,7 +144,7 @@ itkSampleClassifierFilterTest6(int, char *[]) while (functionIter != end) { const FilterType::MembershipFunctionPointer membershipFunction = *functionIter; - const auto * distanceMemberShpFunction = + const auto * distanceMemberShpFunction = dynamic_cast(membershipFunction.GetPointer()); std::cout << "Centroid of the " << counter << " membership function " << distanceMemberShpFunction->GetCentroid() << std::endl; @@ -172,7 +172,7 @@ itkSampleClassifierFilterTest6(int, char *[]) } // Check if the measurement vectors are correctly labelled. - const FilterType::MembershipSampleType * membershipSample = filter->GetOutput(); + const FilterType::MembershipSampleType * membershipSample = filter->GetOutput(); FilterType::MembershipSampleType::ConstIterator iter = membershipSample->Begin(); unsigned int sampleCounter = 0; diff --git a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest7.cxx b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest7.cxx index b39a89d5d89..d7e2d93301f 100644 --- a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest7.cxx +++ b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest7.cxx @@ -43,12 +43,12 @@ itkSampleClassifierFilterTest7(int argc, char * argv[]) return EXIT_FAILURE; } - constexpr int maximumIteration = 200; - constexpr double minStandardDeviation = 28.54746; + constexpr int maximumIteration = 200; + constexpr double minStandardDeviation = 28.54746; constexpr unsigned int numberOfClasses = 2; using ParametersType = itk::Array; std::vector trueParameters(numberOfClasses); - ParametersType params(6); + ParametersType params(6); params[0] = 99.261; params[1] = 100.078; params[2] = 814.95741; @@ -92,16 +92,16 @@ itkSampleClassifierFilterTest7(int argc, char * argv[]) initialProportions[1] = 0.5; /* Loading point data */ - auto pointSet = PointSetType::New(); + auto pointSet = PointSetType::New(); const PointSetType::PointsContainerPointer pointsContainer = PointSetType::PointsContainer::New(); - constexpr int dataSizeBig = 2000; + constexpr int dataSizeBig = 2000; pointsContainer->Reserve(dataSizeBig); pointSet->SetPoints(pointsContainer); PointSetType::PointsContainerIterator p_iter = pointsContainer->Begin(); - PointSetType::PointType point; + PointSetType::PointType point; - char * const dataFileName = argv[1]; + char * const dataFileName = argv[1]; std::ifstream dataStream(dataFileName); if (!dataStream) { @@ -161,7 +161,7 @@ itkSampleClassifierFilterTest7(int argc, char * argv[]) std::cout << " " << (components[i])->GetFullParameters() << std::endl; std::cout << " Proportion: "; std::cout << " " << (estimator->GetProportions())[i] << std::endl; - double displacement = 0.0; + double displacement = 0.0; const unsigned int measurementVectorSize = sample->GetMeasurementVectorSize(); for (unsigned int j = 0; j < measurementVectorSize; ++j) { @@ -221,7 +221,7 @@ itkSampleClassifierFilterTest7(int argc, char * argv[]) while (functionIter != end) { const FilterType::MembershipFunctionPointer membershipFunction = *functionIter; - const auto * gaussianMemberShpFunction = + const auto * gaussianMemberShpFunction = dynamic_cast(membershipFunction.GetPointer()); std::cout << "\tMembership function:\t " << counter << std::endl; std::cout << "\t\tMean=" << gaussianMemberShpFunction->GetMean() << std::endl; @@ -241,7 +241,7 @@ itkSampleClassifierFilterTest7(int argc, char * argv[]) std::cout << "Membership function: \t" << i << '\t' << weightsArray[i] << std::endl; } - char * targetFileName = argv[2]; + char * targetFileName = argv[2]; std::ifstream dataTargetStream(targetFileName); if (!dataTargetStream) { @@ -249,9 +249,9 @@ itkSampleClassifierFilterTest7(int argc, char * argv[]) return EXIT_FAILURE; } - auto pointSet2 = PointSetType::New(); + auto pointSet2 = PointSetType::New(); const PointSetType::PointsContainerPointer pointsContainer2 = PointSetType::PointsContainer::New(); - constexpr int dataSizeSmall = 200; + constexpr int dataSizeSmall = 200; pointsContainer2->Reserve(dataSizeSmall); pointSet2->SetPoints(pointsContainer2); @@ -286,7 +286,7 @@ itkSampleClassifierFilterTest7(int argc, char * argv[]) // Check if the measurement vectors are correctly labelled. - const FilterType::MembershipSampleType * membershipSample = filter->GetOutput(); + const FilterType::MembershipSampleType * membershipSample = filter->GetOutput(); FilterType::MembershipSampleType::ConstIterator iter = membershipSample->Begin(); unsigned int sampleCounter = 0; diff --git a/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilter3DTest.cxx b/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilter3DTest.cxx index ef36b420aff..71e2b748df8 100644 --- a/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilter3DTest.cxx +++ b/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilter3DTest.cxx @@ -42,7 +42,7 @@ itkScalarImageKmeansImageFilter3DTest(int argc, char * argv[]) const std::string inputVolume(argv[1]); const std::string input3DSkullStripVolume(argv[2]); const std::string outputLabelMapVolume(argv[3]); - constexpr float numberOfStdDeviations = 10.0; + constexpr float numberOfStdDeviations = 10.0; const bool debug = true; @@ -112,8 +112,8 @@ itkScalarImageKmeansImageFilter3DTest(int argc, char * argv[]) statisticsFilter->SetLabelInput(maskReader->GetOutput()); statisticsFilter->Update(); - const auto imageMin = static_cast(statisticsFilter->GetMinimum(6)); - const auto imageMax = static_cast(statisticsFilter->GetMaximum(6)); + const auto imageMin = static_cast(statisticsFilter->GetMinimum(6)); + const auto imageMax = static_cast(statisticsFilter->GetMaximum(6)); const StatisticRealType imageMean = statisticsFilter->GetMean(6); const StatisticRealType imageSigma = statisticsFilter->GetSigma(6); @@ -130,8 +130,8 @@ itkScalarImageKmeansImageFilter3DTest(int argc, char * argv[]) nonBrainStatisticsFilter->SetLabelInput(nonBrainMaskFilter->GetOutput()); nonBrainStatisticsFilter->Update(); - const auto nonBrainImageMin = static_cast(nonBrainStatisticsFilter->GetMinimum(1)); - const auto nonBrainImageMax = static_cast(nonBrainStatisticsFilter->GetMaximum(1)); + const auto nonBrainImageMin = static_cast(nonBrainStatisticsFilter->GetMinimum(1)); + const auto nonBrainImageMax = static_cast(nonBrainStatisticsFilter->GetMaximum(1)); const StatisticRealType nonBrainImageMean = nonBrainStatisticsFilter->GetMean(1); const StatisticRealType nonBrainImageSigma = nonBrainStatisticsFilter->GetSigma(1); diff --git a/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilterTest.cxx b/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilterTest.cxx index 4937b0ce102..398f65be64c 100644 --- a/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilterTest.cxx +++ b/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilterTest.cxx @@ -60,9 +60,9 @@ itkScalarImageKmeansImageFilterTest(int argc, char * argv[]) auto useNonContiguousLabels = static_cast(std::stoi(argv[3])); ITK_TEST_SET_GET_BOOLEAN(kmeansFilter, UseNonContiguousLabels, useNonContiguousLabels); - typename KMeansFilterType::ImageRegionType region; + typename KMeansFilterType::ImageRegionType region; constexpr typename KMeansFilterType::ImageRegionType::IndexType index = { { 50, 50 } }; - constexpr typename KMeansFilterType::ImageRegionType::SizeType size = { { 80, 100 } }; + constexpr typename KMeansFilterType::ImageRegionType::SizeType size = { { 80, 100 } }; region.SetIndex(index); region.SetSize(size); kmeansFilter->SetImageRegion(region); diff --git a/Modules/Segmentation/Classifiers/test/itkSupervisedImageClassifierTest.cxx b/Modules/Segmentation/Classifiers/test/itkSupervisedImageClassifierTest.cxx index fc5cb6070d3..e856c07dc5f 100644 --- a/Modules/Segmentation/Classifiers/test/itkSupervisedImageClassifierTest.cxx +++ b/Modules/Segmentation/Classifiers/test/itkSupervisedImageClassifierTest.cxx @@ -72,7 +72,7 @@ itkSupervisedImageClassifierTest(int, char *[]) constexpr VecImageType::SizeType vecImgSize = { { IMGWIDTH, IMGHEIGHT, NFRAMES } }; constexpr VecImageType::IndexType index{}; - VecImageType::RegionType region; + VecImageType::RegionType region; region.SetSize(vecImgSize); region.SetIndex(index); @@ -330,7 +330,7 @@ itkSupervisedImageClassifierTest(int, char *[]) using ProgressType = SupervisedImageClassifierTest::ShowProgressObject; - ProgressType progressWatch(applyClassifier); + ProgressType progressWatch(applyClassifier); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ProgressType::ShowProgress); applyClassifier->AddObserver(itk::ProgressEvent(), command); diff --git a/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentFunctorImageFilter.hxx b/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentFunctorImageFilter.hxx index 7a4dc934d09..ae33f08f725 100644 --- a/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentFunctorImageFilter.hxx +++ b/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentFunctorImageFilter.hxx @@ -33,7 +33,7 @@ ConnectedComponentFunctorImageFilterAllocateOutputs(); - constexpr OutputPixelType maxPossibleLabel = NumericTraits::max(); + constexpr OutputPixelType maxPossibleLabel = NumericTraits::max(); const typename TOutputImage::Pointer output = this->GetOutput(); output->FillBuffer(maxPossibleLabel); @@ -50,8 +50,8 @@ ConnectedComponentFunctorImageFilterGetInput(); - InputNeighborhoodIteratorType init(kernelRadius, input, output->GetRequestedRegion()); - OutputNeighborhoodIteratorType onit(kernelRadius, output, output->GetRequestedRegion()); + InputNeighborhoodIteratorType init(kernelRadius, input, output->GetRequestedRegion()); + OutputNeighborhoodIteratorType onit(kernelRadius, output, output->GetRequestedRegion()); onit.OverrideBoundaryCondition(&BC); // assign the boundary condition // only activate the indices that are "previous" to the current @@ -129,8 +129,8 @@ ConnectedComponentFunctorImageFilter::GenerateDa this->AllocateOutputs(); this->SetupLineOffsets(false); const typename TInputImage::ConstPointer input = this->GetInput(); - const typename TMaskImage::ConstPointer mask = this->GetMaskImage(); + const typename TMaskImage::ConstPointer mask = this->GetMaskImage(); using MaskFilterType = MaskImageFilter; auto maskFilter = MaskFilterType::New(); @@ -92,7 +92,7 @@ ConnectedComponentImageFilter::GenerateDa } const typename OutputImageType::RegionType & requestedRegion = this->GetOutput()->GetRequestedRegion(); - const typename OutputImageType::SizeType & requestedSize = requestedRegion.GetSize(); + const typename OutputImageType::SizeType & requestedSize = requestedRegion.GetSize(); // set up the vars used in the threads const SizeValueType pixelcount = requestedRegion.GetNumberOfPixels(); @@ -167,7 +167,7 @@ ConnectedComponentImageFilter::DynamicThr const RegionType & outputRegionForThread) { const WorkUnitData workUnitData = this->CreateWorkUnitData(outputRegionForThread); - SizeValueType lineId = workUnitData.firstLine; + SizeValueType lineId = workUnitData.firstLine; SizeValueType nbOfLabels = 0; for (ImageScanlineConstIterator inLineIt(m_Input, outputRegionForThread); !inLineIt.IsAtEnd(); inLineIt.NextLine()) @@ -221,7 +221,7 @@ ConnectedComponentImageFilter::ThreadedWr // make much difference in practice. // Note - this is unnecessary if AllocateOutputs initializes to zero - OutputImageType * output = this->GetOutput(); + OutputImageType * output = this->GetOutput(); ImageRegionIterator oit(output, outputRegionForThread); ImageRegionIterator fstart = oit; ImageRegionIterator fend = oit; @@ -233,7 +233,7 @@ ConnectedComponentImageFilter::ThreadedWr { for (auto cIt = this->m_LineMap[thisIdx].begin(); cIt != this->m_LineMap[thisIdx].end(); ++cIt) { - const SizeValueType Ilab = this->LookupSet(cIt->label); + const SizeValueType Ilab = this->LookupSet(cIt->label); const OutputPixelType lab = this->m_Consecutive[Ilab]; oit.SetIndex(cIt->where); // initialize the non labelled pixels diff --git a/Modules/Segmentation/ConnectedComponents/include/itkHardConnectedComponentImageFilter.hxx b/Modules/Segmentation/ConnectedComponents/include/itkHardConnectedComponentImageFilter.hxx index a925554321c..37e8ee8ca21 100644 --- a/Modules/Segmentation/ConnectedComponents/include/itkHardConnectedComponentImageFilter.hxx +++ b/Modules/Segmentation/ConnectedComponents/include/itkHardConnectedComponentImageFilter.hxx @@ -31,20 +31,20 @@ void HardConnectedComponentImageFilter::GenerateData() { unsigned int i; - int p; - int q; - int m; + int p; + int q; + int m; using LabelType = unsigned short; const auto equivalenceTable = make_unique_for_overwrite(NumericTraits::max()); - LabelType label = 0; - LabelType maxLabel = 0; - SizeType size; + LabelType label = 0; + LabelType maxLabel = 0; + SizeType size; typename ListType::iterator iter; - TOutputImage * output = this->GetOutput(); + TOutputImage * output = this->GetOutput(); const TInputImage * input = this->GetInput(); size = input->GetLargestPossibleRegion().GetSize(); @@ -53,7 +53,7 @@ HardConnectedComponentImageFilter::GenerateData() output->Allocate(); ImageRegionConstIterator it(input, input->GetRequestedRegion()); - ImageRegionIterator ot(output, output->GetRequestedRegion()); + ImageRegionIterator ot(output, output->GetRequestedRegion()); ProgressReporter progress(this, 0, output->GetRequestedRegion().GetNumberOfPixels()); it.GoToBegin(); diff --git a/Modules/Segmentation/ConnectedComponents/include/itkRelabelComponentImageFilter.h b/Modules/Segmentation/ConnectedComponents/include/itkRelabelComponentImageFilter.h index c5663d17f51..42c2aed552d 100644 --- a/Modules/Segmentation/ConnectedComponents/include/itkRelabelComponentImageFilter.h +++ b/Modules/Segmentation/ConnectedComponents/include/itkRelabelComponentImageFilter.h @@ -281,18 +281,18 @@ class ITK_TEMPLATE_EXPORT RelabelComponentImageFilter : public InPlaceImageFilte }; private: - SizeValueType m_NumberOfObjects{ 0 }; - SizeValueType m_NumberOfObjectsToPrint{ 10 }; - SizeValueType m_OriginalNumberOfObjects{ 0 }; + SizeValueType m_NumberOfObjects{ 0 }; + SizeValueType m_NumberOfObjectsToPrint{ 10 }; + SizeValueType m_OriginalNumberOfObjects{ 0 }; ObjectSizeType m_MinimumObjectSize{ 0 }; - bool m_SortByObjectSize{ true }; + bool m_SortByObjectSize{ true }; std::mutex m_Mutex{}; using MapType = std::map; MapType m_SizeMap{}; - ObjectSizeInPixelsContainerType m_SizeOfObjectsInPixels{}; + ObjectSizeInPixelsContainerType m_SizeOfObjectsInPixels{}; ObjectSizeInPhysicalUnitsContainerType m_SizeOfObjectsInPhysicalUnits{}; }; } // end namespace itk diff --git a/Modules/Segmentation/ConnectedComponents/include/itkRelabelComponentImageFilter.hxx b/Modules/Segmentation/ConnectedComponents/include/itkRelabelComponentImageFilter.hxx index bc4dd196fac..ffdf2fc1bda 100644 --- a/Modules/Segmentation/ConnectedComponents/include/itkRelabelComponentImageFilter.hxx +++ b/Modules/Segmentation/ConnectedComponents/include/itkRelabelComponentImageFilter.hxx @@ -62,7 +62,7 @@ RelabelComponentImageFilter::ParallelComputeLabels(co // walk the input ImageScanlineConstIterator it(this->GetInput(), inputRegionForThread); - auto inputRequestedRegion = this->GetInput()->GetRequestedRegion(); + auto inputRequestedRegion = this->GetInput()->GetRequestedRegion(); TotalProgressReporter report(this, inputRequestedRegion.GetNumberOfPixels(), 100, 0.5f); MapType localSizeMap; @@ -128,7 +128,7 @@ RelabelComponentImageFilter::GenerateData() // Get the input and the output const TInputImage * input = this->GetInput(); - TOutputImage * output = this->GetOutput(); + TOutputImage * output = this->GetOutput(); // Calculate the size of pixel float physicalPixelSize = 1.0; @@ -173,7 +173,7 @@ RelabelComponentImageFilter::GenerateData() m_OriginalNumberOfObjects = sizeVector.size(); m_SizeOfObjectsInPixels.clear(); m_SizeOfObjectsInPixels.resize(m_NumberOfObjects); - SizeValueType NumberOfObjectsRemoved = 0; + SizeValueType NumberOfObjectsRemoved = 0; OutputPixelType outputLabel = 0; for (const auto & sizeVectorPair : sizeVector) { @@ -230,10 +230,10 @@ RelabelComponentImageFilter::GenerateData() this->GetMultiThreader()->template ParallelizeImageRegion( output->GetRequestedRegion(), [this, &relabelMap](const RegionType & outputRegionForThread) { - auto outputRequestedRegion = this->GetOutput()->GetRequestedRegion(); + auto outputRequestedRegion = this->GetOutput()->GetRequestedRegion(); TotalProgressReporter report(this, outputRequestedRegion.GetNumberOfPixels(), 100, 0.5f); - ImageScanlineIterator oit(this->GetOutput(), outputRegionForThread); + ImageScanlineIterator oit(this->GetOutput(), outputRegionForThread); ImageScanlineConstIterator it(this->GetInput(), outputRegionForThread); auto mapIt = relabelMap.cbegin(); @@ -278,8 +278,8 @@ RelabelComponentImageFilter::PrintSelf(std::ostream & os << indent << "SortByObjectSize: " << m_SortByObjectSize << std::endl; typename ObjectSizeInPixelsContainerType::const_iterator it; - ObjectSizeInPhysicalUnitsContainerType::const_iterator fit; - SizeValueType i; + ObjectSizeInPhysicalUnitsContainerType::const_iterator fit; + SizeValueType i; // limit the number of objects to print const SizeValueType numPrint = std::min(m_NumberOfObjectsToPrint, m_SizeOfObjectsInPixels.size()); diff --git a/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.h b/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.h index 646a05e75c9..21bfaad2f8b 100644 --- a/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.h +++ b/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.h @@ -225,7 +225,7 @@ class ITK_TEMPLATE_EXPORT ThresholdMaximumConnectedComponentsImageFilter PixelType m_UpperBoundary{}; // Filter variables - PixelType m_ThresholdValue{}; + PixelType m_ThresholdValue{}; SizeValueType m_NumberOfObjects{}; }; } // end namespace itk diff --git a/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.hxx b/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.hxx index 311740b0772..30851f3de38 100644 --- a/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.hxx +++ b/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.hxx @@ -179,7 +179,7 @@ ThresholdMaximumConnectedComponentsImageFilter::Gener template void ThresholdMaximumConnectedComponentsImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterBackgroundTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterBackgroundTest.cxx index ab890a7ef8a..dfef0ad3e08 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterBackgroundTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterBackgroundTest.cxx @@ -85,7 +85,7 @@ itkConnectedComponentImageFilterBackgroundTest(int argc, char * argv[]) IteratorType iterator(output, output->GetLargestPossibleRegion()); while (!iterator.IsAtEnd()) { - const PixelType value = iterator.Get(); + const PixelType value = iterator.Get(); const ImageType::IndexType index = iterator.GetIndex(); if (index == index1 || index == index2) { diff --git a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTest.cxx index 4cb4afb5fc8..a793080860d 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTest.cxx @@ -135,7 +135,7 @@ itkConnectedComponentImageFilterTest(int argc, char * argv[]) } itk::ImageRegionIterator it(relabel->GetOutput(), relabel->GetOutput()->GetBufferedRegion()); - itk::ImageRegionIterator cit(colored, colored->GetBufferedRegion()); + itk::ImageRegionIterator cit(colored, colored->GetBufferedRegion()); while (!it.IsAtEnd()) { diff --git a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTestRGB.cxx b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTestRGB.cxx index de03f536ba6..7ab0c1e8748 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTestRGB.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkConnectedComponentImageFilterTestRGB.cxx @@ -101,7 +101,7 @@ itkConnectedComponentImageFilterTestRGB(int argc, char * argv[]) const unsigned short numObjects = relabel->GetNumberOfObjects(); std::vector colormap; - RGBPixelType px; + RGBPixelType px; colormap.resize(numObjects + 1); vnl_sample_reseed(1031571); for (auto & i : colormap) @@ -114,7 +114,7 @@ itkConnectedComponentImageFilterTestRGB(int argc, char * argv[]) } itk::ImageRegionIterator it(relabel->GetOutput(), relabel->GetOutput()->GetBufferedRegion()); - itk::ImageRegionIterator cit(colored, colored->GetBufferedRegion()); + itk::ImageRegionIterator cit(colored, colored->GetBufferedRegion()); while (!it.IsAtEnd()) { diff --git a/Modules/Segmentation/ConnectedComponents/test/itkHardConnectedComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkHardConnectedComponentImageFilterTest.cxx index 00213306b11..f13d2ea4963 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkHardConnectedComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkHardConnectedComponentImageFilterTest.cxx @@ -42,8 +42,8 @@ DoIt(int argc, char * argv[], const std::string pixelType) using OutputImageType = itk::Image; using IndexType = typename InputImageType::IndexType; - auto inputimg = InputImageType::New(); - constexpr IndexType index{}; + auto inputimg = InputImageType::New(); + constexpr IndexType index{}; typename InputImageType::SizeType size; size[0] = width; size[1] = height; diff --git a/Modules/Segmentation/ConnectedComponents/test/itkMaskConnectedComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkMaskConnectedComponentImageFilterTest.cxx index 51e337688fe..bca0ab73102 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkMaskConnectedComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkMaskConnectedComponentImageFilterTest.cxx @@ -87,7 +87,7 @@ itkMaskConnectedComponentImageFilterTest(int argc, char * argv[]) mask->FillBuffer(MaskPixelType{}); const MaskImageType::RegionType maskRegion = mask->GetLargestPossibleRegion(); - MaskImageType::SizeType maskSize = maskRegion.GetSize(); + MaskImageType::SizeType maskSize = maskRegion.GetSize(); // use upper left corner MaskImageType::SizeType size; @@ -96,7 +96,7 @@ itkMaskConnectedComponentImageFilterTest(int argc, char * argv[]) size[i] = static_cast(0.375 * maskSize[i]); } - MaskImageType::IndexType index{}; + MaskImageType::IndexType index{}; MaskImageType::RegionType region; region.SetIndex(index); region.SetSize(size); @@ -173,7 +173,7 @@ itkMaskConnectedComponentImageFilterTest(int argc, char * argv[]) } itk::ImageRegionIterator it(relabel->GetOutput(), relabel->GetOutput()->GetBufferedRegion()); - itk::ImageRegionIterator cit(colored, colored->GetBufferedRegion()); + itk::ImageRegionIterator cit(colored, colored->GetBufferedRegion()); while (!it.IsAtEnd()) { diff --git a/Modules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterGTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterGTest.cxx index 390e05970b3..ab8e755a31f 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterGTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterGTest.cxx @@ -137,7 +137,7 @@ TEST(RelabelComponentImageFilter, big_zero) using PixelType = unsigned short; using ImageType = itk::Image; - auto image = ImageType::New(); + auto image = ImageType::New(); typename ImageType::RegionType region; region.SetSize({ { 512, 512, 512 } }); image->SetRegions(region); diff --git a/Modules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterTest.cxx index 593ff63983c..e771f4b0ed6 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterTest.cxx @@ -69,7 +69,7 @@ itkRelabelComponentImageFilterTest(int argc, char * argv[]) using HistogramType = itk::Statistics::Histogram; - constexpr int NumBins = 13; + constexpr int NumBins = 13; constexpr RealType LowerBound = 51.0; constexpr RealType UpperBound = 252.0; @@ -176,7 +176,7 @@ itkRelabelComponentImageFilterTest(int argc, char * argv[]) try { HistogramType::Pointer histogram; - unsigned long printNum = statistics->GetNumberOfLabels(); + unsigned long printNum = statistics->GetNumberOfLabels(); if (printNum > 10) { printNum = 10; diff --git a/Modules/Segmentation/ConnectedComponents/test/itkScalarConnectedComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkScalarConnectedComponentImageFilterTest.cxx index ec8ac711883..72d146b5e32 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkScalarConnectedComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkScalarConnectedComponentImageFilterTest.cxx @@ -74,11 +74,11 @@ itkScalarConnectedComponentImageFilterTest(int argc, char * argv[]) mask->FillBuffer(MaskPixelType{}); const MaskImageType::RegionType maskRegion = mask->GetLargestPossibleRegion(); - MaskImageType::SizeType maskSize = maskRegion.GetSize(); + MaskImageType::SizeType maskSize = maskRegion.GetSize(); MaskImageType::RegionType region; - MaskImageType::SizeType size; - MaskImageType::IndexType index; + MaskImageType::SizeType size; + MaskImageType::IndexType index; // use upper left corner index.Fill(0); @@ -152,7 +152,7 @@ itkScalarConnectedComponentImageFilterTest(int argc, char * argv[]) const unsigned short numObjects = relabel->GetNumberOfObjects(); std::vector colormap; - RGBPixelType px; + RGBPixelType px; colormap.resize(numObjects + 1); const itk::Statistics::MersenneTwisterRandomVariateGenerator::Pointer rvgen = itk::Statistics::MersenneTwisterRandomVariateGenerator::GetInstance(); @@ -166,7 +166,7 @@ itkScalarConnectedComponentImageFilterTest(int argc, char * argv[]) } itk::ImageRegionIterator it(relabel->GetOutput(), relabel->GetOutput()->GetBufferedRegion()); - itk::ImageRegionIterator cit(colored, colored->GetBufferedRegion()); + itk::ImageRegionIterator cit(colored, colored->GetBufferedRegion()); while (!it.IsAtEnd()) { diff --git a/Modules/Segmentation/ConnectedComponents/test/itkVectorConnectedComponentImageFilterTest.cxx b/Modules/Segmentation/ConnectedComponents/test/itkVectorConnectedComponentImageFilterTest.cxx index c5bd7e616d8..925617e13f8 100644 --- a/Modules/Segmentation/ConnectedComponents/test/itkVectorConnectedComponentImageFilterTest.cxx +++ b/Modules/Segmentation/ConnectedComponents/test/itkVectorConnectedComponentImageFilterTest.cxx @@ -48,10 +48,10 @@ itkVectorConnectedComponentImageFilterTest(int argc, char * argv[]) using LabelImageType = itk::Image; // create an image of vectors - auto image = ImageType::New(); + auto image = ImageType::New(); ImageType::RegionType region; - auto size = ImageType::SizeType::Filled(100); - ImageType::IndexType index{}; + auto size = ImageType::SizeType::Filled(100); + ImageType::IndexType index{}; region.SetSize(size); region.SetIndex(index); diff --git a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DBalloonForceFilter.hxx b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DBalloonForceFilter.hxx index d4a9b169830..1f9db8af18e 100644 --- a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DBalloonForceFilter.hxx +++ b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DBalloonForceFilter.hxx @@ -53,7 +53,7 @@ DeformableSimplexMesh3DBalloonForceFilter::PrintSelf(st template void DeformableSimplexMesh3DBalloonForceFilter::ComputeExternalForce( - SimplexMeshGeometry * data, + SimplexMeshGeometry * data, const GradientImageType * gradientImage) { GradientIndexType coord; diff --git a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.hxx b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.hxx index 8925deabec8..8280e21b82e 100644 --- a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.hxx +++ b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.hxx @@ -108,14 +108,14 @@ DeformableSimplexMesh3DFilter::GenerateData() ++m_Step; } - const InputMeshType * inputMesh = this->GetInput(0); - const InputPointsContainer * points = inputMesh->GetPoints(); + const InputMeshType * inputMesh = this->GetInput(0); + const InputPointsContainer * points = inputMesh->GetPoints(); InputPointsContainerConstIterator pointItr = points->Begin(); while (pointItr != points->End()) { SimplexMeshGeometry * data; - const IdentifierType idx = pointItr.Index(); + const IdentifierType idx = pointItr.Index(); data = this->m_Data->GetElement(idx); delete data->neighborSet; data->neighborSet = nullptr; @@ -129,8 +129,8 @@ template void DeformableSimplexMesh3DFilter::Initialize() { - const InputMeshType * inputMesh = this->GetInput(0); - const InputPointsContainer * points = inputMesh->GetPoints(); + const InputMeshType * inputMesh = this->GetInput(0); + const InputPointsContainer * points = inputMesh->GetPoints(); InputPointsContainerConstIterator pointItr = points->Begin(); const GradientImageType * gradientImage = this->GetGradient(); @@ -166,7 +166,7 @@ DeformableSimplexMesh3DFilter::Initialize() while (pointItr != points->End()) { SimplexMeshGeometry * data; - const IdentifierType idx = pointItr.Index(); + const IdentifierType idx = pointItr.Index(); data = this->m_Data->GetElement(idx); data->pos = pointItr.Value(); @@ -180,7 +180,7 @@ DeformableSimplexMesh3DFilter::Initialize() // store neighbor set with a specific radius InputNeighbors * neighborsList = inputMesh->GetNeighbors(pointItr.Index(), m_Rigidity); - auto neighborIt = neighborsList->begin(); + auto neighborIt = neighborsList->begin(); auto * neighborSet = new NeighborSetType(); while (neighborIt != neighborsList->end()) @@ -215,10 +215,10 @@ template void DeformableSimplexMesh3DFilter::ComputeGeometry() { - const InputMeshType * inputMesh = this->GetInput(0); + const InputMeshType * inputMesh = this->GetInput(0); const InputPointsContainer * points = inputMesh->GetPoints(); - CovariantVectorType z{}; + CovariantVectorType z{}; typename GeometryMapType::Iterator dataIt = this->m_Data->Begin(); while (dataIt != this->m_Data->End()) { @@ -349,7 +349,7 @@ DeformableSimplexMesh3DFilter::ComputeInternalForce(Sim template void -DeformableSimplexMesh3DFilter::ComputeExternalForce(SimplexMeshGeometry * data, +DeformableSimplexMesh3DFilter::ComputeExternalForce(SimplexMeshGeometry * data, const GradientImageType * gradientImage) { GradientIndexType coord; @@ -511,7 +511,7 @@ bool DeformableSimplexMesh3DFilter::L_Func(const double r, const double d, const double phi, - double & output) + double & output) { const double r2 = r * r; const double d2 = d * d; @@ -539,7 +539,7 @@ DeformableSimplexMesh3DFilter::L_Func(const double r, template auto -DeformableSimplexMesh3DFilter::ComputeBarycentricCoordinates(PointType p, +DeformableSimplexMesh3DFilter::ComputeBarycentricCoordinates(PointType p, SimplexMeshGeometry * data) -> PointType { diff --git a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.hxx b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.hxx index 825d3936a43..47adf4e7df0 100644 --- a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.hxx +++ b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.hxx @@ -45,7 +45,7 @@ DeformableSimplexMesh3DGradientConstraintForceFilter:: template void DeformableSimplexMesh3DGradientConstraintForceFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { using namespace print_helper; @@ -109,10 +109,10 @@ DeformableSimplexMesh3DGradientConstraintForceFilter::S template double DeformableSimplexMesh3DGradientConstraintForceFilter::NextVoxel(const double * pp, - int * ic, - double * x, - double * y, - double * z) + int * ic, + double * x, + double * y, + double * z) { const double dp[3]{ pp[0], pp[1], pp[2] }; @@ -196,7 +196,7 @@ DeformableSimplexMesh3DGradientConstraintForceFilter::N template void DeformableSimplexMesh3DGradientConstraintForceFilter::ComputeExternalForce( - SimplexMeshGeometry * data, + SimplexMeshGeometry * data, const GradientImageType * gradientImage) { // image coordinate @@ -205,7 +205,7 @@ DeformableSimplexMesh3DGradientConstraintForceFilter::C coord[1] = static_cast(data->pos[1]); coord[2] = static_cast(data->pos[2]); - const OriginalImageType::PointType & orgn = m_Image->GetOrigin(); + const OriginalImageType::PointType & orgn = m_Image->GetOrigin(); const OriginalImageType::SpacingType & sp = m_Image->GetSpacing(); if (m_StartVoxel) @@ -276,8 +276,8 @@ DeformableSimplexMesh3DGradientConstraintForceFilter::C // scan normal side if (side == SIDEEnum::NORMAL || side == SIDEEnum::BOTH) { - int i = 0; - bool stop = false; + int i = 0; + bool stop = false; double dist = 0.0; while (!stop) @@ -333,8 +333,8 @@ DeformableSimplexMesh3DGradientConstraintForceFilter::C dp[0] *= -1.0; dp[1] *= -1.0; dp[2] *= -1.0; - int ii = 0; - bool stop = false; + int ii = 0; + bool stop = false; double dist = 0.0; while (!stop) @@ -380,7 +380,7 @@ DeformableSimplexMesh3DGradientConstraintForceFilter::C // now fun begins try to use all the above - double max = 0; + double max = 0; GradientIndexType coord2{}; for (auto & imgVoxel : m_Positive) { diff --git a/Modules/Segmentation/DeformableMesh/test/itkDeformableSimplexMesh3DBalloonForceFilterTest.cxx b/Modules/Segmentation/DeformableMesh/test/itkDeformableSimplexMesh3DBalloonForceFilterTest.cxx index d0aa383d415..103486de288 100644 --- a/Modules/Segmentation/DeformableMesh/test/itkDeformableSimplexMesh3DBalloonForceFilterTest.cxx +++ b/Modules/Segmentation/DeformableMesh/test/itkDeformableSimplexMesh3DBalloonForceFilterTest.cxx @@ -52,10 +52,10 @@ itkDeformableSimplexMesh3DBalloonForceFilterTest(int argc, char * argv[]) // declare the triangle to simplex mesh filter using SimplexFilterType = itk::TriangleMeshToSimplexMeshFilter; - auto mySphereMeshSource = SphereMeshSourceType::New(); - auto center = itk::MakeFilled(10); + auto mySphereMeshSource = SphereMeshSourceType::New(); + auto center = itk::MakeFilled(10); PointType::ValueType scaleInit[3] = { 3, 3, 3 }; - const VectorType scale = scaleInit; + const VectorType scale = scaleInit; mySphereMeshSource->SetCenter(center); mySphereMeshSource->SetResolution(2); diff --git a/Modules/Segmentation/DeformableMesh/test/itkDeformableSimplexMesh3DFilterTest.cxx b/Modules/Segmentation/DeformableMesh/test/itkDeformableSimplexMesh3DFilterTest.cxx index ba6f633cea5..657b766b665 100644 --- a/Modules/Segmentation/DeformableMesh/test/itkDeformableSimplexMesh3DFilterTest.cxx +++ b/Modules/Segmentation/DeformableMesh/test/itkDeformableSimplexMesh3DFilterTest.cxx @@ -70,10 +70,10 @@ itkDeformableSimplexMesh3DFilterTest(int, char *[]) using SimplexVolumeType = itk::SimplexMeshVolumeCalculator; // create the actual mesh, sphere - auto mySphereMeshSource = SphereMeshSourceType::New(); - auto center = itk::MakeFilled(10); + auto mySphereMeshSource = SphereMeshSourceType::New(); + auto center = itk::MakeFilled(10); PointType::ValueType scaleInit[3] = { 3, 3, 3 }; - const VectorType scale = scaleInit; + const VectorType scale = scaleInit; mySphereMeshSource->SetCenter(center); mySphereMeshSource->SetResolution(2); @@ -163,11 +163,11 @@ itkDeformableSimplexMesh3DFilterTest(int, char *[]) for (unsigned int i = 0; i < numberOfCycles; ++i) { - constexpr double alpha = 0.1; - constexpr double beta = -0.1; - constexpr double gamma = 0.05; - constexpr double damping = 0.65; - constexpr int iterations = 5; + constexpr double alpha = 0.1; + constexpr double beta = -0.1; + constexpr double gamma = 0.05; + constexpr double damping = 0.65; + constexpr int iterations = 5; constexpr unsigned int rigidity = 1; // must disconnect the pipeline simplexMesh->DisconnectPipeline(); diff --git a/Modules/Segmentation/DeformableMesh/test/itkDeformableSimplexMesh3DGradientConstraintForceFilterTest.cxx b/Modules/Segmentation/DeformableMesh/test/itkDeformableSimplexMesh3DGradientConstraintForceFilterTest.cxx index d6691dd9e77..5e2e629edf9 100644 --- a/Modules/Segmentation/DeformableMesh/test/itkDeformableSimplexMesh3DGradientConstraintForceFilterTest.cxx +++ b/Modules/Segmentation/DeformableMesh/test/itkDeformableSimplexMesh3DGradientConstraintForceFilterTest.cxx @@ -49,10 +49,10 @@ itkDeformableSimplexMesh3DGradientConstraintForceFilterTest(int, char *[]) // note : image is volume of 20x20x20 starting at 0,0,0 so make sure // the mesh sits on image in space - auto mySphereMeshSource = SphereMeshSourceType::New(); - auto center = itk::MakeFilled(10); + auto mySphereMeshSource = SphereMeshSourceType::New(); + auto center = itk::MakeFilled(10); PointType::ValueType scaleInit[PointDimension] = { 5, 5, 5 }; - const VectorType scale = scaleInit; + const VectorType scale = scaleInit; mySphereMeshSource->SetCenter(center); mySphereMeshSource->SetResolution(2); diff --git a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.h b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.h index e5f2a019087..bcf239dcd41 100644 --- a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.h +++ b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.h @@ -368,22 +368,22 @@ class ITK_TEMPLATE_EXPORT KLMRegionGrowImageFilter : public RegionGrowImageFilte using KLMSegmentationRegionPtr = typename KLMSegmentationRegion::Pointer; using KLMSegmentationBorderPtr = typename KLMSegmentationBorder::Pointer; - double m_MaximumLambda{ 1000 }; + double m_MaximumLambda{ 1000 }; unsigned int m_NumberOfRegions{ 0 }; /** Local variables. */ - double m_InternalLambda{ 0 }; + double m_InternalLambda{ 0 }; unsigned int m_InitialNumberOfRegions{ 0 }; - double m_TotalBorderLength{ 0.0 }; + double m_TotalBorderLength{ 0.0 }; - std::vector m_RegionsPointer{}; - std::vector m_BordersPointer{}; + std::vector m_RegionsPointer{}; + std::vector m_BordersPointer{}; std::vector m_BordersDynamicPointer{}; - KLMSegmentationBorderArrayPtr * m_BorderCandidate{ nullptr }; + KLMSegmentationBorderArrayPtr * m_BorderCandidate{ nullptr }; MeanRegionIntensityType m_InitialRegionMean{}; - double m_InitialRegionArea{ 0 }; + double m_InitialRegionArea{ 0 }; }; // class KLMRegionGrowImageFilter } // namespace itk diff --git a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx index bb8e6e26618..13de2a18181 100644 --- a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx +++ b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx @@ -87,7 +87,7 @@ void KLMRegionGrowImageFilter::GenerateOutputImage() { const InputImageConstPointer inputImage = this->GetInput(); - InputImageSizeType inputImageSize = inputImage->GetBufferedRegion().GetSize(); + InputImageSizeType inputImageSize = inputImage->GetBufferedRegion().GetSize(); GridSizeType gridSize = this->GetGridSize(); @@ -119,7 +119,7 @@ KLMRegionGrowImageFilter::GenerateOutputImage() // Convert the mean region value to the correct output format MeanRegionIntensityType tmpMeanValue; - OutputImageVectorType outMeanValue; + OutputImageVectorType outMeanValue; using OutputValueType = typename OutputImagePixelType::ValueType; tmpMeanValue = m_RegionsPointer[iregion]->GetMeanRegionIntensity(); @@ -179,7 +179,7 @@ KLMRegionGrowImageFilter::GenerateLabelledImage(Label -> LabelImagePointer { const InputImageConstPointer inputImage = this->GetInput(); - InputImageSizeType inputImageSize = inputImage->GetBufferedRegion().GetSize(); + InputImageSizeType inputImageSize = inputImage->GetBufferedRegion().GetSize(); GridSizeType gridSize = this->GetGridSize(); @@ -274,9 +274,9 @@ KLMRegionGrowImageFilter::InitializeKLM() // This implementation requires the image dimensions to be // multiples of the user specified grid sizes. - const InputImageConstPointer inputImage = this->GetInput(); - InputImageSizeType inputImageSize = inputImage->GetBufferedRegion().GetSize(); - GridSizeType gridSize = this->GetGridSize(); + const InputImageConstPointer inputImage = this->GetInput(); + InputImageSizeType inputImageSize = inputImage->GetBufferedRegion().GetSize(); + GridSizeType gridSize = this->GetGridSize(); typename TInputImage::SpacingType spacing = inputImage->GetSpacing(); for (unsigned int idim = 0; idim < InputImageDimension; ++idim) @@ -399,7 +399,7 @@ KLMRegionGrowImageFilter::InitializeKLM() // compute number of borders to be seen this dimension and area of // each border unsigned int numBorderThisDim = 1; - double borderLengthTmp = 1; + double borderLengthTmp = 1; for (unsigned int jdim = 0; jdim < InputImageDimension; ++jdim) { numBorderThisDim *= numBordersAlongDim[jdim]; @@ -431,8 +431,8 @@ KLMRegionGrowImageFilter::InitializeKLM() // Find the two neighbor regions - unsigned int intRegion1Index = 0; - unsigned int intRegion2Index = 0; + unsigned int intRegion1Index = 0; + unsigned int intRegion2Index = 0; IndexValueType tmpVal = 1; for (unsigned int jdim = 0; jdim < InputImageDimension; ++jdim) { @@ -568,7 +568,7 @@ KLMRegionGrowImageFilter::InitializeRegionParameters( } // Calculate the area and the mean associated with the region - GridSizeType gridSize = this->GetGridSize(); + GridSizeType gridSize = this->GetGridSize(); typename TInputImage::SpacingType spacing = inputImage->GetSpacing(); m_InitialRegionArea = 1; for (unsigned int idim = 0; idim < InputImageDimension; ++idim) @@ -694,8 +694,8 @@ KLMRegionGrowImageFilter::ResolveRegions() // Resolve region labels to contain only unique labels. // Go backward from largest to smallest region label - auto regionsPointerIt = m_RegionsPointer.rbegin(); - auto regionsPointerItEnd = m_RegionsPointer.rend(); + auto regionsPointerIt = m_RegionsPointer.rbegin(); + auto regionsPointerItEnd = m_RegionsPointer.rend(); RegionLabelType iregion = m_InitialNumberOfRegions; while (regionsPointerIt != regionsPointerItEnd) { @@ -757,7 +757,7 @@ KLMRegionGrowImageFilter::ResolveRegions() const RegionLabelType labelValue = m_RegionsPointer[iregion]->GetRegionLabel(); newLabelValue = remapLabelsVec[labelValue - 1]; - const double newAreaValue = m_RegionsPointer[labelValue - 1]->GetRegionArea(); + const double newAreaValue = m_RegionsPointer[labelValue - 1]->GetRegionArea(); const MeanRegionIntensityType newMeanValue = m_RegionsPointer[labelValue - 1]->GetMeanRegionIntensity(); m_RegionsPointer[iregion]->SetRegionParameters(newMeanValue, newAreaValue, newLabelValue); diff --git a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationBorder.h b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationBorder.h index ea9253f039d..2a3676f50f0 100644 --- a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationBorder.h +++ b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationBorder.h @@ -192,7 +192,7 @@ class ITKKLMRegionGrowing_EXPORT KLMSegmentationBorder : public SegmentationBord PrintSelf(std::ostream & os, Indent indent) const override; private: - double m_Lambda{}; + double m_Lambda{}; KLMSegmentationRegion * m_Region1{}; KLMSegmentationRegion * m_Region2{}; }; diff --git a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationRegion.h b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationRegion.h index ffb277ee203..51788d4d591 100644 --- a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationRegion.h +++ b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationRegion.h @@ -240,7 +240,7 @@ class ITKKLMRegionGrowing_EXPORT KLMSegmentationRegion : public SegmentationRegi PrintSelf(std::ostream & os, Indent indent) const override; private: - RegionBorderVectorType m_RegionBorderVector{}; + RegionBorderVectorType m_RegionBorderVector{}; MeanRegionIntensityType m_MeanRegionIntensity{}; }; // class SegmentationRegion } // namespace itk diff --git a/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationRegion.h b/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationRegion.h index 8e0b7d7017d..cff7460858b 100644 --- a/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationRegion.h +++ b/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationRegion.h @@ -89,7 +89,7 @@ class ITKKLMRegionGrowing_EXPORT SegmentationRegion : public Object private: RegionLabelType m_RegionLabel{ 0 }; - double m_RegionArea{ 0 }; + double m_RegionArea{ 0 }; }; } // end namespace itk diff --git a/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx b/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx index dbaa3e1ad27..120672654ef 100644 --- a/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx +++ b/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx @@ -33,8 +33,8 @@ KLMSegmentationRegion::PrintSelf(std::ostream & os, Indent indent) const void KLMSegmentationRegion::SetRegionParameters(MeanRegionIntensityType meanRegionIntensity, - double regionArea, - RegionLabelType label) + double regionArea, + RegionLabelType label) { // Set the area, mean, and label associated with the region this->SetRegionArea(regionArea); @@ -53,7 +53,7 @@ KLMSegmentationRegion::CombineRegionParameters(const Self * region) const double region1Area = this->GetRegionArea(); const double region2Area = region->GetRegionArea(); - const double mergedRegionArea = region1Area + region2Area; + const double mergedRegionArea = region1Area + region2Area; MeanRegionIntensityType mergedRegionMean = region1Mean * region1Area + region2Mean * region2Area; if (mergedRegionArea <= 0) @@ -185,7 +185,7 @@ KLMSegmentationRegion::InsertRegionBorder(KLMSegmentationBorder * pBorderCandida void KLMSegmentationRegion::InsertRegionBorder(RegionBorderVectorIterator RegionBorderVectorIt, - KLMSegmentationBorder * pBorderCandidate) + KLMSegmentationBorder * pBorderCandidate) { // Ensure that the border candidate is not a null pointer if (pBorderCandidate == nullptr) @@ -286,7 +286,7 @@ KLMSegmentationRegion::SpliceRegionBorders(Self * region) // Initialize the region iterators - auto thisRegionBordersIt = thisRegionBorder.begin(); + auto thisRegionBordersIt = thisRegionBorder.begin(); const auto endOfThisRegionBorders = thisRegionBorder.end(); auto thatRegionBordersIt = region->GetRegionBorderConstItBegin(); diff --git a/Modules/Segmentation/KLMRegionGrowing/test/itkRegionGrow2DTest.cxx b/Modules/Segmentation/KLMRegionGrowing/test/itkRegionGrow2DTest.cxx index 5c9d11935cf..0ca04ddad62 100644 --- a/Modules/Segmentation/KLMRegionGrowing/test/itkRegionGrow2DTest.cxx +++ b/Modules/Segmentation/KLMRegionGrowing/test/itkRegionGrow2DTest.cxx @@ -234,7 +234,7 @@ test_regiongrowKLM1D() constexpr unsigned int numPixels = 100; constexpr unsigned int numPixelsHalf = 50; - auto imageSize = ImageType::SizeType::Filled(numPixels); + auto imageSize = ImageType::SizeType::Filled(numPixels); constexpr ImageType::IndexType index{}; @@ -248,7 +248,7 @@ test_regiongrowKLM1D() ImageIterator inIt(image, image->GetBufferedRegion()); using ImageData = ImageType::PixelType::VectorType; - ImageData pixelData; + ImageData pixelData; unsigned int k = 0; while (!inIt.IsAtEnd()) { @@ -345,13 +345,13 @@ test_regiongrowKLM1D() const LabelledImageType::Pointer labelledImage = KLMFilter->GetLabelledImage(); using OutputImageData = OutputImageType::PixelType::VectorType; - ImageData pixelIn; + ImageData pixelIn; OutputImageData pixelOut; using LabelImageIterator = itk::ImageRegionIterator; LabelImageIterator labelIt(labelledImage, labelledImage->GetBufferedRegion()); - LabelType pixelLabel; - LabelType m = 1; + LabelType pixelLabel; + LabelType m = 1; inIt.GoToBegin(); while (!inIt.IsAtEnd()) @@ -429,12 +429,12 @@ test_regiongrowKLM1D() std::cout << "Extracting and checking label image" << std::endl; const OutputImageType::Pointer outImage2 = KLMFilter->GetOutput(); - OutputImageIterator outIt2(outImage2, outImage2->GetBufferedRegion()); - OutputImageData pixelOut2a; - OutputImageData pixelOut2b; + OutputImageIterator outIt2(outImage2, outImage2->GetBufferedRegion()); + OutputImageData pixelOut2a; + OutputImageData pixelOut2b; const LabelledImageType::Pointer labelledImage2 = KLMFilter->GetLabelledImage(); - LabelImageIterator labelIt2(labelledImage2, labelledImage2->GetBufferedRegion()); + LabelImageIterator labelIt2(labelledImage2, labelledImage2->GetBufferedRegion()); pixelOut2a[0] = (numPixelsHalf - 1) * numPixelsHalf / 2; pixelOut2a[1] = (numPixels - 1) * numPixels / 2 - pixelOut2a[0]; @@ -556,14 +556,14 @@ test_regiongrowKLM1D() std::cout << "Extracting and checking label image" << std::endl; const OutputImageType::Pointer outImage3 = KLMFilter->GetOutput(); - OutputImageIterator outIt3(outImage3, outImage3->GetBufferedRegion()); - OutputImageData pixelOut3a; - OutputImageData pixelOut3b; - OutputImageData pixelOut3c; - OutputImageData pixelOut3d; + OutputImageIterator outIt3(outImage3, outImage3->GetBufferedRegion()); + OutputImageData pixelOut3a; + OutputImageData pixelOut3b; + OutputImageData pixelOut3c; + OutputImageData pixelOut3d; const LabelledImageType::Pointer labelledImage3 = KLMFilter->GetLabelledImage(); - LabelImageIterator labelIt3(labelledImage3, labelledImage3->GetBufferedRegion()); + LabelImageIterator labelIt3(labelledImage3, labelledImage3->GetBufferedRegion()); pixelOut3a[0] = (numPixelsQtr - 1) * numPixelsQtr / 2; pixelOut3a[1] = (numPixels - 1) * numPixels / 2 - (3 * numPixelsQtr - 1) * (3 * numPixelsQtr) / 2; @@ -737,10 +737,10 @@ test_regiongrowKLM1D() std::cout << "Extracting and checking label image" << std::endl; const OutputImageType::Pointer outImage5 = KLMFilter->GetOutput(); - OutputImageIterator outIt5(outImage5, outImage5->GetBufferedRegion()); + OutputImageIterator outIt5(outImage5, outImage5->GetBufferedRegion()); const LabelledImageType::Pointer labelledImage5 = KLMFilter->GetLabelledImage(); - LabelImageIterator labelIt5(labelledImage5, labelledImage5->GetBufferedRegion()); + LabelImageIterator labelIt5(labelledImage5, labelledImage5->GetBufferedRegion()); OutputImageData pixelOut5in; OutputImageData pixelOut5out; @@ -894,7 +894,7 @@ test_regiongrowKLM2D() using ImageData = ImageType::PixelType::VectorType; ImageData pixelData; - int k = 0; + int k = 0; while (!inIt.IsAtEnd()) { @@ -944,8 +944,8 @@ test_regiongrowKLM2D() OutputImageIterator outIt(outImage, outImage->GetBufferedRegion()); using OutputImageData = OutputImageType::PixelType::VectorType; - ImageData pixelIn; - OutputImageData pixelOut; + ImageData pixelIn; + OutputImageData pixelOut; constexpr itk::NumericTraits::ValueType pixelOutZero{}; while (!inIt.IsAtEnd()) @@ -1204,11 +1204,11 @@ test_regiongrowKLM2D() return EXIT_FAILURE; } - HistogramType::ConstIterator histIt = histogram->Begin(); + HistogramType::ConstIterator histIt = histogram->Begin(); const HistogramType::ConstIterator histItEnd = histogram->End(); const double Sum = histogram->GetTotalFrequency(); - double labelEntropy = 0.0; + double labelEntropy = 0.0; while (histIt != histItEnd) { @@ -1396,7 +1396,7 @@ test_regiongrowKLM3D() using ImageData = ImageType::PixelType::VectorType; ImageData pixelData; - int k = 0; + int k = 0; while (!inIt.IsAtEnd()) { @@ -1451,8 +1451,8 @@ test_regiongrowKLM3D() OutputImageIterator outIt(outImage, outImage->GetBufferedRegion()); using OutputImageData = OutputImageType::PixelType::VectorType; - ImageData pixelIn; - OutputImageData pixelOut; + ImageData pixelIn; + OutputImageData pixelOut; constexpr itk::NumericTraits::ValueType pixelOutZero{}; while (!inIt.IsAtEnd()) @@ -1703,11 +1703,11 @@ test_regiongrowKLM3D() return EXIT_FAILURE; } - HistogramType::ConstIterator histIt = histogram->Begin(); + HistogramType::ConstIterator histIt = histogram->Begin(); const HistogramType::ConstIterator histItEnd = histogram->End(); const double Sum = histogram->GetTotalFrequency(); - double labelEntropy = 0.0; + double labelEntropy = 0.0; while (histIt != histItEnd) { @@ -1761,7 +1761,7 @@ test_regiongrowKLM4D() auto image = ImageType::New(); ImageType::SizeType imageSize; - constexpr int multVal = 2; + constexpr int multVal = 2; imageSize[0] = 2 * multVal; imageSize[1] = 3 * multVal; imageSize[2] = 5 * multVal; @@ -1798,7 +1798,7 @@ test_regiongrowKLM4D() using ImageData = ImageType::PixelType::VectorType; ImageData pixelData; - int k = 0; + int k = 0; while (!inIt.IsAtEnd()) { @@ -1859,8 +1859,8 @@ test_regiongrowKLM4D() OutputImageIterator outIt(outImage, outImage->GetBufferedRegion()); using OutputImageData = OutputImageType::PixelType::VectorType; - ImageData pixelIn; - OutputImageData pixelOut; + ImageData pixelIn; + OutputImageData pixelOut; constexpr itk::NumericTraits::ValueType pixelOutZero{}; while (!inIt.IsAtEnd()) @@ -2090,11 +2090,11 @@ test_regiongrowKLM4D() return EXIT_FAILURE; } - HistogramType::ConstIterator histIt = histogram->Begin(); + HistogramType::ConstIterator histIt = histogram->Begin(); const HistogramType::ConstIterator histItEnd = histogram->End(); const double Sum = histogram->GetTotalFrequency(); - double labelEntropy = 0.0; + double labelEntropy = 0.0; while (histIt != histItEnd) { diff --git a/Modules/Segmentation/LabelVoting/include/itkBinaryMedianImageFilter.hxx b/Modules/Segmentation/LabelVoting/include/itkBinaryMedianImageFilter.hxx index 00f37f8f189..cd223bddddd 100644 --- a/Modules/Segmentation/LabelVoting/include/itkBinaryMedianImageFilter.hxx +++ b/Modules/Segmentation/LabelVoting/include/itkBinaryMedianImageFilter.hxx @@ -48,7 +48,7 @@ BinaryMedianImageFilter::GenerateInputRequestedRegion Superclass::GenerateInputRequestedRegion(); // get pointers to the input and output - const typename Superclass::InputImagePointer inputPtr = const_cast(this->GetInput()); + const typename Superclass::InputImagePointer inputPtr = const_cast(this->GetInput()); const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) @@ -94,14 +94,14 @@ BinaryMedianImageFilter::DynamicThreadedGenerateData( ZeroFluxNeumannBoundaryCondition nbc; ConstNeighborhoodIterator bit; - ImageRegionIterator it; + ImageRegionIterator it; // Allocate output - const typename OutputImageType::Pointer output = this->GetOutput(); + const typename OutputImageType::Pointer output = this->GetOutput(); const typename InputImageType::ConstPointer input = this->GetInput(); // Find the data-set boundary "faces" - NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; + NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; const typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = bC(input, outputRegionForThread, m_Radius); diff --git a/Modules/Segmentation/LabelVoting/include/itkLabelVotingImageFilter.h b/Modules/Segmentation/LabelVoting/include/itkLabelVotingImageFilter.h index b152acc1108..ea0c7a0e20c 100644 --- a/Modules/Segmentation/LabelVoting/include/itkLabelVotingImageFilter.h +++ b/Modules/Segmentation/LabelVoting/include/itkLabelVotingImageFilter.h @@ -179,8 +179,8 @@ class ITK_TEMPLATE_EXPORT LabelVotingImageFilter : public ImageToImageFilter::ComputeMaximumInputValue() -> for (size_t i = 0; i < numberOfInputIndexes; ++i) { const InputImageType * inputImage = this->GetInput(i); - IteratorType it(inputImage, inputImage->GetBufferedRegion()); + IteratorType it(inputImage, inputImage->GetBufferedRegion()); for (it.GoToBegin(); !it.IsAtEnd(); ++it) { maxLabel = std::max(maxLabel, it.Get()); diff --git a/Modules/Segmentation/LabelVoting/include/itkMultiLabelSTAPLEImageFilter.h b/Modules/Segmentation/LabelVoting/include/itkMultiLabelSTAPLEImageFilter.h index ae049656815..c20e9e12b39 100644 --- a/Modules/Segmentation/LabelVoting/include/itkMultiLabelSTAPLEImageFilter.h +++ b/Modules/Segmentation/LabelVoting/include/itkMultiLabelSTAPLEImageFilter.h @@ -303,9 +303,9 @@ class ITK_TEMPLATE_EXPORT MultiLabelSTAPLEImageFilter : public ImageToImageFilte size_t m_TotalLabelCount{ 0 }; OutputPixelType m_LabelForUndecidedPixels{}; - bool m_HasLabelForUndecidedPixels{ false }; + bool m_HasLabelForUndecidedPixels{ false }; - bool m_HasPriorProbabilities{ false }; + bool m_HasPriorProbabilities{ false }; PriorProbabilitiesType m_PriorProbabilities{}; void @@ -319,7 +319,7 @@ class ITK_TEMPLATE_EXPORT MultiLabelSTAPLEImageFilter : public ImageToImageFilte void InitializeConfusionMatrixArrayFromVoting(); - bool m_HasMaximumNumberOfIterations{ false }; + bool m_HasMaximumNumberOfIterations{ false }; unsigned int m_MaximumNumberOfIterations{ 0 }; unsigned int m_ElapsedNumberOfIterations{ 0u }; diff --git a/Modules/Segmentation/LabelVoting/include/itkMultiLabelSTAPLEImageFilter.hxx b/Modules/Segmentation/LabelVoting/include/itkMultiLabelSTAPLEImageFilter.hxx index e1b33bd0cf0..39485067225 100644 --- a/Modules/Segmentation/LabelVoting/include/itkMultiLabelSTAPLEImageFilter.hxx +++ b/Modules/Segmentation/LabelVoting/include/itkMultiLabelSTAPLEImageFilter.hxx @@ -397,7 +397,7 @@ MultiLabelSTAPLEImageFilter::GenerateData() } // now determine the label with the maximum W - auto winningLabel = this->m_LabelForUndecidedPixels; + auto winningLabel = this->m_LabelForUndecidedPixels; WeightsType winningLabelW = 0; for (OutputPixelType ci = 0; ci < this->m_TotalLabelCount; ++ci) { diff --git a/Modules/Segmentation/LabelVoting/include/itkVotingBinaryHoleFillingImageFilter.hxx b/Modules/Segmentation/LabelVoting/include/itkVotingBinaryHoleFillingImageFilter.hxx index e4074a6a7fe..483c1555ce0 100644 --- a/Modules/Segmentation/LabelVoting/include/itkVotingBinaryHoleFillingImageFilter.hxx +++ b/Modules/Segmentation/LabelVoting/include/itkVotingBinaryHoleFillingImageFilter.hxx @@ -74,19 +74,19 @@ template void VotingBinaryHoleFillingImageFilter::ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) + ThreadIdType threadId) { ZeroFluxNeumannBoundaryCondition nbc; ConstNeighborhoodIterator bit; - ImageRegionIterator it; + ImageRegionIterator it; // Allocate output - const typename OutputImageType::Pointer output = this->GetOutput(); + const typename OutputImageType::Pointer output = this->GetOutput(); const typename InputImageType::ConstPointer input = this->GetInput(); // Find the data-set boundary "faces" - NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; + NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; const typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = bC(input, outputRegionForThread, this->GetRadius()); @@ -94,7 +94,7 @@ VotingBinaryHoleFillingImageFilter::ThreadedGenerateD const InputPixelType backgroundValue = this->GetBackgroundValue(); const InputPixelType foregroundValue = this->GetForegroundValue(); - const auto birthThreshold = static_cast(this->GetBirthThreshold()); + const auto birthThreshold = static_cast(this->GetBirthThreshold()); unsigned int numberOfPixelsChanged = 0; diff --git a/Modules/Segmentation/LabelVoting/include/itkVotingBinaryImageFilter.hxx b/Modules/Segmentation/LabelVoting/include/itkVotingBinaryImageFilter.hxx index be9f89adffd..1a230d594a7 100644 --- a/Modules/Segmentation/LabelVoting/include/itkVotingBinaryImageFilter.hxx +++ b/Modules/Segmentation/LabelVoting/include/itkVotingBinaryImageFilter.hxx @@ -48,7 +48,7 @@ VotingBinaryImageFilter::GenerateInputRequestedRegion Superclass::GenerateInputRequestedRegion(); // get pointers to the input and output - const typename Superclass::InputImagePointer inputPtr = const_cast(this->GetInput()); + const typename Superclass::InputImagePointer inputPtr = const_cast(this->GetInput()); const typename Superclass::OutputImagePointer outputPtr = this->GetOutput(); if (!inputPtr || !outputPtr) @@ -94,13 +94,13 @@ VotingBinaryImageFilter::DynamicThreadedGenerateData( ZeroFluxNeumannBoundaryCondition nbc; ConstNeighborhoodIterator bit; - ImageRegionIterator it; + ImageRegionIterator it; - const typename OutputImageType::Pointer output = this->GetOutput(); + const typename OutputImageType::Pointer output = this->GetOutput(); const typename InputImageType::ConstPointer input = this->GetInput(); // Find the data-set boundary "faces" - NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; + NeighborhoodAlgorithm::ImageBoundaryFacesCalculator bC; const typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator::FaceListType faceList = bC(input, outputRegionForThread, m_Radius); diff --git a/Modules/Segmentation/LabelVoting/test/itkMultiLabelSTAPLEImageFilterTest.cxx b/Modules/Segmentation/LabelVoting/test/itkMultiLabelSTAPLEImageFilterTest.cxx index 0ad1e001a2f..3e6bf73bd82 100644 --- a/Modules/Segmentation/LabelVoting/test/itkMultiLabelSTAPLEImageFilterTest.cxx +++ b/Modules/Segmentation/LabelVoting/test/itkMultiLabelSTAPLEImageFilterTest.cxx @@ -152,7 +152,7 @@ itkMultiLabelSTAPLEImageFilterTest(int, char *[]) ITK_TEST_EXPECT_TRUE(!filter->GetHasPriorProbabilities()); constexpr typename FilterType::PriorProbabilitiesType::ValueType priorProbabilitiesVal(0.0); - typename FilterType::PriorProbabilitiesType priorProbabilities(1); + typename FilterType::PriorProbabilitiesType priorProbabilities(1); priorProbabilities.Fill(priorProbabilitiesVal); filter->SetPriorProbabilities(priorProbabilities); ITK_TEST_SET_GET_VALUE(priorProbabilities, filter->GetPriorProbabilities()); diff --git a/Modules/Segmentation/LabelVoting/test/itkVotingBinaryImageFilterTest.cxx b/Modules/Segmentation/LabelVoting/test/itkVotingBinaryImageFilterTest.cxx index 03288e14e43..6228e08db84 100644 --- a/Modules/Segmentation/LabelVoting/test/itkVotingBinaryImageFilterTest.cxx +++ b/Modules/Segmentation/LabelVoting/test/itkVotingBinaryImageFilterTest.cxx @@ -29,11 +29,11 @@ template int itkVotingBinaryImageFilterTestImp(const std::string & infname, const std::string & outfname, - itk::SizeValueType radius, - long foregroundValue, - long backgroundValue, - unsigned int birthThreshold = 1, - unsigned int survivalThreshold = 1) + itk::SizeValueType radius, + long foregroundValue, + long backgroundValue, + unsigned int birthThreshold = 1, + unsigned int survivalThreshold = 1) { using InputImageType = TInputImageType; using OutputImageType = TInputImageType; @@ -92,11 +92,11 @@ itkVotingBinaryImageFilterTest(int argc, char * argv[]) return EXIT_FAILURE; } - const std::string infname = argv[1]; - const std::string outfname = argv[2]; + const std::string infname = argv[1]; + const std::string outfname = argv[2]; const unsigned int radius = std::stoi(argv[3]); - const long foregroundValue = atol(argv[4]); - const long backgroundValue = atol(argv[5]); + const long foregroundValue = atol(argv[4]); + const long backgroundValue = atol(argv[5]); const itk::ImageIOBase::Pointer iobase = @@ -110,7 +110,7 @@ itkVotingBinaryImageFilterTest(int argc, char * argv[]) // const itk::IOPixelEnum pixelType = iobase->GetPixelType(); const itk::IOComponentEnum componentType = iobase->GetComponentType(); - const unsigned int dimension = iobase->GetNumberOfDimensions(); + const unsigned int dimension = iobase->GetNumberOfDimensions(); using TestImageType = itk::Image; using FilterType = itk::VotingBinaryImageFilter; diff --git a/Modules/Segmentation/LevelSets/include/itkBinaryMaskToNarrowBandPointSetFilter.h b/Modules/Segmentation/LevelSets/include/itkBinaryMaskToNarrowBandPointSetFilter.h index a1933ff15c9..1f40463cb80 100644 --- a/Modules/Segmentation/LevelSets/include/itkBinaryMaskToNarrowBandPointSetFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkBinaryMaskToNarrowBandPointSetFilter.h @@ -145,7 +145,7 @@ class ITK_TEMPLATE_EXPORT BinaryMaskToNarrowBandPointSetFilter : public ImageToM private: DistanceFilterPointer m_DistanceFilter{}; - RescaleFilterPointer m_RescaleFilter{}; + RescaleFilterPointer m_RescaleFilter{}; float m_BandWidth{}; }; diff --git a/Modules/Segmentation/LevelSets/include/itkBinaryMaskToNarrowBandPointSetFilter.hxx b/Modules/Segmentation/LevelSets/include/itkBinaryMaskToNarrowBandPointSetFilter.hxx index 9f639e28cf8..41ebcf54b3a 100644 --- a/Modules/Segmentation/LevelSets/include/itkBinaryMaskToNarrowBandPointSetFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkBinaryMaskToNarrowBandPointSetFilter.hxx @@ -95,18 +95,18 @@ BinaryMaskToNarrowBandPointSetFilter::GenerateData() m_DistanceFilter->Update(); - const OutputMeshPointer mesh = this->GetOutput(); + const OutputMeshPointer mesh = this->GetOutput(); const InputImageConstPointer image = this->GetInput(0); - const PointsContainerPointer points = PointsContainer::New(); + const PointsContainerPointer points = PointsContainer::New(); const PointDataContainerPointer pointData = PointDataContainer::New(); const NodeContainerPointer nodes = m_DistanceFilter->GetOutputNarrowBand(); const typename std::vector::size_type numberOfPixels = nodes->Size(); - ProgressReporter progress(this, 0, static_cast(numberOfPixels)); + ProgressReporter progress(this, 0, static_cast(numberOfPixels)); - typename NodeContainer::ConstIterator nodeItr = nodes->Begin(); + typename NodeContainer::ConstIterator nodeItr = nodes->Begin(); const typename NodeContainer::ConstIterator lastNode = nodes->End(); PointType point; @@ -114,7 +114,7 @@ BinaryMaskToNarrowBandPointSetFilter::GenerateData() while (nodeItr != lastNode) { const NodeType & node = nodeItr.Value(); - const float distance = node.GetValue(); + const float distance = node.GetValue(); if (itk::Math::abs(distance) < m_BandWidth) { image->TransformIndexToPhysicalPoint(node.GetIndex(), point); diff --git a/Modules/Segmentation/LevelSets/include/itkCannySegmentationLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkCannySegmentationLevelSetFunction.h index 73d2e88f1b2..238aa53b5f0 100644 --- a/Modules/Segmentation/LevelSets/include/itkCannySegmentationLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkCannySegmentationLevelSetFunction.h @@ -130,7 +130,7 @@ class ITK_TEMPLATE_EXPORT CannySegmentationLevelSetFunction private: ScalarValueType m_Variance{}; - double m_Threshold{}; + double m_Threshold{}; typename CannyEdgeDetectionImageFilter::Pointer m_Canny{}; diff --git a/Modules/Segmentation/LevelSets/include/itkCollidingFrontsImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkCollidingFrontsImageFilter.hxx index b1d1d4495e3..41add3d4e5e 100644 --- a/Modules/Segmentation/LevelSets/include/itkCollidingFrontsImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkCollidingFrontsImageFilter.hxx @@ -83,15 +83,15 @@ CollidingFrontsImageFilter::GenerateData() multiplyFilter->SetInput2(fastMarchingFilter2->GetGradientImage()); multiplyFilter->Update(); - const OutputImagePointer multipliedImage = multiplyFilter->GetOutput(); - typename NodeContainer::ConstIterator pointsIter1 = m_SeedPoints1->Begin(); + const OutputImagePointer multipliedImage = multiplyFilter->GetOutput(); + typename NodeContainer::ConstIterator pointsIter1 = m_SeedPoints1->Begin(); const typename NodeContainer::ConstIterator pointsEnd1 = m_SeedPoints1->End(); for (; pointsIter1 != pointsEnd1; ++pointsIter1) { multipliedImage->SetPixel(pointsIter1.Value().GetIndex(), m_NegativeEpsilon); } - typename NodeContainer::ConstIterator pointsIter2 = m_SeedPoints2->Begin(); + typename NodeContainer::ConstIterator pointsIter2 = m_SeedPoints2->Begin(); const typename NodeContainer::ConstIterator pointsEnd2 = m_SeedPoints2->End(); for (; pointsIter2 != pointsEnd2; ++pointsIter2) { diff --git a/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetFunction.h index b8b7c853787..76df71da653 100644 --- a/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetFunction.h @@ -103,8 +103,8 @@ class ITK_TEMPLATE_EXPORT CurvesLevelSetFunction : public SegmentationLevelSetFu /** The curvature speed is same as the propagation speed. */ ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood, - const FloatOffsetType & offset, - GlobalDataStruct * gd) const override + const FloatOffsetType & offset, + GlobalDataStruct * gd) const override { return this->PropagationSpeed(neighborhood, offset, gd); } diff --git a/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.hxx index b9867a875a1..d767dbe9ad5 100644 --- a/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.hxx @@ -48,7 +48,7 @@ ExtensionVelocitiesImageFilter::ExtensionVe template void ExtensionVelocitiesImageFilter::SetInputVelocityImage(const AuxImageType * ptr, - unsigned int idx) + unsigned int idx) { if (idx >= VAuxDimension) { @@ -138,8 +138,8 @@ void ExtensionVelocitiesImageFilter::GenerateDataFull() { const LevelSetConstPointer inputPtr = this->GetInput(); - const LevelSetPointer outputPtr = this->GetOutput(); - const LevelSetPointer tempLevelSet = m_Marcher->GetOutput(); + const LevelSetPointer outputPtr = this->GetOutput(); + const LevelSetPointer tempLevelSet = m_Marcher->GetOutput(); const double levelSetValue = this->GetLevelSetValue(); @@ -149,7 +149,7 @@ ExtensionVelocitiesImageFilter::GenerateDat using ConstIteratorType = ImageRegionConstIterator; ConstIteratorType inputIt(inputPtr, inputPtr->GetBufferedRegion()); - IteratorType outputIt(outputPtr, outputPtr->GetBufferedRegion()); + IteratorType outputIt(outputPtr, outputPtr->GetBufferedRegion()); IteratorType tempIt; @@ -273,8 +273,8 @@ void ExtensionVelocitiesImageFilter::GenerateDataNarrowBand() { const LevelSetConstPointer inputPtr = this->GetInput(); - const LevelSetPointer outputPtr = this->GetOutput(); - const LevelSetPointer tempLevelSet = m_Marcher->GetOutput(); + const LevelSetPointer outputPtr = this->GetOutput(); + const LevelSetPointer tempLevelSet = m_Marcher->GetOutput(); const double levelSetValue = this->GetLevelSetValue(); const double outputBandwidth = this->GetOutputNarrowBandwidth(); @@ -393,7 +393,7 @@ ExtensionVelocitiesImageFilter::GenerateDat pointsIt = procPoints->Begin(); pointsEnd = procPoints->End(); - NodeType node; + NodeType node; PixelType inPixel; for (; pointsIt != pointsEnd; ++pointsIt) diff --git a/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourLevelSetFunction.h index c8a8a92d83a..1f5526e4085 100644 --- a/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourLevelSetFunction.h @@ -117,8 +117,8 @@ class ITK_TEMPLATE_EXPORT GeodesicActiveContourLevelSetFunction /** The curvature speed is same as the propagation speed. */ ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood, - const FloatOffsetType & offset, - GlobalDataStruct * gd) const override + const FloatOffsetType & offset, + GlobalDataStruct * gd) const override { return this->PropagationSpeed(neighborhood, offset, gd); } diff --git a/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetFunction.h index 81d71289c1e..b7d995b9bcd 100644 --- a/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetFunction.h @@ -133,8 +133,8 @@ class ITK_TEMPLATE_EXPORT GeodesicActiveContourShapePriorLevelSetFunction /** The curvature speed is same as the propagation speed. */ ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood, - const FloatOffsetType & offset, - GlobalDataStruct * gd) const override + const FloatOffsetType & offset, + GlobalDataStruct * gd) const override { return this->PropagationSpeed(neighborhood, offset, gd); } diff --git a/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetFunction.hxx b/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetFunction.hxx index 722809f7765..cc3bc868815 100644 --- a/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetFunction.hxx +++ b/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetFunction.hxx @@ -93,7 +93,7 @@ GeodesicActiveContourShapePriorLevelSetFunction:: template void GeodesicActiveContourShapePriorLevelSetFunction::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetImageFilter.hxx index be1249661bc..97ebbc92f1f 100644 --- a/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetImageFilter.hxx @@ -56,7 +56,7 @@ template void GeodesicActiveContourShapePriorLevelSetImageFilter::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.h b/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.h index ef72796e4db..8c11f280bdc 100644 --- a/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.h @@ -207,10 +207,10 @@ class ITK_TEMPLATE_EXPORT ImplicitManifoldNormalVectorFilter /** Constants used in computations. */ unsigned long m_Indicator[Self::ImageDimension]{}; - unsigned int m_NumVertex{}; + unsigned int m_NumVertex{}; NodeValueType m_DimConst{}; NodeValueType m_DimConst2{}; - RadiusType m_ManifoldRadius{}; + RadiusType m_ManifoldRadius{}; }; } // end namespace itk diff --git a/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.hxx b/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.hxx index 7ccadcacb01..25cfc1f4831 100644 --- a/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.hxx @@ -87,12 +87,12 @@ template void ImplicitManifoldNormalVectorFilter::SetNormalBand() { - const typename InputImageType::ConstPointer ManifoldImage = this->GetInput(); + const typename InputImageType::ConstPointer ManifoldImage = this->GetInput(); const typename SparseOutputImageType::Pointer output = this->GetOutput(); InputImageIteratorType it(m_ManifoldRadius, ManifoldImage, ManifoldImage->GetRequestedRegion()); - IndexType index; + IndexType index; NodeValueType value; it.GoToBegin(); @@ -115,12 +115,12 @@ ImplicitManifoldNormalVectorFilter::SetNormalBa template void ImplicitManifoldNormalVectorFilter::InitializeNormalBandNode( - NormalBandNodeType * node, + NormalBandNodeType * node, const InputImageIteratorType & it) { - unsigned long stride[ImageDimension]; + unsigned long stride[ImageDimension]; NormalVectorType normalvector; - NodeValueType derivative; + NodeValueType derivative; for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -222,10 +222,10 @@ ImplicitManifoldNormalVectorFilter::PostProcess { if (m_UnsharpMaskingFlag) { - const typename NodeListType::Pointer nodelist = this->GetOutput()->GetNodeList(); - typename NodeListType::Iterator it = nodelist->Begin(); + const typename NodeListType::Pointer nodelist = this->GetOutput()->GetNodeList(); + typename NodeListType::Iterator it = nodelist->Begin(); const typename NodeListType::ConstIterator last = nodelist->End(); - NormalVectorType nv; + NormalVectorType nv; while (it != last) { diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.h index dc361d2efd3..390903b68df 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.h @@ -215,7 +215,7 @@ class ITK_TEMPLATE_EXPORT LevelSetFunction : public FiniteDifferenceFunction auto LevelSetFunction::ComputeCurvatureTerm(const NeighborhoodType & neighborhood, - const FloatOffsetType & offset, - GlobalDataStruct * gd) -> ScalarValueType + const FloatOffsetType & offset, + GlobalDataStruct * gd) -> ScalarValueType { if (m_UseMinimalCurvature == false) { @@ -52,11 +52,11 @@ LevelSetFunction::ComputeCurvatureTerm(const NeighborhoodType & neig template auto LevelSetFunction::ComputeMinimalCurvature(const NeighborhoodType & itkNotUsed(neighborhood), - const FloatOffsetType & itkNotUsed(offset), - GlobalDataStruct * gd) -> ScalarValueType + const FloatOffsetType & itkNotUsed(offset), + GlobalDataStruct * gd) -> ScalarValueType { const ScalarValueType gradMag = std::sqrt(gd->m_GradMagSqr); - ScalarValueType Pgrad[ImageDimension][ImageDimension]; + ScalarValueType Pgrad[ImageDimension][ImageDimension]; for (unsigned int i = 0; i < ImageDimension; ++i) { Pgrad[i][i] = 1.0 - gd->m_dx[i] * gd->m_dx[i] / gradMag; @@ -69,7 +69,7 @@ LevelSetFunction::ComputeMinimalCurvature(const NeighborhoodType & i // Compute Pgrad * Hessian * Pgrad constexpr ScalarValueType ZERO{}; - ScalarValueType tmp_matrix[ImageDimension][ImageDimension]; + ScalarValueType tmp_matrix[ImageDimension][ImageDimension]; for (unsigned int i = 0; i < ImageDimension; ++i) { for (unsigned int j = i; j < ImageDimension; ++j) @@ -100,7 +100,7 @@ LevelSetFunction::ComputeMinimalCurvature(const NeighborhoodType & i const vnl_symmetric_eigensystem eig{ Curve.as_matrix() }; constexpr ScalarValueType MIN_EIG = NumericTraits::min(); - ScalarValueType mincurve = itk::Math::abs(eig.get_eigenvalue(ImageDimension - 1)); + ScalarValueType mincurve = itk::Math::abs(eig.get_eigenvalue(ImageDimension - 1)); for (unsigned int i = 0; i < ImageDimension; ++i) { if (itk::Math::abs(eig.get_eigenvalue(i)) < mincurve && itk::Math::abs(eig.get_eigenvalue(i)) > MIN_EIG) @@ -114,17 +114,17 @@ LevelSetFunction::ComputeMinimalCurvature(const NeighborhoodType & i template auto -LevelSetFunction::Compute3DMinimalCurvature(const NeighborhoodType & neighborhood, - const FloatOffsetType & offset, +LevelSetFunction::Compute3DMinimalCurvature(const NeighborhoodType & neighborhood, + const FloatOffsetType & offset, [[maybe_unused]] GlobalDataStruct * gd) -> ScalarValueType { if constexpr (ImageDimension == 3) { const ScalarValueType mean_curve = this->ComputeMeanCurvature(neighborhood, offset, gd); - constexpr int i0 = 0; - constexpr int i1 = 1; - constexpr int i2 = 2; + constexpr int i0 = 0; + constexpr int i1 = 1; + constexpr int i2 = 2; const ScalarValueType gauss_curve = (2 * (gd->m_dx[i0] * gd->m_dx[i1] * (gd->m_dxy[i2][i0] * gd->m_dxy[i1][i2] - gd->m_dxy[i0][i1] * gd->m_dxy[i2][i2]) + @@ -152,8 +152,8 @@ LevelSetFunction::Compute3DMinimalCurvature(const NeighborhoodType & template auto LevelSetFunction::ComputeMeanCurvature(const NeighborhoodType & itkNotUsed(neighborhood), - const FloatOffsetType & itkNotUsed(offset), - GlobalDataStruct * gd) -> ScalarValueType + const FloatOffsetType & itkNotUsed(offset), + GlobalDataStruct * gd) -> ScalarValueType { // Calculate the mean curvature ScalarValueType curvature_term{}; @@ -275,15 +275,15 @@ LevelSetFunction::Initialize(const RadiusType & r) template auto LevelSetFunction::ComputeUpdate(const NeighborhoodType & it, - void * globalData, - const FloatOffsetType & offset) -> PixelType + void * globalData, + const FloatOffsetType & offset) -> PixelType { // Global data structure auto * gd = (GlobalDataStruct *)globalData; // Compute the Hessian matrix and various other derivatives. Some of these // derivatives may be used by overloaded virtual functions. gd->m_GradMagSqr = 1.0e-6; - const ScalarValueType center_value = it.GetCenterPixel(); + const ScalarValueType center_value = it.GetCenterPixel(); const NeighborhoodScalesType neighborhoodScales = this->ComputeNeighborhoodScales(); for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -313,7 +313,7 @@ LevelSetFunction::ComputeUpdate(const NeighborhoodType & it, } } constexpr ScalarValueType ZERO{}; - ScalarValueType curvature_term{ ZERO }; + ScalarValueType curvature_term{ ZERO }; if (Math::NotAlmostEquals(m_CurvatureWeight, ZERO)) { curvature_term = this->ComputeCurvatureTerm(it, offset, gd) * m_CurvatureWeight * this->CurvatureSpeed(it, offset); diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.h b/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.h index a33bcc88077..2b4340f0f77 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.h +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.h @@ -167,7 +167,7 @@ class ITK_TEMPLATE_EXPORT LevelSetFunctionWithRefitTerm : public LevelSetFunctio /** Constants used in computations. */ static const NeighborhoodSizeValueType m_NumVertex; - static const ScalarValueType m_DimConst; + static const ScalarValueType m_DimConst; }; } // end namespace itk diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx b/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx index 37273de5f2c..1df4c245b50 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx @@ -69,7 +69,7 @@ LevelSetFunctionWithRefitTerm::ComputeCurvature( const NeighborhoodType & neighborhood) const -> ScalarValueType { constexpr NeighborhoodSizeValueType one = 1; - const NeighborhoodSizeValueType center = neighborhood.Size() / 2; + const NeighborhoodSizeValueType center = neighborhood.Size() / 2; const NeighborhoodScalesType neighborhoodScales = this->ComputeNeighborhoodScales(); @@ -141,12 +141,12 @@ LevelSetFunctionWithRefitTerm::ComputeCurvature( template auto LevelSetFunctionWithRefitTerm::PropagationSpeed(const NeighborhoodType & neighborhood, - const FloatOffsetType & offset, - GlobalDataStruct * globaldata) const + const FloatOffsetType & offset, + GlobalDataStruct * globaldata) const -> ScalarValueType { const IndexType idx = neighborhood.GetIndex(); - NodeType * targetnode = m_SparseTargetImage->GetPixel(idx); + NodeType * targetnode = m_SparseTargetImage->GetPixel(idx); ScalarValueType refitterm; if ((targetnode == nullptr) || (targetnode->m_CurvatureFlag == false)) diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.h b/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.h index 6577c8f51a9..81d91285199 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.h +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.h @@ -184,12 +184,12 @@ class ITK_TEMPLATE_EXPORT LevelSetNeighborhoodExtractor : public LightProcessObj LevelSetConstPointer m_InputLevelSet{}; - bool m_NarrowBanding{ false }; - double m_NarrowBandwidth{ 12.0 }; + bool m_NarrowBanding{ false }; + double m_NarrowBandwidth{ 12.0 }; NodeContainerPointer m_InputNarrowBand{}; typename LevelSetImageType::RegionType m_ImageRegion{}; - typename LevelSetImageType::PixelType m_LargeValue{}; + typename LevelSetImageType::PixelType m_LargeValue{}; std::vector m_NodesUsed{}; diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.hxx b/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.hxx index 215c76cd4d6..12613ec8bd9 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.hxx +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.hxx @@ -125,7 +125,7 @@ LevelSetNeighborhoodExtractor::GenerateDataFull() IndexType inputIndex; const SizeValueType totalPixels = m_InputLevelSet->GetBufferedRegion().GetNumberOfPixels(); - SizeValueType updateVisits = totalPixels / 10; + SizeValueType updateVisits = totalPixels / 10; if (updateVisits < 1) { updateVisits = 1; @@ -158,11 +158,11 @@ LevelSetNeighborhoodExtractor::GenerateDataNarrowBand() pointsIter = m_InputNarrowBand->Begin(); pointsEnd = m_InputNarrowBand->End(); - NodeType node; + NodeType node; const double maxValue = m_NarrowBandwidth / 2.0; const SizeValueType totalPixels = m_InputNarrowBand->Size(); - SizeValueType updateVisits = totalPixels / 10; + SizeValueType updateVisits = totalPixels / 10; if (updateVisits < 1) { updateVisits = 1; @@ -191,7 +191,7 @@ LevelSetNeighborhoodExtractor::CalculateDistance(IndexType & index) m_LastPointIsInside = false; typename LevelSetImageType::PixelType centerValue; - PixelType inputPixel = m_InputLevelSet->GetPixel(index); + PixelType inputPixel = m_InputLevelSet->GetPixel(index); centerValue = static_cast(inputPixel); centerValue -= m_LevelSetValue; @@ -208,11 +208,11 @@ LevelSetNeighborhoodExtractor::CalculateDistance(IndexType & index) const bool inside = (centerValue <= 0.0); - IndexType neighIndex = index; + IndexType neighIndex = index; typename LevelSetImageType::PixelType neighValue; - NodeType neighNode; - SpacePrecisionType distance; - SpacePrecisionType spacing; + NodeType neighNode; + SpacePrecisionType distance; + SpacePrecisionType spacing; // In each dimension, find the distance to the zero set // by linear interpolating along the grid line. diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.h b/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.h index 73ab3fcef53..2ec1eefc289 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.h +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.h @@ -134,7 +134,7 @@ class ITK_TEMPLATE_EXPORT LevelSetVelocityNeighborhoodExtractor : public LevelSe private: typename AuxValueContainer::Pointer m_AuxInsideValues{}; typename AuxValueContainer::Pointer m_AuxOutsideValues{}; - AuxImageConstPointer m_AuxImage[VAuxDimension]{}; + AuxImageConstPointer m_AuxImage[VAuxDimension]{}; }; } // namespace itk diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.hxx b/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.hxx index 4a0145200fd..233408ca02f 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.hxx +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.hxx @@ -42,7 +42,7 @@ LevelSetVelocityNeighborhoodExtractor::Leve template void LevelSetVelocityNeighborhoodExtractor::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); os << indent << "Input aux image: ["; @@ -84,8 +84,8 @@ LevelSetVelocityNeighborhoodExtractor::Calc return distance; } - double centerValue[VAuxDimension]; - AuxValueType auxPixel; + double centerValue[VAuxDimension]; + AuxValueType auxPixel; AuxValueVectorType auxVector; for (unsigned int k = 0; k < VAuxDimension; ++k) @@ -107,8 +107,8 @@ LevelSetVelocityNeighborhoodExtractor::Calc return distance; } - double denom = 0.0; - double numer[VAuxDimension]; + double denom = 0.0; + double numer[VAuxDimension]; typename Superclass::NodeType neighNode; for (unsigned int k = 0; k < VAuxDimension; ++k) diff --git a/Modules/Segmentation/LevelSets/include/itkNarrowBandCurvesLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkNarrowBandCurvesLevelSetImageFilter.hxx index 2a3a3269222..17872d52c91 100644 --- a/Modules/Segmentation/LevelSets/include/itkNarrowBandCurvesLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkNarrowBandCurvesLevelSetImageFilter.hxx @@ -38,7 +38,7 @@ NarrowBandCurvesLevelSetImageFilter::Na template void NarrowBandCurvesLevelSetImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Segmentation/LevelSets/include/itkNarrowBandLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkNarrowBandLevelSetImageFilter.hxx index 5b2c7596343..67796b47c90 100644 --- a/Modules/Segmentation/LevelSets/include/itkNarrowBandLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkNarrowBandLevelSetImageFilter.hxx @@ -27,7 +27,7 @@ template ::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Segmentation/LevelSets/include/itkNarrowBandThresholdSegmentationLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkNarrowBandThresholdSegmentationLevelSetImageFilter.hxx index 3f37f5dcc0f..5107a7f8411 100644 --- a/Modules/Segmentation/LevelSets/include/itkNarrowBandThresholdSegmentationLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkNarrowBandThresholdSegmentationLevelSetImageFilter.hxx @@ -36,7 +36,7 @@ template void NarrowBandThresholdSegmentationLevelSetImageFilter::PrintSelf( std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); os << indent << "ThresholdFunction: " << m_ThresholdFunction; diff --git a/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx b/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx index 7ddee5d60f7..e743f50bd8c 100644 --- a/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx +++ b/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx @@ -54,21 +54,21 @@ template void NormalVectorDiffusionFunction::PrecomputeSparseUpdate(NeighborhoodType & it) const { - NodeType * CenterNode = it.GetCenterPixel(); + NodeType * CenterNode = it.GetCenterPixel(); const NormalVectorType CenterPixel = CenterNode->m_Data; const NeighborhoodScalesType neighborhoodScales = this->ComputeNeighborhoodScales(); - SizeValueType stride[ImageDimension]; + SizeValueType stride[ImageDimension]; for (unsigned int j = 0; j < ImageDimension; ++j) { stride[j] = it.GetStride(j); } const auto center = it.Size() / 2; - NormalVectorType flux; + NormalVectorType flux; Vector gradient[ImageDimension]; - NormalVectorType PositiveSidePixel[2]; - NormalVectorType NegativeSidePixel[2]; + NormalVectorType PositiveSidePixel[2]; + NormalVectorType NegativeSidePixel[2]; for (unsigned int i = 0; i < ImageDimension; ++i) // flux offset axis { const auto PreviousNode = it.GetPrevious(i); @@ -168,7 +168,7 @@ NormalVectorDiffusionFunction::ComputeSparseUpdate(Neighborhoo void *, const FloatOffsetType &) const -> NormalVectorType { - const NodeType * CenterNode = it.GetCenterPixel(); + const NodeType * CenterNode = it.GetCenterPixel(); const NormalVectorType CenterPixel = CenterNode->m_Data; const NeighborhoodScalesType neighborhoodScales = this->ComputeNeighborhoodScales(); diff --git a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.h index 60e4102f2c8..ba76c2f96ed 100644 --- a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.h @@ -38,8 +38,8 @@ template class ITK_TEMPLATE_EXPORT ParallelSparseFieldLevelSetNode { public: - TNodeIndexType m_Index; - float m_Value; + TNodeIndexType m_Index; + float m_Value; ParallelSparseFieldLevelSetNode * Next; ParallelSparseFieldLevelSetNode * Previous; }; @@ -124,16 +124,16 @@ class ITK_TEMPLATE_EXPORT ParallelSparseFieldCityBlockNeighborList Print(std::ostream & os, Indent indent) const; private: - char m_Pad1[128]{}; - unsigned int m_Size{ 2 * Dimension }; - RadiusType m_Radius{}; + char m_Pad1[128]{}; + unsigned int m_Size{ 2 * Dimension }; + RadiusType m_Radius{}; std::vector m_ArrayIndex{}; - std::vector m_NeighborhoodOffset{}; + std::vector m_NeighborhoodOffset{}; /** An internal table for keeping track of stride lengths in a neighborhood, * i.e. the memory offsets between pixels along each dimensional axis. */ unsigned int m_StrideTable[Dimension]{}; - char m_Pad2[128]{}; + char m_Pad2[128]{}; }; /** @@ -463,10 +463,10 @@ class ITK_TEMPLATE_EXPORT ParallelSparseFieldLevelSetImageFilter /** */ void - ProcessStatusList(LayerType * InputList, + ProcessStatusList(LayerType * InputList, const StatusType & ChangeToStatus, const StatusType & SearchForStatus, - ThreadIdType ThreadId); + ThreadIdType ThreadId); /** Adjusts the values associated with all the index layers of the sparse * field by propagating out one layer at a time from the active set. This @@ -486,7 +486,7 @@ class ITK_TEMPLATE_EXPORT ParallelSparseFieldLevelSetImageFilter PropagateLayerValues(const StatusType & from, const StatusType & to, const StatusType & promote, - unsigned int InOrOut); + unsigned int InOrOut); /**This method pre-processes pixels inside and outside the sparse field * layers. The default is to set them to positive and negative values, @@ -541,11 +541,11 @@ class ITK_TEMPLATE_EXPORT ParallelSparseFieldLevelSetImageFilter * follows the standard finite difference scheme of scaling the change by the * timestep and adding to the value of the previous iteration. */ inline virtual ValueType - ThreadedCalculateUpdateValue(const ThreadIdType itkNotUsed(ThreadId), - const IndexType itkNotUsed(index), + ThreadedCalculateUpdateValue(const ThreadIdType itkNotUsed(ThreadId), + const IndexType itkNotUsed(index), const TimeStepType & dt, - const ValueType & value, - const ValueType & change) + const ValueType & value, + const ValueType & change) { return (value + static_cast(dt) * change); } @@ -557,7 +557,7 @@ class ITK_TEMPLATE_EXPORT ParallelSparseFieldLevelSetImageFilter virtual void ThreadedProcessPixelEnteringActiveLayer(const IndexType & itkNotUsed(index), const ValueType & itkNotUsed(value), - ThreadIdType itkNotUsed(ThreadId)); + ThreadIdType itkNotUsed(ThreadId)); /** This method is not implemented or necessary for this solver */ void @@ -589,9 +589,9 @@ class ITK_TEMPLATE_EXPORT ParallelSparseFieldLevelSetImageFilter * out of the active layer. */ void ThreadedUpdateActiveLayerValues(const TimeStepType & dt, - LayerType * UpList, - LayerType * DownList, - ThreadIdType ThreadId); + LayerType * UpList, + LayerType * DownList, + ThreadIdType ThreadId); /** Make a copy of the nodes in the FromList and insert them into the ToList. */ @@ -605,10 +605,10 @@ class ITK_TEMPLATE_EXPORT ParallelSparseFieldLevelSetImageFilter /** Make a copy of the nodes given to one thread by its neighbors to process * and insert them into the thread's own list. */ void - CopyInsertInterNeighborNodeTransferBufferLayers(ThreadIdType ThreadId, + CopyInsertInterNeighborNodeTransferBufferLayers(ThreadIdType ThreadId, LayerPointerType List, - unsigned int InOrOut, - unsigned int BufferLayerNumber); + unsigned int InOrOut, + unsigned int BufferLayerNumber); /** Delete all nodes in a thread's own lists which its used to transfer nodes * to neighboring threads. */ @@ -625,12 +625,12 @@ class ITK_TEMPLATE_EXPORT ParallelSparseFieldLevelSetImageFilter * 2. Update the values in the output-image for those nodes that are moving IN the * active layer. */ void - ThreadedProcessFirstLayerStatusLists(unsigned int InputLayerNumber, - unsigned int OutputLayerNumber, + ThreadedProcessFirstLayerStatusLists(unsigned int InputLayerNumber, + unsigned int OutputLayerNumber, const StatusType & SearchForStatus, - unsigned int InOrOut, - unsigned int BufferLayerNumber, - ThreadIdType ThreadId); + unsigned int InOrOut, + unsigned int BufferLayerNumber, + ThreadIdType ThreadId); /** Push each index in the input list into its appropriate status layer * (ChangeToStatus) and update the status image value at that index. @@ -638,31 +638,31 @@ class ITK_TEMPLATE_EXPORT ParallelSparseFieldLevelSetImageFilter * which need to go onto the output list. */ void - ThreadedProcessStatusList(unsigned int InputLayerNumber, - unsigned int OutputLayerNumber, + ThreadedProcessStatusList(unsigned int InputLayerNumber, + unsigned int OutputLayerNumber, const StatusType & ChangeToStatus, const StatusType & SearchForStatus, - unsigned int InOrOut, - unsigned int BufferLayerNumber, - ThreadIdType ThreadId); + unsigned int InOrOut, + unsigned int BufferLayerNumber, + ThreadIdType ThreadId); /** Push each index in the input list into its appropriate status layer * (ChangeToStatus) and ... ... update the status image value at that index */ void - ThreadedProcessOutsideList(unsigned int InputLayerNumber, + ThreadedProcessOutsideList(unsigned int InputLayerNumber, const StatusType & ChangeToStatus, - unsigned int InOrOut, - unsigned int BufferLayerNumber, - ThreadIdType ThreadId); + unsigned int InOrOut, + unsigned int BufferLayerNumber, + ThreadIdType ThreadId); /** */ void ThreadedPropagateLayerValues(const StatusType & from, const StatusType & to, const StatusType & promote, - unsigned int InOrOut, - ThreadIdType ThreadId); + unsigned int InOrOut, + ThreadIdType ThreadId); /** Split the volume uniformly along the chosen dimension for post processing * the output. */ @@ -713,8 +713,8 @@ class ITK_TEMPLATE_EXPORT ParallelSparseFieldLevelSetImageFilter /** Thread-specific data */ std::vector m_TimeStepList{}; - BooleanStdVectorType m_ValidTimeStepList{}; - TimeStepType m_TimeStep{}; + BooleanStdVectorType m_ValidTimeStepList{}; + TimeStepType m_TimeStep{}; /** The number of work units to use. */ ThreadIdType m_NumOfWorkUnits{ 0 }; @@ -746,10 +746,10 @@ class ITK_TEMPLATE_EXPORT ParallelSparseFieldLevelSetImageFilter /** Local data for each individual thread. */ struct ThreadDataUnaligned { - TimeStepType TimeStep; + TimeStepType TimeStep; ThreadRegionType ThreadRegion; - ValueType m_RMSChange; - unsigned int m_Count; + ValueType m_RMSChange; + unsigned int m_Count; /** The layers */ LayerListType m_Layers; @@ -780,7 +780,7 @@ class ITK_TEMPLATE_EXPORT ParallelSparseFieldLevelSetImageFilter * BUT also by the thread's neighbors. So they are NOT truly "local" data. */ int m_Semaphore[2]; - std::mutex m_Lock[2]; + std::mutex m_Lock[2]; std::condition_variable m_Condition[2]; /** Indicates whether to use m_Semaphore[0] or m_Semaphore[1] for diff --git a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx index 38749f58660..ad454ca10f6 100644 --- a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx @@ -41,7 +41,7 @@ ParallelSparseFieldCityBlockNeighborList::ParallelSparseField m_Radius.Fill(1); const NeighborhoodType it(m_Radius, dummy_image, dummy_image->GetRequestedRegion()); - const unsigned int nCenter = it.Size() / 2; + const unsigned int nCenter = it.Size() / 2; m_ArrayIndex.reserve(m_Size); m_NeighborhoodOffset.reserve(m_Size); @@ -224,7 +224,7 @@ ParallelSparseFieldLevelSetImageFilter::Initialize() auto sz = MakeFilled(1); - BFCType faceCalculator; + BFCType faceCalculator; typename BFCType::FaceListType faceList = faceCalculator(m_StatusImage, m_StatusImage->GetRequestedRegion(), sz); // skip the first (nonboundary) region @@ -336,7 +336,7 @@ ParallelSparseFieldLevelSetImageFilter::ConstructActi m_NeighborList.GetRadius(), m_StatusImage, m_OutputImage->GetRequestedRegion()); - typename OutputImageType::SizeType regionSize = m_OutputImage->GetRequestedRegion().GetSize(); + typename OutputImageType::SizeType regionSize = m_OutputImage->GetRequestedRegion().GetSize(); typename OutputImageType::IndexType startIndex = m_OutputImage->GetRequestedRegion().GetIndex(); using StartIndexValueType = IndexValueType; @@ -446,7 +446,7 @@ void ParallelSparseFieldLevelSetImageFilter::InitializeActiveLayerValues() { const ValueType CHANGE_FACTOR = m_ConstantGradientValue / 2.0; - ValueType MIN_NORM = 1.0e-6; + ValueType MIN_NORM = 1.0e-6; if (this->GetUseImageSpacing()) { @@ -522,7 +522,7 @@ void ParallelSparseFieldLevelSetImageFilter::PropagateLayerValues(const StatusType & from, const StatusType & to, const StatusType & promote, - unsigned int InOrOut) + unsigned int InOrOut) { const StatusType past_end = static_cast(m_Layers.size()) - 1; @@ -815,13 +815,13 @@ ParallelSparseFieldLevelSetImageFilter::ThreadedAlloc template void ParallelSparseFieldLevelSetImageFilter::ThreadedInitializeData( - ThreadIdType ThreadId, + ThreadIdType ThreadId, const ThreadRegionType & ThreadRegion) { // divide the lists based on the boundaries for (unsigned int i = 0; i < 2 * static_cast(m_NumberOfLayers) + 1; ++i) { - typename LayerType::Iterator layerIt = m_Layers[i]->Begin(); + typename LayerType::Iterator layerIt = m_Layers[i]->Begin(); const typename LayerType::Iterator layerEnd = m_Layers[i]->End(); while (layerIt != layerEnd) @@ -860,9 +860,9 @@ ParallelSparseFieldLevelSetImageFilter::ThreadedIniti // images and hence the memory will get allocated // in the corresponding thread's memory-node. ImageRegionConstIterator statusIt(m_StatusImage, ThreadRegion); - ImageRegionIterator statusItNew(m_StatusImageTemp, ThreadRegion); + ImageRegionIterator statusItNew(m_StatusImageTemp, ThreadRegion); ImageRegionConstIterator outputIt(m_OutputImage, ThreadRegion); - ImageRegionIterator outputItNew(m_OutputImageTemp, ThreadRegion); + ImageRegionIterator outputItNew(m_OutputImageTemp, ThreadRegion); for (outputIt.GoToBegin(), statusIt.GoToBegin(), outputItNew.GoToBegin(), statusItNew.GoToBegin(); !outputIt.IsAtEnd(); @@ -899,7 +899,7 @@ ParallelSparseFieldLevelSetImageFilter::DeallocateDat for (unsigned int i = 0; i < 2 * static_cast(m_NumberOfLayers) + 1; ++i) { // return all the nodes in layer i to the main node pool - LayerNodeType * nodePtr = nullptr; + LayerNodeType * nodePtr = nullptr; const LayerPointerType layerPtr = m_Layers[i]; while (!layerPtr->Empty()) { @@ -932,7 +932,7 @@ ParallelSparseFieldLevelSetImageFilter::DeallocateDat for (unsigned int i = 0; i < 2 * static_cast(m_NumberOfLayers) + 1; ++i) { // return all the nodes in layer i to thread-i's node pool - LayerNodeType * nodePtr; + LayerNodeType * nodePtr; const LayerPointerType layerPtr = m_Data[ThreadId].m_Layers[i]; while (!layerPtr->Empty()) { @@ -955,7 +955,7 @@ ParallelSparseFieldLevelSetImageFilter::DeallocateDat continue; } - LayerNodeType * nodePtr; + LayerNodeType * nodePtr; const LayerPointerType layerPtr = m_Data[ThreadId].m_LoadTransferBufferLayers[i][tid]; while (!layerPtr->Empty()) @@ -1215,8 +1215,8 @@ ParallelSparseFieldLevelSetImageFilter::ThreadedCalcu -> TimeStepType { const typename FiniteDifferenceFunctionType::Pointer df = this->GetDifferenceFunction(); - ValueType centerValue = 0.0; - ValueType MIN_NORM = 1.0e-6; + ValueType centerValue = 0.0; + ValueType MIN_NORM = 1.0e-6; if (this->GetUseImageSpacing()) { const auto & spacing = this->GetInput()->GetSpacing(); @@ -1244,7 +1244,7 @@ ParallelSparseFieldLevelSetImageFilter::ThreadedCalcu // the level set function to the output image (level set image) at each // index. - typename LayerType::Iterator layerIt = m_Data[ThreadId].m_Layers[0]->Begin(); + typename LayerType::Iterator layerIt = m_Data[ThreadId].m_Layers[0]->Begin(); const typename LayerType::Iterator layerEnd = m_Data[ThreadId].m_Layers[0]->End(); for (; layerIt != layerEnd; ++layerIt) @@ -1324,7 +1324,7 @@ ParallelSparseFieldLevelSetImageFilter::ThreadedCalcu template void ParallelSparseFieldLevelSetImageFilter::ThreadedApplyUpdate(const TimeStepType & dt, - ThreadIdType ThreadId) + ThreadIdType ThreadId) { this->ThreadedUpdateActiveLayerValues(dt, m_Data[ThreadId].UpList[0], m_Data[ThreadId].DownList[0], ThreadId); @@ -1349,10 +1349,10 @@ ParallelSparseFieldLevelSetImageFilter::ThreadedApply this->SignalNeighborsAndWait(ThreadId); - StatusType up_to = 1; - StatusType up_search = 5; - StatusType down_to = 2; - StatusType down_search = 6; + StatusType up_to = 1; + StatusType up_search = 5; + StatusType down_to = 2; + StatusType down_search = 6; unsigned char j = 0; unsigned char k = 1; @@ -1418,9 +1418,9 @@ template void ParallelSparseFieldLevelSetImageFilter::ThreadedUpdateActiveLayerValues( const TimeStepType & dt, - LayerType * UpList, - LayerType * DownList, - ThreadIdType ThreadId) + LayerType * UpList, + LayerType * DownList, + ThreadIdType ThreadId) { // This method scales the update buffer values by the time step and adds // them to the active layer pixels. New values at an index which fall @@ -1438,7 +1438,7 @@ ParallelSparseFieldLevelSetImageFilter::ThreadedUpdat const unsigned int Neighbor_Size = m_NeighborList.GetSize(); - typename LayerType::Iterator layerIt = m_Data[ThreadId].m_Layers[0]->Begin(); + typename LayerType::Iterator layerIt = m_Data[ThreadId].m_Layers[0]->Begin(); const typename LayerType::Iterator layerEnd = m_Data[ThreadId].m_Layers[0]->End(); while (layerIt != layerEnd) @@ -1560,11 +1560,11 @@ ParallelSparseFieldLevelSetImageFilter::ThreadedUpdat template void -ParallelSparseFieldLevelSetImageFilter::CopyInsertList(ThreadIdType ThreadId, +ParallelSparseFieldLevelSetImageFilter::CopyInsertList(ThreadIdType ThreadId, LayerPointerType FromListPtr, LayerPointerType ToListPtr) { - typename LayerType::Iterator layerIt = FromListPtr->Begin(); + typename LayerType::Iterator layerIt = FromListPtr->Begin(); const typename LayerType::Iterator layerEnd = FromListPtr->End(); while (layerIt != layerEnd) @@ -1583,7 +1583,7 @@ ParallelSparseFieldLevelSetImageFilter::CopyInsertLis template void -ParallelSparseFieldLevelSetImageFilter::ClearList(ThreadIdType ThreadId, +ParallelSparseFieldLevelSetImageFilter::ClearList(ThreadIdType ThreadId, LayerPointerType ListPtr) { while (!ListPtr->Empty()) @@ -1599,10 +1599,10 @@ ParallelSparseFieldLevelSetImageFilter::ClearList(Thr template void ParallelSparseFieldLevelSetImageFilter::CopyInsertInterNeighborNodeTransferBufferLayers( - ThreadIdType ThreadId, + ThreadIdType ThreadId, LayerPointerType List, - unsigned int InOrOut, - unsigned int BufferLayerNumber) + unsigned int InOrOut, + unsigned int BufferLayerNumber) { if (ThreadId != 0) { @@ -1637,19 +1637,19 @@ ParallelSparseFieldLevelSetImageFilter::ClearInterNei template void ParallelSparseFieldLevelSetImageFilter::ThreadedProcessFirstLayerStatusLists( - unsigned int InputLayerNumber, - unsigned int OutputLayerNumber, + unsigned int InputLayerNumber, + unsigned int OutputLayerNumber, const StatusType & SearchForStatus, - unsigned int InOrOut, - unsigned int BufferLayerNumber, - ThreadIdType ThreadId) + unsigned int InOrOut, + unsigned int BufferLayerNumber, + ThreadIdType ThreadId) { const unsigned int neighbor_Size = m_NeighborList.GetSize(); // InOrOut == 1, inside, more negative, uplist // InOrOut == 0, outside - StatusType from = 1; - ValueType delta = m_ConstantGradientValue; + StatusType from = 1; + ValueType delta = m_ConstantGradientValue; LayerPointerType InputList; LayerPointerType OutputList; if (InOrOut == 1) @@ -1672,7 +1672,7 @@ ParallelSparseFieldLevelSetImageFilter::ThreadedProce // for all neighbors i ... and insert it in one's own InputList CopyInsertInterNeighborNodeTransferBufferLayers(ThreadId, InputList, InOrOut, BufferLayerNumber - 1); - typename LayerType::Iterator layerIt = InputList->Begin(); + typename LayerType::Iterator layerIt = InputList->Begin(); const typename LayerType::Iterator layerEnd = InputList->End(); while (layerIt != layerEnd) { @@ -1774,7 +1774,7 @@ void ParallelSparseFieldLevelSetImageFilter::ThreadedProcessPixelEnteringActiveLayer( const IndexType & itkNotUsed(index), const ValueType & itkNotUsed(value), - ThreadIdType itkNotUsed(ThreadId)) + ThreadIdType itkNotUsed(ThreadId)) { // This function can be overridden in the derived classes to process pixels // entering the active layer. @@ -1783,13 +1783,13 @@ ParallelSparseFieldLevelSetImageFilter::ThreadedProce template void ParallelSparseFieldLevelSetImageFilter::ThreadedProcessStatusList( - unsigned int InputLayerNumber, - unsigned int OutputLayerNumber, + unsigned int InputLayerNumber, + unsigned int OutputLayerNumber, const StatusType & ChangeToStatus, const StatusType & SearchForStatus, - unsigned int InOrOut, - unsigned int BufferLayerNumber, - ThreadIdType ThreadId) + unsigned int InOrOut, + unsigned int BufferLayerNumber, + ThreadIdType ThreadId) { // Push each index in the input list into its appropriate status layer // (ChangeToStatus) and update the status image value at that index. @@ -1898,11 +1898,11 @@ ParallelSparseFieldLevelSetImageFilter::ThreadedProce template void ParallelSparseFieldLevelSetImageFilter::ThreadedProcessOutsideList( - unsigned int InputLayerNumber, + unsigned int InputLayerNumber, const StatusType & ChangeToStatus, - unsigned int InOrOut, - unsigned int BufferLayerNumber, - ThreadIdType ThreadId) + unsigned int InOrOut, + unsigned int BufferLayerNumber, + ThreadIdType ThreadId) { LayerPointerType OutsideList; if (InOrOut == 1) @@ -1946,16 +1946,16 @@ ParallelSparseFieldLevelSetImageFilter::ThreadedPropa const StatusType & from, const StatusType & to, const StatusType & promote, - unsigned int InOrOut, - ThreadIdType ThreadId) + unsigned int InOrOut, + ThreadIdType ThreadId) { const StatusType past_end = static_cast(m_Layers.size()) - 1; // Are we propagating values inward (more negative) or outward (more positive)? const ValueType delta = (InOrOut == 1) ? -m_ConstantGradientValue : m_ConstantGradientValue; - const unsigned int Neighbor_Size = m_NeighborList.GetSize(); - typename LayerType::Iterator toIt = m_Data[ThreadId].m_Layers[to]->Begin(); + const unsigned int Neighbor_Size = m_NeighborList.GetSize(); + typename LayerType::Iterator toIt = m_Data[ThreadId].m_Layers[to]->Begin(); const typename LayerType::Iterator toEnd = m_Data[ThreadId].m_Layers[to]->End(); while (toIt != toEnd) @@ -1977,10 +1977,10 @@ ParallelSparseFieldLevelSetImageFilter::ThreadedPropa } ValueType value = m_ValueZero; - bool found_neighbor_flag = false; + bool found_neighbor_flag = false; for (unsigned int i = 0; i < Neighbor_Size; ++i) { - const IndexType nIndex = centerIndex + m_NeighborList.GetNeighborhoodOffset(i); + const IndexType nIndex = centerIndex + m_NeighborList.GetNeighborhoodOffset(i); const StatusType nStatus = m_StatusImage->GetPixel(nIndex); // If this neighbor is in the "from" list, compare its absolute value // to any previous values found in the "from" list. Keep only the @@ -2196,7 +2196,7 @@ ParallelSparseFieldLevelSetImageFilter::ThreadedLoadB // for all layers for (i = 0; i < 2 * static_cast(m_NumberOfLayers) + 1; ++i) { - typename LayerType::Iterator layerIt = m_Data[ThreadId].m_Layers[i]->Begin(); + typename LayerType::Iterator layerIt = m_Data[ThreadId].m_Layers[i]->Begin(); const typename LayerType::Iterator layerEnd = m_Data[ThreadId].m_Layers[i]->End(); while (layerIt != layerEnd) @@ -2247,7 +2247,7 @@ ParallelSparseFieldLevelSetImageFilter::ThreadedLoadB template void ParallelSparseFieldLevelSetImageFilter::GetThreadRegionSplitByBoundary( - ThreadIdType ThreadId, + ThreadIdType ThreadId, ThreadRegionType & ThreadRegion) { // Initialize the ThreadRegion to the output's requested region @@ -2279,7 +2279,7 @@ ParallelSparseFieldLevelSetImageFilter::GetThreadRegi template void ParallelSparseFieldLevelSetImageFilter::GetThreadRegionSplitUniformly( - ThreadIdType ThreadId, + ThreadIdType ThreadId, ThreadRegionType & ThreadRegion) { // Initialize the ThreadRegion to the output's requested region @@ -2313,12 +2313,12 @@ ParallelSparseFieldLevelSetImageFilter::ThreadedPostP // with value less than the innermost layer. Assign background pixels // OUTSIDE the sparse field layers to a new level set with value greater than // the outermost layer. - const auto max_layer = static_cast(m_NumberOfLayers); + const auto max_layer = static_cast(m_NumberOfLayers); const ValueType outside_value = (max_layer + 1) * m_ConstantGradientValue; const ValueType inside_value = -(max_layer + 1) * m_ConstantGradientValue; ImageRegionConstIterator statusIt(m_StatusImage, regionToProcess); - ImageRegionIterator outputIt(m_OutputImage, regionToProcess); + ImageRegionIterator outputIt(m_OutputImage, regionToProcess); for (outputIt.GoToBegin(), statusIt.GoToBegin(); !outputIt.IsAtEnd(); ++outputIt, ++statusIt) { @@ -2399,7 +2399,7 @@ void ParallelSparseFieldLevelSetImageFilter::SignalNeighbor(unsigned int SemaphoreArrayNumber, ThreadIdType ThreadId) { - ThreadData & td = m_Data[ThreadId]; + ThreadData & td = m_Data[ThreadId]; const std::lock_guard lockGuard(td.m_Lock[SemaphoreArrayNumber]); ++td.m_Semaphore[SemaphoreArrayNumber]; td.m_Condition[SemaphoreArrayNumber].notify_one(); @@ -2410,7 +2410,7 @@ void ParallelSparseFieldLevelSetImageFilter::WaitForNeighbor(unsigned int SemaphoreArrayNumber, ThreadIdType ThreadId) { - ThreadData & td = m_Data[ThreadId]; + ThreadData & td = m_Data[ThreadId]; std::unique_lock mutexHolder(td.m_Lock[SemaphoreArrayNumber]); if (td.m_Semaphore[SemaphoreArrayNumber] == 0) { diff --git a/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.h index 6994009733c..81c6d449be2 100644 --- a/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.h @@ -176,9 +176,9 @@ class ITK_TEMPLATE_EXPORT ReinitializeLevelSetImageFilter : public ImageToImageF typename FastMarchingImageFilterType::Pointer m_Marcher{}; - bool m_NarrowBanding{}; - double m_InputNarrowBandwidth{}; - double m_OutputNarrowBandwidth{}; + bool m_NarrowBanding{}; + double m_InputNarrowBandwidth{}; + double m_OutputNarrowBandwidth{}; NodeContainerPointer m_InputNarrowBand{}; NodeContainerPointer m_OutputNarrowBand{}; }; diff --git a/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.hxx index af75a1279be..7ab9c170a65 100644 --- a/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.hxx @@ -134,15 +134,15 @@ void ReinitializeLevelSetImageFilter::GenerateDataFull() { const LevelSetConstPointer inputPtr = this->GetInput(); - const LevelSetPointer outputPtr = this->GetOutput(); - const LevelSetPointer tempLevelSet = m_Marcher->GetOutput(); + const LevelSetPointer outputPtr = this->GetOutput(); + const LevelSetPointer tempLevelSet = m_Marcher->GetOutput(); // define iterators using IteratorType = ImageRegionIterator; using ConstIteratorType = ImageRegionConstIterator; ConstIteratorType inputIt(inputPtr, inputPtr->GetBufferedRegion()); - IteratorType outputIt(outputPtr, outputPtr->GetBufferedRegion()); + IteratorType outputIt(outputPtr, outputPtr->GetBufferedRegion()); IteratorType tempIt; @@ -206,8 +206,8 @@ void ReinitializeLevelSetImageFilter::GenerateDataNarrowBand() { const LevelSetConstPointer inputPtr = this->GetInput(); - const LevelSetPointer outputPtr = this->GetOutput(); - const LevelSetPointer tempLevelSet = m_Marcher->GetOutput(); + const LevelSetPointer outputPtr = this->GetOutput(); + const LevelSetPointer tempLevelSet = m_Marcher->GetOutput(); // define iterators using IteratorType = ImageRegionIterator; @@ -282,7 +282,7 @@ ReinitializeLevelSetImageFilter::GenerateDataNarrowBand() pointsIt = procPoints->Begin(); pointsEnd = procPoints->End(); - NodeType node; + NodeType node; PixelType inPixel; for (; pointsIt != pointsEnd; ++pointsIt) diff --git a/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetFunction.hxx b/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetFunction.hxx index 2924aad6ba0..8d7190c6099 100644 --- a/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetFunction.hxx +++ b/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetFunction.hxx @@ -77,7 +77,7 @@ SegmentationLevelSetFunction::AllocateAdvectionIm template auto SegmentationLevelSetFunction::PropagationSpeed(const NeighborhoodType & neighborhood, - const FloatOffsetType & offset, + const FloatOffsetType & offset, GlobalDataStruct *) const -> ScalarValueType { @@ -103,10 +103,10 @@ SegmentationLevelSetFunction::PropagationSpeed(co template auto SegmentationLevelSetFunction::AdvectionField(const NeighborhoodType & neighborhood, - const FloatOffsetType & offset, + const FloatOffsetType & offset, GlobalDataStruct *) const -> VectorType { - IndexType idx = neighborhood.GetIndex(); + IndexType idx = neighborhood.GetIndex(); ContinuousIndexType cdx; for (unsigned int i = 0; i < ImageDimension; ++i) diff --git a/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.hxx index e1646200c2b..a3a367db534 100644 --- a/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.hxx @@ -105,7 +105,7 @@ SegmentationLevelSetImageFilter::G template void SegmentationLevelSetImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetFunction.h index 367696d82db..df000170065 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetFunction.h @@ -106,8 +106,8 @@ class ITK_TEMPLATE_EXPORT ShapeDetectionLevelSetFunction /** The curvature speed is same as the propagation speed. */ ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood, - const FloatOffsetType & offset, - GlobalDataStruct * gd) const override + const FloatOffsetType & offset, + GlobalDataStruct * gd) const override { return this->PropagationSpeed(neighborhood, offset, gd); } diff --git a/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetImageFilter.hxx index 097e7e60b5a..2b008ea3b4b 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetImageFilter.hxx @@ -38,7 +38,7 @@ ShapeDetectionLevelSetImageFilter::Shap template void ShapeDetectionLevelSetImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); itkPrintSelfObjectMacro(ShapeDetectionFunction); diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.h b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.h index 8c3fc4f21b8..5815c2df61f 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.h @@ -153,8 +153,8 @@ class ITK_TEMPLATE_EXPORT ShapePriorMAPCostFunction : public ShapePriorMAPCostFu PrintSelf(std::ostream & os, Indent indent) const override; private: - ArrayType m_ShapeParameterMeans{}; - ArrayType m_ShapeParameterStandardDeviations{}; + ArrayType m_ShapeParameterMeans{}; + ArrayType m_ShapeParameterStandardDeviations{}; WeightsType m_Weights{}; typename GaussianKernelFunction::Pointer m_GaussianFunction{}; diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.hxx b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.hxx index f7c84eba4b4..484d76df9e1 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.hxx +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.hxx @@ -53,7 +53,7 @@ ShapePriorMAPCostFunction::ComputeLogInsideTerm(con { this->m_ShapeFunction->SetParameters(parameters); - typename NodeContainerType::ConstIterator iter = this->GetActiveRegion()->Begin(); + typename NodeContainerType::ConstIterator iter = this->GetActiveRegion()->Begin(); const typename NodeContainerType::ConstIterator end = this->GetActiveRegion()->End(); MeasureType counter = 0.0; @@ -62,7 +62,7 @@ ShapePriorMAPCostFunction::ComputeLogInsideTerm(con // current shape while (iter != end) { - NodeType node = iter.Value(); + NodeType node = iter.Value(); typename ShapeFunctionType::PointType point; this->GetFeatureImage()->TransformIndexToPhysicalPoint(node.GetIndex(), point); @@ -110,9 +110,9 @@ ShapePriorMAPCostFunction::ComputeLogGradientTerm(c { this->m_ShapeFunction->SetParameters(parameters); - typename NodeContainerType::ConstIterator iter = this->GetActiveRegion()->Begin(); + typename NodeContainerType::ConstIterator iter = this->GetActiveRegion()->Begin(); const typename NodeContainerType::ConstIterator end = this->GetActiveRegion()->End(); - MeasureType sum = 0.0; + MeasureType sum = 0.0; // Assume that ( 1 - FeatureImage ) approximates a Gaussian (zero mean, unit // variance) @@ -121,7 +121,7 @@ ShapePriorMAPCostFunction::ComputeLogGradientTerm(c // the Gaussian. while (iter != end) { - NodeType node = iter.Value(); + NodeType node = iter.Value(); typename ShapeFunctionType::PointType point; this->GetFeatureImage()->TransformIndexToPhysicalPoint(node.GetIndex(), point); diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.h index 5523ba4da18..2f51032fcb7 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.h @@ -119,7 +119,7 @@ class ITK_TEMPLATE_EXPORT ShapePriorSegmentationLevelSetFunction /** Compute the equation value with the additional shape prior term. */ PixelType ComputeUpdate(const NeighborhoodType & neighborhood, - void * gd, + void * gd, const FloatOffsetType & = FloatOffsetType(0.0)) override; /** Compute global time step from the global data structure. */ @@ -162,7 +162,7 @@ class ITK_TEMPLATE_EXPORT ShapePriorSegmentationLevelSetFunction private: ShapeFunctionPointer m_ShapeFunction{}; - ScalarValueType m_ShapePriorWeight{}; + ScalarValueType m_ShapePriorWeight{}; }; } // end namespace itk diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.hxx b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.hxx index 4e10c25fa34..fb456ffa2ab 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.hxx +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.hxx @@ -47,8 +47,8 @@ template auto ShapePriorSegmentationLevelSetFunction::ComputeUpdate( const NeighborhoodType & neighborhood, - void * gd, - const FloatOffsetType & offset) -> PixelType + void * gd, + const FloatOffsetType & offset) -> PixelType { // Compute the generic level set update using superclass PixelType value = this->Superclass::ComputeUpdate(neighborhood, gd, offset); @@ -56,7 +56,7 @@ ShapePriorSegmentationLevelSetFunction::ComputeUp // Add the shape prior term if (m_ShapeFunction && Math::NotExactlyEquals(m_ShapePriorWeight, ScalarValueType{})) { - IndexType idx = neighborhood.GetIndex(); + IndexType idx = neighborhood.GetIndex(); ContinuousIndex cdx; for (unsigned int i = 0; i < ImageDimension; ++i) { diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.h index bbed9d2620b..ee8d373b23f 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.h @@ -192,10 +192,10 @@ class ITK_TEMPLATE_EXPORT ShapePriorSegmentationLevelSetImageFilter private: ShapeFunctionPointer m_ShapeFunction{}; - CostFunctionPointer m_CostFunction{}; - OptimizerPointer m_Optimizer{}; - ParametersType m_InitialParameters{}; - ParametersType m_CurrentParameters{}; + CostFunctionPointer m_CostFunction{}; + OptimizerPointer m_Optimizer{}; + ParametersType m_InitialParameters{}; + ParametersType m_CurrentParameters{}; ShapePriorSegmentationFunctionType * m_ShapePriorSegmentationFunction{}; }; diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx index bc0f05a2df4..dc125845882 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx @@ -152,7 +152,7 @@ ShapePriorSegmentationLevelSetImageFilterGetDifferenceFunction(); typename Superclass::LayerType::ConstIterator layerIt; - NeighborhoodIterator outputIt( + NeighborhoodIterator outputIt( df->GetRadius(), this->GetOutput(), this->GetOutput()->GetRequestedRegion()); unsigned int counter = 0; diff --git a/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.h index bed9d090a05..1db5c2f70f5 100644 --- a/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.h @@ -356,7 +356,7 @@ class ITK_TEMPLATE_EXPORT SparseFieldFourthOrderLevelSetImageFilter /** Constants used in the computations. */ static const SizeValueType m_NumVertex; - static const ValueType m_DimConst; + static const ValueType m_DimConst; }; } // end namespace itk diff --git a/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.hxx index d6f2fe1b2b9..2e98b2bbb23 100644 --- a/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.hxx @@ -84,9 +84,9 @@ auto SparseFieldFourthOrderLevelSetImageFilter::ComputeCurvatureFromSparseImageNeighborhood( SparseImageIteratorType & it) const -> ValueType { - constexpr SizeValueType one = 1; - const SizeValueType center = it.Size() / 2; - bool flag = false; + constexpr SizeValueType one = 1; + const SizeValueType center = it.Size() / 2; + bool flag = false; const NeighborhoodScalesType neighborhoodScales = this->GetDifferenceFunction()->ComputeNeighborhoodScales(); SizeValueType stride[ImageDimension]; @@ -142,7 +142,7 @@ template void SparseFieldFourthOrderLevelSetImageFilter::ComputeCurvatureTarget( const OutputImageType * distanceImage, - SparseImageType * sparseImage) const + SparseImageType * sparseImage) const { using DistanceImageIteratorType = ImageRegionConstIterator; @@ -159,7 +159,7 @@ SparseFieldFourthOrderLevelSetImageFilter::ComputeCur while (!distanceImageIterator.IsAtEnd()) { const ValueType distance = distanceImageIterator.Value(); - NodeType * node = sparseImageIterator.GetCenterPixel(); + NodeType * node = sparseImageIterator.GetCenterPixel(); if ((distance >= -m_CurvatureBandWidth) && (distance <= m_CurvatureBandWidth)) { node->m_Curvature = ComputeCurvatureFromSparseImageNeighborhood(sparseImageIterator); @@ -182,7 +182,7 @@ bool SparseFieldFourthOrderLevelSetImageFilter::ActiveLayerCheckBand() const { const typename SparseImageType::Pointer im = m_LevelSetFunction->GetSparseTargetImage(); - bool flag = false; + bool flag = false; typename LayerType::Iterator layerIt = this->m_Layers[0]->Begin(); while (layerIt != this->m_Layers[0]->End()) @@ -205,7 +205,7 @@ SparseFieldFourthOrderLevelSetImageFilter::ProcessNor { auto temp = static_cast(ImageDimension); - const typename NormalVectorFilterType::Pointer NormalVectorFilter = NormalVectorFilterType::New(); + const typename NormalVectorFilterType::Pointer NormalVectorFilter = NormalVectorFilterType::New(); const typename NormalVectorFunctionType::Pointer NormalVectorFunction = NormalVectorFunctionType::New(); NormalVectorFunction->SetNormalProcessType(m_NormalProcessType); NormalVectorFunction->SetConductanceParameter(m_NormalProcessConductance); @@ -220,7 +220,7 @@ SparseFieldFourthOrderLevelSetImageFilter::ProcessNor // on into a temporary image to use as the input to the mini-pipeline. This // avoids a complete copy of the image. const typename OutputImageType::Pointer phi = this->GetOutput(); - auto tmp = OutputImageType::New(); + auto tmp = OutputImageType::New(); tmp->SetRequestedRegion(phi->GetRequestedRegion()); tmp->SetBufferedRegion(phi->GetBufferedRegion()); tmp->SetLargestPossibleRegion(phi->GetLargestPossibleRegion()); diff --git a/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.h index 5449b5617e2..90606e9557d 100644 --- a/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.h @@ -36,7 +36,7 @@ template class ITK_TEMPLATE_EXPORT SparseFieldLevelSetNode { public: - TValue m_Value; + TValue m_Value; SparseFieldLevelSetNode * Next; SparseFieldLevelSetNode * Previous; }; @@ -115,10 +115,10 @@ class ITK_TEMPLATE_EXPORT SparseFieldCityBlockNeighborList Print(std::ostream & os, Indent indent) const; private: - unsigned int m_Size; - RadiusType m_Radius; + unsigned int m_Size; + RadiusType m_Radius; std::vector m_ArrayIndex; - std::vector m_NeighborhoodOffset; + std::vector m_NeighborhoodOffset; /** An internal table for keeping track of stride lengths in a neighborhood, i.e. the memory offsets between pixels along each dimensional axis. */ @@ -351,10 +351,10 @@ class ITK_TEMPLATE_EXPORT SparseFieldLevelSetImageFilter : public FiniteDifferen * follows the standard finite difference scheme of scaling the change by the * timestep and adding to the value of the previous iteration. */ inline virtual ValueType - CalculateUpdateValue(const IndexType & itkNotUsed(idx), + CalculateUpdateValue(const IndexType & itkNotUsed(idx), const TimeStepType & dt, - const ValueType & value, - const ValueType & change) + const ValueType & value, + const ValueType & change) { return (value + dt * change); } @@ -441,8 +441,8 @@ class ITK_TEMPLATE_EXPORT SparseFieldLevelSetImageFilter : public FiniteDifferen void ProcessStatusList(LayerType * InputList, LayerType * OutputList, - StatusType ChangeToStatus, - StatusType SearchForStatus); + StatusType ChangeToStatus, + StatusType SearchForStatus); /** */ void @@ -526,7 +526,7 @@ class ITK_TEMPLATE_EXPORT SparseFieldLevelSetImageFilter : public FiniteDifferen bool m_InterpolateSurfaceLocation{ true }; const InputImageType * m_InputImage{}; - OutputImageType * m_OutputImage{}; + OutputImageType * m_OutputImage{}; private: /** This flag is true when methods need to check boundary conditions and diff --git a/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx index 8d59f228019..48849abc8fe 100644 --- a/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx @@ -37,7 +37,7 @@ SparseFieldCityBlockNeighborList::SparseFieldCityBlockNeighbo m_Radius.Fill(1); const NeighborhoodType it(m_Radius, dummy_image, dummy_image->GetRequestedRegion()); - const unsigned int nCenter = it.Size() / 2; + const unsigned int nCenter = it.Size() / 2; m_Size = 2 * Dimension; m_ArrayIndex.reserve(m_Size); @@ -154,10 +154,10 @@ SparseFieldLevelSetImageFilter::ApplyUpdate(const Tim this->ProcessStatusList(UpList[0], UpList[1], 2, 1); this->ProcessStatusList(DownList[0], DownList[1], 1, 2); - StatusType down_to = 0; - StatusType up_to = 0; - StatusType up_search = 3; - StatusType down_search = 4; + StatusType down_to = 0; + StatusType up_to = 0; + StatusType up_search = 3; + StatusType down_search = 4; unsigned int j = 1; unsigned int k = 0; while (down_search < static_cast(m_Layers.size())) @@ -202,7 +202,7 @@ SparseFieldLevelSetImageFilter::ApplyUpdate(const Tim template void SparseFieldLevelSetImageFilter::ProcessOutsideList(LayerType * OutsideList, - StatusType ChangeToStatus) + StatusType ChangeToStatus) { LayerNodeType * node; @@ -221,8 +221,8 @@ template void SparseFieldLevelSetImageFilter::ProcessStatusList(LayerType * InputList, LayerType * OutputList, - StatusType ChangeToStatus, - StatusType SearchForStatus) + StatusType ChangeToStatus, + StatusType SearchForStatus) { NeighborhoodIterator statusIt( @@ -275,8 +275,8 @@ SparseFieldLevelSetImageFilter::ProcessStatusList(Lay template void SparseFieldLevelSetImageFilter::UpdateActiveLayerValues(TimeStepType dt, - LayerType * UpList, - LayerType * DownList) + LayerType * UpList, + LayerType * DownList) { // This method scales the update buffer values by the time step and adds // them to the active layer pixels. New values at an index which fall @@ -302,10 +302,10 @@ SparseFieldLevelSetImageFilter::UpdateActiveLayerValu statusIt.NeedToUseBoundaryConditionOff(); } - unsigned int counter = 0; - ValueType rms_change_accumulator = m_ValueZero; + unsigned int counter = 0; + ValueType rms_change_accumulator = m_ValueZero; typename LayerType::Iterator layerIt = m_Layers[0]->Begin(); - auto updateIt = m_UpdateBuffer.begin(); + auto updateIt = m_UpdateBuffer.begin(); while (layerIt != m_Layers[0]->End()) { outputIt.SetLocation(layerIt->m_Value); @@ -351,7 +351,7 @@ SparseFieldLevelSetImageFilter::UpdateActiveLayerValu for (unsigned int i = 0; i < m_NeighborList.GetSize(); ++i) { const unsigned int idx = m_NeighborList.GetArrayIndex(i); - const StatusType neighbor_status = statusIt.GetPixel(idx); + const StatusType neighbor_status = statusIt.GetPixel(idx); if (neighbor_status == 1) { // Keep the smallest possible value for the new active node. This @@ -402,7 +402,7 @@ SparseFieldLevelSetImageFilter::UpdateActiveLayerValu for (unsigned int i = 0; i < m_NeighborList.GetSize(); ++i) { const unsigned int idx = m_NeighborList.GetArrayIndex(i); - const StatusType neighbor_status = statusIt.GetPixel(idx); + const StatusType neighbor_status = statusIt.GetPixel(idx); if (neighbor_status == 2) { // Keep the smallest magnitude value for this active set node. This @@ -520,7 +520,7 @@ SparseFieldLevelSetImageFilter::Initialize() auto sz = MakeFilled(1); - BFCType faceCalculator; + BFCType faceCalculator; typename BFCType::FaceListType faceList = faceCalculator(m_StatusImage, m_StatusImage->GetRequestedRegion(), sz); // skip the first (nonboundary) region @@ -689,7 +689,7 @@ SparseFieldLevelSetImageFilter::ConstructActiveLayer( // Assign to first inside layer --> 1 // Assign to first inside layer -- 2 const StatusType layer_number = (value < m_ValueZero) ? 1 : 2; - bool bounds_status; + bool bounds_status; statusIt.SetPixel(m_NeighborList.GetArrayIndex(i), layer_number, bounds_status); if (bounds_status) // In bounds. { @@ -740,7 +740,7 @@ void SparseFieldLevelSetImageFilter::InitializeActiveLayerValues() { const ValueType CHANGE_FACTOR = m_ConstantGradientValue / 2.0; - ValueType MIN_NORM = 1.0e-6; + ValueType MIN_NORM = 1.0e-6; if (this->GetUseImageSpacing()) { @@ -758,7 +758,7 @@ SparseFieldLevelSetImageFilter::InitializeActiveLayer ConstNeighborhoodIterator shiftedIt( m_NeighborList.GetRadius(), m_ShiftedImage, this->m_OutputImage->GetRequestedRegion()); - const unsigned int center = shiftedIt.Size() / 2; + const unsigned int center = shiftedIt.Size() / 2; const typename OutputImageType::Pointer output = this->m_OutputImage; const NeighborhoodScalesType neighborhoodScales = this->GetDifferenceFunction()->ComputeNeighborhoodScales(); @@ -940,7 +940,7 @@ void SparseFieldLevelSetImageFilter::PropagateLayerValues(StatusType from, StatusType to, StatusType promote, - int InOrOut) + int InOrOut) { // Are we propagating values inward (more negative) or outward (more // positive)? @@ -957,7 +957,7 @@ SparseFieldLevelSetImageFilter::PropagateLayerValues( statusIt.NeedToUseBoundaryConditionOff(); } - auto value = ValueType{}; + auto value = ValueType{}; const StatusType past_end = static_cast(m_Layers.size()) - 1; auto toIt = m_Layers[to]->Begin(); diff --git a/Modules/Segmentation/LevelSets/include/itkThresholdSegmentationLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkThresholdSegmentationLevelSetFunction.h index b806da8379e..df52e6ffa91 100644 --- a/Modules/Segmentation/LevelSets/include/itkThresholdSegmentationLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkThresholdSegmentationLevelSetFunction.h @@ -206,10 +206,10 @@ class ITK_TEMPLATE_EXPORT ThresholdSegmentationLevelSetFunction FeatureScalarType m_UpperThreshold{}; FeatureScalarType m_LowerThreshold{}; - ScalarValueType m_EdgeWeight{}; - ScalarValueType m_SmoothingConductance{}; - int m_SmoothingIterations{}; - ScalarValueType m_SmoothingTimeStep{}; + ScalarValueType m_EdgeWeight{}; + ScalarValueType m_SmoothingConductance{}; + int m_SmoothingIterations{}; + ScalarValueType m_SmoothingTimeStep{}; }; } // end namespace itk diff --git a/Modules/Segmentation/LevelSets/include/itkThresholdSegmentationLevelSetFunction.hxx b/Modules/Segmentation/LevelSets/include/itkThresholdSegmentationLevelSetFunction.hxx index 63c9e802de9..c392d416fe3 100644 --- a/Modules/Segmentation/LevelSets/include/itkThresholdSegmentationLevelSetFunction.hxx +++ b/Modules/Segmentation/LevelSets/include/itkThresholdSegmentationLevelSetFunction.hxx @@ -31,10 +31,10 @@ ThresholdSegmentationLevelSetFunction::CalculateS auto diffusion = GradientAnisotropicDiffusionImageFilter::New(); auto laplacian = LaplacianImageFilter::New(); - ImageRegionIterator lit; + ImageRegionIterator lit; ImageRegionConstIterator fit(this->GetFeatureImage(), this->GetFeatureImage()->GetRequestedRegion()); - ImageRegionIterator sit(this->GetSpeedImage(), this->GetFeatureImage()->GetRequestedRegion()); + ImageRegionIterator sit(this->GetSpeedImage(), this->GetFeatureImage()->GetRequestedRegion()); if (m_EdgeWeight != 0.0) { @@ -54,10 +54,10 @@ ThresholdSegmentationLevelSetFunction::CalculateS this->GetSpeedImage()->CopyInformation(this->GetFeatureImage()); // Calculate the speed image - auto upper_threshold = static_cast(m_UpperThreshold); - auto lower_threshold = static_cast(m_LowerThreshold); + auto upper_threshold = static_cast(m_UpperThreshold); + auto lower_threshold = static_cast(m_LowerThreshold); const ScalarValueType mid = ((upper_threshold - lower_threshold) / 2.0) + lower_threshold; - ScalarValueType threshold; + ScalarValueType threshold; for (fit.GoToBegin(), sit.GoToBegin(); !fit.IsAtEnd(); ++sit, ++fit) { if (static_cast(fit.Get()) < mid) diff --git a/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetFunction.h index 2f25ae6c435..51a0036994e 100644 --- a/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetFunction.h @@ -144,7 +144,7 @@ class ITK_TEMPLATE_EXPORT VectorThresholdSegmentationLevelSetFunction protected: VectorThresholdSegmentationLevelSetFunction() { - MeanVectorType mean(NumberOfComponents); + MeanVectorType mean(NumberOfComponents); CovarianceMatrixType covariance(NumberOfComponents, NumberOfComponents); mean.Fill(typename FeatureScalarType::ValueType{}); @@ -170,7 +170,7 @@ class ITK_TEMPLATE_EXPORT VectorThresholdSegmentationLevelSetFunction } MahalanobisFunctionPointer m_Mahalanobis{}; - ScalarValueType m_Threshold{}; + ScalarValueType m_Threshold{}; }; } // end namespace itk diff --git a/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetFunction.hxx b/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetFunction.hxx index a16e4fdfa01..8058acee698 100644 --- a/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetFunction.hxx +++ b/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetFunction.hxx @@ -30,7 +30,7 @@ VectorThresholdSegmentationLevelSetFunction::Calc { ImageRegionConstIterator fit(this->GetFeatureImage(), this->GetFeatureImage()->GetRequestedRegion()); - ImageRegionIterator sit(this->GetSpeedImage(), this->GetFeatureImage()->GetRequestedRegion()); + ImageRegionIterator sit(this->GetSpeedImage(), this->GetFeatureImage()->GetRequestedRegion()); ScalarValueType threshold; for (fit.GoToBegin(), sit.GoToBegin(); !fit.IsAtEnd(); ++sit, ++fit) diff --git a/Modules/Segmentation/LevelSets/test/itkAnisotropicFourthOrderLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkAnisotropicFourthOrderLevelSetImageFilterTest.cxx index 6d64588ce49..2fc867c085a 100644 --- a/Modules/Segmentation/LevelSets/test/itkAnisotropicFourthOrderLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkAnisotropicFourthOrderLevelSetImageFilterTest.cxx @@ -27,8 +27,8 @@ itkAnisotropicFourthOrderLevelSetImageFilterTest(int, char *[]) auto im_init = ImageType::New(); - ImageType::RegionType r; - constexpr ImageType::SizeType sz = { { 128, 128 } }; + ImageType::RegionType r; + constexpr ImageType::SizeType sz = { { 128, 128 } }; constexpr ImageType::IndexType idx = { { 0, 0 } }; r.SetSize(sz); r.SetIndex(idx); diff --git a/Modules/Segmentation/LevelSets/test/itkBinaryMaskToNarrowBandPointSetFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkBinaryMaskToNarrowBandPointSetFilterTest.cxx index 5c2fb92d8ed..6f0e938a5b6 100644 --- a/Modules/Segmentation/LevelSets/test/itkBinaryMaskToNarrowBandPointSetFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkBinaryMaskToNarrowBandPointSetFilterTest.cxx @@ -44,8 +44,8 @@ itkBinaryMaskToNarrowBandPointSetFilterTest(int argc, char * argv[]) // auto binaryMask = BinaryMaskImageType::New(); - BinaryMaskImageType::SizeType size; - BinaryMaskImageType::IndexType index; + BinaryMaskImageType::SizeType size; + BinaryMaskImageType::IndexType index; BinaryMaskImageType::RegionType region; size[0] = 100; @@ -122,13 +122,13 @@ itkBinaryMaskToNarrowBandPointSetFilterTest(int argc, char * argv[]) const PointSetType::Pointer pointSet = narrowBandGenerator->GetOutput(); - const PointsContainerPointer points = pointSet->GetPoints(); + const PointsContainerPointer points = pointSet->GetPoints(); const PointDataContainerPointer pointData = pointSet->GetPointData(); - PointsIterator point = points->Begin(); + PointsIterator point = points->Begin(); const PointsIterator lastPoint = points->End(); - PointDataIterator data = pointData->Begin(); + PointDataIterator data = pointData->Begin(); const PointDataIterator lastData = pointData->End(); while (point != lastPoint && data != lastData) diff --git a/Modules/Segmentation/LevelSets/test/itkCannySegmentationLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkCannySegmentationLevelSetImageFilterTest.cxx index a5ae6ece487..90efaabf8c6 100644 --- a/Modules/Segmentation/LevelSets/test/itkCannySegmentationLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkCannySegmentationLevelSetImageFilterTest.cxx @@ -157,15 +157,15 @@ itkCannySegmentationLevelSetImageFilterTest(int, char *[]) { std::cout << "Last modified 11/08/02" << std::endl; - CSIFTN::ImageType::RegionType reg; - CSIFTN::ImageType::RegionType::SizeType sz; + CSIFTN::ImageType::RegionType reg; + CSIFTN::ImageType::RegionType::SizeType sz; CSIFTN::ImageType::RegionType::IndexType idx; idx[0] = idx[1] = idx[2] = 0; sz[0] = sz[1] = sz[2] = 64; reg.SetSize(sz); reg.SetIndex(idx); - const CSIFTN::ImageType::Pointer inputImage = CSIFTN::ImageType::New(); + const CSIFTN::ImageType::Pointer inputImage = CSIFTN::ImageType::New(); const CSIFTN::SeedImageType::Pointer seedImage = CSIFTN::SeedImageType::New(); inputImage->SetRegions(reg); seedImage->SetRegions(reg); diff --git a/Modules/Segmentation/LevelSets/test/itkCollidingFrontsImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkCollidingFrontsImageFilterTest.cxx index 9caaf62f351..de48e2c6793 100644 --- a/Modules/Segmentation/LevelSets/test/itkCollidingFrontsImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkCollidingFrontsImageFilterTest.cxx @@ -98,7 +98,7 @@ itkCollidingFrontsImageFilterTest(int argc, char * argv[]) seeds2->InsertElement(0, node2); InternalImageType::OffsetType offset = { { 60, 60 } }; - const double radius = seedPosition2[0] - offset[0]; + const double radius = seedPosition2[0] - offset[0]; collidingFronts->SetInput(caster->GetOutput()); collidingFronts->SetSeedPoints1(seeds1); diff --git a/Modules/Segmentation/LevelSets/test/itkCurvesLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkCurvesLevelSetImageFilterTest.cxx index ed68e266d49..ad27d3f3892 100644 --- a/Modules/Segmentation/LevelSets/test/itkCurvesLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkCurvesLevelSetImageFilterTest.cxx @@ -62,8 +62,8 @@ itkCurvesLevelSetImageFilterTest(int, char *[]) inputImage->Allocate(); inputImage->FillBuffer(background); - auto squareStart = ImageType::IndexType::Filled(20); - auto squareSize = ImageType::SizeType::Filled(60); + auto squareStart = ImageType::IndexType::Filled(20); + auto squareSize = ImageType::SizeType::Filled(60); const ImageType::RegionType squareRegion{ squareStart, squareSize }; using Iterator = itk::ImageRegionIterator; diff --git a/Modules/Segmentation/LevelSets/test/itkCurvesLevelSetImageFilterZeroSigmaTest.cxx b/Modules/Segmentation/LevelSets/test/itkCurvesLevelSetImageFilterZeroSigmaTest.cxx index 5e18597c8c9..54884b190d6 100644 --- a/Modules/Segmentation/LevelSets/test/itkCurvesLevelSetImageFilterZeroSigmaTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkCurvesLevelSetImageFilterZeroSigmaTest.cxx @@ -59,8 +59,8 @@ itkCurvesLevelSetImageFilterZeroSigmaTest(int, char *[]) inputImage->Allocate(); inputImage->FillBuffer(background); - auto squareStart = ImageType::IndexType::Filled(20); - auto squareSize = ImageType::SizeType::Filled(60); + auto squareStart = ImageType::IndexType::Filled(20); + auto squareSize = ImageType::SizeType::Filled(60); const ImageType::RegionType squareRegion{ squareStart, squareSize }; using Iterator = itk::ImageRegionIterator; diff --git a/Modules/Segmentation/LevelSets/test/itkExtensionVelocitiesImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkExtensionVelocitiesImageFilterTest.cxx index 48640a29ead..c890baae994 100644 --- a/Modules/Segmentation/LevelSets/test/itkExtensionVelocitiesImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkExtensionVelocitiesImageFilterTest.cxx @@ -47,7 +47,7 @@ template double SimpleSignedDistance(const TPoint & p) { - auto center = itk::MakeFilled(50); + auto center = itk::MakeFilled(50); constexpr double radius = 19.5; double accum = 0.0; @@ -66,7 +66,7 @@ SimpleVelocity(const TPoint & p) { auto center = itk::MakeFilled(50); - double value; + double value; const double x = p[0] - center[0]; const double y = p[1] - center[1]; @@ -123,8 +123,8 @@ itkExtensionVelocitiesImageFilterTest(int, char *[]) using PointType = itk::Point; // Fill an input image with simple signed distance function - auto image = ImageType::New(); - auto size = ImageType::SizeType::Filled(128); + auto image = ImageType::New(); + auto size = ImageType::SizeType::Filled(128); const ImageType::RegionType region(size); image->SetRegions(region); @@ -188,7 +188,7 @@ itkExtensionVelocitiesImageFilterTest(int, char *[]) reinitializer->SetInputVelocityImage(aux1, 0); reinitializer->SetInputVelocityImage(aux2, 1); - ShowProgressObject progressWatch(reinitializer); + ShowProgressObject progressWatch(reinitializer); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); @@ -213,8 +213,8 @@ itkExtensionVelocitiesImageFilterTest(int, char *[]) difference->Update(); // mask out the peak at near the center point - auto centerIndex = ImageType::IndexType::Filled(50 - 8); - auto centerSize = ImageType::SizeType::Filled(17); + auto centerIndex = ImageType::IndexType::Filled(50 - 8); + auto centerSize = ImageType::SizeType::Filled(17); const ImageType::RegionType centerRegion{ centerIndex, centerSize }; iter = Iterator(difference->GetOutput(), centerRegion); @@ -231,7 +231,7 @@ itkExtensionVelocitiesImageFilterTest(int, char *[]) calculator->SetImage(difference->GetOutput()); calculator->Compute(); - const double maxAbsDifference = calculator->GetMaximum(); + const double maxAbsDifference = calculator->GetMaximum(); const IndexType maxAbsDifferenceIndex = calculator->GetIndexOfMaximum(); std::cout << "Max. abs. difference = " << maxAbsDifference; @@ -264,13 +264,13 @@ itkExtensionVelocitiesImageFilterTest(int, char *[]) using ContainerIterator = NodeContainerType::ConstIterator; const NodeContainerPointer nodes = reinitializer->GetOutputNarrowBand(); - ContainerIterator nodeIter = nodes->Begin(); - const ContainerIterator nodeEnd = nodes->End(); + ContainerIterator nodeIter = nodes->Begin(); + const ContainerIterator nodeEnd = nodes->End(); while (nodeIter != nodeEnd) { const ImageType::IndexType nodeIndex = nodeIter.Value().GetIndex(); - const double absDiff = + const double absDiff = itk::Math::abs(aux2->GetPixel(nodeIndex) - reinitializer->GetOutputVelocityImage(1)->GetPixel(nodeIndex)); if (absDiff > 0.6) { diff --git a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterTest.cxx index 3792c5eb10e..c0d57801bfe 100644 --- a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterTest.cxx @@ -54,8 +54,8 @@ itkGeodesicActiveContourLevelSetImageFilterTest(int, char *[]) inputImage->Allocate(); inputImage->FillBuffer(background); - auto squareStart = ImageType::IndexType::Filled(20); - auto squareSize = ImageType::SizeType::Filled(60); + auto squareStart = ImageType::IndexType::Filled(20); + auto squareSize = ImageType::SizeType::Filled(60); const ImageType::RegionType squareRegion{ squareStart, squareSize }; using Iterator = itk::ImageRegionIterator; diff --git a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest.cxx b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest.cxx index ddefd9cbb64..9c655668325 100644 --- a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest.cxx @@ -56,8 +56,8 @@ itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest(int, char *[]) inputImage->Allocate(); inputImage->FillBuffer(background); - auto squareStart = ImageType::IndexType::Filled(20); - auto squareSize = ImageType::SizeType::Filled(60); + auto squareStart = ImageType::IndexType::Filled(20); + auto squareSize = ImageType::SizeType::Filled(60); const ImageType::RegionType squareRegion{ squareStart, squareSize }; using Iterator = itk::ImageRegionIterator; diff --git a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx index 51fa72e5393..75395c021e2 100644 --- a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx @@ -144,7 +144,7 @@ itkGeodesicActiveContourShapePriorLevelSetImageFilterTest(int, char *[]) while (!it.IsAtEnd()) { - const ImageType::IndexType index = it.GetIndex(); + const ImageType::IndexType index = it.GetIndex(); ShapeFunctionType::PointType point; inputImage->TransformIndexToPhysicalPoint(index, point); if (shape->Evaluate(point) <= 0.0) @@ -264,7 +264,7 @@ itkGeodesicActiveContourShapePriorLevelSetImageFilterTest(int, char *[]) // Connect an observer to the filter // using WatcherType = ShowIterationObject; - WatcherType iterationWatcher(filter); + WatcherType iterationWatcher(filter); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&iterationWatcher, &WatcherType::ShowIteration); filter->AddObserver(itk::IterationEvent(), command); diff --git a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx index baa309978ec..4f56f3023ee 100644 --- a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx +++ b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx @@ -148,7 +148,7 @@ itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2(int, char *[]) while (!it.IsAtEnd()) { - const ImageType::IndexType index = it.GetIndex(); + const ImageType::IndexType index = it.GetIndex(); SphereFunctionType::PointType point; inputImage->TransformIndexToPhysicalPoint(index, point); if (sphere->Evaluate(point) <= 0.0) @@ -240,7 +240,7 @@ itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2(int, char *[]) while (!citer.IsAtEnd()) { const ComponentImageType::IndexType index = citer.GetIndex(); - SphereFunctionType::PointType point; + SphereFunctionType::PointType point; meanImage->TransformIndexToPhysicalPoint(index, point); citer.Set(sphere->Evaluate(point)); @@ -334,7 +334,7 @@ itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2(int, char *[]) // Connect an observer to the filter. // using WatcherType = ShowIterationObject; - WatcherType iterationWatcher(filter); + WatcherType iterationWatcher(filter); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&iterationWatcher, &WatcherType::ShowIteration); filter->AddObserver(itk::IterationEvent(), command); diff --git a/Modules/Segmentation/LevelSets/test/itkImplicitManifoldNormalVectorFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkImplicitManifoldNormalVectorFilterTest.cxx index 33f04fce14d..94e984aebc4 100644 --- a/Modules/Segmentation/LevelSets/test/itkImplicitManifoldNormalVectorFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkImplicitManifoldNormalVectorFilterTest.cxx @@ -30,9 +30,9 @@ itkImplicitManifoldNormalVectorFilterTest(int, char *[]) using FilterType = itk::ImplicitManifoldNormalVectorFilter; using FunctionType = itk::NormalVectorDiffusionFunction; - auto im_init = InputImageType::New(); - InputImageType::RegionType r; - constexpr InputImageType::SizeType sz = { { 50, 50 } }; + auto im_init = InputImageType::New(); + InputImageType::RegionType r; + constexpr InputImageType::SizeType sz = { { 50, 50 } }; constexpr InputImageType::IndexType idx = { { 0, 0 } }; r.SetSize(sz); r.SetIndex(idx); diff --git a/Modules/Segmentation/LevelSets/test/itkIsotropicFourthOrderLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkIsotropicFourthOrderLevelSetImageFilterTest.cxx index 05fae994d25..4f0d00d86d6 100644 --- a/Modules/Segmentation/LevelSets/test/itkIsotropicFourthOrderLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkIsotropicFourthOrderLevelSetImageFilterTest.cxx @@ -27,8 +27,8 @@ itkIsotropicFourthOrderLevelSetImageFilterTest(int, char *[]) auto im_init = ImageType::New(); - ImageType::RegionType r; - constexpr ImageType::SizeType sz = { { 128, 128 } }; + ImageType::RegionType r; + constexpr ImageType::SizeType sz = { { 128, 128 } }; constexpr ImageType::IndexType idx = { { 0, 0 } }; r.SetSize(sz); r.SetIndex(idx); diff --git a/Modules/Segmentation/LevelSets/test/itkLaplacianSegmentationLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkLaplacianSegmentationLevelSetImageFilterTest.cxx index 275138795b3..516ca0e509e 100644 --- a/Modules/Segmentation/LevelSets/test/itkLaplacianSegmentationLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkLaplacianSegmentationLevelSetImageFilterTest.cxx @@ -157,15 +157,15 @@ int itkLaplacianSegmentationLevelSetImageFilterTest(int, char *[]) { - LSIFTN::ImageType::RegionType reg; - LSIFTN::ImageType::RegionType::SizeType sz; + LSIFTN::ImageType::RegionType reg; + LSIFTN::ImageType::RegionType::SizeType sz; LSIFTN::ImageType::RegionType::IndexType idx; idx[0] = idx[1] = idx[2] = 0; sz[0] = sz[1] = sz[2] = 64; reg.SetSize(sz); reg.SetIndex(idx); - const LSIFTN::ImageType::Pointer inputImage = LSIFTN::ImageType::New(); + const LSIFTN::ImageType::Pointer inputImage = LSIFTN::ImageType::New(); const LSIFTN::SeedImageType::Pointer seedImage = LSIFTN::SeedImageType::New(); inputImage->SetRegions(reg); seedImage->SetRegions(reg); diff --git a/Modules/Segmentation/LevelSets/test/itkLevelSetFunctionTest.cxx b/Modules/Segmentation/LevelSets/test/itkLevelSetFunctionTest.cxx index b74765b2f90..9b6e45200b6 100644 --- a/Modules/Segmentation/LevelSets/test/itkLevelSetFunctionTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkLevelSetFunctionTest.cxx @@ -57,7 +57,7 @@ square(unsigned int x, unsigned int y) { const float X = itk::Math::abs(x - static_cast(WIDTH) / 2.0); const float Y = itk::Math::abs(y - static_cast(HEIGHT) / 2.0); - float dis; + float dis; if (!((X > RADIUS) && (Y > RADIUS))) { dis = RADIUS - std::max(X, Y); @@ -222,8 +222,8 @@ itkLevelSetFunctionTest(int, char *[]) auto im_init = ImageType::New(); auto im_target = ImageType::New(); - ImageType::RegionType r; - constexpr ImageType::SizeType sz = { { LSFT::HEIGHT, LSFT::WIDTH } }; + ImageType::RegionType r; + constexpr ImageType::SizeType sz = { { LSFT::HEIGHT, LSFT::WIDTH } }; constexpr ImageType::IndexType idx = { { 0, 0 } }; r.SetSize(sz); r.SetIndex(idx); diff --git a/Modules/Segmentation/LevelSets/test/itkLevelSetNeighborhoodExtractorTest.cxx b/Modules/Segmentation/LevelSets/test/itkLevelSetNeighborhoodExtractorTest.cxx index 65cc44c9a5c..93532a06e50 100644 --- a/Modules/Segmentation/LevelSets/test/itkLevelSetNeighborhoodExtractorTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkLevelSetNeighborhoodExtractorTest.cxx @@ -35,7 +35,7 @@ itkLevelSetNeighborhoodExtractorTest(int, char *[]) source->SetOutputSize(size); SourceType::NodeType node; - auto index = ImageType::IndexType::Filled(8); + auto index = ImageType::IndexType::Filled(8); node.SetIndex(index); node.SetValue(-4.0); diff --git a/Modules/Segmentation/LevelSets/test/itkLevelSetVelocityNeighborhoodExtractorTest.cxx b/Modules/Segmentation/LevelSets/test/itkLevelSetVelocityNeighborhoodExtractorTest.cxx index a8c4b581990..b4b91d1f930 100644 --- a/Modules/Segmentation/LevelSets/test/itkLevelSetVelocityNeighborhoodExtractorTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkLevelSetVelocityNeighborhoodExtractorTest.cxx @@ -36,7 +36,7 @@ itkLevelSetVelocityNeighborhoodExtractorTest(int, char *[]) source->SetOutputSize(size); SourceType::NodeType node; - auto index = ImageType::IndexType::Filled(8); + auto index = ImageType::IndexType::Filled(8); node.SetIndex(index); node.SetValue(-4.0); @@ -83,7 +83,7 @@ itkLevelSetVelocityNeighborhoodExtractorTest(int, char *[]) std::cout << "Inside Points" << std::endl; - Iterator iterEnd = extractor->GetInsidePoints()->End(); + Iterator iterEnd = extractor->GetInsidePoints()->End(); AuxIterator aIter = extractor->GetAuxInsideValues()->Begin(); for (Iterator iter = extractor->GetInsidePoints()->Begin(); iter != iterEnd; iter++, aIter++) { diff --git a/Modules/Segmentation/LevelSets/test/itkNarrowBandCurvesLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkNarrowBandCurvesLevelSetImageFilterTest.cxx index 4b74c4a4137..9d57329d72f 100644 --- a/Modules/Segmentation/LevelSets/test/itkNarrowBandCurvesLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkNarrowBandCurvesLevelSetImageFilterTest.cxx @@ -64,8 +64,8 @@ itkNarrowBandCurvesLevelSetImageFilterTest(int argc, char * argv[]) inputImage->Allocate(); inputImage->FillBuffer(background); - auto squareStart = ImageType::IndexType::Filled(10); - auto squareSize = ImageType::SizeType::Filled(30); + auto squareStart = ImageType::IndexType::Filled(10); + auto squareSize = ImageType::SizeType::Filled(30); const ImageType::RegionType squareRegion{ squareStart, squareSize }; using Iterator = itk::ImageRegionIterator; diff --git a/Modules/Segmentation/LevelSets/test/itkNarrowBandThresholdSegmentationLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkNarrowBandThresholdSegmentationLevelSetImageFilterTest.cxx index 5f92a8f610f..04e6208b160 100644 --- a/Modules/Segmentation/LevelSets/test/itkNarrowBandThresholdSegmentationLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkNarrowBandThresholdSegmentationLevelSetImageFilterTest.cxx @@ -111,15 +111,15 @@ class NBRMSCommand : public Command int itkNarrowBandThresholdSegmentationLevelSetImageFilterTest(int, char *[]) { - NBTS::ImageType::RegionType reg; - NBTS::ImageType::RegionType::SizeType sz; + NBTS::ImageType::RegionType reg; + NBTS::ImageType::RegionType::SizeType sz; NBTS::ImageType::RegionType::IndexType idx; idx[0] = idx[1] = idx[2] = 0; sz[0] = sz[1] = sz[2] = 64; reg.SetSize(sz); reg.SetIndex(idx); - const NBTS::ImageType::Pointer inputImage = NBTS::ImageType::New(); + const NBTS::ImageType::Pointer inputImage = NBTS::ImageType::New(); const NBTS::SeedImageType::Pointer seedImage = NBTS::SeedImageType::New(); inputImage->SetRegions(reg); seedImage->SetRegions(reg); diff --git a/Modules/Segmentation/LevelSets/test/itkParallelSparseFieldLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkParallelSparseFieldLevelSetImageFilterTest.cxx index edf7b4ef3c6..d403a5f36b0 100644 --- a/Modules/Segmentation/LevelSets/test/itkParallelSparseFieldLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkParallelSparseFieldLevelSetImageFilterTest.cxx @@ -62,7 +62,7 @@ cube(unsigned int x, unsigned int y, unsigned int z) const float X = itk::Math::abs(x - static_cast(WIDTH) / 2.0); const float Y = itk::Math::abs(y - static_cast(HEIGHT) / 2.0); const float Z = itk::Math::abs(z - static_cast(DEPTH) / 2.0); - float dis; + float dis; if (!((X > RADIUS) && (Y > RADIUS) && (Z > RADIUS))) { dis = RADIUS - (std::max(std::max(X, Y), Z)); @@ -239,14 +239,14 @@ itkParallelSparseFieldLevelSetImageFilterTest(int argc, char * argv[]) auto im_init = ImageType::New(); auto im_target = ImageType::New(); - ImageType::RegionType r; - constexpr ImageType::SizeType sz = { { PSFLSIFT::HEIGHT, PSFLSIFT::WIDTH, PSFLSIFT::DEPTH } }; + ImageType::RegionType r; + constexpr ImageType::SizeType sz = { { PSFLSIFT::HEIGHT, PSFLSIFT::WIDTH, PSFLSIFT::DEPTH } }; constexpr ImageType::IndexType idx = { { 0, 0, 0 } }; r.SetSize(sz); r.SetIndex(idx); - ImageType::PointType origin; - ImageType::SpacingType spacing; + ImageType::PointType origin; + ImageType::SpacingType spacing; ImageType::DirectionType direction; origin[0] = 1.0; origin[1] = 10.0; diff --git a/Modules/Segmentation/LevelSets/test/itkReinitializeLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkReinitializeLevelSetImageFilterTest.cxx index 2f3d79aff4f..bf5c43f6bc9 100644 --- a/Modules/Segmentation/LevelSets/test/itkReinitializeLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkReinitializeLevelSetImageFilterTest.cxx @@ -48,7 +48,7 @@ template double SimpleSignedDistance(const TPoint & p) { - auto center = itk::MakeFilled(50); + auto center = itk::MakeFilled(50); constexpr double radius = 19.5; double accum = 0.0; @@ -75,8 +75,8 @@ itkReinitializeLevelSetImageFilterTest(int, char *[]) using PointType = itk::Point; // Fill an input image with simple signed distance function - auto image = ImageType::New(); - auto size = ImageType::SizeType::Filled(128); + auto image = ImageType::New(); + auto size = ImageType::SizeType::Filled(128); const ImageType::RegionType region(size); image->SetRegions(region); @@ -106,7 +106,7 @@ itkReinitializeLevelSetImageFilterTest(int, char *[]) auto reinitializer = ReinitializerType::New(); reinitializer->SetInput(multiplier->GetOutput()); - ShowProgressObject progressWatch(reinitializer); + ShowProgressObject progressWatch(reinitializer); const itk::SimpleMemberCommand::Pointer command = itk::SimpleMemberCommand::New(); command->SetCallbackFunction(&progressWatch, &ShowProgressObject::ShowProgress); @@ -142,7 +142,7 @@ itkReinitializeLevelSetImageFilterTest(int, char *[]) calculator->SetImage(difference->GetOutput()); calculator->Compute(); - const double maxAbsDifference = calculator->GetMaximum(); + const double maxAbsDifference = calculator->GetMaximum(); const IndexType maxAbsDifferenceIndex = calculator->GetIndexOfMaximum(); std::cout << "Max. abs. difference = " << maxAbsDifference; @@ -206,13 +206,13 @@ itkReinitializeLevelSetImageFilterTest(int, char *[]) using ContainerIterator = NodeContainerType::ConstIterator; const NodeContainerPointer nodes2 = reinitializer->GetOutputNarrowBand(); - ContainerIterator nodeIter = nodes2->Begin(); - const ContainerIterator nodeEnd = nodes2->End(); + ContainerIterator nodeIter = nodes2->Begin(); + const ContainerIterator nodeEnd = nodes2->End(); while (nodeIter != nodeEnd) { const ImageType::IndexType nodeIndex = nodeIter.Value().GetIndex(); - const double product = image->GetPixel(nodeIndex) * reinitializer->GetOutput()->GetPixel(nodeIndex); + const double product = image->GetPixel(nodeIndex) * reinitializer->GetOutput()->GetPixel(nodeIndex); if (product < 0.0) { std::cout << "Product: " << product; diff --git a/Modules/Segmentation/LevelSets/test/itkShapeDetectionLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkShapeDetectionLevelSetImageFilterTest.cxx index fda7a0ec827..55de64a6fe0 100644 --- a/Modules/Segmentation/LevelSets/test/itkShapeDetectionLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkShapeDetectionLevelSetImageFilterTest.cxx @@ -60,8 +60,8 @@ itkShapeDetectionLevelSetImageFilterTest(int, char *[]) inputImage->Allocate(); inputImage->FillBuffer(background); - auto squareStart = ImageType::IndexType::Filled(20); - auto squareSize = ImageType::SizeType::Filled(60); + auto squareStart = ImageType::IndexType::Filled(20); + auto squareSize = ImageType::SizeType::Filled(60); const ImageType::RegionType squareRegion{ squareStart, squareSize }; using Iterator = itk::ImageRegionIterator; diff --git a/Modules/Segmentation/LevelSets/test/itkShapePriorMAPCostFunctionTest.cxx b/Modules/Segmentation/LevelSets/test/itkShapePriorMAPCostFunctionTest.cxx index 8e0f55af2af..14308943cd7 100644 --- a/Modules/Segmentation/LevelSets/test/itkShapePriorMAPCostFunctionTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkShapePriorMAPCostFunctionTest.cxx @@ -81,7 +81,7 @@ itkShapePriorMAPCostFunctionTest(int, char *[]) /** * Create an input level set and active region container */ - auto size = ImageType::SizeType::Filled(128); + auto size = ImageType::SizeType::Filled(128); ImageType::RegionType region; region.SetSize(size); @@ -96,12 +96,12 @@ itkShapePriorMAPCostFunctionTest(int, char *[]) Iterator iter(input, region); iter.GoToBegin(); - unsigned int counter = 0; + unsigned int counter = 0; constexpr PixelType activeRegionThreshold = 3.0; while (!iter.IsAtEnd()) { - ImageType::IndexType index; + ImageType::IndexType index; ShapeFunctionType::PointType point; index = iter.GetIndex(); input->TransformIndexToPhysicalPoint(index, point); diff --git a/Modules/Segmentation/LevelSets/test/itkShapePriorSegmentationLevelSetFunctionTest.cxx b/Modules/Segmentation/LevelSets/test/itkShapePriorSegmentationLevelSetFunctionTest.cxx index a0935f3c2b2..53fca46f6ac 100644 --- a/Modules/Segmentation/LevelSets/test/itkShapePriorSegmentationLevelSetFunctionTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkShapePriorSegmentationLevelSetFunctionTest.cxx @@ -91,7 +91,7 @@ class SimpleTestFilter : public DenseFiniteDifferenceImageFilter } private: - unsigned int m_NumberOfIterations; + unsigned int m_NumberOfIterations; typename ShapePriorFunctionType::Pointer m_ShapePriorFunction; bool @@ -120,7 +120,7 @@ itkShapePriorSegmentationLevelSetFunctionTest(int, char *[]) using ImageType = itk::Image; // create an input level set using the sphere signed distance function - auto size = ImageType::SizeType::Filled(128); + auto size = ImageType::SizeType::Filled(128); ImageType::RegionType region; region.SetSize(size); @@ -143,7 +143,7 @@ itkShapePriorSegmentationLevelSetFunctionTest(int, char *[]) while (!iter.IsAtEnd()) { - ImageType::IndexType index; + ImageType::IndexType index; ShapeFunctionType::PointType point; index = iter.GetIndex(); input->TransformIndexToPhysicalPoint(index, point); @@ -202,7 +202,7 @@ itkShapePriorSegmentationLevelSetFunctionTest(int, char *[]) while (!citer.IsAtEnd()) { - CharImageType::IndexType index; + CharImageType::IndexType index; ShapeFunctionType::PointType point; index = citer.GetIndex(); input->TransformIndexToPhysicalPoint(index, point); diff --git a/Modules/Segmentation/LevelSets/test/itkSparseFieldFourthOrderLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkSparseFieldFourthOrderLevelSetImageFilterTest.cxx index a4ca0a22e8d..c3cf20b8a92 100644 --- a/Modules/Segmentation/LevelSets/test/itkSparseFieldFourthOrderLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkSparseFieldFourthOrderLevelSetImageFilterTest.cxx @@ -52,7 +52,7 @@ square(unsigned int x, unsigned int y) { const float X = itk::Math::abs(x - static_cast(WIDTH) / 2.0); const float Y = itk::Math::abs(y - static_cast(HEIGHT) / 2.0); - float dis; + float dis; if (!((X > RADIUS) && (Y > RADIUS))) { dis = RADIUS - std::max(X, Y); @@ -146,8 +146,8 @@ itkSparseFieldFourthOrderLevelSetImageFilterTest(int, char *[]) auto image = ImageType::New(); - ImageType::RegionType r; - constexpr ImageType::SizeType sz = { { SFFOLSIFT::HEIGHT, SFFOLSIFT::WIDTH } }; + ImageType::RegionType r; + constexpr ImageType::SizeType sz = { { SFFOLSIFT::HEIGHT, SFFOLSIFT::WIDTH } }; constexpr ImageType::IndexType idx = { { 0, 0 } }; r.SetSize(sz); r.SetIndex(idx); diff --git a/Modules/Segmentation/LevelSets/test/itkThresholdSegmentationLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkThresholdSegmentationLevelSetImageFilterTest.cxx index 86add96ac4f..4371a34ac93 100644 --- a/Modules/Segmentation/LevelSets/test/itkThresholdSegmentationLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkThresholdSegmentationLevelSetImageFilterTest.cxx @@ -146,15 +146,15 @@ int itkThresholdSegmentationLevelSetImageFilterTest(int, char *[]) { - TSIFTN::ImageType::RegionType reg; - TSIFTN::ImageType::RegionType::SizeType sz; + TSIFTN::ImageType::RegionType reg; + TSIFTN::ImageType::RegionType::SizeType sz; TSIFTN::ImageType::RegionType::IndexType idx; idx[0] = idx[1] = idx[2] = 0; sz[0] = sz[1] = sz[2] = 64; reg.SetSize(sz); reg.SetIndex(idx); - const TSIFTN::ImageType::Pointer inputImage = TSIFTN::ImageType::New(); + const TSIFTN::ImageType::Pointer inputImage = TSIFTN::ImageType::New(); const TSIFTN::SeedImageType::Pointer seedImage = TSIFTN::SeedImageType::New(); inputImage->SetRegions(reg); seedImage->SetRegions(reg); diff --git a/Modules/Segmentation/LevelSets/test/itkUnsharpMaskLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkUnsharpMaskLevelSetImageFilterTest.cxx index 3a5d494d0a4..98b9bea84a0 100644 --- a/Modules/Segmentation/LevelSets/test/itkUnsharpMaskLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkUnsharpMaskLevelSetImageFilterTest.cxx @@ -30,7 +30,7 @@ square(unsigned int x, unsigned int y) { const float X = itk::Math::abs(x - static_cast(WIDTH) / 2.0); const float Y = itk::Math::abs(y - static_cast(HEIGHT) / 2.0); - float dis; + float dis; if (!((X > RADIUS) && (Y > RADIUS))) { dis = RADIUS - std::max(X, Y); @@ -66,8 +66,8 @@ itkUnsharpMaskLevelSetImageFilterTest(int, char *[]) auto im_init = ImageType::New(); - ImageType::RegionType r; - constexpr ImageType::SizeType sz = { { HEIGHT, WIDTH } }; + ImageType::RegionType r; + constexpr ImageType::SizeType sz = { { HEIGHT, WIDTH } }; constexpr ImageType::IndexType idx = { { 0, 0 } }; r.SetSize(sz); r.SetIndex(idx); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx b/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx index 64cc32639dc..694fa3c3748 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx @@ -132,7 +132,7 @@ BinaryImageToLevelSetImageAdaptorm_LevelSet->GetLayer(layerToBeScanned); LevelSetLayerType & layerPlus2 = this->m_LevelSet->GetLayer(outputLayer); - const auto plus2 = static_cast(outputLayer); + const auto plus2 = static_cast(outputLayer); constexpr auto radius = MakeFilled(1); @@ -232,7 +232,7 @@ BinaryImageToLevelSetImageAdaptorSetLabel(LevelSetType::ZeroLayer()); - auto nodeIt = layer0.begin(); + auto nodeIt = layer0.begin(); const auto nodeEnd = layer0.end(); while (nodeIt != nodeEnd) @@ -257,8 +257,8 @@ BinaryImageToLevelSetImageAdaptor::OneValue(); const LevelSetLayerType layer0 = this->m_LevelSet->GetLayer(LevelSetType::ZeroLayer()); - LevelSetLayerType & layerMinus1 = this->m_LevelSet->GetLayer(LevelSetType::MinusOneLayer()); - LevelSetLayerType & layerPlus1 = this->m_LevelSet->GetLayer(LevelSetType::PlusOneLayer()); + LevelSetLayerType & layerMinus1 = this->m_LevelSet->GetLayer(LevelSetType::MinusOneLayer()); + LevelSetLayerType & layerPlus1 = this->m_LevelSet->GetLayer(LevelSetType::PlusOneLayer()); constexpr auto radius = MakeFilled(1); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptorBase.h b/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptorBase.h index c2584d7c322..ceb02b75f15 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptorBase.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptorBase.h @@ -75,7 +75,7 @@ class BinaryImageToLevelSetImageAdaptorBase : public Object ~BinaryImageToLevelSetImageAdaptorBase() override = default; InputImagePointer m_InputImage{}; - LevelSetPointer m_LevelSet{}; + LevelSetPointer m_LevelSet{}; }; } // namespace itk diff --git a/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.hxx index ede813bd9bd..7c84583227b 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.hxx @@ -82,7 +82,7 @@ DiscreteLevelSetImage::EvaluateForwardGradient(const InputT inputIndexA[dim] = inputIndex[dim]; } - const auto valueA = static_cast(this->Evaluate(inputIndexA)); + const auto valueA = static_cast(this->Evaluate(inputIndexA)); const OutputRealType scale = this->m_NeighborhoodScales[dim]; dx[dim] = (valueA - centerValue) * scale; @@ -113,7 +113,7 @@ DiscreteLevelSetImage::EvaluateBackwardGradient(const Input inputIndexA[dim] = inputIndex[dim]; } - const auto valueA = static_cast(this->Evaluate(inputIndexA)); + const auto valueA = static_cast(this->Evaluate(inputIndexA)); const OutputRealType scale = this->m_NeighborhoodScales[dim]; dx[dim] = (centerValue - valueA) * scale; @@ -273,7 +273,7 @@ DiscreteLevelSetImage::Evaluate(const InputType & inputInde // ---------------------------------------------------------------------------- template void -DiscreteLevelSetImage::EvaluateGradient(const InputType & inputIndex, +DiscreteLevelSetImage::EvaluateGradient(const InputType & inputIndex, LevelSetDataType & data) const { if (data.Gradient.m_Computed) @@ -303,8 +303,8 @@ DiscreteLevelSetImage::EvaluateGradient(const InputType & inputIndexB[dim] = inputIndex[dim]; } - const auto valueA = static_cast(this->Evaluate(inputIndexA)); - const auto valueB = static_cast(this->Evaluate(inputIndexB)); + const auto valueA = static_cast(this->Evaluate(inputIndexA)); + const auto valueB = static_cast(this->Evaluate(inputIndexB)); const OutputRealType scale = this->m_NeighborhoodScales[dim] / (inputIndexA[dim] - inputIndexB[dim]); data.Gradient.m_Value[dim] = (valueA - valueB) * scale; @@ -442,7 +442,7 @@ DiscreteLevelSetImage::EvaluateMeanCurvature(const InputTyp { OutputRealType oValue{}; - HessianType hessian = this->EvaluateHessian(inputIndex); + HessianType hessian = this->EvaluateHessian(inputIndex); GradientType grad = this->EvaluateGradient(inputIndex); for (unsigned int i = 0; i < Dimension; ++i) @@ -474,7 +474,7 @@ DiscreteLevelSetImage::EvaluateMeanCurvature(const InputTyp // ---------------------------------------------------------------------------- template void -DiscreteLevelSetImage::EvaluateLaplacian(const InputType & inputIndex, +DiscreteLevelSetImage::EvaluateLaplacian(const InputType & inputIndex, LevelSetDataType & data) const { if (data.Laplacian.m_Computed) @@ -523,7 +523,7 @@ DiscreteLevelSetImage::EvaluateLaplacian(const InputType & // ---------------------------------------------------------------------------- template void -DiscreteLevelSetImage::EvaluateMeanCurvature(const InputType & inputIndex, +DiscreteLevelSetImage::EvaluateMeanCurvature(const InputType & inputIndex, LevelSetDataType & data) const { if (!data.MeanCurvature.m_Computed) @@ -576,7 +576,7 @@ DiscreteLevelSetImage::EvaluateMeanCurvature(const InputTyp // ---------------------------------------------------------------------------- template void -DiscreteLevelSetImage::EvaluateForwardGradient(const InputType & inputIndex, +DiscreteLevelSetImage::EvaluateForwardGradient(const InputType & inputIndex, LevelSetDataType & data) const { if (data.ForwardGradient.m_Computed) @@ -606,7 +606,7 @@ DiscreteLevelSetImage::EvaluateForwardGradient(const InputT inputIndexA[dim] = inputIndex[dim]; } - const auto valueA = static_cast(this->Evaluate(inputIndexA)); + const auto valueA = static_cast(this->Evaluate(inputIndexA)); const OutputRealType scale = this->m_NeighborhoodScales[dim]; dx[dim] = (valueA - centerValue) * scale; @@ -621,7 +621,7 @@ DiscreteLevelSetImage::EvaluateForwardGradient(const InputT // ---------------------------------------------------------------------------- template void -DiscreteLevelSetImage::EvaluateBackwardGradient(const InputType & inputIndex, +DiscreteLevelSetImage::EvaluateBackwardGradient(const InputType & inputIndex, LevelSetDataType & data) const { if (data.BackwardGradient.m_Computed) @@ -651,7 +651,7 @@ DiscreteLevelSetImage::EvaluateBackwardGradient(const Input inputIndexA[dim] = inputIndex[dim]; } - const auto valueA = static_cast(this->Evaluate(inputIndexA)); + const auto valueA = static_cast(this->Evaluate(inputIndexA)); const OutputRealType scale = this->m_NeighborhoodScales[dim]; dx[dim] = (centerValue - valueA) * scale; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.h index 3278b95255d..f89d0c551a5 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.h @@ -111,8 +111,8 @@ class ITK_TEMPLATE_EXPORT LevelSetBase : public DataObject ~DataType() = default; std::string m_Name; - T m_Value; - bool m_Computed; + T m_Value; + bool m_Computed; void operator=(const DataType & iData) @@ -176,14 +176,14 @@ class ITK_TEMPLATE_EXPORT LevelSetBase : public DataObject } /** the boolean value stores if it has already been computed */ - DataType Value; - DataType Gradient; - DataType Hessian; + DataType Value; + DataType Gradient; + DataType Hessian; DataType Laplacian; DataType GradientNorm; DataType MeanCurvature; - DataType ForwardGradient; - DataType BackwardGradient; + DataType ForwardGradient; + DataType BackwardGradient; }; virtual void diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.hxx index 4902794625f..cbc6b5a710f 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.hxx @@ -50,7 +50,7 @@ LevelSetBase::Initialize() // ---------------------------------------------------------------------------- template void -LevelSetBase::EvaluateGradientNorm(const InputType & iP, +LevelSetBase::EvaluateGradientNorm(const InputType & iP, LevelSetDataType & ioData) const { if (!ioData.GradientNorm.m_Computed) @@ -81,7 +81,7 @@ LevelSetBase::EvaluateMeanCurvature(const { OutputRealType oValue{}; - HessianType hessian = this->EvaluateHessian(iP); + HessianType hessian = this->EvaluateHessian(iP); GradientType grad = this->EvaluateGradient(iP); for (unsigned int i = 0; i < Dimension; ++i) @@ -113,7 +113,7 @@ LevelSetBase::EvaluateMeanCurvature(const // ---------------------------------------------------------------------------- template void -LevelSetBase::EvaluateMeanCurvature(const InputType & iP, +LevelSetBase::EvaluateMeanCurvature(const InputType & iP, LevelSetDataType & ioData) const { if (!ioData.MeanCurvature.m_Computed) diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainer.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainer.h index 3f467853ee1..27dfbb485b6 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainer.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainer.h @@ -144,7 +144,7 @@ class LevelSetContainer> CopyInformationAndAllocate(const Self * iOther, const bool iAllocate) { LevelSetContainerType internalContainer = iOther->GetContainer(); - auto it = internalContainer.begin(); + auto it = internalContainer.begin(); LevelSetContainerType newContainer; @@ -155,7 +155,7 @@ class LevelSetContainer> const LevelSetPointer temp_ls = LevelSetType::New(); const LevelSetImagePointer image = LevelSetImageType::New(); - const LevelSetImageType * otherImage = (it->second)->GetImage(); + const LevelSetImageType * otherImage = (it->second)->GetImage(); image->CopyInformation(otherImage); image->SetBufferedRegion(otherImage->GetBufferedRegion()); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.h index eefc5a39ff7..3cb07e7a7a2 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.h @@ -329,9 +329,9 @@ class ITK_TEMPLATE_EXPORT LevelSetContainerBase : public Object SetContainer(const LevelSetContainerType & iContainer); private: - HeavisideConstPointer m_Heaviside{}; + HeavisideConstPointer m_Heaviside{}; DomainMapImageFilterPointer m_DomainMapFilter{}; - LevelSetContainerType m_Container{}; + LevelSetContainerType m_Container{}; }; } // namespace itk diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.hxx index b3a640a407e..07cc1cdd709 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.hxx @@ -91,8 +91,8 @@ LevelSetContainerBase::GetLevelSet(const LevelSetIdentif template bool LevelSetContainerBase::AddLevelSet(const LevelSetIdentifierType & iId, - LevelSetType * iLevelSet, - const bool iForce) + LevelSetType * iLevelSet, + const bool iForce) { if (iForce) { diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx index 28c23972aa9..5662c138de1 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx @@ -101,7 +101,7 @@ bool LevelSetDenseImage::IsInsideDomain(const InputType & inputIndex) const { const RegionType largestRegion = this->m_Image->GetLargestPossibleRegion(); - const InputType mapIndex = inputIndex - this->m_DomainOffset; + const InputType mapIndex = inputIndex - this->m_DomainOffset; return largestRegion.IsInside(mapIndex); } diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.h index 4cd07f3f57b..47feeb0c09e 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.h @@ -104,7 +104,7 @@ class ITK_TEMPLATE_EXPORT LevelSetDomainMapImageFilter : public ImageToImageFilt private: InputImageRegionType m_Region; - InputImagePixelType m_IdList; + InputImagePixelType m_IdList; }; /** Map from a integer identifier to the level set list image domain. */ @@ -138,7 +138,7 @@ class ITK_TEMPLATE_EXPORT LevelSetDomainMapImageFilter : public ImageToImageFilt DomainMapType m_DomainMap{}; const InputImageType * m_InputImage{}; - OutputImageType * m_OutputImage{}; + OutputImageType * m_OutputImage{}; }; } /* namespace itk */ diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.hxx index d3222e9cdaf..b0a0cf5147b 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.hxx @@ -51,24 +51,24 @@ LevelSetDomainMapImageFilter::ComputeConsistentRegion { regionWasModified = false; - InputConstIteratorType iIt(this->m_InputImage, subRegion); + InputConstIteratorType iIt(this->m_InputImage, subRegion); OutputConstIteratorType oIt(this->m_OutputImage, subRegion); iIt.GoToBegin(); oIt.GoToBegin(); - const InputImagePixelType firstCornerPixelValue = iIt.Get(); + const InputImagePixelType firstCornerPixelValue = iIt.Get(); const InputImageIndexType & firstCornerIndex = iIt.GetIndex(); while (!iIt.IsAtEnd()) { const OutputImagePixelType segmentPixel = oIt.Get(); - const InputImagePixelType nextPixel = iIt.Get(); + const InputImagePixelType nextPixel = iIt.Get(); if ((nextPixel != firstCornerPixelValue) || (segmentPixel != OutputImagePixelType{})) { const InputImageIndexType & stopIdx = iIt.GetIndex(); - InputImageSizeType sizeOfRegion; + InputImageSizeType sizeOfRegion; for (unsigned int i = 0; i < ImageDimension; ++i) { sizeOfRegion[i] = stopIdx[i] - firstCornerIndex[i] + 1; @@ -97,7 +97,7 @@ LevelSetDomainMapImageFilter::GenerateData() this->m_InputImage = this->GetInput(); const InputImageRegionType & region = this->m_InputImage->GetLargestPossibleRegion(); - const InputImageSizeType size = region.GetSize(); + const InputImageSizeType size = region.GetSize(); this->m_OutputImage = this->GetOutput(); this->m_OutputImage->SetBufferedRegion(region); @@ -112,7 +112,7 @@ LevelSetDomainMapImageFilter::GenerateData() IdentifierType segmentId = NumericTraits::OneValue(); - InputConstIteratorType iIt(this->m_InputImage, region); + InputConstIteratorType iIt(this->m_InputImage, region); OutputIndexIteratorType oIt(this->m_OutputImage, region); iIt.GoToBegin(); @@ -120,9 +120,9 @@ LevelSetDomainMapImageFilter::GenerateData() while (!iIt.IsAtEnd()) { - const InputImageIndexType & startIdx = iIt.GetIndex(); - InputImageIndexType stopIdx = startIdx; - const InputImagePixelType & inputPixel = iIt.Get(); + const InputImageIndexType & startIdx = iIt.GetIndex(); + InputImageIndexType stopIdx = startIdx; + const InputImagePixelType & inputPixel = iIt.Get(); const OutputImagePixelType & outputPixel = oIt.Get(); // outputPixel is null when it has not been processed yet, @@ -130,7 +130,7 @@ LevelSetDomainMapImageFilter::GenerateData() if ((!inputPixel.empty()) && (outputPixel == OutputImagePixelType{})) { InputImageRegionType subRegion; - InputImageSizeType sizeOfRegion; + InputImageSizeType sizeOfRegion; for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -138,7 +138,7 @@ LevelSetDomainMapImageFilter::GenerateData() stopIdx = startIdx; while ((sameOverlappingLevelSetIds) && (stopIdx[i] <= end[i])) { - const InputImagePixelType & nextPixel = this->m_InputImage->GetPixel(stopIdx); + const InputImagePixelType & nextPixel = this->m_InputImage->GetPixel(stopIdx); const OutputImagePixelType & currentOutputPixel = this->m_OutputImage->GetPixel(stopIdx); // Check if the input list pixels are different, or diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartition.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartition.hxx index cfc614fc1e7..e4c74f4d078 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartition.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartition.hxx @@ -26,7 +26,7 @@ template void LevelSetDomainPartition::PopulateListImage() { - ListPixelType pixelList; + ListPixelType pixelList; IdentifierType i{}; while (i < this->m_NumberOfLevelSetFunctions) { diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImage.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImage.h index ca51fd1e6bf..5742ace60b7 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImage.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImage.h @@ -102,8 +102,8 @@ class ITK_TEMPLATE_EXPORT LevelSetDomainPartitionImage : public LevelSetDomainPa void AllocateListDomain() override; - ImageConstPointer m_Image{}; - ListImagePointer m_ListDomain{}; + ImageConstPointer m_Image{}; + ListImagePointer m_ListDomain{}; LevelSetDomainRegionVectorType m_LevelSetDomainRegionVector{}; }; } // end namespace itk diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImage.hxx index c0dcb178617..f2887e13254 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImage.hxx @@ -46,8 +46,8 @@ LevelSetDomainPartitionImage::PopulateListDomain() for (ListIteratorType lIt(this->m_ListDomain, region); !lIt.IsAtEnd(); ++lIt) { const ListIndexType listIndex = lIt.GetIndex(); - IdentifierListType identifierList; - IdentifierType i{}; + IdentifierListType identifierList; + IdentifierType i{}; while (i < this->m_NumberOfLevelSetFunctions) { if (this->m_LevelSetDomainRegionVector[i].IsInside(listIndex)) diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.h index 71122ababa6..9b34adc8c73 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.h @@ -88,7 +88,7 @@ class ITK_TEMPLATE_EXPORT LevelSetDomainPartitionImageWithKdTree : public LevelS PopulateDomainWithKdTree(); private: - KdTreePointer m_KdTree{}; + KdTreePointer m_KdTree{}; NeighborsIdType m_NumberOfNeighbors{ 10 }; }; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.hxx index f0824c48bd2..8ad6a141c32 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.hxx @@ -51,7 +51,7 @@ LevelSetDomainPartitionImageWithKdTree::PopulateDomainWithKdTree() for (ListIteratorType lIt(this->m_ListDomain, region); !lIt.IsAtEnd(); ++lIt) { const ListIndexType & index = lIt.GetIndex(); - ListPointType pt; + ListPointType pt; this->m_ListDomain->TransformIndexToPhysicalPoint(index, pt); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionMesh.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionMesh.h index f3220fd7f06..a8e2227057e 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionMesh.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionMesh.h @@ -74,7 +74,7 @@ class ITK_TEMPLATE_EXPORT LevelSetDomainPartitionMesh : public LevelSetDomainPar AllocateListDomain(); private: - MeshPointer m_Mesh{}; + MeshPointer m_Mesh{}; ListMeshType m_ListDomain{}; }; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionMesh.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionMesh.hxx index 96d36dd430c..e97aee7be42 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionMesh.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionMesh.hxx @@ -26,14 +26,14 @@ template void LevelSetDomainPartitionMesh::PopulateListDomain() { - PointsContainerConstPointer points = this->m_Mesh->GetPoints(); + PointsContainerConstPointer points = this->m_Mesh->GetPoints(); PointsContainerConstIterator p_it = points->Begin(); PointsContainerConstIterator p_end = points->End(); while (p_it != p_end) { PointIdentifierType & idx = p_it->Index(); - IdentifierListType identifierList; + IdentifierListType identifierList; for (IdentifierType i{}; i < this->m_NumberOfLevelSetFunctions; ++i) { diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationAdvectionTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationAdvectionTerm.hxx index ba76c23b646..701f176ecc5 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationAdvectionTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationAdvectionTerm.hxx @@ -149,7 +149,7 @@ auto LevelSetEquationAdvectionTerm::Value(const LevelSetInputIndexType & iP) -> LevelSetOutputRealType { - VectorType advectionField = this->AdvectionSpeed(iP); + VectorType advectionField = this->AdvectionSpeed(iP); LevelSetOutputRealType oValue{}; LevelSetGradientType backwardGradient = this->m_CurrentLevelSetPointer->EvaluateBackwardGradient(iP); @@ -175,10 +175,10 @@ LevelSetEquationAdvectionTerm::Value(const LevelSetI template auto LevelSetEquationAdvectionTerm::Value(const LevelSetInputIndexType & iP, - const LevelSetDataType & iData) + const LevelSetDataType & iData) -> LevelSetOutputRealType { - VectorType advectionField = this->AdvectionSpeed(iP); + VectorType advectionField = this->AdvectionSpeed(iP); LevelSetOutputRealType oValue{}; for (unsigned int dim = 0; dim < ImageDimension; ++dim) diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationBinaryMaskTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationBinaryMaskTerm.hxx index 5a1d0671933..a924913c216 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationBinaryMaskTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationBinaryMaskTerm.hxx @@ -62,7 +62,7 @@ auto LevelSetEquationBinaryMaskTerm::Value(const LevelSetInputIndexType & index) -> LevelSetOutputRealType { - const InputPixelType pixel = this->m_Mask->GetPixel(index); + const InputPixelType pixel = this->m_Mask->GetPixel(index); LevelSetOutputRealType value; if (pixel > 0) { @@ -78,10 +78,10 @@ LevelSetEquationBinaryMaskTerm::Value(const LevelSet template auto LevelSetEquationBinaryMaskTerm::Value(const LevelSetInputIndexType & index, - const LevelSetDataType & itkNotUsed(data)) + const LevelSetDataType & itkNotUsed(data)) -> LevelSetOutputRealType { - const InputPixelType pixel = this->m_Mask->GetPixel(index); + const InputPixelType pixel = this->m_Mask->GetPixel(index); LevelSetOutputRealType value; if (pixel > 0) { diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.h index 3170570566e..b49ffccd9d3 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.h @@ -113,7 +113,7 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationChanAndVeseExternalTerm private: DomainMapImageFilterType * m_DomainMapImageFilter{}; - CacheImageType * m_CacheImage{}; + CacheImageType * m_CacheImage{}; }; } // namespace itk diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.hxx index a29c744ef08..c946d42fdce 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.hxx @@ -34,10 +34,10 @@ LevelSetEquationChanAndVeseExternalTerm::LevelSetEqu template void LevelSetEquationChanAndVeseExternalTerm::ComputeProduct(const LevelSetInputIndexType & iP, - LevelSetOutputRealType & prod) + LevelSetOutputRealType & prod) { this->ComputeProductTerm(iP, prod); - const LevelSetPointer levelSet = this->m_LevelSetContainer->GetLevelSet(this->m_CurrentLevelSetId); + const LevelSetPointer levelSet = this->m_LevelSetContainer->GetLevelSet(this->m_CurrentLevelSetId); const LevelSetOutputRealType value = levelSet->Evaluate(iP); prod *= -(1 - this->m_Heaviside->Evaluate(-value)); } @@ -46,7 +46,7 @@ template void LevelSetEquationChanAndVeseExternalTerm::ComputeProductTerm( const LevelSetInputIndexType & iP, - LevelSetOutputRealType & prod) + LevelSetOutputRealType & prod) { prod = -1 * NumericTraits::OneValue(); @@ -61,14 +61,14 @@ LevelSetEquationChanAndVeseExternalTerm::ComputeProd using DomainMapType = typename DomainMapImageFilterType::DomainMapType; const DomainMapType domainMap = this->m_DomainMapImageFilter->GetDomainMap(); - auto levelSetMapItr = domainMap.find(id); + auto levelSetMapItr = domainMap.find(id); if (levelSetMapItr != domainMap.end()) { const IdListType * idList = levelSetMapItr->second.GetIdList(); LevelSetIdentifierType kk; - LevelSetPointer levelSet; + LevelSetPointer levelSet; LevelSetOutputRealType value; auto idListIt = idList->begin(); @@ -89,7 +89,7 @@ LevelSetEquationChanAndVeseExternalTerm::ComputeProd else { LevelSetIdentifierType kk; - LevelSetPointer levelSet; + LevelSetPointer levelSet; LevelSetOutputRealType value; typename LevelSetContainerType::Iterator lsIt = this->m_LevelSetContainer->Begin(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.h index 9df4b73f395..72dadff92d8 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.h @@ -136,8 +136,8 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationChanAndVeseInternalTerm void Accumulate(const InputPixelType & inputPixel, const LevelSetOutputRealType & heavisideValue); - InputPixelRealType m_Mean{}; - InputPixelRealType m_TotalValue{}; + InputPixelRealType m_Mean{}; + InputPixelRealType m_TotalValue{}; LevelSetOutputRealType m_TotalH{}; }; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.hxx index 90e338eb4f3..52683b328dd 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.hxx @@ -85,7 +85,7 @@ template void LevelSetEquationChanAndVeseInternalTerm::ComputeProduct( const LevelSetInputIndexType & inputIndex, - LevelSetOutputRealType & prod) + LevelSetOutputRealType & prod) { const LevelSetOutputRealType value = this->m_CurrentLevelSetPointer->Evaluate(inputIndex); prod = this->m_Heaviside->Evaluate(-value); @@ -122,7 +122,7 @@ LevelSetEquationChanAndVeseInternalTerm::Value(const const LevelSetOutputRealType d_val = this->m_Heaviside->EvaluateDerivative(-value); - const InputPixelType pixel = this->m_Input->GetPixel(inputIndex); + const InputPixelType pixel = this->m_Input->GetPixel(inputIndex); LevelSetOutputRealType prod = 1; this->ComputeProductTerm(inputIndex, prod); @@ -142,7 +142,7 @@ LevelSetEquationChanAndVeseInternalTerm::Value(const template auto LevelSetEquationChanAndVeseInternalTerm::Value(const LevelSetInputIndexType & inputIndex, - const LevelSetDataType & data) + const LevelSetDataType & data) -> LevelSetOutputRealType { if (this->m_Heaviside.IsNotNull()) @@ -172,7 +172,7 @@ LevelSetEquationChanAndVeseInternalTerm::Value(const template void LevelSetEquationChanAndVeseInternalTerm::Accumulate( - const InputPixelType & inputPixel, + const InputPixelType & inputPixel, const LevelSetOutputRealType & heavisideValue) { this->m_TotalValue += diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.h index c0fc33eb320..2cbc5961cb6 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.h @@ -305,8 +305,8 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationContainer : public Object ~LevelSetEquationContainer() override = default; LevelSetContainerPointer m_LevelSetContainer{}; - MapContainerType m_Container{}; - InputImagePointer m_Input{}; + MapContainerType m_Container{}; + InputImagePointer m_Input{}; }; } // namespace itk diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.hxx index 4b66df7fac2..38ddfcd62db 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.hxx @@ -26,7 +26,7 @@ namespace itk template void LevelSetEquationContainer::AddEquation(const LevelSetIdentifierType & iId, - TermContainerType * iEquation) + TermContainerType * iEquation) { if (iEquation) { diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.hxx index b9cc2d5b4ec..7b60e7d92fc 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.hxx @@ -47,7 +47,7 @@ LevelSetEquationCurvatureTerm::SetC template auto LevelSetEquationCurvatureTerm::Value(const LevelSetInputIndexType & iP, - const LevelSetDataType & iData) + const LevelSetDataType & iData) -> LevelSetOutputRealType { // MeanCurvature has should be computed by this point. diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationLaplacianTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationLaplacianTerm.hxx index 787a967536e..a68feeecb6a 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationLaplacianTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationLaplacianTerm.hxx @@ -77,7 +77,7 @@ LevelSetEquationLaplacianTerm::Value(const LevelSetI template auto LevelSetEquationLaplacianTerm::Value(const LevelSetInputIndexType & iP, - const LevelSetDataType & iData) + const LevelSetDataType & iData) -> LevelSetOutputRealType { // Laplacian should be computed by this point. diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.h index 0f023d9c152..6b6a8e321be 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.h @@ -131,7 +131,7 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationOverlapPenaltyTerm private: DomainMapImageFilterType * m_DomainMapImageFilter{}; - CacheImageType * m_CacheImage{}; + CacheImageType * m_CacheImage{}; }; } // namespace itk diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.hxx index 53d7e0a3f24..905bfa5233e 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.hxx @@ -72,7 +72,7 @@ LevelSetEquationOverlapPenaltyTerm::Value(const Leve template auto LevelSetEquationOverlapPenaltyTerm::Value(const LevelSetInputIndexType & index, - const LevelSetDataType & itkNotUsed(data)) + const LevelSetDataType & itkNotUsed(data)) -> LevelSetOutputRealType { LevelSetOutputRealType value{}; @@ -83,7 +83,7 @@ LevelSetEquationOverlapPenaltyTerm::Value(const Leve template void LevelSetEquationOverlapPenaltyTerm::ComputeSumTerm(const LevelSetInputIndexType & index, - LevelSetOutputRealType & sum) + LevelSetOutputRealType & sum) { CompensatedSummationType compensatedSummation; compensatedSummation.ResetToZero(); @@ -99,14 +99,14 @@ LevelSetEquationOverlapPenaltyTerm::ComputeSumTerm(c using DomainMapType = typename DomainMapImageFilterType::DomainMapType; const DomainMapType domainMap = this->m_DomainMapImageFilter->GetDomainMap(); - auto levelSetMapItr = domainMap.find(idx); + auto levelSetMapItr = domainMap.find(idx); if (levelSetMapItr != domainMap.end()) { const IdListType * idList = levelSetMapItr->second.GetIdList(); LevelSetIdentifierType kk; - LevelSetPointer levelSet; + LevelSetPointer levelSet; LevelSetOutputRealType value; auto idListIt = idList->begin(); @@ -127,7 +127,7 @@ LevelSetEquationOverlapPenaltyTerm::ComputeSumTerm(c else { LevelSetIdentifierType kk; - LevelSetPointer levelSet; + LevelSetPointer levelSet; LevelSetOutputRealType value; typename LevelSetContainerType::Iterator lsIt = this->m_LevelSetContainer->Begin(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationPropagationTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationPropagationTerm.hxx index ec23414fc99..3a029dbc1f9 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationPropagationTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationPropagationTerm.hxx @@ -112,7 +112,7 @@ LevelSetEquationPropagationTerm:: -> LevelSetOutputRealType { constexpr LevelSetOutputRealType zero{}; - LevelSetOutputRealType propagation_gradient = zero; + LevelSetOutputRealType propagation_gradient = zero; for (unsigned int i = 0; i < ImageDimension; ++i) { diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.hxx index 9cef4ea0e32..b061717df89 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.hxx @@ -81,7 +81,7 @@ LevelSetEquationTermBase::Evaluate(const LevelS template auto LevelSetEquationTermBase::Evaluate(const LevelSetInputIndexType & iP, - const LevelSetDataType & iData) + const LevelSetDataType & iData) -> LevelSetOutputRealType { if (itk::Math::abs(this->m_Coefficient) > NumericTraits::epsilon()) diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.h index 77a87cd6486..d9401f94531 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.h @@ -322,7 +322,7 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationTermContainer : public Object ~LevelSetEquationTermContainer() override = default; - LevelSetIdentifierType m_CurrentLevelSetId{}; + LevelSetIdentifierType m_CurrentLevelSetId{}; LevelSetContainerPointer m_LevelSetContainer{}; InputImagePointer m_Input{}; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.hxx index 02ef0ab6087..1629cc4d3b8 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.hxx @@ -101,7 +101,7 @@ LevelSetEquationTermContainer::AddTerm(const Te RequiredDataType termRequiredData = iTerm->GetRequiredData(); - auto dIt = termRequiredData.begin(); + auto dIt = termRequiredData.begin(); const auto dEnd = termRequiredData.end(); while (dIt != dEnd) @@ -292,7 +292,7 @@ LevelSetEquationTermContainer::Evaluate(const L template auto LevelSetEquationTermContainer::Evaluate(const LevelSetInputIndexType & iP, - const LevelSetDataType & iData) + const LevelSetDataType & iData) -> LevelSetOutputRealType { auto term_it = m_Container.begin(); @@ -377,7 +377,7 @@ void LevelSetEquationTermContainer::ComputeRequiredData(const LevelSetInputIndexType & iP, LevelSetDataType & ioData) { - auto dIt = m_RequiredData.begin(); + auto dIt = m_RequiredData.begin(); const auto dEnd = m_RequiredData.end(); auto tIt = m_Container.begin(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.hxx index e3b05200c23..f9ee8b9dd12 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.hxx @@ -70,14 +70,14 @@ LevelSetEvolution>::ComputeIterat this->m_LevelSetContainer->GetDomainMapFilter(); using DomainMapType = typename DomainMapImageFilterType::DomainMapType; const DomainMapType domainMap = domainMapFilter->GetDomainMap(); - auto mapIt = domainMap.begin(); - auto mapEnd = domainMap.end(); + auto mapIt = domainMap.begin(); + auto mapEnd = domainMap.end(); const ThreadIdType maximumNumberOfThreads = this->m_SplitDomainMapComputeIterationThreader->GetMaximumNumberOfThreads(); using DomainMapDomainType = typename SplitDomainMapComputeIterationThreaderType::DomainType; - DomainMapDomainType subdomain; - const DomainMapDomainType completeDomain(mapIt, mapEnd); + DomainMapDomainType subdomain; + const DomainMapDomainType completeDomain(mapIt, mapEnd); const typename SplitDomainMapComputeIterationThreaderType::DomainPartitionerType * domainParitioner = this->m_SplitDomainMapComputeIterationThreader->GetDomainPartitioner(); const ThreadIdType numberOfThreadsThatWillBeUsed = @@ -276,9 +276,9 @@ LevelSetEvolutionm_LevelSetContainerIteratorToProcessWhenThreading->GetLevelSet(); - const LevelSetLayerType zeroLayer = levelSet->GetLayer(0); - auto layerBegin = zeroLayer.begin(); - auto layerEnd = zeroLayer.end(); + const LevelSetLayerType zeroLayer = levelSet->GetLayer(0); + auto layerBegin = zeroLayer.begin(); + auto layerEnd = zeroLayer.end(); const typename SplitLevelSetPartitionerType::DomainType completeDomain(layerBegin, layerEnd); this->m_SplitLevelSetComputeIterationThreader->Execute(this, completeDomain); @@ -398,7 +398,7 @@ LevelSetEvolution>::U while (it != this->m_LevelSetContainer->End()) { const typename LevelSetType::Pointer levelSet = it->GetLevelSet(); - const LevelSetIdentifierType levelSetId = it->GetIdentifier(); + const LevelSetIdentifierType levelSetId = it->GetIdentifier(); const UpdateLevelSetFilterPointer updateLevelSet = UpdateLevelSetFilterType::New(); updateLevelSet->SetInputLevelSet(levelSet); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.h index f472b0a41f1..bc65bac7684 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.h @@ -159,14 +159,14 @@ class ITK_TEMPLATE_EXPORT LevelSetEvolutionBase : public Object StoppingCriterionPointer m_StoppingCriterion{}; - EquationContainerPointer m_EquationContainer{}; + EquationContainerPointer m_EquationContainer{}; typename LevelSetContainerType::Pointer m_LevelSetContainer{}; LevelSetOutputRealType m_Alpha{}; LevelSetOutputRealType m_Dt{}; LevelSetOutputRealType m_RMSChangeAccumulator{}; - bool m_UserGloballyDefinedTimeStep{}; - IdentifierType m_NumberOfIterations{}; + bool m_UserGloballyDefinedTimeStep{}; + IdentifierType m_NumberOfIterations{}; /** Helper members for threading. */ typename LevelSetContainerType::Iterator m_LevelSetContainerIteratorToProcessWhenThreading{}; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.hxx index 35ccd633cc2..f4b7956aeaa 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.hxx @@ -102,7 +102,7 @@ LevelSetEvolutionBase::CheckSetUp() } // Get the LevelSetContainer from the EquationContainer - const TermContainerPointer termContainer = eqIt->GetEquation(); + const TermContainerPointer termContainer = eqIt->GetEquation(); typename TermContainerType::Iterator termIt = termContainer->Begin(); if (termIt == termContainer->End()) @@ -146,14 +146,14 @@ LevelSetEvolutionBase::InitializeIteration() this->m_LevelSetContainer->GetDomainMapFilter(); using DomainMapType = typename DomainMapImageFilterType::DomainMapType; const DomainMapType domainMap = domainMapFilter->GetDomainMap(); - auto mapIt = domainMap.begin(); - auto mapEnd = domainMap.end(); + auto mapIt = domainMap.begin(); + auto mapEnd = domainMap.end(); while (mapIt != mapEnd) { // Iterator over the region for the current levelset overlap identifier. using LevelSetListImageDomainType = typename DomainMapImageFilterType::LevelSetDomain; - const LevelSetListImageDomainType & levelSetListImageDomain = mapIt->second; + const LevelSetListImageDomainType & levelSetListImageDomain = mapIt->second; ImageRegionConstIteratorWithIndex it(inputImage, *(levelSetListImageDomain.GetRegion())); it.GoToBegin(); @@ -181,7 +181,7 @@ LevelSetEvolutionBase::InitializeIteration() } else // assume there is one level set that covers the RequestedRegion of the InputImage { - const TermContainerPointer termContainer = this->m_EquationContainer->GetEquation(0); + const TermContainerPointer termContainer = this->m_EquationContainer->GetEquation(0); ImageRegionConstIteratorWithIndex it(inputImage, inputImage->GetRequestedRegion()); it.GoToBegin(); while (!it.IsAtEnd()) diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionComputeIterationThreader.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionComputeIterationThreader.hxx index 43ddf234449..d37f43661f6 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionComputeIterationThreader.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionComputeIterationThreader.hxx @@ -32,13 +32,13 @@ LevelSetEvolutionComputeIterationThreader, const ThreadIdType itkNotUsed( threadId)) { - typename LevelSetContainerType::Iterator levelSetContainerIt = this->m_Associate->m_LevelSetContainer->Begin(); - const typename LevelSetType::Pointer levelSet = levelSetContainerIt->GetLevelSet(); + typename LevelSetContainerType::Iterator levelSetContainerIt = this->m_Associate->m_LevelSetContainer->Begin(); + const typename LevelSetType::Pointer levelSet = levelSetContainerIt->GetLevelSet(); const typename LevelSetImageType::ConstPointer levelSetImage = levelSet->GetImage(); // Identify the level-set region const OffsetType offset = levelSet->GetDomainOffset(); - const IndexType index = imageSubRegion.GetIndex() - offset; + const IndexType index = imageSubRegion.GetIndex() - offset; const RegionType subRegion(index, imageSubRegion.GetSize()); ImageRegionConstIteratorWithIndex imageIt(levelSetImage, subRegion); @@ -49,11 +49,11 @@ LevelSetEvolutionComputeIterationThreader, const IdListType * idList = this->m_Associate->m_IdListToProcessWhenThreading; // Avoid repeated map lookups. - const size_t numberOfLevelSets = idList->size(); + const size_t numberOfLevelSets = idList->size(); std::vector levelSetUpdateImages(numberOfLevelSets); std::vector termContainers(numberOfLevelSets); - auto idListIt = idList->begin(); - unsigned int idListIdx = 0; + auto idListIt = idList->begin(); + unsigned int idListIdx = 0; while (idListIt != idList->end()) { //! \todo Fix me for string identifiers @@ -84,17 +84,17 @@ LevelSetEvolutionComputeIterationThreader, // set. typename LevelSetContainerType::ConstIterator levelSetUpdateContainerIt = this->m_Associate->m_UpdateBuffer->Begin(); - const typename LevelSetType::Pointer levelSetUpdate = levelSetUpdateContainerIt->GetLevelSet(); + const typename LevelSetType::Pointer levelSetUpdate = levelSetUpdateContainerIt->GetLevelSet(); const typename LevelSetImageType::Pointer levelSetUpdateImage = levelSetUpdate->GetModifiableImage(); - typename EquationContainerType::Iterator equationContainerIt = this->m_Associate->m_EquationContainer->Begin(); + typename EquationContainerType::Iterator equationContainerIt = this->m_Associate->m_EquationContainer->Begin(); const typename TermContainerType::Pointer termContainer = equationContainerIt->GetEquation(); imageIt.GoToBegin(); while (!imageIt.IsAtEnd()) { - const IndexType levelSetIndex = imageIt.GetIndex(); - const IndexType inputIndex = imageIt.GetIndex() + offset; + const IndexType levelSetIndex = imageIt.GetIndex(); + const IndexType inputIndex = imageIt.GetIndex() + offset; LevelSetDataType characteristics; termContainer->ComputeRequiredData(inputIndex, characteristics); const LevelSetOutputRealType temp_update = termContainer->Evaluate(inputIndex, characteristics); @@ -132,9 +132,9 @@ LevelSetEvolutionComputeIterationThreader< this->m_Associate->m_UpdateBuffer->GetLevelSet(*idListIt - 1); const OffsetType offset = levelSetUpdate->GetDomainOffset(); - const IndexType levelSetIndex = it.GetIndex() - offset; + const IndexType levelSetIndex = it.GetIndex() - offset; - LevelSetDataType characteristics; + LevelSetDataType characteristics; const typename TermContainerType::Pointer termContainer = this->m_Associate->m_EquationContainer->GetEquation(*idListIt - 1); termContainer->ComputeRequiredData(it.GetIndex(), characteristics); @@ -172,11 +172,11 @@ LevelSetEvolutionComputeIterationThreader< ThreadedIteratorRangePartitioner::LayerConstIterator>, TLevelSetEvolution>::ThreadedExecution(const DomainType & iteratorSubRange, const ThreadIdType threadId) { - typename LevelSetContainerType::Iterator it = this->m_Associate->m_LevelSetContainerIteratorToProcessWhenThreading; + typename LevelSetContainerType::Iterator it = this->m_Associate->m_LevelSetContainerIteratorToProcessWhenThreading; const typename LevelSetType::ConstPointer levelSet = it->GetLevelSet(); const LevelSetIdentifierType levelSetId = it->GetIdentifier(); - const OffsetType offset = levelSet->GetDomainOffset(); + const OffsetType offset = levelSet->GetDomainOffset(); const typename TermContainerType::Pointer termContainer = this->m_Associate->m_EquationContainer->GetEquation(levelSetId); @@ -208,7 +208,7 @@ LevelSetEvolutionComputeIterationThreader< TLevelSetEvolution>::AfterThreadedExecution() { typename LevelSetContainerType::Iterator it = this->m_Associate->m_LevelSetContainerIteratorToProcessWhenThreading; - const LevelSetIdentifierType levelSetId = it->GetIdentifier(); + const LevelSetIdentifierType levelSetId = it->GetIdentifier(); typename LevelSetEvolutionType::LevelSetLayerType * levelSetLayerUpdateBuffer = this->m_Associate->m_UpdateBuffer[levelSetId]; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionStoppingCriterion.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionStoppingCriterion.h index 673fe5bf7f2..20671d9ef16 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionStoppingCriterion.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionStoppingCriterion.h @@ -82,9 +82,9 @@ class ITK_TEMPLATE_EXPORT LevelSetEvolutionStoppingCriterion : public StoppingCr ~LevelSetEvolutionStoppingCriterion() override = default; LevelSetContainerPointer m_LevelSetContainer{}; - OutputRealType m_RMSChangeAccumulator{}; - IterationIdType m_NumberOfIterations{}; - IterationIdType m_CurrentIteration{}; + OutputRealType m_RMSChangeAccumulator{}; + IterationIdType m_NumberOfIterations{}; + IterationIdType m_CurrentIteration{}; }; } // namespace itk #ifndef ITK_MANUAL_INSTANTIATION diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionUpdateLevelSetsThreader.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionUpdateLevelSetsThreader.hxx index cceec747bb9..984d473101e 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionUpdateLevelSetsThreader.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionUpdateLevelSetsThreader.hxx @@ -55,10 +55,10 @@ LevelSetEvolutionUpdateLevelSetsThreader, const typename LevelSetType::Pointer levelSet = levelSetContainerIt->GetLevelSet(); const typename LevelSetType::Pointer levelSetUpdate = levelSetUpdateContainerIt->GetLevelSet(); - const typename LevelSetImageType::Pointer levelSetImage = levelSet->GetModifiableImage(); + const typename LevelSetImageType::Pointer levelSetImage = levelSet->GetModifiableImage(); const typename LevelSetImageType::ConstPointer levelSetUpdateImage = levelSetUpdate->GetImage(); - ImageRegionIterator levelSetImageIt(levelSetImage, imageSubRegion); + ImageRegionIterator levelSetImageIt(levelSetImage, imageSubRegion); ImageRegionConstIterator levelSetUpdateImageIt(levelSetUpdateImage, imageSubRegion); levelSetImageIt.GoToBegin(); levelSetUpdateImageIt.GoToBegin(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetImage.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetImage.h index 6ce3e8f89db..f5dd380fd18 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetImage.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetImage.h @@ -73,7 +73,7 @@ class ITK_TEMPLATE_EXPORT LevelSetImage : public LevelSetBase::GetAsLabelObject() while (lIt != lEnd) { - const LayerIdType id = *lIt; + const LayerIdType id = *lIt; const LabelObjectPointer labelObject = this->m_LabelMap->GetLabelObject(id); - const SizeValueType numberOfLines = labelObject->GetNumberOfLines(); + const SizeValueType numberOfLines = labelObject->GetNumberOfLines(); for (SizeValueType i = 0; i < numberOfLines; ++i) { diff --git a/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.hxx index bdd70505749..72fa5f67ab5 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.hxx @@ -36,7 +36,7 @@ auto MalcolmSparseLevelSetImage::Evaluate(const InputType & inputPixel) const -> OutputType { const InputType mapIndex = inputPixel - this->m_DomainOffset; - auto layerIt = this->m_Layers.begin(); + auto layerIt = this->m_Layers.begin(); while (layerIt != this->m_Layers.end()) { @@ -143,7 +143,7 @@ MalcolmSparseLevelSetImage::EvaluateLaplacian(const InputType & inpu // ---------------------------------------------------------------------------- template void -MalcolmSparseLevelSetImage::EvaluateMeanCurvature(const InputType & inputPixel, +MalcolmSparseLevelSetImage::EvaluateMeanCurvature(const InputType & inputPixel, LevelSetDataType & data) const { if (!data.MeanCurvature.m_Computed) diff --git a/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.hxx index 82b6c344c1a..5954c08a946 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.hxx @@ -35,7 +35,7 @@ auto ShiSparseLevelSetImage::Evaluate(const InputType & inputIndex) const -> OutputType { const InputType mapIndex = inputIndex - this->m_DomainOffset; - auto layerIt = this->m_Layers.begin(); + auto layerIt = this->m_Layers.begin(); while (layerIt != this->m_Layers.end()) { diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.h b/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.h index 02b9305db64..76ea260cfe1 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.h @@ -114,8 +114,8 @@ class ITK_TEMPLATE_EXPORT UpdateMalcolmSparseLevelSet : public Object LevelSetLayerType m_Update{}; - IdentifierType m_CurrentLevelSetId{}; - LevelSetOutputRealType m_RMSChangeAccumulator{}; + IdentifierType m_CurrentLevelSetId{}; + LevelSetOutputRealType m_RMSChangeAccumulator{}; EquationContainerPointer m_EquationContainer{}; using LabelImageType = Image; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.hxx b/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.hxx index 29dc70c3bc5..8a312858e12 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.hxx @@ -86,7 +86,7 @@ UpdateMalcolmSparseLevelSet::Update() { itkAssertInDebugAndIgnoreInReleaseMacro(nodeIt->first == upIt->first); - const LevelSetInputType currentIdx = nodeIt->first; + const LevelSetInputType currentIdx = nodeIt->first; const LevelSetOutputType update = upIt->second; if (update > 0) @@ -162,8 +162,8 @@ template void UpdateMalcolmSparseLevelSet::EvolveWithUnPhasedPropagation() { - LevelSetOutputType oldValue; - LevelSetOutputType newValue; + LevelSetOutputType oldValue; + LevelSetOutputType newValue; LevelSetLayerType & levelZero = this->m_OutputLevelSet->GetLayer(LevelSetType::ZeroLayer()); // neighborhood iterator @@ -281,11 +281,11 @@ UpdateMalcolmSparseLevelSet::EvolveWithPhasedPro itkAssertInDebugAndIgnoreInReleaseMacro(nodeIt->first == upIt->first); const LevelSetOutputType oldValue = LevelSetType::ZeroLayer(); - LevelSetOutputType newValue; + LevelSetOutputType newValue; const LevelSetOutputType update = upIt->second; - const LevelSetInputType currentIdx = nodeIt->first; - const LevelSetInputType inputIndex = currentIdx + this->m_Offset; + const LevelSetInputType currentIdx = nodeIt->first; + const LevelSetInputType inputIndex = currentIdx + this->m_Offset; if (Math::NotAlmostEquals(update, LevelSetOutputRealType{})) { @@ -392,7 +392,7 @@ UpdateMalcolmSparseLevelSet::CompactLayersToSing if (negativeUpdate && !positiveUpdate) { const LevelSetOutputRealType newValue = LevelSetType::MinusOneLayer(); - auto tempIt = nodeIt; + auto tempIt = nodeIt; ++nodeIt; listZero.erase(tempIt); @@ -404,7 +404,7 @@ UpdateMalcolmSparseLevelSet::CompactLayersToSing if (positiveUpdate && !negativeUpdate) { const LevelSetOutputRealType newValue = LevelSetType::PlusOneLayer(); - auto tempIt = nodeIt; + auto tempIt = nodeIt; ++nodeIt; listZero.erase(tempIt); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.h b/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.h index 8c9a983ac44..1574e71ca44 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.h @@ -112,8 +112,8 @@ class ITK_TEMPLATE_EXPORT UpdateShiSparseLevelSet : public Object // output LevelSetPointer m_OutputLevelSet{}; - IdentifierType m_CurrentLevelSetId{}; - LevelSetOutputRealType m_RMSChangeAccumulator{}; + IdentifierType m_CurrentLevelSetId{}; + LevelSetOutputRealType m_RMSChangeAccumulator{}; EquationContainerPointer m_EquationContainer{}; using LabelImageType = Image; @@ -136,13 +136,13 @@ class ITK_TEMPLATE_EXPORT UpdateShiSparseLevelSet : public Object /** Return true if there is a pixel from the opposite layer (+1 or -1) moving in the same direction */ bool - Con(const LevelSetInputType & idx, - const LevelSetOutputType & currentStatus, + Con(const LevelSetInputType & idx, + const LevelSetOutputType & currentStatus, const LevelSetOutputRealType & currentUpdate) const; private: // input - LevelSetPointer m_InputLevelSet{}; + LevelSetPointer m_InputLevelSet{}; LevelSetOffsetType m_Offset{}; using NodePairType = std::pair; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.hxx b/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.hxx index 32f097e40bb..6eaed51a91c 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.hxx @@ -202,8 +202,8 @@ UpdateShiSparseLevelSet::UpdateLayerPlusOne() // for each point in Lz while (nodeIt != nodeEnd) { - bool erased = false; - const LevelSetInputType currentIndex = nodeIt->first; + bool erased = false; + const LevelSetInputType currentIndex = nodeIt->first; const LevelSetOutputType currentValue = nodeIt->second; inputIndex = currentIndex + this->m_Offset; @@ -299,10 +299,10 @@ UpdateShiSparseLevelSet::UpdateLayerMinusOne() // for each point in Lz while (nodeIt != nodeEnd) { - bool erased = false; - const LevelSetInputType currentIndex = nodeIt->first; + bool erased = false; + const LevelSetInputType currentIndex = nodeIt->first; const LevelSetOutputType currentValue = nodeIt->second; - const LevelSetInputType inputIndex = currentIndex + this->m_Offset; + const LevelSetInputType inputIndex = currentIndex + this->m_Offset; // update for the current level set const LevelSetOutputRealType update = termContainer->Evaluate(inputIndex); @@ -371,8 +371,8 @@ UpdateShiSparseLevelSet::UpdateLayerMinusOne() template bool -UpdateShiSparseLevelSet::Con(const LevelSetInputType & idx, - const LevelSetOutputType & currentStatus, +UpdateShiSparseLevelSet::Con(const LevelSetInputType & idx, + const LevelSetOutputType & currentStatus, const LevelSetOutputRealType & currentUpdate) const { const TermContainerPointer termContainer = this->m_EquationContainer->GetEquation(this->m_CurrentLevelSetId); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.h b/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.h index e78208424b9..78265318e9c 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.h @@ -171,15 +171,15 @@ class ITK_TEMPLATE_EXPORT UpdateWhitakerSparseLevelSet : public Object private: LevelSetOutputType m_TimeStep{}; LevelSetOutputType m_RMSChangeAccumulator{}; - IdentifierType m_CurrentLevelSetId{}; + IdentifierType m_CurrentLevelSetId{}; EquationContainerPointer m_EquationContainer{}; LevelSetLayerType m_Update{}; - LevelSetPointer m_InputLevelSet{}; - LevelSetPointer m_OutputLevelSet{}; + LevelSetPointer m_InputLevelSet{}; + LevelSetPointer m_OutputLevelSet{}; - LevelSetPointer m_TempLevelSet{}; + LevelSetPointer m_TempLevelSet{}; LevelSetLayerType m_TempPhi{}; LevelSetLayerIdType m_MinStatus{}; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.hxx b/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.hxx index 6fc83d1c819..bdc04c471b7 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.hxx @@ -210,7 +210,7 @@ UpdateWhitakerSparseLevelSet inputIndex = currentIndex + this->m_Offset; const LevelSetOutputType currentValue = nodeIt->second; - LevelSetOutputType tempUpdate = this->m_TimeStep * static_cast(upIt->second); + LevelSetOutputType tempUpdate = this->m_TimeStep * static_cast(upIt->second); if (tempUpdate > 0.5) { @@ -444,7 +444,7 @@ UpdateWhitakerSparseLevelSet } else // !thereIsAPointWithLabelEqualTo0 { // change layers only - auto tempIt = nodeIt; + auto tempIt = nodeIt; const LevelSetOutputType t = tempIt->second; ++nodeIt; outputlayerMinus1.erase(tempIt); @@ -550,7 +550,7 @@ UpdateWhitakerSparseLevelSet } else { // change layers only - auto tempIt = nodeIt; + auto tempIt = nodeIt; const LevelSetOutputType t = tempIt->second; ++nodeIt; outputLayerPlus1.erase(tempIt); @@ -577,7 +577,7 @@ UpdateWhitakerSparseLevelSet LevelSetLayerType & outputLayerMinus2 = this->m_OutputLevelSet->GetLayer(LevelSetType::MinusTwoLayer()); LevelSetLayerType & layerMinus1 = this->m_TempLevelSet->GetLayer(LevelSetType::MinusOneLayer()); - auto nodeIt = outputLayerMinus2.begin(); + auto nodeIt = outputLayerMinus2.begin(); const auto nodeEnd = outputLayerMinus2.end(); while (nodeIt != nodeEnd) @@ -681,7 +681,7 @@ UpdateWhitakerSparseLevelSet LevelSetLayerType & outputLayerPlus2 = this->m_OutputLevelSet->GetLayer(LevelSetType::PlusTwoLayer()); LevelSetLayerType & layerPlusOne = this->m_TempLevelSet->GetLayer(LevelSetType::PlusOneLayer()); - auto nodeIt = outputLayerPlus2.begin(); + auto nodeIt = outputLayerPlus2.begin(); const auto nodeEnd = outputLayerPlus2.end(); while (nodeIt != nodeEnd) @@ -691,7 +691,7 @@ UpdateWhitakerSparseLevelSet neighIt.SetLocation(currentIndex); - bool thereIsAPointWithLabelEqualToPlus1 = false; + bool thereIsAPointWithLabelEqualToPlus1 = false; LevelSetOutputType max = NumericTraits::max(); for (typename NeighborhoodIteratorType::Iterator it = neighIt.Begin(); !it.IsAtEnd(); ++it) @@ -704,7 +704,7 @@ UpdateWhitakerSparseLevelSet thereIsAPointWithLabelEqualToPlus1 = true; } const LevelSetInputType neighborIndex = neighIt.GetIndex(it.GetNeighborhoodOffset()); - auto phiIt = this->m_TempPhi.find(neighborIndex); + auto phiIt = this->m_TempPhi.find(neighborIndex); if (phiIt != this->m_TempPhi.end()) { max = std::min(max, phiIt->second); @@ -815,7 +815,7 @@ UpdateWhitakerSparseLevelSet while (nodeIt != nodeEnd) { - const LevelSetInputType currentIndex = nodeIt->first; + const LevelSetInputType currentIndex = nodeIt->first; const LevelSetOutputType currentValue = nodeIt->second; outputlayerMinus1.insert(NodePairType(currentIndex, currentValue)); @@ -872,7 +872,7 @@ UpdateWhitakerSparseLevelSet while (nodeIt != nodeEnd) { - const LevelSetInputType currentIndex = nodeIt->first; + const LevelSetInputType currentIndex = nodeIt->first; const LevelSetOutputType currentValue = nodeIt->second; outputLayerPlus1.insert(NodePairType(currentIndex, currentValue)); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx index 8df295589aa..a2db26e4983 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx @@ -35,7 +35,7 @@ auto WhitakerSparseLevelSetImage::Evaluate(const InputType & inputIndex) const -> OutputType { const InputType mapIndex = inputIndex - this->m_DomainOffset; - auto layerIt = this->m_Layers.begin(); + auto layerIt = this->m_Layers.begin(); auto rval = static_cast(ZeroLayer()); diff --git a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToMalcolmSparseLevelSetAdaptorTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToMalcolmSparseLevelSetAdaptorTest.cxx index 7de9bb5bbe4..f2d52d66781 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToMalcolmSparseLevelSetAdaptorTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToMalcolmSparseLevelSetAdaptorTest.cxx @@ -106,7 +106,7 @@ itkBinaryImageToMalcolmSparseLevelSetAdaptorTest(int argc, char * argv[]) } LevelSetType::LayerType layer = sparseLevelSet->GetLayer(LevelSetType::ZeroLayer()); - auto lIt = layer.begin(); + auto lIt = layer.begin(); while (lIt != layer.end()) { diff --git a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToShiSparseLevelSetAdaptorTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToShiSparseLevelSetAdaptorTest.cxx index 466937e47ca..ef2008154a1 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToShiSparseLevelSetAdaptorTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToShiSparseLevelSetAdaptorTest.cxx @@ -102,7 +102,7 @@ itkBinaryImageToShiSparseLevelSetAdaptorTest(int argc, char * argv[]) for (LayerIdType lyr = sparseLevelSet->MinusOneLayer(); lyr <= sparseLevelSet->PlusOneLayer(); lyr += 2) { LevelSetType::LayerType layer = sparseLevelSet->GetLayer(lyr); - auto lIt = layer.begin(); + auto lIt = layer.begin(); std::cout << "*** " << static_cast(lyr) << " ***" << std::endl; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToWhitakerSparseLevelSetAdaptorTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToWhitakerSparseLevelSetAdaptorTest.cxx index 71e3af30433..38ae1acc439 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToWhitakerSparseLevelSetAdaptorTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkBinaryImageToWhitakerSparseLevelSetAdaptorTest.cxx @@ -132,7 +132,7 @@ itkBinaryImageToWhitakerSparseLevelSetAdaptorTest(int argc, char * argv[]) for (LayerIdType lyr = sparseLevelSet->MinusTwoLayer(); lyr <= sparseLevelSet->PlusTwoLayer(); ++lyr) { LevelSetType::LayerType layer = sparseLevelSet->GetLayer(lyr); - auto lIt = layer.begin(); + auto lIt = layer.begin(); std::cout << "*** " << static_cast(lyr) << " ***" << std::endl; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainMapImageFilterTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainMapImageFilterTest.cxx index 733e2772e85..38e3ee5d26d 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainMapImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainMapImageFilterTest.cxx @@ -75,7 +75,7 @@ itkLevelSetDomainMapImageFilterTest(int, char *[]) it.GoToBegin(); const DomainMapType domainMap = filter->GetDomainMap(); - const auto mapEnd = domainMap.end(); + const auto mapEnd = domainMap.end(); while (!it.IsAtEnd()) { const OutputImageType::IndexType out_index = it.GetIndex(); diff --git a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainPartitionImageTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainPartitionImageTest.cxx index 7ccdbc6d1fe..c9bdafe5286 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainPartitionImageTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainPartitionImageTest.cxx @@ -95,7 +95,7 @@ itkLevelSetDomainPartitionImageTest(int, char *[]) bool flag = true; const ListImageType::ConstPointer listImage = partitionSource->GetListDomain(); - ListImageIteratorType It(listImage, listImage->GetLargestPossibleRegion()); + ListImageIteratorType It(listImage, listImage->GetLargestPossibleRegion()); It.GoToBegin(); while (!It.IsAtEnd()) { diff --git a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainPartitionImageWithKdTreeTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainPartitionImageWithKdTreeTest.cxx index 9906b115396..9bcd13108bf 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainPartitionImageWithKdTreeTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainPartitionImageWithKdTreeTest.cxx @@ -71,7 +71,7 @@ itkLevelSetDomainPartitionImageWithKdTreeTest(int, char *[]) regionVector.resize(numberOfLevelSetFunctions); CentroidVectorType mv; - auto sample = SampleType::New(); + auto sample = SampleType::New(); sample->SetMeasurementVectorSize(Dimension); for (unsigned int i = 0; i < numberOfLevelSetFunctions; ++i) @@ -116,7 +116,7 @@ itkLevelSetDomainPartitionImageWithKdTreeTest(int, char *[]) bool flag = true; const ListImageType::ConstPointer listImage = partitionSource->GetListDomain(); - ListImageIteratorType It(listImage, listImage->GetLargestPossibleRegion()); + ListImageIteratorType It(listImage, listImage->GetLargestPossibleRegion()); It.GoToBegin(); while (!It.IsAtEnd()) { diff --git a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetChanAndVeseInternalTermTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetChanAndVeseInternalTermTest.cxx index ac1e9ec7ac1..c40300ff681 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetChanAndVeseInternalTermTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetChanAndVeseInternalTermTest.cxx @@ -85,7 +85,7 @@ itkMultiLevelSetChanAndVeseInternalTermTest(int, char *[]) input2->FillBuffer(value); ImageType::IndexType idx; - IdListType list_ids; + IdListType list_ids; auto id_image = IdListImageType::New(); id_image->SetRegions(region); @@ -172,10 +172,10 @@ itkMultiLevelSetChanAndVeseInternalTermTest(int, char *[]) using DomainMapType = DomainMapImageFilterType::DomainMapType; const DomainMapType domainMap = domainMapFilter->GetDomainMap(); - auto map_it = domainMap.begin(); - auto map_end = domainMap.end(); + auto map_it = domainMap.begin(); + auto map_end = domainMap.end(); - LevelSetType::Pointer levelSet; + LevelSetType::Pointer levelSet; ChanAndVeseTermType::Pointer eqTerm; while (map_it != map_end) { diff --git a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetDenseImageTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetDenseImageTest.cxx index a0d59cc4014..86de6150b11 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetDenseImageTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetDenseImageTest.cxx @@ -55,7 +55,7 @@ itkMultiLevelSetDenseImageTest(int, char *[]) input2->FillBuffer(value); ImageType::IndexType idx; - IdListType list_ids; + IdListType list_ids; auto id_image = IdListImageType::New(); id_image->SetRegions(region); @@ -111,9 +111,9 @@ itkMultiLevelSetDenseImageTest(int, char *[]) CacheImageType::PixelType out_id; using DomainMapType = DomainMapImageFilterType::DomainMapType; - const DomainMapType domainMap = filter->GetDomainMap(); + const DomainMapType domainMap = filter->GetDomainMap(); DomainMapType::const_iterator mapIt; - const auto mapEnd = domainMap.end(); + const auto mapEnd = domainMap.end(); while (!it.IsAtEnd()) { out_index = it.GetIndex(); diff --git a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetEvolutionTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetEvolutionTest.cxx index 221c64ee8fc..1df62642700 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetEvolutionTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkMultiLevelSetEvolutionTest.cxx @@ -86,7 +86,7 @@ itkMultiLevelSetEvolutionTest(int, char *[]) input2->FillBuffer(value); ImageType::IndexType idx; - IdListType list_ids; + IdListType list_ids; auto id_image = IdListImageType::New(); id_image->SetRegions(region); diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetMalcolmImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetMalcolmImage2DTest.cxx index 839f6be4837..c3e06b537c9 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetMalcolmImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetMalcolmImage2DTest.cxx @@ -82,8 +82,8 @@ itkSingleLevelSetMalcolmImage2DTest(int argc, char * argv[]) binary->FillBuffer(InputPixelType{}); InputImageType::RegionType region; - InputImageType::IndexType index; - InputImageType::SizeType size; + InputImageType::IndexType index; + InputImageType::SizeType size; index.Fill(10); size.Fill(30); diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetShiImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetShiImage2DTest.cxx index 7ad4a98471c..d0d72eec2fc 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetShiImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetShiImage2DTest.cxx @@ -82,8 +82,8 @@ itkSingleLevelSetShiImage2DTest(int argc, char * argv[]) binary->FillBuffer(InputPixelType{}); InputImageType::RegionType region; - InputImageType::IndexType index; - InputImageType::SizeType size; + InputImageType::IndexType index; + InputImageType::SizeType size; index.Fill(10); size.Fill(30); diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DTest.cxx index 77aad500863..fce756b8219 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DTest.cxx @@ -84,8 +84,8 @@ itkSingleLevelSetWhitakerImage2DTest(int argc, char * argv[]) binary->FillBuffer(InputPixelType{}); InputImageType::RegionType region; - InputImageType::IndexType index; - InputImageType::SizeType size; + InputImageType::IndexType index; + InputImageType::SizeType size; index.Fill(10); size.Fill(30); diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithCurvatureTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithCurvatureTest.cxx index d791c03a951..5c09a76f1b6 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithCurvatureTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithCurvatureTest.cxx @@ -84,8 +84,8 @@ itkSingleLevelSetWhitakerImage2DWithCurvatureTest(int argc, char * argv[]) binary->FillBuffer(InputPixelType{}); InputImageType::RegionType region; - InputImageType::IndexType index; - InputImageType::SizeType size; + InputImageType::IndexType index; + InputImageType::SizeType size; index.Fill(10); size.Fill(30); diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithLaplacianTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithLaplacianTest.cxx index 0ae90bb7a9f..1508ab1c4fa 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithLaplacianTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithLaplacianTest.cxx @@ -86,8 +86,8 @@ itkSingleLevelSetWhitakerImage2DWithLaplacianTest(int argc, char * argv[]) binary->FillBuffer(InputPixelType{}); InputImageType::RegionType region; - InputImageType::IndexType index; - InputImageType::SizeType size; + InputImageType::IndexType index; + InputImageType::SizeType size; index.Fill(10); size.Fill(30); diff --git a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithPropagationTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithPropagationTest.cxx index c66d1a4dbb5..743c984a9f2 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithPropagationTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkSingleLevelSetWhitakerImage2DWithPropagationTest.cxx @@ -84,8 +84,8 @@ itkSingleLevelSetWhitakerImage2DWithPropagationTest(int argc, char * argv[]) binary->FillBuffer(InputPixelType{}); InputImageType::RegionType region; - InputImageType::IndexType index; - InputImageType::SizeType size; + InputImageType::IndexType index; + InputImageType::SizeType size; index.Fill(10); size.Fill(30); diff --git a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetDenseImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetDenseImage2DTest.cxx index 0a77183c1f5..f23dc743fe4 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetDenseImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetDenseImage2DTest.cxx @@ -122,7 +122,7 @@ itkTwoLevelSetDenseImage2DTest(int argc, char * argv[]) // directly or indirectly. // const InputImageType::RegionType inputBufferedRegion = input->GetBufferedRegion(); - const InputImageType::SizeType inputBufferedRegionSize = inputBufferedRegion.GetSize(); + const InputImageType::SizeType inputBufferedRegionSize = inputBufferedRegion.GetSize(); fastMarching->SetOutputSize(inputBufferedRegionSize); fastMarching->Update(); diff --git a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetMalcolmImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetMalcolmImage2DTest.cxx index 1376d9a5189..19e3de2af01 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetMalcolmImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetMalcolmImage2DTest.cxx @@ -87,8 +87,8 @@ itkTwoLevelSetMalcolmImage2DTest(int argc, char * argv[]) binary->FillBuffer(InputPixelType{}); InputImageType::RegionType region; - InputImageType::IndexType index; - InputImageType::SizeType size; + InputImageType::IndexType index; + InputImageType::SizeType size; index.Fill(10); size.Fill(30); diff --git a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetShiImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetShiImage2DTest.cxx index 7a32aaeb4f4..2d36dc42be6 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetShiImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetShiImage2DTest.cxx @@ -87,8 +87,8 @@ itkTwoLevelSetShiImage2DTest(int argc, char * argv[]) binary->FillBuffer(InputPixelType{}); InputImageType::RegionType region; - InputImageType::IndexType index; - InputImageType::SizeType size; + InputImageType::IndexType index; + InputImageType::SizeType size; index.Fill(10); size.Fill(30); diff --git a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetWhitakerImage2DTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetWhitakerImage2DTest.cxx index d58a4f3ea2e..d91ca0e4476 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetWhitakerImage2DTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkTwoLevelSetWhitakerImage2DTest.cxx @@ -89,8 +89,8 @@ itkTwoLevelSetWhitakerImage2DTest(int argc, char * argv[]) binary->FillBuffer(InputPixelType{}); InputImageType::RegionType region; - InputImageType::IndexType index; - InputImageType::SizeType size; + InputImageType::IndexType index; + InputImageType::SizeType size; index.Fill(10); size.Fill(30); diff --git a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.h b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.h index 118ac3b1141..4622c0d1529 100644 --- a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.h +++ b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.h @@ -53,7 +53,7 @@ class MRFImageFilterEnums // Define how to print enumeration extern ITKMarkovRandomFieldsClassifiers_EXPORT std::ostream & - operator<<(std::ostream & out, const MRFImageFilterEnums::MRFStop value); +operator<<(std::ostream & out, const MRFImageFilterEnums::MRFStop value); /** * \class MRFImageFilter * \brief Implementation of a labeler object that uses Markov Random Fields @@ -369,7 +369,7 @@ class ITK_TEMPLATE_EXPORT MRFImageFilter : public ImageToImageFilter::GenerateInputRequestedRegion() { // this filter requires that all of the input images // are the size of the output requested region - const InputImagePointer inputPtr = const_cast(this->GetInput()); + const InputImagePointer inputPtr = const_cast(this->GetInput()); const OutputImagePointer outputPtr = this->GetOutput(); if (inputPtr && outputPtr) @@ -433,12 +433,12 @@ MRFImageFilter::ApplyICMLabeller() // Set up the neighborhood iterators // Define the face list for the input/labelled image - InputImageFacesCalculator inputImageFacesCalculator; - LabelledImageFacesCalculator labelledImageFacesCalculator; + InputImageFacesCalculator inputImageFacesCalculator; + LabelledImageFacesCalculator labelledImageFacesCalculator; LabelStatusImageFacesCalculator labelStatusImageFacesCalculator; - InputImageFaceListType inputImageFaceList; - LabelledImageFaceListType labelledImageFaceList; + InputImageFaceListType inputImageFaceList; + LabelledImageFaceListType labelledImageFaceList; LabelStatusImageFaceListType labelStatusImageFaceList; // Compute the faces for the neighborhoods in the input/labelled image @@ -485,7 +485,7 @@ template void MRFImageFilter::DoNeighborhoodOperation( const InputImageNeighborhoodIterator & imageIter, - LabelledImageNeighborhoodIterator & labelledIter, + LabelledImageNeighborhoodIterator & labelledIter, LabelStatusImageNeighborhoodIterator & labelStatusIter) { unsigned int index; @@ -520,7 +520,7 @@ MRFImageFilter::DoNeighborhoodOperation( // Determine the maximum possible distance double maximumDistance = -1e+20; - int pixLabel = -1; + int pixLabel = -1; double tmpPixDistance; for (index = 0; index < m_NumberOfClasses; ++index) { diff --git a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.hxx b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.hxx index 940f3a85c2b..86cc3eb904e 100644 --- a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.hxx +++ b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.hxx @@ -87,10 +87,10 @@ template void RGBGibbsPriorFilter::GreyScalarBoundary(LabelledImageIndexType Index3D) { - int change; - int signs[4]; - int x; - int numx; + int change; + int signs[4]; + int x; + int numx; LabelType origin; LabelType neighbors[4]; @@ -195,11 +195,11 @@ RGBGibbsPriorFilter::GibbsTotalEnergy(int i) int frame = m_ImageWidth * m_ImageHeight; int rowsize = m_ImageWidth; - double energy[2]; - double difenergy; - LabelType label; - LabelType originlabel; - LabelType f[8]; + double energy[2]; + double difenergy; + LabelType label; + LabelType originlabel; + LabelType f[8]; unsigned int j; unsigned int k; unsigned int neighborcount = 0; @@ -290,7 +290,7 @@ RGBGibbsPriorFilter::GibbsTotalEnergy(int i) { difenergy = energy[label] - energy[1 - label]; const double rand_num{ rand() / 32768.0 }; - double energy_num{ std::exp(static_cast(difenergy * 0.5 * size / (2 * size - m_Temp))) }; + double energy_num{ std::exp(static_cast(difenergy * 0.5 * size / (2 * size - m_Temp))) }; if (rand_num < energy_num) { m_LabelledImage->SetPixel(offsetIndex3D, 1 - label); @@ -305,13 +305,13 @@ RGBGibbsPriorFilter::GibbsEnergy(unsigned int i, { LabelledImageRegionIterator labelledImageIt(m_LabelledImage, m_LabelledImage->GetBufferedRegion()); - LabelType f[8]; - int j; + LabelType f[8]; + int j; unsigned int neighborcount = 0; - int simnum = 0; - int changenum = 0; - bool changeflag; - double res = 0.0; + int simnum = 0; + int changenum = 0; + bool changeflag; + double res = 0.0; LabelledImageIndexType offsetIndex3D{}; @@ -645,8 +645,8 @@ template unsigned int RGBGibbsPriorFilter::LabelRegion(int i, int l, int change) { - unsigned int count = 1; - int m; + unsigned int count = 1; + int m; const unsigned int frame = m_ImageWidth * m_ImageHeight; const unsigned int rowsize = m_ImageWidth; diff --git a/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.h b/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.h index db361a60941..fc5575be7fd 100644 --- a/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.h +++ b/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.h @@ -164,13 +164,13 @@ class ITK_TEMPLATE_EXPORT ConfidenceConnectedImageFilter : public ImageToImageFi GenerateData() override; private: - SeedsContainerType m_Seeds{}; - double m_Multiplier{}; - unsigned int m_NumberOfIterations{}; + SeedsContainerType m_Seeds{}; + double m_Multiplier{}; + unsigned int m_NumberOfIterations{}; OutputImagePixelType m_ReplaceValue{}; - unsigned int m_InitialNeighborhoodRadius{}; - InputRealType m_Mean{}; - InputRealType m_Variance{}; + unsigned int m_InitialNeighborhoodRadius{}; + InputRealType m_Mean{}; + InputRealType m_Variance{}; }; } // end namespace itk diff --git a/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.hxx b/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.hxx index 6320b4d488b..c811a0ff9fc 100644 --- a/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.hxx +++ b/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.hxx @@ -130,7 +130,7 @@ ConfidenceConnectedImageFilter::GenerateData() using SecondIteratorType = FloodFilledImageFunctionConditionalConstIterator; const typename Superclass::InputImageConstPointer inputImage = this->GetInput(); - const typename Superclass::OutputImagePointer outputImage = this->GetOutput(); + const typename Superclass::OutputImagePointer outputImage = this->GetOutput(); // Zero the output const OutputImageRegionType region = outputImage->GetRequestedRegion(); @@ -154,8 +154,8 @@ ConfidenceConnectedImageFilter::GenerateData() InputRealType sumOfSquares{}; - auto si = m_Seeds.begin(); - const auto li = m_Seeds.end(); + auto si = m_Seeds.begin(); + const auto li = m_Seeds.end(); SizeValueType num = 0; while (si != li) { @@ -196,8 +196,8 @@ ConfidenceConnectedImageFilter::GenerateData() InputRealType sum{}; InputRealType sumOfSquares{}; - auto si = m_Seeds.begin(); - const auto li = m_Seeds.end(); + auto si = m_Seeds.begin(); + const auto li = m_Seeds.end(); SizeValueType num = 0; while (si != li) { @@ -228,8 +228,8 @@ ConfidenceConnectedImageFilter::GenerateData() // Find the highest and lowest seed intensity. InputRealType lowestSeedIntensity = itk::NumericTraits::max(); InputRealType highestSeedIntensity = itk::NumericTraits::NonpositiveMin(); - auto si = m_Seeds.begin(); - const auto li = m_Seeds.end(); + auto si = m_Seeds.begin(); + const auto li = m_Seeds.end(); while (si != li) { if (region.IsInside(*si)) @@ -299,8 +299,8 @@ ConfidenceConnectedImageFilter::GenerateData() secondFunction->SetInputImage(outputImage); secondFunction->ThresholdBetween(m_ReplaceValue, m_ReplaceValue); - auto sum = InputRealType{}; - auto sumOfSquares = InputRealType{}; + auto sum = InputRealType{}; + auto sumOfSquares = InputRealType{}; typename TOutputImage::SizeValueType numberOfSamples = 0; SecondIteratorType sit(inputImage, secondFunction, m_Seeds); diff --git a/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.hxx b/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.hxx index ddeb5a24e66..32f181bbdf4 100644 --- a/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.hxx +++ b/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.hxx @@ -220,7 +220,7 @@ void ConnectedThresholdImageFilter::GenerateData() { const InputImageType * inputImage = this->GetInput(); - OutputImageType * outputImage = this->GetOutput(); + OutputImageType * outputImage = this->GetOutput(); const InputPixelObjectType * lowerThreshold = this->GetLowerInput(); const InputPixelObjectType * upperThreshold = this->GetUpperInput(); diff --git a/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.hxx b/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.hxx index 095253c3abd..a8cc009bae1 100644 --- a/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.hxx +++ b/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.hxx @@ -168,7 +168,7 @@ void IsolatedConnectedImageFilter::GenerateData() { const InputImageConstPointer inputImage = this->GetInput(); - const OutputImagePointer outputImage = this->GetOutput(); + const OutputImagePointer outputImage = this->GetOutput(); using AccumulateType = typename NumericTraits::AccumulateType; @@ -193,16 +193,16 @@ IsolatedConnectedImageFilter::GenerateData() auto function = FunctionType::New(); function->SetInputImage(inputImage); - float progressWeight = 0.0f; - float cumulatedProgress = 0.0f; - IteratorType it(outputImage, function, m_Seeds1); + float progressWeight = 0.0f; + float cumulatedProgress = 0.0f; + IteratorType it(outputImage, function, m_Seeds1); IterationReporter iterate(this, 0, 1); // If the upper threshold has not been set, find it. if (m_FindUpperThreshold) { - auto lower = static_cast(m_Lower); - auto upper = static_cast(m_Upper); + auto lower = static_cast(m_Lower); + auto upper = static_cast(m_Upper); AccumulateType guess = upper; // do a binary search to find an upper threshold that separates the @@ -236,8 +236,8 @@ IsolatedConnectedImageFilter::GenerateData() // seeds are not included, the sum should be zero. Otherwise, // it will be other than zero. InputRealType seedIntensitySum{}; - auto si = m_Seeds2.begin(); - const auto li = m_Seeds2.end(); + auto si = m_Seeds2.begin(); + const auto li = m_Seeds2.end(); while (si != li) { const auto value = static_cast(outputImage->GetPixel(*si)); @@ -266,8 +266,8 @@ IsolatedConnectedImageFilter::GenerateData() } else { // If the lower threshold has not been set, find it. - auto lower = static_cast(m_Lower); - auto upper = static_cast(m_Upper); + auto lower = static_cast(m_Lower); + auto upper = static_cast(m_Upper); AccumulateType guess = lower; // do a binary search to find a lower threshold that separates the @@ -301,8 +301,8 @@ IsolatedConnectedImageFilter::GenerateData() // seeds are not included, the sum should be zero. Otherwise, // it will be other than zero. InputRealType seedIntensitySum{}; - auto si = m_Seeds2.begin(); - const auto li = m_Seeds2.end(); + auto si = m_Seeds2.begin(); + const auto li = m_Seeds2.end(); while (si != li) { const auto value = static_cast(outputImage->GetPixel(*si)); @@ -360,15 +360,15 @@ IsolatedConnectedImageFilter::GenerateData() // it will be other than zero. InputRealType seed1IntensitySum{}; InputRealType seed2IntensitySum{}; - auto si1 = m_Seeds1.begin(); - const auto li1 = m_Seeds1.end(); + auto si1 = m_Seeds1.begin(); + const auto li1 = m_Seeds1.end(); while (si1 != li1) { const auto value = static_cast(outputImage->GetPixel(*si1)); seed1IntensitySum += value; ++si1; } - auto si2 = m_Seeds2.begin(); + auto si2 = m_Seeds2.begin(); const auto li2 = m_Seeds2.end(); while (si2 != li2) { diff --git a/Modules/Segmentation/RegionGrowing/include/itkNeighborhoodConnectedImageFilter.hxx b/Modules/Segmentation/RegionGrowing/include/itkNeighborhoodConnectedImageFilter.hxx index fa1ed55fdb1..7882689b314 100644 --- a/Modules/Segmentation/RegionGrowing/include/itkNeighborhoodConnectedImageFilter.hxx +++ b/Modules/Segmentation/RegionGrowing/include/itkNeighborhoodConnectedImageFilter.hxx @@ -106,7 +106,7 @@ void NeighborhoodConnectedImageFilter::GenerateData() { const typename Superclass::InputImageConstPointer inputImage = this->GetInput(); - const typename Superclass::OutputImagePointer outputImage = this->GetOutput(); + const typename Superclass::OutputImagePointer outputImage = this->GetOutput(); // Zero the output outputImage->SetBufferedRegion(outputImage->GetRequestedRegion()); diff --git a/Modules/Segmentation/RegionGrowing/include/itkVectorConfidenceConnectedImageFilter.h b/Modules/Segmentation/RegionGrowing/include/itkVectorConfidenceConnectedImageFilter.h index 3241deccbc9..dbf79237df5 100644 --- a/Modules/Segmentation/RegionGrowing/include/itkVectorConfidenceConnectedImageFilter.h +++ b/Modules/Segmentation/RegionGrowing/include/itkVectorConfidenceConnectedImageFilter.h @@ -164,11 +164,11 @@ class ITK_TEMPLATE_EXPORT VectorConfidenceConnectedImageFilter : public ImageToI GenerateData() override; private: - SeedsContainerType m_Seeds{}; - double m_Multiplier{}; - unsigned int m_NumberOfIterations{}; + SeedsContainerType m_Seeds{}; + double m_Multiplier{}; + unsigned int m_NumberOfIterations{}; OutputImagePixelType m_ReplaceValue{}; - unsigned int m_InitialNeighborhoodRadius{}; + unsigned int m_InitialNeighborhoodRadius{}; DistanceThresholdFunctionPointer m_ThresholdFunction{}; }; diff --git a/Modules/Segmentation/RegionGrowing/include/itkVectorConfidenceConnectedImageFilter.hxx b/Modules/Segmentation/RegionGrowing/include/itkVectorConfidenceConnectedImageFilter.hxx index 77223c7d463..5afe976271d 100644 --- a/Modules/Segmentation/RegionGrowing/include/itkVectorConfidenceConnectedImageFilter.hxx +++ b/Modules/Segmentation/RegionGrowing/include/itkVectorConfidenceConnectedImageFilter.hxx @@ -122,7 +122,7 @@ VectorConfidenceConnectedImageFilter::GenerateData() unsigned int loop; const typename Superclass::InputImageConstPointer inputImage = this->GetInput(); - const typename Superclass::OutputImagePointer outputImage = this->GetOutput(); + const typename Superclass::OutputImagePointer outputImage = this->GetOutput(); // Zero the output const OutputImageRegionType region = outputImage->GetRequestedRegion(); @@ -144,7 +144,7 @@ VectorConfidenceConnectedImageFilter::GenerateData() m_ThresholdFunction->SetInputImage(inputImage); CovarianceMatrixType covariance; - MeanVectorType mean; + MeanVectorType mean; using ComponentPixelType = typename InputPixelType::ValueType; using ComponentRealType = typename NumericTraits::RealType; @@ -160,15 +160,15 @@ VectorConfidenceConnectedImageFilter::GenerateData() using MeanFunctionVectorType = typename VectorMeanImageFunctionType::OutputType; using CovarianceFunctionMatrixType = typename CovarianceImageFunctionType::OutputType; - auto si = m_Seeds.begin(); - auto li = m_Seeds.end(); + auto si = m_Seeds.begin(); + auto li = m_Seeds.end(); SizeValueType seed_cnt = 0; while (si != li) { if (region.IsInside(*si)) { ++seed_cnt; - const MeanFunctionVectorType meanContribution = meanFunction->EvaluateAtIndex(*si); + const MeanFunctionVectorType meanContribution = meanFunction->EvaluateAtIndex(*si); const CovarianceFunctionMatrixType covarianceContribution = varianceFunction->EvaluateAtIndex(*si); for (unsigned int ii = 0; ii < dimension; ++ii) { @@ -282,7 +282,7 @@ VectorConfidenceConnectedImageFilter::GenerateData() mean[i] += pixelValueI; for (unsigned int j = i + 1; j < dimension; ++j) { - const auto pixelValueJ = static_cast(pixelValue[j]); + const auto pixelValueJ = static_cast(pixelValue[j]); const ComponentRealType product = pixelValueI * pixelValueJ; covariance[i][j] += product; covariance[j][i] += product; diff --git a/Modules/Segmentation/RegionGrowing/test/itkConfidenceConnectedImageFilterTest.cxx b/Modules/Segmentation/RegionGrowing/test/itkConfidenceConnectedImageFilterTest.cxx index 1a26b004a13..e12db21e074 100644 --- a/Modules/Segmentation/RegionGrowing/test/itkConfidenceConnectedImageFilterTest.cxx +++ b/Modules/Segmentation/RegionGrowing/test/itkConfidenceConnectedImageFilterTest.cxx @@ -45,7 +45,7 @@ itkConfidenceConnectedImageFilterTest(int argc, char * argv[]) // Create a filter using FilterType = itk::ConfidenceConnectedImageFilter; - auto filter = FilterType::New(); + auto filter = FilterType::New(); const itk::SimpleFilterWatcher filterWatch(filter); filter->SetInput(input->GetOutput()); diff --git a/Modules/Segmentation/RegionGrowing/test/itkIsolatedConnectedImageFilterTest.cxx b/Modules/Segmentation/RegionGrowing/test/itkIsolatedConnectedImageFilterTest.cxx index fbb30a604f0..47510c8077b 100644 --- a/Modules/Segmentation/RegionGrowing/test/itkIsolatedConnectedImageFilterTest.cxx +++ b/Modules/Segmentation/RegionGrowing/test/itkIsolatedConnectedImageFilterTest.cxx @@ -44,7 +44,7 @@ itkIsolatedConnectedImageFilterTest(int argc, char * argv[]) // Create a filter using FilterType = itk::IsolatedConnectedImageFilter; - auto filter = FilterType::New(); + auto filter = FilterType::New(); const itk::SimpleFilterWatcher watcher(filter); filter->SetInput(input->GetOutput()); diff --git a/Modules/Segmentation/RegionGrowing/test/itkNeighborhoodConnectedImageFilterTest.cxx b/Modules/Segmentation/RegionGrowing/test/itkNeighborhoodConnectedImageFilterTest.cxx index e299ef53ac5..3d65b99cf3f 100644 --- a/Modules/Segmentation/RegionGrowing/test/itkNeighborhoodConnectedImageFilterTest.cxx +++ b/Modules/Segmentation/RegionGrowing/test/itkNeighborhoodConnectedImageFilterTest.cxx @@ -40,7 +40,7 @@ itkNeighborhoodConnectedImageFilterTest(int argc, char * argv[]) // Create a filter using FilterType = itk::NeighborhoodConnectedImageFilter; - auto filter = FilterType::New(); + auto filter = FilterType::New(); const itk::SimpleFilterWatcher watcher(filter); filter->SetInput(input->GetOutput()); diff --git a/Modules/Segmentation/RegionGrowing/test/itkVectorConfidenceConnectedImageFilterTest.cxx b/Modules/Segmentation/RegionGrowing/test/itkVectorConfidenceConnectedImageFilterTest.cxx index 06ed5b0d974..0cac3eb3b58 100644 --- a/Modules/Segmentation/RegionGrowing/test/itkVectorConfidenceConnectedImageFilterTest.cxx +++ b/Modules/Segmentation/RegionGrowing/test/itkVectorConfidenceConnectedImageFilterTest.cxx @@ -55,7 +55,7 @@ itkVectorConfidenceConnectedImageFilterTest(int argc, char * argv[]) // Create a filter using FilterType = itk::VectorConfidenceConnectedImageFilter; - auto filter = FilterType::New(); + auto filter = FilterType::New(); const itk::SimpleFilterWatcher filterWatch(filter); filter->SetInput(input->GetOutput()); diff --git a/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.h b/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.h index feabd367c43..f78d1023055 100644 --- a/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.h +++ b/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.h @@ -189,9 +189,9 @@ class ITK_TEMPLATE_EXPORT PCAShapeSignedDistanceFunction unsigned int m_NumberOfPrincipalComponents{}; unsigned int m_NumberOfTransformParameters{}; - ImagePointer m_MeanImage{}; + ImagePointer m_MeanImage{}; ImagePointerVector m_PrincipalComponentImages{}; - ParametersType m_PrincipalComponentStandardDeviations{}; + ParametersType m_PrincipalComponentStandardDeviations{}; /** transform and interpolator/extrapolator for image interpolation */ typename TransformType::Pointer m_Transform{}; diff --git a/Modules/Segmentation/SignedDistanceFunction/include/itkSphereSignedDistanceFunction.h b/Modules/Segmentation/SignedDistanceFunction/include/itkSphereSignedDistanceFunction.h index 6084f56a5e1..cf2a3916181 100644 --- a/Modules/Segmentation/SignedDistanceFunction/include/itkSphereSignedDistanceFunction.h +++ b/Modules/Segmentation/SignedDistanceFunction/include/itkSphereSignedDistanceFunction.h @@ -109,7 +109,7 @@ class ITK_TEMPLATE_EXPORT SphereSignedDistanceFunction using VectorType = Vector; VectorType m_Translation{}; - double m_Radius{}; + double m_Radius{}; }; } // end namespace itk diff --git a/Modules/Segmentation/SignedDistanceFunction/test/itkPCAShapeSignedDistanceFunctionTest.cxx b/Modules/Segmentation/SignedDistanceFunction/test/itkPCAShapeSignedDistanceFunctionTest.cxx index 45e8d3de823..b0d40c72393 100644 --- a/Modules/Segmentation/SignedDistanceFunction/test/itkPCAShapeSignedDistanceFunctionTest.cxx +++ b/Modules/Segmentation/SignedDistanceFunction/test/itkPCAShapeSignedDistanceFunctionTest.cxx @@ -124,9 +124,9 @@ itkPCAShapeSignedDistanceFunctionTest(int, char *[]) // set up the parameters - const unsigned int numberOfShapeParameters = shape->GetNumberOfShapeParameters(); - const unsigned int numberOfPoseParameters = shape->GetNumberOfPoseParameters(); - const unsigned int numberOfParameters = numberOfShapeParameters + numberOfPoseParameters; + const unsigned int numberOfShapeParameters = shape->GetNumberOfShapeParameters(); + const unsigned int numberOfPoseParameters = shape->GetNumberOfPoseParameters(); + const unsigned int numberOfParameters = numberOfShapeParameters + numberOfPoseParameters; ShapeFunction::ParametersType parameters(numberOfParameters); for (i = 0; i < numberOfParameters; ++i) @@ -141,14 +141,14 @@ itkPCAShapeSignedDistanceFunctionTest(int, char *[]) shape->Initialize(); // check pca shape calculation - ShapeFunction::PointType point; - ImageType::IndexType index; + ShapeFunction::PointType point; + ImageType::IndexType index; ShapeFunction::OutputType output; ShapeFunction::OutputType expected; std::cout << "check results:" << std::endl; constexpr unsigned int numberOfRotationParameters = Dimension * (Dimension - 1) / 2; - const unsigned int startIndexOfTranslationParameters = numberOfShapeParameters + numberOfRotationParameters; + const unsigned int startIndexOfTranslationParameters = numberOfShapeParameters + numberOfRotationParameters; ShapeFunction::TransformType::InputPointType p; ShapeFunction::TransformType::InputPointType q; @@ -245,7 +245,7 @@ itkPCAShapeSignedDistanceFunctionTest(int, char *[]) TEST_INITIALIZATION_ERROR(PrincipalComponentImages, badPCImages, pcImages); // A PC image of the wrong size - auto badSize = ImageType::SizeType::Filled(1); + auto badSize = ImageType::SizeType::Filled(1); const ImageType::RegionType badRegion(badSize); badPCImages[1] = ImageType::New(); badPCImages[1]->SetRegions(badRegion); diff --git a/Modules/Segmentation/SuperPixel/include/itkSLICImageFilter.h b/Modules/Segmentation/SuperPixel/include/itkSLICImageFilter.h index 0772d7015db..8b3e9ea7f5d 100644 --- a/Modules/Segmentation/SuperPixel/include/itkSLICImageFilter.h +++ b/Modules/Segmentation/SuperPixel/include/itkSLICImageFilter.h @@ -204,23 +204,23 @@ class ITK_TEMPLATE_EXPORT SLICImageFilter : public ImageToImageFilter m_DistanceScales{}; - std::vector m_Clusters{}; - std::vector m_OldClusters{}; + std::vector m_Clusters{}; + std::vector m_OldClusters{}; void - RelabelConnectedRegion(const IndexType & seed, - OutputPixelType requiredLabel, - OutputPixelType outputLabel, + RelabelConnectedRegion(const IndexType & seed, + OutputPixelType requiredLabel, + OutputPixelType outputLabel, std::vector & indexStack); struct UpdateCluster { - size_t count; + size_t count; vnl_vector cluster; }; @@ -231,13 +231,13 @@ class ITK_TEMPLATE_EXPORT SLICImageFilter : public ImageToImageFilter m_UpdateClusterPerThread{}; typename DistanceImageType::Pointer m_DistanceImage{}; - typename MarkerImageType::Pointer m_MarkerImage{}; + typename MarkerImageType::Pointer m_MarkerImage{}; bool m_EnforceConnectivity{ true }; bool m_InitializationPerturbation{ true }; - double m_AverageResidual{}; + double m_AverageResidual{}; std::mutex m_Mutex{}; }; } // end namespace itk diff --git a/Modules/Segmentation/SuperPixel/include/itkSLICImageFilter.hxx b/Modules/Segmentation/SuperPixel/include/itkSLICImageFilter.hxx index 21853f14b22..207f2a9a183 100644 --- a/Modules/Segmentation/SuperPixel/include/itkSLICImageFilter.hxx +++ b/Modules/Segmentation/SuperPixel/include/itkSLICImageFilter.hxx @@ -131,9 +131,9 @@ SLICImageFilter::BeforeThreadedGenera itkDebugMacro("Shrinking Completed"); const typename InputImageType::RegionType region = inputImage->GetBufferedRegion(); - const unsigned int numberOfComponents = inputImage->GetNumberOfComponentsPerPixel(); - const unsigned int numberOfClusterComponents = numberOfComponents + ImageDimension; - const size_t numberOfClusters = shrunkImage->GetBufferedRegion().GetNumberOfPixels(); + const unsigned int numberOfComponents = inputImage->GetNumberOfComponentsPerPixel(); + const unsigned int numberOfClusterComponents = numberOfComponents + ImageDimension; + const size_t numberOfClusters = shrunkImage->GetBufferedRegion().GetNumberOfPixels(); // allocate array of scalars @@ -155,7 +155,7 @@ SLICImageFilter::BeforeThreadedGenera NumericTraits::AssignToArray(it.Get(), cluster); - const IndexType & idx = it.GetIndex(); + const IndexType & idx = it.GetIndex(); typename InputImageType::PointType pt; shrunkImage->TransformIndexToPhysicalPoint(idx, pt); const ContinuousIndexType cidx = @@ -196,9 +196,9 @@ SLICImageFilter::ThreadedUpdateDistan const OutputImageRegionType & outputRegionForThread) { const InputImageType * inputImage = this->GetInput(); - OutputImageType * outputImage = this->GetOutput(); - const unsigned int numberOfComponents = inputImage->GetNumberOfComponentsPerPixel(); - const unsigned int numberOfClusterComponents = numberOfComponents + ImageDimension; + OutputImageType * outputImage = this->GetOutput(); + const unsigned int numberOfComponents = inputImage->GetNumberOfComponentsPerPixel(); + const unsigned int numberOfClusterComponents = numberOfComponents + ImageDimension; typename InputImageType::SizeType searchRadius; for (unsigned int i = 0; i < ImageDimension; ++i) @@ -208,10 +208,10 @@ SLICImageFilter::ThreadedUpdateDistan for (size_t i = 0; i * numberOfClusterComponents < m_Clusters.size(); ++i) { - ClusterType cluster(numberOfClusterComponents, &m_Clusters[i * numberOfClusterComponents]); + ClusterType cluster(numberOfClusterComponents, &m_Clusters[i * numberOfClusterComponents]); typename InputImageType::RegionType localRegion; - typename InputImageType::PointType pt; - IndexType idx; + typename InputImageType::PointType pt; + IndexType idx; for (unsigned int d = 0; d < ImageDimension; ++d) { @@ -230,7 +230,7 @@ SLICImageFilter::ThreadedUpdateDistan const size_t ln = localRegion.GetSize(0); ImageScanlineConstIterator inputIter(inputImage, localRegion); - ImageScanlineIterator distanceIter(m_DistanceImage, localRegion); + ImageScanlineIterator distanceIter(m_DistanceImage, localRegion); while (!inputIter.IsAtEnd()) @@ -265,7 +265,7 @@ SLICImageFilter::ThreadedUpdateCluste const OutputImageRegionType & updateRegionForThread) { const InputImageType * inputImage = this->GetInput(); - OutputImageType * outputImage = this->GetOutput(); + OutputImageType * outputImage = this->GetOutput(); const unsigned int numberOfComponents = inputImage->GetNumberOfComponentsPerPixel(); const unsigned int numberOfClusterComponents = numberOfComponents + ImageDimension; @@ -274,15 +274,15 @@ SLICImageFilter::ThreadedUpdateCluste itkDebugMacro("Estimating Centers"); // calculate new centers - ImageScanlineIterator itOut(outputImage, updateRegionForThread); + ImageScanlineIterator itOut(outputImage, updateRegionForThread); ImageScanlineConstIterator itIn(inputImage, updateRegionForThread); while (!itOut.IsAtEnd()) { const size_t ln = updateRegionForThread.GetSize(0); for (unsigned int x = 0; x < ln; ++x) { - const IndexType & idx = itOut.GetIndex(); - const InputPixelType & v = itIn.Get(); + const IndexType & idx = itOut.GetIndex(); + const InputPixelType & v = itIn.Get(); const typename OutputImageType::PixelType l = itOut.Get(); const std::pair r = @@ -331,7 +331,7 @@ SLICImageFilter::ThreadedPerturbClust const unsigned int numberOfClusterComponents = numberOfComponents + ImageDimension; - auto radius = itk::Size::Filled(1); + auto radius = itk::Size::Filled(1); unsigned long center; unsigned long stride[ImageDimension]; @@ -358,7 +358,7 @@ SLICImageFilter::ThreadedPerturbClust // cluster is a reference to array ClusterType cluster(numberOfClusterComponents, &m_Clusters[clusterIndex * numberOfClusterComponents]); typename InputImageType::RegionType localRegion; - IndexType idx; + IndexType idx; for (unsigned int d = 0; d < ImageDimension; ++d) { @@ -428,9 +428,9 @@ SLICImageFilter::ThreadedConnectivity itkDebugMacro("Threaded Connectivity"); const InputImageType * inputImage = this->GetInput(); - OutputImageType * outputImage = this->GetOutput(); - const unsigned int numberOfComponents = inputImage->GetNumberOfComponentsPerPixel(); - const unsigned int numberOfClusterComponents = numberOfComponents + ImageDimension; + OutputImageType * outputImage = this->GetOutput(); + const unsigned int numberOfComponents = inputImage->GetNumberOfComponentsPerPixel(); + const unsigned int numberOfClusterComponents = numberOfComponents + ImageDimension; const size_t minSuperSize = std::accumulate(m_SuperGridSize.cbegin(), m_SuperGridSize.cend(), size_t(1), std::multiplies()) / 4; @@ -455,7 +455,7 @@ SLICImageFilter::ThreadedConnectivity ClusterType cluster(numberOfClusterComponents, &m_Clusters[clusterIndex * numberOfClusterComponents]); - IndexType idx; + IndexType idx; for (unsigned int d = 0; d < ImageDimension; ++d) { @@ -510,7 +510,7 @@ SLICImageFilter::SingleThreadedConnec itkDebugMacro("Single Threaded Connectivity"); const InputImageType * inputImage = this->GetInput(); - OutputImageType * outputImage = this->GetOutput(); + OutputImageType * outputImage = this->GetOutput(); const unsigned int numberOfComponents = inputImage->GetNumberOfComponentsPerPixel(); const unsigned int numberOfClusterComponents = numberOfComponents + ImageDimension; @@ -577,12 +577,12 @@ SLICImageFilter::GenerateData() this->GetMultiThreader()->SetNumberOfWorkUnits(this->GetNumberOfWorkUnits()); const InputImageType * inputImage = this->GetInput(); - OutputImageType * outputImage = this->GetOutput(); + OutputImageType * outputImage = this->GetOutput(); const typename InputImageType::RegionType region = inputImage->GetBufferedRegion(); - const unsigned int numberOfComponents = inputImage->GetNumberOfComponentsPerPixel(); - const unsigned int numberOfClusterComponents = numberOfComponents + ImageDimension; - const size_t numberOfClusters = m_Clusters.size() / numberOfClusterComponents; + const unsigned int numberOfComponents = inputImage->GetNumberOfComponentsPerPixel(); + const unsigned int numberOfClusterComponents = numberOfComponents + ImageDimension; + const size_t numberOfClusters = m_Clusters.size() / numberOfClusterComponents; itkDebugMacro("Perturb cluster centers"); bool doPerturbCluster = true; @@ -708,9 +708,9 @@ SLICImageFilter::Distance(const Clust const ClusterType & cluster2) -> DistanceType { const unsigned int s = cluster1.size(); - DistanceType d1 = 0.0; - DistanceType d2 = 0.0; - unsigned int i = 0; + DistanceType d1 = 0.0; + DistanceType d2 = 0.0; + unsigned int i = 0; for (; i < s - ImageDimension; ++i) { const DistanceType d = (cluster1[i] - cluster2[i]); @@ -728,14 +728,14 @@ SLICImageFilter::Distance(const Clust template auto -SLICImageFilter::Distance(const ClusterType & cluster, +SLICImageFilter::Distance(const ClusterType & cluster, const InputPixelType & _v, - const PointType & pt) -> DistanceType + const PointType & pt) -> DistanceType { - const unsigned int s = cluster.size(); - DistanceType d1 = 0.0; - DistanceType d2 = 0.0; - unsigned int i = 0; + const unsigned int s = cluster.size(); + DistanceType d1 = 0.0; + DistanceType d2 = 0.0; + unsigned int i = 0; const typename NumericTraits::MeasurementVectorType & v = _v; for (; i < s - ImageDimension; ++i) { @@ -756,8 +756,8 @@ SLICImageFilter::Distance(const Clust template void SLICImageFilter::RelabelConnectedRegion(const IndexType & seed, - OutputPixelType requiredLabel, - OutputPixelType outputLabel, + OutputPixelType requiredLabel, + OutputPixelType outputLabel, std::vector & indexStack) { @@ -766,7 +766,7 @@ SLICImageFilter::RelabelConnectedRegi ConstantBoundaryCondition lbc; lbc.SetConstant(NumericTraits::max()); - auto radius = itk::Size::Filled(1); + auto radius = itk::Size::Filled(1); unsigned long center; unsigned long stride[ImageDimension]; diff --git a/Modules/Segmentation/SuperPixel/test/itkSLICImageFilterTest.cxx b/Modules/Segmentation/SuperPixel/test/itkSLICImageFilterTest.cxx index dfadd5c5f15..262f80ecff4 100644 --- a/Modules/Segmentation/SuperPixel/test/itkSLICImageFilterTest.cxx +++ b/Modules/Segmentation/SuperPixel/test/itkSLICImageFilterTest.cxx @@ -32,7 +32,7 @@ void iterationEventCallback(itk::Object * object, const itk::EventObject & event, void *) { static unsigned int iterationCount = 0; - const auto * slicFilter = dynamic_cast(object); + const auto * slicFilter = dynamic_cast(object); if (!itk::IterationEvent().CheckEvent(&event) || !slicFilter) { return; @@ -47,8 +47,8 @@ template int itkSLICImageFilterTestHelper(const std::string & inFileName, const std::string & outFileName, - const unsigned int gridSize, - bool enforceConnectivity) + const unsigned int gridSize, + bool enforceConnectivity) { const unsigned int Dimension = TInputImageType::ImageDimension; @@ -101,10 +101,10 @@ itkSLICImageFilterTest(int argc, char * argv[]) } - const bool enforceConnectivity = (argc > 4) ? std::stoi(argv[4]) : true; + const bool enforceConnectivity = (argc > 4) ? std::stoi(argv[4]) : true; const unsigned int gridSize = (argc > 3) ? std::stoi(argv[3]) : 20; - const char * inFileName = argv[1]; - const char * outFileName = argv[2]; + const char * inFileName = argv[1]; + const char * outFileName = argv[2]; constexpr unsigned int VDimension = 2; using InputImageType = itk::VectorImage; diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2D.h b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2D.h index 811ce94a825..6cf015c2f53 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2D.h +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2D.h @@ -170,9 +170,9 @@ class ITK_TEMPLATE_EXPORT VoronoiDiagram2D public: PointType m_Left; PointType m_Right; - int m_LeftID; - int m_RightID; - int m_LineID; + int m_LeftID; + int m_RightID; + int m_LineID; VoronoiEdge() = default; ~VoronoiEdge() = default; }; @@ -324,14 +324,14 @@ class ITK_TEMPLATE_EXPORT VoronoiDiagram2D PrintSelf(std::ostream & os, Indent indent) const override; private: - SeedsType m_Seeds{}; - unsigned int m_NumberOfSeeds{}; + SeedsType m_Seeds{}; + unsigned int m_NumberOfSeeds{}; std::vector m_VoronoiRegions{}; - PointType m_VoronoiBoundary{}; - PointType m_VoronoiBoundaryOrigin{}; - std::vector> m_CellNeighborsID{}; + PointType m_VoronoiBoundary{}; + PointType m_VoronoiBoundaryOrigin{}; + std::vector> m_CellNeighborsID{}; - std::vector m_LineList{}; + std::vector m_LineList{}; std::vector m_EdgeList{}; }; diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.h b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.h index 08ce1ee8586..0c57f64495f 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.h +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.h @@ -135,9 +135,9 @@ class ITK_TEMPLATE_EXPORT VoronoiDiagram2DGenerator : public MeshSource::max()) @@ -178,10 +178,10 @@ class ITK_TEMPLATE_EXPORT VoronoiDiagram2DGenerator : public MeshSource m_PQHash{}; - unsigned int m_ELhashsize{ 0 }; - FortuneHalfEdge m_ELleftend{}; - FortuneHalfEdge m_ELrightend{}; + unsigned int m_ELhashsize{ 0 }; + FortuneHalfEdge m_ELleftend{}; + FortuneHalfEdge m_ELrightend{}; std::vector m_ELHash{}; - FortuneEdge m_DELETED{}; + FortuneEdge m_DELETED{}; std::vector m_SeedSites{}; /** Methods to convert the result from Fortune Algorithm into itkMesh diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx index d512e367cc2..247e3b55207 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx @@ -187,7 +187,7 @@ bool VoronoiDiagram2DGenerator::almostsame(CoordinateType p1, CoordinateType p2) { const double diff = p1 - p2; - const bool save = ((diff < -DIFF_TOLERENCE) || (diff > DIFF_TOLERENCE)); + const bool save = ((diff < -DIFF_TOLERENCE) || (diff > DIFF_TOLERENCE)); return (!save); } @@ -227,7 +227,7 @@ VoronoiDiagram2DGenerator::ConstructDiagram() m_OutputVD->Reset(); - EdgeInfo currentPtID; + EdgeInfo currentPtID; const int edges = m_OutputVD->EdgeListSize(); EdgeInfo LRsites; @@ -241,7 +241,7 @@ VoronoiDiagram2DGenerator::ConstructDiagram() } PointType corner[4]; - int cornerID[4]; + int cornerID[4]; corner[0][0] = m_Pxmin; corner[0][1] = m_Pymin; @@ -264,14 +264,14 @@ VoronoiDiagram2DGenerator::ConstructDiagram() ++m_Nvert; m_OutputVD->AddVert(corner[3]); - std::list buildEdges; + std::list buildEdges; typename std::list::iterator BEiter; - EdgeInfo curr; - EdgeInfo curr1; - EdgeInfo curr2; + EdgeInfo curr; + EdgeInfo curr1; + EdgeInfo curr2; - unsigned char frontbnd; - unsigned char backbnd; + unsigned char frontbnd; + unsigned char backbnd; const std::vector cellPoints; for (unsigned int i = 0; i < m_NumberOfSeeds; ++i) { @@ -608,7 +608,7 @@ template auto VoronoiDiagram2DGenerator::findLeftHE(PointType * p) -> FortuneHalfEdge * { - int i; + int i; auto bucket = static_cast((((*p)[0]) - m_Pxmin) / m_Deltax * m_ELhashsize); if (bucket < 0) @@ -743,10 +743,10 @@ template void VoronoiDiagram2DGenerator::intersect(FortuneSite * newV, FortuneHalfEdge * el1, FortuneHalfEdge * el2) { - FortuneEdge * e1 = el1->m_Edge; - FortuneEdge * e2 = el2->m_Edge; + FortuneEdge * e1 = el1->m_Edge; + FortuneEdge * e2 = el2->m_Edge; FortuneHalfEdge * saveHE; - FortuneEdge * saveE; + FortuneEdge * saveE; if (e1 == nullptr) { @@ -832,8 +832,8 @@ VoronoiDiagram2DGenerator::clip_line(FortuneEdge * task) double y1; double x2; double y2; - int id1; - int id2; + int id1; + int id2; if ((task->m_A) == 1.0) { if ((s1 != nullptr) && ((s1->m_Coord[1]) > m_Pymin)) @@ -1085,9 +1085,9 @@ VoronoiDiagram2DGenerator::GenerateVDFortune() int Edgeid = 0; int Siteid = 0; - unsigned int i = 2; - bool ok = true; - PointType currentCircle{}; + unsigned int i = 2; + bool ok = true; + PointType currentCircle{}; FortuneHalfEdge * leftHalfEdge; while (ok) { @@ -1151,8 +1151,8 @@ VoronoiDiagram2DGenerator::GenerateVDFortune() FortuneHalfEdge * left2HalfEdge = leftHalfEdge->m_Left; FortuneHalfEdge * rightHalfEdge = leftHalfEdge->m_Right; FortuneHalfEdge * right2HalfEdge = rightHalfEdge->m_Right; - FortuneSite * findSite = getLeftReg(leftHalfEdge); - FortuneSite * topSite = getRightReg(rightHalfEdge); + FortuneSite * findSite = getLeftReg(leftHalfEdge); + FortuneSite * topSite = getRightReg(rightHalfEdge); FortuneSite * newVert = leftHalfEdge->m_Vert; newVert->m_Sitenbr = m_Nvert; diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiPartitioningImageFilter.hxx b/Modules/Segmentation/Voronoi/include/itkVoronoiPartitioningImageFilter.hxx index a4e18b8ad99..c8fa99e6c45 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiPartitioningImageFilter.hxx +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiPartitioningImageFilter.hxx @@ -28,9 +28,9 @@ VoronoiPartitioningImageFilter::ClassifyDiagram() { PointIdIterator currPit; PointIdIterator currPitEnd; - PointType currP; - PointTypeDeque VertList; - IndexList PixelPool; + PointType currP; + PointTypeDeque VertList; + IndexList PixelPool; this->m_NumberOfBoundary = 0; for (int i = 0; i < this->GetNumberOfSeeds(); ++i) @@ -64,8 +64,8 @@ void VoronoiPartitioningImageFilter::GenerateAddingSeeds() { EdgeIterator eit; - auto eitend = this->m_WorkingVD->EdgeEnd(); - PointType adds; + auto eitend = this->m_WorkingVD->EdgeEnd(); + PointType adds; Point seeds; @@ -128,8 +128,8 @@ VoronoiPartitioningImageFilter::MakeSegmentObject() } PointIdIterator currPit; PointIdIterator currPitEnd; - PointType currP; - PointTypeDeque VertList; + PointType currP; + PointTypeDeque VertList; for (int i = 0; i < this->GetNumberOfSeeds(); ++i) { CellAutoPointer currCell; @@ -151,8 +151,8 @@ bool VoronoiPartitioningImageFilter::TestHomogeneity(IndexList & Plist) { const auto num = static_cast(Plist.size()); - double addp = 0; - double addpp = 0; + double addp = 0; + double addpp = 0; const InputImageType * inputImage = this->GetInput(); diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilter.hxx b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilter.hxx index 48fd114e99d..5d6df8bbbec 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilter.hxx +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilter.hxx @@ -43,7 +43,7 @@ template ::TestHomogeneity(IndexList & Plist) { - auto num = static_cast(Plist.size()); + auto num = static_cast(Plist.size()); double getp; double addp = 0; double addpp = 0; @@ -96,11 +96,11 @@ VoronoiSegmentationImageFilter::Ta const RegionType region = this->GetInput()->GetRequestedRegion(); itk::ImageRegionConstIteratorWithIndex ait(aprior, region); - itk::ImageRegionConstIteratorWithIndex iit(this->GetInput(), region); + itk::ImageRegionConstIteratorWithIndex iit(this->GetInput(), region); this->m_Size = this->GetInput()->GetRequestedRegion().GetSize(); - int num = 0; + int num = 0; float addp = 0; float addpp = 0; float currp; @@ -109,7 +109,7 @@ VoronoiSegmentationImageFilter::Ta unsigned int miny = 0; unsigned int maxx = 0; unsigned int maxy = 0; - bool status = false; + bool status = false; for (unsigned int i = 0; i < this->m_Size[1]; ++i) { for (unsigned int j = 0; j < this->m_Size[0]; ++j) @@ -139,7 +139,7 @@ VoronoiSegmentationImageFilter::Ta } float addb = 0; - int numb = 0; + int numb = 0; ait.GoToBegin(); iit.GoToBegin(); @@ -201,7 +201,7 @@ VoronoiSegmentationImageFilter::Ta template void VoronoiSegmentationImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.h b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.h index 5a499334ef9..ef92a6c1b22 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.h +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.h @@ -237,21 +237,21 @@ class ITK_TEMPLATE_EXPORT VoronoiSegmentationImageFilterBase : public ImageToIma void GenerateData() override; // general pipeline function. - SizeType m_Size{}; - int m_NumberOfSeeds{ 200 }; + SizeType m_Size{}; + int m_NumberOfSeeds{ 200 }; SizeValueType m_MinRegion{ 20 }; - int m_Steps{ 0 }; - int m_LastStepSeeds{ 0 }; - int m_NumberOfSeedsToAdded{ 0 }; - int m_NumberOfBoundary{ 0 }; + int m_Steps{ 0 }; + int m_LastStepSeeds{ 0 }; + int m_NumberOfSeedsToAdded{ 0 }; + int m_NumberOfBoundary{ 0 }; std::vector m_NumberOfPixels{}; std::vector m_Label{}; double m_MeanDeviation{ 0.8 }; - bool m_UseBackgroundInAPrior{ false }; - bool m_OutputBoundary{ false }; // if =1 then output the boundaries, if = 0 then - // output the object. + bool m_UseBackgroundInAPrior{ false }; + bool m_OutputBoundary{ false }; // if =1 then output the boundaries, if = 0 then + // output the object. bool m_InteractiveSegmentation{ false }; typename VoronoiDiagram::Pointer m_WorkingVD{}; diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.hxx b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.hxx index b39465119ad..00f052e7624 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.hxx +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.hxx @@ -38,7 +38,7 @@ VoronoiSegmentationImageFilterBase template void VoronoiSegmentationImageFilterBase::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { using namespace print_helper; @@ -72,7 +72,7 @@ template ::GetPixelIndexFromPolygon( PointTypeDeque vertlist, - IndexList * PixelPool) + IndexList * PixelPool) { PointType currP = vertlist.front(); vertlist.pop_front(); @@ -115,7 +115,7 @@ VoronoiSegmentationImageFilterBase double leftendy = leftP[1]; double rightendy = rightP[1]; double endy = (leftendy > rightendy) ? rightendy : leftendy; - bool RorL = (leftendy > rightendy) ? true : false; + bool RorL = (leftendy > rightendy) ? true : false; double beginx = currP[0]; double beginy = currP[1]; @@ -128,7 +128,7 @@ VoronoiSegmentationImageFilterBase double leftheady = beginy; double rightheady = beginy; - auto intbeginy = static_cast(std::ceil(beginy)); + auto intbeginy = static_cast(std::ceil(beginy)); IndexType idx; idx[1] = intbeginy; auto intendy = static_cast(std::floor(endy)); @@ -333,7 +333,7 @@ VoronoiSegmentationImageFilterBase CellAutoPointer currCell; m_WorkingVD->GetCellId(i, currCell); PointIdIterator currPitEnd = currCell->PointIdsEnd(); - PointTypeDeque VertList; + PointTypeDeque VertList; for (PointIdIterator currPit = currCell->PointIdsBegin(); currPit != currPitEnd; ++currPit) { PointType currP; @@ -563,7 +563,7 @@ VoronoiSegmentationImageFilterBase CellAutoPointer currCell; m_WorkingVD->GetCellId(i, currCell); PointIdIterator currPitEnd = currCell->PointIdsEnd(); - PointTypeDeque VertList; + PointTypeDeque VertList; for (PointIdIterator currPit = currCell->PointIdsBegin(); currPit != currPitEnd; ++currPit) { PointType currP; @@ -577,7 +577,7 @@ VoronoiSegmentationImageFilterBase template void -VoronoiSegmentationImageFilterBase::FillPolygon(PointTypeDeque vertlist, +VoronoiSegmentationImageFilterBase::FillPolygon(PointTypeDeque vertlist, OutputPixelType color) { TOutputImage * output = this->GetOutput(); @@ -620,8 +620,8 @@ VoronoiSegmentationImageFilterBase leftP = vertlist.front(); rightP = vertlist.back(); - double beginy = currP[1]; - auto intbeginy = static_cast(std::ceil(beginy)); + double beginy = currP[1]; + auto intbeginy = static_cast(std::ceil(beginy)); IndexType idx; idx[1] = intbeginy; double leftendy = leftP[1]; @@ -635,7 +635,7 @@ VoronoiSegmentationImageFilterBase double rightheady = beginy; double endy = (leftendy > rightendy) ? rightendy : leftendy; - bool RorL = (leftendy > rightendy) ? true : false; + bool RorL = (leftendy > rightendy) ? true : false; double leftDx = (Math::AlmostEquals(leftP[1], beginy)) ? 1.0 : (leftP[0] - beginx) / (leftP[1] - beginy); double rightDx = (Math::AlmostEquals(rightP[1], beginy)) ? 1.0 : (rightP[0] - endx) / (rightP[1] - beginy); @@ -861,9 +861,9 @@ VoronoiSegmentationImageFilterBase --y2; } - int dx = x1 - x2; + int dx = x1 - x2; const int adx = (dx > 0) ? dx : -dx; - int dy = y1 - y2; + int dy = y1 - y2; const int ady = (dy > 0) ? dy : -dy; @@ -918,9 +918,9 @@ VoronoiSegmentationImageFilterBase template void VoronoiSegmentationImageFilterBase::DrawDiagram(VDImagePointer result, - unsigned char incolor, - unsigned char outcolor, - unsigned char boundcolor) + unsigned char incolor, + unsigned char outcolor, + unsigned char boundcolor) { const RegionType region = this->GetInput()->GetRequestedRegion(); @@ -931,8 +931,8 @@ VoronoiSegmentationImageFilterBase ++vdit; } - EdgeIterator eit; - auto eitend = m_WorkingVD->EdgeEnd(); + EdgeIterator eit; + auto eitend = m_WorkingVD->EdgeEnd(); Point seeds; for (eit = m_WorkingVD->EdgeBegin(); eit != eitend; ++eit) { @@ -955,9 +955,9 @@ VoronoiSegmentationImageFilterBase template void VoronoiSegmentationImageFilterBase::drawVDline(VDImagePointer result, - PointType p1, - PointType p2, - unsigned char color) + PointType p1, + PointType p2, + unsigned char color) { auto x1 = static_cast(p1[0] + 0.5); auto x2 = static_cast(p2[0] + 0.5); @@ -980,9 +980,9 @@ VoronoiSegmentationImageFilterBase { --y2; } - int dx = x1 - x2; + int dx = x1 - x2; const int adx = (dx > 0) ? dx : -dx; - int dy = y1 - y2; + int dy = y1 - y2; const int ady = (dy > 0) ? dy : -dy; if (adx > ady) diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.h b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.h index d3cc8fd28d8..3151de4fd7b 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.h +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.h @@ -219,15 +219,15 @@ class ITK_TEMPLATE_EXPORT VoronoiSegmentationRGBImageFilter PrintSelf(std::ostream & os, Indent indent) const override; private: - double m_Mean[6]{}; - double m_STD[6]{}; - double m_MeanTolerance[6]{}; - double m_STDTolerance[6]{}; - double m_MeanPercentError[6]{}; - double m_STDPercentError[6]{}; - double m_MaxValueOfRGB{}; - unsigned int m_TestMean[3]{}; - unsigned int m_TestSTD[3]{}; + double m_Mean[6]{}; + double m_STD[6]{}; + double m_MeanTolerance[6]{}; + double m_STDTolerance[6]{}; + double m_MeanPercentError[6]{}; + double m_STDPercentError[6]{}; + double m_MaxValueOfRGB{}; + unsigned int m_TestMean[3]{}; + unsigned int m_TestSTD[3]{}; typename RGBHCVImage::Pointer m_WorkingImage{}; bool diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.hxx b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.hxx index 6fdf111b0a9..88b2ad9a3c6 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.hxx +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.hxx @@ -70,7 +70,7 @@ VoronoiSegmentationRGBImageFilter::SetSTDPercentError template void -VoronoiSegmentationRGBImageFilter::SetInput(unsigned int inputNumber, +VoronoiSegmentationRGBImageFilter::SetInput(unsigned int inputNumber, const InputImageType * input) { this->Superclass::SetInput(inputNumber, input); @@ -89,10 +89,10 @@ VoronoiSegmentationRGBImageFilter::SetInput(const Inp m_WorkingImage->SetRegions(region); m_WorkingImage->Allocate(); - itk::ImageRegionIteratorWithIndex wit(m_WorkingImage, region); + itk::ImageRegionIteratorWithIndex wit(m_WorkingImage, region); itk::ImageRegionConstIteratorWithIndex iit(this->GetInput(), region); - PixelType ipixel; - RGBHCVPixel wpixel; + PixelType ipixel; + RGBHCVPixel wpixel; const double X0 = m_MaxValueOfRGB * 0.982; @@ -137,7 +137,7 @@ template bool VoronoiSegmentationRGBImageFilter::TestHomogeneity(IndexList & Plist) { - auto num = static_cast(Plist.size()); + auto num = static_cast(Plist.size()); double addp[6] = { 0, 0, 0, 0, 0, 0 }; double addpp[6] = { 0, 0, 0, 0, 0, 0 }; @@ -193,13 +193,13 @@ VoronoiSegmentationRGBImageFilter::TakeAPrior(const B const RegionType region = this->GetInput()->GetRequestedRegion(); itk::ImageRegionConstIteratorWithIndex ait(aprior, region); - itk::ImageRegionIteratorWithIndex iit(m_WorkingImage, region); + itk::ImageRegionIteratorWithIndex iit(m_WorkingImage, region); unsigned int minx = 0; unsigned int miny = 0; unsigned int maxx = 0; unsigned int maxy = 0; - bool status = false; + bool status = false; for (unsigned int i = 0; i < this->GetSize()[1]; ++i) { for (unsigned int j = 0; j < this->GetSize()[0]; ++j) @@ -231,10 +231,10 @@ VoronoiSegmentationRGBImageFilter::TakeAPrior(const B int objnum = 0; int bkgnum = 0; - float objaddp[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; - float objaddpp[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; - float bkgaddp[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; - float bkgaddpp[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + float objaddp[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + float objaddpp[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + float bkgaddp[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + float bkgaddpp[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; RGBHCVPixel currp; ait.GoToBegin(); @@ -288,8 +288,8 @@ VoronoiSegmentationRGBImageFilter::TakeAPrior(const B double b_Mean[6]; double b_STD[6]; - float diffMean[6]; - float diffSTD[6]; + float diffMean[6]; + float diffSTD[6]; for (unsigned int i = 0; i < 6; ++i) { m_Mean[i] = objaddp[i] / objnum; diff --git a/Modules/Segmentation/Voronoi/test/itkVoronoiDiagram2DTest.cxx b/Modules/Segmentation/Voronoi/test/itkVoronoiDiagram2DTest.cxx index 56b7ddd3e2f..42702593fb2 100644 --- a/Modules/Segmentation/Voronoi/test/itkVoronoiDiagram2DTest.cxx +++ b/Modules/Segmentation/Voronoi/test/itkVoronoiDiagram2DTest.cxx @@ -33,8 +33,8 @@ itkVoronoiDiagram2DTest(int argc, char * argv[]) return EXIT_FAILURE; } - constexpr double height = 400; - constexpr double width = 400; + constexpr double height = 400; + constexpr double width = 400; constexpr unsigned int numberOfSeeds = 20; using VoronoiDiagram = itk::VoronoiDiagram2D; diff --git a/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationImageFilterTest.cxx b/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationImageFilterTest.cxx index 9677f54424f..70c85dc1c42 100644 --- a/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationImageFilterTest.cxx +++ b/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationImageFilterTest.cxx @@ -44,9 +44,9 @@ itkVoronoiSegmentationImageFilterTest(int argc, char * argv[]) ITK_EXERCISE_BASIC_OBJECT_METHODS( voronoiSegmenter, VoronoiSegmentationImageFilter, VoronoiSegmentationImageFilterBase); - auto inputImage = UShortImage::New(); + auto inputImage = UShortImage::New(); constexpr UShortImage::SizeType size = { { width, height } }; - UShortImage::IndexType index{}; + UShortImage::IndexType index{}; UShortImage::RegionType region; diff --git a/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationRGBImageFilterTest.cxx b/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationRGBImageFilterTest.cxx index 5a9ff7f8215..35f14e23adb 100644 --- a/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationRGBImageFilterTest.cxx +++ b/Modules/Segmentation/Voronoi/test/itkVoronoiSegmentationRGBImageFilterTest.cxx @@ -36,21 +36,21 @@ namespace VoronoiSegRGBTest // // global constants // -constexpr unsigned int width = 256; -constexpr unsigned int height = 256; +constexpr unsigned int width = 256; +constexpr unsigned int height = 256; constexpr unsigned char bgMean = 64; constexpr unsigned char bgStd = 10; constexpr unsigned char fgMean = 128; constexpr unsigned char fgStd = 5; -constexpr unsigned int objAStartX = 30; -constexpr unsigned int objAEndX = 94; -constexpr unsigned int objAStartY = 30; -constexpr unsigned int objAEndY = 94; -constexpr unsigned int objBStartX = 150; -constexpr unsigned int objBEndX = 214; -constexpr unsigned int objBStartY = 150; -constexpr unsigned int objBEndY = 214; -constexpr double minCorrectRate = .875; // .875 is all classified as background +constexpr unsigned int objAStartX = 30; +constexpr unsigned int objAEndX = 94; +constexpr unsigned int objAStartY = 30; +constexpr unsigned int objAEndY = 94; +constexpr unsigned int objBStartX = 150; +constexpr unsigned int objBEndX = 214; +constexpr unsigned int objBStartY = 150; +constexpr unsigned int objBEndY = 214; +constexpr double minCorrectRate = .875; // .875 is all classified as background // @@ -60,9 +60,9 @@ ImageType::Pointer SetUpInputImage() { // initialize the test input image - auto inputImage = ImageType::New(); + auto inputImage = ImageType::New(); constexpr ImageType::SizeType size = { { width, height } }; - ImageType::RegionType region; + ImageType::RegionType region; region.SetSize(size); inputImage->SetRegions(region); inputImage->Allocate(); @@ -261,9 +261,9 @@ TestWithPrior(ImageType::Pointer inputImage) // set up the prior std::cout << "Setting up the prior image" << std::endl; - auto prior = BinaryObjectImage::New(); + auto prior = BinaryObjectImage::New(); constexpr BinaryObjectImage::SizeType size = { { width, height } }; - BinaryObjectImage::RegionType region; + BinaryObjectImage::RegionType region; region.SetSize(size); prior->SetRegions(region); prior->Allocate(); diff --git a/Modules/Segmentation/Watersheds/include/itkIsolatedWatershedImageFilter.hxx b/Modules/Segmentation/Watersheds/include/itkIsolatedWatershedImageFilter.hxx index 1919d75a28f..a0dde4e5c44 100644 --- a/Modules/Segmentation/Watersheds/include/itkIsolatedWatershedImageFilter.hxx +++ b/Modules/Segmentation/Watersheds/include/itkIsolatedWatershedImageFilter.hxx @@ -85,8 +85,8 @@ template void IsolatedWatershedImageFilter::GenerateData() { - const InputImageType * inputImage = this->GetInput(); - OutputImageType * outputImage = this->GetOutput(); + const InputImageType * inputImage = this->GetInput(); + OutputImageType * outputImage = this->GetOutput(); const OutputImageRegionType region = outputImage->GetRequestedRegion(); // Set up the pipeline @@ -109,7 +109,7 @@ IsolatedWatershedImageFilter::GenerateData() std::log(2.0)); const float progressWeight = 1.0f / static_cast(maximumIterationsInBinarySearch + 2); - float cumulatedProgress = 0.0f; + float cumulatedProgress = 0.0f; IterationReporter iterate(this, 0, 1); @@ -146,12 +146,12 @@ IsolatedWatershedImageFilter::GenerateData() ProgressReporter progress(this, 0, region.GetNumberOfPixels(), 100, cumulatedProgress, progressWeight); - ImageRegionIterator ot(outputImage, region); + ImageRegionIterator ot(outputImage, region); ImageRegionIterator it(m_Watershed->GetOutput(), region); const IdentifierType seed1Label = m_Watershed->GetOutput()->GetPixel(m_Seed1); const IdentifierType seed2Label = m_Watershed->GetOutput()->GetPixel(m_Seed2); - IdentifierType value; + IdentifierType value; it.GoToBegin(); ot.GoToBegin(); diff --git a/Modules/Segmentation/Watersheds/include/itkMorphologicalWatershedFromMarkersImageFilter.hxx b/Modules/Segmentation/Watersheds/include/itkMorphologicalWatershedFromMarkersImageFilter.hxx index f8fa5cd32f5..82c542c38eb 100644 --- a/Modules/Segmentation/Watersheds/include/itkMorphologicalWatershedFromMarkersImageFilter.hxx +++ b/Modules/Segmentation/Watersheds/include/itkMorphologicalWatershedFromMarkersImageFilter.hxx @@ -99,7 +99,7 @@ MorphologicalWatershedFromMarkersImageFilter::Generate const LabelImageType * markerImage = this->GetMarkerImage(); const InputImageType * inputImage = this->GetInput(); - LabelImageType * outputImage = this->GetOutput(); + LabelImageType * outputImage = this->GetOutput(); // Set up the progress reporter // we can't found the exact number of pixel to process in the 2nd pass, so we @@ -123,7 +123,7 @@ MorphologicalWatershedFromMarkersImageFilter::Generate // iterator for the marker image using MarkerIteratorType = ConstShapedNeighborhoodIterator; typename MarkerIteratorType::ConstIterator nmIt; - MarkerIteratorType markerIt(radius, markerImage, markerImage->GetRequestedRegion()); + MarkerIteratorType markerIt(radius, markerImage, markerImage->GetRequestedRegion()); // add a boundary constant to avoid adding pixels on the border in the fah ConstantBoundaryCondition lcbc; lcbc.SetConstant(NumericTraits::max()); @@ -132,7 +132,7 @@ MorphologicalWatershedFromMarkersImageFilter::Generate // iterator for the input image using InputIteratorType = ConstShapedNeighborhoodIterator; - InputIteratorType inputIt(radius, inputImage, inputImage->GetRequestedRegion()); + InputIteratorType inputIt(radius, inputImage, inputImage->GetRequestedRegion()); typename InputIteratorType::ConstIterator niIt; setConnectivity(&inputIt, m_FullyConnected); @@ -140,7 +140,7 @@ MorphologicalWatershedFromMarkersImageFilter::Generate using OutputIteratorType = ShapedNeighborhoodIterator; using OffsetType = typename OutputIteratorType::OffsetType; typename OutputIteratorType::Iterator noIt; - OutputIteratorType outputIt(radius, outputImage, outputImage->GetRequestedRegion()); + OutputIteratorType outputIt(radius, outputImage, outputImage->GetRequestedRegion()); setConnectivity(&outputIt, m_FullyConnected); //--------------------------------------------------------------------------- @@ -169,8 +169,8 @@ MorphologicalWatershedFromMarkersImageFilter::Generate // iterator for the status image using StatusIteratorType = ShapedNeighborhoodIterator; - typename StatusIteratorType::Iterator nsIt; - StatusIteratorType statusIt(radius, statusImage, outputImage->GetRequestedRegion()); + typename StatusIteratorType::Iterator nsIt; + StatusIteratorType statusIt(radius, statusImage, outputImage->GetRequestedRegion()); ConstantBoundaryCondition bcbc; bcbc.SetConstant(true); // outside pixel are already processed statusIt.OverrideBoundaryCondition(&bcbc); @@ -247,7 +247,7 @@ MorphologicalWatershedFromMarkersImageFilter::Generate { // store the current vars const InputImagePixelType currentValue = fah.begin()->first; - QueueType currentQueue = fah.begin()->second; + QueueType currentQueue = fah.begin()->second; // and remove them from the fah fah.erase(fah.begin()); @@ -265,7 +265,7 @@ MorphologicalWatershedFromMarkersImageFilter::Generate // iterate over the neighbors. If there is only one marker value, give // that value to the pixel, else keep it as is (watershed line) LabelImagePixelType marker = wsLabel; - bool collision = false; + bool collision = false; for (noIt = outputIt.Begin(); noIt != outputIt.End(); ++noIt) { const LabelImagePixelType o = noIt.Get(); @@ -333,7 +333,7 @@ MorphologicalWatershedFromMarkersImageFilter::Generate const LabelImagePixelType markerPixel = markerIt.GetCenterPixel(); if (markerPixel != bgLabel) { - const IndexType idx = markerIt.GetIndex(); + const IndexType idx = markerIt.GetIndex(); const OffsetType shift = idx - inputIt.GetIndex(); inputIt += shift; @@ -380,7 +380,7 @@ MorphologicalWatershedFromMarkersImageFilter::Generate { // store the current vars const InputImagePixelType currentValue = fah.begin()->first; - QueueType currentQueue = fah.begin()->second; + QueueType currentQueue = fah.begin()->second; // and remove them from the fah fah.erase(fah.begin()); @@ -425,7 +425,7 @@ MorphologicalWatershedFromMarkersImageFilter::Generate template void MorphologicalWatershedFromMarkersImageFilter::PrintSelf(std::ostream & os, - Indent indent) const + Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Modules/Segmentation/Watersheds/include/itkTobogganImageFilter.hxx b/Modules/Segmentation/Watersheds/include/itkTobogganImageFilter.hxx index ec7378ea86d..650ebf0ef8a 100644 --- a/Modules/Segmentation/Watersheds/include/itkTobogganImageFilter.hxx +++ b/Modules/Segmentation/Watersheds/include/itkTobogganImageFilter.hxx @@ -54,11 +54,11 @@ template void TobogganImageFilter::GenerateData() { - auto inputImage = static_cast(this->GetInput()); + auto inputImage = static_cast(this->GetInput()); const OutputImagePointer outputImage = this->GetOutput(); constexpr OutputImagePixelType z{}; - OutputImagePixelType CurrentLabel{}; + OutputImagePixelType CurrentLabel{}; CurrentLabel += 2; @@ -69,7 +69,7 @@ TobogganImageFilter::GenerateData() using InputIterator = ImageRegionConstIterator; using OutputIterator = ImageRegionConstIterator; - InputIterator inIt(inputImage, inputImage->GetRequestedRegion()); + InputIterator inIt(inputImage, inputImage->GetRequestedRegion()); OutputIterator outIt(outputImage, outputImage->GetRequestedRegion()); // Walk through the image @@ -83,9 +83,9 @@ TobogganImageFilter::GenerateData() OutputImagePixelType MinimumNeighborClass; OutputImagePixelType LabelForRegion = CurrentLabel; - bool FoundMinimum = false; + bool FoundMinimum = false; - auto CurrentPositionIndex = outIt.GetIndex(); + auto CurrentPositionIndex = outIt.GetIndex(); IndexType MinimumNeighborIndex = CurrentPositionIndex; // This is the first pixel we've visited diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedBoundary.hxx b/Modules/Segmentation/Watersheds/include/itkWatershedBoundary.hxx index 365214cdbcb..7a34feeaaaa 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedBoundary.hxx +++ b/Modules/Segmentation/Watersheds/include/itkWatershedBoundary.hxx @@ -28,13 +28,13 @@ namespace watershed template Boundary::Boundary() { - unsigned int i; - FacePointer p; + unsigned int i; + FacePointer p; const flat_hash_t f; std::pair i_pair; std::pair c_pair; - std::pair v_pair; + std::pair v_pair; // Initialize all the members of the lists, etc. for (i = 0; i < Dimension; ++i) diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedEquivalenceRelabeler.hxx b/Modules/Segmentation/Watersheds/include/itkWatershedEquivalenceRelabeler.hxx index d777ad7d8f2..80c88421916 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedEquivalenceRelabeler.hxx +++ b/Modules/Segmentation/Watersheds/include/itkWatershedEquivalenceRelabeler.hxx @@ -27,7 +27,7 @@ void EquivalenceRelabeler::GenerateData() { const typename ImageType::ConstPointer input = this->GetInputImage(); - const typename ImageType::Pointer output = this->GetOutputImage(); + const typename ImageType::Pointer output = this->GetOutputImage(); const typename EquivalencyTableType::Pointer eqT = this->GetEquivalencyTable(); @@ -38,7 +38,7 @@ EquivalenceRelabeler::GenerateData() // Copy input to output // ImageRegionConstIterator it_a(input, output->GetRequestedRegion()); - ImageRegionIterator it_b(output, output->GetRequestedRegion()); + ImageRegionIterator it_b(output, output->GetRequestedRegion()); it_a.GoToBegin(); it_b.GoToBegin(); @@ -61,7 +61,7 @@ EquivalenceRelabeler::GenerateInputRequestedRegion() Superclass::GenerateInputRequestedRegion(); // get pointers to the input and output - auto * inputPtr = const_cast(this->GetInputImage()); + auto * inputPtr = const_cast(this->GetInputImage()); ImageType * outputPtr = this->GetOutputImage(); if (!inputPtr || !outputPtr) diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedMiniPipelineProgressCommand.h b/Modules/Segmentation/Watersheds/include/itkWatershedMiniPipelineProgressCommand.h index edf6b6eef87..f4b6deb7548 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedMiniPipelineProgressCommand.h +++ b/Modules/Segmentation/Watersheds/include/itkWatershedMiniPipelineProgressCommand.h @@ -78,9 +78,9 @@ class ITKWatersheds_EXPORT WatershedMiniPipelineProgressCommand : public Command PrintSelf(std::ostream & os, Indent indent) const override; private: - double m_Count{ 0.0 }; + double m_Count{ 0.0 }; ProcessObject * m_Filter{ nullptr }; - unsigned int m_NumberOfFilters{ 1 }; + unsigned int m_NumberOfFilters{ 1 }; }; } // end namespace itk diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedRelabeler.hxx b/Modules/Segmentation/Watersheds/include/itkWatershedRelabeler.hxx index 759eafe6214..151f440a798 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedRelabeler.hxx +++ b/Modules/Segmentation/Watersheds/include/itkWatershedRelabeler.hxx @@ -48,8 +48,8 @@ Relabeler::GenerateData() const typename ImageType::Pointer output = this->GetOutputImage(); const typename SegmentTreeType::Pointer tree = this->GetInputSegmentTree(); - typename SegmentTreeType::Iterator it; - auto eqT = EquivalencyTable::New(); + typename SegmentTreeType::Iterator it; + auto eqT = EquivalencyTable::New(); output->SetBufferedRegion(output->GetRequestedRegion()); output->Allocate(); @@ -77,7 +77,7 @@ Relabeler::GenerateData() return; } const ScalarType max = tree->Back().saliency; - auto mergeLimit = static_cast(m_FloodLevel * max); + auto mergeLimit = static_cast(m_FloodLevel * max); this->UpdateProgress(0.5); diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTable.h b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTable.h index 4720ec31ee2..fac5283c4ad 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTable.h +++ b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTable.h @@ -68,7 +68,7 @@ class ITK_TEMPLATE_EXPORT SegmentTable : public DataObject , height(s) {} IdentifierType label; - ScalarType height; + ScalarType height; /** Necessary operator for sorting the adjacency lists */ bool @@ -92,7 +92,7 @@ class ITK_TEMPLATE_EXPORT SegmentTable : public DataObject /** Structure holding information about each segment in an image. */ struct segment_t { - ScalarType min; + ScalarType min; edge_list_t edge_list; }; diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTree.h b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTree.h index cd46c04b246..7c75a69a624 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTree.h +++ b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTree.h @@ -66,7 +66,7 @@ class ITK_TEMPLATE_EXPORT SegmentTree : public DataObject { IdentifierType from; IdentifierType to; - ScalarType saliency; + ScalarType saliency; }; /** Define the container type used in this list data structure */ diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.h b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.h index df30cc4cdd0..8e1877d27b2 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.h +++ b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.h @@ -225,9 +225,9 @@ class ITK_TEMPLATE_EXPORT SegmentTreeGenerator : public ProcessObject GenerateInputRequestedRegion() override; private: - bool m_Merge{ false }; + bool m_Merge{ false }; double m_FloodLevel{ 0.0 }; - bool m_ConsumeInput{ false }; + bool m_ConsumeInput{ false }; using HashMapType = std::unordered_map; diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx index eed1b58600f..a35c73cfb00 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx +++ b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx @@ -77,8 +77,8 @@ SegmentTreeGenerator::GenerateData() this->GetOutputSegmentTree()->Clear(); const typename SegmentTableType::Pointer input = this->GetInputSegmentTable(); - auto mergeList = SegmentTreeType::New(); - auto seg = SegmentTableType::New(); + auto mergeList = SegmentTreeType::New(); + auto seg = SegmentTableType::New(); if (m_ConsumeInput) // do not copy input { input->Modified(); @@ -206,7 +206,7 @@ SegmentTreeGenerator::ExtractMergeHierarchy(SegmentTableTypePointer seg } auto initHeapSize = static_cast(heap->Size()); - unsigned int counter = 0; + unsigned int counter = 0; typename SegmentTreeType::ValueType topMerge = heap->Front(); while ((!heap->Empty()) && (topMerge.saliency <= threshold)) @@ -282,10 +282,10 @@ SegmentTreeGenerator::ExtractMergeHierarchy(SegmentTableTypePointer seg template void -SegmentTreeGenerator::PruneMergeSegments(SegmentTableTypePointer segments, +SegmentTreeGenerator::PruneMergeSegments(SegmentTableTypePointer segments, OneWayEquivalencyTableTypePointer eqT, - const IdentifierType FROM, - const IdentifierType TO, + const IdentifierType FROM, + const IdentifierType TO, ScalarType) { // Lookup both entries. @@ -418,10 +418,10 @@ SegmentTreeGenerator::PruneMergeSegments(SegmentTableTypePointer template void -SegmentTreeGenerator::MergeSegments(SegmentTableTypePointer segments, +SegmentTreeGenerator::MergeSegments(SegmentTableTypePointer segments, OneWayEquivalencyTableTypePointer eqT, - const IdentifierType FROM, - const IdentifierType TO) + const IdentifierType FROM, + const IdentifierType TO) { HashMapType seen_table; diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.h b/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.h index 6e5e814e60f..1465403d307 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.h +++ b/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.h @@ -254,10 +254,10 @@ class ITK_TEMPLATE_EXPORT Segmenter : public ProcessObject struct flat_region_t { IdentifierType * min_label_ptr; - InputPixelType bounds_min; + InputPixelType bounds_min; // InputPixelType bounds_max; // <-- may not be necc. InputPixelType value; - bool is_on_boundary{ false }; + bool is_on_boundary{ false }; flat_region_t() = default; }; @@ -266,8 +266,8 @@ class ITK_TEMPLATE_EXPORT Segmenter : public ProcessObject struct connectivity_t { - unsigned int size; - unsigned int * index; + unsigned int size; + unsigned int * index; typename InputImageType::OffsetType * direction; }; @@ -357,7 +357,7 @@ class ITK_TEMPLATE_EXPORT Segmenter : public ProcessObject InputImageTypePointer source, const ImageRegionType source_region, const ImageRegionType destination_region, - InputPixelType threshold); + InputPixelType threshold); /** Helper function. Finds the minimum and maximum values in an image. */ static void @@ -390,10 +390,10 @@ class ITK_TEMPLATE_EXPORT Segmenter : public ProcessObject * streaming applications*/ ImageRegionType m_LargestPossibleRegion{}; - bool m_SortEdgeLists{}; - bool m_DoBoundaryAnalysis{}; - double m_Threshold{}; - double m_MaximumFloodLevel{}; + bool m_SortEdgeLists{}; + bool m_DoBoundaryAnalysis{}; + double m_Threshold{}; + double m_MaximumFloodLevel{}; IdentifierType m_CurrentLabel{}; }; } // end namespace watershed diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx b/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx index 378474c492d..fd8734c2bd8 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx +++ b/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx @@ -58,9 +58,9 @@ Segmenter::GenerateData() this->SetCurrentLabel(1); } - const typename InputImageType::Pointer input = this->GetInputImage(); + const typename InputImageType::Pointer input = this->GetInputImage(); const typename OutputImageType::Pointer output = this->GetOutputImage(); - const typename BoundaryType::Pointer boundary = this->GetBoundary(); + const typename BoundaryType::Pointer boundary = this->GetBoundary(); // ------------------------------------------------------------------------ // @@ -84,21 +84,21 @@ Segmenter::GenerateData() // out a pixel when we threshold so that we can construct the retaining wall // along those faces. // - ImageRegionType regionToProcess = output->GetRequestedRegion(); + ImageRegionType regionToProcess = output->GetRequestedRegion(); const ImageRegionType largestPossibleRegion = this->GetLargestPossibleRegion(); - ImageRegionType thresholdImageRegion = regionToProcess; - ImageRegionType thresholdLargestPossibleRegion = this->GetLargestPossibleRegion(); + ImageRegionType thresholdImageRegion = regionToProcess; + ImageRegionType thresholdLargestPossibleRegion = this->GetLargestPossibleRegion(); // First we have to find the boundaries and adjust the threshold image size typename ImageRegionType::IndexType tidx = thresholdImageRegion.GetIndex(); - typename ImageRegionType::SizeType tsz = thresholdImageRegion.GetSize(); + typename ImageRegionType::SizeType tsz = thresholdImageRegion.GetSize(); typename ImageRegionType::IndexType tlidx = thresholdLargestPossibleRegion.GetIndex(); - typename ImageRegionType::SizeType tlsz = thresholdLargestPossibleRegion.GetSize(); + typename ImageRegionType::SizeType tlsz = thresholdLargestPossibleRegion.GetSize(); for (unsigned int i = 0; i < ImageDimension; ++i) { - ImageRegionType reg; + ImageRegionType reg; typename ImageRegionType::IndexType idx = regionToProcess.GetIndex(); - typename ImageRegionType::SizeType sz = regionToProcess.GetSize(); + typename ImageRegionType::SizeType sz = regionToProcess.GetSize(); // Set LOW face idx[i] = regionToProcess.GetIndex()[i]; @@ -191,7 +191,7 @@ Segmenter::GenerateData() // to process represents all the pixels contained within the 1 pixel padded // boundary of the threshold image. // - typename ImageRegionType::SizeType irsz; + typename ImageRegionType::SizeType irsz; typename ImageRegionType::IndexType iridx; for (unsigned int i = 0; i < ImageDimension; ++i) { @@ -228,10 +228,10 @@ Segmenter::GenerateData() // flow at the boundaries from the requested region of the threshold // image. // - typename BoundaryType::IndexType b_idx; - ImageRegionType reg_b; + typename BoundaryType::IndexType b_idx; + ImageRegionType reg_b; typename ImageRegionType::IndexType idx_b; - typename ImageRegionType::SizeType sz_b; + typename ImageRegionType::SizeType sz_b; for (b_idx.first = 0; b_idx.first < ImageDimension; ++b_idx.first) { @@ -327,7 +327,7 @@ void Segmenter::CollectBoundaryInformation(flat_region_table_t & flatRegions) { const typename OutputImageType::Pointer output = this->GetOutputImage(); - const typename BoundaryType::Pointer boundary = this->GetBoundary(); + const typename BoundaryType::Pointer boundary = this->GetBoundary(); typename BoundaryType::IndexType idx; for (idx.first = 0; idx.first < ImageDimension; (idx.first)++) @@ -340,8 +340,8 @@ Segmenter::CollectBoundaryInformation(flat_region_table_t & flatReg } const typename BoundaryType::face_t::Pointer face = boundary->GetFace(idx); - typename BoundaryType::flat_hash_t * flats = boundary->GetFlatHash(idx); - const ImageRegionType region = face->GetRequestedRegion(); + typename BoundaryType::flat_hash_t * flats = boundary->GetFlatHash(idx); + const ImageRegionType region = face->GetRequestedRegion(); // Grab all the labels of the boundary pixels. ImageRegionIterator faceIt = @@ -414,7 +414,7 @@ template void Segmenter::AnalyzeBoundaryFlow(InputImageTypePointer thresholdImage, flat_region_table_t & flatRegions, - InputPixelType max) + InputPixelType max) { // // NOTE: For ease of initial implementation, this method does @@ -425,7 +425,7 @@ Segmenter::AnalyzeBoundaryFlow(InputImageTypePointer thresholdImage typename BoundaryType::face_pixel_t fps; const typename OutputImageType::Pointer output = this->GetOutputImage(); - const typename BoundaryType::Pointer boundary = this->GetBoundary(); + const typename BoundaryType::Pointer boundary = this->GetBoundary(); typename ConstNeighborhoodIterator::RadiusType rad; for (unsigned int i = 0; i < ImageDimension; ++i) @@ -449,7 +449,7 @@ Segmenter::AnalyzeBoundaryFlow(InputImageTypePointer thresholdImage } const typename BoundaryType::face_t::Pointer face = boundary->GetFace(idx); - const ImageRegionType region = face->GetRequestedRegion(); + const ImageRegionType region = face->GetRequestedRegion(); ConstNeighborhoodIterator searchIt = ConstNeighborhoodIterator(rad, thresholdImage, region); @@ -594,7 +594,7 @@ Segmenter::AnalyzeBoundaryFlow(InputImageTypePointer thresholdImage } const typename BoundaryType::face_t::Pointer face = boundary->GetFace(idx); - const ImageRegionType region = face->GetRequestedRegion(); + const ImageRegionType region = face->GetRequestedRegion(); Self::RelabelImage(output, region, eqTable); } @@ -656,12 +656,12 @@ Segmenter::GenerateConnectivity() template void -Segmenter::LabelMinima(InputImageTypePointer img, - ImageRegionType region, +Segmenter::LabelMinima(InputImageTypePointer img, + ImageRegionType region, typename Self::flat_region_table_t & flatRegions, - InputPixelType Max) + InputPixelType Max) { - unsigned int nPos = 0; + unsigned int nPos = 0; const InputPixelType maxValue = Max; auto equivalentLabels = EquivalencyTable::New(); @@ -675,9 +675,9 @@ Segmenter::LabelMinima(InputImageTypePointer img, rad[i] = 1; } ConstNeighborhoodIterator searchIt(rad, img, region); - NeighborhoodIterator labelIt(rad, output, region); - const unsigned int nSize = searchIt.Size(); - const unsigned int nCenter = nSize >> 1; + NeighborhoodIterator labelIt(rad, output, region); + const unsigned int nSize = searchIt.Size(); + const unsigned int nCenter = nSize >> 1; // Sweep through the images. Label all local minima // and record information for all the flat regions. @@ -695,7 +695,7 @@ Segmenter::LabelMinima(InputImageTypePointer img, // Compare current pixel value with its neighbors. const InputPixelType currentValue = searchIt.GetPixel(nCenter); - unsigned int i = 0; + unsigned int i = 0; for (; i < m_Connectivity.size; ++i) { nPos = m_Connectivity.index[i]; @@ -813,14 +813,14 @@ Segmenter::GradientDescent(InputImageTypePointer img, ImageRegionTy // Set up our iterators. // typename ConstNeighborhoodIterator::RadiusType rad; - typename NeighborhoodIterator::RadiusType zeroRad; + typename NeighborhoodIterator::RadiusType zeroRad; for (unsigned int i = 0; i < ImageDimension; ++i) { rad[i] = 1; zeroRad[i] = 0; } ConstNeighborhoodIterator valueIt(rad, img, region); - NeighborhoodIterator labelIt(zeroRad, output, region); + NeighborhoodIterator labelIt(zeroRad, output, region); // // Sweep through the image and trace all unlabeled @@ -837,7 +837,7 @@ Segmenter::GradientDescent(InputImageTypePointer img, ImageRegionTy while (newLabel == NULL_LABEL) // est descent until a label { // is found. updateStack.push(labelIt.GetCenterPointer()); - InputPixelType minVal = valueIt.GetPixel(m_Connectivity.index[0]); + InputPixelType minVal = valueIt.GetPixel(m_Connectivity.index[0]); typename InputImageType::OffsetType moveIndex = m_Connectivity.direction[0]; for (unsigned int ii = 1; ii < m_Connectivity.size; ++ii) { @@ -890,7 +890,7 @@ void Segmenter::UpdateSegmentTable(InputImageTypePointer input, ImageRegionType region) { // Grab the data we need. - const typename OutputImageType::Pointer output = this->GetOutputImage(); + const typename OutputImageType::Pointer output = this->GetOutputImage(); const typename SegmentTableType::Pointer segments = this->GetSegmentTable(); // Set up some iterators. @@ -900,7 +900,7 @@ Segmenter::UpdateSegmentTable(InputImageTypePointer input, ImageReg hoodRadius[i] = 1; } ConstNeighborhoodIterator searchIt(hoodRadius, input, region); - NeighborhoodIterator labelIt(hoodRadius, output, region); + NeighborhoodIterator labelIt(hoodRadius, output, region); const IdentifierType hoodCenter = searchIt.Size() >> 1; @@ -913,8 +913,8 @@ Segmenter::UpdateSegmentTable(InputImageTypePointer input, ImageReg // and update its minimum value if necessary. typename SegmentTableType::segment_t * segment_ptr = segments->Lookup(segment_label); - auto edge_table_entry_ptr = edgeHash.find(segment_label); - const edge_table_t tempEdgeTable; + auto edge_table_entry_ptr = edgeHash.find(segment_label); + const edge_table_t tempEdgeTable; if (segment_ptr == nullptr) // This segment not yet identified. { // So add it to the table. typename SegmentTableType::segment_t temp_segment; @@ -939,7 +939,7 @@ Segmenter::UpdateSegmentTable(InputImageTypePointer input, ImageReg for (unsigned int i = 0; i < m_Connectivity.size; ++i) { const unsigned int nPos = m_Connectivity.index[i]; - InputPixelType lowest_edge; + InputPixelType lowest_edge; if (labelIt.GetPixel(nPos) != segment_label && labelIt.GetPixel(nPos) != NULL_LABEL) { if (searchIt.GetPixel(nPos) < searchIt.GetPixel(hoodCenter)) @@ -1005,7 +1005,7 @@ Segmenter::BuildRetainingWall(InputImageTypePointer img, ImageRegio for (unsigned int i = 0; i < ImageDimension; ++i) { typename ImageRegionType::IndexType idx = region.GetIndex(); // LOW face - typename ImageRegionType::SizeType sz = region.GetSize(); + typename ImageRegionType::SizeType sz = region.GetSize(); sz[i] = 1; ImageRegionType reg; reg.SetIndex(idx); @@ -1051,9 +1051,9 @@ Segmenter::SetOutputImageValues(OutputImageTypePointer img, ImageRe template void Segmenter::MinMax(InputImageTypePointer img, - ImageRegionType region, - InputPixelType & min, - InputPixelType & max) + ImageRegionType region, + InputPixelType & min, + InputPixelType & max) { ImageRegionIterator it(img, region); it.GoToBegin(); @@ -1105,8 +1105,8 @@ Segmenter::MergeFlatRegions(flat_region_table_t & regions, Equivale template void -Segmenter::RelabelImage(OutputImageTypePointer img, - ImageRegionType region, +Segmenter::RelabelImage(OutputImageTypePointer img, + ImageRegionType region, EquivalencyTable::Pointer eqTable) { eqTable->Flatten(); @@ -1130,7 +1130,7 @@ Segmenter::Threshold(InputImageTypePointer destination, InputImageTypePointer source, const ImageRegionType source_region, const ImageRegionType destination_region, - InputPixelType threshold) + InputPixelType threshold) { ImageRegionIterator dIt(destination, destination_region); ImageRegionIterator sIt(source, source_region); @@ -1225,7 +1225,7 @@ Segmenter::UpdateOutputInformation() Superclass::UpdateOutputInformation(); // get pointers to the input and output - const typename InputImageType::Pointer inputPtr = this->GetInputImage(); + const typename InputImageType::Pointer inputPtr = this->GetInputImage(); const typename OutputImageType::Pointer outputPtr = this->GetOutputImage(); if (!inputPtr || !outputPtr) @@ -1234,10 +1234,10 @@ Segmenter::UpdateOutputInformation() } // we need to compute the output spacing, the output image size, and the // output image start index - const typename InputImageType::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); + const typename InputImageType::SizeType & inputSize = inputPtr->GetLargestPossibleRegion().GetSize(); const typename InputImageType::IndexType & inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex(); - typename OutputImageType::SizeType outputSize; + typename OutputImageType::SizeType outputSize; typename OutputImageType::IndexType outputStartIndex; for (i = 0; i < OutputImageType::ImageDimension; ++i) @@ -1259,7 +1259,7 @@ Segmenter::GenerateInputRequestedRegion() Superclass::GenerateInputRequestedRegion(); // get pointers to the input and output - const typename InputImageType::Pointer inputPtr = this->GetInputImage(); + const typename InputImageType::Pointer inputPtr = this->GetInputImage(); const typename OutputImageType::Pointer outputPtr = this->GetOutputImage(); if (!inputPtr || !outputPtr) diff --git a/Modules/Segmentation/Watersheds/src/itkOneWayEquivalencyTable.cxx b/Modules/Segmentation/Watersheds/src/itkOneWayEquivalencyTable.cxx index f5cd12fc95d..ec9e45312c5 100644 --- a/Modules/Segmentation/Watersheds/src/itkOneWayEquivalencyTable.cxx +++ b/Modules/Segmentation/Watersheds/src/itkOneWayEquivalencyTable.cxx @@ -63,7 +63,7 @@ OneWayEquivalencyTable::RecursiveLookup(const unsigned long a) const unsigned long last_ans = a; ConstIterator it; - auto hashEnd = m_HashMap.end(); + auto hashEnd = m_HashMap.end(); while ((it = m_HashMap.find(ans)) != hashEnd) { diff --git a/Modules/Segmentation/Watersheds/test/itkIsolatedWatershedImageFilterTest.cxx b/Modules/Segmentation/Watersheds/test/itkIsolatedWatershedImageFilterTest.cxx index c726a165bac..3e8678d6dc8 100644 --- a/Modules/Segmentation/Watersheds/test/itkIsolatedWatershedImageFilterTest.cxx +++ b/Modules/Segmentation/Watersheds/test/itkIsolatedWatershedImageFilterTest.cxx @@ -70,7 +70,7 @@ itkIsolatedWatershedImageFilterTest(int argc, char * argv[]) const ImageType::Pointer inputImage = reader->GetOutput(); const ImageType::RegionType region = inputImage->GetLargestPossibleRegion(); - auto offset = ImageType::IndexType::Filled(10); + auto offset = ImageType::IndexType::Filled(10); seed1[0] = region.GetUpperIndex()[0] + offset[0]; filter->SetSeed1(seed1); diff --git a/Modules/Segmentation/Watersheds/test/itkMorphologicalWatershedFromMarkersImageFilterTest.cxx b/Modules/Segmentation/Watersheds/test/itkMorphologicalWatershedFromMarkersImageFilterTest.cxx index 50e339a4d9c..a550beae961 100644 --- a/Modules/Segmentation/Watersheds/test/itkMorphologicalWatershedFromMarkersImageFilterTest.cxx +++ b/Modules/Segmentation/Watersheds/test/itkMorphologicalWatershedFromMarkersImageFilterTest.cxx @@ -74,7 +74,7 @@ itkMorphologicalWatershedFromMarkersImageFilterTest(int argc, char * argv[]) ITK_TRY_EXPECT_NO_EXCEPTION(reader->Update()); - ImageType::RegionType region = reader->GetOutput()->GetLargestPossibleRegion(); + ImageType::RegionType region = reader->GetOutput()->GetLargestPossibleRegion(); ImageType::RegionType::SizeType size = region.GetSize(); for (unsigned int i = 0; i < size.GetSizeDimension(); ++i) { diff --git a/Modules/Video/BridgeOpenCV/include/itkOpenCVImageBridge.h b/Modules/Video/BridgeOpenCV/include/itkOpenCVImageBridge.h index 189f83d088c..31cc7b0e6c6 100644 --- a/Modules/Video/BridgeOpenCV/include/itkOpenCVImageBridge.h +++ b/Modules/Video/BridgeOpenCV/include/itkOpenCVImageBridge.h @@ -220,12 +220,12 @@ class OpenCVImageBridge template static void - ITKConvertImageBuffer(const char * in, + ITKConvertImageBuffer(const char * in, TOutputImageType * out, - unsigned int inChannels, - int imgWidth, - int imgHeight, - int widthStep) + unsigned int inChannels, + int imgWidth, + int imgHeight, + int widthStep) { using ImageType = TOutputImageType; using OutputPixelType = typename ImageType::PixelType; @@ -233,10 +233,10 @@ class OpenCVImageBridge bool isVectorImage(strcmp(out->GetNameOfClass(), "VectorImage") == 0); - typename ImageType::RegionType region; - typename ImageType::RegionType::SizeType size; + typename ImageType::RegionType region; + typename ImageType::RegionType::SizeType size; typename ImageType::RegionType::IndexType start; - typename ImageType::SpacingType spacing; + typename ImageType::SpacingType spacing; size.Fill(1); size[0] = imgWidth; size[1] = imgHeight; @@ -247,8 +247,8 @@ class OpenCVImageBridge out->SetRegions(region); out->SetSpacing(spacing); out->Allocate(); - size_t lineLength = imgWidth * inChannels * sizeof(TPixel); - auto * unpaddedBuffer = reinterpret_cast(new TPixel[imgHeight * lineLength]); + size_t lineLength = imgWidth * inChannels * sizeof(TPixel); + auto * unpaddedBuffer = reinterpret_cast(new TPixel[imgHeight * lineLength]); unsigned int paddedBufPos = 0; unsigned int unpaddedBufPos = 0; diff --git a/Modules/Video/BridgeOpenCV/include/itkOpenCVImageBridge.hxx b/Modules/Video/BridgeOpenCV/include/itkOpenCVImageBridge.hxx index 7e0b82620cf..32eb0e7cac1 100644 --- a/Modules/Video/BridgeOpenCV/include/itkOpenCVImageBridge.hxx +++ b/Modules/Video/BridgeOpenCV/include/itkOpenCVImageBridge.hxx @@ -139,7 +139,7 @@ OpenCVImageBridge::ITKImageToIplImage(const TInputImageType * in, bool force3Cha } typename ImageType::RegionType region = in->GetLargestPossibleRegion(); - typename ImageType::SizeType size = region.GetSize(); + typename ImageType::SizeType size = region.GetSize(); if (ImageType::ImageDimension > 2) { @@ -169,7 +169,7 @@ OpenCVImageBridge::ITKImageToIplImage(const TInputImageType * in, bool force3Cha } // Set up the output image - IplImage * out; + IplImage * out; unsigned int w = static_cast(size[0]); unsigned int h = static_cast(size[1]); @@ -284,7 +284,7 @@ OpenCVImageBridge::ITKImageToCVMat(const TInputImageType * in, bool force3Channe } typename ImageType::RegionType region = in->GetLargestPossibleRegion(); - typename ImageType::SizeType size = region.GetSize(); + typename ImageType::SizeType size = region.GetSize(); if (ImageType::ImageDimension > 2) { @@ -311,7 +311,7 @@ OpenCVImageBridge::ITKImageToCVMat(const TInputImageType * in, bool force3Channe unsigned int outChannels = inChannels; // Set up the output image - Mat tmp; + Mat tmp; unsigned int w = static_cast(size[0]); unsigned int h = static_cast(size[1]); diff --git a/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoCapture.h b/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoCapture.h index 4c8ebe8a294..36bfb64ebdf 100644 --- a/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoCapture.h +++ b/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoCapture.h @@ -140,7 +140,7 @@ class ITK_TEMPLATE_EXPORT OpenCVVideoCapture : public cv::VideoCapture /** Property members */ double m_FpS{}; - int m_FourCC{}; + int m_FourCC{}; }; // end class VideoCapture diff --git a/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoCapture.hxx b/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoCapture.hxx index 1ee85d446a0..aecd0957d71 100644 --- a/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoCapture.hxx +++ b/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoCapture.hxx @@ -148,7 +148,7 @@ OpenCVVideoCapture::retrieve(cv::Mat & image, int itkNotUsed(chann // Get the requested frame SizeValueType frameNum = m_VideoStream->GetRequestedTemporalRegion().GetFrameStart(); - FrameType * frame = m_VideoStream->GetFrame(frameNum); + FrameType * frame = m_VideoStream->GetFrame(frameNum); // Make sure frame isn't null if (!frame) @@ -159,9 +159,9 @@ OpenCVVideoCapture::retrieve(cv::Mat & image, int itkNotUsed(chann // Instantiate the cv::Mat with the proper size and type typename FrameType::SizeType size = frame->GetLargestPossibleRegion().GetSize(); - unsigned int depth = cv::DataDepth::ValueType>::value; - unsigned int channels = itk::NumericTraits::MeasurementVectorType::Dimension; - int matrixType = CV_MAKETYPE(depth, channels); + unsigned int depth = cv::DataDepth::ValueType>::value; + unsigned int channels = itk::NumericTraits::MeasurementVectorType::Dimension; + int matrixType = CV_MAKETYPE(depth, channels); // Copy the pixels -- There is probably a faster way to do this using ITKIterType = itk::ImageRegionConstIteratorWithIndex; @@ -247,10 +247,10 @@ OpenCVVideoCapture::set(int propId, double value) } // Variables for use in cases - SizeValueType maxFrame; - SizeValueType nextFrame; - SizeValueType ratioFrameOffset; - SizeValueType newFrame; + SizeValueType maxFrame; + SizeValueType nextFrame; + SizeValueType ratioFrameOffset; + SizeValueType newFrame; TemporalRegion largestPossible; TemporalRegion newRequest; @@ -341,8 +341,8 @@ OpenCVVideoCapture::get(int propId) } // Variables for use in cases - SizeValueType frameNum = m_VideoStream->GetRequestedTemporalRegion().GetFrameStart(); - SizeValueType currentOffset; + SizeValueType frameNum = m_VideoStream->GetRequestedTemporalRegion().GetFrameStart(); + SizeValueType currentOffset; TemporalRegion largest; TemporalRegion requested; diff --git a/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoIO.h b/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoIO.h index f2bea3588c9..3e4c90663bb 100644 --- a/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoIO.h +++ b/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoIO.h @@ -164,11 +164,11 @@ class ITKVideoBridgeOpenCV_EXPORT OpenCVVideoIO : public VideoIOBase /** Set Writer parameters. */ virtual void - SetWriterParameters(TemporalRatioType fps, + SetWriterParameters(TemporalRatioType fps, const std::vector & dim, - const char * fourCC, - unsigned int nChannels, - IOComponentEnum componentType); + const char * fourCC, + unsigned int nChannels, + IOComponentEnum componentType); protected: OpenCVVideoIO(); @@ -195,11 +195,11 @@ class ITKVideoBridgeOpenCV_EXPORT OpenCVVideoIO : public VideoIOBase private: private: - IplImage * m_CVImage{}; - IplImage * m_TempImage{}; - CvCapture * m_Capture{}; + IplImage * m_CVImage{}; + IplImage * m_TempImage{}; + CvCapture * m_Capture{}; CvVideoWriter * m_Writer{}; - int m_FourCC{}; + int m_FourCC{}; int m_CameraIndex{}; }; diff --git a/Modules/Video/BridgeOpenCV/src/itkOpenCVVideoIO.cxx b/Modules/Video/BridgeOpenCV/src/itkOpenCVVideoIO.cxx index 33fa58facf7..35919f4cdc5 100644 --- a/Modules/Video/BridgeOpenCV/src/itkOpenCVVideoIO.cxx +++ b/Modules/Video/BridgeOpenCV/src/itkOpenCVVideoIO.cxx @@ -140,7 +140,7 @@ OpenCVVideoIO::CanReadFile(const char * filename) // Note: For now we only allow avi format, but this isn't right. We need to // support all formats that OpenCV does (which I believe is some subset // of all the formats that ffmpeg supports) - bool extensionFound = false; + bool extensionFound = false; std::string::size_type extPos = fname.rfind(".avi"); if (extPos != std::string::npos && extPos == fname.length() - 4) { @@ -190,7 +190,7 @@ OpenCVVideoIO::ReadImageInformation() // Set up a local capture and image CvCapture * localCapture; - IplImage * tempImage; + IplImage * tempImage; // Open capture from a file if (this->m_ReadFrom == ReadFromEnum::ReadFromFile) @@ -400,7 +400,7 @@ OpenCVVideoIO::CanWriteFile(const char * filename) // Note: For now we only allow avi format, but this isn't right. We need to // support all formats that OpenCV does (which I believe is some subset // of all the formats that ffmpeg supports) - bool extensionFound = false; + bool extensionFound = false; std::string::size_type extPos = fname.rfind(".avi"); if (extPos != std::string::npos && extPos == fname.length() - 4) { @@ -427,11 +427,11 @@ OpenCVVideoIO::WriteImageInformation() } void -OpenCVVideoIO::SetWriterParameters(TemporalRatioType fps, +OpenCVVideoIO::SetWriterParameters(TemporalRatioType fps, const std::vector & dim, - const char * fourCC, - unsigned int nChannels, - IOComponentEnum componentType) + const char * fourCC, + unsigned int nChannels, + IOComponentEnum componentType) { if (this->m_ReaderOpen || this->m_WriterOpen) { diff --git a/Modules/Video/BridgeOpenCV/test/itkOpenCVBasicTypeBridgeTest.cxx b/Modules/Video/BridgeOpenCV/test/itkOpenCVBasicTypeBridgeTest.cxx index 59e4541ef70..89b8f85466b 100644 --- a/Modules/Video/BridgeOpenCV/test/itkOpenCVBasicTypeBridgeTest.cxx +++ b/Modules/Video/BridgeOpenCV/test/itkOpenCVBasicTypeBridgeTest.cxx @@ -26,7 +26,7 @@ Point2ConversionTest() using ITKPoint2fType = itk::Point; using ITKPoint2dType = itk::Point; - cv::Point cvA(1, 2); + cv::Point cvA(1, 2); cv::Point2f cvB(0.1, 0.2); cv::Point2d cvC(-0.4, 3.2); @@ -175,7 +175,7 @@ MatrixConversionTest() using CVMatrixType = cv::Matx; CVMatrixType cvA; - int k = 1; + int k = 1; for (unsigned int i = 0; i < NumberOfRows; ++i) { for (unsigned int j = 0; j < NumberOfColumns; ++j) @@ -448,7 +448,7 @@ MatrixConversionTest() using CVMatrixType = cv::Matx; ITKMatrixType itkA; - int k = 1; + int k = 1; for (unsigned int i = 0; i < NumberOfRows; ++i) { for (unsigned int j = 0; j < NumberOfColumns; ++j) diff --git a/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeGrayScaleTest.cxx b/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeGrayScaleTest.cxx index 87decda1148..7de6ddb389b 100644 --- a/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeGrayScaleTest.cxx +++ b/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeGrayScaleTest.cxx @@ -156,7 +156,7 @@ itkOpenCVImageBridgeTestTemplatedScalar(char * argv) // check results of itk::Image -> IplImage IplImage * dataConvertedInIpl = ConvertIplImageDataType(inIpl); - double itkIplDiff = cvNorm(outIpl, dataConvertedInIpl); + double itkIplDiff = cvNorm(outIpl, dataConvertedInIpl); if (itkIplDiff != 0.0) { @@ -189,7 +189,7 @@ itkOpenCVImageBridgeTestTemplatedScalar(char * argv) // check results of itk::Image -> IplImage IplImage outMatAsIpl = cvIplImage(outMat); - double itkMatDiff = cvNorm(&outMatAsIpl, dataConvertedInIpl); + double itkMatDiff = cvNorm(&outMatAsIpl, dataConvertedInIpl); if (itkMatDiff != 0.0) { std::cerr << "Images didn't match for pixel type " << typeid(PixelType).name() << " for ITK -> cv::Mat (scalar)" diff --git a/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeRGBTest.cxx b/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeRGBTest.cxx index 58df7464bd2..d96447843d3 100644 --- a/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeRGBTest.cxx +++ b/Modules/Video/BridgeOpenCV/test/itkOpenCVImageBridgeRGBTest.cxx @@ -179,7 +179,7 @@ itkOpenCVImageBridgeTestTemplatedRGB(char * argv0, char * argv1) } // Test cv::Mat -> itk::Image - cv::Mat inMat = cv::imread(argv0); + cv::Mat inMat = cv::imread(argv0); typename ImageType::Pointer outMatITK = itk::OpenCVImageBridge::CVMatToITKImage(inMat); ComponentType itkCvMatDiff = RGBImageTotalAbsDifference(baselineImage, outMatITK); @@ -216,7 +216,7 @@ itkOpenCVImageBridgeTestTemplatedRGB(char * argv0, char * argv1) // check results of itk::Image -> IplImage IplImage outMatAsIpl = cvIplImage(outMat); - double itkMatDiff = cvNorm(&outMatAsIpl, dataConvertedInIpl); + double itkMatDiff = cvNorm(&outMatAsIpl, dataConvertedInIpl); if (itkMatDiff != 0.0) { std::cerr << "Images didn't match for pixel type " << typeid(PixelType).name() << " for ITK -> cv::Mat (RGB)" diff --git a/Modules/Video/BridgeOpenCV/test/itkOpenCVTestHelper.cxx b/Modules/Video/BridgeOpenCV/test/itkOpenCVTestHelper.cxx index 451d43d4669..337228c3924 100644 --- a/Modules/Video/BridgeOpenCV/test/itkOpenCVTestHelper.cxx +++ b/Modules/Video/BridgeOpenCV/test/itkOpenCVTestHelper.cxx @@ -38,9 +38,9 @@ cvLoadImage(const char * filename, int iscolor) { CV_16U, IPL_DEPTH_16U }, { CV_16S, IPL_DEPTH_16S }, { CV_32S, IPL_DEPTH_32S }, { CV_32F, IPL_DEPTH_32F }, { CV_64F, IPL_DEPTH_64F } }; - cv::Mat mat = cv::imread(filename, iscolor); - IplImage * ipl = cvCreateImage(cvSize(mat.cols, mat.rows), matDepthToIplDepth[mat.depth()], mat.channels()); - IplImage iplTemp = cvIplImage(mat); + cv::Mat mat = cv::imread(filename, iscolor); + IplImage * ipl = cvCreateImage(cvSize(mat.cols, mat.rows), matDepthToIplDepth[mat.depth()], mat.channels()); + IplImage iplTemp = cvIplImage(mat); cvCopy(&iplTemp, ipl); return ipl; } diff --git a/Modules/Video/BridgeOpenCV/test/itkOpenCVVideoIOTest.cxx b/Modules/Video/BridgeOpenCV/test/itkOpenCVVideoIOTest.cxx index 33e3dbabafb..9808e25b1ab 100644 --- a/Modules/Video/BridgeOpenCV/test/itkOpenCVVideoIOTest.cxx +++ b/Modules/Video/BridgeOpenCV/test/itkOpenCVVideoIOTest.cxx @@ -39,15 +39,15 @@ itkImageFromBuffer(itk::OpenCVVideoIO::Pointer opencvIO, void * buffer, size_t b { // Set up for incoming image ImageType::RegionType region; - ImageType::SizeType size; - ImageType::IndexType start; + ImageType::SizeType size; + ImageType::IndexType start; size[0] = opencvIO->GetDimensions(0); size[1] = opencvIO->GetDimensions(1); start.Fill(0); region.SetIndex(start); region.SetSize(size); - ImageType::PointType origin; + ImageType::PointType origin; ImageType::SpacingType space; origin.Fill(0.0); space.Fill(1.0); // May need fixing @@ -95,7 +95,7 @@ readCorrectly(itk::OpenCVVideoIO::Pointer opencvIO, CvCapture * capture, FrameOf // Set up the buffer for the frame data itk::SizeValueType bufferSize = opencvIO->GetImageSizeInBytes(); - PixelType * buffer = new PixelType[bufferSize]; + PixelType * buffer = new PixelType[bufferSize]; // Read the frame data opencvIO->Read(static_cast(buffer)); @@ -170,8 +170,8 @@ videosMatch(char * file1, char * file2) // Loop through each frame and compare the buffer for exact match itk::SizeValueType bufferSize = io1->GetImageSizeInBytes(); - PixelType * buffer1 = new PixelType[bufferSize]; - PixelType * buffer2 = new PixelType[bufferSize]; + PixelType * buffer1 = new PixelType[bufferSize]; + PixelType * buffer2 = new PixelType[bufferSize]; for (unsigned int i = 0; i < io1->GetFrameTotal(); ++i) { io1->Read(reinterpret_cast(buffer1)); @@ -199,14 +199,14 @@ videosMatch(char * file1, char * file2) // [Num Frames] [FpS] int -test_OpenCVVideoIO(char * input, - char * nonVideoInput, - char * output, - char * cameraOutput, - unsigned int inWidth, - unsigned int inHeight, +test_OpenCVVideoIO(char * input, + char * nonVideoInput, + char * output, + char * cameraOutput, + unsigned int inWidth, + unsigned int inHeight, FrameOffsetType inNumFrames, - double inFpS) + double inFpS) { int ret = EXIT_SUCCESS; @@ -248,7 +248,7 @@ test_OpenCVVideoIO(char * input, opencvIO->SetFileName(input); opencvIO->ReadImageInformation(); - bool infoSet = true; + bool infoSet = true; std::stringstream paramMessage; if (opencvIO->GetDimensions(0) != inWidth) { @@ -309,7 +309,7 @@ test_OpenCVVideoIO(char * input, // Set up the buffer for the frame data so Read can be called itk::SizeValueType bufferSize = opencvIO->GetImageSizeInBytes(); - PixelType * buffer = new PixelType[bufferSize]; + PixelType * buffer = new PixelType[bufferSize]; // try seeking to an I-Frame // seekFrame is 0-based index of the frame to be captured next @@ -359,7 +359,7 @@ test_OpenCVVideoIO(char * input, } // Save the current parameters - double fps = opencvIO->GetFramesPerSecond(); + double fps = opencvIO->GetFramesPerSecond(); unsigned int width = opencvIO->GetDimensions(0); unsigned int height = opencvIO->GetDimensions(1); const char * fourCC = "MP42"; @@ -397,7 +397,7 @@ test_OpenCVVideoIO(char * input, // Set up buffer for camera itk::SizeValueType camBufferSize = opencvIO->GetImageSizeInBytes(); - PixelType * camBuffer = new PixelType[camBufferSize]; + PixelType * camBuffer = new PixelType[camBufferSize]; // Read from the camera try @@ -490,7 +490,7 @@ test_OpenCVVideoIO(char * input, { // Set up a buffer to read to itk::SizeValueType bufferSizeT = opencvIO2->GetImageSizeInBytes(); - PixelType * bufferT = new PixelType[bufferSizeT]; + PixelType * bufferT = new PixelType[bufferSizeT]; // Read into the buffer opencvIO2->Read(static_cast(bufferT)); diff --git a/Modules/Video/BridgeVXL/include/itkVXLVideoIO.h b/Modules/Video/BridgeVXL/include/itkVXLVideoIO.h index 7d031d7cb19..5bf314f05f2 100644 --- a/Modules/Video/BridgeVXL/include/itkVXLVideoIO.h +++ b/Modules/Video/BridgeVXL/include/itkVXLVideoIO.h @@ -142,11 +142,11 @@ class VXLVideoIO : public VideoIOBase /** Set Writer Parameters */ void - SetWriterParameters(TemporalRatioType fps, + SetWriterParameters(TemporalRatioType fps, const std::vector & dim, - const char * fourCC, - unsigned int nChannels, - IOComponentEnum componentType) override; + const char * fourCC, + unsigned int nChannels, + IOComponentEnum componentType) override; protected: VXLVideoIO(); @@ -190,10 +190,10 @@ class VXLVideoIO : public VideoIOBase private: /** Member Variables */ - vidl_pixel_format m_PixelFormat{}; - vidl_frame_sptr m_VIDLFrame{}; - vidl_ffmpeg_istream * m_Reader{}; - vidl_ffmpeg_ostream * m_Writer{}; + vidl_pixel_format m_PixelFormat{}; + vidl_frame_sptr m_VIDLFrame{}; + vidl_ffmpeg_istream * m_Reader{}; + vidl_ffmpeg_ostream * m_Writer{}; vidl_ffmpeg_ostream_params::encoder_type m_Encoder{}; diff --git a/Modules/Video/BridgeVXL/include/vidl_itk_istream.hxx b/Modules/Video/BridgeVXL/include/vidl_itk_istream.hxx index 9b65f6ee2df..f8615d59ff8 100644 --- a/Modules/Video/BridgeVXL/include/vidl_itk_istream.hxx +++ b/Modules/Video/BridgeVXL/include/vidl_itk_istream.hxx @@ -295,12 +295,12 @@ vidl_itk_istream::advance() // We re-implement seeking forward because we want to be able to advance even // if the duration is infinite (and hence the video isn't seekable) - TemporalRegion currentRequest = m_VideoStream->GetRequestedTemporalRegion(); + TemporalRegion currentRequest = m_VideoStream->GetRequestedTemporalRegion(); FrameOffsetType currentFrame = currentRequest.GetFrameStart(); // we can't advance if we're at the end itk::IdentifierType firstFrame = m_VideoStream->GetLargestPossibleTemporalRegion().GetFrameStart(); - FrameOffsetType frameDuration = m_VideoStream->GetLargestPossibleTemporalRegion().GetFrameDuration(); + FrameOffsetType frameDuration = m_VideoStream->GetLargestPossibleTemporalRegion().GetFrameDuration(); if (frameDuration == 0 || currentFrame >= firstFrame + frameDuration - 2) { return false; diff --git a/Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx b/Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx index 8f334423d85..f82e8b32a27 100644 --- a/Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx +++ b/Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx @@ -209,7 +209,7 @@ VXLVideoIO::CanReadFile(const char * filename) // Note: For now we only allow avi format, but this isn't right. We need to // support all formats that vxl does (which I believe is some subset // of all the formats that ffmpeg supports) - bool extensionFound = false; + bool extensionFound = false; std::string::size_type extPos = fname.rfind(".avi"); if (extPos != std::string::npos && extPos == fname.length() - 4) { @@ -454,7 +454,7 @@ VXLVideoIO::CanWriteFile(const char * filename) // Note: For now we only allow avi format, but this isn't right. We need to // support all formats that vxl does (which I believe is some subset // of all the formats that ffmpeg supports) - bool extensionFound = false; + bool extensionFound = false; std::string::size_type extPos = fname.rfind(".avi"); if (extPos != std::string::npos && extPos == fname.length() - 4) { @@ -487,11 +487,11 @@ VXLVideoIO::WriteImageInformation() // SetWriterParameters // void -VXLVideoIO::SetWriterParameters(TemporalRatioType fps, +VXLVideoIO::SetWriterParameters(TemporalRatioType fps, const std::vector & dim, - const char * fourCC, - unsigned int nChannels, - IOComponentEnum componentType) + const char * fourCC, + unsigned int nChannels, + IOComponentEnum componentType) { if (this->m_ReaderOpen || this->m_WriterOpen) { diff --git a/Modules/Video/BridgeVXL/test/itkVXLVideoIOTest.cxx b/Modules/Video/BridgeVXL/test/itkVXLVideoIOTest.cxx index c5c4866351c..c65b99aaa1d 100644 --- a/Modules/Video/BridgeVXL/test/itkVXLVideoIOTest.cxx +++ b/Modules/Video/BridgeVXL/test/itkVXLVideoIOTest.cxx @@ -37,14 +37,14 @@ itkImageFromBuffer(itk::VXLVideoIO::Pointer vxlIO, void * buffer, size_t bufferS { // Set up for incoming image ImageType::RegionType region; - ImageType::SizeType size; - ImageType::IndexType start; + ImageType::SizeType size; + ImageType::IndexType start; size[0] = vxlIO->GetDimensions(0); size[1] = vxlIO->GetDimensions(1); start.Fill(0); region.SetIndex(start); region.SetSize(size); - ImageType::PointType origin; + ImageType::PointType origin; ImageType::SpacingType space; origin.Fill(0.0); space.Fill(1.0); // May need fixing @@ -72,7 +72,7 @@ readCorrectly(itk::VXLVideoIO::Pointer vxlIO, vidl_ffmpeg_istream * stream, Size bool ret = true; // Set up the buffer for the frame data - size_t bufferSize = vxlIO->GetImageSizeInBytes(); + size_t bufferSize = vxlIO->GetImageSizeInBytes(); PixelType buffer[bufferSize]; // Read the frame data @@ -195,14 +195,14 @@ bool videosMatch(char* file1, char* file2) // [Num Frames] [FpS] int -test_VXLVideoIO(char * input, - char * nonVideoInput, - char * output, - char * cameraOutput, - unsigned int inWidth, - unsigned int inHeight, +test_VXLVideoIO(char * input, + char * nonVideoInput, + char * output, + char * cameraOutput, + unsigned int inWidth, + unsigned int inHeight, SizeValueType inNumFrames, - double inFpS) + double inFpS) { int ret = EXIT_SUCCESS; @@ -245,7 +245,7 @@ test_VXLVideoIO(char * input, vxlIO->SetFileName(input); vxlIO->ReadImageInformation(); - bool infoSet = true; + bool infoSet = true; std::stringstream paramMessage; if (vxlIO->GetDimensions(0) != inWidth) { @@ -310,7 +310,7 @@ test_VXLVideoIO(char * input, // Set up the buffer for the frame data so Read can be called // size_t bufferSize = // vxlIO->GetDimensions(1)*vxlIO->GetDimensions(0)*vxlIO->GetNumberOfComponents()*vxlIO->GetBytesPerPixel(); - size_t bufferSize = vxlIO->GetImageSizeInBytes(); + size_t bufferSize = vxlIO->GetImageSizeInBytes(); PixelType buffer[bufferSize]; @@ -360,7 +360,7 @@ test_VXLVideoIO(char * input, } // Save the current parameters - double fps = vxlIO->GetFramesPerSecond(); + double fps = vxlIO->GetFramesPerSecond(); unsigned int width = vxlIO->GetDimensions(0); unsigned int height = vxlIO->GetDimensions(1); const char * fourCC = "MP42"; @@ -399,7 +399,7 @@ test_VXLVideoIO(char * input, // set up buffer for camera // size_t camBufferSize = vxlIO->GetDimensions(1)*vxlIO->GetDimensions(0)* // vxlIO->GetNumberOfComponents()*vxlIO->GetBytesPerPixel(); - size_t camBufferSize = vxlIO->GetImageSizeInBytes(); + size_t camBufferSize = vxlIO->GetImageSizeInBytes(); PixelType camBuffer[camBufferSize]; // Read from the camera diff --git a/Modules/Video/BridgeVXL/test/vidl_itk_istreamTest.cxx b/Modules/Video/BridgeVXL/test/vidl_itk_istreamTest.cxx index 04e95469f80..0c0c97e2101 100644 --- a/Modules/Video/BridgeVXL/test/vidl_itk_istreamTest.cxx +++ b/Modules/Video/BridgeVXL/test/vidl_itk_istreamTest.cxx @@ -35,7 +35,7 @@ TestFormat(vidl_pixel_format expectedFormat) using StreamType = itk::vidl_itk_istream; StreamType * stream = new StreamType(); - bool out = (stream->format() == expectedFormat); + bool out = (stream->format() == expectedFormat); delete stream; return out; } diff --git a/Modules/Video/Core/include/itkImageToVideoFilter.hxx b/Modules/Video/Core/include/itkImageToVideoFilter.hxx index b1bb79374f4..d494ae9cbb1 100644 --- a/Modules/Video/Core/include/itkImageToVideoFilter.hxx +++ b/Modules/Video/Core/include/itkImageToVideoFilter.hxx @@ -98,11 +98,11 @@ ImageToVideoFilter::GenerateOutputInformation() const InputImageType * input = this->GetInput(); // Get first input frame's largest possible spatial region - const InputImageRegionType inputRegion = input->GetLargestPossibleRegion(); - typename InputImageType::SizeType inputSize = inputRegion.GetSize(); - typename InputImageType::IndexType inputIndex = inputRegion.GetIndex(); + const InputImageRegionType inputRegion = input->GetLargestPossibleRegion(); + typename InputImageType::SizeType inputSize = inputRegion.GetSize(); + typename InputImageType::IndexType inputIndex = inputRegion.GetIndex(); typename InputImageType::SpacingType inputSpacing = input->GetSpacing(); - typename InputImageType::PointType inputOrigin = input->GetOrigin(); + typename InputImageType::PointType inputOrigin = input->GetOrigin(); // Set temporal frame + duration from user-defined frame axis in input image. // Must set temporal region first before spatial metadata can be set for each frame. @@ -116,7 +116,7 @@ ImageToVideoFilter::GenerateOutputInformation() static_cast(inputOrigin[m_FrameAxis]), static_cast(std::fmod(inputOrigin[m_FrameAxis], 1) * 1e6)); - auto realDurationRaw = inputSpacing[m_FrameAxis] * inputSize[m_FrameAxis]; + auto realDurationRaw = inputSpacing[m_FrameAxis] * inputSize[m_FrameAxis]; const RealTimeInterval realDuration( static_cast(realDurationRaw), static_cast(std::fmod(realDurationRaw, 1) * 1e6)); @@ -128,13 +128,13 @@ ImageToVideoFilter::GenerateOutputInformation() // Set the output spatial region from the input image's largest spatial region, // discarding along the user-defined image axis OutputFrameSpatialRegionType outputSpatialRegion; - IndexValueType outputIdx; - IndexValueType inputIdx; + IndexValueType outputIdx; + IndexValueType inputIdx; for (inputIdx = 0, outputIdx = 0; inputIdx < InputImageRegionType::ImageDimension; inputIdx++) { if (inputIdx != m_FrameAxis) { - const SizeValueType axisSize = inputSize[inputIdx]; + const SizeValueType axisSize = inputSize[inputIdx]; const IndexValueType axisStart = inputIndex[inputIdx]; outputSpatialRegion.SetSize(outputIdx, axisSize); outputSpatialRegion.SetIndex(outputIdx, axisStart); @@ -148,7 +148,7 @@ ImageToVideoFilter::GenerateOutputInformation() // Propagate physical spacing and origin typename OutputVideoStreamType::FrameType::SpacingType outputSpacing; - typename OutputVideoStreamType::FrameType::PointType outputOrigin; + typename OutputVideoStreamType::FrameType::PointType outputOrigin; for (inputIdx = 0, outputIdx = 0; inputIdx < InputImageType::ImageDimension; inputIdx++) { if (inputIdx != m_FrameAxis) @@ -161,7 +161,7 @@ ImageToVideoFilter::GenerateOutputInformation() this->GetOutput()->SetAllFramesSpacing(outputSpacing); // Propagate spatial direction - typename InputImageType::DirectionType inputDirection = input->GetDirection(); + typename InputImageType::DirectionType inputDirection = input->GetDirection(); typename OutputVideoStreamType::FrameType::DirectionType outputDirection; for (IndexValueType iinput = 0, ioutput = 0; iinput < InputImageType::ImageDimension; ++iinput) { @@ -262,13 +262,13 @@ ImageToVideoFilter::GenerateData() this->AllocateOutputs(); // Set each frame in output to an image slice in the input image - InputImageType * input = this->GetInput(); + InputImageType * input = this->GetInput(); const InputImageRegionType inputRegion = input->GetLargestPossibleRegion(); // Graft input image slices onto output frames OutputVideoStreamType * output = this->GetOutput(); - const SizeValueType outputStartFrame = output->GetRequestedTemporalRegion().GetFrameStart(); - const SizeValueType outputDuration = output->GetRequestedTemporalRegion().GetFrameDuration(); + const SizeValueType outputStartFrame = output->GetRequestedTemporalRegion().GetFrameStart(); + const SizeValueType outputDuration = output->GetRequestedTemporalRegion().GetFrameDuration(); for (auto idx = outputStartFrame; idx < outputStartFrame + outputDuration; idx++) { InputImageRegionType inputSliceRegion = inputRegion; diff --git a/Modules/Video/Core/include/itkRingBuffer.hxx b/Modules/Video/Core/include/itkRingBuffer.hxx index c0128406d60..a91677e2905 100644 --- a/Modules/Video/Core/include/itkRingBuffer.hxx +++ b/Modules/Video/Core/include/itkRingBuffer.hxx @@ -155,7 +155,7 @@ auto RingBuffer::GetOffsetBufferIndex(OffsetValueType offset) -> OffsetValueType { const OffsetValueType moddedOffset = itk::Math::abs(offset) % this->GetNumberOfBuffers(); - auto signedHeadIndex = static_cast(m_HeadIndex); + auto signedHeadIndex = static_cast(m_HeadIndex); if (offset >= 0) { return (signedHeadIndex + moddedOffset) % this->GetNumberOfBuffers(); diff --git a/Modules/Video/Core/include/itkTemporalDataObject.h b/Modules/Video/Core/include/itkTemporalDataObject.h index 197977d2488..a86c004c521 100644 --- a/Modules/Video/Core/include/itkTemporalDataObject.h +++ b/Modules/Video/Core/include/itkTemporalDataObject.h @@ -46,7 +46,7 @@ class TemporalDataObjectEnums }; // Define how to print enumeration extern ITKVideoCore_EXPORT std::ostream & - operator<<(std::ostream & out, TemporalDataObjectEnums::TemporalUnit value); +operator<<(std::ostream & out, TemporalDataObjectEnums::TemporalUnit value); /** * \class TemporalDataObject diff --git a/Modules/Video/Core/include/itkTemporalRegion.h b/Modules/Video/Core/include/itkTemporalRegion.h index 83430895c1d..48305caaca4 100644 --- a/Modules/Video/Core/include/itkTemporalRegion.h +++ b/Modules/Video/Core/include/itkTemporalRegion.h @@ -119,7 +119,7 @@ class ITKVideoCore_EXPORT TemporalRegion : public Region /** ostream operator */ ITKVideoCore_EXPORT std::ostream & - operator<<(std::ostream & os, const TemporalRegion & region); +operator<<(std::ostream & os, const TemporalRegion & region); } // end namespace itk diff --git a/Modules/Video/Core/include/itkVideoSource.hxx b/Modules/Video/Core/include/itkVideoSource.hxx index 50ebba09f94..333115e7495 100644 --- a/Modules/Video/Core/include/itkVideoSource.hxx +++ b/Modules/Video/Core/include/itkVideoSource.hxx @@ -138,7 +138,7 @@ void VideoSource::GenerateOutputRequestedTemporalRegion(TemporalDataObject * output) { // Check if requested temporal region unset - bool resetNumFrames = false; + bool resetNumFrames = false; const TemporalRegion outputRequest = output->GetRequestedTemporalRegion(); if (!outputRequest.GetFrameDuration()) @@ -250,7 +250,7 @@ template void VideoSource::ThreadedGenerateData( const typename TOutputVideoStream::SpatialRegionType & itkNotUsed(outputRegionForThread), - int itkNotUsed(threadId)) + int itkNotUsed(threadId)) { itkExceptionMacro("itk::ERROR: " << this->GetNameOfClass() << '(' << this << "): " << "Subclass should override this method!!!"); @@ -266,21 +266,21 @@ VideoSource::ThreadedGenerateData( template int VideoSource::SplitRequestedSpatialRegion( - int i, - int num, + int i, + int num, typename TOutputVideoStream::SpatialRegionType & splitRegion) { // Get the output pointer and a pointer to the first output frame OutputVideoStreamType * outputPtr = this->GetOutput(); - const SizeValueType currentFrame = outputPtr->GetRequestedTemporalRegion().GetFrameStart(); - OutputFrameType * framePtr = outputPtr->GetFrame(currentFrame); + const SizeValueType currentFrame = outputPtr->GetRequestedTemporalRegion().GetFrameStart(); + OutputFrameType * framePtr = outputPtr->GetFrame(currentFrame); const typename TOutputVideoStream::SizeType & requestedRegionSize = framePtr->GetRequestedRegion().GetSize(); // Initialize the splitRegion to the output requested region splitRegion = framePtr->GetRequestedRegion(); typename TOutputVideoStream::IndexType splitIndex = splitRegion.GetIndex(); - typename TOutputVideoStream::SizeType splitSize = splitRegion.GetSize(); + typename TOutputVideoStream::SizeType splitSize = splitRegion.GetSize(); // split on the outermost dimension available int splitAxis = framePtr->GetImageDimension() - 1; diff --git a/Modules/Video/Core/include/itkVideoStream.h b/Modules/Video/Core/include/itkVideoStream.h index 3e55bf4096a..f967c5b42fe 100644 --- a/Modules/Video/Core/include/itkVideoStream.h +++ b/Modules/Video/Core/include/itkVideoStream.h @@ -357,9 +357,9 @@ class ITK_TEMPLATE_EXPORT VideoStream : public TemporalDataObject /** These maps cache a mapping between frame number and the meta data for * origin, spacing, direction, and number of components per pixel */ - SpacingMapType m_SpacingCache{}; - DirectionMapType m_DirectionCache{}; - PointMapType m_OriginCache{}; + SpacingMapType m_SpacingCache{}; + DirectionMapType m_DirectionCache{}; + PointMapType m_OriginCache{}; NumberOfComponentsPerPixelMapType m_NumberOfComponentsPerPixelCache{}; }; // end class VideoStream diff --git a/Modules/Video/Core/include/itkVideoStream.hxx b/Modules/Video/Core/include/itkVideoStream.hxx index e5c6ab410df..b8b28059f11 100644 --- a/Modules/Video/Core/include/itkVideoStream.hxx +++ b/Modules/Video/Core/include/itkVideoStream.hxx @@ -24,7 +24,7 @@ namespace itk template void -VideoStream::SetFrameLargestPossibleSpatialRegion(SizeValueType frameNumber, +VideoStream::SetFrameLargestPossibleSpatialRegion(SizeValueType frameNumber, typename TFrameType::RegionType region) { m_LargestPossibleSpatialRegionCache[frameNumber] = region; @@ -52,7 +52,7 @@ VideoStream::GetFrameLargestPossibleSpatialRegion(SizeValueType fram template void -VideoStream::SetFrameRequestedSpatialRegion(SizeValueType frameNumber, +VideoStream::SetFrameRequestedSpatialRegion(SizeValueType frameNumber, typename TFrameType::RegionType region) { m_RequestedSpatialRegionCache[frameNumber] = region; @@ -80,7 +80,7 @@ VideoStream::GetFrameRequestedSpatialRegion(SizeValueType frameNumbe template void -VideoStream::SetFrameBufferedSpatialRegion(SizeValueType frameNumber, +VideoStream::SetFrameBufferedSpatialRegion(SizeValueType frameNumber, typename TFrameType::RegionType region) { m_BufferedSpatialRegionCache[frameNumber] = region; @@ -258,8 +258,8 @@ VideoStream::SetMinimumBufferSize(SizeValueType minimumNumberOfFrame if (m_DataObjectBuffer->GetNumberOfBuffers() < minimumNumberOfFrames) { // Save the indices of all frames in the currently buffered region - const SizeValueType bufferedStart = m_BufferedTemporalRegion.GetFrameStart(); - const SizeValueType bufferedDuration = m_BufferedTemporalRegion.GetFrameDuration(); + const SizeValueType bufferedStart = m_BufferedTemporalRegion.GetFrameStart(); + const SizeValueType bufferedDuration = m_BufferedTemporalRegion.GetFrameDuration(); std::vector frames(bufferedDuration - bufferedStart, nullptr); for (SizeValueType i = bufferedStart; i < bufferedStart + bufferedDuration; ++i) { @@ -299,8 +299,8 @@ VideoStream::InitializeEmptyFrames() { if (!m_DataObjectBuffer->BufferIsFull(i)) { - const FramePointer newFrame = FrameType::New(); - FrameType * newFrameRawPointer = newFrame.GetPointer(); + const FramePointer newFrame = FrameType::New(); + FrameType * newFrameRawPointer = newFrame.GetPointer(); const typename BufferType::ElementPointer element = dynamic_cast(newFrameRawPointer); m_DataObjectBuffer->SetBufferContents(i, element); @@ -364,7 +364,7 @@ VideoStream::GetFrame(SizeValueType frameNumber) -> FrameType * // Fetch the frame const typename BufferType::ElementPointer element = m_DataObjectBuffer->GetBufferContents(frameNumber); - const FramePointer frame = dynamic_cast(element.GetPointer()); + const FramePointer frame = dynamic_cast(element.GetPointer()); return frame; } @@ -374,7 +374,7 @@ auto VideoStream::GetFrame(SizeValueType frameNumber) const -> const FrameType * { const typename BufferType::ElementPointer element = m_DataObjectBuffer->GetBufferContents(frameNumber); - const FrameConstPointer frame = dynamic_cast(element.GetPointer()); + const FrameConstPointer frame = dynamic_cast(element.GetPointer()); return frame; } @@ -414,7 +414,7 @@ template void VideoStream::SetAllLargestPossibleSpatialRegions(typename TFrameType::RegionType region) { - SizeValueType numFrames = m_LargestPossibleTemporalRegion.GetFrameDuration(); + SizeValueType numFrames = m_LargestPossibleTemporalRegion.GetFrameDuration(); const SizeValueType startFrame = m_LargestPossibleTemporalRegion.GetFrameStart(); // If the largest region is infinite, use the largest of the requested or @@ -440,7 +440,7 @@ template void VideoStream::SetAllRequestedSpatialRegions(typename TFrameType::RegionType region) { - SizeValueType numFrames = m_LargestPossibleTemporalRegion.GetFrameDuration(); + SizeValueType numFrames = m_LargestPossibleTemporalRegion.GetFrameDuration(); const SizeValueType startFrame = m_LargestPossibleTemporalRegion.GetFrameStart(); // If the largest region is infinite, use the largest of the requested or @@ -466,7 +466,7 @@ template void VideoStream::SetAllBufferedSpatialRegions(typename TFrameType::RegionType region) { - SizeValueType numFrames = m_LargestPossibleTemporalRegion.GetFrameDuration(); + SizeValueType numFrames = m_LargestPossibleTemporalRegion.GetFrameDuration(); const SizeValueType startFrame = m_LargestPossibleTemporalRegion.GetFrameStart(); // If the largest region is infinite, use the largest of the requested or @@ -492,7 +492,7 @@ template void VideoStream::SetAllFramesSpacing(typename TFrameType::SpacingType spacing) { - SizeValueType numFrames = m_LargestPossibleTemporalRegion.GetFrameDuration(); + SizeValueType numFrames = m_LargestPossibleTemporalRegion.GetFrameDuration(); const SizeValueType startFrame = m_LargestPossibleTemporalRegion.GetFrameStart(); // If the largest region is infinite, use the largest of the requested or @@ -518,7 +518,7 @@ template void VideoStream::SetAllFramesOrigin(typename TFrameType::PointType origin) { - SizeValueType numFrames = m_LargestPossibleTemporalRegion.GetFrameDuration(); + SizeValueType numFrames = m_LargestPossibleTemporalRegion.GetFrameDuration(); const SizeValueType startFrame = m_LargestPossibleTemporalRegion.GetFrameStart(); // If the largest region is infinite, use the largest of the requested or @@ -544,7 +544,7 @@ template void VideoStream::SetAllFramesDirection(typename TFrameType::DirectionType direction) { - SizeValueType numFrames = m_LargestPossibleTemporalRegion.GetFrameDuration(); + SizeValueType numFrames = m_LargestPossibleTemporalRegion.GetFrameDuration(); const SizeValueType startFrame = m_LargestPossibleTemporalRegion.GetFrameStart(); // If the largest region is infinite, use the largest of the requested or @@ -569,7 +569,7 @@ template void VideoStream::SetAllFramesNumberOfComponentsPerPixel(NumberOfComponentsPerPixelType n) { - SizeValueType numFrames = m_LargestPossibleTemporalRegion.GetFrameDuration(); + SizeValueType numFrames = m_LargestPossibleTemporalRegion.GetFrameDuration(); const SizeValueType startFrame = m_LargestPossibleTemporalRegion.GetFrameStart(); // If the largest region is infinite, use the largest of the requested or diff --git a/Modules/Video/Core/include/itkVideoToVideoFilter.hxx b/Modules/Video/Core/include/itkVideoToVideoFilter.hxx index 0d05ead8e85..8e27619d0f0 100644 --- a/Modules/Video/Core/include/itkVideoToVideoFilter.hxx +++ b/Modules/Video/Core/include/itkVideoToVideoFilter.hxx @@ -61,7 +61,7 @@ VideoToVideoFilter::SetInput(const TInput // template void -VideoToVideoFilter::SetInput(unsigned int idx, +VideoToVideoFilter::SetInput(unsigned int idx, const TInputVideoStream * videoStream) { // We keep this const_cast because in actuality, we do want to be able to @@ -107,7 +107,7 @@ VideoToVideoFilter::UpdateOutputInformati const InputVideoStreamType * input = this->GetInput(); // Get first input frame's largest possible spatial region - const SizeValueType firstInputFrameNum = input->GetLargestPossibleTemporalRegion().GetFrameStart(); + const SizeValueType firstInputFrameNum = input->GetLargestPossibleTemporalRegion().GetFrameStart(); const InputFrameSpatialRegionType inputRegion = input->GetFrameLargestPossibleSpatialRegion(firstInputFrameNum); // Propagate this spatial region to output frames @@ -185,7 +185,7 @@ VideoToVideoFilter::GenerateInputRequeste Superclass::GenerateInputRequestedRegion(); // Get the spatial region from the output frame - const SizeValueType outputStart = this->GetOutput()->GetRequestedTemporalRegion().GetFrameStart(); + const SizeValueType outputStart = this->GetOutput()->GetRequestedTemporalRegion().GetFrameStart(); const OutputFrameSpatialRegionType outputRegion = this->GetOutput()->GetFrameRequestedSpatialRegion(outputStart); // Convert to input spatial region (TODO: handle difficult cases) diff --git a/Modules/Video/Core/src/itkTemporalProcessObject.cxx b/Modules/Video/Core/src/itkTemporalProcessObject.cxx index 5b618ace0ef..632749030ba 100644 --- a/Modules/Video/Core/src/itkTemporalProcessObject.cxx +++ b/Modules/Video/Core/src/itkTemporalProcessObject.cxx @@ -70,13 +70,13 @@ void TemporalProcessObject::EnlargeOutputRequestedTemporalRegion(TemporalDataObject * output) { // Get information on output request and current output buffer - TemporalRegion outReqTempRegion = output->GetRequestedTemporalRegion(); + TemporalRegion outReqTempRegion = output->GetRequestedTemporalRegion(); const TemporalRegion outBufTempRegion = output->GetBufferedTemporalRegion(); - const SizeValueType outReqStart = outReqTempRegion.GetFrameStart(); - SizeValueType outReqDuration = outReqTempRegion.GetFrameDuration(); - const SizeValueType outReqEnd = outReqDuration + outReqStart; - const SizeValueType outBufStart = outBufTempRegion.GetFrameStart(); - const SizeValueType outBufEnd = outBufTempRegion.GetFrameDuration() + outBufStart; + const SizeValueType outReqStart = outReqTempRegion.GetFrameStart(); + SizeValueType outReqDuration = outReqTempRegion.GetFrameDuration(); + const SizeValueType outReqEnd = outReqDuration + outReqStart; + const SizeValueType outBufStart = outBufTempRegion.GetFrameStart(); + const SizeValueType outBufEnd = outBufTempRegion.GetFrameDuration() + outBufStart; // If the requested output region is contained in the buffered temporal // region, just return @@ -285,7 +285,7 @@ TemporalProcessObject::UpdateOutputInformation() inputLargestRegion = input->GetLargestPossibleTemporalRegion(); } const OffsetValueType scannableDuration = inputLargestRegion.GetFrameDuration() - m_UnitInputNumberOfFrames + 1; - const SizeValueType outputDuration = + const SizeValueType outputDuration = m_UnitOutputNumberOfFrames * Math::Round(static_cast(scannableDuration - 1) / static_cast(m_FrameSkipPerOutput) + 1); @@ -447,8 +447,8 @@ TemporalProcessObject::GenerateData() // Update the bufferd region information TemporalRegion outputBufferedRegion = output->GetBufferedTemporalRegion(); - SizeValueType bufferedStart = outputBufferedRegion.GetFrameStart(); - SizeValueType bufferedDuration = outputBufferedRegion.GetFrameDuration(); + SizeValueType bufferedStart = outputBufferedRegion.GetFrameStart(); + SizeValueType bufferedDuration = outputBufferedRegion.GetFrameDuration(); // If there is nothing buffered, set the start as well as the duration if (bufferedDuration == 0) diff --git a/Modules/Video/Core/test/itkImageToVideoFilterTest.cxx b/Modules/Video/Core/test/itkImageToVideoFilterTest.cxx index 2d13ec9b5db..dbeeaf4bb3e 100644 --- a/Modules/Video/Core/test/itkImageToVideoFilterTest.cxx +++ b/Modules/Video/Core/test/itkImageToVideoFilterTest.cxx @@ -47,7 +47,7 @@ itkImageToVideoFilterTest(int argc, char * argv[]) using ImageType = itk::Image; // Get 3D image to represent a temporal dataset of 2D frames - const auto inputImage = itk::ReadImage(argv[1]); + const auto inputImage = itk::ReadImage(argv[1]); typename ImageType::DirectionType inputDirection; /* Set input image direction matrix to * 1 0 0 diff --git a/Modules/Video/Core/test/itkTemporalProcessObjectTest.cxx b/Modules/Video/Core/test/itkTemporalProcessObjectTest.cxx index 85be2e7cec5..365ae56fb11 100644 --- a/Modules/Video/Core/test/itkTemporalProcessObjectTest.cxx +++ b/Modules/Video/Core/test/itkTemporalProcessObjectTest.cxx @@ -59,9 +59,9 @@ class CallRecordEnums }; // Define how to print enumeration extern ITKVideoCore_EXPORT std::ostream & - operator<<(std::ostream & out, const CallRecordEnums::RecordType value); +operator<<(std::ostream & out, const CallRecordEnums::RecordType value); extern ITKVideoCore_EXPORT std::ostream & - operator<<(std::ostream & out, const CallRecordEnums::MethodType value); +operator<<(std::ostream & out, const CallRecordEnums::MethodType value); /** Print enum values */ std::ostream & @@ -185,7 +185,7 @@ class CallRecord ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(CallRecord); protected: - SizeValueType m_CallerId; + SizeValueType m_CallerId; RecordTypeEnum m_RecordType; MethodTypeEnum m_MethodType; }; @@ -604,7 +604,7 @@ itkTemporalProcessObjectTest(int, char *[]) // Set up requested region for the end of the pipeline const itk::TemporalRegion endLargestPossibleRegion = tpo3->GetOutput()->GetLargestPossibleTemporalRegion(); - itk::TemporalRegion finalRequest; + itk::TemporalRegion finalRequest; finalRequest.SetFrameStart(endLargestPossibleRegion.GetFrameStart()); finalRequest.SetFrameDuration(1); itk::TemporalProcessObjectTest::DummyTemporalDataObject * finalOutput = tpo3->GetOutput(); @@ -639,7 +639,7 @@ itkTemporalProcessObjectTest(int, char *[]) // Print out duration of buffered output region const itk::TemporalProcessObjectTest::DummyTemporalDataObject::Pointer outputObject = tpo3->GetOutput(); const OffsetValueType outputStart = outputObject->GetBufferedTemporalRegion().GetFrameStart(); - const SizeValueType outputDuration = outputObject->GetBufferedTemporalRegion().GetFrameDuration(); + const SizeValueType outputDuration = outputObject->GetBufferedTemporalRegion().GetFrameDuration(); std::cout << "Buffered Output Region: " << outputStart << "->" << outputStart + outputDuration - 1 << std::endl; // Create a list of CallRecord items representing the correct diff --git a/Modules/Video/Core/test/itkTemporalRegionTest.cxx b/Modules/Video/Core/test/itkTemporalRegionTest.cxx index e0d4d692c3a..91a91399de7 100644 --- a/Modules/Video/Core/test/itkTemporalRegionTest.cxx +++ b/Modules/Video/Core/test/itkTemporalRegionTest.cxx @@ -39,8 +39,8 @@ itkTemporalRegionTest(int, char *[]) constexpr itk::SizeValueType testFrameDuration = 20; // Test time stamps and intervals - const itk::RealTimeStamp stamp0; - itk::RealTimeStamp stamp1 = stamp0; + const itk::RealTimeStamp stamp0; + itk::RealTimeStamp stamp1 = stamp0; const itk::RealTimeInterval oneSecond(1, 0); const itk::RealTimeInterval tenSeconds(10, 0); for (unsigned int i = 0; i < 1000000L; ++i) diff --git a/Modules/Video/Core/test/itkVideoSourceTest.cxx b/Modules/Video/Core/test/itkVideoSourceTest.cxx index b43178f0329..1e25921a402 100644 --- a/Modules/Video/Core/test/itkVideoSourceTest.cxx +++ b/Modules/Video/Core/test/itkVideoSourceTest.cxx @@ -75,7 +75,7 @@ class DummyVideoSource : public VideoSource std::cout << "Working on thread " << threadId << std::endl; this->m_Mutex.unlock(); - OutputVideoStreamType * video = this->GetOutput(); + OutputVideoStreamType * video = this->GetOutput(); const typename OutputVideoStreamType::TemporalRegionType requestedTemporalRegion = video->GetRequestedTemporalRegion(); const SizeValueType startFrame = requestedTemporalRegion.GetFrameStart(); @@ -91,7 +91,7 @@ class DummyVideoSource : public VideoSource for (SizeValueType i = startFrame; i < startFrame + frameDuration; ++i) { - OutputFrameType * frame = video->GetFrame(i); + OutputFrameType * frame = video->GetFrame(i); itk::ImageRegionIterator iter(frame, outputRegionForThread); while (!iter.IsAtEnd()) { @@ -113,8 +113,8 @@ CreateEmptyFrame() { auto out = FrameType::New(); - FrameType::RegionType largestRegion; - FrameType::SizeType sizeLR; + FrameType::RegionType largestRegion; + FrameType::SizeType sizeLR; constexpr FrameType::IndexType startLR{}; sizeLR[0] = 50; sizeLR[1] = 40; @@ -123,8 +123,8 @@ CreateEmptyFrame() out->SetLargestPossibleRegion(largestRegion); FrameType::RegionType requestedRegion; - FrameType::SizeType sizeReq; - auto startReq = FrameType::IndexType::Filled(2); + FrameType::SizeType sizeReq; + auto startReq = FrameType::IndexType::Filled(2); sizeReq[0] = 20; sizeReq[1] = 10; requestedRegion.SetSize(sizeReq); @@ -157,7 +157,7 @@ itkVideoSourceTest(int, char *[]) ////// // Create a VideoStream - auto video = VideoType::New(); + auto video = VideoType::New(); itk::TemporalRegion largestRegion; itk::TemporalRegion requestedRegion; itk::TemporalRegion bufferedRegion; @@ -221,7 +221,7 @@ itkVideoSourceTest(int, char *[]) for (SizeValueType i = frameStart; i < frameStart + numFrames; ++i) { frame = videoSource->GetOutput()->GetFrame(i); - const FrameType::RegionType region = frame->GetRequestedRegion(); + const FrameType::RegionType region = frame->GetRequestedRegion(); itk::ImageRegionIterator iter(frame, region); while (!iter.IsAtEnd()) { @@ -276,7 +276,7 @@ itkVideoSourceTest(int, char *[]) } // Artificially set the output's largest possible temporal region duration - itk::TemporalRegion largestTempRegion = videoSource->GetOutput()->GetLargestPossibleTemporalRegion(); + itk::TemporalRegion largestTempRegion = videoSource->GetOutput()->GetLargestPossibleTemporalRegion(); constexpr unsigned int newNumBuffers = 25; largestTempRegion.SetFrameDuration(newNumBuffers); videoSource->GetOutput()->SetLargestPossibleTemporalRegion(largestTempRegion); diff --git a/Modules/Video/Core/test/itkVideoStreamTest.cxx b/Modules/Video/Core/test/itkVideoStreamTest.cxx index ee04b2056c9..43d32c691fb 100644 --- a/Modules/Video/Core/test/itkVideoStreamTest.cxx +++ b/Modules/Video/Core/test/itkVideoStreamTest.cxx @@ -29,8 +29,8 @@ using SizeValueType = itk::SizeValueType; FrameType::RegionType SetUpSpatialRegion(unsigned int x, unsigned int y) { - FrameType::RegionType out; - FrameType::RegionType::SizeType size; + FrameType::RegionType out; + FrameType::RegionType::SizeType size; FrameType::RegionType::IndexType start; size[0] = x; @@ -163,8 +163,8 @@ itkVideoStreamTest(int, char *[]) // Set the buffered temporal region VideoType::TemporalRegionType temporalRegion; - constexpr SizeValueType startFrame = 0; - constexpr SizeValueType numFrames = 5; + constexpr SizeValueType startFrame = 0; + constexpr SizeValueType numFrames = 5; temporalRegion.SetFrameStart(startFrame); temporalRegion.SetFrameDuration(numFrames); video1->SetLargestPossibleTemporalRegion(temporalRegion); @@ -258,12 +258,12 @@ itkVideoStreamTest(int, char *[]) } // Set the cached meta-data for a non-buffered frame - FrameType::RegionType spatReg; - FrameType::RegionType::SizeType sz; + FrameType::RegionType spatReg; + FrameType::RegionType::SizeType sz; FrameType::RegionType::IndexType start; - FrameType::SpacingType space; - FrameType::PointType orgn; - FrameType::DirectionType direction; + FrameType::SpacingType space; + FrameType::PointType orgn; + FrameType::DirectionType direction; sz[0] = 10; sz[1] = 20; start.Fill(0); diff --git a/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx b/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx index e951bacdb3a..b39b867646e 100644 --- a/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx +++ b/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx @@ -43,8 +43,8 @@ CreateInputFrame(InputPixelType val) { auto out = InputFrameType::New(); - InputFrameType::RegionType largestRegion; - InputFrameType::SizeType sizeLR; + InputFrameType::RegionType largestRegion; + InputFrameType::SizeType sizeLR; constexpr InputFrameType::IndexType startLR{}; sizeLR[0] = 50; sizeLR[1] = 40; @@ -106,15 +106,15 @@ class DummyVideoToVideoFilter : public VideoToVideoFilterGetInput(); - OutputVideoStreamType * output = this->GetOutput(); + OutputVideoStreamType * output = this->GetOutput(); const typename OutputVideoStreamType::TemporalRegionType outReqTempRegion = output->GetRequestedTemporalRegion(); - const SizeValueType outputStart = outReqTempRegion.GetFrameStart(); - const SizeValueType outputDuration = outReqTempRegion.GetFrameDuration(); + const SizeValueType outputStart = outReqTempRegion.GetFrameStart(); + const SizeValueType outputDuration = outReqTempRegion.GetFrameDuration(); const typename InputVideoStreamType::TemporalRegionType inReqTempRegion = input->GetRequestedTemporalRegion(); - const SizeValueType inputStart = inReqTempRegion.GetFrameStart(); - const SizeValueType inputDuration = inReqTempRegion.GetFrameDuration(); + const SizeValueType inputStart = inReqTempRegion.GetFrameStart(); + const SizeValueType inputDuration = inReqTempRegion.GetFrameDuration(); // Print out your threadId std::cout << "Working on thread " << threadId << std::endl; @@ -137,12 +137,12 @@ class DummyVideoToVideoFilter : public VideoToVideoFilterGetFrame(inputStart); - const InputFrameType * inFrame1 = input->GetFrame(inputStart + 1); - OutputFrameType * outFrame = output->GetFrame(outputStart); + const InputFrameType * inFrame0 = input->GetFrame(inputStart); + const InputFrameType * inFrame1 = input->GetFrame(inputStart + 1); + OutputFrameType * outFrame = output->GetFrame(outputStart); itk::ImageRegionConstIterator inIter0(inFrame0, outputRegionForThread); itk::ImageRegionConstIterator inIter1(inFrame1, outputRegionForThread); - itk::ImageRegionIterator outIter(outFrame, outputRegionForThread); + itk::ImageRegionIterator outIter(outFrame, outputRegionForThread); while (!outIter.IsAtEnd()) { // Average input pixel values @@ -176,8 +176,8 @@ itkVideoToVideoFilterTest(int, char *[]) ITK_EXERCISE_BASIC_OBJECT_METHODS(filter, DummyVideoToVideoFilter, VideoToVideoFilter); // Set up an input video stream - auto inputVideo = InputVideoType::New(); - itk::TemporalRegion inputLargestTemporalRegion; + auto inputVideo = InputVideoType::New(); + itk::TemporalRegion inputLargestTemporalRegion; constexpr SizeValueType inputStart = 0; constexpr SizeValueType inputDuration = 10; inputLargestTemporalRegion.SetFrameStart(inputStart); @@ -203,8 +203,8 @@ itkVideoToVideoFilterTest(int, char *[]) // Set up the requested spatial region on the output frames OutputFrameType::RegionType outputRequestedSpatialRegion; - OutputFrameType::SizeType size; - OutputFrameType::IndexType start; + OutputFrameType::SizeType size; + OutputFrameType::IndexType start; size[0] = inputVideo->GetFrame(0)->GetLargestPossibleRegion().GetSize()[0] / 2; size[1] = inputVideo->GetFrame(0)->GetLargestPossibleRegion().GetSize()[1] / 2; start[0] = inputVideo->GetFrame(0)->GetLargestPossibleRegion().GetSize()[0] / 4; @@ -231,10 +231,10 @@ itkVideoToVideoFilterTest(int, char *[]) { std::cout << "Checking frame: " << i << std::endl; - const OutputFrameType * frame = filter->GetOutput()->GetFrame(i); + const OutputFrameType * frame = filter->GetOutput()->GetFrame(i); itk::ImageRegionConstIterator iter(frame, frame->GetRequestedRegion()); - const OutputPixelType expectedVal = ((OutputPixelType)(i)-1.0 + (OutputPixelType)(i)) / 2.0; + const OutputPixelType expectedVal = ((OutputPixelType)(i)-1.0 + (OutputPixelType)(i)) / 2.0; constexpr OutputPixelType epsilon = .00001; while (!iter.IsAtEnd()) { diff --git a/Modules/Video/Filtering/include/itkDecimateFramesVideoFilter.hxx b/Modules/Video/Filtering/include/itkDecimateFramesVideoFilter.hxx index e66fad34b91..c7b544cc818 100644 --- a/Modules/Video/Filtering/include/itkDecimateFramesVideoFilter.hxx +++ b/Modules/Video/Filtering/include/itkDecimateFramesVideoFilter.hxx @@ -81,18 +81,18 @@ DecimateFramesVideoFilter::GetPreservedFrameSpacing() template void DecimateFramesVideoFilter::ThreadedGenerateData(const FrameSpatialRegionType & outputRegionForThread, - int itkNotUsed(threadId)) + int itkNotUsed(threadId)) { // Get the input and output video streams const InputVideoStreamType * input = this->GetInput(); - OutputVideoStreamType * output = this->GetOutput(); + OutputVideoStreamType * output = this->GetOutput(); // Get input and output frame numbers const typename OutputVideoStreamType::TemporalRegionType outReqTempRegion = output->GetRequestedTemporalRegion(); - const SizeValueType outFrameNum = outReqTempRegion.GetFrameStart(); + const SizeValueType outFrameNum = outReqTempRegion.GetFrameStart(); const typename InputVideoStreamType::TemporalRegionType inReqTempRegion = input->GetRequestedTemporalRegion(); - const SizeValueType inFrameNum = inReqTempRegion.GetFrameStart(); + const SizeValueType inFrameNum = inReqTempRegion.GetFrameStart(); // Since we want to support only returning a requested spatial region of the // input frame, we do the pass-through the slow way using iterators rather @@ -101,7 +101,7 @@ DecimateFramesVideoFilter::ThreadedGenerateData(const FrameSpatial // Get iterators for requested region of input and output frames using InputIterType = ImageRegionConstIterator; using OutputIterType = ImageRegionIterator; - InputIterType inIter(input->GetFrame(inFrameNum), outputRegionForThread); + InputIterType inIter(input->GetFrame(inFrameNum), outputRegionForThread); OutputIterType outIter(output->GetFrame(outFrameNum), outputRegionForThread); // Pass the values from input to output diff --git a/Modules/Video/Filtering/include/itkFrameAverageVideoFilter.hxx b/Modules/Video/Filtering/include/itkFrameAverageVideoFilter.hxx index d9103181348..9f151b6ac1c 100644 --- a/Modules/Video/Filtering/include/itkFrameAverageVideoFilter.hxx +++ b/Modules/Video/Filtering/include/itkFrameAverageVideoFilter.hxx @@ -88,20 +88,20 @@ template void FrameAverageVideoFilter::ThreadedGenerateData( const OutputFrameSpatialRegionType & outputRegionForThread, - int itkNotUsed(threadId)) + int itkNotUsed(threadId)) { // Get the input and output video streams const InputVideoStreamType * input = this->GetInput(); - OutputVideoStreamType * output = this->GetOutput(); - const SizeValueType numFrames = this->TemporalProcessObject::m_UnitInputNumberOfFrames; + OutputVideoStreamType * output = this->GetOutput(); + const SizeValueType numFrames = this->TemporalProcessObject::m_UnitInputNumberOfFrames; // Get output frame number const typename OutputVideoStreamType::TemporalRegionType outReqTempRegion = output->GetRequestedTemporalRegion(); - const SizeValueType outputFrameNumber = outReqTempRegion.GetFrameStart(); + const SizeValueType outputFrameNumber = outReqTempRegion.GetFrameStart(); const typename InputVideoStreamType::TemporalRegionType inReqTempRegion = input->GetRequestedTemporalRegion(); - const SizeValueType inputStart = inReqTempRegion.GetFrameStart(); - const SizeValueType inputDuration = inReqTempRegion.GetFrameDuration(); + const SizeValueType inputStart = inReqTempRegion.GetFrameStart(); + const SizeValueType inputDuration = inReqTempRegion.GetFrameDuration(); // Make sure we've got the right duration if (inputDuration != numFrames) @@ -118,7 +118,7 @@ FrameAverageVideoFilter::ThreadedGenerate } // Get the output frame and its iterator - OutputFrameType * outFrame = output->GetFrame(outputFrameNumber); + OutputFrameType * outFrame = output->GetFrame(outputFrameNumber); itk::ImageRegionIterator outIter(outFrame, outputRegionForThread); // Average the input frames at each pixel of the output region diff --git a/Modules/Video/Filtering/include/itkFrameDifferenceVideoFilter.hxx b/Modules/Video/Filtering/include/itkFrameDifferenceVideoFilter.hxx index 5571f9b9daa..3daa7610b76 100644 --- a/Modules/Video/Filtering/include/itkFrameDifferenceVideoFilter.hxx +++ b/Modules/Video/Filtering/include/itkFrameDifferenceVideoFilter.hxx @@ -91,20 +91,20 @@ template void FrameDifferenceVideoFilter::ThreadedGenerateData( const OutputFrameSpatialRegionType & outputRegionForThread, - int itkNotUsed(threadId)) + int itkNotUsed(threadId)) { // Get the input and output video streams const InputVideoStreamType * input = this->GetInput(); - OutputVideoStreamType * output = this->GetOutput(); - const SizeValueType numFrames = this->TemporalProcessObject::m_UnitInputNumberOfFrames; + OutputVideoStreamType * output = this->GetOutput(); + const SizeValueType numFrames = this->TemporalProcessObject::m_UnitInputNumberOfFrames; // Get output frame number const typename OutputVideoStreamType::TemporalRegionType outReqTempRegion = output->GetRequestedTemporalRegion(); - const SizeValueType outputFrameNumber = outReqTempRegion.GetFrameStart(); + const SizeValueType outputFrameNumber = outReqTempRegion.GetFrameStart(); const typename InputVideoStreamType::TemporalRegionType inReqTempRegion = input->GetRequestedTemporalRegion(); - const SizeValueType inputStart = inReqTempRegion.GetFrameStart(); - const SizeValueType inputDuration = inReqTempRegion.GetFrameDuration(); + const SizeValueType inputStart = inReqTempRegion.GetFrameStart(); + const SizeValueType inputDuration = inReqTempRegion.GetFrameDuration(); // Make sure we've got the right duration if (inputDuration != numFrames) @@ -118,7 +118,7 @@ FrameDifferenceVideoFilter::ThreadedGener ConstIterType I1Iter(input->GetFrame(inputStart + numFrames - 1), outputRegionForThread); // Get the output frame and its iterator - OutputFrameType * outFrame = output->GetFrame(outputFrameNumber); + OutputFrameType * outFrame = output->GetFrame(outputFrameNumber); itk::ImageRegionIterator outIter(outFrame, outputRegionForThread); // Average the input frames at each pixel of the output region diff --git a/Modules/Video/Filtering/include/itkImageFilterToVideoFilterWrapper.hxx b/Modules/Video/Filtering/include/itkImageFilterToVideoFilterWrapper.hxx index d888bfe8eb4..166ef01b318 100644 --- a/Modules/Video/Filtering/include/itkImageFilterToVideoFilterWrapper.hxx +++ b/Modules/Video/Filtering/include/itkImageFilterToVideoFilterWrapper.hxx @@ -56,14 +56,14 @@ ImageFilterToVideoFilterWrapper::TemporalStreamingGenerateD // Get the input and output video streams const InputVideoStreamType * input = this->GetInput(); - OutputVideoStreamType * output = this->GetOutput(); + OutputVideoStreamType * output = this->GetOutput(); // Get input and output frame numbers const typename OutputVideoStreamType::TemporalRegionType outReqTempRegion = output->GetRequestedTemporalRegion(); - const SizeValueType outFrameNum = outReqTempRegion.GetFrameStart(); + const SizeValueType outFrameNum = outReqTempRegion.GetFrameStart(); const typename InputVideoStreamType::TemporalRegionType inReqTempRegion = input->GetRequestedTemporalRegion(); - const SizeValueType inFrameNum = inReqTempRegion.GetFrameStart(); + const SizeValueType inFrameNum = inReqTempRegion.GetFrameStart(); // Set up the internal image pipeline m_ImageFilter->SetInput(input->GetFrame(inFrameNum)); diff --git a/Modules/Video/Filtering/test/itkFrameAverageVideoFilterTest.cxx b/Modules/Video/Filtering/test/itkFrameAverageVideoFilterTest.cxx index 944b092bc3c..222086da43c 100644 --- a/Modules/Video/Filtering/test/itkFrameAverageVideoFilterTest.cxx +++ b/Modules/Video/Filtering/test/itkFrameAverageVideoFilterTest.cxx @@ -51,8 +51,8 @@ CreateInputFrame(InputPixelType val) { auto out = InputFrameType::New(); - InputFrameType::RegionType largestRegion; - InputFrameType::SizeType sizeLR; + InputFrameType::RegionType largestRegion; + InputFrameType::SizeType sizeLR; constexpr InputFrameType::IndexType startLR{}; sizeLR[0] = 50; sizeLR[1] = 40; @@ -102,7 +102,7 @@ itkFrameAverageVideoFilterTest(int argc, char * argv[]) // Set up an input VideoStream - auto inputVideo = InputVideoType::New(); + auto inputVideo = InputVideoType::New(); constexpr SizeValueType numInputFrames = 50; inputVideo->SetNumberOfBuffers(numInputFrames); itk::TemporalRegion inputTempRegion; @@ -127,8 +127,8 @@ itkFrameAverageVideoFilterTest(int argc, char * argv[]) // Make sure output largest possible temporal region is correct itk::TemporalRegion outputLargestTempRegion = filter->GetOutput()->GetLargestPossibleTemporalRegion(); - SizeValueType outputStart = outputLargestTempRegion.GetFrameStart(); - SizeValueType outputDuration = outputLargestTempRegion.GetFrameDuration(); + SizeValueType outputStart = outputLargestTempRegion.GetFrameStart(); + SizeValueType outputDuration = outputLargestTempRegion.GetFrameDuration(); if (outputStart != 0) { std::cerr << "output's LargestPossibleTemporalRegion incorrect start. Got: " << outputStart << " Expected: 0" @@ -157,7 +157,7 @@ itkFrameAverageVideoFilterTest(int argc, char * argv[]) // Check the results const OutputPixelType expectedVal = (OutputPixelType)(i + (i + 1)) / 2.0; const OutputPixelType actualVal = filter->GetOutput()->GetFrame(i)->GetPixel(checkPx); - constexpr double eps = 0.00001; + constexpr double eps = 0.00001; if (expectedVal < actualVal - eps || expectedVal > actualVal + eps) { std::cerr << "Filter failed to compute frame " << i << " correctly over 2 frames." << std::endl; @@ -200,7 +200,7 @@ itkFrameAverageVideoFilterTest(int argc, char * argv[]) { const OutputPixelType expectedVal = (OutputPixelType)(i + (i + 1) + (i + 2)) / 3.0; const OutputPixelType actualVal = filter->GetOutput()->GetFrame(i)->GetPixel(checkPx); - constexpr double eps = 0.00001; + constexpr double eps = 0.00001; if (expectedVal < actualVal - eps || expectedVal > actualVal + eps) { std::cerr << "Filter failed to compute frame " << i << " correctly over 3 frames." << std::endl; diff --git a/Modules/Video/Filtering/test/itkFrameDifferenceVideoFilterTest.cxx b/Modules/Video/Filtering/test/itkFrameDifferenceVideoFilterTest.cxx index 2b76b729e9e..b12a99fab11 100644 --- a/Modules/Video/Filtering/test/itkFrameDifferenceVideoFilterTest.cxx +++ b/Modules/Video/Filtering/test/itkFrameDifferenceVideoFilterTest.cxx @@ -51,8 +51,8 @@ CreateInputFrame(InputPixelType val) { auto out = InputFrameType::New(); - InputFrameType::RegionType largestRegion; - InputFrameType::SizeType sizeLR; + InputFrameType::RegionType largestRegion; + InputFrameType::SizeType sizeLR; constexpr InputFrameType::IndexType startLR{}; sizeLR[0] = 50; sizeLR[1] = 40; @@ -91,7 +91,7 @@ itkFrameDifferenceVideoFilterTest(int itkNotUsed(argc), char * itkNotUsed(argv)[ // Set up an input VideoStream - auto inputVideo = InputVideoType::New(); + auto inputVideo = InputVideoType::New(); constexpr SizeValueType numInputFrames = 50; inputVideo->SetNumberOfBuffers(numInputFrames); itk::TemporalRegion inputTempRegion; @@ -115,8 +115,8 @@ itkFrameDifferenceVideoFilterTest(int itkNotUsed(argc), char * itkNotUsed(argv)[ // Make sure output largest possible temporal region is correct itk::TemporalRegion outputLargestTempRegion = filter->GetOutput()->GetLargestPossibleTemporalRegion(); - SizeValueType outputStart = outputLargestTempRegion.GetFrameStart(); - SizeValueType outputDuration = outputLargestTempRegion.GetFrameDuration(); + SizeValueType outputStart = outputLargestTempRegion.GetFrameStart(); + SizeValueType outputDuration = outputLargestTempRegion.GetFrameDuration(); if (outputStart != 0) { std::cerr << "output's LargestPossibleTemporalRegion incorrect start. Got: " << outputStart << " Expected: 0" @@ -144,7 +144,7 @@ itkFrameDifferenceVideoFilterTest(int itkNotUsed(argc), char * itkNotUsed(argv)[ // Check the results constexpr OutputPixelType expectedVal = 1; - const OutputPixelType actualVal = filter->GetOutput()->GetFrame(i)->GetPixel(checkPx); + const OutputPixelType actualVal = filter->GetOutput()->GetFrame(i)->GetPixel(checkPx); if (expectedVal != actualVal) { std::cerr << "Filter failed to compute frame " << i << " correctly for adjacent frames." << std::endl; @@ -186,7 +186,7 @@ itkFrameDifferenceVideoFilterTest(int itkNotUsed(argc), char * itkNotUsed(argv)[ for (unsigned int i = outputStart; i < outputStart + outputDuration; ++i) { constexpr OutputPixelType expectedVal = 4; // Difference of 2 squared - const OutputPixelType actualVal = filter->GetOutput()->GetFrame(i)->GetPixel(checkPx); + const OutputPixelType actualVal = filter->GetOutput()->GetFrame(i)->GetPixel(checkPx); if (expectedVal != actualVal) { std::cerr << "Filter failed to compute frame " << i << " correctly with offset of 2." << std::endl; diff --git a/Modules/Video/IO/include/itkFileListVideoIO.h b/Modules/Video/IO/include/itkFileListVideoIO.h index f8dce2e5959..dcc209bf633 100644 --- a/Modules/Video/IO/include/itkFileListVideoIO.h +++ b/Modules/Video/IO/include/itkFileListVideoIO.h @@ -166,11 +166,11 @@ class ITKVideoIO_EXPORT FileListVideoIO : public VideoIOBase /** Set Writer parameters. */ void - SetWriterParameters(TemporalRatioType framesPerSecond, + SetWriterParameters(TemporalRatioType framesPerSecond, const std::vector & dim, - const char * fourCC, - unsigned int nChannels, - IOComponentEnum componentType) override; + const char * fourCC, + unsigned int nChannels, + IOComponentEnum componentType) override; protected: FileListVideoIO(); diff --git a/Modules/Video/IO/include/itkVideoFileReader.hxx b/Modules/Video/IO/include/itkVideoFileReader.hxx index a57a7859495..7ed3a1d0340 100644 --- a/Modules/Video/IO/include/itkVideoFileReader.hxx +++ b/Modules/Video/IO/include/itkVideoFileReader.hxx @@ -83,9 +83,9 @@ VideoFileReader::UpdateOutputInformation() // // Set up largest possible spatial region - SizeType size; - PointType origin; - SpacingType spacing; + SizeType size; + PointType origin; + SpacingType spacing; DirectionType direction; for (unsigned int i = 0; i < FrameDimension; ++i) { @@ -215,7 +215,7 @@ VideoFileReader::TemporalStreamingGenerateData() this->AllocateOutputs(); // Get the frame number for the frame we're reading - typename VideoStreamType::Pointer output; + typename VideoStreamType::Pointer output; typename VideoStreamType::TemporalRegionType requestedTemporalRegion; output = this->GetOutput(); requestedTemporalRegion = output->GetRequestedTemporalRegion(); @@ -233,7 +233,7 @@ VideoFileReader::TemporalStreamingGenerateData() { // Set up temporary buffer for reading const size_t bufferSize = m_VideoIO->GetImageSizeInBytes(); - const auto loadBuffer = make_unique_for_overwrite(bufferSize); + const auto loadBuffer = make_unique_for_overwrite(bufferSize); // Read into a temporary buffer this->m_VideoIO->Read(static_cast(loadBuffer.get())); @@ -255,7 +255,7 @@ template void VideoFileReader::DoConvertBuffer(const void * inputData, FrameOffsetType frameNumber) { - PixelType * outputData = this->GetOutput()->GetFrame(frameNumber)->GetPixelContainer()->GetBufferPointer(); + PixelType * outputData = this->GetOutput()->GetFrame(frameNumber)->GetPixelContainer()->GetBufferPointer(); const unsigned int numberOfPixels = this->GetOutput()->GetFrame(frameNumber)->GetPixelContainer()->Size(); const bool isVectorImage(strcmp(this->GetOutput()->GetFrame(frameNumber)->GetNameOfClass(), "VectorImage") == 0); #define ITK_CONVERT_BUFFER_IF_BLOCK(_CType, type) \ @@ -292,7 +292,7 @@ VideoFileReader::DoConvertBuffer(const void * inputData, Fra { #define TYPENAME_VideoFileReader(x) m_VideoIO->GetComponentTypeAsString(ImageIOBase::MapPixelType::CType) - ExceptionObject e(__FILE__, __LINE__); + ExceptionObject e(__FILE__, __LINE__); std::ostringstream msg; msg << "Couldn't convert component type: " << std::endl << " " << m_VideoIO->GetComponentTypeAsString(m_VideoIO->GetComponentType()) << std::endl diff --git a/Modules/Video/IO/include/itkVideoFileWriter.h b/Modules/Video/IO/include/itkVideoFileWriter.h index 31fc15199ca..d494a43e3af 100644 --- a/Modules/Video/IO/include/itkVideoFileWriter.h +++ b/Modules/Video/IO/include/itkVideoFileWriter.h @@ -145,11 +145,11 @@ class ITK_TEMPLATE_EXPORT VideoFileWriter : public TemporalProcessObject TemporalRegion m_OutputTemporalRegion{}; /** Parameters for writing. */ - TemporalRatioType m_FramesPerSecond{ 24 }; - std::string m_FourCC{}; + TemporalRatioType m_FramesPerSecond{ 24 }; + std::string m_FourCC{}; std::vector m_Dimensions{}; - SizeValueType m_NumberOfComponents{ 0 }; - IOComponentEnum m_ComponentType{}; + SizeValueType m_NumberOfComponents{ 0 }; + IOComponentEnum m_ComponentType{}; }; } // end namespace itk diff --git a/Modules/Video/IO/include/itkVideoFileWriter.hxx b/Modules/Video/IO/include/itkVideoFileWriter.hxx index 2377477c254..69d6e3087ba 100644 --- a/Modules/Video/IO/include/itkVideoFileWriter.hxx +++ b/Modules/Video/IO/include/itkVideoFileWriter.hxx @@ -217,7 +217,7 @@ VideoFileWriter::TemporalStreamingGenerateData() { // Get a non-const pointer to the input and output const VideoStreamType * const input = this->GetInput(); - auto * output = dynamic_cast(this->GetOutput(0)); + auto * output = dynamic_cast(this->GetOutput(0)); if (!output) { itkExceptionMacro("Could not cast output to TemporalDataObject"); @@ -225,7 +225,7 @@ VideoFileWriter::TemporalStreamingGenerateData() // Get the frame we're going to write const SizeValueType frameNum = output->GetRequestedTemporalRegion().GetFrameStart(); - const FrameType * frame = input->GetFrame(frameNum); + const FrameType * frame = input->GetFrame(frameNum); if (!frame) { itkExceptionMacro("Could not get input frame " << frameNum << " for writing"); diff --git a/Modules/Video/IO/include/itkVideoIOBase.h b/Modules/Video/IO/include/itkVideoIOBase.h index b6c6ac74cfa..cb6f57b78d7 100644 --- a/Modules/Video/IO/include/itkVideoIOBase.h +++ b/Modules/Video/IO/include/itkVideoIOBase.h @@ -45,7 +45,7 @@ class VideoIOBaseEnums }; // Define how to print enumeration extern ITKVideoIO_EXPORT std::ostream & - operator<<(std::ostream & out, const VideoIOBaseEnums::ReadFrom value); +operator<<(std::ostream & out, const VideoIOBaseEnums::ReadFrom value); /** * \class VideoIOBase * \brief Abstract superclass defines video IO interface. @@ -145,11 +145,11 @@ class ITKVideoIO_EXPORT VideoIOBase : public ImageIOBase /** Set Writer Parameters */ virtual void - SetWriterParameters(TemporalRatioType framesPerSecond, + SetWriterParameters(TemporalRatioType framesPerSecond, const std::vector & dim, - const char * fourCC, - unsigned int nChannels, - IOComponentEnum componentType) = 0; + const char * fourCC, + unsigned int nChannels, + IOComponentEnum componentType) = 0; protected: VideoIOBase(); @@ -159,16 +159,16 @@ class ITKVideoIO_EXPORT VideoIOBase : public ImageIOBase PrintSelf(std::ostream & os, Indent indent) const override; /** Member Variables */ - ReadFromEnum m_ReadFrom{ ReadFromEnum::ReadFromFile }; - TemporalRatioType m_FramesPerSecond{ 0.0 }; - FrameOffsetType m_FrameTotal{}; - FrameOffsetType m_CurrentFrame{}; - FrameOffsetType m_IFrameInterval{}; - FrameOffsetType m_LastIFrame{}; - TemporalRatioType m_Ratio{ 0.0 }; + ReadFromEnum m_ReadFrom{ ReadFromEnum::ReadFromFile }; + TemporalRatioType m_FramesPerSecond{ 0.0 }; + FrameOffsetType m_FrameTotal{}; + FrameOffsetType m_CurrentFrame{}; + FrameOffsetType m_IFrameInterval{}; + FrameOffsetType m_LastIFrame{}; + TemporalRatioType m_Ratio{ 0.0 }; TemporalOffsetType m_PositionInMSec{ 0.0 }; - bool m_WriterOpen{ false }; - bool m_ReaderOpen{ false }; + bool m_WriterOpen{ false }; + bool m_ReaderOpen{ false }; }; } // end namespace itk diff --git a/Modules/Video/IO/include/itkVideoIOFactory.h b/Modules/Video/IO/include/itkVideoIOFactory.h index 91989f26b32..2eb168150be 100644 --- a/Modules/Video/IO/include/itkVideoIOFactory.h +++ b/Modules/Video/IO/include/itkVideoIOFactory.h @@ -45,7 +45,7 @@ class VideoIOFactoryEnums }; // Define how to print enumeration extern ITKVideoIO_EXPORT std::ostream & - operator<<(std::ostream & out, const VideoIOFactoryEnums::IOMode value); +operator<<(std::ostream & out, const VideoIOFactoryEnums::IOMode value); /** * \class VideoIOFactory * \brief Create instances of VideoIO objects using an object factory. diff --git a/Modules/Video/IO/src/itkFileListVideoIO.cxx b/Modules/Video/IO/src/itkFileListVideoIO.cxx index 717a5e51627..cb28f5e274f 100644 --- a/Modules/Video/IO/src/itkFileListVideoIO.cxx +++ b/Modules/Video/IO/src/itkFileListVideoIO.cxx @@ -102,7 +102,7 @@ bool FileListVideoIO::CanReadFile(const char * filename) { // Make sure file names have been specified - const std::string strFileName = filename; + const std::string strFileName = filename; std::vector fileList = this->SplitFileNames(strFileName); if (fileList.empty()) { @@ -300,11 +300,11 @@ FileListVideoIO::WriteImageInformation() } void -FileListVideoIO::SetWriterParameters(TemporalRatioType framesPerSecond, +FileListVideoIO::SetWriterParameters(TemporalRatioType framesPerSecond, const std::vector & dim, - const char * itkNotUsed(fourCC), - unsigned int nChannels, - IOComponentEnum itkNotUsed(componentType)) + const char * itkNotUsed(fourCC), + unsigned int nChannels, + IOComponentEnum itkNotUsed(componentType)) { m_Dimensions.clear(); m_Origin.clear(); diff --git a/Modules/Video/IO/test/itkFileListVideoIOTest.cxx b/Modules/Video/IO/test/itkFileListVideoIOTest.cxx index 092a74b7423..a9c51b005f6 100644 --- a/Modules/Video/IO/test/itkFileListVideoIOTest.cxx +++ b/Modules/Video/IO/test/itkFileListVideoIOTest.cxx @@ -30,14 +30,14 @@ using SizeValueType = itk::SizeValueType; int -test_FileListVideoIO(const char * input, - char * nonVideoInput, - char * output, - char * itkNotUsed(cameraOutput), - unsigned int inWidth, - unsigned int inHeight, +test_FileListVideoIO(const char * input, + char * nonVideoInput, + char * output, + char * itkNotUsed(cameraOutput), + unsigned int inWidth, + unsigned int inHeight, SizeValueType inNumFrames, - double inFpS) + double inFpS) { // ITK type alias @@ -84,7 +84,7 @@ test_FileListVideoIO(const char * input, fileListIO->SetFileName(input); fileListIO->ReadImageInformation(); - bool infoSet = true; + bool infoSet = true; std::stringstream paramMessage; if (fileListIO->GetDimensions(0) != inWidth) { @@ -139,7 +139,7 @@ test_FileListVideoIO(const char * input, // Read the image using FileListVideoIO const size_t bufferSize = fileListIO->GetImageSizeInBytes(); - auto * buffer = new PixelType[bufferSize]; + auto * buffer = new PixelType[bufferSize]; fileListIO->Read(static_cast(buffer)); // Compare Spacing, Origin, Direction @@ -185,10 +185,10 @@ test_FileListVideoIO(const char * input, } // Save the current parameters - const double fps = fileListIO->GetFramesPerSecond(); - unsigned int width = fileListIO->GetDimensions(0); - unsigned int height = fileListIO->GetDimensions(1); - const char * fourCC = "MP42"; + const double fps = fileListIO->GetFramesPerSecond(); + unsigned int width = fileListIO->GetDimensions(0); + unsigned int height = fileListIO->GetDimensions(1); + const char * fourCC = "MP42"; const unsigned int nChannels = fileListIO->GetNumberOfComponents(); // Reset the VideoIO @@ -251,7 +251,7 @@ test_FileListVideoIO(const char * input, { // Set up a buffer to read to const size_t bufferSize = fileListIO2->GetImageSizeInBytes(); - auto * buffer = new PixelType[bufferSize]; + auto * buffer = new PixelType[bufferSize]; // Read into the buffer fileListIO2->Read(static_cast(buffer)); diff --git a/Utilities/Maintenance/AddEmptyDefaultMemberInitializers.cxx b/Utilities/Maintenance/AddEmptyDefaultMemberInitializers.cxx index 7bb8ad56ed8..f7fa52574c0 100644 --- a/Utilities/Maintenance/AddEmptyDefaultMemberInitializers.cxx +++ b/Utilities/Maintenance/AddEmptyDefaultMemberInitializers.cxx @@ -52,7 +52,7 @@ ReadFile(const path & filePath) Lines result; std::ifstream inputFileStream{ filePath }; - std::string line; + std::string line; while (std::getline(inputFileStream, line)) { result.push_back(line); @@ -180,7 +180,7 @@ AddInitializers(Lines & lines) auto ProcessFile(const path & filePath) { - auto lines = ReadFile(filePath); + auto lines = ReadFile(filePath); const auto numberOfAddedInitializers = AddInitializers(lines); if (numberOfAddedInitializers > 0) {