From 931982ddd9ed208473ebc3d40918049e18787869 Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Mon, 3 Jun 2024 14:14:08 -0400 Subject: [PATCH] Use can transfer edge and/or vertex data. created functions to aggregate most of the data transfer codes into a few spots. Signed-off-by: Michael Jackson --- .../Filters/Algorithms/RemoveFlaggedEdges.cpp | 65 +++++-- .../Filters/Algorithms/RemoveFlaggedEdges.hpp | 27 ++- .../Filters/RemoveFlaggedEdgesFilter.cpp | 168 ++++++++++++------ .../Filters/RemoveFlaggedEdgesFilter.hpp | 4 + 4 files changed, 189 insertions(+), 75 deletions(-) diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/RemoveFlaggedEdges.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/RemoveFlaggedEdges.cpp index e93b9c8ca9..695c39c98f 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/RemoveFlaggedEdges.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/RemoveFlaggedEdges.cpp @@ -4,6 +4,7 @@ #include "simplnx/DataStructure/DataGroup.hpp" #include "simplnx/DataStructure/Geometry/EdgeGeom.hpp" #include "simplnx/Utilities/DataArrayUtilities.hpp" +#include "simplnx/Utilities/DataGroupUtilities.hpp" #include "simplnx/Utilities/ParallelAlgorithmUtilities.hpp" #include "simplnx/Utilities/ParallelDataAlgorithm.hpp" #include "simplnx/Utilities/ParallelTaskAlgorithm.hpp" @@ -123,6 +124,30 @@ class PopulateReducedGeometryEdgesImpl const std::vector& m_NewEdgesIndex; const std::vector& m_NewVerticesIndex; }; + +void transferElementData(DataStructure& m_DataStructure, AttributeMatrix& destCellDataAM, const std::vector& sourceDataPaths, const std::vector& newEdgesIndexList, + const std::atomic_bool& m_ShouldCancel, const IFilter::MessageHandler& m_MessageHandler) +{ + // The actual cropping of the dataStructure arrays is done in parallel where parallel here + // refers to the cropping of each DataArray being done on a separate thread. + ParallelTaskAlgorithm taskRunner; + for(const auto& edgeDataArrayPath : sourceDataPaths) + { + if(m_ShouldCancel) + { + return; + } + + const auto& oldDataArray = m_DataStructure.getDataRefAs(edgeDataArrayPath); + const std::string srcName = oldDataArray.getName(); + + auto& newDataArray = dynamic_cast(destCellDataAM.at(srcName)); + m_MessageHandler(fmt::format("Reducing Edge Geometry || Copying Data Array {}", srcName)); + ExecuteParallelFunction(oldDataArray.getDataType(), taskRunner, oldDataArray, newDataArray, newEdgesIndexList, m_ShouldCancel); + } + taskRunner.wait(); // This will spill over if the number of DataArrays to process does not divide evenly by the number of threads. +} + } // namespace // ----------------------------------------------------------------------------- @@ -235,27 +260,35 @@ Result<> RemoveFlaggedEdges::operator()() dataAlg.setRange(0, size); dataAlg.execute(PopulateReducedGeometryEdgesImpl(originalEdgeGeom, reducedEdgeGeom, newEdgesIndexList, vertexListIndices)); - // The actual cropping of the dataStructure arrays is done in parallel where parallel here - // refers to the cropping of each DataArray being done on a separate thread. - ParallelTaskAlgorithm taskRunner; - const auto& srcCellDataAM = originalEdgeGeom.getEdgeAttributeMatrixRef(); - auto& destCellDataAM = reducedEdgeGeom.getEdgeAttributeMatrixRef(); - for(const auto& [dataId, oldDataObject] : srcCellDataAM) + /** This section will copy any user defined Edge Data Arrays from the old to the reduced edge geometry **/ + if(m_InputValues->EdgeDataHandling == k_CopySelectedEdgeArraysIdx) { - if(m_ShouldCancel) + ::transferElementData(m_DataStructure, reducedEdgeGeom.getEdgeAttributeMatrixRef(), m_InputValues->SelectedEdgeData, newEdgesIndexList, m_ShouldCancel, m_MessageHandler); + } + else if(m_InputValues->EdgeDataHandling == k_CopyAllEdgeArraysIdx) + { + std::vector ignorePaths; + auto getChildrenResult = GetAllChildArrayDataPaths(m_DataStructure, m_InputValues->EdgeAttributeMatrixPath, ignorePaths); + if(getChildrenResult.has_value()) { - return {}; + ::transferElementData(m_DataStructure, reducedEdgeGeom.getEdgeAttributeMatrixRef(), getChildrenResult.value(), newEdgesIndexList, m_ShouldCancel, m_MessageHandler); } + } - const auto& oldDataArray = dynamic_cast(*oldDataObject); - const std::string srcName = oldDataArray.getName(); - - auto& newDataArray = dynamic_cast(destCellDataAM.at(srcName)); - - m_MessageHandler(fmt::format("Reducing Edge Geometry || Copying Data Array {}", srcName)); - ExecuteParallelFunction(oldDataArray.getDataType(), taskRunner, oldDataArray, newDataArray, newEdgesIndexList, m_ShouldCancel); + /** This section will copy any user defined Vertex Data Arrays from the old to the reduced Vertex geometry **/ + if(m_InputValues->VertexDataHandling == k_CopySelectedVertexArraysIdx) + { + ::transferElementData(m_DataStructure, reducedEdgeGeom.getVertexAttributeMatrixRef(), m_InputValues->SelectedVertexData, vertexListIndices, m_ShouldCancel, m_MessageHandler); + } + else if(m_InputValues->VertexDataHandling == k_CopyAllVertexArraysIdx) + { + std::vector ignorePaths; + auto getChildrenResult = GetAllChildArrayDataPaths(m_DataStructure, m_InputValues->VertexAttributeMatrixPath, ignorePaths); + if(getChildrenResult.has_value()) + { + ::transferElementData(m_DataStructure, reducedEdgeGeom.getVertexAttributeMatrixRef(), getChildrenResult.value(), vertexListIndices, m_ShouldCancel, m_MessageHandler); + } } - taskRunner.wait(); // This will spill over if the number of DataArrays to process does not divide evenly by the number of threads. return {}; } diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/RemoveFlaggedEdges.hpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/RemoveFlaggedEdges.hpp index 61233bd85b..2369cdfb46 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/RemoveFlaggedEdges.hpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/RemoveFlaggedEdges.hpp @@ -8,20 +8,25 @@ #include "simplnx/Parameters/ArraySelectionParameter.hpp" #include "simplnx/Parameters/ChoicesParameter.hpp" #include "simplnx/Parameters/DataGroupSelectionParameter.hpp" +#include "simplnx/Parameters/MultiArraySelectionParameter.hpp" #include "simplnx/Parameters/StringParameter.hpp" namespace { -const std::string k_Ignore("Ignore Edge Data"); -const std::string k_CopyAll("Copy All Edge Data"); -const std::string k_CopySelected("Copy Selected Edge Data"); +const std::string k_CopySelectedEdgeData("Copy Selected Edge Data"); +const std::string k_CopyAllEdgeData("Copy All Edge Data"); -const nx::core::ChoicesParameter::Choices k_ArrayHandlingChoices = {k_Ignore, k_CopySelected, k_CopyAll}; +const nx::core::ChoicesParameter::Choices k_EdgeDataHandlingChoices = {k_CopySelectedEdgeData, k_CopyAllEdgeData}; +const nx::core::ChoicesParameter::ValueType k_CopySelectedEdgeArraysIdx = 0ULL; +const nx::core::ChoicesParameter::ValueType k_CopyAllEdgeArraysIdx = 1ULL; -const nx::core::ChoicesParameter::ValueType k_IgnoreArraysIdx = 0ULL; -const nx::core::ChoicesParameter::ValueType k_CopySelectedArraysIdx = 1ULL; -const nx::core::ChoicesParameter::ValueType k_CopyAllArraysIdx = 2ULL; +const std::string k_CopySelectedVertexData("Copy Selected Vertex Data"); +const std::string k_CopyAllVertexData("Copy All Vertex Data"); + +const nx::core::ChoicesParameter::Choices k_VertexDataHandlingChoices = {k_CopySelectedVertexData, k_CopyAllVertexData}; +const nx::core::ChoicesParameter::ValueType k_CopySelectedVertexArraysIdx = 0ULL; +const nx::core::ChoicesParameter::ValueType k_CopyAllVertexArraysIdx = 1ULL; } // namespace @@ -32,6 +37,14 @@ struct SIMPLNXCORE_EXPORT RemoveFlaggedEdgesInputValues DataPath EdgeGeometry; DataPath MaskArrayPath; DataPath ReducedEdgeGeometry; + // These variables are associated with the Edge Data Handling + nx::core::ChoicesParameter::ValueType EdgeDataHandling; + MultiArraySelectionParameter::ValueType SelectedEdgeData; + DataPath EdgeAttributeMatrixPath; + // These variables are associated with the Vertex Data Handling + nx::core::ChoicesParameter::ValueType VertexDataHandling; + MultiArraySelectionParameter::ValueType SelectedVertexData; + DataPath VertexAttributeMatrixPath; }; /** diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveFlaggedEdgesFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveFlaggedEdgesFilter.cpp index 0cc1e930ca..80dd5fdd42 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveFlaggedEdgesFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveFlaggedEdgesFilter.cpp @@ -11,10 +11,31 @@ #include "simplnx/Parameters/DataGroupCreationParameter.hpp" #include "simplnx/Parameters/GeometrySelectionParameter.hpp" #include "simplnx/Parameters/StringParameter.hpp" +#include "simplnx/Utilities/DataGroupUtilities.hpp" #include "simplnx/Utilities/SIMPLConversion.hpp" using namespace nx::core; +namespace +{ +template +void createDataArrayActions(const DataStructure& dataStructure, const AttributeMatrix* sourceAttrMatPtr, const MultiArraySelectionParameter::ValueType& selectedArrayPaths, + const DataPath& reducedGeometryPathAttrMatPath, Result& resultOutputActions) +{ + // Now loop over each array in selectedEdgeArrays and create the corresponding arrays + // in the destination geometry's attribute matrix + for(const auto& dataPath : selectedArrayPaths) + { + const auto& srcArray = dataStructure.getDataRefAs(dataPath); + DataType dataType = srcArray.getDataType(); + IDataStore::ShapeType componentShape = srcArray.getIDataStoreRef().getComponentShape(); + DataPath dataArrayPath = reducedGeometryPathAttrMatPath.createChildPath(srcArray.getName()); + resultOutputActions.value().appendAction(std::make_unique(dataType, sourceAttrMatPtr->getShape(), std::move(componentShape), dataArrayPath)); + } +} + +} // namespace + namespace nx::core { //------------------------------------------------------------------------------ @@ -59,18 +80,29 @@ Parameters RemoveFlaggedEdgesFilter::parameters() const params.insert(std::make_unique(k_MaskArrayPath_Key, "Mask", "The DataArrayPath to the mask array that marks each edge as either true (remove) or false(keep).", DataPath{}, ArraySelectionParameter::AllowedTypes{DataType::boolean, DataType::uint8}, ArraySelectionParameter::AllowedComponentShapes{{1}})); + // Vertex Data Handling + params.insertSeparator(Parameters::Separator{"Vertex Data Handling"}); + params.insertLinkableParameter( + std::make_unique(k_VertexDataHandling_Key, "Vertex Data Handling", "How to handle Data that resides on the edges", k_CopySelectedVertexArraysIdx, k_VertexDataHandlingChoices)); + params.insert( + std::make_unique(k_VertexDataSelectedAttributeMatrix_Key, "Vertex Data", "Vertex Attribute Matrix that will be copied to the reduced geometry", DataPath{})); + params.insert(std::make_unique(k_VertexDataSelectedArrays_Key, "Vertex Attribute Arrays to Copy", "Vertex DataPaths to copy", std::vector(), + MultiArraySelectionParameter::AllowedTypes{IArray::ArrayType::DataArray}, GetAllNumericTypes())); + + params.linkParameters(k_VertexDataHandling_Key, k_VertexDataSelectedAttributeMatrix_Key, k_CopyAllVertexArraysIdx); + params.linkParameters(k_VertexDataHandling_Key, k_VertexDataSelectedArrays_Key, k_CopySelectedVertexArraysIdx); + // Edge Data Handling + params.insertSeparator(Parameters::Separator{"Edge Data Handling"}); params.insertLinkableParameter( - std::make_unique(k_EdgeDataHandling_Key, "Edge Data Handling", "How to handle Data that resides on the edges", k_IgnoreArraysIdx, k_ArrayHandlingChoices)); + std::make_unique(k_EdgeDataHandling_Key, "Edge Data Handling", "How to handle Data that resides on the edges", k_CopySelectedEdgeArraysIdx, k_EdgeDataHandlingChoices)); params.insert( std::make_unique(k_EdgeDataSelectedAttributeMatrix_Key, "Edge Data", "Edge Attribute Matrix that will be copied to the reduced geometry", DataPath{})); - params.insert(std::make_unique(k_EdgeDataSelectedArrays_Key, "Edge Attribute Arrays to Copy", "DataPaths to copy", std::vector(), + params.insert(std::make_unique(k_EdgeDataSelectedArrays_Key, "Edge Attribute Arrays to Copy", "Edge DataPaths to copy", std::vector(), MultiArraySelectionParameter::AllowedTypes{IArray::ArrayType::DataArray}, GetAllNumericTypes())); - params.linkParameters(k_EdgeDataHandling_Key, k_EdgeDataSelectedArrays_Key, k_CopySelectedArraysIdx); - params.linkParameters(k_EdgeDataHandling_Key, k_EdgeDataSelectedAttributeMatrix_Key, k_CopyAllArraysIdx); - - // Vertex Data Handling + params.linkParameters(k_EdgeDataHandling_Key, k_EdgeDataSelectedArrays_Key, k_CopySelectedEdgeArraysIdx); + params.linkParameters(k_EdgeDataHandling_Key, k_EdgeDataSelectedAttributeMatrix_Key, k_CopyAllEdgeArraysIdx); params.insertSeparator(Parameters::Separator{"Output Geometry"}); params.insert(std::make_unique(k_CreatedTriangleGeometryPath_Key, "Created Geometry", "The name of the created Edge Geometry", DataPath({"ReducedGeometry"}))); @@ -90,70 +122,94 @@ IFilter::PreflightResult RemoveFlaggedEdgesFilter::preflightImpl(const DataStruc { auto pInitialGeometryPathValue = filterArgs.value(k_SelectedTriangleGeometryPath_Key); auto pReducedGeometryPathValue = filterArgs.value(k_CreatedTriangleGeometryPath_Key); - auto pArrayHandling = filterArgs.value(k_EdgeDataHandling_Key); + auto pEdgeArrayHandling = filterArgs.value(k_EdgeDataHandling_Key); + auto selectedEdgeArrays = filterArgs.value(k_EdgeDataSelectedArrays_Key); + auto selectedEdgeAttrMatPath = filterArgs.value(k_EdgeDataSelectedAttributeMatrix_Key); + + auto pVertexArrayHandling = filterArgs.value(k_VertexDataHandling_Key); + auto selectedVertexArrays = filterArgs.value(k_VertexDataSelectedArrays_Key); + auto selectedVertexAttrMatPath = filterArgs.value(k_VertexDataSelectedAttributeMatrix_Key); PreflightResult preflightResult; Result resultOutputActions; std::vector preflightUpdatedValues; - const auto* initialGeom = dataStructure.getDataAs(pInitialGeometryPathValue); + const auto* initialGeomPtr = dataStructure.getDataAs(pInitialGeometryPathValue); + + std::string reducedVertexAttributeMatrixName = (initialGeomPtr->getVertexAttributeMatrix() == nullptr ? "Vertex Data" : initialGeomPtr->getVertexAttributeMatrix()->getName()); + std::string reducedEdgeAttributeMatrixName = (initialGeomPtr->getEdgeAttributeMatrix() == nullptr ? "Edge Data" : initialGeomPtr->getEdgeAttributeMatrix()->getName()); - if(initialGeom->getGeomType() == IGeometry::Type::Edge) + DataPath reducedVertexAttributeMatrixPath = pReducedGeometryPathValue.createChildPath(reducedVertexAttributeMatrixName); + DataPath reducedEdgeAttributeMatrixPath = pReducedGeometryPathValue.createChildPath(reducedEdgeAttributeMatrixName); + + std::vector edgeDataShape = {initialGeomPtr->getNumberOfEdges()}; + std::vector vertexDataShape = {initialGeomPtr->getNumberOfVertices()}; + + if(initialGeomPtr->getGeomType() == IGeometry::Type::Edge) { - auto createGeometryAction = std::make_unique>( - pReducedGeometryPathValue, initialGeom->getNumberOfEdges(), initialGeom->getNumberOfVertices(), - (initialGeom->getVertexAttributeMatrix() == nullptr ? "VertexAM" : initialGeom->getVertexAttributeMatrix()->getName()), - (initialGeom->getEdgeAttributeMatrix() == nullptr ? "FaceAM" : initialGeom->getEdgeAttributeMatrix()->getName()), initialGeom->getVertices()->getName(), initialGeom->getEdges()->getName()); + auto createGeometryAction = + std::make_unique>(pReducedGeometryPathValue, initialGeomPtr->getNumberOfEdges(), initialGeomPtr->getNumberOfVertices(), reducedVertexAttributeMatrixName, + reducedEdgeAttributeMatrixName, initialGeomPtr->getVertices()->getName(), initialGeomPtr->getEdges()->getName()); resultOutputActions.value().appendAction(std::move(createGeometryAction)); } - std::vector ignorePaths; // already copied over so skip these when collecting child paths to finish copying over later - - std::vector dataArrayShape = {initialGeom->getNumberOfEdges()}; // The DataArray shape goes slowest to fastest (ZYX) - - // This section gets the cell attribute matrix for the input Edge Geometry and - // then creates new arrays from each array that is in that attribute matrix. We - // also push this attribute matrix into the `ignorePaths` variable since we do - // not need to manually copy these arrays to the destination image geometry - if(pArrayHandling == k_CopyAllArraysIdx) + /** This section is for copying the Edge Data ***/ + // This _could_ be nullptr. We are going to hold off doing that check until inside each of the + // conditional blocks below. { - // Get the name of the Cell Attribute Matrix, so we can use that in the CreateImageGeometryAction - const AttributeMatrix* selectedCellData = initialGeom->getEdgeAttributeMatrix(); - if(selectedCellData == nullptr) + const AttributeMatrix* srcEdgeAttrMatPtr = initialGeomPtr->getEdgeAttributeMatrix(); + if(pEdgeArrayHandling == k_CopySelectedEdgeArraysIdx) { - return {MakeErrorResult(-5551, fmt::format("'{}' must have cell data attribute matrix", pInitialGeometryPathValue.toString()))}; + if(!selectedEdgeArrays.empty() && nullptr == srcEdgeAttrMatPtr) + { + return {MakeErrorResult(-5551, fmt::format("'{}' must have edge data attribute matrix", pInitialGeometryPathValue.toString()))}; + } + createDataArrayActions(dataStructure, srcEdgeAttrMatPtr, selectedEdgeArrays, reducedEdgeAttributeMatrixPath, resultOutputActions); } - std::string cellDataName = selectedCellData->getName(); - ignorePaths.push_back(pInitialGeometryPathValue.createChildPath(cellDataName)); - - // Now loop over each array in the source image geometry's cell attribute matrix and create the corresponding arrays - // in the destination geometry's attribute matrix - DataPath newCellAttributeMatrixPath = pReducedGeometryPathValue.createChildPath(cellDataName); - for(const auto& [identifier, object] : *selectedCellData) + else if(pEdgeArrayHandling == k_CopyAllEdgeArraysIdx) { - const auto& srcArray = dynamic_cast(*object); - DataType dataType = srcArray.getDataType(); - IDataStore::ShapeType componentShape = srcArray.getIDataStoreRef().getComponentShape(); - DataPath dataArrayPath = newCellAttributeMatrixPath.createChildPath(srcArray.getName()); - resultOutputActions.value().appendAction(std::make_unique(dataType, dataArrayShape, std::move(componentShape), dataArrayPath)); + if(nullptr == srcEdgeAttrMatPtr) + { + return {MakeErrorResult(-5551, fmt::format("'{}' must have edge data attribute matrix", pInitialGeometryPathValue.toString()))}; + } + std::vector ignorePaths; + + auto getChildrenResult = GetAllChildArrayDataPaths(dataStructure, selectedEdgeAttrMatPath, ignorePaths); + if(getChildrenResult.has_value()) + { + selectedEdgeArrays = getChildrenResult.value(); + createDataArrayActions(dataStructure, srcEdgeAttrMatPtr, selectedEdgeArrays, reducedEdgeAttributeMatrixPath, resultOutputActions); + } } } - if(pArrayHandling == k_CopySelectedArraysIdx) + + /** This section is for copying the Vertex Data ***/ + // This _could_ be nullptr. We are going to hold off doing that check until inside each of the + // conditional blocks below. { - const AttributeMatrix* selectedCellData = initialGeom->getEdgeAttributeMatrix(); - std::string cellDataName = selectedCellData->getName(); - - auto selectedEdgeArrays = filterArgs.value(k_EdgeDataSelectedArrays_Key); - // Now loop over each array in selectedEdgeArrays and create the corresponding arrays - // in the destination geometry's attribute matrix - DataPath newCellAttributeMatrixPath = pReducedGeometryPathValue.createChildPath(cellDataName); - for(const auto& dataPath : selectedEdgeArrays) + const AttributeMatrix* srcVertexAttrMatPtr = initialGeomPtr->getVertexAttributeMatrix(); + if(pVertexArrayHandling == k_CopySelectedVertexArraysIdx) { - const auto& srcArray = dataStructure.getDataRefAs(dataPath); - DataType dataType = srcArray.getDataType(); - IDataStore::ShapeType componentShape = srcArray.getIDataStoreRef().getComponentShape(); - DataPath dataArrayPath = newCellAttributeMatrixPath.createChildPath(srcArray.getName()); - resultOutputActions.value().appendAction(std::make_unique(dataType, dataArrayShape, std::move(componentShape), dataArrayPath)); + if(!selectedVertexArrays.empty() && nullptr == srcVertexAttrMatPtr) + { + return {MakeErrorResult(-5551, fmt::format("'{}' must have Vertex data attribute matrix", pInitialGeometryPathValue.toString()))}; + } + createDataArrayActions(dataStructure, srcVertexAttrMatPtr, selectedVertexArrays, reducedVertexAttributeMatrixPath, resultOutputActions); + } + else if(pVertexArrayHandling == k_CopyAllVertexArraysIdx) + { + if(nullptr == srcVertexAttrMatPtr) + { + return {MakeErrorResult(-5551, fmt::format("'{}' must have Vertex data attribute matrix", pInitialGeometryPathValue.toString()))}; + } + std::vector ignorePaths; + + auto getChildrenResult = GetAllChildArrayDataPaths(dataStructure, selectedVertexAttrMatPath, ignorePaths); + if(getChildrenResult.has_value()) + { + selectedVertexArrays = getChildrenResult.value(); + createDataArrayActions(dataStructure, srcVertexAttrMatPtr, selectedVertexArrays, reducedVertexAttributeMatrixPath, resultOutputActions); + } } } @@ -171,6 +227,14 @@ Result<> RemoveFlaggedEdgesFilter::executeImpl(DataStructure& dataStructure, con inputValues.MaskArrayPath = filterArgs.value(k_MaskArrayPath_Key); inputValues.ReducedEdgeGeometry = filterArgs.value(k_CreatedTriangleGeometryPath_Key); + inputValues.EdgeDataHandling = filterArgs.value(k_EdgeDataHandling_Key); + inputValues.EdgeAttributeMatrixPath = filterArgs.value(k_EdgeDataSelectedAttributeMatrix_Key); + inputValues.SelectedEdgeData = filterArgs.value(k_EdgeDataSelectedArrays_Key); + + inputValues.VertexDataHandling = filterArgs.value(k_VertexDataHandling_Key); + inputValues.VertexAttributeMatrixPath = filterArgs.value(k_VertexDataSelectedAttributeMatrix_Key); + inputValues.SelectedVertexData = filterArgs.value(k_VertexDataSelectedArrays_Key); + return RemoveFlaggedEdges(dataStructure, messageHandler, shouldCancel, &inputValues)(); } diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveFlaggedEdgesFilter.hpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveFlaggedEdgesFilter.hpp index c1988ebcac..61ff93fdf8 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveFlaggedEdgesFilter.hpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveFlaggedEdgesFilter.hpp @@ -31,6 +31,10 @@ class SIMPLNXCORE_EXPORT RemoveFlaggedEdgesFilter : public IFilter static inline constexpr StringLiteral k_EdgeDataSelectedArrays_Key = "edge_data_selected_array_paths"; static inline constexpr StringLiteral k_EdgeDataSelectedAttributeMatrix_Key = "edge_data_selected_attribute_matrix_path"; + static inline constexpr StringLiteral k_VertexDataHandling_Key = "vertex_data_handling_index"; + static inline constexpr StringLiteral k_VertexDataSelectedArrays_Key = "vertex_data_selected_array_paths"; + static inline constexpr StringLiteral k_VertexDataSelectedAttributeMatrix_Key = "vertex_data_selected_attribute_matrix_path"; + /** * @brief Reads SIMPL json and converts it complex Arguments. * @param json