From 31161b0abe1b55a5963b84f2919c23eea2f7b5a1 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Wed, 29 Apr 2026 09:14:10 -0500 Subject: [PATCH] ENH: Migrate MeshNoise content to ITK main; archive this repo The MeshNoise module has been ingested into ITK main via InsightSoftwareConsortium/ITK#6161 (merge commit 5d95c9bda7), which also closes the user-blocking compile error reported in InsightSoftwareConsortium/ITK#5174. Remove the now-duplicated content from this repo's tree tip and add MIGRATION_README.md pointing future visitors at the authoritative in-tree location. Pre-ingest git history is preserved for blame and archaeology; this repo will be marked ARCHIVED in GitHub Settings after merge. --- CMakeLists.txt | 11 -- CTestConfig.cmake | 8 -- MIGRATION_README.md | 20 ++++ include/itkAdditiveGaussianNoiseMeshFilter.h | 101 ----------------- .../itkAdditiveGaussianNoiseMeshFilter.hxx | 107 ------------------ ...kAdditiveGaussianNoiseQuadEdgeMeshFilter.h | 95 ---------------- ...dditiveGaussianNoiseQuadEdgeMeshFilter.hxx | 69 ----------- itk-module.cmake | 25 ---- test/CMakeLists.txt | 13 --- ...itkAdditiveGaussianNoiseMeshFilterTest.cxx | 73 ------------ ...iveGaussianNoiseQuadEdgeMeshFilterTest.cxx | 73 ------------ wrapping/CMakeLists.txt | 8 -- .../itkAdditiveGaussianNoiseMeshFilter.wrap | 33 ------ ...ditiveGaussianNoiseQuadEdgeMeshFilter.wrap | 7 -- 14 files changed, 20 insertions(+), 623 deletions(-) delete mode 100644 CMakeLists.txt delete mode 100644 CTestConfig.cmake create mode 100644 MIGRATION_README.md delete mode 100644 include/itkAdditiveGaussianNoiseMeshFilter.h delete mode 100644 include/itkAdditiveGaussianNoiseMeshFilter.hxx delete mode 100644 include/itkAdditiveGaussianNoiseQuadEdgeMeshFilter.h delete mode 100644 include/itkAdditiveGaussianNoiseQuadEdgeMeshFilter.hxx delete mode 100644 itk-module.cmake delete mode 100755 test/CMakeLists.txt delete mode 100644 test/itkAdditiveGaussianNoiseMeshFilterTest.cxx delete mode 100644 test/itkAdditiveGaussianNoiseQuadEdgeMeshFilterTest.cxx delete mode 100644 wrapping/CMakeLists.txt delete mode 100644 wrapping/itkAdditiveGaussianNoiseMeshFilter.wrap delete mode 100644 wrapping/itkAdditiveGaussianNoiseQuadEdgeMeshFilter.wrap diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index b2a28c5..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.16.3) - -project(MeshNoise) - -if(NOT ITK_SOURCE_DIR) - find_package(ITK REQUIRED) - list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR}) - include(ITKModuleExternal) -else() - itk_module_impl() -endif() diff --git a/CTestConfig.cmake b/CTestConfig.cmake deleted file mode 100644 index 492148e..0000000 --- a/CTestConfig.cmake +++ /dev/null @@ -1,8 +0,0 @@ -set(CTEST_PROJECT_NAME "ITK") -set(CTEST_NIGHTLY_START_TIME "1:00:00 UTC") - -set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "open.cdash.org") -set(CTEST_DROP_LOCATION "/submit.php?project=Insight") -set(CTEST_DROP_SITE_CDASH TRUE) - diff --git a/MIGRATION_README.md b/MIGRATION_README.md new file mode 100644 index 0000000..4fe1d28 --- /dev/null +++ b/MIGRATION_README.md @@ -0,0 +1,20 @@ +# Migrated to ITK main + +As of 2026-04-29, the `MeshNoise` module has been ingested into the +main ITK source tree. The authoritative location is: + + https://github.com/InsightSoftwareConsortium/ITK/tree/main/Modules/Filtering/MeshNoise + +See `Modules/Filtering/MeshNoise/README.md` (or any in-tree +documentation under that path) for details on what moved and what +remains in this archived repo. + +This repository is retained read-only for historical reference (deep +git history, paper material, example assets not migrated to ITK). It +will be marked ARCHIVED after this PR merges. + +Related: +- ITK ingest PR: InsightSoftwareConsortium/ITK#6161 +- ITK ingest merge commit: InsightSoftwareConsortium/ITK@5d95c9bda7 +- Tracking issue: InsightSoftwareConsortium/ITK#6160 +- User-blocking compile error closed by the ingest: InsightSoftwareConsortium/ITK#5174 diff --git a/include/itkAdditiveGaussianNoiseMeshFilter.h b/include/itkAdditiveGaussianNoiseMeshFilter.h deleted file mode 100644 index 7d56cd9..0000000 --- a/include/itkAdditiveGaussianNoiseMeshFilter.h +++ /dev/null @@ -1,101 +0,0 @@ -/*========================================================================= - * - * Copyright NumFOCUS - * - * 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.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 itkAdditiveGaussianNoiseMeshFilter_h -#define itkAdditiveGaussianNoiseMeshFilter_h - -#include - -namespace itk -{ -/** \class AdditiveGaussianNoiseMeshFilter - * \brief Add Gaussian noise to the points defining an itkMesh. - * - * \author Davis Vigneault - * - * This class adds Gaussian noise with a specified mean and standard - * deviation to the coordinates of the points defining an itkMesh. - * Mesh topology and other data is passed unaltered. This may be - * useful in testing the robustness of an algorithm to small changes - * in the input mesh, augmenting datasets for machine learning, and - * counteracting deleterious effects which highly regular regions - * of a mesh may occassionally have on mesh processing. - * - * \ingroup MeshNoise - */ -template -class AdditiveGaussianNoiseMeshFilter : public MeshToMeshFilter -{ - -public: - ITK_DISALLOW_COPY_AND_MOVE(AdditiveGaussianNoiseMeshFilter); - - /** Standard class type alias. */ - using Self = AdditiveGaussianNoiseMeshFilter; - using Superclass = MeshToMeshFilter; - using Pointer = SmartPointer; - using ConstPointer = SmartPointer; - - using InputMeshType = TInput; - using OutputMeshType = TOutput; - using InputMeshPointer = typename InputMeshType::Pointer; - using OutputMeshPointer = typename OutputMeshType::Pointer; - - /** Type for representing coordinates. */ - using CoordinateType = typename TInput::CoordinateType; - - /** Method for creation through the object factory. */ - itkNewMacro(Self); - - /** Run-time type information (and related methods). */ - itkOverrideGetNameOfClassMacro(AdditiveGaussianNoiseMeshFilter); - - /** Mean of noise. */ - itkGetConstMacro(Mean, CoordinateType); - itkSetMacro(Mean, CoordinateType); - - /** Variance of noise. */ - itkGetConstMacro(Sigma, CoordinateType); - itkSetMacro(Sigma, CoordinateType); - - /** Initialization seed. */ - itkGetConstMacro(Seed, int); - itkSetMacro(Seed, int); - -protected: - AdditiveGaussianNoiseMeshFilter(); - ~AdditiveGaussianNoiseMeshFilter() override = default; - - void - PrintSelf(std::ostream & os, Indent indent) const override; - - /** Generate Requested Data */ - void - GenerateData() override; - - CoordinateType m_Mean; - CoordinateType m_Sigma; - int m_Seed; -}; - -} // namespace itk - -#ifndef ITK_MANUAL_INSTANTIATION -# include "itkAdditiveGaussianNoiseMeshFilter.hxx" -#endif - -#endif diff --git a/include/itkAdditiveGaussianNoiseMeshFilter.hxx b/include/itkAdditiveGaussianNoiseMeshFilter.hxx deleted file mode 100644 index 17d81d9..0000000 --- a/include/itkAdditiveGaussianNoiseMeshFilter.hxx +++ /dev/null @@ -1,107 +0,0 @@ -/*========================================================================= - * - * Copyright NumFOCUS - * - * 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.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 itkAdditiveGaussianNoiseMeshFilter_hxx -#define itkAdditiveGaussianNoiseMeshFilter_hxx - -#include "itkNormalVariateGenerator.h" - -namespace itk -{ - -template -AdditiveGaussianNoiseMeshFilter::AdditiveGaussianNoiseMeshFilter() -{ - this->m_Mean = 0.0; - this->m_Sigma = 1.0; - this->m_Seed = 0; -} - -template -void -AdditiveGaussianNoiseMeshFilter::PrintSelf(std::ostream & os, Indent indent) const -{ - Superclass::PrintSelf(os, indent); - os << indent << "Mean: " << this->m_Mean << std::endl; - os << indent << "Sigma: " << this->m_Sigma << std::endl; -} - -template -void -AdditiveGaussianNoiseMeshFilter::GenerateData() -{ - using InputPointsContainer = typename TInputMesh::PointsContainer; - using OutputPointsContainer = typename TOutputMesh::PointsContainer; - - using InputPointsContainerConstPointer = typename TInputMesh::PointsContainerConstPointer; - using OutputPointsContainerPointer = typename TOutputMesh::PointsContainerPointer; - - const InputMeshType * inputMesh = this->GetInput(); - OutputMeshPointer outputMesh = this->GetOutput(); - - if (!inputMesh) - { - itkExceptionMacro(<< "Missing Input Mesh"); - } - - if (!outputMesh) - { - itkExceptionMacro(<< "Missing Output Mesh"); - } - - outputMesh->SetBufferedRegion(outputMesh->GetRequestedRegion()); - - InputPointsContainerConstPointer inPoints = inputMesh->GetPoints(); - OutputPointsContainerPointer outPoints = outputMesh->GetPoints(); - - outPoints->Reserve(inputMesh->GetNumberOfPoints()); - outPoints->Squeeze(); - - typename InputPointsContainer::ConstIterator inputPoint = inPoints->Begin(); - typename OutputPointsContainer::Iterator outputPoint = outPoints->Begin(); - - unsigned int maxDimension = TInputMesh::MaxTopologicalDimension; - - using GeneratorType = itk::Statistics::NormalVariateGenerator; - GeneratorType::Pointer generator = GeneratorType::New(); - generator->Initialize(this->m_Seed); - - while (inputPoint != inPoints->End()) - { - for (unsigned int dim = 0; dim < maxDimension; ++dim) - { - outputPoint.Value()[dim] = inputPoint.Value()[dim] + generator->GetVariate() * this->m_Sigma + this->m_Mean; - } - ++inputPoint; - ++outputPoint; - } - - // Create duplicate references to the rest of data on the mesh - this->CopyInputMeshToOutputMeshPointData(); - this->CopyInputMeshToOutputMeshCellLinks(); - this->CopyInputMeshToOutputMeshCells(); - this->CopyInputMeshToOutputMeshCellData(); - - for (unsigned int dim = 0; dim < maxDimension; ++dim) - { - outputMesh->SetBoundaryAssignments(dim, inputMesh->GetBoundaryAssignments(dim)); - } -} - -} // namespace itk - -#endif diff --git a/include/itkAdditiveGaussianNoiseQuadEdgeMeshFilter.h b/include/itkAdditiveGaussianNoiseQuadEdgeMeshFilter.h deleted file mode 100644 index a106096..0000000 --- a/include/itkAdditiveGaussianNoiseQuadEdgeMeshFilter.h +++ /dev/null @@ -1,95 +0,0 @@ -/*========================================================================= - * - * Copyright NumFOCUS - * - * 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.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 itkAdditiveGaussianNoiseQuadEdgeMeshFilter_h -#define itkAdditiveGaussianNoiseQuadEdgeMeshFilter_h - -#include "itkQuadEdgeMeshToQuadEdgeMeshFilter.h" - -namespace itk -{ -/** \class AdditiveGaussianNoiseQuadEdgeMeshFilter - * \brief Add Gaussian noise to the points defining an itkQuadEdgeMesh. - * - * \author Davis Vigneault - * - * This class adds Gaussian noise with a specified mean and standard - * deviation to the coordinates of the points defining an itkMesh. - * Mesh topology and other data is passed unaltered. This may be - * useful in testing the robustness of an algorithm to small changes - * in the input mesh, augmenting datasets for machine learning, and - * counteracting deleterious effects which highly regular regions - * of a mesh may occassionally have on mesh processing. - * - * \ingroup MeshNoise - */ -template -class AdditiveGaussianNoiseQuadEdgeMeshFilter : public QuadEdgeMeshToQuadEdgeMeshFilter -{ -public: - ITK_DISALLOW_COPY_AND_MOVE(AdditiveGaussianNoiseQuadEdgeMeshFilter); - - /** Standard class type alias. */ - using Self = AdditiveGaussianNoiseQuadEdgeMeshFilter; - using Superclass = QuadEdgeMeshToQuadEdgeMeshFilter; - using Pointer = SmartPointer; - using ConstPointer = SmartPointer; - - /** Type for representing coordinates. */ - using CoordinateType = typename TInputMesh::CoordinateType; - - /** Method for creation through the object factory. */ - itkNewMacro(Self); - - /** Run-time type information (and related methods). */ - itkOverrideGetNameOfClassMacro(AdditiveGaussianNoiseQuadEdgeMeshFilter); - - /** Mean of noise. */ - itkGetConstMacro(Mean, CoordinateType); - itkSetMacro(Mean, CoordinateType); - - /** Variance of noise. */ - itkGetConstMacro(Sigma, CoordinateType); - itkSetMacro(Sigma, CoordinateType); - - /** Initialization seed. */ - itkGetConstMacro(Seed, int); - itkSetMacro(Seed, int); - -protected: - AdditiveGaussianNoiseQuadEdgeMeshFilter(); - ~AdditiveGaussianNoiseQuadEdgeMeshFilter() override = default; - - void - PrintSelf(std::ostream & os, Indent indent) const override; - - /** Generate Requested Data */ - void - GenerateData() override; - - CoordinateType m_Mean; - CoordinateType m_Sigma; - int m_Seed; -}; - -} // end namespace itk - -#ifndef ITK_MANUAL_INSTANTIATION -# include "itkAdditiveGaussianNoiseQuadEdgeMeshFilter.hxx" -#endif - -#endif diff --git a/include/itkAdditiveGaussianNoiseQuadEdgeMeshFilter.hxx b/include/itkAdditiveGaussianNoiseQuadEdgeMeshFilter.hxx deleted file mode 100644 index c32d754..0000000 --- a/include/itkAdditiveGaussianNoiseQuadEdgeMeshFilter.hxx +++ /dev/null @@ -1,69 +0,0 @@ -/*========================================================================= - * - * Copyright NumFOCUS - * - * 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.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 itkAdditiveGaussianNoiseQuadEdgeMeshFilter_hxx -#define itkAdditiveGaussianNoiseQuadEdgeMeshFilter_hxx - -#include "itkNormalVariateGenerator.h" - -namespace itk -{ - -template -AdditiveGaussianNoiseQuadEdgeMeshFilter::AdditiveGaussianNoiseQuadEdgeMeshFilter() -{ - this->m_Mean = 0.0; - this->m_Sigma = 1.0; - this->m_Seed = 0; -} - -template -void -AdditiveGaussianNoiseQuadEdgeMeshFilter::PrintSelf(std::ostream & os, Indent indent) const -{ - Superclass::PrintSelf(os, indent); - os << indent << "Mean: " << this->m_Mean << std::endl; - os << indent << "Sigma: " << this->m_Sigma << std::endl; -} - -template -void -AdditiveGaussianNoiseQuadEdgeMeshFilter::GenerateData() -{ - typename TInputMesh::ConstPointer inputMesh = this->GetInput(); - typename TOutputMesh::Pointer outputMesh = this->GetOutput(); - - this->CopyInputMeshToOutputMesh(); - - typename TOutputMesh::PointsContainer::Iterator it = outputMesh->GetPoints()->Begin(); - - using GeneratorType = itk::Statistics::NormalVariateGenerator; - GeneratorType::Pointer generator = GeneratorType::New(); - generator->Initialize(this->m_Seed); - - while (it != outputMesh->GetPoints()->End()) - { - for (unsigned int d = 0; d < TOutputMesh::MeshTraits::PointDimension; ++d) - { - it.Value()[d] += (generator->GetVariate() * this->m_Sigma + this->m_Mean); - } - ++it; - } -} -} // end namespace itk - -#endif diff --git a/itk-module.cmake b/itk-module.cmake deleted file mode 100644 index 1e9a95e..0000000 --- a/itk-module.cmake +++ /dev/null @@ -1,25 +0,0 @@ - -# the top-level README is used for describing this module, just -# re-used it for documentation here -get_filename_component(MY_CURRENT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -file(READ "${MY_CURRENT_DIR}/README.rst" DOCUMENTATION) - -# itk_module() defines the module dependencies in MeshNoise -# The testing module in MeshNoise depends on ITKTestKernel -# By convention those modules outside of ITK are not prefixed with -# ITK. - -# define the dependencies of the include module and the tests -itk_module(MeshNoise - DEPENDS - ITKCommon - ITKMesh - ITKQuadEdgeMesh - ITKStatistics - TEST_DEPENDS - ITKTestKernel - EXCLUDE_FROM_DEFAULT - DESCRIPTION - "${DOCUMENTATION}" -) - \ No newline at end of file diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt deleted file mode 100755 index 1c45bb3..0000000 --- a/test/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -itk_module_test() - -Set(${itk-module}Tests - itkAdditiveGaussianNoiseMeshFilterTest.cxx - itkAdditiveGaussianNoiseQuadEdgeMeshFilterTest.cxx -) - -CreateTestDriver(${itk-module} "${${itk-module}-Test_LIBRARIES}" "${${itk-module}Tests}") - -itk_add_test(NAME itkAdditiveGaussianNoiseMeshFilterTest - COMMAND ${itk-module}TestDriver itkAdditiveGaussianNoiseMeshFilterTest ) -itk_add_test(NAME itkAdditiveGaussianNoiseQuadEdgeMeshFilterTest - COMMAND ${itk-module}TestDriver itkAdditiveGaussianNoiseQuadEdgeMeshFilterTest ) diff --git a/test/itkAdditiveGaussianNoiseMeshFilterTest.cxx b/test/itkAdditiveGaussianNoiseMeshFilterTest.cxx deleted file mode 100644 index 24b043d..0000000 --- a/test/itkAdditiveGaussianNoiseMeshFilterTest.cxx +++ /dev/null @@ -1,73 +0,0 @@ -/*========================================================================= - * - * Copyright NumFOCUS - * - * 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.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 -#include -#include -#include "itkTestingMacros.h" - -int -itkAdditiveGaussianNoiseMeshFilterTest(int itkNotUsed(argc), char * itkNotUsed(argv)[]) -{ - - using TPixel = double; - constexpr unsigned int Dimension = 3; - - ////////////// - // Typedefs // - ////////////// - - using TMesh = itk::Mesh; - using TSphere = itk::RegularSphereMeshSource; - using TNoise = itk::AdditiveGaussianNoiseMeshFilter; - - //////////////// - // Parameters // - //////////////// - - constexpr int SPHERE_RESOLUTION = 5; - constexpr double SPHERE_SCALE = 10.0; - - constexpr int NOISE_SEED = 100; - const TMesh::CoordinateType NOISE_SIGMA = SPHERE_SCALE * 0.01; - constexpr TMesh::CoordinateType NOISE_MEAN = 1.0; - - /////////// - // Logic // - /////////// - - TSphere::Pointer sphere = TSphere::New(); - - sphere->SetResolution(SPHERE_RESOLUTION); - sphere->SetScale(TSphere::VectorType(SPHERE_SCALE)); - - TNoise::Pointer noise = TNoise::New(); - - ITK_EXERCISE_BASIC_OBJECT_METHODS(noise, AdditiveGaussianNoiseMeshFilter, MeshToMeshFilter); - - noise->SetInput(sphere->GetOutput()); - noise->SetSeed(NOISE_SEED); - ITK_TEST_SET_GET_VALUE(NOISE_SEED, noise->GetSeed()); - noise->SetSigma(NOISE_SIGMA); - ITK_TEST_SET_GET_VALUE(NOISE_SIGMA, noise->GetSigma()); - noise->SetMean(NOISE_MEAN); - ITK_TEST_SET_GET_VALUE(NOISE_MEAN, noise->GetMean()); - - noise->Update(); - - return EXIT_SUCCESS; -} diff --git a/test/itkAdditiveGaussianNoiseQuadEdgeMeshFilterTest.cxx b/test/itkAdditiveGaussianNoiseQuadEdgeMeshFilterTest.cxx deleted file mode 100644 index 8f39347..0000000 --- a/test/itkAdditiveGaussianNoiseQuadEdgeMeshFilterTest.cxx +++ /dev/null @@ -1,73 +0,0 @@ -/*========================================================================= - * - * Copyright NumFOCUS - * - * 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.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 -#include -#include -#include "itkTestingMacros.h" - -int -itkAdditiveGaussianNoiseQuadEdgeMeshFilterTest(int itkNotUsed(argc), char * itkNotUsed(argv)[]) -{ - - using TPixel = double; - constexpr unsigned int Dimension = 3; - - ////////////// - // Typedefs // - ////////////// - - using TMesh = itk::QuadEdgeMesh; - using TSphere = itk::RegularSphereMeshSource; - using TNoise = itk::AdditiveGaussianNoiseQuadEdgeMeshFilter; - - //////////////// - // Parameters // - //////////////// - - constexpr int SPHERE_RESOLUTION = 5; - constexpr double SPHERE_SCALE = 10.0; - - constexpr int NOISE_SEED = 100; - const TMesh::CoordinateType NOISE_SIGMA = SPHERE_SCALE * 0.01; - constexpr TMesh::CoordinateType NOISE_MEAN = 1.0; - - /////////// - // Logic // - /////////// - - TSphere::Pointer sphere = TSphere::New(); - - sphere->SetResolution(SPHERE_RESOLUTION); - sphere->SetScale(TSphere::VectorType(SPHERE_SCALE)); - - TNoise::Pointer noise = TNoise::New(); - - ITK_EXERCISE_BASIC_OBJECT_METHODS(noise, AdditiveGaussianNoiseQuadEdgeMeshFilter, QuadEdgeMeshToQuadEdgeMeshFilter); - - noise->SetInput(sphere->GetOutput()); - noise->SetSeed(NOISE_SEED); - ITK_TEST_SET_GET_VALUE(NOISE_SEED, noise->GetSeed()); - noise->SetSigma(NOISE_SIGMA); - ITK_TEST_SET_GET_VALUE(NOISE_SIGMA, noise->GetSigma()); - noise->SetMean(NOISE_MEAN); - ITK_TEST_SET_GET_VALUE(NOISE_MEAN, noise->GetMean()); - - noise->Update(); - - return EXIT_SUCCESS; -} diff --git a/wrapping/CMakeLists.txt b/wrapping/CMakeLists.txt deleted file mode 100644 index 9549003..0000000 --- a/wrapping/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -itk_wrap_module(MeshNoise) - -set(WRAPPER_SUBMODULE_ORDER - itkAdditiveGaussianNoiseMeshFilter - itkAdditiveGaussianNoiseQuadEdgeMeshFilter) - -itk_auto_load_submodules() -itk_end_wrap_module() diff --git a/wrapping/itkAdditiveGaussianNoiseMeshFilter.wrap b/wrapping/itkAdditiveGaussianNoiseMeshFilter.wrap deleted file mode 100644 index 33bcf7a..0000000 --- a/wrapping/itkAdditiveGaussianNoiseMeshFilter.wrap +++ /dev/null @@ -1,33 +0,0 @@ -itk_wrap_include("itkMesh.h") -itk_wrap_include("itkDefaultStaticMeshTraits.h") -itk_wrap_include("itkDefaultDynamicMeshTraits.h") - -itk_wrap_class("itk::AdditiveGaussianNoiseMeshFilter" POINTER_WITH_2_SUPERCLASSES) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("M${ITKM_${t}}${d}M${ITKM_${t}}${d}" - "itk::Mesh<${ITKT_${t}},${d}>, itk::Mesh<${ITKT_${t}},${d}>") - itk_wrap_template("M${ITKM_${t}}${d}DT${ITKM_${t}}${d}M${ITKM_${t}}${d}DT${ITKM_${t}}${d}" - "itk::Mesh<${ITKT_${t}},${d},itk::DefaultDynamicMeshTraits<${ITKT_${t}},${d}>>, itk::Mesh<${ITKT_${t}},${d},itk::DefaultDynamicMeshTraits<${ITKT_${t}},${d}>>") - endforeach() - endforeach() -itk_end_wrap_class() - - -itk_wrap_class("itk::Mesh" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_${t}}${d}DT${ITKM_${t}}${d}" - "${ITKT_${t}},${d},itk::DefaultDynamicMeshTraits<${ITKT_${t}},${d}>") - endforeach() - endforeach() -itk_end_wrap_class() - -itk_wrap_class("itk::PointSet" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_${t}}${d}DT${ITKM_${t}}${d}" - "${ITKT_${t}},${d},itk::DefaultDynamicMeshTraits<${ITKT_${t}},${d}>") - endforeach() - endforeach() -itk_end_wrap_class() diff --git a/wrapping/itkAdditiveGaussianNoiseQuadEdgeMeshFilter.wrap b/wrapping/itkAdditiveGaussianNoiseQuadEdgeMeshFilter.wrap deleted file mode 100644 index d429799..0000000 --- a/wrapping/itkAdditiveGaussianNoiseQuadEdgeMeshFilter.wrap +++ /dev/null @@ -1,7 +0,0 @@ -itk_wrap_include("itkQuadEdgeMesh.h") - -itk_wrap_class("itk::AdditiveGaussianNoiseQuadEdgeMeshFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >, itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() -itk_end_wrap_class()