diff --git a/src/Plugins/SimplnxCore/docs/CropImageGeometry.md b/src/Plugins/SimplnxCore/docs/CropImageGeometry.md index 7037dfe0c9..e954d7f976 100644 --- a/src/Plugins/SimplnxCore/docs/CropImageGeometry.md +++ b/src/Plugins/SimplnxCore/docs/CropImageGeometry.md @@ -4,6 +4,12 @@ This **Filter** allows the user to crop a region of interest (ROI) from an **Image Geometry**. The input parameters are in units of voxels or physical coordinates. + +## WARNING: NeighborList Removal + +If the option to "Renumber Features" is turn ON and the Cell Feature AttributeMatrix contains any *NeighborList* data arrays, those arrays will be **REMOVED** because those lists are now invalid. Re-run the *Find Neighbors* filter to re-create the lists. + + ## Examples In the following examples, the following image is being used. diff --git a/src/Plugins/SimplnxCore/docs/MinNeighbors.md b/src/Plugins/SimplnxCore/docs/MinNeighbors.md index 84e4d5b288..329db61bbc 100644 --- a/src/Plugins/SimplnxCore/docs/MinNeighbors.md +++ b/src/Plugins/SimplnxCore/docs/MinNeighbors.md @@ -10,9 +10,9 @@ This **Filter** sets the minimum number of contiguous neighboring **Features** a The **Filter** can be run in a mode where the minimum number of neighbors is applied to a single **Ensemble**. The user can select to apply the minimum to one specific **Ensemble**. -## Notes +## WARNING: NeighborList Removal -If any features are removed **and** the Cell Feature AttributeMatrix contains any *NeighborList* data arrays those arrays will be **REMOVED** because those lists are now invalid. Re-run the *Find Neighbors* filter to re-create the lists. +If the Cell Feature AttributeMatrix contains any *NeighborList* data arrays, those arrays will be **REMOVED** because those lists are now invalid. Re-run the *Find Neighbors* filter to re-create the lists. % Auto generated parameter table will be inserted here diff --git a/src/Plugins/SimplnxCore/docs/RemoveFlaggedFeaturesFilter.md b/src/Plugins/SimplnxCore/docs/RemoveFlaggedFeaturesFilter.md index 27b00bc0dd..dfdb550fa2 100644 --- a/src/Plugins/SimplnxCore/docs/RemoveFlaggedFeaturesFilter.md +++ b/src/Plugins/SimplnxCore/docs/RemoveFlaggedFeaturesFilter.md @@ -8,6 +8,16 @@ Processing (Cleanup) This **Filter** will remove **Features** that have been flagged by another **Filter** from the structure. The **Filter** requires that the user point to a boolean array at the **Feature** level that tells the **Filter** whether the **Feature** should remain in the structure. If the boolean array is *false* for a **Feature**, then all **Cells** that belong to that **Feature** are temporarily *unassigned*. Optionally, after all *undesired* **Features** are removed, the remaining **Features** are isotropically coarsened to fill in the gaps left by the removed **Features**. +| Operation | Meaning | +|-----------|---------| +| 0 | Remove features. | +| 1 | Extract features into new geometry. | +| 2 | Extract features and then remove them. | + +## WARNING: NeighborList Removal + +If the operation is [0] or [2] and the Cell Feature AttributeMatrix contains any *NeighborList* data arrays, those arrays will be **REMOVED** because those lists are now invalid. Re-run the *Find Neighbors* filter to re-create the lists. + ## Caveats This filter will **ONLY** run on an Image Geometry. diff --git a/src/Plugins/SimplnxCore/docs/RemoveMinimumSizeFeaturesFilter.md b/src/Plugins/SimplnxCore/docs/RemoveMinimumSizeFeaturesFilter.md index d140698fb7..2851c4dcfd 100644 --- a/src/Plugins/SimplnxCore/docs/RemoveMinimumSizeFeaturesFilter.md +++ b/src/Plugins/SimplnxCore/docs/RemoveMinimumSizeFeaturesFilter.md @@ -10,9 +10,9 @@ This **Filter** removes **Features** that have a total number of **Cells** below The **Filter** can be run in a mode where the minimum number of neighbors is applied to a single **Ensemble**. The user can select to apply the minimum to one specific **Ensemble**. -## Notes +## WARNING: NeighborList Removal -If any features are removed **and** the Cell Feature AttributeMatrix contains any *NeighborList* data arrays those arrays will be **REMOVED** because those lists are now invalid. Re-run the *Find Neighbors* filter to re-create the lists. +If the Cell Feature AttributeMatrix contains any *NeighborList* data arrays, those arrays will be **REMOVED** because those lists are now invalid. Re-run the *Find Neighbors* filter to re-create the lists. % Auto generated parameter table will be inserted here diff --git a/src/Plugins/SimplnxCore/docs/ResampleImageGeomFilter.md b/src/Plugins/SimplnxCore/docs/ResampleImageGeomFilter.md index 8fd8cf8f4c..a7bc6fd6ad 100644 --- a/src/Plugins/SimplnxCore/docs/ResampleImageGeomFilter.md +++ b/src/Plugins/SimplnxCore/docs/ResampleImageGeomFilter.md @@ -8,6 +8,10 @@ Sampling (Resample) This **Filter** changes the **Cell** spacing/resolution based on inputs from the user. There are several resampling modes: +## WARNING: NeighborList Removal + +If the option to "Renumber Features" is turn ON and the Cell Feature AttributeMatrix contains any *NeighborList* data arrays, those arrays will be **REMOVED** because those lists are now invalid. Re-run the *Find Neighbors* filter to re-create the lists. + ### Spacing The values entered are the desired new spacings (not multiples of the current resolution). The number of **Cells** in the volume will change when the spacing values are changed and thus the user should be cautious of generating "too many" **Cells** by entering very small values (i.e., very high resolution). diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/CropImageGeometry.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/CropImageGeometry.cpp index 31fcca7d10..941712f858 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/CropImageGeometry.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/CropImageGeometry.cpp @@ -18,14 +18,13 @@ #include "simplnx/Parameters/VectorParameter.hpp" #include "simplnx/Utilities/DataArrayUtilities.hpp" #include "simplnx/Utilities/DataGroupUtilities.hpp" +#include "simplnx/Utilities/FilterUtilities.hpp" #include "simplnx/Utilities/GeometryHelpers.hpp" #include "simplnx/Utilities/ParallelAlgorithmUtilities.hpp" #include "simplnx/Utilities/ParallelDataAlgorithm.hpp" #include "simplnx/Utilities/ParallelTaskAlgorithm.hpp" -#include "simplnx/Utilities/SamplingUtils.hpp" - #include "simplnx/Utilities/SIMPLConversion.hpp" - +#include "simplnx/Utilities/SamplingUtils.hpp" #include "simplnx/Utilities/StringUtilities.hpp" using namespace nx::core; @@ -462,6 +461,7 @@ IFilter::PreflightResult CropImageGeometry::preflightImpl(const DataStructure& d } std::string warningMsg; DataPath destCellFeatureAmPath = destImagePath.createChildPath(cellFeatureAmPath.getTargetName()); + DataPath anyFeatureAMDataPath; auto tDims = srcCellFeatureData->getShape(); resultOutputActions.value().appendAction(std::make_unique(destCellFeatureAmPath, tDims)); for(const auto& [identifier, object] : *srcCellFeatureData) @@ -480,9 +480,11 @@ IFilter::PreflightResult CropImageGeometry::preflightImpl(const DataStructure& d } if(!warningMsg.empty()) { - resultOutputActions.m_Warnings.push_back( - Warning({-55503, fmt::format("This filter modifies the Cell Level Array '{}', the following arrays are of type NeighborList and will not be copied over:{}", featureIdsArrayPath.toString(), - warningMsg)})); + resultOutputActions.m_Warnings.push_back(Warning( + {-55503, + fmt::format( + "This filter will modify the Cell Level Array '{}' which causes all Feature level NeighborLists to become invalid. These NeighborLists will not be copied to the new geometry:{}", + featureIdsArrayPath.toString(), warningMsg)})); } } diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindFeatureClusteringFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindFeatureClusteringFilter.cpp index 95c09bf947..13f37898b5 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindFeatureClusteringFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FindFeatureClusteringFilter.cpp @@ -84,8 +84,7 @@ Parameters FindFeatureClusteringFilter::parameters() const params.insert(std::make_unique(k_CellEnsembleAttributeMatrixPath_Key, "Cell Ensemble Attribute Matrix", "The path to the cell ensemble attribute matrix where the RDF and RDF min and max distance arrays will be stored", DataPath{})); params.insertSeparator(Parameters::Separator{"Created Cell Feature Data"}); - params.insert( - std::make_unique(k_ClusteringListArrayName_Key, "Clustering List", "Distance of each Feature's centroid to every other Feature's centroid", "ClusteringList")); + params.insert(std::make_unique(k_ClusteringListArrayName_Key, "Clustering List", "Distance of each Feature's centroid to every other Feature's centroid", "ClusteringList")); params.insertSeparator(Parameters::Separator{"Created Cell Ensemble Data"}); params.insert(std::make_unique(k_RDFArrayName_Key, "Radial Distribution Function", "A histogram of the normalized frequency at each bin", "RDF")); params.insert(std::make_unique(k_MaxMinArrayName_Key, "Max and Min Separation Distances", "The max and min distance found between Features", "RDFMaxMinDistances")); diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/MinNeighbors.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/MinNeighbors.cpp index 3241a742a8..e4c57577f6 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/MinNeighbors.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/MinNeighbors.cpp @@ -3,18 +3,15 @@ #include "simplnx/DataStructure/DataArray.hpp" #include "simplnx/DataStructure/Geometry/ImageGeom.hpp" #include "simplnx/Filter/Actions/DeleteDataAction.hpp" - #include "simplnx/Parameters/ArraySelectionParameter.hpp" #include "simplnx/Parameters/AttributeMatrixSelectionParameter.hpp" #include "simplnx/Parameters/BoolParameter.hpp" #include "simplnx/Parameters/GeometrySelectionParameter.hpp" #include "simplnx/Parameters/MultiArraySelectionParameter.hpp" #include "simplnx/Parameters/NumberParameter.hpp" - -#include "simplnx/Utilities/SIMPLConversion.hpp" - #include "simplnx/Utilities/DataGroupUtilities.hpp" #include "simplnx/Utilities/FilterUtilities.hpp" +#include "simplnx/Utilities/SIMPLConversion.hpp" namespace nx::core { @@ -23,7 +20,6 @@ namespace constexpr int64 k_TupleCountInvalidError = -250; constexpr int64 k_MissingFeaturePhasesError = -251; constexpr int32 k_InconsistentTupleCount = -252; -constexpr int32 k_NeighborListRemoval = -5558; constexpr int32 k_FetchChildArrayError = -5559; void assignBadPoints(DataStructure& data, const Arguments& args, const std::atomic_bool& shouldCancel) @@ -405,33 +401,11 @@ IFilter::PreflightResult MinNeighbors::preflightImpl(const DataStructure& dataSt // Feature Data is going to be modified nx::core::AppendDataObjectModifications(dataStructure, resultOutputActions.value().modifiedActions, numNeighborsPath.getParent(), {}); - // This section gives a warning to the user about NeighborLists possibly being removed + // This section will warn the user about the removal of NeighborLists + auto result = nx::core::NeighborListRemovalPreflightCode(dataStructure, featureIdsPath, numNeighborsPath, resultOutputActions); + if(result.outputActions.invalid()) { - DataPath featureGroupDataPath = numNeighborsPath.getParent(); - - // Throw a warning to inform the user that the neighbor list arrays could be deleted by this filter - std::string ss = fmt::format("If this filter modifies the Cell Level Array '{}', all arrays of type NeighborList will be deleted from the feature data group '{}'. These arrays are:\n", - featureIdsPath.toString(), featureGroupDataPath.toString()); - - auto result = nx::core::GetAllChildDataPaths(dataStructure, featureGroupDataPath, DataObject::Type::NeighborList); - if(!result.has_value()) - { - return {nonstd::make_unexpected( - std::vector{Error{k_FetchChildArrayError, fmt::format("Errors were encountered trying to retrieve the neighbor list children of group '{}'", featureGroupDataPath.toString())}})}; - } - std::vector featureNeighborListArrays = result.value(); - for(const auto& featureNeighborList : featureNeighborListArrays) - { - ss.append(" " + featureNeighborList.toString() + "\n"); - auto action = std::make_unique(featureNeighborList); - resultOutputActions.value().deferredActions.emplace_back(std::move(action)); - } - - // Inform users that the following arrays are going to be modified in place - // Feature Data is going to be modified - nx::core::AppendDataObjectModifications(dataStructure, resultOutputActions.value().modifiedActions, featureGroupDataPath, {}); - - resultOutputActions.warnings().push_back(Warning{k_NeighborListRemoval, ss}); + return result; } // Return both the resultOutputActions and the preflightUpdatedValues via std::move() diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveFlaggedFeaturesFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveFlaggedFeaturesFilter.cpp index 17786220ce..240299c6da 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveFlaggedFeaturesFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveFlaggedFeaturesFilter.cpp @@ -13,11 +13,9 @@ #include "simplnx/Parameters/ChoicesParameter.hpp" #include "simplnx/Parameters/GeometrySelectionParameter.hpp" #include "simplnx/Parameters/MultiArraySelectionParameter.hpp" - -#include "simplnx/Utilities/SIMPLConversion.hpp" - #include "simplnx/Parameters/StringParameter.hpp" #include "simplnx/Utilities/FilterUtilities.hpp" +#include "simplnx/Utilities/SIMPLConversion.hpp" using namespace nx::core; @@ -171,6 +169,13 @@ IFilter::PreflightResult RemoveFlaggedFeaturesFilter::preflightImpl(const DataSt nx::core::AppendDataObjectModifications(dataStructure, resultOutputActions.value().modifiedActions, pFeatureIdsArrayPathValue.getParent(), {}); // Feature Data is going to be modified nx::core::AppendDataObjectModifications(dataStructure, resultOutputActions.value().modifiedActions, pFlaggedFeaturesArrayPathValue.getParent(), {}); + + // This section will warn the user about the removal of NeighborLists + auto result = nx::core::NeighborListRemovalPreflightCode(dataStructure, pFeatureIdsArrayPathValue, pFlaggedFeaturesArrayPathValue, resultOutputActions); + if(result.outputActions.invalid()) + { + return result; + } } return {std::move(resultOutputActions), std::move(preflightUpdatedValues)}; diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveMinimumSizeFeaturesFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveMinimumSizeFeaturesFilter.cpp index 6ede74dde0..ddd302ffe5 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveMinimumSizeFeaturesFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RemoveMinimumSizeFeaturesFilter.cpp @@ -370,32 +370,13 @@ IFilter::PreflightResult RemoveMinimumSizeFeaturesFilter::preflightImpl(const Da nx::core::Result resultOutputActions; std::vector preflightUpdatedValues; - // This section gives a warning to the user about NeighborLists possibly being removed + // This section will warn the user about the removal of NeighborLists + auto result = nx::core::NeighborListRemovalPreflightCode(dataStructure, featureIdsPath, featurePhasesPath, resultOutputActions); + if(result.outputActions.invalid()) { - // Throw a warning to inform the user that the neighbor list arrays could be deleted by this filter - std::string ss = fmt::format("If this filter modifies the Cell Level Array '{}', all arrays of type NeighborList will be deleted from the feature data group '{}'. These arrays are:\n", - featureIdsPath.toString(), featureGroupDataPath.toString()); - - auto result = nx::core::GetAllChildDataPaths(dataStructure, featureGroupDataPath, DataObject::Type::NeighborList); - if(!result.has_value()) - { - return {nonstd::make_unexpected( - std::vector{Error{k_FetchChildArrayError, fmt::format("Errors were encountered trying to retrieve the neighbor list children of group '{}'", featureGroupDataPath.toString())}})}; - } - std::vector featureNeighborListArrays = result.value(); - for(const auto& featureNeighborList : featureNeighborListArrays) - { - ss.append(" " + featureNeighborList.toString() + "\n"); - auto action = std::make_unique(featureNeighborList); - resultOutputActions.value().deferredActions.emplace_back(std::move(action)); - } - - // Inform users that the following arrays are going to be modified in place - // Feature Data is going to be modified - nx::core::AppendDataObjectModifications(dataStructure, resultOutputActions.value().modifiedActions, featureGroupDataPath, {}); - - resultOutputActions.warnings().push_back(Warning{k_NeighborListRemoval, ss}); + return result; } + // Return both the resultOutputActions and the preflightUpdatedValues via std::move() return {std::move(resultOutputActions), std::move(preflightUpdatedValues)}; } diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ResampleImageGeomFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ResampleImageGeomFilter.cpp index 2d236db440..3c367d5ccd 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ResampleImageGeomFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ResampleImageGeomFilter.cpp @@ -292,9 +292,10 @@ IFilter::PreflightResult ResampleImageGeomFilter::preflightImpl(const DataStruct } if(!warningMsg.empty()) { - resultOutputActions.m_Warnings.push_back( - Warning({-55503, fmt::format("This filter modifies the Cell Level Array '{}', the following arrays are of type NeighborList and will not be copied over:{}", featureIdsArrayPath.toString(), - warningMsg)})); + resultOutputActions.m_Warnings.push_back(Warning( + {-55503, + fmt::format("This filter will modify the Cell Level Array '{}' which causes all Feature level NeighborLists to become invalid. These NeighborLists will not be copied to the new geometry:{}", + featureIdsArrayPath.toString(), warningMsg)})); } } diff --git a/src/simplnx/Filter/Actions/DeleteDataAction.cpp b/src/simplnx/Filter/Actions/DeleteDataAction.cpp index 12783e718a..344ebd1ce0 100644 --- a/src/simplnx/Filter/Actions/DeleteDataAction.cpp +++ b/src/simplnx/Filter/Actions/DeleteDataAction.cpp @@ -21,7 +21,7 @@ Result<> TerminateNode(DataStructure& dataStructure, const DataPath& path, IData DataObject* targetObject = dataStructure.getData(path); if(targetObject == nullptr) { - return MakeWarningVoidResult(k_TargetNotFoundErrorCode, fmt::format("Trying to delete DataObject '{}' which does not exist.", path.getTargetName())); + return MakeErrorResult(k_TargetNotFoundErrorCode, fmt::format("Trying to delete DataObject '{}' which does not exist.", path.getTargetName())); } dataStructure.removeData(targetObject->getId()); diff --git a/src/simplnx/Utilities/DataGroupUtilities.cpp b/src/simplnx/Utilities/DataGroupUtilities.cpp index c56841c197..4f69d3962f 100644 --- a/src/simplnx/Utilities/DataGroupUtilities.cpp +++ b/src/simplnx/Utilities/DataGroupUtilities.cpp @@ -98,8 +98,7 @@ bool RemoveInactiveObjects(DataStructure& dataStructure, const DataPath& feature std::vector neighborListDataPaths = result.value(); for(const auto& neighborListDataPath : neighborListDataPaths) { - messageHandler(nx::core::IFilter::Message{nx::core::IFilter::Message::Type::Info, fmt::format("NeighborList '{}' was removed from the DataStructure.", neighborListDataPath.toString())}); - dataStructure.removeData(neighborListDataPath); + messageHandler(nx::core::IFilter::Message{nx::core::IFilter::Message::Type::Info, fmt::format("NeighborList '{}' will be from the DataStructure.", neighborListDataPath.toString())}); } } } diff --git a/src/simplnx/Utilities/DataGroupUtilities.hpp b/src/simplnx/Utilities/DataGroupUtilities.hpp index a2ea32c77f..f525069477 100644 --- a/src/simplnx/Utilities/DataGroupUtilities.hpp +++ b/src/simplnx/Utilities/DataGroupUtilities.hpp @@ -14,7 +14,9 @@ namespace nx::core { /** - * @brief RemoveInactiveObjects This assumes a single Dimension TupleShape, i.e., a Linear array, (1D). + * @brief RemoveInactiveObjects This assumes a single Dimension TupleShape, i.e., a Linear array, (1D) + * + * NeighborLists are NO LONGER Removed. That is the responsibility of the filter. * * @param dataStructure * @param featureDataGroupPath diff --git a/src/simplnx/Utilities/FilterUtilities.cpp b/src/simplnx/Utilities/FilterUtilities.cpp index cc314140be..770c30f410 100644 --- a/src/simplnx/Utilities/FilterUtilities.cpp +++ b/src/simplnx/Utilities/FilterUtilities.cpp @@ -1,5 +1,8 @@ #include "FilterUtilities.hpp" +#include "simplnx/Filter/Actions/DeleteDataAction.hpp" +#include "simplnx/Utilities/DataGroupUtilities.hpp" + #include #include @@ -39,4 +42,39 @@ void AppendDataObjectModifications(const DataStructure& dataStructure, std::vect } } +// ----------------------------------------------------------------------------- +IFilter::PreflightResult NeighborListRemovalPreflightCode(const DataStructure& dataStructure, const DataPath& featureIdsPath, const DataPath& numNeighborsPath, + nx::core::Result& resultOutputActions) +{ + constexpr int32 k_FetchChildArrayError = -5559; + constexpr int32 k_NeighborListRemoval = -5558; + + DataPath featureGroupDataPath = numNeighborsPath.getParent(); + + // Throw a warning to inform the user that the neighbor list arrays could be deleted by this filter + std::string ss = + fmt::format("This filter WILL remove all arrays of type NeighborList from the feature Attribute Matrix '{}'. These arrays are:\n", featureIdsPath.toString(), featureGroupDataPath.toString()); + + auto result = nx::core::GetAllChildDataPaths(dataStructure, featureGroupDataPath, DataObject::Type::NeighborList); + if(!result.has_value()) + { + return {nonstd::make_unexpected( + std::vector{Error{k_FetchChildArrayError, fmt::format("Errors were encountered trying to retrieve the neighbor list children of group '{}'", featureGroupDataPath.toString())}})}; + } + std::vector featureNeighborListArrays = result.value(); + for(const auto& featureNeighborList : featureNeighborListArrays) + { + ss.append(" " + featureNeighborList.toString() + "\n"); + auto action = std::make_unique(featureNeighborList); + resultOutputActions.value().deferredActions.emplace_back(std::move(action)); + } + + // Inform users that the following arrays are going to be modified in place + // Feature Data is going to be modified + nx::core::AppendDataObjectModifications(dataStructure, resultOutputActions.value().modifiedActions, featureGroupDataPath, {}); + + resultOutputActions.warnings().push_back(Warning{k_NeighborListRemoval, ss}); + return {}; +} + } // namespace nx::core diff --git a/src/simplnx/Utilities/FilterUtilities.hpp b/src/simplnx/Utilities/FilterUtilities.hpp index 13f016903c..cbea57c2e7 100644 --- a/src/simplnx/Utilities/FilterUtilities.hpp +++ b/src/simplnx/Utilities/FilterUtilities.hpp @@ -3,8 +3,8 @@ #include "ParallelAlgorithmUtilities.hpp" #include "simplnx/Common/Result.hpp" #include "simplnx/Common/Types.hpp" +#include "simplnx/Filter/IFilter.hpp" #include "simplnx/Filter/Output.hpp" -#include "simplnx/Utilities/DataGroupUtilities.hpp" #include "simplnx/simplnx_export.hpp" #include @@ -206,4 +206,15 @@ SIMPLNX_EXPORT std::vector CreateDelimitersVector(bool tabAsDelimiter, boo */ SIMPLNX_EXPORT void AppendDataObjectModifications(const DataStructure& dataStructure, std::vector& modifiedActions, const DataPath& parentPath, const std::vector& ignoredDataPaths); + +/** + * @brief This will create warnings about the removal of NeighborLists + * @param dataStructure The DataStructure object + * @param featureIdsPath The DataPath to the "FeatureIds" Array + * @param numNeighborsPath The DataPath to the "NumberNeighbors" Array + * @param resultOutputActions Reference to the OutputActions that needs to be updated. + */ +SIMPLNX_EXPORT IFilter::PreflightResult NeighborListRemovalPreflightCode(const DataStructure& dataStructure, const DataPath& featureIdsPath, const DataPath& numNeighborsPath, + nx::core::Result& resultOutputActions); + } // namespace nx::core