From fd9a987baddbd86218e9404fa956367bdbd06788 Mon Sep 17 00:00:00 2001 From: Johan Andruejol Date: Tue, 24 May 2016 11:04:00 -0400 Subject: [PATCH 01/55] ENH: Initial commit on ITKPCA This is the initial commit of ITKPCA. The code is taken as is from the insight journal article http://hdl.handle.net/10380/3386. Credits goes to original authors Bowers M., Younes L.. --- .../CMakeLists.txt | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt new file mode 100644 index 00000000000..f9f2874e498 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt @@ -0,0 +1,28 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +IF(COMMAND CMAKE_POLICY) + CMAKE_POLICY(SET CMP0003 NEW) +ENDIF(COMMAND CMAKE_POLICY) + +PROJECT(PrincipalComponentsAnalysis) + +FIND_PACKAGE(ITK REQUIRED) +INCLUDE(${ITK_USE_FILE}) + +SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE INTERNAL "Where to put the executables") +SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE INTERNAL "Where to put the libraries") + +OPTION(GENERATE_REPORT "Generate the PDF report from latex files, source code examples and result screenshots" OFF) + +INCLUDE(CTest) + +INCLUDE_DIRECTORIES( + ${PROJECT_SOURCE_DIR}/Source + ) + + +ADD_SUBDIRECTORY( Testing ) +ADD_SUBDIRECTORY( Examples ) + +IF(GENERATE_REPORT) + ADD_SUBDIRECTORY( Documents ) +ENDIF(GENERATE_REPORT) From de390bc1e4770f5cc035f0bd462b5f3cccdd2c7a Mon Sep 17 00:00:00 2001 From: Johan Andruejol Date: Tue, 24 May 2016 12:50:43 -0400 Subject: [PATCH 02/55] ENH: Move PrincipalComponentsAnalysis to itk-module hierarchy This is the first part of a series of commit to convert this repository to work with ITK's external modules infrastructure. This commit allows to configure/generate the module against an ITK build. The itkVectorFieldPCA.* files were moved to the folder named include which the external module expects for header files. The itk-module.cmake was added to describe the module and its dependencies. --- .../CMakeLists.txt | 31 +- .../include/itkVectorFieldPCA.h | 242 ++++++++++++ .../include/itkVectorFieldPCA.hxx | 368 ++++++++++++++++++ .../itk-module.cmake | 13 + 4 files changed, 632 insertions(+), 22 deletions(-) create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt index f9f2874e498..4a43014445f 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt +++ b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt @@ -1,28 +1,15 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 2.9) IF(COMMAND CMAKE_POLICY) CMAKE_POLICY(SET CMP0003 NEW) ENDIF(COMMAND CMAKE_POLICY) PROJECT(PrincipalComponentsAnalysis) -FIND_PACKAGE(ITK REQUIRED) -INCLUDE(${ITK_USE_FILE}) - -SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE INTERNAL "Where to put the executables") -SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE INTERNAL "Where to put the libraries") - -OPTION(GENERATE_REPORT "Generate the PDF report from latex files, source code examples and result screenshots" OFF) - -INCLUDE(CTest) - -INCLUDE_DIRECTORIES( - ${PROJECT_SOURCE_DIR}/Source - ) - - -ADD_SUBDIRECTORY( Testing ) -ADD_SUBDIRECTORY( Examples ) - -IF(GENERATE_REPORT) - ADD_SUBDIRECTORY( Documents ) -ENDIF(GENERATE_REPORT) +IF (NOT ITK_SOURCE_DIR) + FIND_PACKAGE(ITK REQUIRED) + INCLUDE(${ITK_USE_FILE}) + LIST(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR}) + INCLUDE(ITKModuleExternal) +ELSE() + itk_module_impl() +ENDIF() diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h new file mode 100644 index 00000000000..f87832f1ff2 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -0,0 +1,242 @@ +/*========================================================================= + * + * Copyright Insight Software Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0.txt + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * +=========================================================================*/ + +#ifndef __itkVectorFieldPCA_h +#define __itkVectorFieldPCA_h + +#include "itkObject.h" +#include "itkPointSet.h" +#include "itkKernelFunctionBase.h" +#include "vnl/vnl_vector.h" +#include "vnl/vnl_matrix.h" + +namespace itk +{ + +/** \class VectorFieldPCA + * \brief Produce the principle components of a vector valued function. + * + * This calculator produces a set of basis functions composed of the + * principal components of a set of vector valued functions. + * + * Specify an itk::KernelFunction for Kernel PCA. The Kernel Function + * can take as input an optional point set. + * + * This class is templated over the types of the vector valued functions, + * the output point types, and optionally the point set type. + * + * \author Michael Bowers, Laurent Younes + * + * This code was contributed in the Insight Journal paper: + * + * "Principal Components Analysis of Scalar, Vector, and Mesh Vertex Data" + * http://www.insight-journal.org/browse/publication/878 + * + * \ingroup ITKStatistics + */ + +template +class ITK_EXPORT GaussianDistanceKernel : public KernelFunctionBase +{ +public: + /** Standard class typedefs. */ + typedef GaussianDistanceKernel Self; + typedef KernelFunctionBase Superclass; + typedef SmartPointer Pointer; + typedef SmartPointer ConstPointer; + + /** Run-time type information (and related methods). */ + itkTypeMacro(GaussianDistanceKernel, KernelFunction); + + /** Method for creation through the object factory. */ + itkNewMacro(Self); + + /** + * \brief Set and get the Kernel sigma. + */ + void + SetKernelSigma(double s) + { + m_KernelSigma = s; + m_OneOverMinusTwoSigmaSqr = -1.0 / (2.0 * s * s); + } + itkGetMacro(KernelSigma, double); + + /** + * \brief Evaluate the function. Input is the squared distance + */ + inline double + Evaluate(const double & u) const + { + return (vcl_exp(u * m_OneOverMinusTwoSigmaSqr)); + } + +protected: + GaussianDistanceKernel() {} + ~GaussianDistanceKernel() {} + void + PrintSelf(std::ostream & os, Indent indent) const + { + Superclass::PrintSelf(os, indent); + } + +private: + double m_KernelSigma; + double m_OneOverMinusTwoSigmaSqr; +}; + +template , + class TPointSetType = + PointSet>> +class ITK_EXPORT VectorFieldPCA : public Object +{ +public: + /** Standard class typedefs. */ + typedef VectorFieldPCA Self; + typedef Object Superclass; + typedef SmartPointer Pointer; + typedef SmartPointer ConstPointer; + + /** Method for creation through the object factory. */ + itkNewMacro(Self); + + /** Run-time type information (and related methods). */ + itkTypeMacro(VectorFieldPCA, Object); + + /** Type definitions for the PointSet. */ + typedef TPointSetType InputPointSetType; + + /** Definitions for points of the PointSet. */ + typedef typename InputPointSetType::PointType InputPointType; + + /** Definitions for the PointsContainer. */ + typedef typename InputPointSetType::PointsContainer PointsContainer; + typedef typename PointsContainer::Iterator PointsContainerIterator; + + /** Pointer types for the PointSet. */ + typedef typename InputPointSetType::Pointer InputPointSetPointer; + + /** Const Pointer type for the PointSet. */ + typedef typename InputPointSetType::ConstPointer InputPointSetConstPointer; + + /** + * \brief Input PointSet dimension + */ + itkStaticConstMacro(InputMeshDimension, unsigned int, TPointSetType::PointDimension); + + /** type for the vector fields. */ + typedef vnl_matrix VectorFieldType; + typedef VectorContainer VectorFieldSetType; + + typedef typename VectorFieldSetType::Pointer VectorFieldSetTypePointer; + typedef typename VectorFieldSetType::ConstPointer VectorFieldSetTypeConstPointer; + + /** types for the output. */ + typedef vnl_matrix MatrixType; + typedef vnl_vector VectorType; + + typedef VectorContainer BasisSetType; + typedef VectorContainer ResSetType; + + typedef typename BasisSetType::Pointer BasisSetTypePointer; + typedef typename KernelFunctionType::Pointer KernelFunctionPointer; + + /** + * \brief Set and get the input point set. + */ + itkSetMacro(PointSet, InputPointSetPointer); + itkGetMacro(PointSet, InputPointSetPointer); + + /** + * \brief Set and get the vector fields for the analysis. + */ + itkSetMacro(VectorFieldSet, VectorFieldSetTypePointer); + itkGetMacro(VectorFieldSet, VectorFieldSetTypePointer); + + /** + * \brief Set and get the PCA count. + */ + itkSetMacro(ComponentCount, unsigned int); + itkGetMacro(ComponentCount, unsigned int); + + /** + * \brief Set pointer to the Kernel object. + */ + itkSetMacro(KernelFunction, KernelFunctionPointer); + + /** + * \brief Compute the PCA decomposition of the input point set. + If a Kernel and a Kernel Sigma are set , + the calculator will perform Kernel PCA. + */ + void + Compute(void); + + /** + * \brief Return the results. + */ + itkGetConstReferenceMacro(AveVectorField, MatrixType); + itkGetConstReferenceMacro(PCAEigenValues, VectorType); + itkGetConstObjectMacro(BasisVectors, BasisSetType); + +protected: + VectorFieldPCA(); + virtual ~VectorFieldPCA() {}; + void + PrintSelf(std::ostream & os, Indent indent) const; + + void + KernelPCA(void); + void + computeMomentumSCP(void); + +private: + VectorFieldPCA(const Self &); // purposely not implemented + void + operator=(const Self &); // purposely not implemented + + VectorType m_PCAEigenValues; + + BasisSetTypePointer m_BasisVectors; + VectorFieldSetTypePointer m_VectorFieldSet; + InputPointSetPointer m_PointSet; + KernelFunctionPointer m_KernelFunction; + + // problem dimensions + unsigned int m_ComponentCount; + unsigned int m_SetSize; + unsigned int m_VectorDimCount; + unsigned int m_VertexCount; + unsigned int m_PointDim; + + MatrixType m_V0; + MatrixType m_AveVectorField; + MatrixType m_K; + + bool m_PCACalculated; +}; + +} // end namespace itk + +#include "itkVectorFieldPCA.hxx" + +#endif diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx new file mode 100644 index 00000000000..b88ecf04b08 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx @@ -0,0 +1,368 @@ +/*========================================================================= + * + * Copyright Insight Software Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0.txt + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * +=========================================================================*/ + +#ifndef __itkVectorFieldPCA_hxx +#define __itkVectorFieldPCA_hxx + +#include "itkVectorFieldPCA.h" +#include "vnl/algo/vnl_symmetric_eigensystem.h" +#include "vnl/vnl_c_vector.h" +#include "vnl/vnl_math.h" + +namespace itk +{ + +/** + * Constructor + */ +template +VectorFieldPCA::VectorFieldPCA() +{ + m_PCACalculated = false; + m_SetSize = 0; + m_VectorDimCount = 0; + m_PointDim = 0; + m_ComponentCount = 0; + m_KernelFunction = NULL; + m_BasisVectors = BasisSetType::New(); + m_VectorFieldSet = NULL; + m_PointSet = NULL; +} + +/** + * + */ +template +void +VectorFieldPCA::PrintSelf(std::ostream & os, Indent indent) const +{ + Superclass::PrintSelf(os, indent); + + if (this->m_VectorFieldSet.IsNull()) + { + os << indent << "Vector Field Set Empty" << std::endl; + } + else + { + os << indent << "Vector Field Set Count: " << this->m_VectorFieldSet->Size() << std::endl; + } + + os << indent << "Component Count: " << this->m_ComponentCount << std::endl; + os << indent << "Eigenvalues: " << this->m_PCAEigenValues << std::endl; + if (this->m_BasisVectors.IsNull()) + { + os << indent << "Basis Vector Empty" << std::endl; + } + else + { + os << indent << "Basis Vector Count: " << this->m_BasisVectors->Size() << std::endl; + if (this->m_BasisVectors->Size()) + { + MatrixType & thisBasis = this->m_BasisVectors->ElementAt(0); + os << indent << "Basis Vector Dimensions: " << thisBasis.rows() << "x" << thisBasis.cols() << std::endl; + } + } + + if (this->m_PointSet.IsNull()) + { + os << indent << "PointSet Empty" << std::endl; + } + else + { + os << indent << "PointSet is " << m_PointSet->GetNumberOfPoints() << "x" << this->m_PointSet->PointDimension + << std::endl; + } + + if (this->m_KernelFunction.IsNull()) + { + os << indent << "Kernel Function not set" << std::endl; + } + else + { + os << indent << "KernelFunction is set." << std::endl; + } +} + +/** + * Compute the principal components + */ +template +void +VectorFieldPCA::Compute(void) +{ + // check parameters + if (!m_VectorFieldSet || !m_VectorFieldSet->Size()) + { + itkExceptionMacro("Vector Field Set not specified."); + return; + } + + m_SetSize = m_VectorFieldSet->Size(); + if (m_ComponentCount <= 0 || m_ComponentCount > m_SetSize) + { + itkExceptionMacro("Component Count N must be 0 < N <= VectorFieldSetSize (" << m_VectorFieldSet->Size() << ")."); + return; + } + + // get vector/point dim from the first member of the vector set + + VectorFieldType & firstField = m_VectorFieldSet->ElementAt(0); + m_VectorDimCount = firstField.rows(); + m_PointDim = firstField.cols(); + + // check all vector dimensions in the set + for (unsigned int i = 1; i < m_VectorFieldSet->Size(); i++) + { + VectorFieldType & thisField = m_VectorFieldSet->ElementAt(i); + if (thisField.rows() != m_VectorDimCount || thisField.cols() != m_PointDim) + { + itkExceptionMacro("Vector " << i << " dimensions (" << thisField.rows() << "x" << thisField.cols() + << ") does not match other vector fields dimensions (" << m_VectorDimCount << "x" + << m_PointDim << ")."); + return; + } + } + + if (m_KernelFunction) + { + // will try Kernel PCA, so need a point set... + if (!m_PointSet) + { + itkExceptionMacro("KernelFunction is set but no PointSet is available."); + return; + } + + // PointSet only necessary for Kernel PCA, but check that it matches if set... + if (m_PointSet) + { + if (m_PointSet->GetNumberOfPoints() != m_VectorDimCount) + { + itkExceptionMacro("Point Set count (" << m_PointSet->GetNumberOfPoints() + << ") does not match vector field count (" << m_VectorDimCount << ")."); + return; + } + } + } + + computeMomentumSCP(); + KernelPCA(); + + // save only the desired eigenvalues + m_PCAEigenValues = m_PCAEigenValues.extract(m_ComponentCount); + + // save only the desired eigenvectors + m_V0 = m_V0.extract(m_V0.rows(), m_ComponentCount); + + m_BasisVectors->Reserve(m_ComponentCount); + for (unsigned int k = 0; k < m_ComponentCount; k++) + { + MatrixType basisVector(m_VectorDimCount, m_PointDim); + VectorFieldType accum(m_VectorDimCount, m_PointDim); + accum = 0.0; + basisVector = 0.0; + for (unsigned int j = 0; j < m_SetSize; j++) + { + vnl_c_vector::saxpy( + m_V0(j, k), (m_VectorFieldSet->ElementAt(j)).data_block(), accum.data_block(), accum.size()); + } + + for (unsigned int i = 0; i < accum.size(); ++i) + basisVector.begin()[i] = TPCType(accum.begin()[i]); + m_BasisVectors->SetElement(k, basisVector); + } + + m_PCAEigenValues /= m_SetSize; + m_PCAEigenValues = m_PCAEigenValues.apply(sqrt); + + m_PCACalculated = true; +} + + +/** + * Compute Momentum SCP + */ +template +void +VectorFieldPCA::computeMomentumSCP(void) +{ + + VectorFieldType accum; + accum.set_size(m_VectorDimCount, m_PointDim); + accum = 0.0; + + // determine the average of the vector field over the set + for (unsigned k = 0; k < m_SetSize; k++) + { + accum += m_VectorFieldSet->ElementAt(k); + } + accum /= (double)m_SetSize; + + m_AveVectorField.set_size(m_VectorDimCount, m_PointDim); + + for (unsigned int i = 0; i < accum.size(); ++i) + m_AveVectorField.begin()[i] = TPCType(accum.begin()[i]); + + + MatrixType kernelM(m_VectorDimCount, m_VectorDimCount); + + // check whether we're doing kernel PCA + if (!m_KernelFunction.IsNull()) + { + unsigned k1, l1; + k1 = 0; + for (PointsContainerIterator kIx = m_PointSet->GetPoints()->Begin(); kIx != m_PointSet->GetPoints()->End(); kIx++) + { + l1 = 0; + for (PointsContainerIterator lIx = m_PointSet->GetPoints()->Begin(); lIx != m_PointSet->GetPoints()->End(); lIx++) + { + kernelM(k1, l1) = m_KernelFunction->Evaluate((kIx.Value()).SquaredEuclideanDistanceTo(lIx.Value())); + kernelM(l1, k1) = kernelM(k1, l1); + l1++; + } + k1++; + } + } + + m_K.set_size(m_SetSize, m_SetSize); + MatrixType alphaK(m_VectorDimCount, m_PointDim); + MatrixType alphaL(m_VectorDimCount, m_PointDim); + MatrixType tmpA; + for (unsigned k = 0; k < m_SetSize; k++) + { + for (unsigned l = k; l < m_SetSize; l++) + { + for (unsigned int i = 0; i < alphaK.size(); ++i) + { + alphaK.begin()[i] = TPCType(m_VectorFieldSet->ElementAt(k).begin()[i]); + } + for (unsigned int i = 0; i < alphaL.size(); ++i) + { + alphaL.begin()[i] = TPCType(m_VectorFieldSet->ElementAt(l).begin()[i]); + } + + if (m_KernelFunction) + { + tmpA = kernelM * (alphaL - m_AveVectorField); + } + else + { + tmpA = alphaL - m_AveVectorField; + } + + MatrixType tmpB = alphaK - m_AveVectorField; + m_K(k, l) = vnl_c_vector::dot_product(tmpA.data_block(), tmpB.data_block(), tmpA.size()); + m_K(l, k) = m_K(k, l); + } + } +} + +/** + * Kernel PCA + */ +template +void +VectorFieldPCA::KernelPCA(void) +{ + VectorType rowMeans(m_SetSize); + + unsigned int k, l; + for (k = 0; k < m_SetSize; k++) + { + rowMeans(k) = m_K.get_row(k).mean(); + } + + TPCType meanOfMeans = rowMeans.mean(); + MatrixType K0(m_K - meanOfMeans); + for (k = 0; k < m_SetSize; k++) + { + for (l = 0; l < m_SetSize; l++) + { + K0(k, l) -= rowMeans(k) + rowMeans(l); + } + } + + vnl_symmetric_eigensystem eigs(K0); + + m_PCAEigenValues = eigs.D.diagonal(); + // eigs come out in ascending order, reorder them + m_PCAEigenValues.flip(); + + // reorder eigenvectors + m_V0 = eigs.V; + m_V0.fliplr(); + + const double eigenvalue_epsilon = 1.0e-10; + for (k = 0; k < m_SetSize; k++) + { + m_V0.scale_column(k, 1.0 / vcl_sqrt(m_PCAEigenValues(k) + eigenvalue_epsilon)); + } +} + +} // end namespace itk + +#endif diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake b/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake new file mode 100644 index 00000000000..177c362b633 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake @@ -0,0 +1,13 @@ +set( + DOCUMENTATION + "This module contains an implementation of the +principal component analysis for the ITK toolkit." +) + +itk_module( + PrincipalComponentsAnalysis + DEPENDS + ITKCommon + EXCLUDE_FROM_DEFAULT + DESCRIPTION "Module ingested from upstream." +) From 9d2469450300dc0c44057b5624a67c0ed256aee2 Mon Sep 17 00:00:00 2001 From: Johan Andruejol Date: Tue, 24 May 2016 13:11:41 -0400 Subject: [PATCH 03/55] ENH: Move PrincipalComponentsAnalysis to itk-module testing hierarchy The external module needs its testing to be under the test folder. The itkVectorKernelPCATest was moved accordingly. This commit does not build. But since we moved a file from one folder to another, we will make the appropriate change in the next commit so they stand out as actual change inside the file. --- .../test/CMakeLists.txt | 56 ++++ .../test/itkVectorKernelPCATest.cxx | 280 ++++++++++++++++++ 2 files changed, 336 insertions(+) create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/CMakeLists.txt create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/CMakeLists.txt b/Modules/Numerics/PrincipalComponentsAnalysis/test/CMakeLists.txt new file mode 100644 index 00000000000..66988002e7a --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/CMakeLists.txt @@ -0,0 +1,56 @@ +itk_module_test() + +set(kit PrincipalComponentsAnalysis) +set(${kit}Tests itkVectorKernelPCATest.cxx) + +set(TEST_DATA_ROOT ${${kit}_SOURCE_DIR}/Data) + +createtestdriver(${kit} "${${kit}-Test_LIBRARIES}" "${${kit}Tests}") + +itk_add_test( + NAME itkVectorKernelPCATest + COMMAND + ${kit}TestDriver + itkVectorKernelPCATest + ${TEST_DATA_ROOT}/PCATestSurface.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_01.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_02.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_03.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_04.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_05.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_06.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_07.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_08.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_09.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_10.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_11.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_12.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_13.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_14.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_15.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_16.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_17.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_18.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_19.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_20.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_21.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_22.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_23.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_24.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_25.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_26.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_27.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_28.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_29.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_30.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_31.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_32.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_33.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_34.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_35.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_36.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_37.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_38.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_39.vtk + ${TEST_DATA_ROOT}/PCATestSurface_alpha0_40.vtk +) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx new file mode 100644 index 00000000000..f0b3e80cd60 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx @@ -0,0 +1,280 @@ +/*========================================================================= + * + * Copyright Insight Software Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0.txt + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * +=========================================================================*/ + +#include "itkMesh.h" +#include "itkMeshFileReader.h" +#include "itkVectorFieldPCA.h" +#include "vnl/vnl_vector.h" +#include "vnl/vnl_vector.h" + +int +showUsage(const char * programName) +{ + std::cerr << "USAGE: " << programName << std::endl; + std::cerr << " ... " << std::endl; + std::cerr << "\t\tN must be greater than 3" << std::endl; + return EXIT_FAILURE; +} + +int +main(int argc, char * argv[]) +{ +#define MIN_ARG_COUNT 6 +#define FIRST_VECTOR_FIELD_ARG 2 + if (argc < MIN_ARG_COUNT) + return (showUsage(argv[0])); + + unsigned int pcaCount = 3; + double kernelSigma = 6.25; + + typedef double PointDataType; + typedef itk::Array PointDataVectorType; + typedef PointDataVectorType PixelType; + typedef double DDataType; + typedef double CoordRep; + typedef double InterpRep; + const unsigned int Dimension = 3; + + // typedef float PCAResultsType; + typedef double PCAResultsType; + + // Declare the type of the input mesh + typedef itk::Mesh InMeshType; + + // Declare the type of the kernel function class + // typedef itk::GaussianDistanceKernel KernelType; + typedef itk::GaussianDistanceKernel KernelType; + + // Declare the type of the PCA calculator + typedef itk::VectorFieldPCA + PCACalculatorType; + + // Here we recover the file names from the command line arguments + const char * inMeshFile = argv[1]; + + // We can now instantiate the types of the reader/writer. + typedef itk::MeshFileReader ReaderType; + + // create readers/writers + ReaderType::Pointer meshReader = ReaderType::New(); + + // The name of the file to be read or written is passed with the + // SetFileName() method. + meshReader->SetFileName(inMeshFile); + + try + { + meshReader->Update(); + } + catch (itk::ExceptionObject & excp) + { + std::cerr << "Error reading mesh file " << inMeshFile << std::endl; + std::cerr << excp << std::endl; + } + + // get the objects + InMeshType::Pointer mesh = meshReader->GetOutput(); + + std::cout << "Vertex Count: " << mesh->GetNumberOfPoints() << std::endl; + std::cout << "Cell Count: " << mesh->GetNumberOfCells() << std::endl; + + const char * vectorFieldName; + PCACalculatorType::VectorFieldType vectorField; + + // should know vector field dimensions now + unsigned int vectorFieldDim = 0; + unsigned int vectorFieldCount = 0; + + // how many vector field sets? + unsigned int fieldSetCount = argc - FIRST_VECTOR_FIELD_ARG; + + PCACalculatorType::VectorFieldSetTypePointer vectorFieldSet = PCACalculatorType::VectorFieldSetType::New(); + + vectorFieldSet->Reserve(fieldSetCount); + + unsigned int setIx = 0; + for (int i = FIRST_VECTOR_FIELD_ARG; i < argc; i++) + { + vectorFieldName = argv[i]; + // The name of the file to be read or written is passed with the + // SetFileName() method. + meshReader->SetFileName(vectorFieldName); + + try + { + meshReader->Update(); + } + catch (itk::ExceptionObject & excp) + { + std::cerr << "Error reading mesh field file " << vectorFieldName << std::endl; + std::cerr << excp << std::endl; + } + + // get the objects + InMeshType::Pointer meshWithField = meshReader->GetOutput(); + + InMeshType::PointDataContainerPointer pointData = meshWithField->GetPointData(); + if (setIx == 0) + { + vectorFieldCount = pointData->Size(); + if (vectorFieldCount) + { + PixelType oneDataSetVal = pointData->GetElement(0); + vectorFieldDim = oneDataSetVal.size(); + } + if (vectorFieldCount != meshWithField->GetNumberOfPoints()) + { + std::cerr << "Vector field count (" << vectorFieldCount << ") doesn't match mesh vertext count (" + << meshWithField->GetNumberOfPoints() << ")." << std::endl; + exit(EXIT_FAILURE); + } + vectorField.set_size(vectorFieldCount, vectorFieldDim); + } + else + { + if (vectorFieldDim != vectorField.cols() || vectorFieldCount != meshWithField->GetNumberOfPoints()) + { + std::cerr << "Unexpected dimensions in vector field file " << vectorFieldName << std::endl; + std::cerr << "\tExpected " << vectorFieldCount << " x " << vectorFieldDim; + std::cerr << "\t, got " << meshWithField->GetNumberOfPoints() << " x " << vectorField.cols() << std::endl; + exit(1); + } + } + + for (unsigned int k = 0; k < pointData->Size(); k++) + { + PixelType oneDataSetVal = pointData->GetElement(k); + vectorField.set_row(k, oneDataSetVal); + } + + vectorFieldSet->SetElement(setIx++, vectorField); + } + + PCACalculatorType::Pointer pcaCalc = PCACalculatorType::New(); + + std::cout << "Name of Class = " << pcaCalc->GetNameOfClass() << std::endl; + + std::cout << "Test Print() = " << std::endl; + pcaCalc->Print(std::cout); + + // try to Compute before setting much of anything - expect failure + try + { + pcaCalc->Compute(); + std::cerr << "Failed to throw expected exception" << std::endl; + return EXIT_FAILURE; + } + catch (itk::ExceptionObject & excp) + { + std::cout << "SUCCESSFULLY caught expected exception" << std::endl; + std::cout << excp << std::endl; + } + + // set user variables + pcaCalc->SetComponentCount(pcaCount); + + // + // Now connect the input. + // + pcaCalc->SetPointSet(mesh); + // set vector fields + pcaCalc->SetVectorFieldSet(vectorFieldSet); + // + // Now verify that it runs fine. + // + try + { + pcaCalc->Compute(); + std::cout << "SUCCESSFULLY ran non-Kernel version" << std::endl; + } + catch (itk::ExceptionObject & excp) + { + std::cout << "Failed to run non-Kernel version" << std::endl; + std::cerr << excp << std::endl; + return EXIT_FAILURE; + } + + KernelType::Pointer distKernel = KernelType::New(); + distKernel->SetKernelSigma(kernelSigma); + pcaCalc->SetKernelFunction(distKernel); + + std::cout << "PCA Calculator All Set Up: Print() = " << std::endl; + pcaCalc->Print(std::cout); + + std::ofstream debugOut; + debugOut.precision(15); + + // get the output and perform basic checks + for (unsigned int j = 0; j < pcaCalc->GetComponentCount(); j++) + { + if ((pcaCalc->GetBasisVectors()->GetElement(j)).cols() != vectorFieldDim) + { + std::cout << "Basis Vector Results Failed Dimension check:" << std::endl; + std::cout << "Expected: " << vectorFieldDim << std::endl + << " columns. Got: " << (pcaCalc->GetBasisVectors()->GetElement(j)).cols() << std::endl; + return EXIT_FAILURE; + } + if ((pcaCalc->GetBasisVectors()->GetElement(j)).rows() != vectorFieldCount) + { + std::cout << "Basis Vector Results Failed Dimension check:" << std::endl; + std::cout << "Expected: " << vectorFieldDim << std::endl + << " rows. Got: " << pcaCalc->GetBasisVectors()->GetElement(j).rows() << std::endl; + return EXIT_FAILURE; + } + } + + if (pcaCalc->GetPCAEigenValues().size() != pcaCount) + { + std::cout << "Eigenvalue Vector Results Failed Dimension check:" << std::endl; + std::cout << "Expected: " << pcaCount << std::endl + << ". Got: " << pcaCalc->GetPCAEigenValues().size() << std::endl; + return EXIT_FAILURE; + } + + if (pcaCalc->GetAveVectorField().cols() != vectorFieldDim) + { + std::cout << "Average Vector Field Results Failed Dimension check:" << std::endl; + std::cout << "Expected: " << vectorFieldDim << std::endl + << " columns. Got: " << pcaCalc->GetAveVectorField().cols() << std::endl; + return EXIT_FAILURE; + } + if (pcaCalc->GetAveVectorField().rows() != vectorFieldCount) + { + std::cout << "Average Vector Field Failed Dimension check:" << std::endl; + std::cout << "Expected: " << vectorFieldDim << std::endl + << " rows. Got: " << pcaCalc->GetAveVectorField().rows() << std::endl; + return EXIT_FAILURE; + } + + // set the requested input count greater than the number of vector field sets + pcaCalc->SetComponentCount(fieldSetCount + 1); + // try to Compute - expect failure + try + { + pcaCalc->Compute(); + std::cerr << "Failed to throw expected exception" << std::endl; + return EXIT_FAILURE; + } + catch (itk::ExceptionObject & excp) + { + std::cout << "SUCCESSFULLY caught expected exception" << std::endl; + std::cout << excp << std::endl; + } + + return EXIT_SUCCESS; +} From 3752a9020f4ec542784e251b8db84796245e09eb Mon Sep 17 00:00:00 2001 From: Johan Andruejol Date: Tue, 24 May 2016 13:36:01 -0400 Subject: [PATCH 04/55] BUG: Fix testing dependencies and main name --- .../PrincipalComponentsAnalysis/itk-module.cmake | 9 +++++++++ .../test/itkVectorKernelPCATest.cxx | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake b/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake index 177c362b633..526d8e7a198 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake +++ b/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake @@ -8,6 +8,15 @@ itk_module( PrincipalComponentsAnalysis DEPENDS ITKCommon + TEST_DEPENDS + ITKIOBioRad + ITKIOGE + ITKIOHDF5 + ITKIOLSM + ITKIOMesh + ITKIOMRC + ITKIOStimulate + SCIFIO EXCLUDE_FROM_DEFAULT DESCRIPTION "Module ingested from upstream." ) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx index f0b3e80cd60..e5de687998f 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx @@ -32,7 +32,7 @@ showUsage(const char * programName) } int -main(int argc, char * argv[]) +itkVectorKernelPCATest(int argc, char * argv[]) { #define MIN_ARG_COUNT 6 #define FIRST_VECTOR_FIELD_ARG 2 From 0d70cac3d045cf5e53bd809ea0aa9cb961ba533c Mon Sep 17 00:00:00 2001 From: Johan Andruejol Date: Tue, 24 May 2016 13:40:43 -0400 Subject: [PATCH 05/55] BUG: Fix itkVectorFieldPCA define style This fixes the KWStyle test. --- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h | 4 ++-- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index f87832f1ff2..d63801a6999 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -16,8 +16,8 @@ * =========================================================================*/ -#ifndef __itkVectorFieldPCA_h -#define __itkVectorFieldPCA_h +#ifndef itkVectorFieldPCA_h +#define itkVectorFieldPCA_h #include "itkObject.h" #include "itkPointSet.h" diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx index b88ecf04b08..28965dd1a15 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx @@ -16,8 +16,8 @@ * =========================================================================*/ -#ifndef __itkVectorFieldPCA_hxx -#define __itkVectorFieldPCA_hxx +#ifndef itkVectorFieldPCA_hxx +#define itkVectorFieldPCA_hxx #include "itkVectorFieldPCA.h" #include "vnl/algo/vnl_symmetric_eigensystem.h" From 95c32c1b105b4726a0e811fef973e55fb3ab7c85 Mon Sep 17 00:00:00 2001 From: Johan Andruejol Date: Tue, 24 May 2016 13:42:52 -0400 Subject: [PATCH 06/55] BUG: Fix documentation in itkVectorFieldPCA This fixes the documentation test. --- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index d63801a6999..7985af2bda1 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -48,6 +48,7 @@ namespace itk * http://www.insight-journal.org/browse/publication/878 * * \ingroup ITKStatistics + * \ingroup PrincipalComponentsAnalysis */ template From dedbdc4f64b607fe573ac846c28599bde6619e85 Mon Sep 17 00:00:00 2001 From: Johan Andruejol Date: Tue, 24 May 2016 14:26:25 -0400 Subject: [PATCH 07/55] ENH: Move test data to midas3.kitware.com Also remove unused data. --- .../test/CMakeLists.txt | 82 +++++++++---------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/CMakeLists.txt b/Modules/Numerics/PrincipalComponentsAnalysis/test/CMakeLists.txt index 66988002e7a..c235130bcea 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/CMakeLists.txt +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/CMakeLists.txt @@ -12,45 +12,45 @@ itk_add_test( COMMAND ${kit}TestDriver itkVectorKernelPCATest - ${TEST_DATA_ROOT}/PCATestSurface.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_01.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_02.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_03.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_04.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_05.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_06.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_07.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_08.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_09.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_10.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_11.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_12.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_13.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_14.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_15.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_16.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_17.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_18.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_19.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_20.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_21.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_22.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_23.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_24.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_25.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_26.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_27.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_28.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_29.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_30.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_31.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_32.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_33.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_34.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_35.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_36.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_37.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_38.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_39.vtk - ${TEST_DATA_ROOT}/PCATestSurface_alpha0_40.vtk + DATA{${TEST_DATA_ROOT}/PCATestSurface.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_01.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_02.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_03.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_04.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_05.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_06.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_07.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_08.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_09.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_10.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_11.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_12.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_13.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_14.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_15.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_16.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_17.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_18.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_19.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_20.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_21.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_22.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_23.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_24.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_25.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_26.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_27.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_28.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_29.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_30.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_31.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_32.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_33.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_34.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_35.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_36.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_37.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_38.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_39.vtk} + DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_40.vtk} ) From a8a0efb14bea632b7231afd62bbbe43ee82e2f43 Mon Sep 17 00:00:00 2001 From: Johan Andruejol Date: Tue, 24 May 2016 15:07:19 -0400 Subject: [PATCH 08/55] COMP: Add removed option for building the examples and the documentation While moving to the new external module architecture, these options were removed to facilitate the transition. Now that is is done, these options are re-added. --- .../PrincipalComponentsAnalysis/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt index 4a43014445f..0c2a64f793b 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt +++ b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt @@ -13,3 +13,14 @@ IF (NOT ITK_SOURCE_DIR) ELSE() itk_module_impl() ENDIF() + +OPTION(BUILD_EXAMPLES "Build the examples" OFF) +IF(BUILD_EXAMPLES) + ADD_SUBDIRECTORY( Examples ) +ENDIF() + + +OPTION(GENERATE_REPORT "Generate the PDF report from latex files, source code examples and result screenshots" OFF) +IF(GENERATE_REPORT) + ADD_SUBDIRECTORY( Documents ) +ENDIF() From c7ea838b793fb1258f1c9813d52cf5a81dcb70d1 Mon Sep 17 00:00:00 2001 From: Johan Andruejol Date: Tue, 24 May 2016 16:32:03 -0400 Subject: [PATCH 09/55] ENH: Add ITKTestKernel to testing --- Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake b/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake index 526d8e7a198..51484bfa0d8 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake +++ b/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake @@ -16,6 +16,7 @@ itk_module( ITKIOMesh ITKIOMRC ITKIOStimulate + ITKTestKernel SCIFIO EXCLUDE_FROM_DEFAULT DESCRIPTION "Module ingested from upstream." From be569cee96489eae527dd7817092d5b4148b055d Mon Sep 17 00:00:00 2001 From: Johan Andruejol Date: Wed, 25 May 2016 10:52:56 -0400 Subject: [PATCH 10/55] ENH: Add python wrapping --- .../wrapping/GaussianDistanceKernel.wrap | 5 +++++ .../PrincipalComponentsAnalysis/wrapping/wrapping.cmake | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/wrapping/GaussianDistanceKernel.wrap create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/wrapping/wrapping.cmake diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/wrapping/GaussianDistanceKernel.wrap b/Modules/Numerics/PrincipalComponentsAnalysis/wrapping/GaussianDistanceKernel.wrap new file mode 100644 index 00000000000..dd1ab35dfe5 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/wrapping/GaussianDistanceKernel.wrap @@ -0,0 +1,5 @@ +itk_wrap_class("itk::GaussianDistanceKernel" POINTER) +foreach(r ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_${r}}" "${ITKT_${r}}") +endforeach() +itk_end_wrap_class() diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/wrapping/wrapping.cmake b/Modules/Numerics/PrincipalComponentsAnalysis/wrapping/wrapping.cmake new file mode 100644 index 00000000000..766e6f42a41 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/wrapping/wrapping.cmake @@ -0,0 +1,5 @@ +itk_wrap_module(PrincipalComponentsAnalysis) + +set(WRAPPER_SUBMODULE_ORDER) +itk_auto_load_submodules() +itk_end_wrap_module() From 700993d4665a21e39f384f9ba082fbacd9cf7419 Mon Sep 17 00:00:00 2001 From: Johan Andruejol Date: Wed, 25 May 2016 15:33:41 -0400 Subject: [PATCH 11/55] ENH: Remove unecessary IO in TEST_DEPENDS Legacy code was including the ${ITK_USE_FILE} which made the include of the IO factories as dependencies mandatory to be able to link. By removing that include, we can remove unnecessary dependencies. --- .../Numerics/PrincipalComponentsAnalysis/CMakeLists.txt | 1 - .../Numerics/PrincipalComponentsAnalysis/itk-module.cmake | 7 ------- 2 files changed, 8 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt index 0c2a64f793b..5aee22f25ed 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt +++ b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt @@ -7,7 +7,6 @@ PROJECT(PrincipalComponentsAnalysis) IF (NOT ITK_SOURCE_DIR) FIND_PACKAGE(ITK REQUIRED) - INCLUDE(${ITK_USE_FILE}) LIST(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR}) INCLUDE(ITKModuleExternal) ELSE() diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake b/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake index 51484bfa0d8..18710aed39b 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake +++ b/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake @@ -9,15 +9,8 @@ itk_module( DEPENDS ITKCommon TEST_DEPENDS - ITKIOBioRad - ITKIOGE - ITKIOHDF5 - ITKIOLSM ITKIOMesh - ITKIOMRC - ITKIOStimulate ITKTestKernel - SCIFIO EXCLUDE_FROM_DEFAULT DESCRIPTION "Module ingested from upstream." ) From 58543773b12e24e14964ca03b8f3a3e67a3825bb Mon Sep 17 00:00:00 2001 From: Johan Andruejol Date: Wed, 25 May 2016 15:57:18 -0400 Subject: [PATCH 12/55] ENH: Add missing ITKMesh --- Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake b/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake index 18710aed39b..170ff316cc5 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake +++ b/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake @@ -10,6 +10,7 @@ itk_module( ITKCommon TEST_DEPENDS ITKIOMesh + ITKMesh ITKTestKernel EXCLUDE_FROM_DEFAULT DESCRIPTION "Module ingested from upstream." From 5cc31388751b5c64caf6d5ae8fea385ce2158efc Mon Sep 17 00:00:00 2001 From: Johan Andruejol Date: Fri, 27 May 2016 13:16:34 -0400 Subject: [PATCH 13/55] COMP: Prepend CMake options with PrincipalComponentAnalysis This will prevent accidentaly setting those variables. For example, ITK has an option BUILD_EXAMPLE that was setting BUILD_EXAMPLE to ON in this repository and breaking compilation. Also make sure when building the examples that ITK is found. --- .../PrincipalComponentsAnalysis/CMakeLists.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt index 5aee22f25ed..2231f55f40a 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt +++ b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt @@ -3,7 +3,8 @@ IF(COMMAND CMAKE_POLICY) CMAKE_POLICY(SET CMP0003 NEW) ENDIF(COMMAND CMAKE_POLICY) -PROJECT(PrincipalComponentsAnalysis) +SET(kit PrincipalComponentsAnalysis) +PROJECT(${kit}) IF (NOT ITK_SOURCE_DIR) FIND_PACKAGE(ITK REQUIRED) @@ -13,13 +14,13 @@ ELSE() itk_module_impl() ENDIF() -OPTION(BUILD_EXAMPLES "Build the examples" OFF) -IF(BUILD_EXAMPLES) +OPTION(${kit}_BUILD_EXAMPLES "Build the examples" OFF) +IF(${kit}_BUILD_EXAMPLES) ADD_SUBDIRECTORY( Examples ) ENDIF() -OPTION(GENERATE_REPORT "Generate the PDF report from latex files, source code examples and result screenshots" OFF) -IF(GENERATE_REPORT) +OPTION(${kit}_GENERATE_REPORT "Generate the PDF report from latex files, source code examples and result screenshots" OFF) +IF(${kit}_GENERATE_REPORT) ADD_SUBDIRECTORY( Documents ) ENDIF() From 31e70d9ceb26eb23209fc87834dc292754058b85 Mon Sep 17 00:00:00 2001 From: Johan Andruejol Date: Fri, 27 May 2016 15:15:01 -0400 Subject: [PATCH 14/55] ENH: Remove unused declarations in itkVectorKernelPCATest.cxx --- .../PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx index e5de687998f..82b8609d971 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx @@ -45,9 +45,7 @@ itkVectorKernelPCATest(int argc, char * argv[]) typedef double PointDataType; typedef itk::Array PointDataVectorType; typedef PointDataVectorType PixelType; - typedef double DDataType; typedef double CoordRep; - typedef double InterpRep; const unsigned int Dimension = 3; // typedef float PCAResultsType; From ec58517c18848d043cb1874dec4868ea25d10ff9 Mon Sep 17 00:00:00 2001 From: Francois Budin Date: Thu, 23 Jun 2016 09:51:27 -0400 Subject: [PATCH 15/55] BUG: Example (VectorKernelPCA) was missing dependencies ITKMesh, ITKIOMesh, and ITKIOImageBase modules are required to build VectorKernelPCA. --- .../Numerics/PrincipalComponentsAnalysis/itk-module.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake b/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake index 170ff316cc5..c4f62bfced6 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake +++ b/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake @@ -8,9 +8,10 @@ itk_module( PrincipalComponentsAnalysis DEPENDS ITKCommon - TEST_DEPENDS - ITKIOMesh ITKMesh + ITKIOMesh + ITKIOImageBase + TEST_DEPENDS ITKTestKernel EXCLUDE_FROM_DEFAULT DESCRIPTION "Module ingested from upstream." From 8f5a356860cf98e21290d01002f414198b6a26d8 Mon Sep 17 00:00:00 2001 From: Jon Haitz Legarreta Date: Tue, 11 Apr 2017 19:44:54 +0200 Subject: [PATCH 16/55] ENH: Honor the ITK conventions to name modules, flags and folders. Add the 'Module_' prefix to the module's flags so that they can be grouped together with the module itself by the CMake GUI. Change the 'Examples' and 'Documentation' folder names to 'examples' and 'doc' respectively. Make the module's example and documentation build flags dependent on ITK's BUILD_EXAMPLES and BUILD_DOCUMENTATION flags: if the latter are set to OFF, the module's options will remain hidden and defaulted to OFF. --- .../CMakeLists.txt | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt index 2231f55f40a..9d93f3bd385 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt +++ b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt @@ -3,10 +3,10 @@ IF(COMMAND CMAKE_POLICY) CMAKE_POLICY(SET CMP0003 NEW) ENDIF(COMMAND CMAKE_POLICY) -SET(kit PrincipalComponentsAnalysis) -PROJECT(${kit}) +SET(PCA PrincipalComponentsAnalysis) +PROJECT(${PCA}) -IF (NOT ITK_SOURCE_DIR) +IF(NOT ITK_SOURCE_DIR) FIND_PACKAGE(ITK REQUIRED) LIST(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR}) INCLUDE(ITKModuleExternal) @@ -14,13 +14,14 @@ ELSE() itk_module_impl() ENDIF() -OPTION(${kit}_BUILD_EXAMPLES "Build the examples" OFF) -IF(${kit}_BUILD_EXAMPLES) - ADD_SUBDIRECTORY( Examples ) +CMAKE_DEPENDENT_OPTION(Module_${PCA}_BUILD_EXAMPLES "Build the examples" OFF "BUILD_EXAMPLES" OFF) +if(Module_${PCA}_BUILD_EXAMPLES) + ADD_SUBDIRECTORY( examples ) ENDIF() -OPTION(${kit}_GENERATE_REPORT "Generate the PDF report from latex files, source code examples and result screenshots" OFF) -IF(${kit}_GENERATE_REPORT) - ADD_SUBDIRECTORY( Documents ) +CMAKE_DEPENDENT_OPTION(Module_${PCA}_BUILD_DOCUMENTATION "Generate documentation from LaTeX files, source code examples and result screenshots" OFF + "BUILD_DOCUMENTATION" OFF) +IF(Module_${PCA}_BUILD_DOCUMENTATION) + ADD_SUBDIRECTORY( doc ) ENDIF() From 34c812db3dc1a1b64dad5117b68ff51f15db0e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Sat, 22 Apr 2017 18:31:08 +0200 Subject: [PATCH 17/55] STYLE: Improve the itkVectorFieldPCA class style. Use the ITK_DISALLOW_COPY_AND_ASSIGN macro to save typing the copy and assignment method disallow statements. Use initialization lists: initialize the missing m_VertexCount ivar to zero; SmartPointer initialize themselves to the null pointer. Print all member variables. Use the itkPrintSelfObjectMacro macro to print SmartPointers. Remove unnecessary/ducplicate/empty Doxygen-style, out-of-method-body documentation from the implementation file/use it to improve the method documentation in the header file. Use the 'this' keyword when calling self functions. Make flow control variables have a more local scope. Start comments with capital letters. --- .../include/itkVectorFieldPCA.h | 13 +- .../include/itkVectorFieldPCA.hxx | 191 ++++++++---------- .../test/CMakeLists.txt | 10 +- 3 files changed, 95 insertions(+), 119 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index 7985af2bda1..2e4bae199d2 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -205,15 +205,16 @@ class ITK_EXPORT VectorFieldPCA : public Object void PrintSelf(std::ostream & os, Indent indent) const; + /** Kernel PCA. */ void - KernelPCA(void); + KernelPCA(); + + /** Compute Momentum SCP. */ void - computeMomentumSCP(void); + ComputeMomentumSCP(); private: - VectorFieldPCA(const Self &); // purposely not implemented - void - operator=(const Self &); // purposely not implemented + ITK_DISALLOW_COPY_AND_ASSIGN(VectorFieldPCA); VectorType m_PCAEigenValues; @@ -222,7 +223,7 @@ class ITK_EXPORT VectorFieldPCA : public Object InputPointSetPointer m_PointSet; KernelFunctionPointer m_KernelFunction; - // problem dimensions + // Problem dimensions unsigned int m_ComponentCount; unsigned int m_SetSize; unsigned int m_VectorDimCount; diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx index 28965dd1a15..92be04802a8 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx @@ -27,9 +27,6 @@ namespace itk { -/** - * Constructor - */ template ::VectorFieldPCA() -{ - m_PCACalculated = false; - m_SetSize = 0; - m_VectorDimCount = 0; - m_PointDim = 0; - m_ComponentCount = 0; - m_KernelFunction = NULL; - m_BasisVectors = BasisSetType::New(); - m_VectorFieldSet = NULL; - m_PointSet = NULL; -} + : m_BasisVectors(BasisSetType::New()) + , m_ComponentCount(0) + , m_SetSize(0) + , m_VectorDimCount(0) + , m_VertexCount(0) + , m_PointDim(0) + , m_PCACalculated(false) +{} -/** - * - */ template ::PrintSelf(std::ostream & os, Indent indent) const + TPointSetType>::Compute() { - Superclass::PrintSelf(os, indent); - - if (this->m_VectorFieldSet.IsNull()) - { - os << indent << "Vector Field Set Empty" << std::endl; - } - else - { - os << indent << "Vector Field Set Count: " << this->m_VectorFieldSet->Size() << std::endl; - } - - os << indent << "Component Count: " << this->m_ComponentCount << std::endl; - os << indent << "Eigenvalues: " << this->m_PCAEigenValues << std::endl; - if (this->m_BasisVectors.IsNull()) - { - os << indent << "Basis Vector Empty" << std::endl; - } - else - { - os << indent << "Basis Vector Count: " << this->m_BasisVectors->Size() << std::endl; - if (this->m_BasisVectors->Size()) - { - MatrixType & thisBasis = this->m_BasisVectors->ElementAt(0); - os << indent << "Basis Vector Dimensions: " << thisBasis.rows() << "x" << thisBasis.cols() << std::endl; - } - } - - if (this->m_PointSet.IsNull()) - { - os << indent << "PointSet Empty" << std::endl; - } - else - { - os << indent << "PointSet is " << m_PointSet->GetNumberOfPoints() << "x" << this->m_PointSet->PointDimension - << std::endl; - } - - if (this->m_KernelFunction.IsNull()) - { - os << indent << "Kernel Function not set" << std::endl; - } - else - { - os << indent << "KernelFunction is set." << std::endl; - } -} - -/** - * Compute the principal components - */ -template -void -VectorFieldPCA::Compute(void) -{ - // check parameters + // Check parameters if (!m_VectorFieldSet || !m_VectorFieldSet->Size()) { itkExceptionMacro("Vector Field Set not specified."); @@ -149,13 +76,13 @@ VectorFieldPCAElementAt(0); m_VectorDimCount = firstField.rows(); m_PointDim = firstField.cols(); - // check all vector dimensions in the set + // Check all vector dimensions in the set for (unsigned int i = 1; i < m_VectorFieldSet->Size(); i++) { VectorFieldType & thisField = m_VectorFieldSet->ElementAt(i); @@ -189,13 +116,13 @@ VectorFieldPCAComputeMomentumSCP(); + this->KernelPCA(); - // save only the desired eigenvalues + // Save only the desired eigenvalues m_PCAEigenValues = m_PCAEigenValues.extract(m_ComponentCount); - // save only the desired eigenvectors + // Save only the desired eigenvectors m_V0 = m_V0.extract(m_V0.rows(), m_ComponentCount); m_BasisVectors->Reserve(m_ComponentCount); @@ -222,10 +149,6 @@ VectorFieldPCA::computeMomentumSCP(void) + TPointSetType>::ComputeMomentumSCP() { - VectorFieldType accum; accum.set_size(m_VectorDimCount, m_PointDim); accum = 0.0; - // determine the average of the vector field over the set + // Determine the average of the vector field over the set for (unsigned k = 0; k < m_SetSize; k++) { accum += m_VectorFieldSet->ElementAt(k); @@ -260,7 +182,7 @@ VectorFieldPCA::KernelPCA(void) + TPointSetType>::KernelPCA() { VectorType rowMeans(m_SetSize); - unsigned int k, l; - for (k = 0; k < m_SetSize; k++) + for (unsigned int k = 0; k < m_SetSize; k++) { rowMeans(k) = m_K.get_row(k).mean(); } TPCType meanOfMeans = rowMeans.mean(); MatrixType K0(m_K - meanOfMeans); - for (k = 0; k < m_SetSize; k++) + for (unsigned int k = 0; k < m_SetSize; k++) { - for (l = 0; l < m_SetSize; l++) + for (unsigned int l = 0; l < m_SetSize; l++) { K0(k, l) -= rowMeans(k) + rowMeans(l); } @@ -349,20 +267,77 @@ VectorFieldPCA eigs(K0); m_PCAEigenValues = eigs.D.diagonal(); - // eigs come out in ascending order, reorder them + + // Eigenvalues come out in ascending order, reorder them m_PCAEigenValues.flip(); - // reorder eigenvectors + // Reorder eigenvectors m_V0 = eigs.V; m_V0.fliplr(); const double eigenvalue_epsilon = 1.0e-10; - for (k = 0; k < m_SetSize; k++) + for (unsigned int k = 0; k < m_SetSize; k++) { m_V0.scale_column(k, 1.0 / vcl_sqrt(m_PCAEigenValues(k) + eigenvalue_epsilon)); } } +template +void +VectorFieldPCA::PrintSelf(std::ostream & os, Indent indent) const +{ + Superclass::PrintSelf(os, indent); + + os << indent << "PCAEigenvalues: " << this->m_PCAEigenValues << std::endl; + + if (this->m_BasisVectors.IsNotNull()) + { + os << indent << "Basis Vector count: " << this->m_BasisVectors->Size() << std::endl; + if (this->m_BasisVectors->Size()) + { + MatrixType & thisBasis = this->m_BasisVectors->ElementAt(0); + os << indent << "Basis Vector dimensions: " << thisBasis.rows() << "x" << thisBasis.cols() << std::endl; + } + } + itkPrintSelfObjectMacro(BasisVectors); + + if (this->m_VectorFieldSet.IsNotNull()) + { + os << indent << "Vector Field Set count: " << this->m_VectorFieldSet->Size() << std::endl; + } + itkPrintSelfObjectMacro(VectorFieldSet); + + if (this->m_PointSet.IsNotNull()) + { + os << indent << "PointSet dimensions: " << m_PointSet->GetNumberOfPoints() << "x" + << this->m_PointSet->PointDimension << std::endl; + } + itkPrintSelfObjectMacro(PointSet); + + itkPrintSelfObjectMacro(KernelFunction); + + os << indent << "ComponentCount: " << this->m_ComponentCount << std::endl; + os << indent << "SetSize: " << this->m_SetSize << std::endl; + os << indent << "VectorDimCount: " << this->m_VectorDimCount << std::endl; + os << indent << "VertexCount: " << this->m_VertexCount << std::endl; + os << indent << "PointDim: " << this->m_PointDim << std::endl; + + os << indent << "V0 : " << this->m_V0 << std::endl; + os << indent << "AveVectorField: " << this->m_AveVectorField << std::endl; + os << indent << "K: " << this->m_K << std::endl; + + os << indent << "PCACalculated: " << this->m_PCACalculated << std::endl; +} } // end namespace itk #endif diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/CMakeLists.txt b/Modules/Numerics/PrincipalComponentsAnalysis/test/CMakeLists.txt index c235130bcea..e8076bec837 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/CMakeLists.txt +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/CMakeLists.txt @@ -1,16 +1,16 @@ itk_module_test() -set(kit PrincipalComponentsAnalysis) -set(${kit}Tests itkVectorKernelPCATest.cxx) +set(PCA PrincipalComponentsAnalysis) +set(${PCA}Tests itkVectorKernelPCATest.cxx) -set(TEST_DATA_ROOT ${${kit}_SOURCE_DIR}/Data) +set(TEST_DATA_ROOT ${${PCA}_SOURCE_DIR}/Data) -createtestdriver(${kit} "${${kit}-Test_LIBRARIES}" "${${kit}Tests}") +createtestdriver(${PCA} "${${PCA}-Test_LIBRARIES}" "${${PCA}Tests}") itk_add_test( NAME itkVectorKernelPCATest COMMAND - ${kit}TestDriver + ${PCA}TestDriver itkVectorKernelPCATest DATA{${TEST_DATA_ROOT}/PCATestSurface.vtk} DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_01.vtk} From a2c4f9d2470f2d15dc562b666cd7cad536111bc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Sat, 22 Apr 2017 17:57:55 +0200 Subject: [PATCH 18/55] ENH: Improve code coverage for itk::VectorFieldPCA. Exercise basic object methods. Hence, remove the unncessary calls to the GetNameOfClass or Print methods of the class instance. Exercise all Set/Get methods using the TEST_SET_GET_VALUE macro. Remove unnecessary print of input mesh vertex and cell count. Refactor the test in order to improve the readability: create a helper function to parse the input vector fields. Other style changes for the sake of consistency across ITK: return codes, white spaces, comment styles, etc. --- .../test/itkVectorKernelPCATest.cxx | 333 +++++++++--------- 1 file changed, 161 insertions(+), 172 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx index 82b8609d971..6195cf3ebe5 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx @@ -19,127 +19,56 @@ #include "itkMesh.h" #include "itkMeshFileReader.h" #include "itkVectorFieldPCA.h" +#include "itkTestingMacros.h" #include "vnl/vnl_vector.h" #include "vnl/vnl_vector.h" -int -showUsage(const char * programName) -{ - std::cerr << "USAGE: " << programName << std::endl; - std::cerr << " ... " << std::endl; - std::cerr << "\t\tN must be greater than 3" << std::endl; - return EXIT_FAILURE; -} +template int -itkVectorKernelPCATest(int argc, char * argv[]) +ParseVectorFields(std::vector vectorFieldFilenames, typename TVectorContainer::Pointer vectorFieldSet) { -#define MIN_ARG_COUNT 6 -#define FIRST_VECTOR_FIELD_ARG 2 - if (argc < MIN_ARG_COUNT) - return (showUsage(argv[0])); - - unsigned int pcaCount = 3; - double kernelSigma = 6.25; - - typedef double PointDataType; - typedef itk::Array PointDataVectorType; - typedef PointDataVectorType PixelType; - typedef double CoordRep; - const unsigned int Dimension = 3; - - // typedef float PCAResultsType; - typedef double PCAResultsType; + int testStatus = EXIT_SUCCESS; - // Declare the type of the input mesh - typedef itk::Mesh InMeshType; + typedef itk::MeshFileReader ReaderType; + ReaderType::Pointer meshReader = ReaderType::New(); - // Declare the type of the kernel function class - // typedef itk::GaussianDistanceKernel KernelType; - typedef itk::GaussianDistanceKernel KernelType; - - // Declare the type of the PCA calculator - typedef itk::VectorFieldPCA - PCACalculatorType; - - // Here we recover the file names from the command line arguments - const char * inMeshFile = argv[1]; - - // We can now instantiate the types of the reader/writer. - typedef itk::MeshFileReader ReaderType; - - // create readers/writers - ReaderType::Pointer meshReader = ReaderType::New(); - - // The name of the file to be read or written is passed with the - // SetFileName() method. - meshReader->SetFileName(inMeshFile); - - try - { - meshReader->Update(); - } - catch (itk::ExceptionObject & excp) - { - std::cerr << "Error reading mesh file " << inMeshFile << std::endl; - std::cerr << excp << std::endl; - } - - // get the objects - InMeshType::Pointer mesh = meshReader->GetOutput(); + unsigned int fieldSetCount = vectorFieldFilenames.size(); + vectorFieldSet->Reserve(fieldSetCount); - std::cout << "Vertex Count: " << mesh->GetNumberOfPoints() << std::endl; - std::cout << "Cell Count: " << mesh->GetNumberOfCells() << std::endl; - const char * vectorFieldName; - PCACalculatorType::VectorFieldType vectorField; + typename TVectorContainer::Element vectorField; - // should know vector field dimensions now unsigned int vectorFieldDim = 0; unsigned int vectorFieldCount = 0; - // how many vector field sets? - unsigned int fieldSetCount = argc - FIRST_VECTOR_FIELD_ARG; - - PCACalculatorType::VectorFieldSetTypePointer vectorFieldSet = PCACalculatorType::VectorFieldSetType::New(); - - vectorFieldSet->Reserve(fieldSetCount); - unsigned int setIx = 0; - for (int i = FIRST_VECTOR_FIELD_ARG; i < argc; i++) + for (unsigned int i = 0; i < fieldSetCount; i++) { - vectorFieldName = argv[i]; - // The name of the file to be read or written is passed with the - // SetFileName() method. + std::string vectorFieldName = vectorFieldFilenames[i]; + meshReader->SetFileName(vectorFieldName); - try - { - meshReader->Update(); - } - catch (itk::ExceptionObject & excp) - { - std::cerr << "Error reading mesh field file " << vectorFieldName << std::endl; - std::cerr << excp << std::endl; - } + TRY_EXPECT_NO_EXCEPTION(meshReader->Update()); - // get the objects - InMeshType::Pointer meshWithField = meshReader->GetOutput(); + // Get the objects + TMesh::Pointer meshWithField = meshReader->GetOutput(); - InMeshType::PointDataContainerPointer pointData = meshWithField->GetPointData(); + TMesh::PointDataContainerPointer pointData = meshWithField->GetPointData(); if (setIx == 0) { vectorFieldCount = pointData->Size(); if (vectorFieldCount) { - PixelType oneDataSetVal = pointData->GetElement(0); + TPixel oneDataSetVal = pointData->GetElement(0); vectorFieldDim = oneDataSetVal.size(); } if (vectorFieldCount != meshWithField->GetNumberOfPoints()) { + std::cerr << "Test failed!" << std::endl; std::cerr << "Vector field count (" << vectorFieldCount << ") doesn't match mesh vertext count (" << meshWithField->GetNumberOfPoints() << ")." << std::endl; - exit(EXIT_FAILURE); + testStatus = EXIT_FAILURE; } vectorField.set_size(vectorFieldCount, vectorFieldDim); } @@ -147,132 +76,192 @@ itkVectorKernelPCATest(int argc, char * argv[]) { if (vectorFieldDim != vectorField.cols() || vectorFieldCount != meshWithField->GetNumberOfPoints()) { + std::cerr << "Test failed!" << std::endl; std::cerr << "Unexpected dimensions in vector field file " << vectorFieldName << std::endl; - std::cerr << "\tExpected " << vectorFieldCount << " x " << vectorFieldDim; - std::cerr << "\t, got " << meshWithField->GetNumberOfPoints() << " x " << vectorField.cols() << std::endl; - exit(1); + std::cerr << "Expected: " << vectorFieldCount << " x " << vectorFieldDim << ", but got " + << meshWithField->GetNumberOfPoints() << " x " << vectorField.cols() << std::endl; + testStatus = EXIT_FAILURE; } } for (unsigned int k = 0; k < pointData->Size(); k++) { - PixelType oneDataSetVal = pointData->GetElement(k); + TPixel oneDataSetVal = pointData->GetElement(k); vectorField.set_row(k, oneDataSetVal); } vectorFieldSet->SetElement(setIx++, vectorField); } - PCACalculatorType::Pointer pcaCalc = PCACalculatorType::New(); - - std::cout << "Name of Class = " << pcaCalc->GetNameOfClass() << std::endl; + return testStatus; +} - std::cout << "Test Print() = " << std::endl; - pcaCalc->Print(std::cout); - // try to Compute before setting much of anything - expect failure - try +int +itkVectorKernelPCATest(int argc, char * argv[]) +{ + if (argc < 6) { - pcaCalc->Compute(); - std::cerr << "Failed to throw expected exception" << std::endl; + std::cerr << "Missing parameters." << std::endl; + std::cerr << "Usage: " << argv[0] << " ... " << std::endl; + std::cerr << "where N must be greater than 3" << std::endl; return EXIT_FAILURE; } - catch (itk::ExceptionObject & excp) - { - std::cout << "SUCCESSFULLY caught expected exception" << std::endl; - std::cout << excp << std::endl; - } - // set user variables + + int testStatus = EXIT_SUCCESS; + + const unsigned int Dimension = 3; + + typedef double PointDataType; + typedef itk::Array PointDataVectorType; + typedef PointDataVectorType PixelType; + typedef double CoordRep; + + typedef double PCAResultsType; + + // Declare the type of the input mesh + typedef itk::Mesh MeshType; + + // Declare the type of the kernel function class + typedef itk::GaussianDistanceKernel KernelType; + + // Declare the type of the PCA calculator + typedef itk::VectorFieldPCA + PCACalculatorType; + + // Instantiate the reader + typedef itk::MeshFileReader ReaderType; + ReaderType::Pointer meshReader = ReaderType::New(); + + meshReader->SetFileName(argv[1]); + + TRY_EXPECT_NO_EXCEPTION(meshReader->Update()); + + + // Get the input mesh + MeshType::Pointer mesh = meshReader->GetOutput(); + + + PCACalculatorType::Pointer pcaCalc = PCACalculatorType::New(); + + EXERCISE_BASIC_OBJECT_METHODS(pcaCalc, VectorFieldPCA, Object); + + + // Test exception when trying to compute before setting much of anything + TRY_EXPECT_EXCEPTION(pcaCalc->Compute()); + + + // Set user variables + unsigned int pcaCount = 3; pcaCalc->SetComponentCount(pcaCount); - // - // Now connect the input. - // + // Connect the input pcaCalc->SetPointSet(mesh); - // set vector fields - pcaCalc->SetVectorFieldSet(vectorFieldSet); - // - // Now verify that it runs fine. - // - try - { - pcaCalc->Compute(); - std::cout << "SUCCESSFULLY ran non-Kernel version" << std::endl; - } - catch (itk::ExceptionObject & excp) + TEST_SET_GET_VALUE(mesh, pcaCalc->GetPointSet()); + + // Set vector fields + + PCACalculatorType::VectorFieldType vectorField; + + // Should know vector field dimensions now + unsigned int vectorFieldDim = 0; + unsigned int vectorFieldCount = 0; + + // how many vector field sets? + std::vector vectorFieldFilenames; + unsigned int firstVectorFieldIdx = 2; + unsigned int fieldSetCount = argc - firstVectorFieldIdx; + for (unsigned int i = firstVectorFieldIdx; i < firstVectorFieldIdx + fieldSetCount; i++) { - std::cout << "Failed to run non-Kernel version" << std::endl; - std::cerr << excp << std::endl; - return EXIT_FAILURE; + vectorFieldFilenames.push_back(argv[i]); } + PCACalculatorType::VectorFieldSetTypePointer vectorFieldSet = PCACalculatorType::VectorFieldSetType::New(); + + testStatus = + ParseVectorFields(vectorFieldFilenames, vectorFieldSet); + + pcaCalc->SetVectorFieldSet(vectorFieldSet); + TEST_SET_GET_VALUE(vectorFieldSet, pcaCalc->GetVectorFieldSet()); + + + // Execute the PCA calculator + TRY_EXPECT_NO_EXCEPTION(pcaCalc->Compute()); + + + double kernelSigma = 6.25; KernelType::Pointer distKernel = KernelType::New(); distKernel->SetKernelSigma(kernelSigma); pcaCalc->SetKernelFunction(distKernel); - std::cout << "PCA Calculator All Set Up: Print() = " << std::endl; - pcaCalc->Print(std::cout); std::ofstream debugOut; debugOut.precision(15); - // get the output and perform basic checks + // Get the output and perform basic checks + unsigned int computedNumberOfAverageVectorFieldCols = pcaCalc->GetAveVectorField().cols(); + + unsigned int computedNumberOfAverageVectorFieldRows = pcaCalc->GetAveVectorField().rows(); + for (unsigned int j = 0; j < pcaCalc->GetComponentCount(); j++) { - if ((pcaCalc->GetBasisVectors()->GetElement(j)).cols() != vectorFieldDim) + unsigned int expectedBasisVectorCols = pcaCalc->GetVectorFieldSet()->GetElement(j).cols(); + unsigned int computedBasisVectorCols = pcaCalc->GetBasisVectors()->GetElement(j).cols(); + if (computedBasisVectorCols != expectedBasisVectorCols) { - std::cout << "Basis Vector Results Failed Dimension check:" << std::endl; - std::cout << "Expected: " << vectorFieldDim << std::endl - << " columns. Got: " << (pcaCalc->GetBasisVectors()->GetElement(j)).cols() << std::endl; - return EXIT_FAILURE; + std::cout << "Test failed!" << std::endl; + std::cout << "Error in GetBasisVectors() dimension check at index [" << j << "]" << std::endl; + std::cout << "Expected: " << expectedBasisVectorCols << " columns, but got: " << computedBasisVectorCols + << std::endl; + testStatus = EXIT_FAILURE; } - if ((pcaCalc->GetBasisVectors()->GetElement(j)).rows() != vectorFieldCount) + + unsigned int expectedBasisVectorRows = pcaCalc->GetVectorFieldSet()->GetElement(j).rows(); + unsigned int computedBasisVectorRows = pcaCalc->GetBasisVectors()->GetElement(j).rows(); + if (computedBasisVectorRows != expectedBasisVectorRows) { - std::cout << "Basis Vector Results Failed Dimension check:" << std::endl; - std::cout << "Expected: " << vectorFieldDim << std::endl - << " rows. Got: " << pcaCalc->GetBasisVectors()->GetElement(j).rows() << std::endl; - return EXIT_FAILURE; + std::cout << "Test failed!" << std::endl; + std::cout << "Error in GetBasisVectors() dimension check at index [" << j << "]" << std::endl; + std::cout << "Expected: " << expectedBasisVectorRows << " row, but got: " << computedBasisVectorRows << std::endl; + testStatus = EXIT_FAILURE; } - } - if (pcaCalc->GetPCAEigenValues().size() != pcaCount) - { - std::cout << "Eigenvalue Vector Results Failed Dimension check:" << std::endl; - std::cout << "Expected: " << pcaCount << std::endl - << ". Got: " << pcaCalc->GetPCAEigenValues().size() << std::endl; - return EXIT_FAILURE; - } + if (computedNumberOfAverageVectorFieldCols != expectedBasisVectorCols) + { + std::cout << "Test failed!" << std::endl; + std::cout << "Error in GetAveVectorField() dimension check at index [" << j << "]" << std::endl; + std::cout << "Expected: " << vectorFieldDim << " columns, but got: " << computedNumberOfAverageVectorFieldCols + << std::endl; + testStatus = EXIT_FAILURE; + } - if (pcaCalc->GetAveVectorField().cols() != vectorFieldDim) - { - std::cout << "Average Vector Field Results Failed Dimension check:" << std::endl; - std::cout << "Expected: " << vectorFieldDim << std::endl - << " columns. Got: " << pcaCalc->GetAveVectorField().cols() << std::endl; - return EXIT_FAILURE; + if (computedNumberOfAverageVectorFieldRows != expectedBasisVectorRows) + { + std::cout << "Test failed!" << std::endl; + std::cout << "Error in GetAveVectorField() dimension check at index [" << j << "]" << std::endl; + std::cout << "Expected: " << vectorFieldDim << " rows, but got: " << computedNumberOfAverageVectorFieldRows + << std::endl; + testStatus = EXIT_FAILURE; + } } - if (pcaCalc->GetAveVectorField().rows() != vectorFieldCount) + + unsigned int computedNumberOfEigenValueVectors = pcaCalc->GetPCAEigenValues().size(); + if (computedNumberOfEigenValueVectors != pcaCount) { - std::cout << "Average Vector Field Failed Dimension check:" << std::endl; - std::cout << "Expected: " << vectorFieldDim << std::endl - << " rows. Got: " << pcaCalc->GetAveVectorField().rows() << std::endl; - return EXIT_FAILURE; + std::cout << "Test failed!" << std::endl; + std::cout << "Error in GetPCAEigenValues() dimension check." << std::endl; + std::cout << "Expected: " << pcaCount << ", but got: " << computedNumberOfEigenValueVectors << std::endl; + testStatus = EXIT_FAILURE; } - // set the requested input count greater than the number of vector field sets + // Test exception when trying to compute with a requested input count greater + // than the number of vector field sets pcaCalc->SetComponentCount(fieldSetCount + 1); - // try to Compute - expect failure - try - { - pcaCalc->Compute(); - std::cerr << "Failed to throw expected exception" << std::endl; - return EXIT_FAILURE; - } - catch (itk::ExceptionObject & excp) - { - std::cout << "SUCCESSFULLY caught expected exception" << std::endl; - std::cout << excp << std::endl; - } - return EXIT_SUCCESS; + TRY_EXPECT_EXCEPTION(pcaCalc->Compute()); + + + std::cout << "Test finished." << std::endl; + return testStatus; } From a63ebd3768ebc887d097d9fa7f708fafd6cd49af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Wed, 26 Apr 2017 08:18:08 +0200 Subject: [PATCH 19/55] ENH: Include the ITK_MANUAL_INSTANTIATION macro. Add the #ifndef ITK_MANUAL_INSTANTIATION statement for explicit object instantiation. --- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index 2e4bae199d2..ed862c2d705 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -239,6 +239,8 @@ class ITK_EXPORT VectorFieldPCA : public Object } // end namespace itk -#include "itkVectorFieldPCA.hxx" +#ifndef ITK_MANUAL_INSTANTIATION +# include "itkVectorFieldPCA.hxx" +#endif #endif From 266950c6f7a2ea2d3ea02807877f47ab83a95f5c Mon Sep 17 00:00:00 2001 From: Jon Haitz Legarreta Date: Wed, 17 Jan 2018 18:21:47 +0100 Subject: [PATCH 20/55] ENH: Require cmake minimum version to be 3.9.5. Require CMake minimum version to be 3.9.5 following ITKv5 requiring C++11: https://discourse.itk.org/t/minimum-cmake-version-update/585 --- Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt index 9d93f3bd385..f2d0e8329c8 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt +++ b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.9) +CMAKE_MINIMUM_REQUIRED(VERSION 3.9.5) IF(COMMAND CMAKE_POLICY) CMAKE_POLICY(SET CMP0003 NEW) ENDIF(COMMAND CMAKE_POLICY) From 9dab2692ae13a598c4915815ddcf209b1f7577c9 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sat, 16 Dec 2017 16:30:40 -0600 Subject: [PATCH 21/55] COMP: Remove deprecated code usages ITKv5 removed deprecated interfaces. --- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h | 2 +- .../test/itkVectorKernelPCATest.cxx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index ed862c2d705..dd76c633e29 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -82,7 +82,7 @@ class ITK_EXPORT GaussianDistanceKernel : public KernelFunctionBase vectorFieldFilenames, typename TVecto int testStatus = EXIT_SUCCESS; typedef itk::MeshFileReader ReaderType; - ReaderType::Pointer meshReader = ReaderType::New(); + typename ReaderType::Pointer meshReader = ReaderType::New(); unsigned int fieldSetCount = vectorFieldFilenames.size(); vectorFieldSet->Reserve(fieldSetCount); @@ -52,9 +52,9 @@ ParseVectorFields(std::vector vectorFieldFilenames, typename TVecto TRY_EXPECT_NO_EXCEPTION(meshReader->Update()); // Get the objects - TMesh::Pointer meshWithField = meshReader->GetOutput(); + typename TMesh::Pointer meshWithField = meshReader->GetOutput(); - TMesh::PointDataContainerPointer pointData = meshWithField->GetPointData(); + typename TMesh::PointDataContainerPointer pointData = meshWithField->GetPointData(); if (setIx == 0) { vectorFieldCount = pointData->Size(); From 340c88de6878b6165a96612b50dfd0abba6a2448 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sat, 16 Dec 2017 19:17:11 -0600 Subject: [PATCH 22/55] ENH: ITKv5 override consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Provide remove virtual and override Use clang-tidy to add ITK_OVERRIDE, and to remove redundant virtual on functions. cd ../ITK; clang-tidy -p ITK-clangtidy $find Modules/[A-J]* -name *.cxx |fgrep -v ThirdParty) -checks=-*,modernize-use-override -header-filter=.* -fix clang-tidy -p ITK-clangtidy $(find Modules/[K-Z]* -name *.cxx |fgrep -v ThirdParty) -checks=-*,modernize-use-override -header-filter=.* -fix https://stackoverflow.com/questions/39932391/virtual-override-or-both-c When you override a function you don't technically need to write either virtual or override. The original base class declaration needs the keyword virtual to mark it as virtual. In the derived class the function is virtual by way of having the ¹same type as the base class function. However, an override can help avoid bugs by producing a compilation error when the intended override isn't technically an override. E.g. that the function type isn't exactly like the base class function. Or that a maintenance of the base class changes that function's type, e.g. adding a defaulted argument. In the same way, a virtual keyword in the derived class can make such a bug more subtle, by ensuring that the function is still is virtual in further derived classes. So the general advice is, virtual for the base class function declaration. This is technically necessary. Use override (only) for a derived class' override. This helps with maintenance. --- .../include/itkVectorFieldPCA.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index dd76c633e29..fb1d326f7a2 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -89,9 +89,9 @@ class ITK_EXPORT GaussianDistanceKernel : public KernelFunctionBase Date: Sat, 16 Dec 2017 19:36:26 -0600 Subject: [PATCH 23/55] COMP: Use C++11 override directly git grep -l "ITK_OVERRIDE" | fgrep -v itk_compiler_detection.h | fgrep -v CMakeLists.txt |fgrep -v .cmake | xargs sed -i '' -e "s/ITK_OVERRIDE/override/g" --- .../include/itkVectorFieldPCA.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index fb1d326f7a2..1e1aecd64eb 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -82,16 +82,16 @@ class ITK_EXPORT GaussianDistanceKernel : public KernelFunctionBase Date: Fri, 22 Dec 2017 08:08:51 -0600 Subject: [PATCH 24/55] ENH: Remove unused variables. --- .../PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx index 57370bd2d3b..24f400f27df 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx @@ -166,7 +166,6 @@ itkVectorKernelPCATest(int argc, char * argv[]) // Should know vector field dimensions now unsigned int vectorFieldDim = 0; - unsigned int vectorFieldCount = 0; // how many vector field sets? std::vector vectorFieldFilenames; From f09d0f9f5faf96b92fcf214ae1395a1c964e58b2 Mon Sep 17 00:00:00 2001 From: Jon Haitz Legarreta Date: Sat, 14 Apr 2018 19:24:28 +0200 Subject: [PATCH 25/55] COMP: Move ITK_DISALLOW_COPY_AND_ASSIGN calls to public section. Move `ITK_DISALLOW_COPY_AND_ASSIGN` calls to public section following the discussion in https://discourse.itk.org/t/noncopyable If legacy (pre-macro) copy and assing methods existed, subsitute them for the `ITK_DISALLOW_COPY_AND_ASSIGN` macro. --- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index 1e1aecd64eb..8aba0044472 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -111,6 +111,8 @@ template Date: Sat, 5 May 2018 12:32:05 +0200 Subject: [PATCH 26/55] COMP: Set the minimum required CMake version to 3.10.2. As agreed in: https://discourse.itk.org/t/cmake-update/870/ Set the `cmake_minimum_required` to version **3.10.2**. --- Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt index f2d0e8329c8..0edc2e6ac8a 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt +++ b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.9.5) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10.2) IF(COMMAND CMAKE_POLICY) CMAKE_POLICY(SET CMP0003 NEW) ENDIF(COMMAND CMAKE_POLICY) From b6db56e787ff889a4ed1a287e471e1a9677c4492 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Mon, 1 Oct 2018 11:12:33 -0400 Subject: [PATCH 27/55] DOC: Add missing LICENSE file --- .../PrincipalComponentsAnalysis/LICENSE | 202 ++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/LICENSE diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/LICENSE b/Modules/Numerics/PrincipalComponentsAnalysis/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From 007d67c1b21e19d6869171acbc21477f895dbeaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Sat, 20 Oct 2018 17:30:10 -0400 Subject: [PATCH 28/55] STYLE: Prefer C++11 type alias over typedef. Prefer C++11 type alias over typedef for the reasons stated here: http://review.source.kitware.com/#/c/23103/ --- .../include/itkVectorFieldPCA.h | 52 +++++++++---------- .../test/itkVectorKernelPCATest.cxx | 26 +++++----- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index 8aba0044472..19862c0eb28 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -55,11 +55,11 @@ template class ITK_EXPORT GaussianDistanceKernel : public KernelFunctionBase { public: - /** Standard class typedefs. */ - typedef GaussianDistanceKernel Self; - typedef KernelFunctionBase Superclass; - typedef SmartPointer Pointer; - typedef SmartPointer ConstPointer; + /** Standard class type alias. */ + using Self = GaussianDistanceKernel; + using Superclass = KernelFunctionBase; + using Pointer = SmartPointer; + using ConstPointer = SmartPointer; /** Run-time type information (and related methods). */ itkTypeMacro(GaussianDistanceKernel, KernelFunction); @@ -113,11 +113,11 @@ class ITK_EXPORT VectorFieldPCA : public Object public: ITK_DISALLOW_COPY_AND_ASSIGN(VectorFieldPCA); - /** Standard class typedefs. */ - typedef VectorFieldPCA Self; - typedef Object Superclass; - typedef SmartPointer Pointer; - typedef SmartPointer ConstPointer; + /** Standard class type alias. */ + using Self = VectorFieldPCA; + using Superclass = Object; + using Pointer = SmartPointer; + using ConstPointer = SmartPointer; /** Method for creation through the object factory. */ itkNewMacro(Self); @@ -126,20 +126,20 @@ class ITK_EXPORT VectorFieldPCA : public Object itkTypeMacro(VectorFieldPCA, Object); /** Type definitions for the PointSet. */ - typedef TPointSetType InputPointSetType; + using InputPointSetType = TPointSetType; /** Definitions for points of the PointSet. */ - typedef typename InputPointSetType::PointType InputPointType; + using InputPointType = typename InputPointSetType::PointType; /** Definitions for the PointsContainer. */ - typedef typename InputPointSetType::PointsContainer PointsContainer; - typedef typename PointsContainer::Iterator PointsContainerIterator; + using PointsContainer = typename InputPointSetType::PointsContainer; + using PointsContainerIterator = typename PointsContainer::Iterator; /** Pointer types for the PointSet. */ - typedef typename InputPointSetType::Pointer InputPointSetPointer; + using InputPointSetPointer = typename InputPointSetType::Pointer; /** Const Pointer type for the PointSet. */ - typedef typename InputPointSetType::ConstPointer InputPointSetConstPointer; + using InputPointSetConstPointer = typename InputPointSetType::ConstPointer; /** * \brief Input PointSet dimension @@ -147,21 +147,21 @@ class ITK_EXPORT VectorFieldPCA : public Object itkStaticConstMacro(InputMeshDimension, unsigned int, TPointSetType::PointDimension); /** type for the vector fields. */ - typedef vnl_matrix VectorFieldType; - typedef VectorContainer VectorFieldSetType; + using VectorFieldType = vnl_matrix; + using VectorFieldSetType = VectorContainer; - typedef typename VectorFieldSetType::Pointer VectorFieldSetTypePointer; - typedef typename VectorFieldSetType::ConstPointer VectorFieldSetTypeConstPointer; + using VectorFieldSetTypePointer = typename VectorFieldSetType::Pointer; + using VectorFieldSetTypeConstPointer = typename VectorFieldSetType::ConstPointer; /** types for the output. */ - typedef vnl_matrix MatrixType; - typedef vnl_vector VectorType; + using MatrixType = vnl_matrix; + using VectorType = vnl_vector; - typedef VectorContainer BasisSetType; - typedef VectorContainer ResSetType; + using BasisSetType = VectorContainer; + using ResSetType = VectorContainer; - typedef typename BasisSetType::Pointer BasisSetTypePointer; - typedef typename KernelFunctionType::Pointer KernelFunctionPointer; + using BasisSetTypePointer = typename BasisSetType::Pointer; + using KernelFunctionPointer = typename KernelFunctionType::Pointer; /** * \brief Set and get the input point set. diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx index 24f400f27df..946247d7a66 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx @@ -30,8 +30,8 @@ ParseVectorFields(std::vector vectorFieldFilenames, typename TVecto { int testStatus = EXIT_SUCCESS; - typedef itk::MeshFileReader ReaderType; - typename ReaderType::Pointer meshReader = ReaderType::New(); + using ReaderType = itk::MeshFileReader; + typename ReaderType::Pointer meshReader = ReaderType::New(); unsigned int fieldSetCount = vectorFieldFilenames.size(); vectorFieldSet->Reserve(fieldSetCount); @@ -113,26 +113,26 @@ itkVectorKernelPCATest(int argc, char * argv[]) const unsigned int Dimension = 3; - typedef double PointDataType; - typedef itk::Array PointDataVectorType; - typedef PointDataVectorType PixelType; - typedef double CoordRep; + using PointDataType = double; + using PointDataVectorType = itk::Array; + using PixelType = PointDataVectorType; + using CoordRep = double; - typedef double PCAResultsType; + using PCAResultsType = double; // Declare the type of the input mesh - typedef itk::Mesh MeshType; + using MeshType = itk::Mesh; // Declare the type of the kernel function class - typedef itk::GaussianDistanceKernel KernelType; + using KernelType = itk::GaussianDistanceKernel; // Declare the type of the PCA calculator - typedef itk::VectorFieldPCA - PCACalculatorType; + using PCACalculatorType = + itk::VectorFieldPCA; // Instantiate the reader - typedef itk::MeshFileReader ReaderType; - ReaderType::Pointer meshReader = ReaderType::New(); + using ReaderType = itk::MeshFileReader; + ReaderType::Pointer meshReader = ReaderType::New(); meshReader->SetFileName(argv[1]); From 7437995b5ba87a3c4943dc3152229fcf7775e9fa Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sat, 3 Nov 2018 10:48:07 -0500 Subject: [PATCH 29/55] COMP: Future proof vnl_math_XXX function usage. Prefer C++ over aliased names vnl_math_[min|max] -> std::[min|max] Prefer vnl_math::abs over deprecated alias vnl_math_abs In all compilers currently supported by VXL, vnl_math_[min|max] could be replaced with std::[min|max] without loss of functionality. This also circumvents part of the backwards compatibility requirements as vnl_math_ has been recently replaced with a namespace of vnl_math::. Since Wed Nov 14 07:42:48 2012: The vnl_math_* functions use #define aliases to their vnl_math::* counterparts in the "real" vnl_math:: namespace. The new syntax should be backwards compatible to VXL versions as old as 2012. Prefer to use itk::Math:: over vnl_math:: namespace --- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx index 92be04802a8..5cbd55665f9 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx @@ -22,7 +22,7 @@ #include "itkVectorFieldPCA.h" #include "vnl/algo/vnl_symmetric_eigensystem.h" #include "vnl/vnl_c_vector.h" -#include "vnl/vnl_math.h" +#include "itkMath.h" namespace itk { From c2ea9edfa3a24a94245a0216d9a6ed03f1f7c33e Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sat, 3 Nov 2018 13:07:59 -0500 Subject: [PATCH 30/55] STYLE: Remove unnecessary vcl_XXX.h headers Now that all supported compilers simply result in vcl_* being an alias to exactly one function signature (i.e. namely the one provided in the std:: namespace) there is no need to use the vcl_ aliases. The vcl_XXX.h headers used in these files are simple files that only include the c++11 standard headers that were already included, thereby making these lines of code completely redundant. Dependance on VCL_CHAR_IS_UNSIGNED variable was removed in favor of std::numeric_limits::is_signed Replaced VCL_LIMIT with NUM_LIMIT to reflect the change made from vcl to std::numeric_limits vxl/scripts/VCL_ModernizeNaming.py --- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h | 2 +- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index 19862c0eb28..9da8c9397b5 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -84,7 +84,7 @@ class ITK_EXPORT GaussianDistanceKernel : public KernelFunctionBase Date: Sun, 23 Dec 2018 19:24:21 -0500 Subject: [PATCH 31/55] STYLE: Cast the binary data to the testing framework. Cast the binary data to the testing framework: move the testing input images to a `test/Input` folder and change the `CMakeLists.txt` file accordingly. --- .../test/CMakeLists.txt | 84 +++++++++---------- .../test/Input/PCATestSurface.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_01.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_02.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_03.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_04.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_05.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_06.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_07.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_08.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_09.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_10.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_11.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_12.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_13.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_14.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_15.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_16.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_17.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_18.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_19.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_20.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_21.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_22.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_23.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_24.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_25.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_26.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_27.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_28.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_29.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_30.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_31.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_32.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_33.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_34.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_35.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_36.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_37.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_38.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_39.vtk.md5 | 1 + .../Input/PCATestSurface_alpha0_40.vtk.md5 | 1 + 42 files changed, 82 insertions(+), 43 deletions(-) create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_01.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_02.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_03.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_04.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_05.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_06.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_07.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_08.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_09.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_10.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_11.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_12.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_13.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_14.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_15.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_16.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_17.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_18.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_19.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_20.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_21.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_22.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_23.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_24.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_25.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_26.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_27.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_28.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_29.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_30.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_31.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_32.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_33.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_34.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_35.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_36.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_37.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_38.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_39.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_40.vtk.md5 diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/CMakeLists.txt b/Modules/Numerics/PrincipalComponentsAnalysis/test/CMakeLists.txt index e8076bec837..9f691f972c4 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/CMakeLists.txt +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/CMakeLists.txt @@ -3,8 +3,6 @@ itk_module_test() set(PCA PrincipalComponentsAnalysis) set(${PCA}Tests itkVectorKernelPCATest.cxx) -set(TEST_DATA_ROOT ${${PCA}_SOURCE_DIR}/Data) - createtestdriver(${PCA} "${${PCA}-Test_LIBRARIES}" "${${PCA}Tests}") itk_add_test( @@ -12,45 +10,45 @@ itk_add_test( COMMAND ${PCA}TestDriver itkVectorKernelPCATest - DATA{${TEST_DATA_ROOT}/PCATestSurface.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_01.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_02.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_03.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_04.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_05.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_06.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_07.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_08.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_09.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_10.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_11.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_12.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_13.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_14.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_15.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_16.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_17.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_18.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_19.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_20.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_21.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_22.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_23.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_24.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_25.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_26.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_27.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_28.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_29.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_30.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_31.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_32.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_33.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_34.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_35.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_36.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_37.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_38.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_39.vtk} - DATA{${TEST_DATA_ROOT}/PCATestSurface_alpha0_40.vtk} + DATA{Input/PCATestSurface.vtk} + DATA{Input/PCATestSurface_alpha0_01.vtk} + DATA{Input/PCATestSurface_alpha0_02.vtk} + DATA{Input/PCATestSurface_alpha0_03.vtk} + DATA{Input/PCATestSurface_alpha0_04.vtk} + DATA{Input/PCATestSurface_alpha0_05.vtk} + DATA{Input/PCATestSurface_alpha0_06.vtk} + DATA{Input/PCATestSurface_alpha0_07.vtk} + DATA{Input/PCATestSurface_alpha0_08.vtk} + DATA{Input/PCATestSurface_alpha0_09.vtk} + DATA{Input/PCATestSurface_alpha0_10.vtk} + DATA{Input/PCATestSurface_alpha0_11.vtk} + DATA{Input/PCATestSurface_alpha0_12.vtk} + DATA{Input/PCATestSurface_alpha0_13.vtk} + DATA{Input/PCATestSurface_alpha0_14.vtk} + DATA{Input/PCATestSurface_alpha0_15.vtk} + DATA{Input/PCATestSurface_alpha0_16.vtk} + DATA{Input/PCATestSurface_alpha0_17.vtk} + DATA{Input/PCATestSurface_alpha0_18.vtk} + DATA{Input/PCATestSurface_alpha0_19.vtk} + DATA{Input/PCATestSurface_alpha0_20.vtk} + DATA{Input/PCATestSurface_alpha0_21.vtk} + DATA{Input/PCATestSurface_alpha0_22.vtk} + DATA{Input/PCATestSurface_alpha0_23.vtk} + DATA{Input/PCATestSurface_alpha0_24.vtk} + DATA{Input/PCATestSurface_alpha0_25.vtk} + DATA{Input/PCATestSurface_alpha0_26.vtk} + DATA{Input/PCATestSurface_alpha0_27.vtk} + DATA{Input/PCATestSurface_alpha0_28.vtk} + DATA{Input/PCATestSurface_alpha0_29.vtk} + DATA{Input/PCATestSurface_alpha0_30.vtk} + DATA{Input/PCATestSurface_alpha0_31.vtk} + DATA{Input/PCATestSurface_alpha0_32.vtk} + DATA{Input/PCATestSurface_alpha0_33.vtk} + DATA{Input/PCATestSurface_alpha0_34.vtk} + DATA{Input/PCATestSurface_alpha0_35.vtk} + DATA{Input/PCATestSurface_alpha0_36.vtk} + DATA{Input/PCATestSurface_alpha0_37.vtk} + DATA{Input/PCATestSurface_alpha0_38.vtk} + DATA{Input/PCATestSurface_alpha0_39.vtk} + DATA{Input/PCATestSurface_alpha0_40.vtk} ) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface.vtk.md5 new file mode 100644 index 00000000000..9fa915b0dea --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface.vtk.md5 @@ -0,0 +1 @@ +946b00e0b2fe7f5563c3a44c61e348f4 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_01.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_01.vtk.md5 new file mode 100644 index 00000000000..cbdea49524e --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_01.vtk.md5 @@ -0,0 +1 @@ +c9a7509b24a1cfb2e7e574bf77af2ce1 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_02.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_02.vtk.md5 new file mode 100644 index 00000000000..aa35c3840c9 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_02.vtk.md5 @@ -0,0 +1 @@ +6f798fc9e0408ff6ec04b098851ece5b \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_03.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_03.vtk.md5 new file mode 100644 index 00000000000..32e08269195 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_03.vtk.md5 @@ -0,0 +1 @@ +e480a2cfb8f93af91306f1de0c2e9680 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_04.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_04.vtk.md5 new file mode 100644 index 00000000000..bc88c19653f --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_04.vtk.md5 @@ -0,0 +1 @@ +7570f3eeab9393d03e023273b9759ff2 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_05.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_05.vtk.md5 new file mode 100644 index 00000000000..03f5259f564 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_05.vtk.md5 @@ -0,0 +1 @@ +ea29a24d46b0270988b27f9289755890 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_06.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_06.vtk.md5 new file mode 100644 index 00000000000..2a060efd10e --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_06.vtk.md5 @@ -0,0 +1 @@ +d4bf5fbb8810fbae8d514820852630f9 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_07.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_07.vtk.md5 new file mode 100644 index 00000000000..f9dbdac1439 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_07.vtk.md5 @@ -0,0 +1 @@ +f78a436b66ee444aee2f4fc0c530dfd0 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_08.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_08.vtk.md5 new file mode 100644 index 00000000000..2613b5ba7af --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_08.vtk.md5 @@ -0,0 +1 @@ +1edcf9de2b68a74888180d45be7c06b0 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_09.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_09.vtk.md5 new file mode 100644 index 00000000000..a0cbf21507b --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_09.vtk.md5 @@ -0,0 +1 @@ +3398b7edee561c6f200e639a9bd16d55 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_10.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_10.vtk.md5 new file mode 100644 index 00000000000..cca40bf94d5 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_10.vtk.md5 @@ -0,0 +1 @@ +daafa4a295474c79a045ed39777e6bde \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_11.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_11.vtk.md5 new file mode 100644 index 00000000000..0e70b250f57 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_11.vtk.md5 @@ -0,0 +1 @@ +7d0bf66609c1145e372ce0b8f280862b \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_12.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_12.vtk.md5 new file mode 100644 index 00000000000..9551ae0537a --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_12.vtk.md5 @@ -0,0 +1 @@ +7a356036b2e73f3508d4d2e83087c2e4 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_13.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_13.vtk.md5 new file mode 100644 index 00000000000..7ef42044fb5 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_13.vtk.md5 @@ -0,0 +1 @@ +8d92ef78f2589a2a9337514739919e31 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_14.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_14.vtk.md5 new file mode 100644 index 00000000000..f1af0a61213 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_14.vtk.md5 @@ -0,0 +1 @@ +e92acf218345c841c7007a275c858270 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_15.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_15.vtk.md5 new file mode 100644 index 00000000000..aa1efd2ec3d --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_15.vtk.md5 @@ -0,0 +1 @@ +1755154a2cce848a5be0f9eedb5c64ce \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_16.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_16.vtk.md5 new file mode 100644 index 00000000000..1bc6ff7c898 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_16.vtk.md5 @@ -0,0 +1 @@ +a906df735d6c6ef7986d4f67bcf097d0 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_17.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_17.vtk.md5 new file mode 100644 index 00000000000..6fea5545abc --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_17.vtk.md5 @@ -0,0 +1 @@ +448650da51b3fe0c7650714b8c916de8 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_18.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_18.vtk.md5 new file mode 100644 index 00000000000..0eec6174715 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_18.vtk.md5 @@ -0,0 +1 @@ +9f35569571d9c81da1dbb6a98f6a7eb4 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_19.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_19.vtk.md5 new file mode 100644 index 00000000000..45bfc7c46a0 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_19.vtk.md5 @@ -0,0 +1 @@ +4e96aaebf855205365b921b350bfbc88 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_20.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_20.vtk.md5 new file mode 100644 index 00000000000..176bfe5a94e --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_20.vtk.md5 @@ -0,0 +1 @@ +7db3c1d556b6645265285fe44ed73783 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_21.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_21.vtk.md5 new file mode 100644 index 00000000000..27906f0d35c --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_21.vtk.md5 @@ -0,0 +1 @@ +5959353f4a77f1b8f24ff464089641b4 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_22.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_22.vtk.md5 new file mode 100644 index 00000000000..33ee868a8c5 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_22.vtk.md5 @@ -0,0 +1 @@ +4946e4386b66153de70bf2d277bc2522 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_23.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_23.vtk.md5 new file mode 100644 index 00000000000..c3db42f6d00 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_23.vtk.md5 @@ -0,0 +1 @@ +8742937b329ff70ce963c7c5967e325b \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_24.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_24.vtk.md5 new file mode 100644 index 00000000000..fe76d958bea --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_24.vtk.md5 @@ -0,0 +1 @@ +d079af9c5bb8eeab04a72a1072fd4d8a \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_25.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_25.vtk.md5 new file mode 100644 index 00000000000..9c5cbf41dec --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_25.vtk.md5 @@ -0,0 +1 @@ +bdbf327ea97b3a29803e424bfb884780 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_26.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_26.vtk.md5 new file mode 100644 index 00000000000..17714ed482c --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_26.vtk.md5 @@ -0,0 +1 @@ +aa958a226c2e7afe60dc56d02946d883 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_27.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_27.vtk.md5 new file mode 100644 index 00000000000..107f4108c32 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_27.vtk.md5 @@ -0,0 +1 @@ +9f3a6f5c1f5c6a359b83cacddcfd5d52 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_28.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_28.vtk.md5 new file mode 100644 index 00000000000..65c81d434b5 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_28.vtk.md5 @@ -0,0 +1 @@ +a7428b8ec4497754ab26ef9fc5c15f26 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_29.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_29.vtk.md5 new file mode 100644 index 00000000000..8b28e6ecaf1 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_29.vtk.md5 @@ -0,0 +1 @@ +654ba519df5ebc49250cb040bf793741 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_30.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_30.vtk.md5 new file mode 100644 index 00000000000..5a3a39b5d60 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_30.vtk.md5 @@ -0,0 +1 @@ +0eb4c856d2f153f8fe81e276cd6126aa \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_31.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_31.vtk.md5 new file mode 100644 index 00000000000..8079b063da9 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_31.vtk.md5 @@ -0,0 +1 @@ +406c320f824fa95a6dbd49fb43aaf2da \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_32.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_32.vtk.md5 new file mode 100644 index 00000000000..dda2dc6a08b --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_32.vtk.md5 @@ -0,0 +1 @@ +6ab6950b619230435a49ecafb99e0e12 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_33.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_33.vtk.md5 new file mode 100644 index 00000000000..4ffae390c28 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_33.vtk.md5 @@ -0,0 +1 @@ +c59174cc52ead4045c840d1025b0fdeb \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_34.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_34.vtk.md5 new file mode 100644 index 00000000000..c1843066b44 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_34.vtk.md5 @@ -0,0 +1 @@ +8a2d2baa9aa301e72718924ea1d9c867 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_35.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_35.vtk.md5 new file mode 100644 index 00000000000..e4794ae92d6 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_35.vtk.md5 @@ -0,0 +1 @@ +be60a2cd311a8f6d4ec192888423648a \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_36.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_36.vtk.md5 new file mode 100644 index 00000000000..3b803dc47cc --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_36.vtk.md5 @@ -0,0 +1 @@ +64fdabd488ee57b068426b389c85f482 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_37.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_37.vtk.md5 new file mode 100644 index 00000000000..c0ec97463cc --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_37.vtk.md5 @@ -0,0 +1 @@ +511967941f004c7d0f13dcc528166aa7 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_38.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_38.vtk.md5 new file mode 100644 index 00000000000..d28ee2f6b82 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_38.vtk.md5 @@ -0,0 +1 @@ +83f437bc8fa1455015d5a70181197e9e \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_39.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_39.vtk.md5 new file mode 100644 index 00000000000..929234834c8 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_39.vtk.md5 @@ -0,0 +1 @@ +0f10cd353096b319141dff43f6110cbe \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_40.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_40.vtk.md5 new file mode 100644 index 00000000000..70ac9e08efe --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_40.vtk.md5 @@ -0,0 +1 @@ +aac2e4637eeb233551570eb00546782b \ No newline at end of file From b6ee01b642b3df1674055e0f3cf18d5ff3601f25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Sun, 23 Dec 2018 19:28:42 -0500 Subject: [PATCH 32/55] ENH: Use the ITK CMake macros to build examples. Use the ITK CMake macros to build the examples module. --- Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt index 0edc2e6ac8a..ca0d93cadc1 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt +++ b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt @@ -14,10 +14,7 @@ ELSE() itk_module_impl() ENDIF() -CMAKE_DEPENDENT_OPTION(Module_${PCA}_BUILD_EXAMPLES "Build the examples" OFF "BUILD_EXAMPLES" OFF) -if(Module_${PCA}_BUILD_EXAMPLES) - ADD_SUBDIRECTORY( examples ) -ENDIF() +itk_module_examples() CMAKE_DEPENDENT_OPTION(Module_${PCA}_BUILD_DOCUMENTATION "Generate documentation from LaTeX files, source code examples and result screenshots" OFF From 8fe60f1d832edf2f76a8961427046341d44d4f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Sun, 23 Dec 2018 19:31:08 -0500 Subject: [PATCH 33/55] STYLE: Remove tabs as per ITK style. Remove tabs as per ITK style: change for double white space. --- Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt index 0edc2e6ac8a..c8403339674 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt +++ b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt @@ -21,7 +21,7 @@ ENDIF() CMAKE_DEPENDENT_OPTION(Module_${PCA}_BUILD_DOCUMENTATION "Generate documentation from LaTeX files, source code examples and result screenshots" OFF - "BUILD_DOCUMENTATION" OFF) + "BUILD_DOCUMENTATION" OFF) IF(Module_${PCA}_BUILD_DOCUMENTATION) ADD_SUBDIRECTORY( doc ) ENDIF() From e1cd79003a1163694d8ec86c2e4c217a51e10405 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Wed, 2 Jan 2019 22:29:35 -0500 Subject: [PATCH 34/55] BUG: Rename wrapping/wrapping.cmake to wrapping/CMakeLists.txt CMakeLists.txt is the expected filename --- .../wrapping/{wrapping.cmake => CMakeLists.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Modules/Numerics/PrincipalComponentsAnalysis/wrapping/{wrapping.cmake => CMakeLists.txt} (100%) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/wrapping/wrapping.cmake b/Modules/Numerics/PrincipalComponentsAnalysis/wrapping/CMakeLists.txt similarity index 100% rename from Modules/Numerics/PrincipalComponentsAnalysis/wrapping/wrapping.cmake rename to Modules/Numerics/PrincipalComponentsAnalysis/wrapping/CMakeLists.txt From f30dcd9ccdd65695675b20e35387ef644d0b79d4 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Wed, 2 Jan 2019 22:32:48 -0500 Subject: [PATCH 35/55] BUG: ITK_EXPORT to ITK_TEMPLATE_EXPORT --- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h | 4 ++-- .../PrincipalComponentsAnalysis/wrapping/CMakeLists.txt | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index 9da8c9397b5..7ec6454a84f 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -52,7 +52,7 @@ namespace itk */ template -class ITK_EXPORT GaussianDistanceKernel : public KernelFunctionBase +class ITK_TEMPLATE_EXPORT GaussianDistanceKernel : public KernelFunctionBase { public: /** Standard class type alias. */ @@ -108,7 +108,7 @@ template , class TPointSetType = PointSet>> -class ITK_EXPORT VectorFieldPCA : public Object +class ITK_TEMPLATE_EXPORT VectorFieldPCA : public Object { public: ITK_DISALLOW_COPY_AND_ASSIGN(VectorFieldPCA); diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/wrapping/CMakeLists.txt b/Modules/Numerics/PrincipalComponentsAnalysis/wrapping/CMakeLists.txt index 766e6f42a41..de38eb1e8bd 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/wrapping/CMakeLists.txt +++ b/Modules/Numerics/PrincipalComponentsAnalysis/wrapping/CMakeLists.txt @@ -1,5 +1,4 @@ itk_wrap_module(PrincipalComponentsAnalysis) - set(WRAPPER_SUBMODULE_ORDER) itk_auto_load_submodules() itk_end_wrap_module() From cc1a3ebfa1d534f72ab90fcba241b38c3b5b4ad5 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Wed, 2 Jan 2019 22:35:57 -0500 Subject: [PATCH 36/55] COMP: Allow compiler to find itk::GaussianDistanceKernel definition This is currently defined in itkVectorfieldPCA.h. --- ...ussianDistanceKernel.wrap => itkGaussianDistanceKernel.wrap} | 2 ++ 1 file changed, 2 insertions(+) rename Modules/Numerics/PrincipalComponentsAnalysis/wrapping/{GaussianDistanceKernel.wrap => itkGaussianDistanceKernel.wrap} (68%) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/wrapping/GaussianDistanceKernel.wrap b/Modules/Numerics/PrincipalComponentsAnalysis/wrapping/itkGaussianDistanceKernel.wrap similarity index 68% rename from Modules/Numerics/PrincipalComponentsAnalysis/wrapping/GaussianDistanceKernel.wrap rename to Modules/Numerics/PrincipalComponentsAnalysis/wrapping/itkGaussianDistanceKernel.wrap index dd1ab35dfe5..3277fd74733 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/wrapping/GaussianDistanceKernel.wrap +++ b/Modules/Numerics/PrincipalComponentsAnalysis/wrapping/itkGaussianDistanceKernel.wrap @@ -1,3 +1,5 @@ +set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) +itk_wrap_include("itkVectorFieldPCA.h") itk_wrap_class("itk::GaussianDistanceKernel" POINTER) foreach(r ${WRAP_ITK_REAL}) itk_wrap_template("${ITKM_${r}}" "${ITKT_${r}}") From 7ee16b7e6b8fa3ffd919af3f71932163a229eb4c Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Wed, 2 Jan 2019 22:38:45 -0500 Subject: [PATCH 37/55] COMP: Fix Evaluate argument and return value types To address: /home/matt/src/ITKPrincipalComponentsAnalysis/include/itkVectorFieldPCA.h:81:50: error: non-virtual member function marked 'override' hides virtual member function inline double Evaluate (const double& u) const override ^ /home/matt/bin/ITK2-Wrap-MinSizeRel/Wrapping/itkGaussianDistanceKernel.cxx:27:18: note: in instantiation of template class 'itk::GaussianDistanceKernel' requested here typedef itk::GaussianDistanceKernel< float >::Pointer itkGaussianDistanceKernelF_Pointer; ^ /home/matt/src/ITK2/Modules/Core/Common/include/itkKernelFunctionBase.h:58:18: note: hidden overloaded virtual function 'itk::KernelFunctionBase::Evaluate' declared here: type mismatch at 1st parameter ('const float &' vs 'const double &') TRealValueType Evaluate(const TRealValueType & u) const override = 0; --- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index 7ec6454a84f..8d86b45fd94 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -81,8 +81,8 @@ class ITK_TEMPLATE_EXPORT GaussianDistanceKernel : public KernelFunctionBase Date: Fri, 14 Jun 2019 20:28:55 -0400 Subject: [PATCH 38/55] STYLE: Add ITK prefix to testing macros --- .../test/itkVectorKernelPCATest.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx index 946247d7a66..4ffb981f1ec 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx @@ -49,7 +49,7 @@ ParseVectorFields(std::vector vectorFieldFilenames, typename TVecto meshReader->SetFileName(vectorFieldName); - TRY_EXPECT_NO_EXCEPTION(meshReader->Update()); + ITK_TRY_EXPECT_NO_EXCEPTION(meshReader->Update()); // Get the objects typename TMesh::Pointer meshWithField = meshReader->GetOutput(); @@ -136,7 +136,7 @@ itkVectorKernelPCATest(int argc, char * argv[]) meshReader->SetFileName(argv[1]); - TRY_EXPECT_NO_EXCEPTION(meshReader->Update()); + ITK_TRY_EXPECT_NO_EXCEPTION(meshReader->Update()); // Get the input mesh @@ -145,11 +145,11 @@ itkVectorKernelPCATest(int argc, char * argv[]) PCACalculatorType::Pointer pcaCalc = PCACalculatorType::New(); - EXERCISE_BASIC_OBJECT_METHODS(pcaCalc, VectorFieldPCA, Object); + ITK_EXERCISE_BASIC_OBJECT_METHODS(pcaCalc, VectorFieldPCA, Object); // Test exception when trying to compute before setting much of anything - TRY_EXPECT_EXCEPTION(pcaCalc->Compute()); + ITK_TRY_EXPECT_EXCEPTION(pcaCalc->Compute()); // Set user variables @@ -158,7 +158,7 @@ itkVectorKernelPCATest(int argc, char * argv[]) // Connect the input pcaCalc->SetPointSet(mesh); - TEST_SET_GET_VALUE(mesh, pcaCalc->GetPointSet()); + ITK_TEST_SET_GET_VALUE(mesh, pcaCalc->GetPointSet()); // Set vector fields @@ -182,11 +182,11 @@ itkVectorKernelPCATest(int argc, char * argv[]) ParseVectorFields(vectorFieldFilenames, vectorFieldSet); pcaCalc->SetVectorFieldSet(vectorFieldSet); - TEST_SET_GET_VALUE(vectorFieldSet, pcaCalc->GetVectorFieldSet()); + ITK_TEST_SET_GET_VALUE(vectorFieldSet, pcaCalc->GetVectorFieldSet()); // Execute the PCA calculator - TRY_EXPECT_NO_EXCEPTION(pcaCalc->Compute()); + ITK_TRY_EXPECT_NO_EXCEPTION(pcaCalc->Compute()); double kernelSigma = 6.25; @@ -258,7 +258,7 @@ itkVectorKernelPCATest(int argc, char * argv[]) // than the number of vector field sets pcaCalc->SetComponentCount(fieldSetCount + 1); - TRY_EXPECT_EXCEPTION(pcaCalc->Compute()); + ITK_TRY_EXPECT_EXCEPTION(pcaCalc->Compute()); std::cout << "Test finished." << std::endl; From ab04d4165650c1442a4beb61bd7fc8827a5f217f Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Wed, 19 Feb 2020 17:11:56 -0600 Subject: [PATCH 39/55] ENH: Add .gitattributes to allow running ITK clang-formatting scripts ``` git filter-branch -f \ --tree-filter "~/ITK/Utilities/Maintenance/clang-format.bash --clang-format ~/Dashboard/src/ITK-clang11/clang-format-Linux --tracked" \ master.. ``` --- .../test/itkVectorKernelPCATest.cxx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx index 4ffb981f1ec..bcdaa4c09b5 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx @@ -147,7 +147,6 @@ itkVectorKernelPCATest(int argc, char * argv[]) ITK_EXERCISE_BASIC_OBJECT_METHODS(pcaCalc, VectorFieldPCA, Object); - // Test exception when trying to compute before setting much of anything ITK_TRY_EXPECT_EXCEPTION(pcaCalc->Compute()); @@ -184,11 +183,9 @@ itkVectorKernelPCATest(int argc, char * argv[]) pcaCalc->SetVectorFieldSet(vectorFieldSet); ITK_TEST_SET_GET_VALUE(vectorFieldSet, pcaCalc->GetVectorFieldSet()); - // Execute the PCA calculator ITK_TRY_EXPECT_NO_EXCEPTION(pcaCalc->Compute()); - double kernelSigma = 6.25; KernelType::Pointer distKernel = KernelType::New(); distKernel->SetKernelSigma(kernelSigma); @@ -260,7 +257,6 @@ itkVectorKernelPCATest(int argc, char * argv[]) ITK_TRY_EXPECT_EXCEPTION(pcaCalc->Compute()); - std::cout << "Test finished." << std::endl; return testStatus; } From 9cd32ed4b3cfb4e876e12c3bd24ffc897c526134 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sun, 16 Feb 2020 10:13:46 -0600 Subject: [PATCH 40/55] STYLE: Convert CMake-language commands to lower case Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. --- .../CMakeLists.txt | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt index 198d466bdc1..05f4d055195 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt +++ b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt @@ -1,24 +1,21 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.10.2) -IF(COMMAND CMAKE_POLICY) - CMAKE_POLICY(SET CMP0003 NEW) -ENDIF(COMMAND CMAKE_POLICY) +if(COMMAND CMAKE_POLICY) + cmake_policy(SET CMP0003 NEW) +endif(COMMAND CMAKE_POLICY) -SET(PCA PrincipalComponentsAnalysis) -PROJECT(${PCA}) +set(PCA PrincipalComponentsAnalysis) +project(${PCA}) -IF(NOT ITK_SOURCE_DIR) - FIND_PACKAGE(ITK REQUIRED) - LIST(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR}) - INCLUDE(ITKModuleExternal) -ELSE() - itk_module_impl() -ENDIF() +itk_module_impl() itk_module_examples() - -CMAKE_DEPENDENT_OPTION(Module_${PCA}_BUILD_DOCUMENTATION "Generate documentation from LaTeX files, source code examples and result screenshots" OFF - "BUILD_DOCUMENTATION" OFF) -IF(Module_${PCA}_BUILD_DOCUMENTATION) - ADD_SUBDIRECTORY( doc ) -ENDIF() +cmake_dependent_option( + Module_${PCA}_BUILD_DOCUMENTATION + "Generate documentation from LaTeX files, source code examples and result screenshots" + OFF + "BUILD_DOCUMENTATION" + OFF +) +if(Module_${PCA}_BUILD_DOCUMENTATION) + add_subdirectory(doc) +endif() From ad96aa89c79f80abdc09a16758e2d59926c82ba4 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sun, 16 Feb 2020 22:30:06 -0600 Subject: [PATCH 41/55] PERF: emplace_back method results in potentially more efficient code The check flags insertions to an STL-style container done by calling the push_back method with an explicitly-constructed temporary of the container element type. In this case, the corresponding emplace_back method results in less verbose and potentially more efficient code. --- .../PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx index bcdaa4c09b5..a3826f2e272 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx @@ -172,7 +172,7 @@ itkVectorKernelPCATest(int argc, char * argv[]) unsigned int fieldSetCount = argc - firstVectorFieldIdx; for (unsigned int i = firstVectorFieldIdx; i < firstVectorFieldIdx + fieldSetCount; i++) { - vectorFieldFilenames.push_back(argv[i]); + vectorFieldFilenames.emplace_back(argv[i]); } PCACalculatorType::VectorFieldSetTypePointer vectorFieldSet = PCACalculatorType::VectorFieldSetType::New(); From 31c44b1e2169ace2b3637ee7ca9979e89842a300 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Mon, 17 Feb 2020 14:29:54 -0600 Subject: [PATCH 42/55] STYLE: Prefer = default to explicitly trivial implementations This check replaces default bodies of special member functions with = default;. The explicitly defaulted function declarations enable more opportunities in optimization, because the compiler might treat explicitly defaulted functions as trivial. Additionally, the C++11 use of = default more clearly expreses the intent for the special member functions. --- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index 8d86b45fd94..17ab2a6f591 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -88,8 +88,8 @@ class ITK_TEMPLATE_EXPORT GaussianDistanceKernel : public KernelFunctionBase Date: Mon, 17 Feb 2020 14:48:29 -0600 Subject: [PATCH 43/55] STYLE: Remove redundant void argument lists Find and remove redundant void argument lists. --- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index 17ab2a6f591..666dfefa394 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -192,7 +192,7 @@ class ITK_TEMPLATE_EXPORT VectorFieldPCA : public Object the calculator will perform Kernel PCA. */ void - Compute(void); + Compute(); /** * \brief Return the results. From f89074190b2bad315c50bc8852be498b4c8c8470 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Mon, 17 Feb 2020 15:50:17 -0600 Subject: [PATCH 44/55] STYLE: Use default member initialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Converts a default constructor’s member initializers into the new default member initializers in C++11. Other member initializers that match the default member initializer are removed. This can reduce repeated code or allow use of ‘= default’. --- .../include/itkVectorFieldPCA.h | 12 ++++++------ .../include/itkVectorFieldPCA.hxx | 7 +------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index 666dfefa394..38d336c6a0e 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -224,17 +224,17 @@ class ITK_TEMPLATE_EXPORT VectorFieldPCA : public Object KernelFunctionPointer m_KernelFunction; // Problem dimensions - unsigned int m_ComponentCount; - unsigned int m_SetSize; - unsigned int m_VectorDimCount; - unsigned int m_VertexCount; - unsigned int m_PointDim; + unsigned int m_ComponentCount{ 0 }; + unsigned int m_SetSize{ 0 }; + unsigned int m_VectorDimCount{ 0 }; + unsigned int m_VertexCount{ 0 }; + unsigned int m_PointDim{ 0 }; MatrixType m_V0; MatrixType m_AveVectorField; MatrixType m_K; - bool m_PCACalculated; + bool m_PCACalculated{ false }; }; } // end namespace itk diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx index 273afb6cd40..f842818974b 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx @@ -40,12 +40,7 @@ VectorFieldPCA::VectorFieldPCA() : m_BasisVectors(BasisSetType::New()) - , m_ComponentCount(0) - , m_SetSize(0) - , m_VectorDimCount(0) - , m_VertexCount(0) - , m_PointDim(0) - , m_PCACalculated(false) + {} template Date: Wed, 19 Feb 2020 10:45:26 -0600 Subject: [PATCH 45/55] DOC: Update copyright assignment to NumFOCUS The mission of NumFOCUS is to promote open practices in research, data, and scientific computing. https://numfocus.org --- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h | 2 +- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx | 2 +- .../PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index 38d336c6a0e..732401519e6 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -1,6 +1,6 @@ /*========================================================================= * - * Copyright Insight Software Consortium + * Copyright NumFOCUS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx index f842818974b..6646d9fa545 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx @@ -1,6 +1,6 @@ /*========================================================================= * - * Copyright Insight Software Consortium + * Copyright NumFOCUS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx index a3826f2e272..89ea91dc748 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx @@ -1,6 +1,6 @@ /*========================================================================= * - * Copyright Insight Software Consortium + * Copyright NumFOCUS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 529a6a8cb45e7c6f75ae8e1f7922c332f9d68ef5 Mon Sep 17 00:00:00 2001 From: Mathew Seng Date: Wed, 14 Oct 2020 12:05:15 -0500 Subject: [PATCH 46/55] STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE Fixes changes made in #2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF. --- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index 732401519e6..bd72a110bec 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -111,7 +111,7 @@ template Date: Fri, 17 Dec 2021 08:55:53 -0600 Subject: [PATCH 47/55] COMP: Remove inclusion of .hxx files as headers The ability to include either .h or .hxx files as header files required recursively reading the .h files twice. The added complexity is unnecessary, costly, and can confuse static analysis tools that monitor header guardes (due to reaching the maximum depth of recursion limits for nested #ifdefs in checking). --- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx | 1 - 1 file changed, 1 deletion(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx index 6646d9fa545..ff3935b8d47 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx @@ -19,7 +19,6 @@ #ifndef itkVectorFieldPCA_hxx #define itkVectorFieldPCA_hxx -#include "itkVectorFieldPCA.h" #include "vnl/algo/vnl_symmetric_eigensystem.h" #include "vnl/vnl_c_vector.h" #include "itkMath.h" From 47cef39b5bafde5bca89525b57617b69abbebcce Mon Sep 17 00:00:00 2001 From: Tom Birdsong Date: Tue, 31 May 2022 11:54:12 -0400 Subject: [PATCH 48/55] ENH: Bump ITK and replace http with https using script --- Modules/Numerics/PrincipalComponentsAnalysis/LICENSE | 4 ++-- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h | 4 ++-- .../PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx | 2 +- .../test/itkVectorKernelPCATest.cxx | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/LICENSE b/Modules/Numerics/PrincipalComponentsAnalysis/LICENSE index d6456956733..62589edd12a 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/LICENSE +++ b/Modules/Numerics/PrincipalComponentsAnalysis/LICENSE @@ -1,7 +1,7 @@ Apache License Version 2.0, January 2004 - http://www.apache.org/licenses/ + https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -193,7 +193,7 @@ you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index bd72a110bec..c65d3e5d622 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0.txt + * https://www.apache.org/licenses/LICENSE-2.0.txt * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -45,7 +45,7 @@ namespace itk * This code was contributed in the Insight Journal paper: * * "Principal Components Analysis of Scalar, Vector, and Mesh Vertex Data" - * http://www.insight-journal.org/browse/publication/878 + * https://www.insight-journal.org/browse/publication/878 * * \ingroup ITKStatistics * \ingroup PrincipalComponentsAnalysis diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx index ff3935b8d47..700b15ca38b 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.hxx @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0.txt + * https://www.apache.org/licenses/LICENSE-2.0.txt * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx index 89ea91dc748..a9f0dbdf503 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0.txt + * https://www.apache.org/licenses/LICENSE-2.0.txt * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, From fd3f8952f226b295b4f2e6180dcd067ab9287cef Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Wed, 22 Apr 2026 18:54:16 -0500 Subject: [PATCH 49/55] ENH: Convert from md5 to .cid tags. --- .../test/Input/PCATestSurface.vtk.cid | 1 + .../test/Input/PCATestSurface.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_01.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_01.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_02.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_02.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_03.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_03.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_04.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_04.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_05.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_05.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_06.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_06.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_07.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_07.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_08.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_08.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_09.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_09.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_10.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_10.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_11.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_11.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_12.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_12.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_13.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_13.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_14.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_14.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_15.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_15.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_16.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_16.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_17.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_17.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_18.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_18.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_19.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_19.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_20.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_20.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_21.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_21.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_22.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_22.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_23.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_23.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_24.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_24.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_25.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_25.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_26.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_26.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_27.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_27.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_28.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_28.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_29.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_29.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_30.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_30.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_31.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_31.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_32.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_32.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_33.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_33.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_34.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_34.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_35.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_35.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_36.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_36.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_37.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_37.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_38.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_38.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_39.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_39.vtk.md5 | 1 - .../test/Input/PCATestSurface_alpha0_40.vtk.cid | 1 + .../test/Input/PCATestSurface_alpha0_40.vtk.md5 | 1 - 82 files changed, 41 insertions(+), 41 deletions(-) create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_01.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_01.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_02.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_02.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_03.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_03.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_04.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_04.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_05.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_05.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_06.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_06.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_07.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_07.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_08.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_08.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_09.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_09.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_10.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_10.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_11.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_11.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_12.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_12.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_13.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_13.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_14.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_14.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_15.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_15.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_16.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_16.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_17.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_17.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_18.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_18.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_19.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_19.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_20.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_20.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_21.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_21.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_22.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_22.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_23.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_23.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_24.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_24.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_25.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_25.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_26.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_26.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_27.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_27.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_28.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_28.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_29.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_29.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_30.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_30.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_31.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_31.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_32.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_32.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_33.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_33.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_34.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_34.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_35.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_35.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_36.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_36.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_37.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_37.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_38.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_38.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_39.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_39.vtk.md5 create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_40.vtk.cid delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_40.vtk.md5 diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface.vtk.cid new file mode 100644 index 00000000000..1add67feb28 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface.vtk.cid @@ -0,0 +1 @@ +bafkreigbd7acneovictxmru3dswl3d4adf6yn4ebjzeoo7itmyivurt7ki diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface.vtk.md5 deleted file mode 100644 index 9fa915b0dea..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -946b00e0b2fe7f5563c3a44c61e348f4 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_01.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_01.vtk.cid new file mode 100644 index 00000000000..804f52cbdca --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_01.vtk.cid @@ -0,0 +1 @@ +bafkreifcoh7xw7vto737pbvhxq2yxzdifoomtqlhd5bwe4yabuttldurzi diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_01.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_01.vtk.md5 deleted file mode 100644 index cbdea49524e..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_01.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -c9a7509b24a1cfb2e7e574bf77af2ce1 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_02.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_02.vtk.cid new file mode 100644 index 00000000000..6efc0056ded --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_02.vtk.cid @@ -0,0 +1 @@ +bafkreief5y3ievizak7qgtf6iaobfimv6fka5e2pdncy3qfv7rnnpidh64 diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_02.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_02.vtk.md5 deleted file mode 100644 index aa35c3840c9..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_02.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -6f798fc9e0408ff6ec04b098851ece5b \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_03.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_03.vtk.cid new file mode 100644 index 00000000000..a3b088ed3c1 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_03.vtk.cid @@ -0,0 +1 @@ +bafkreihmxc72c2dx3ruavcaaiqwwv4mue67kceokqg3fcu3k74exsnoxma diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_03.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_03.vtk.md5 deleted file mode 100644 index 32e08269195..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_03.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -e480a2cfb8f93af91306f1de0c2e9680 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_04.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_04.vtk.cid new file mode 100644 index 00000000000..d23561f0a6b --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_04.vtk.cid @@ -0,0 +1 @@ +bafkreihmqlehsjjwkvid3r2cvvaabtr6lwicwyoyvhaadvjovshaxercdi diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_04.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_04.vtk.md5 deleted file mode 100644 index bc88c19653f..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_04.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -7570f3eeab9393d03e023273b9759ff2 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_05.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_05.vtk.cid new file mode 100644 index 00000000000..69980dcd135 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_05.vtk.cid @@ -0,0 +1 @@ +bafkreicoxwmt6dztdb5o6cvavdjli4q3ir464szqdddht56kfernedvobi diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_05.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_05.vtk.md5 deleted file mode 100644 index 03f5259f564..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_05.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -ea29a24d46b0270988b27f9289755890 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_06.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_06.vtk.cid new file mode 100644 index 00000000000..c6144c6cf5c --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_06.vtk.cid @@ -0,0 +1 @@ +bafkreih5givsj7ikjkjevqym5bla3uc6zmlevegwwlm243ge6zi2uwctme diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_06.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_06.vtk.md5 deleted file mode 100644 index 2a060efd10e..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_06.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -d4bf5fbb8810fbae8d514820852630f9 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_07.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_07.vtk.cid new file mode 100644 index 00000000000..ad244938ba5 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_07.vtk.cid @@ -0,0 +1 @@ +bafkreiaghso7garm7zom2letqgjcljhxyqij26aoeviijdsucu7sirho7m diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_07.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_07.vtk.md5 deleted file mode 100644 index f9dbdac1439..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_07.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -f78a436b66ee444aee2f4fc0c530dfd0 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_08.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_08.vtk.cid new file mode 100644 index 00000000000..bc1238493d2 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_08.vtk.cid @@ -0,0 +1 @@ +bafkreiftluo5ts7ot6jezbqufe5hblxu5aex5bsvli4jxxafec2wchcpyy diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_08.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_08.vtk.md5 deleted file mode 100644 index 2613b5ba7af..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_08.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -1edcf9de2b68a74888180d45be7c06b0 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_09.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_09.vtk.cid new file mode 100644 index 00000000000..9620ab17f31 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_09.vtk.cid @@ -0,0 +1 @@ +bafkreia3idvlzgoydmvjeu3q6p225btr7hkfuzecxyukg5nlhvlvnuzyzi diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_09.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_09.vtk.md5 deleted file mode 100644 index a0cbf21507b..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_09.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -3398b7edee561c6f200e639a9bd16d55 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_10.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_10.vtk.cid new file mode 100644 index 00000000000..49da6db2fc1 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_10.vtk.cid @@ -0,0 +1 @@ +bafkreihfbaulqrmallerwrbycm7pt7v2wzvydhrpqgdh5zduqukmolcxla diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_10.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_10.vtk.md5 deleted file mode 100644 index cca40bf94d5..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_10.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -daafa4a295474c79a045ed39777e6bde \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_11.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_11.vtk.cid new file mode 100644 index 00000000000..65989cc8bec --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_11.vtk.cid @@ -0,0 +1 @@ +bafkreiftrrhzc4po7rwul4azxetgcypuoh32hy6wcsgwngxroc7sfvw6kq diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_11.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_11.vtk.md5 deleted file mode 100644 index 0e70b250f57..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_11.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -7d0bf66609c1145e372ce0b8f280862b \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_12.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_12.vtk.cid new file mode 100644 index 00000000000..46ab0d1edf1 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_12.vtk.cid @@ -0,0 +1 @@ +bafkreigkyi2lc3vqmsd7iv7dk2ofjrpb3iwfrgyrgxajoacoclnub6p2nq diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_12.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_12.vtk.md5 deleted file mode 100644 index 9551ae0537a..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_12.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -7a356036b2e73f3508d4d2e83087c2e4 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_13.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_13.vtk.cid new file mode 100644 index 00000000000..e08cf539b93 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_13.vtk.cid @@ -0,0 +1 @@ +bafkreihzrovm6twwavvv3jnyefmjaasvtg56vmzgwuy4uk7oae7pt6icpq diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_13.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_13.vtk.md5 deleted file mode 100644 index 7ef42044fb5..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_13.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -8d92ef78f2589a2a9337514739919e31 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_14.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_14.vtk.cid new file mode 100644 index 00000000000..815f9d5d35c --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_14.vtk.cid @@ -0,0 +1 @@ +bafkreigo7cfqcaokvwxffbq43dkkz2zfql5v2kxeqlpa7pzymoueduzkva diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_14.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_14.vtk.md5 deleted file mode 100644 index f1af0a61213..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_14.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -e92acf218345c841c7007a275c858270 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_15.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_15.vtk.cid new file mode 100644 index 00000000000..afb9ac63309 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_15.vtk.cid @@ -0,0 +1 @@ +bafkreib33ptbk2rre2zvf4cxf6uojrwdeyilesfhgwnslv35iuy7axtk6u diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_15.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_15.vtk.md5 deleted file mode 100644 index aa1efd2ec3d..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_15.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -1755154a2cce848a5be0f9eedb5c64ce \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_16.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_16.vtk.cid new file mode 100644 index 00000000000..30b43c9a6ed --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_16.vtk.cid @@ -0,0 +1 @@ +bafkreicakaxu4ugpsgjiqd6256tgo3tpqfw7qxibwc6teg2mjkgwgttubq diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_16.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_16.vtk.md5 deleted file mode 100644 index 1bc6ff7c898..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_16.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -a906df735d6c6ef7986d4f67bcf097d0 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_17.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_17.vtk.cid new file mode 100644 index 00000000000..f065d9a5770 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_17.vtk.cid @@ -0,0 +1 @@ +bafkreifnpyijulntj4viwjdfjwgmnsvlhnibcoo3v6pfojpjckzpyopr3e diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_17.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_17.vtk.md5 deleted file mode 100644 index 6fea5545abc..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_17.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -448650da51b3fe0c7650714b8c916de8 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_18.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_18.vtk.cid new file mode 100644 index 00000000000..b838014e030 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_18.vtk.cid @@ -0,0 +1 @@ +bafkreiechpwk4rmjzvbt2t7k2zjhseje36iprorfbhhteejherdnx7a3a4 diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_18.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_18.vtk.md5 deleted file mode 100644 index 0eec6174715..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_18.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -9f35569571d9c81da1dbb6a98f6a7eb4 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_19.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_19.vtk.cid new file mode 100644 index 00000000000..9818d225a50 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_19.vtk.cid @@ -0,0 +1 @@ +bafkreibzjewk4dcsdcr2esg63rfq54yym666r6lliwo6dxncyy46y5p3ty diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_19.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_19.vtk.md5 deleted file mode 100644 index 45bfc7c46a0..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_19.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -4e96aaebf855205365b921b350bfbc88 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_20.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_20.vtk.cid new file mode 100644 index 00000000000..85318884d4c --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_20.vtk.cid @@ -0,0 +1 @@ +bafkreig2enkxov3m4fpyxro7yfcytcxdrb57ton45zfmga7zkjszcf7aom diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_20.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_20.vtk.md5 deleted file mode 100644 index 176bfe5a94e..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_20.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -7db3c1d556b6645265285fe44ed73783 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_21.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_21.vtk.cid new file mode 100644 index 00000000000..36194919e1f --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_21.vtk.cid @@ -0,0 +1 @@ +bafkreiaojvyakbxkvgrf52zqfreffsnw3p7wwlgwbziussj5ghi6vh4zbm diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_21.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_21.vtk.md5 deleted file mode 100644 index 27906f0d35c..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_21.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -5959353f4a77f1b8f24ff464089641b4 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_22.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_22.vtk.cid new file mode 100644 index 00000000000..838f1366af1 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_22.vtk.cid @@ -0,0 +1 @@ +bafkreieduudsx7kg3qugiy5mw5dujq4vvt3slweajtp4gsntdp5zddnmku diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_22.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_22.vtk.md5 deleted file mode 100644 index 33ee868a8c5..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_22.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -4946e4386b66153de70bf2d277bc2522 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_23.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_23.vtk.cid new file mode 100644 index 00000000000..1b532da6670 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_23.vtk.cid @@ -0,0 +1 @@ +bafkreiexaokoaps44rvmvrhbpimnwh5nl3l6vtkfby52vq7jwbav6lhhoa diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_23.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_23.vtk.md5 deleted file mode 100644 index c3db42f6d00..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_23.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -8742937b329ff70ce963c7c5967e325b \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_24.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_24.vtk.cid new file mode 100644 index 00000000000..b0d4ab63c2e --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_24.vtk.cid @@ -0,0 +1 @@ +bafkreiaojvtcz7edszllufts2hrotlfxs6m6y3mi4u3qunhscvt43y7hum diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_24.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_24.vtk.md5 deleted file mode 100644 index fe76d958bea..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_24.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -d079af9c5bb8eeab04a72a1072fd4d8a \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_25.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_25.vtk.cid new file mode 100644 index 00000000000..5826f7d1651 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_25.vtk.cid @@ -0,0 +1 @@ +bafkreigvg25ekb2mxzlu7ro3rhwwgpyoto57jy4ap4lzqdn5omaqxtsli4 diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_25.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_25.vtk.md5 deleted file mode 100644 index 9c5cbf41dec..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_25.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -bdbf327ea97b3a29803e424bfb884780 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_26.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_26.vtk.cid new file mode 100644 index 00000000000..662f3fd8062 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_26.vtk.cid @@ -0,0 +1 @@ +bafkreibl2kma2urfnn6fvbs4glbsugdwzjo25bnov3nbzohfjbaa2krfxi diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_26.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_26.vtk.md5 deleted file mode 100644 index 17714ed482c..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_26.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -aa958a226c2e7afe60dc56d02946d883 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_27.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_27.vtk.cid new file mode 100644 index 00000000000..6150dc71caf --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_27.vtk.cid @@ -0,0 +1 @@ +bafkreigxwwmowl7fgc52ea4s7zuodfuyhg34y63m2gqawg46zg7u5aa2s4 diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_27.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_27.vtk.md5 deleted file mode 100644 index 107f4108c32..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_27.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -9f3a6f5c1f5c6a359b83cacddcfd5d52 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_28.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_28.vtk.cid new file mode 100644 index 00000000000..69909bebe71 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_28.vtk.cid @@ -0,0 +1 @@ +bafkreiep2xvavh6k4nbxxcfio2zi62ucdskp4yra24jcrpaqxpve7jgq64 diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_28.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_28.vtk.md5 deleted file mode 100644 index 65c81d434b5..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_28.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -a7428b8ec4497754ab26ef9fc5c15f26 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_29.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_29.vtk.cid new file mode 100644 index 00000000000..b37e07ab013 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_29.vtk.cid @@ -0,0 +1 @@ +bafkreiabw6pqerteqnzibv5eqhnyhaybj5fs5nqxo2wtizpocsrudpquve diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_29.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_29.vtk.md5 deleted file mode 100644 index 8b28e6ecaf1..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_29.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -654ba519df5ebc49250cb040bf793741 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_30.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_30.vtk.cid new file mode 100644 index 00000000000..ee7e78dc198 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_30.vtk.cid @@ -0,0 +1 @@ +bafkreic7j5mkyx5yw2ehqkbnw22moov5wx4jt6rex5sub6m3istnt5iutm diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_30.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_30.vtk.md5 deleted file mode 100644 index 5a3a39b5d60..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_30.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -0eb4c856d2f153f8fe81e276cd6126aa \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_31.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_31.vtk.cid new file mode 100644 index 00000000000..43bb7342508 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_31.vtk.cid @@ -0,0 +1 @@ +bafkreihujqd7jhvqyc3ck3qa6fu2cze323scmwwroaudf7ubkve3nelz3e diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_31.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_31.vtk.md5 deleted file mode 100644 index 8079b063da9..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_31.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -406c320f824fa95a6dbd49fb43aaf2da \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_32.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_32.vtk.cid new file mode 100644 index 00000000000..fc4ccac129a --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_32.vtk.cid @@ -0,0 +1 @@ +bafkreihufhgeshfggqduqeeaiqh3cmwqfm3yfyenjget5nxwdrfvjjyz6u diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_32.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_32.vtk.md5 deleted file mode 100644 index dda2dc6a08b..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_32.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -6ab6950b619230435a49ecafb99e0e12 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_33.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_33.vtk.cid new file mode 100644 index 00000000000..c8d7835774f --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_33.vtk.cid @@ -0,0 +1 @@ +bafkreifjrlasosabu7gn4s6lmr5sfyvjwswq5fsrqlvul24bvuz4ul4x4y diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_33.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_33.vtk.md5 deleted file mode 100644 index 4ffae390c28..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_33.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -c59174cc52ead4045c840d1025b0fdeb \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_34.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_34.vtk.cid new file mode 100644 index 00000000000..bb300b41ab7 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_34.vtk.cid @@ -0,0 +1 @@ +bafkreia3tytko47jg7zjf3p3er74v6s2aiagxar7g4cgfmsxstejnz7fre diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_34.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_34.vtk.md5 deleted file mode 100644 index c1843066b44..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_34.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -8a2d2baa9aa301e72718924ea1d9c867 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_35.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_35.vtk.cid new file mode 100644 index 00000000000..a3eca2528ef --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_35.vtk.cid @@ -0,0 +1 @@ +bafkreie7kgcdnrjo2t5f6ist3yzfxv3n4d6dq2p7c2cad4npmfyspmgpsm diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_35.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_35.vtk.md5 deleted file mode 100644 index e4794ae92d6..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_35.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -be60a2cd311a8f6d4ec192888423648a \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_36.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_36.vtk.cid new file mode 100644 index 00000000000..3bde884310f --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_36.vtk.cid @@ -0,0 +1 @@ +bafkreihgxlnb24swo6rjhgz6aiuitpbnsdkiog7sd2e24jtyoq3633d27u diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_36.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_36.vtk.md5 deleted file mode 100644 index 3b803dc47cc..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_36.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -64fdabd488ee57b068426b389c85f482 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_37.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_37.vtk.cid new file mode 100644 index 00000000000..028247727b7 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_37.vtk.cid @@ -0,0 +1 @@ +bafkreifo6qjhthbdqasemq6d53aaefd64phyyjknzdooruji72ahpbrquy diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_37.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_37.vtk.md5 deleted file mode 100644 index c0ec97463cc..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_37.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -511967941f004c7d0f13dcc528166aa7 \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_38.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_38.vtk.cid new file mode 100644 index 00000000000..0624fc93514 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_38.vtk.cid @@ -0,0 +1 @@ +bafkreid6glw7uwrdugnpaq77vkxvla4fyfunu42fbpa3zqujoa7lab5oom diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_38.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_38.vtk.md5 deleted file mode 100644 index d28ee2f6b82..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_38.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -83f437bc8fa1455015d5a70181197e9e \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_39.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_39.vtk.cid new file mode 100644 index 00000000000..d2b90a54677 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_39.vtk.cid @@ -0,0 +1 @@ +bafkreia7kmezz3fov4ycosvj57nxrhx7kn4sbwhmoqono5nc3sl4ubxfdy diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_39.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_39.vtk.md5 deleted file mode 100644 index 929234834c8..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_39.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -0f10cd353096b319141dff43f6110cbe \ No newline at end of file diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_40.vtk.cid b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_40.vtk.cid new file mode 100644 index 00000000000..8075ef939ad --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_40.vtk.cid @@ -0,0 +1 @@ +bafkreifyywfd4mddt5sbatvqsk7bn7d4gm2pij4b7ywdm3n623qczth3dy diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_40.vtk.md5 b/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_40.vtk.md5 deleted file mode 100644 index 70ac9e08efe..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/Input/PCATestSurface_alpha0_40.vtk.md5 +++ /dev/null @@ -1 +0,0 @@ -aac2e4637eeb233551570eb00546782b \ No newline at end of file From 3b09ee86c25e0b053504dce740e017bfeab60223 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Fri, 8 May 2026 11:14:52 -0500 Subject: [PATCH 50/55] ENH: Add v4 whitelist for PrincipalComponentsAnalysis ingest --- .../whitelists/PrincipalComponentsAnalysis.list | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Utilities/Maintenance/RemoteModuleIngest/whitelists/PrincipalComponentsAnalysis.list diff --git a/Utilities/Maintenance/RemoteModuleIngest/whitelists/PrincipalComponentsAnalysis.list b/Utilities/Maintenance/RemoteModuleIngest/whitelists/PrincipalComponentsAnalysis.list new file mode 100644 index 00000000000..1297ab5fe37 --- /dev/null +++ b/Utilities/Maintenance/RemoteModuleIngest/whitelists/PrincipalComponentsAnalysis.list @@ -0,0 +1,8 @@ +# PrincipalComponentsAnalysis — files that migrate into ITK at +# Modules/Numerics/PrincipalComponentsAnalysis/ +include +test +wrapping +CMakeLists.txt +itk-module.cmake +LICENSE From 2909ac5e4e8397c08351496bfad275df518cb628 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Fri, 8 May 2026 11:16:39 -0500 Subject: [PATCH 51/55] DOC: Add PrincipalComponentsAnalysis README pointing at upstream --- .../PrincipalComponentsAnalysis/README.md | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/README.md diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/README.md b/Modules/Numerics/PrincipalComponentsAnalysis/README.md new file mode 100644 index 00000000000..bbca9ec7fb7 --- /dev/null +++ b/Modules/Numerics/PrincipalComponentsAnalysis/README.md @@ -0,0 +1,24 @@ +# PrincipalComponentsAnalysis + +In-tree ITK module providing a principal component analysis filter for +scalar, vector, and mesh-vertex data. The flagship class is +`itk::VectorFieldPCA`, which computes the principal components of an +ensemble of vector fields defined on a common mesh, useful for +shape-modeling and multivariate statistics workflows. + +## Origin + +Ingested from the standalone remote module +[**InsightSoftwareConsortium/ITKPrincipalComponentsAnalysis**](https://github.com/InsightSoftwareConsortium/ITKPrincipalComponentsAnalysis) +on 2026-05-08, following the v4 ingestion guidelines defined in +InsightSoftwareConsortium/ITK#6204. The upstream repository will be +archived read-only after this PR merges; it remains reachable at the +URL above for historical reference (notably the `doc/` and +`examples/` directories, which were intentionally left in the +upstream archive). + +## References + +- Bowers M., Younes L. *Principal Components Analysis of Scalar, + Vector, and Mesh Vertex Data.* The Insight Journal. August, 2013. + From 8b54cbb7e3af2ecd3ec3fb8cc870244dc804eeb8 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Fri, 8 May 2026 11:16:42 -0500 Subject: [PATCH 52/55] COMP: Remove PrincipalComponentsAnalysis .remote.cmake (in-tree) --- .../PrincipalComponentsAnalysis.remote.cmake | 56 ------------------- 1 file changed, 56 deletions(-) delete mode 100644 Modules/Remote/PrincipalComponentsAnalysis.remote.cmake diff --git a/Modules/Remote/PrincipalComponentsAnalysis.remote.cmake b/Modules/Remote/PrincipalComponentsAnalysis.remote.cmake deleted file mode 100644 index 4c15f7e3d2c..00000000000 --- a/Modules/Remote/PrincipalComponentsAnalysis.remote.cmake +++ /dev/null @@ -1,56 +0,0 @@ -#-- # Grading Level Criteria Report -#-- EVALUATION DATE: 2020-03-01 -#-- EVALUATORS: [<>,<>] -#-- -#-- ## Compliance level 5 star (AKA ITK main modules, or remote modules that could become core modules) -#-- - [ ] Widespread community dependance -#-- - [ ] Above 90% code coverage -#-- - [ ] CI dashboards and testing monitored rigorously -#-- - [ ] Key API features are exposed in wrapping interface -#-- - [ ] All requirements of Levels 4,3,2,1 -#-- -#-- ## Compliance Level 4 star (Very high-quality code, perhaps small community dependance) -#-- - [ ] Meets all ITK code style standards -#-- - [ ] No external requirements beyond those needed by ITK proper -#-- - [ ] Builds and passes tests on all supported platforms within 1 month of each core tagged release -#-- - [ ] Windows Shared Library Build with Visual Studio -#-- - [ ] Mac with clang compiller -#-- - [ ] Linux with gcc compiler -#-- - [ ] Active developer community dedicated to maintaining code-base -#-- - [ ] 75% code coverage demonstrated for testing suite -#-- - [ ] Continuous integration testing performed -#-- - [ ] All requirements of Levels 3,2,1 -#-- -#-- ## Compliance Level 3 star (Quality beta code) -#-- - [ ] API | executable interface is considered mostly stable and feature complete -#-- - [ ] 10% C0-code coverage demonstrated for testing suite -#-- - [ ] Some tests exist and pass on at least some platform -#-- - [X] All requirements of Levels 2,1 -#-- -#-- ## Compliance Level 2 star (Alpha code feature API development or niche community/execution environment dependance ) -#-- - [X] Compiles for at least 1 niche set of execution envirionments, and perhaps others -#-- (may depend on specific external tools like a java environment, or specific external libraries to work ) -#-- - [X] All requirements of Levels 1 -#-- -#-- ## Compliance Level 1 star (Pre-alpha features under development and code of unknown quality) -#-- - [X] Code complies on at least 1 platform -#-- -#-- ## Compliance Level 0 star ( Code/Feature of known poor-quality or deprecated status ) -#-- - [ ] Code reviewed and explicitly identified as not recommended for use -#-- -#-- ### Please document here any justification for the criteria above -# Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed - -# Contact: Johan Andruejol -itk_fetch_module( - PrincipalComponentsAnalysis - "An ITK_-based implementation of principal components analysis. -A more detailed description can be found in the Insight Journal article: - Bowers M., Younes L. ''Principal Components Analysis of Scalar, Vector, and Mesh Vertex Data.'' - https://doi.org/10.54294/loekqj - August, 2013. -" - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITKPrincipalComponentsAnalysis.git - GIT_TAG 88e3f65aabdc9cf2c11f03907975a4e605676504 - ) From 101932c5ab592f97e1bb77fb513c08029a9f0ff3 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Fri, 8 May 2026 11:16:43 -0500 Subject: [PATCH 53/55] ENH: Enable Module_PrincipalComponentsAnalysis in configure-ci --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index c73ae38c83d..00f4f39346e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,6 +62,7 @@ cmd = '''cmake \ -DModule_MeshNoise:BOOL=ON \ -DModule_MGHIO:BOOL=ON \ -DModule_PolarTransform:BOOL=ON \ + -DModule_PrincipalComponentsAnalysis:BOOL=ON \ -DModule_SplitComponents:BOOL=ON \ -DModule_IOMeshMZ3:BOOL=ON \ -DModule_IOFDF:BOOL=ON \ From c51445a1c8ba064ea80ff3b91caca1857b989f53 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Fri, 8 May 2026 13:07:00 -0500 Subject: [PATCH 54/55] COMP: Address PrincipalComponentsAnalysis review concerns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit itk-module.cmake: pass DOCUMENTATION through to DESCRIPTION (was overwritten by a literal string). CMakeLists.txt: drop the cmake_policy(CMP0003) shim, the itk_module_examples() call, and the doc-build option block — examples and doc/ were intentionally not ingested. LICENSE: remove the per-module copy; ITK's root LICENSE applies. --- .../CMakeLists.txt | 20 +- .../PrincipalComponentsAnalysis/LICENSE | 202 ------------------ .../itk-module.cmake | 2 +- 3 files changed, 2 insertions(+), 222 deletions(-) delete mode 100644 Modules/Numerics/PrincipalComponentsAnalysis/LICENSE diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt index 05f4d055195..c372726e883 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt +++ b/Modules/Numerics/PrincipalComponentsAnalysis/CMakeLists.txt @@ -1,21 +1,3 @@ -if(COMMAND CMAKE_POLICY) - cmake_policy(SET CMP0003 NEW) -endif(COMMAND CMAKE_POLICY) - -set(PCA PrincipalComponentsAnalysis) -project(${PCA}) +project(PrincipalComponentsAnalysis) itk_module_impl() - -itk_module_examples() - -cmake_dependent_option( - Module_${PCA}_BUILD_DOCUMENTATION - "Generate documentation from LaTeX files, source code examples and result screenshots" - OFF - "BUILD_DOCUMENTATION" - OFF -) -if(Module_${PCA}_BUILD_DOCUMENTATION) - add_subdirectory(doc) -endif() diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/LICENSE b/Modules/Numerics/PrincipalComponentsAnalysis/LICENSE deleted file mode 100644 index 62589edd12a..00000000000 --- a/Modules/Numerics/PrincipalComponentsAnalysis/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - https://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake b/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake index c4f62bfced6..3d76265b276 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake +++ b/Modules/Numerics/PrincipalComponentsAnalysis/itk-module.cmake @@ -14,5 +14,5 @@ itk_module( TEST_DEPENDS ITKTestKernel EXCLUDE_FROM_DEFAULT - DESCRIPTION "Module ingested from upstream." + DESCRIPTION "${DOCUMENTATION}" ) From 79b924455b7eaef4b899cd85b6b4864d70d31d96 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Fri, 8 May 2026 19:58:41 -0500 Subject: [PATCH 55/55] STYLE: Address Greptile review on PrincipalComponentsAnalysis MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit itkVectorFieldPCA.h: in-class-initialize the GaussianDistanceKernel members so Evaluate() before SetKernelSigma() is well-defined; drop the unused m_VertexCount member that was never assigned. itkVectorFieldPCA.hxx: drop the redundant inner if(m_PointSet) check — control reaches it only after the preceding if(!m_PointSet) throw. Remove the m_VertexCount line from PrintSelf(). itkVectorKernelPCATest.cxx: drop the duplicated vnl_vector.h include and the unused debugOut std::ofstream. --- .../include/itkVectorFieldPCA.h | 5 ++--- .../include/itkVectorFieldPCA.hxx | 13 ++++--------- .../test/itkVectorKernelPCATest.cxx | 4 ---- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h index c65d3e5d622..744989cb08e 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h +++ b/Modules/Numerics/PrincipalComponentsAnalysis/include/itkVectorFieldPCA.h @@ -97,8 +97,8 @@ class ITK_TEMPLATE_EXPORT GaussianDistanceKernel : public KernelFunctionBaseGetNumberOfPoints() != m_VectorDimCount) { - if (m_PointSet->GetNumberOfPoints() != m_VectorDimCount) - { - itkExceptionMacro("Point Set count (" << m_PointSet->GetNumberOfPoints() - << ") does not match vector field count (" << m_VectorDimCount << ")."); - return; - } + itkExceptionMacro("Point Set count (" << m_PointSet->GetNumberOfPoints() + << ") does not match vector field count (" << m_VectorDimCount << ")."); } } @@ -323,7 +319,6 @@ VectorFieldPCAm_ComponentCount << std::endl; os << indent << "SetSize: " << this->m_SetSize << std::endl; os << indent << "VectorDimCount: " << this->m_VectorDimCount << std::endl; - os << indent << "VertexCount: " << this->m_VertexCount << std::endl; os << indent << "PointDim: " << this->m_PointDim << std::endl; os << indent << "V0 : " << this->m_V0 << std::endl; diff --git a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx index a9f0dbdf503..b140df074e5 100644 --- a/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx +++ b/Modules/Numerics/PrincipalComponentsAnalysis/test/itkVectorKernelPCATest.cxx @@ -21,7 +21,6 @@ #include "itkVectorFieldPCA.h" #include "itkTestingMacros.h" #include "vnl/vnl_vector.h" -#include "vnl/vnl_vector.h" template @@ -192,9 +191,6 @@ itkVectorKernelPCATest(int argc, char * argv[]) pcaCalc->SetKernelFunction(distKernel); - std::ofstream debugOut; - debugOut.precision(15); - // Get the output and perform basic checks unsigned int computedNumberOfAverageVectorFieldCols = pcaCalc->GetAveVectorField().cols();