diff --git a/src/Plugins/SimplnxCore/CMakeLists.txt b/src/Plugins/SimplnxCore/CMakeLists.txt index 0f0e589ec2..832ab84b75 100644 --- a/src/Plugins/SimplnxCore/CMakeLists.txt +++ b/src/Plugins/SimplnxCore/CMakeLists.txt @@ -67,11 +67,11 @@ set(FilterList FindTriangleGeomSizesFilter FindVertexToTriangleDistancesFilter FindVolFractionsFilter + FlyingEdges3DFilter GenerateColorTableFilter - GenerateVectorColorsFilter GeneratePythonSkeletonFilter + GenerateVectorColorsFilter IdentifySample - ImageContouringFilter InitializeData InitializeImageGeomCellData InterpolatePointCloudToRegularGridFilter @@ -170,10 +170,10 @@ set(AlgorithmList FindTriangleGeomCentroids FindTriangleGeomSizes FindVertexToTriangleDistances + FlyingEdges3D GenerateColorTable - GenerateVectorColors GeneratePythonSkeleton - ImageContouring + GenerateVectorColors KMeans KMedoids LabelTriangleGeometry diff --git a/src/Plugins/SimplnxCore/docs/ImageContouringFilter.md b/src/Plugins/SimplnxCore/docs/FlyingEdges3DFilter.md similarity index 70% rename from src/Plugins/SimplnxCore/docs/ImageContouringFilter.md rename to src/Plugins/SimplnxCore/docs/FlyingEdges3DFilter.md index 7f22be8089..d06e1ae9c6 100644 --- a/src/Plugins/SimplnxCore/docs/ImageContouringFilter.md +++ b/src/Plugins/SimplnxCore/docs/FlyingEdges3DFilter.md @@ -1,4 +1,4 @@ -# Contour (Image Contouring) +# FlyingEdges3D (Image Contouring) ## Group (Subgroup) @@ -6,11 +6,11 @@ Visual Analysis ## Description -This filter will draw a 3 dimensional contouring line through an Image Geometry based on an input value. +This filter will draw a 3 dimensional contouring surface through an Image Geometry based on an input value. Here's what the results look like: -![3D-Contouring](Images/3D-contouring.png) +![3D-Contouring](Images/FlyingEdges3D_1.png) % Auto generated parameter table will be inserted here diff --git a/src/Plugins/SimplnxCore/docs/Images/3D-contouring.png b/src/Plugins/SimplnxCore/docs/Images/FlyingEdges3D_1.png similarity index 100% rename from src/Plugins/SimplnxCore/docs/Images/3D-contouring.png rename to src/Plugins/SimplnxCore/docs/Images/FlyingEdges3D_1.png diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ImageContouring.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/FlyingEdges3D.cpp similarity index 84% rename from src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ImageContouring.cpp rename to src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/FlyingEdges3D.cpp index 50e386670f..f0c7b89d26 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ImageContouring.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/FlyingEdges3D.cpp @@ -1,4 +1,4 @@ -#include "ImageContouring.hpp" +#include "FlyingEdges3D.hpp" #include "simplnx/Utilities/FilterUtilities.hpp" #include "simplnx/Utilities/FlyingEdges.hpp" @@ -26,7 +26,7 @@ struct ExecuteFlyingEdgesFunctor } // namespace // ----------------------------------------------------------------------------- -ImageContouring::ImageContouring(DataStructure& dataStructure, const IFilter::MessageHandler& mesgHandler, const std::atomic_bool& shouldCancel, ImageContouringInputValues* inputValues) +FlyingEdges3D::FlyingEdges3D(DataStructure& dataStructure, const IFilter::MessageHandler& mesgHandler, const std::atomic_bool& shouldCancel, FlyingEdges3DInputValues* inputValues) : m_DataStructure(dataStructure) , m_InputValues(inputValues) , m_ShouldCancel(shouldCancel) @@ -35,16 +35,16 @@ ImageContouring::ImageContouring(DataStructure& dataStructure, const IFilter::Me } // ----------------------------------------------------------------------------- -ImageContouring::~ImageContouring() noexcept = default; +FlyingEdges3D::~FlyingEdges3D() noexcept = default; // ----------------------------------------------------------------------------- -const std::atomic_bool& ImageContouring::getCancel() +const std::atomic_bool& FlyingEdges3D::getCancel() { return m_ShouldCancel; } // ----------------------------------------------------------------------------- -Result<> ImageContouring::operator()() +Result<> FlyingEdges3D::operator()() { const auto& image = m_DataStructure.getDataRefAs(m_InputValues->imageGeomPath); float64 isoVal = m_InputValues->isoVal; diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ImageContouring.hpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/FlyingEdges3D.hpp similarity index 50% rename from src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ImageContouring.hpp rename to src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/FlyingEdges3D.hpp index 83eecb2adb..2aa023cd3a 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ImageContouring.hpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/FlyingEdges3D.hpp @@ -7,7 +7,7 @@ namespace nx::core { -struct SIMPLNXCORE_EXPORT ImageContouringInputValues +struct SIMPLNXCORE_EXPORT FlyingEdges3DInputValues { DataPath imageGeomPath; DataPath triangleGeomPath; @@ -17,19 +17,19 @@ struct SIMPLNXCORE_EXPORT ImageContouringInputValues }; /** - * @class ImageContouring + * @class FlyingEdges3D * @brief This filter draw a 3 dimensional contouring line through an Image Geometry based on an input value. */ -class SIMPLNXCORE_EXPORT ImageContouring +class SIMPLNXCORE_EXPORT FlyingEdges3D { public: - ImageContouring(DataStructure& dataStructure, const IFilter::MessageHandler& mesgHandler, const std::atomic_bool& shouldCancel, ImageContouringInputValues* inputValues); - ~ImageContouring() noexcept; + FlyingEdges3D(DataStructure& dataStructure, const IFilter::MessageHandler& mesgHandler, const std::atomic_bool& shouldCancel, FlyingEdges3DInputValues* inputValues); + ~FlyingEdges3D() noexcept; - ImageContouring(const ImageContouring&) = delete; - ImageContouring(ImageContouring&&) noexcept = delete; - ImageContouring& operator=(const ImageContouring&) = delete; - ImageContouring& operator=(ImageContouring&&) noexcept = delete; + FlyingEdges3D(const FlyingEdges3D&) = delete; + FlyingEdges3D(FlyingEdges3D&&) noexcept = delete; + FlyingEdges3D& operator=(const FlyingEdges3D&) = delete; + FlyingEdges3D& operator=(FlyingEdges3D&&) noexcept = delete; Result<> operator()(); @@ -37,7 +37,7 @@ class SIMPLNXCORE_EXPORT ImageContouring private: DataStructure& m_DataStructure; - const ImageContouringInputValues* m_InputValues = nullptr; + const FlyingEdges3DInputValues* m_InputValues = nullptr; const std::atomic_bool& m_ShouldCancel; const IFilter::MessageHandler& m_MessageHandler; }; diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ImageContouringFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FlyingEdges3DFilter.cpp similarity index 75% rename from src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ImageContouringFilter.cpp rename to src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FlyingEdges3DFilter.cpp index 74d079ab10..bd83847a03 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ImageContouringFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FlyingEdges3DFilter.cpp @@ -1,6 +1,6 @@ -#include "ImageContouringFilter.hpp" +#include "FlyingEdges3DFilter.hpp" -#include "SimplnxCore/Filters/Algorithms/ImageContouring.hpp" +#include "SimplnxCore/Filters/Algorithms/FlyingEdges3D.hpp" #include "simplnx/Common/Types.hpp" #include "simplnx/DataStructure/Geometry/ImageGeom.hpp" @@ -20,37 +20,37 @@ const std::string k_VertexNormals = "VertexNormals"; namespace nx::core { //------------------------------------------------------------------------------ -std::string ImageContouringFilter::name() const +std::string FlyingEdges3DFilter::name() const { - return FilterTraits::name.str(); + return FilterTraits::name.str(); } //------------------------------------------------------------------------------ -std::string ImageContouringFilter::className() const +std::string FlyingEdges3DFilter::className() const { - return FilterTraits::className; + return FilterTraits::className; } //------------------------------------------------------------------------------ -Uuid ImageContouringFilter::uuid() const +Uuid FlyingEdges3DFilter::uuid() const { - return FilterTraits::uuid; + return FilterTraits::uuid; } //------------------------------------------------------------------------------ -std::string ImageContouringFilter::humanName() const +std::string FlyingEdges3DFilter::humanName() const { return "Surface Contour Filter (Flying Edges 3D)"; } //------------------------------------------------------------------------------ -std::vector ImageContouringFilter::defaultTags() const +std::vector FlyingEdges3DFilter::defaultTags() const { - return {className(), "Surface Contour Filter (Flying Edges)", "Image Geometry"}; + return {className(), "FlyingEdges3D", "Contouring", "Image Geometry", "Flying Edges 3D", "ISO Contour"}; } //------------------------------------------------------------------------------ -Parameters ImageContouringFilter::parameters() const +Parameters FlyingEdges3DFilter::parameters() const { Parameters params; @@ -72,14 +72,14 @@ Parameters ImageContouringFilter::parameters() const } //------------------------------------------------------------------------------ -IFilter::UniquePointer ImageContouringFilter::clone() const +IFilter::UniquePointer FlyingEdges3DFilter::clone() const { - return std::make_unique(); + return std::make_unique(); } //------------------------------------------------------------------------------ -IFilter::PreflightResult ImageContouringFilter::preflightImpl(const DataStructure& dataStructure, const Arguments& filterArgs, const MessageHandler& messageHandler, - const std::atomic_bool& shouldCancel) const +IFilter::PreflightResult FlyingEdges3DFilter::preflightImpl(const DataStructure& dataStructure, const Arguments& filterArgs, const MessageHandler& messageHandler, + const std::atomic_bool& shouldCancel) const { auto pImageGeomPath = filterArgs.value(k_SelectedImageGeometry_Key); auto pTriangleGeomName = filterArgs.value(k_NewTriangleGeometryName_Key); @@ -103,10 +103,10 @@ IFilter::PreflightResult ImageContouringFilter::preflightImpl(const DataStructur } //------------------------------------------------------------------------------ -Result<> ImageContouringFilter::executeImpl(DataStructure& dataStructure, const Arguments& filterArgs, const PipelineFilter* pipelineNode, const MessageHandler& messageHandler, - const std::atomic_bool& shouldCancel) const +Result<> FlyingEdges3DFilter::executeImpl(DataStructure& dataStructure, const Arguments& filterArgs, const PipelineFilter* pipelineNode, const MessageHandler& messageHandler, + const std::atomic_bool& shouldCancel) const { - ImageContouringInputValues inputValues; + FlyingEdges3DInputValues inputValues; inputValues.imageGeomPath = filterArgs.value(k_SelectedImageGeometry_Key); inputValues.contouringArrayPath = filterArgs.value(k_SelectedDataArray_Key); @@ -114,6 +114,6 @@ Result<> ImageContouringFilter::executeImpl(DataStructure& dataStructure, const inputValues.isoVal = filterArgs.value(k_IsoVal_Key); inputValues.normalsArrayPath = inputValues.triangleGeomPath.createChildPath(INodeGeometry0D::k_VertexDataName).createChildPath(k_VertexNormals); - return ImageContouring(dataStructure, messageHandler, shouldCancel, &inputValues)(); + return FlyingEdges3D(dataStructure, messageHandler, shouldCancel, &inputValues)(); } } // namespace nx::core diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ImageContouringFilter.hpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FlyingEdges3DFilter.hpp similarity index 85% rename from src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ImageContouringFilter.hpp rename to src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FlyingEdges3DFilter.hpp index 130080be5d..2a099d42f3 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ImageContouringFilter.hpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FlyingEdges3DFilter.hpp @@ -8,20 +8,20 @@ namespace nx::core { /** - * @class ImageContouringFilter + * @class FlyingEdges3DFilter * @brief This filter will draw a 3 dimensional contouring line through an Image Geometry based on an input value. */ -class SIMPLNXCORE_EXPORT ImageContouringFilter : public IFilter +class SIMPLNXCORE_EXPORT FlyingEdges3DFilter : public IFilter { public: - ImageContouringFilter() = default; - ~ImageContouringFilter() noexcept override = default; + FlyingEdges3DFilter() = default; + ~FlyingEdges3DFilter() noexcept override = default; - ImageContouringFilter(const ImageContouringFilter&) = delete; - ImageContouringFilter(ImageContouringFilter&&) noexcept = delete; + FlyingEdges3DFilter(const FlyingEdges3DFilter&) = delete; + FlyingEdges3DFilter(FlyingEdges3DFilter&&) noexcept = delete; - ImageContouringFilter& operator=(const ImageContouringFilter&) = delete; - ImageContouringFilter& operator=(ImageContouringFilter&&) noexcept = delete; + FlyingEdges3DFilter& operator=(const FlyingEdges3DFilter&) = delete; + FlyingEdges3DFilter& operator=(FlyingEdges3DFilter&&) noexcept = delete; // Parameter Keys static inline constexpr StringLiteral k_SelectedImageGeometry_Key = "selected_image_geometry"; @@ -96,4 +96,4 @@ class SIMPLNXCORE_EXPORT ImageContouringFilter : public IFilter }; } // namespace nx::core -SIMPLNX_DEF_FILTER_TRAITS(nx::core, ImageContouringFilter, "c15b1af6-c43d-44ba-b180-f0130afafc8e"); +SIMPLNX_DEF_FILTER_TRAITS(nx::core, FlyingEdges3DFilter, "c15b1af6-c43d-44ba-b180-f0130afafc8e"); diff --git a/src/Plugins/SimplnxCore/test/CMakeLists.txt b/src/Plugins/SimplnxCore/test/CMakeLists.txt index 69e8a24f66..5b98e31c4f 100644 --- a/src/Plugins/SimplnxCore/test/CMakeLists.txt +++ b/src/Plugins/SimplnxCore/test/CMakeLists.txt @@ -71,7 +71,7 @@ set(${PLUGIN_NAME}UnitTest_SRCS GenerateVectorColorsTest.cpp GeneratePythonSkeletonTest.cpp IdentifySampleTest.cpp - ImageContouringTest.cpp + FlyingEdges3DTest.cpp ImageGeomTest.cpp InitializeDataTest.cpp InitializeImageGeomCellDataTest.cpp diff --git a/src/Plugins/SimplnxCore/test/ImageContouringTest.cpp b/src/Plugins/SimplnxCore/test/FlyingEdges3DTest.cpp similarity index 84% rename from src/Plugins/SimplnxCore/test/ImageContouringTest.cpp rename to src/Plugins/SimplnxCore/test/FlyingEdges3DTest.cpp index d05e05f8f8..9cf6240143 100644 --- a/src/Plugins/SimplnxCore/test/ImageContouringTest.cpp +++ b/src/Plugins/SimplnxCore/test/FlyingEdges3DTest.cpp @@ -1,4 +1,4 @@ -#include "SimplnxCore/Filters/ImageContouringFilter.hpp" +#include "SimplnxCore/Filters/FlyingEdges3DFilter.hpp" #include "SimplnxCore/SimplnxCore_test_dirs.hpp" #include "simplnx/DataStructure/Geometry/TriangleGeom.hpp" @@ -33,7 +33,7 @@ const DataPath k_ExemplarNormals = k_ExemplarContourPath.createChildPath(INodeGe const DataPath k_NewNormals = k_NewContourPath.createChildPath(INodeGeometry0D::k_VertexDataName).createChildPath(k_VertexNormals); } // namespace ContourTest -TEST_CASE("SimplnxCore::Image Contouring Valid Execution", "[SimplnxCore][ImageContouring]") +TEST_CASE("SimplnxCore::Image Contouring Valid Execution", "[SimplnxCore][FlyingEdges3D]") { const nx::core::UnitTest::TestFileSentinel testDataSentinel(nx::core::unit_test::k_CMakeExecutable, nx::core::unit_test::k_TestFilesDir, "flying_edges_exemplar.tar.gz", "flying_edges_exemplar.dream3d"); @@ -44,16 +44,16 @@ TEST_CASE("SimplnxCore::Image Contouring Valid Execution", "[SimplnxCore][ImageC { // Instantiate the filter and an Arguments Object - ImageContouringFilter filter; + FlyingEdges3DFilter filter; Arguments args; // Create default Parameters for the filter. - args.insertOrAssign(ImageContouringFilter::k_IsoVal_Key, std::make_any(ContourTest::k_IsoVal)); + args.insertOrAssign(FlyingEdges3DFilter::k_IsoVal_Key, std::make_any(ContourTest::k_IsoVal)); // Selected Data Objects - args.insertOrAssign(ImageContouringFilter::k_SelectedImageGeometry_Key, std::make_any(ContourTest::k_GeometryPath)); - args.insertOrAssign(ImageContouringFilter::k_SelectedDataArray_Key, std::make_any(ContourTest::k_DataPath)); + args.insertOrAssign(FlyingEdges3DFilter::k_SelectedImageGeometry_Key, std::make_any(ContourTest::k_GeometryPath)); + args.insertOrAssign(FlyingEdges3DFilter::k_SelectedDataArray_Key, std::make_any(ContourTest::k_DataPath)); // Output Path - args.insertOrAssign(ImageContouringFilter::k_NewTriangleGeometryName_Key, std::make_any(ContourTest::k_NewTriangleContourName)); + args.insertOrAssign(FlyingEdges3DFilter::k_NewTriangleGeometryName_Key, std::make_any(ContourTest::k_NewTriangleContourName)); // Preflight the filter and check result auto preflightResult = filter.preflight(dataStructure, args);