From f867a30fd04e5ed54c2eb21c838bd1c64b571b1e Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Tue, 28 May 2024 09:13:25 -0400 Subject: [PATCH] ENH: Update docs for filters that change FeatureIds to warn user of invalid feature attribute matrix (#980) This commit adds warnings to users though updated documentation about aliasing/skewed or invalid results based on if the feature ids change or some other action that would invalidate the feature attribute matrix. - Compute Surface Area to Volume This filter had its main algorithm simplified a bit and variables updated - Compute Surface Features This filter had its output changed to uint8 from bool - Erode/Dilate bad data - Fill Bad Data - Require Minimum Size Features - Require Minimum Number of Neighbors Signed-off-by: Michael Jackson --- ...mall IN100 Full Reconstruction.d3dpipeline | 41 +- ...IN100 Morphological Statistics.d3dpipeline | 542 ++++++++++++++++-- ...00 Crystallographic Statistics.d3dpipeline | 9 +- .../(01) Small IN100 Quick Mesh.d3dpipeline | 2 - .../(02) Small IN100 Smooth Mesh.d3dpipeline | 2 - ...3) Small IN100 Mesh Statistics.d3dpipeline | 2 - .../(04) Small IN100 GBCD.d3dpipeline | 2 - .../(05) Small IN100 GBCD Metric.d3dpipeline | 2 - .../pipelines/aptr12_Analysis.d3dpipeline | 139 +++-- .../pipelines/avtr12_Analysis.d3dpipeline | 140 +++-- .../docs/ComputeSurfaceAreaToVolumeFilter.md | 27 +- .../docs/ComputeSurfaceFeaturesFilter.md | 12 +- .../docs/ErodeDilateBadDataFilter.md | 5 + .../SimplnxCore/docs/FillBadDataFilter.md | 4 + .../docs/RequireMinNumNeighborsFilter.md | 2 +- .../docs/RequireMinimumSizeFeaturesFilter.md | 2 +- .../Algorithms/ComputeBiasedFeatures.cpp | 144 ++--- .../Algorithms/ComputeBiasedFeatures.hpp | 4 +- .../Algorithms/ComputeSurfaceAreaToVolume.cpp | 128 ++--- .../Filters/ComputeBiasedFeaturesFilter.cpp | 9 +- .../Filters/ComputeSurfaceFeaturesFilter.cpp | 16 +- .../Filters/ErodeDilateBadDataFilter.cpp | 5 + .../SimplnxCore/Filters/FillBadDataFilter.cpp | 9 +- .../Filters/RequireMinNumNeighborsFilter.cpp | 3 + .../RequireMinimumSizeFeaturesFilter.cpp | 4 + .../test/ComputeSurfaceFeaturesTest.cpp | 18 +- 26 files changed, 932 insertions(+), 341 deletions(-) diff --git a/src/Plugins/OrientationAnalysis/pipelines/EBSD Reconstruction/(08) Small IN100 Full Reconstruction.d3dpipeline b/src/Plugins/OrientationAnalysis/pipelines/EBSD Reconstruction/(08) Small IN100 Full Reconstruction.d3dpipeline index b91757cf85..7ce94aed6d 100644 --- a/src/Plugins/OrientationAnalysis/pipelines/EBSD Reconstruction/(08) Small IN100 Full Reconstruction.d3dpipeline +++ b/src/Plugins/OrientationAnalysis/pipelines/EBSD Reconstruction/(08) Small IN100 Full Reconstruction.d3dpipeline @@ -1,7 +1,6 @@ { "isDisabled": false, - "name": "(08) Small IN100 Full Reconstruction.d3dpipeline", - "pinnedParams": [], + "name": "Untitled Pipeline", "pipeline": [ { "args": { @@ -67,7 +66,7 @@ }, "comments": "", "filter": { - "name": "nx::core::MultiThresholdObjects", + "name": "nx::core::MultiThresholdObjectsFilter", "uuid": "4246245e-1011-4add-8436-0af6bed19228" }, "isDisabled": false @@ -81,7 +80,7 @@ }, "comments": "", "filter": { - "name": "nx::core::ConvertOrientations", + "name": "nx::core::ConvertOrientationsFilter", "uuid": "501e54e6-a66f-4eeb-ae37-00e649c00d4b" }, "isDisabled": false @@ -113,7 +112,7 @@ }, "comments": "", "filter": { - "name": "simplnx::IdentifySampleFilter", + "name": "nx::core::IdentifySampleFilter", "uuid": "94d47495-5a89-4c7f-a0ee-5ff20e6bd273" }, "isDisabled": false @@ -238,7 +237,7 @@ }, "comments": "", "filter": { - "name": "simplnx::FindNeighborsFilter", + "name": "nx::core::ComputeFeatureNeighborsFilter", "uuid": "7177e88c-c3ab-4169-abe9-1fdaff20e598" }, "isDisabled": false @@ -256,10 +255,8 @@ "feature_ids_path": "DataContainer/Cell Data/FeatureIds", "feature_parent_ids_array_name": "ParentIds", "feature_phases_array_path": "DataContainer/Cell Feature Data/Phases", - "non_contiguous_neighbor_list_array_path": "", "seed_array_name": "MergeTwins SeedValue", "seed_value": 5489, - "use_non_contiguous_neighbors": false, "use_seed": false }, "comments": "", @@ -309,9 +306,9 @@ "DataContainer/Cell Feature Data/NumNeighbors2" ] }, - "comments": "We are going to remove the DataContainer/Cell Feature Data/NumNeighbors data because there is no way to ensure that it is correct after the last filter was executed.", + "comments": "", "filter": { - "name": "nx::core::DeleteData", + "name": "nx::core::DeleteDataFilter", "uuid": "bf286740-e987-49fe-a7c8-6e566e3a0606" }, "isDisabled": false @@ -331,7 +328,7 @@ }, "comments": "", "filter": { - "name": "simplnx::FindNeighborsFilter", + "name": "nx::core::ComputeFeatureNeighborsFilter", "uuid": "7177e88c-c3ab-4169-abe9-1fdaff20e598" }, "isDisabled": false @@ -339,7 +336,6 @@ { "args": { "apply_to_single_phase": false, - "cell_attribute_matrix_path": "DataContainer/Cell Data", "feature_ids_path": "DataContainer/Cell Data/FeatureIds", "feature_phases_path": "Data Container/Feature Data/Phases", "ignored_voxel_arrays": [], @@ -350,7 +346,7 @@ }, "comments": "", "filter": { - "name": "simplnx::RequireMinNumNeighborsFilter", + "name": "nx::core::RequireMinNumNeighborsFilter", "uuid": "4ab5153f-6014-4e6d-bbd6-194068620389" }, "isDisabled": false @@ -358,12 +354,20 @@ { "args": { "removed_data_path": [ - "DataContainer/Cell Feature Data/NumNeighbors" + "DataContainer/Cell Feature Data/NumNeighbors", + "DataContainer/Cell Feature Data/Active", + "DataContainer/Cell Feature Data/AvgEulerAngles", + "DataContainer/Cell Feature Data/AvgQuats", + "DataContainer/Cell Feature Data/EquivalentDiameters", + "DataContainer/Cell Feature Data/NumElements", + "DataContainer/Cell Feature Data/ParentIds", + "DataContainer/Cell Feature Data/Phases", + "DataContainer/Cell Feature Data/Volumes" ] }, - "comments": "We are going to remove the DataContainer/Cell Feature Data/NumNeighbors data because there is no way to ensure that it is correct after the last filter was executed.", + "comments": "", "filter": { - "name": "nx::core::DeleteData", + "name": "nx::core::DeleteDataFilter", "uuid": "bf286740-e987-49fe-a7c8-6e566e3a0606" }, "isDisabled": false @@ -454,6 +458,5 @@ "isDisabled": false } ], - "version": 1, - "workflowParams": [] -} + "version": 1 +} \ No newline at end of file diff --git a/src/Plugins/OrientationAnalysis/pipelines/EBSD Statistics/(01) Small IN100 Morphological Statistics.d3dpipeline b/src/Plugins/OrientationAnalysis/pipelines/EBSD Statistics/(01) Small IN100 Morphological Statistics.d3dpipeline index 030cbc4ae2..c0f4267ab2 100644 --- a/src/Plugins/OrientationAnalysis/pipelines/EBSD Statistics/(01) Small IN100 Morphological Statistics.d3dpipeline +++ b/src/Plugins/OrientationAnalysis/pipelines/EBSD Statistics/(01) Small IN100 Morphological Statistics.d3dpipeline @@ -1,51 +1,517 @@ { "isDisabled": false, - "name": "(01) Small IN100 Morphological Statistics.d3dpipeline", - "pinnedParams": [], + "name": "Untitled Pipeline", "pipeline": [ { "args": { + "Imported Pipeline": { + "isDisabled": false, + "name": "(08) Small IN100 Full Reconstruction", + "pipeline": [ + { + "args": { + "cell_attribute_matrix_name": "Cell Data", + "cell_ensemble_attribute_matrix_name": "Cell Ensemble Data", + "output_image_geometry_path": "DataContainer", + "read_h5_ebsd_object": { + "end_slice": 117, + "euler_representation": 0, + "hdf5_data_paths": [ + "Confidence Index", + "EulerAngles", + "Fit", + "Image Quality", + "Phases", + "SEM Signal", + "X Position", + "Y Position" + ], + "input_file_path": "Data/Output/Reconstruction/Small_IN100.h5ebsd", + "start_slice": 1, + "use_recommended_transform": true + } + }, + "comments": "", + "filter": { + "name": "nx::core::ReadH5EbsdFilter", + "uuid": "db291b6c-9aaf-432d-9547-430c865a539c" + }, + "isDisabled": false + }, + { + "args": { + "array_thresholds_object": { + "inverted": false, + "thresholds": [ + { + "array_path": "DataContainer/Cell Data/Image Quality", + "comparison": 0, + "inverted": false, + "type": "array", + "union": 0, + "value": 120.0 + }, + { + "array_path": "DataContainer/Cell Data/Confidence Index", + "comparison": 0, + "inverted": false, + "type": "array", + "union": 0, + "value": 0.1 + } + ], + "type": "collection", + "union": 0 + }, + "created_mask_type": 10, + "custom_false_value": 0.0, + "custom_true_value": 1.0, + "output_data_array_name": "Mask", + "use_custom_false_value": false, + "use_custom_true_value": false + }, + "comments": "", + "filter": { + "name": "nx::core::MultiThresholdObjectsFilter", + "uuid": "4246245e-1011-4add-8436-0af6bed19228" + }, + "isDisabled": false + }, + { + "args": { + "input_orientation_array_path": "DataContainer/Cell Data/EulerAngles", + "input_representation_index": 0, + "output_orientation_array_name": "Quats", + "output_representation_index": 2 + }, + "comments": "", + "filter": { + "name": "nx::core::ConvertOrientationsFilter", + "uuid": "501e54e6-a66f-4eeb-ae37-00e649c00d4b" + }, + "isDisabled": false + }, + { + "args": { + "alignment_shift_file_name": "Data/Output/Alignment_By_Misorientation_Shifts.txt", + "cell_phases_array_path": "DataContainer/Cell Data/Phases", + "crystal_structures_array_path": "DataContainer/Cell Ensemble Data/CrystalStructures", + "input_image_geometry_path": "DataContainer", + "mask_array_path": "DataContainer/Cell Data/Mask", + "misorientation_tolerance": 5.0, + "quats_array_path": "DataContainer/Cell Data/Quats", + "use_mask": true, + "write_alignment_shifts": false + }, + "comments": "", + "filter": { + "name": "nx::core::AlignSectionsMisorientationFilter", + "uuid": "8df2135c-7079-49f4-9756-4f3c028a5ced" + }, + "isDisabled": false + }, + { + "args": { + "fill_holes": false, + "input_image_geometry_path": "DataContainer", + "mask_array_path": "DataContainer/Cell Data/Mask" + }, + "comments": "", + "filter": { + "name": "nx::core::IdentifySampleFilter", + "uuid": "94d47495-5a89-4c7f-a0ee-5ff20e6bd273" + }, + "isDisabled": false + }, + { + "args": { + "alignment_shift_file_name": "Data/Output/Alignment_By_Feature_Centroid_Shifts.txt", + "input_image_geometry_path": "DataContainer", + "mask_array_path": "DataContainer/Cell Data/Mask", + "reference_slice": 0, + "selected_cell_data_path": "DataContainer/Cell Data", + "use_reference_slice": true, + "write_alignment_shifts": false + }, + "comments": "", + "filter": { + "name": "nx::core::AlignSectionsFeatureCentroidFilter", + "uuid": "b83f9bae-9ccf-4932-96c3-7f2fdb091452" + }, + "isDisabled": false + }, + { + "args": { + "cell_phases_array_path": "DataContainer/Cell Data/Phases", + "crystal_structures_array_path": "DataContainer/Cell Ensemble Data/CrystalStructures", + "input_image_geometry_path": "DataContainer", + "mask_array_path": "DataContainer/Cell Data/Mask", + "misorientation_tolerance": 5.0, + "number_of_neighbors": 4, + "quats_array_path": "DataContainer/Cell Data/Quats" + }, + "comments": "", + "filter": { + "name": "nx::core::BadDataNeighborOrientationCheckFilter", + "uuid": "3f342977-aea1-49e1-a9c2-f73760eba0d3" + }, + "isDisabled": false + }, + { + "args": { + "cell_phases_array_path": "DataContainer/Cell Data/Phases", + "correlation_array_path": "DataContainer/Cell Data/Confidence Index", + "crystal_structures_array_path": "DataContainer/Cell Ensemble Data/CrystalStructures", + "ignored_data_array_paths": [], + "input_image_geometry_path": "DataContainer", + "level": 2, + "min_confidence": 0.20000000298023224, + "misorientation_tolerance": 5.0, + "quats_array_path": "DataContainer/Cell Data/Quats" + }, + "comments": "", + "filter": { + "name": "nx::core::NeighborOrientationCorrelationFilter", + "uuid": "4625c192-7e46-4333-a294-67a2eb64cb37" + }, + "isDisabled": false + }, + { + "args": { + "active_array_name": "Active", + "cell_feature_attribute_matrix_name": "Cell Feature Data", + "cell_mask_array_path": "DataContainer/Cell Data/Mask", + "cell_phases_array_path": "DataContainer/Cell Data/Phases", + "cell_quats_array_path": "DataContainer/Cell Data/Quats", + "crystal_structures_array_path": "DataContainer/Cell Ensemble Data/CrystalStructures", + "feature_ids_array_name": "FeatureIds", + "input_image_geometry_path": "DataContainer", + "misorientation_tolerance": 5.0, + "randomize_features": true, + "use_mask": true + }, + "comments": "", + "filter": { + "name": "nx::core::EBSDSegmentFeaturesFilter", + "uuid": "1810c2c7-63e3-41db-b204-a5821e6271c0" + }, + "isDisabled": false + }, + { + "args": { + "cell_features_attribute_matrix_path": "DataContainer/Cell Feature Data", + "cell_phases_array_path": "DataContainer/Cell Data/Phases", + "feature_ids_path": "DataContainer/Cell Data/FeatureIds", + "feature_phases_array_name": "Phases" + }, + "comments": "", + "filter": { + "name": "nx::core::ComputeFeaturePhasesFilter", + "uuid": "da5bb20e-4a8e-49d9-9434-fbab7bc434fc" + }, + "isDisabled": false + }, + { + "args": { + "avg_euler_angles_array_name": "AvgEulerAngles", + "avg_quats_array_name": "AvgQuats", + "cell_feature_attribute_matrix_path": "DataContainer/Cell Feature Data", + "cell_feature_ids_array_path": "DataContainer/Cell Data/FeatureIds", + "cell_phases_array_path": "DataContainer/Cell Data/Phases", + "cell_quats_array_path": "DataContainer/Cell Data/Quats", + "crystal_structures_array_path": "DataContainer/Cell Ensemble Data/CrystalStructures" + }, + "comments": "", + "filter": { + "name": "nx::core::ComputeAvgOrientationsFilter", + "uuid": "086ddb9a-928f-46ab-bad6-b1498270d71e" + }, + "isDisabled": false + }, + { + "args": { + "boundary_cells_name": "BoundaryCells", + "cell_feature_array_path": "DataContainer/Cell Feature Data", + "feature_ids_path": "DataContainer/Cell Data/FeatureIds", + "input_image_geometry_path": "DataContainer", + "neighbor_list_name": "NeighborList2", + "number_of_neighbors_name": "NumNeighbors2", + "shared_surface_area_list_name": "SharedSurfaceAreaList2", + "store_boundary_cells": false, + "store_surface_features": false, + "surface_features_name": "SurfaceFeatures" + }, + "comments": "", + "filter": { + "name": "nx::core::ComputeFeatureNeighborsFilter", + "uuid": "7177e88c-c3ab-4169-abe9-1fdaff20e598" + }, + "isDisabled": false + }, + { + "args": { + "active_array_name": "Active", + "angle_tolerance": 2.0, + "avg_quats_array_path": "DataContainer/Cell Feature Data/AvgQuats", + "axis_tolerance": 3.0, + "cell_parent_ids_array_name": "ParentIds", + "contiguous_neighbor_list_array_path": "DataContainer/Cell Feature Data/NeighborList2", + "created_feature_attribute_matrix_name": "NewGrain Data", + "crystal_structures_array_path": "DataContainer/Cell Ensemble Data/CrystalStructures", + "feature_ids_path": "DataContainer/Cell Data/FeatureIds", + "feature_parent_ids_array_name": "ParentIds", + "feature_phases_array_path": "DataContainer/Cell Feature Data/Phases", + "seed_array_name": "MergeTwins SeedValue", + "seed_value": 5489, + "use_seed": false + }, + "comments": "", + "filter": { + "name": "nx::core::MergeTwinsFilter", + "uuid": "f173786a-50cd-4c3c-9518-48ef6fc2bac9" + }, + "isDisabled": false + }, + { + "args": { + "equivalent_diameters_name": "EquivalentDiameters", + "feature_attribute_matrix_path": "DataContainer/Cell Feature Data", + "feature_ids_path": "DataContainer/Cell Data/FeatureIds", + "input_image_geometry_path": "DataContainer", + "num_elements_name": "NumElements", + "save_element_sizes": false, + "volumes_name": "Volumes" + }, + "comments": "", + "filter": { + "name": "nx::core::ComputeFeatureSizesFilter", + "uuid": "c666ee17-ca58-4969-80d0-819986c72485" + }, + "isDisabled": false + }, + { + "args": { + "apply_single_phase": false, + "feature_ids_path": "DataContainer/Cell Data/FeatureIds", + "feature_phases_path": "", + "input_image_geometry_path": "DataContainer", + "min_allowed_features_size": 16, + "num_cells_path": "DataContainer/Cell Feature Data/NumElements", + "phase_number": 0 + }, + "comments": "", + "filter": { + "name": "nx::core::RequireMinimumSizeFeaturesFilter", + "uuid": "074472d3-ba8d-4a1a-99f2-2d56a0d082a0" + }, + "isDisabled": false + }, + { + "args": { + "removed_data_path": [ + "DataContainer/Cell Feature Data/NumNeighbors2" + ] + }, + "comments": "", + "filter": { + "name": "nx::core::DeleteDataFilter", + "uuid": "bf286740-e987-49fe-a7c8-6e566e3a0606" + }, + "isDisabled": false + }, + { + "args": { + "boundary_cells_name": "BoundaryCells", + "cell_feature_array_path": "DataContainer/Cell Feature Data", + "feature_ids_path": "DataContainer/Cell Data/FeatureIds", + "input_image_geometry_path": "DataContainer", + "neighbor_list_name": "NeighborList", + "number_of_neighbors_name": "NumNeighbors", + "shared_surface_area_list_name": "SharedSurfaceAreaList", + "store_boundary_cells": false, + "store_surface_features": false, + "surface_features_name": "SurfaceFeatures" + }, + "comments": "", + "filter": { + "name": "nx::core::ComputeFeatureNeighborsFilter", + "uuid": "7177e88c-c3ab-4169-abe9-1fdaff20e598" + }, + "isDisabled": false + }, + { + "args": { + "apply_to_single_phase": false, + "feature_ids_path": "DataContainer/Cell Data/FeatureIds", + "feature_phases_path": "Data Container/Feature Data/Phases", + "ignored_voxel_arrays": [], + "input_image_geometry_path": "DataContainer", + "min_num_neighbors": 2, + "num_neighbors_path": "DataContainer/Cell Feature Data/NumNeighbors", + "phase_number": 0 + }, + "comments": "", + "filter": { + "name": "nx::core::RequireMinNumNeighborsFilter", + "uuid": "4ab5153f-6014-4e6d-bbd6-194068620389" + }, + "isDisabled": false + }, + { + "args": { + "removed_data_path": [ + "DataContainer/Cell Feature Data/NumNeighbors", + "DataContainer/Cell Feature Data/Active", + "DataContainer/Cell Feature Data/AvgEulerAngles", + "DataContainer/Cell Feature Data/AvgQuats", + "DataContainer/Cell Feature Data/EquivalentDiameters", + "DataContainer/Cell Feature Data/NumElements", + "DataContainer/Cell Feature Data/ParentIds", + "DataContainer/Cell Feature Data/Phases", + "DataContainer/Cell Feature Data/Volumes" + ] + }, + "comments": "", + "filter": { + "name": "nx::core::DeleteDataFilter", + "uuid": "bf286740-e987-49fe-a7c8-6e566e3a0606" + }, + "isDisabled": false + }, + { + "args": { + "cell_phases_array_path": "Phases", + "feature_ids_path": "DataContainer/Cell Data/FeatureIds", + "ignored_data_array_paths": [], + "input_image_geometry_path": "DataContainer", + "min_allowed_defect_size": 1000, + "store_as_new_phase": false + }, + "comments": "", + "filter": { + "name": "nx::core::FillBadDataFilter", + "uuid": "a59eb864-9e6b-40bb-9292-e5281b0b4f3e" + }, + "isDisabled": false + }, + { + "args": { + "feature_ids_path": "DataContainer/Cell Data/FeatureIds", + "ignored_data_array_paths": [], + "input_image_geometry_path": "DataContainer", + "num_iterations": 2, + "operation_index": 0, + "x_dir_on": true, + "y_dir_on": true, + "z_dir_on": true + }, + "comments": "", + "filter": { + "name": "nx::core::ErodeDilateBadDataFilter", + "uuid": "7f2f7378-580e-4337-8c04-a29e7883db0b" + }, + "isDisabled": false + }, + { + "args": { + "feature_ids_path": "DataContainer/Cell Data/FeatureIds", + "ignored_data_array_paths": [], + "input_image_geometry_path": "DataContainer", + "num_iterations": 2, + "operation_index": 1, + "x_dir_on": true, + "y_dir_on": true, + "z_dir_on": true + }, + "comments": "", + "filter": { + "name": "nx::core::ErodeDilateBadDataFilter", + "uuid": "7f2f7378-580e-4337-8c04-a29e7883db0b" + }, + "isDisabled": false + }, + { + "args": { + "cell_euler_angles_array_path": "DataContainer/Cell Data/EulerAngles", + "cell_ipf_colors_array_name": "IPFColors", + "cell_phases_array_path": "DataContainer/Cell Data/Phases", + "crystal_structures_array_path": "DataContainer/Cell Ensemble Data/CrystalStructures", + "mask_array_path": "DataContainer/Cell Data/Mask", + "reference_dir": [ + 0.0, + 0.0, + 1.0 + ], + "use_mask": true + }, + "comments": "", + "filter": { + "name": "nx::core::ComputeIPFColorsFilter", + "uuid": "64cb4f27-6e5e-4dd2-8a03-0c448cb8f5e6" + }, + "isDisabled": false + }, + { + "args": { + "export_file_path": "Data/Output/Reconstruction/SmallIN100_Final.dream3d", + "write_xdmf_file": true + }, + "comments": "", + "filter": { + "name": "nx::core::WriteDREAM3DFilter", + "uuid": "b3a95784-2ced-41ec-8d3d-0242ac130003" + }, + "isDisabled": false + } + ], + "version": 1 + }, "import_data_object": { "data_paths": [ - "DataContainer/Cell Ensemble Data", - "DataContainer/Cell Ensemble Data/CrystalStructures", - "DataContainer/Cell Ensemble Data/LatticeConstants", "DataContainer", "DataContainer/Cell Data", + "DataContainer/Cell Data/Image Quality", "DataContainer/Cell Data/Confidence Index", - "DataContainer/Cell Data/EulerAngles", + "DataContainer/Cell Data/SEM Signal", "DataContainer/Cell Data/Fit", - "DataContainer/Cell Data/Image Quality", + "DataContainer/Cell Data/EulerAngles", "DataContainer/Cell Data/Phases", - "DataContainer/Cell Data/SEM Signal", + "DataContainer/Cell Ensemble Data", + "DataContainer/Cell Ensemble Data/CrystalStructures", + "DataContainer/Cell Ensemble Data/LatticeConstants", "DataContainer/Cell Data/Mask", "DataContainer/Cell Data/Quats", "DataContainer/Cell Feature Data", - "DataContainer/Cell Feature Data/Active", "DataContainer/Cell Data/FeatureIds", - "DataContainer/Cell Feature Data/Phases", - "DataContainer/Cell Feature Data/AvgQuats", - "DataContainer/Cell Feature Data/AvgEulerAngles", "DataContainer/NewGrain Data", "DataContainer/Cell Data/ParentIds", - "DataContainer/Cell Feature Data/ParentIds", "DataContainer/NewGrain Data/Active", "DataContainer/Cell Data/IPFColors" ], "file_path": "Data/Output/Reconstruction/SmallIN100_Final.dream3d" - }, - "Imported Pipeline": { - "isDisabled": false, - "name": "Untitled Pipeline", - "pipeline": [] } }, + "comments": "", "filter": { - "name": "simplnx::ReadDREAM3DFilter", + "name": "nx::core::ReadDREAM3DFilter", "uuid": "0dbd31c7-19e0-4077-83ef-f4a6459a0e2d" }, "isDisabled": false }, + { + "args": { + "cell_features_attribute_matrix_path": "DataContainer/Cell Feature Data", + "cell_phases_array_path": "DataContainer/Cell Data/Phases", + "feature_ids_path": "DataContainer/Cell Data/FeatureIds", + "feature_phases_array_name": "Phases" + }, + "comments": "", + "filter": { + "name": "nx::core::ComputeFeaturePhasesFilter", + "uuid": "da5bb20e-4a8e-49d9-9434-fbab7bc434fc" + }, + "isDisabled": false + }, { "args": { "centroids_array_name": "Centroids", @@ -53,8 +519,9 @@ "feature_ids_path": "DataContainer/Cell Data/FeatureIds", "input_image_geometry_path": "DataContainer" }, + "comments": "", "filter": { - "name": "simplnx::ComputeFeatureCentroidsFilter", + "name": "nx::core::ComputeFeatureCentroidsFilter", "uuid": "c6875ac7-8bdd-4f69-b6ce-82ac09bd3421" }, "isDisabled": false @@ -69,8 +536,9 @@ "save_element_sizes": false, "volumes_name": "Size Volumes" }, + "comments": "", "filter": { - "name": "simplnx::ComputeFeatureSizesFilter", + "name": "nx::core::ComputeFeatureSizesFilter", "uuid": "c666ee17-ca58-4969-80d0-819986c72485" }, "isDisabled": false @@ -82,12 +550,13 @@ "axis_lengths_array_name": "AxisLengths", "centroids_array_path": "DataContainer/Cell Feature Data/Centroids", "feature_ids_path": "DataContainer/Cell Data/FeatureIds", - "omega3s_array_name": "Omega3s", "input_image_geometry_path": "DataContainer", + "omega3s_array_name": "Omega3s", "volumes_array_name": "Shape Volumes" }, + "comments": "", "filter": { - "name": "simplnx::ComputeShapesFilter", + "name": "nx::core::ComputeShapesFilter", "uuid": "036b17d5-23bb-4a24-9187-c4a8dd918792" }, "isDisabled": false @@ -105,8 +574,9 @@ "store_surface_features": false, "surface_features_name": "SurfaceFeatures" }, + "comments": "", "filter": { - "name": "simplnx::FindNeighborsFilter", + "name": "nx::core::ComputeFeatureNeighborsFilter", "uuid": "7177e88c-c3ab-4169-abe9-1fdaff20e598" }, "isDisabled": false @@ -116,13 +586,14 @@ "centroids_array_path": "DataContainer/Cell Feature Data/Centroids", "equivalent_diameters_array_path": "DataContainer/Cell Feature Data/EquivalentDiameters", "feature_phases_array_path": "DataContainer/Cell Feature Data/Phases", + "input_image_geometry_path": "DataContainer", "multiples_of_average": 1.0, "neighborhood_list_array_name": "NeighborhoodList", - "neighborhoods_array_name": "Neighborhoods", - "input_image_geometry_path": "DataContainer" + "neighborhoods_array_name": "Neighborhoods" }, + "comments": "", "filter": { - "name": "simplnx::ComputeNeighborhoodsFilter", + "name": "nx::core::ComputeNeighborhoodsFilter", "uuid": "924c10e3-2f39-4c08-9d7a-7fe029f74f6d" }, "isDisabled": false @@ -135,14 +606,15 @@ "do_triple_lines": true, "feature_ids_path": "DataContainer/Cell Data/FeatureIds", "g_bdistances_array_name": "GBManhattanDistances", + "input_image_geometry_path": "DataContainer", "nearest_neighbors_array_name": "NearestNeighbors", "q_pdistances_array_name": "QPManhattanDistances", "save_nearest_neighbors": false, - "input_image_geometry_path": "DataContainer", "t_jdistances_array_name": "TJManhattanDistances" }, + "comments": "", "filter": { - "name": "simplnx::ComputeEuclideanDistMapFilter", + "name": "nx::core::ComputeEuclideanDistMapFilter", "uuid": "ba9ae8f6-443e-41d3-bb45-a08a139325c1" }, "isDisabled": false @@ -151,13 +623,14 @@ "args": { "calculate_sphericity": true, "feature_ids_path": "DataContainer/Cell Data/FeatureIds", - "num_cells_array_path": "DataContainer/Cell Feature Data/NumElements", "input_image_geometry_path": "DataContainer", + "num_cells_array_path": "DataContainer/Cell Feature Data/NumElements", "sphericity_array_name": "Sphericity", "surface_area_volume_ratio_array_name": "SurfaceAreaVolumeRatio" }, + "comments": "", "filter": { - "name": "simplnx::ComputeSurfaceAreaToVolumeFilter", + "name": "nx::core::ComputeSurfaceAreaToVolumeFilter", "uuid": "94e83e4f-797d-4594-b130-3819b7676f01" }, "isDisabled": false @@ -167,12 +640,13 @@ "export_file_path": "Data/Output/Statistics/SmallIN100_Morph.dream3d", "write_xdmf_file": true }, + "comments": "", "filter": { - "name": "simplnx::WriteDREAM3DFilter", + "name": "nx::core::WriteDREAM3DFilter", "uuid": "b3a95784-2ced-41ec-8d3d-0242ac130003" }, "isDisabled": false } ], - "workflowParams": [] -} + "version": 1 +} \ No newline at end of file diff --git a/src/Plugins/OrientationAnalysis/pipelines/EBSD Statistics/(05) Small IN100 Crystallographic Statistics.d3dpipeline b/src/Plugins/OrientationAnalysis/pipelines/EBSD Statistics/(05) Small IN100 Crystallographic Statistics.d3dpipeline index d6cd341019..6f1926145b 100644 --- a/src/Plugins/OrientationAnalysis/pipelines/EBSD Statistics/(05) Small IN100 Crystallographic Statistics.d3dpipeline +++ b/src/Plugins/OrientationAnalysis/pipelines/EBSD Statistics/(05) Small IN100 Crystallographic Statistics.d3dpipeline @@ -21,12 +21,10 @@ "DataContainer/Cell Data/Mask", "DataContainer/Cell Data/Quats", "DataContainer/Cell Feature Data", - "DataContainer/Cell Feature Data/Active", "DataContainer/Cell Data/FeatureIds", "DataContainer/Cell Feature Data/Phases", "DataContainer/NewGrain Data", "DataContainer/Cell Data/ParentIds", - "DataContainer/Cell Feature Data/ParentIds", "DataContainer/NewGrain Data/Active", "DataContainer/Cell Data/IPFColors", "DataContainer/Cell Feature Data/Centroids", @@ -71,15 +69,12 @@ "DataContainer/Cell Data/Mask", "DataContainer/Cell Data/Quats", "DataContainer/Cell Feature Data", - "DataContainer/Cell Feature Data/Active", "DataContainer/Cell Data/FeatureIds", "DataContainer/Cell Feature Data/Phases", "DataContainer/Cell Feature Data/AvgQuats", - "DataContainer/Cell Feature Data/AvgEulerAngles", - + "DataContainer/Cell Feature Data/AvgEulerAngles", "DataContainer/NewGrain Data", "DataContainer/Cell Data/ParentIds", - "DataContainer/Cell Feature Data/ParentIds", "DataContainer/NewGrain Data/Active", "DataContainer/Cell Data/IPFColors" ], @@ -683,7 +678,7 @@ "avg_quats_array_path": "DataContainer/Cell Feature Data/AvgQuats", "crystal_structures_array_path": "DataContainer/Cell Ensemble Data/CrystalStructures", "feature_phases_array_path": "DataContainer/Cell Feature Data/Phases", - "find_avg_misors": false, + "compute_avg_misors": false, "misorientation_list_array_name": "MisorientationList", "neighbor_list_array_path": "DataContainer/Cell Feature Data/NeighborhoodList" }, diff --git a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(01) Small IN100 Quick Mesh.d3dpipeline b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(01) Small IN100 Quick Mesh.d3dpipeline index 15724bd4c9..042356da66 100644 --- a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(01) Small IN100 Quick Mesh.d3dpipeline +++ b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(01) Small IN100 Quick Mesh.d3dpipeline @@ -21,12 +21,10 @@ "DataContainer/Cell Data/Mask", "DataContainer/Cell Data/Quats", "DataContainer/Cell Feature Data", - "DataContainer/Cell Feature Data/Active", "DataContainer/Cell Data/FeatureIds", "DataContainer/Cell Feature Data/Phases", "DataContainer/NewGrain Data", "DataContainer/Cell Data/ParentIds", - "DataContainer/Cell Feature Data/ParentIds", "DataContainer/NewGrain Data/Active", "DataContainer/Cell Data/IPFColors", "DataContainer/Cell Feature Data/Centroids", diff --git a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(02) Small IN100 Smooth Mesh.d3dpipeline b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(02) Small IN100 Smooth Mesh.d3dpipeline index 40a8a215fd..516ca172aa 100644 --- a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(02) Small IN100 Smooth Mesh.d3dpipeline +++ b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(02) Small IN100 Smooth Mesh.d3dpipeline @@ -31,7 +31,6 @@ "DataContainer/Cell Ensemble Data/LatticeConstants", "DataContainer/NewGrain Data", "DataContainer/NewGrain Data/Active", - "DataContainer/Cell Feature Data/Active", "DataContainer/Cell Feature Data/AspectRatios", "DataContainer/Cell Feature Data/AvgEulerAngles", "DataContainer/Cell Feature Data/AvgQuats", @@ -44,7 +43,6 @@ "DataContainer/Cell Feature Data/NumElements", "DataContainer/Cell Feature Data/NumNeighbors", "DataContainer/Cell Feature Data/Omega3s", - "DataContainer/Cell Feature Data/ParentIds", "DataContainer/Cell Feature Data/Phases", "DataContainer/Cell Feature Data/Poles", "DataContainer/Cell Feature Data/Schmids", diff --git a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(03) Small IN100 Mesh Statistics.d3dpipeline b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(03) Small IN100 Mesh Statistics.d3dpipeline index 4feecf0aaf..e0c29cbe79 100644 --- a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(03) Small IN100 Mesh Statistics.d3dpipeline +++ b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(03) Small IN100 Mesh Statistics.d3dpipeline @@ -1120,7 +1120,6 @@ "DataContainer/Cell Ensemble Data/LatticeConstants", "DataContainer/NewGrain Data", "DataContainer/NewGrain Data/Active", - "DataContainer/Cell Feature Data/Active", "DataContainer/Cell Feature Data/AspectRatios", "DataContainer/Cell Feature Data/AvgEulerAngles", "DataContainer/Cell Feature Data/AvgQuats", @@ -1133,7 +1132,6 @@ "DataContainer/Cell Feature Data/NumElements", "DataContainer/Cell Feature Data/NumNeighbors", "DataContainer/Cell Feature Data/Omega3s", - "DataContainer/Cell Feature Data/ParentIds", "DataContainer/Cell Feature Data/Phases", "DataContainer/Cell Feature Data/Poles", "DataContainer/Cell Feature Data/Schmids", diff --git a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(04) Small IN100 GBCD.d3dpipeline b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(04) Small IN100 GBCD.d3dpipeline index 85219630e1..ba619c12d3 100644 --- a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(04) Small IN100 GBCD.d3dpipeline +++ b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(04) Small IN100 GBCD.d3dpipeline @@ -1291,7 +1291,6 @@ "DataContainer/Cell Ensemble Data/LatticeConstants", "DataContainer/NewGrain Data", "DataContainer/NewGrain Data/Active", - "DataContainer/Cell Feature Data/Active", "DataContainer/Cell Feature Data/AspectRatios", "DataContainer/Cell Feature Data/AvgEulerAngles", "DataContainer/Cell Feature Data/AvgQuats", @@ -1304,7 +1303,6 @@ "DataContainer/Cell Feature Data/NumElements", "DataContainer/Cell Feature Data/NumNeighbors", "DataContainer/Cell Feature Data/Omega3s", - "DataContainer/Cell Feature Data/ParentIds", "DataContainer/Cell Feature Data/Phases", "DataContainer/Cell Feature Data/Poles", "DataContainer/Cell Feature Data/Schmids", diff --git a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(05) Small IN100 GBCD Metric.d3dpipeline b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(05) Small IN100 GBCD Metric.d3dpipeline index ac05e2844c..8ec317f307 100644 --- a/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(05) Small IN100 GBCD Metric.d3dpipeline +++ b/src/Plugins/OrientationAnalysis/pipelines/EBSD SurfaceMeshing/(05) Small IN100 GBCD Metric.d3dpipeline @@ -1291,7 +1291,6 @@ "DataContainer/Cell Ensemble Data/LatticeConstants", "DataContainer/NewGrain Data", "DataContainer/NewGrain Data/Active", - "DataContainer/Cell Feature Data/Active", "DataContainer/Cell Feature Data/AspectRatios", "DataContainer/Cell Feature Data/AvgEulerAngles", "DataContainer/Cell Feature Data/AvgQuats", @@ -1304,7 +1303,6 @@ "DataContainer/Cell Feature Data/NumElements", "DataContainer/Cell Feature Data/NumNeighbors", "DataContainer/Cell Feature Data/Omega3s", - "DataContainer/Cell Feature Data/ParentIds", "DataContainer/Cell Feature Data/Phases", "DataContainer/Cell Feature Data/Poles", "DataContainer/Cell Feature Data/Schmids", diff --git a/src/Plugins/OrientationAnalysis/pipelines/aptr12_Analysis.d3dpipeline b/src/Plugins/OrientationAnalysis/pipelines/aptr12_Analysis.d3dpipeline index a206a2e70e..b526795d5c 100644 --- a/src/Plugins/OrientationAnalysis/pipelines/aptr12_Analysis.d3dpipeline +++ b/src/Plugins/OrientationAnalysis/pipelines/aptr12_Analysis.d3dpipeline @@ -1,26 +1,26 @@ { "isDisabled": false, - "name": "aptr12_Analysis.d3dpipeline", - "pinnedParams": [], + "name": "Untitled Pipeline", "pipeline": [ { "args": { "cell_attribute_matrix_name": "Cell Data", "cell_ensemble_attribute_matrix_name": "Cell Ensemble Data", - "output_image_geometry_path": "fw-ar-IF1-aptr12-corr", "degrees_to_radians": true, "edax_hexagonal_alignment": true, - "input_file": "Data/T12-MAI-2010/fw-ar-IF1-aptr12-corr.ctf" + "input_file": "Data/T12-MAI-2010/fw-ar-IF1-aptr12-corr.ctf", + "output_image_geometry_path": "fw-ar-IF1-aptr12-corr" }, "comments": "", "filter": { - "name": "simplnx::ReadCtfDataFilter", + "name": "nx::core::ReadCtfDataFilter", "uuid": "7751923c-afb9-4032-8372-8078325c69a4" }, "isDisabled": false }, { "args": { + "input_image_geometry_path": "fw-ar-IF1-aptr12-corr", "output_image_geometry_path": "", "remove_original_geometry": true, "rotate_slice_by_slice": false, @@ -56,12 +56,11 @@ 1.0 ] ], - "rotation_representation_index": 0, - "input_image_geometry_path": "fw-ar-IF1-aptr12-corr" + "rotation_representation_index": 0 }, "comments": "", "filter": { - "name": "simplnx::RotateSampleRefFrameFilter", + "name": "nx::core::RotateSampleRefFrameFilter", "uuid": "d2451dc1-a5a1-4ac2-a64d-7991669dcffc" }, "isDisabled": false @@ -83,11 +82,16 @@ "type": "collection", "union": 0 }, - "output_data_array_name": "ThresholdArray" + "created_mask_type": 10, + "custom_false_value": 0.0, + "custom_true_value": 1.0, + "output_data_array_name": "ThresholdArray", + "use_custom_false_value": false, + "use_custom_true_value": false }, "comments": "", "filter": { - "name": "simplnx::MultiThresholdObjects", + "name": "nx::core::MultiThresholdObjectsFilter", "uuid": "4246245e-1011-4add-8436-0af6bed19228" }, "isDisabled": false @@ -101,7 +105,7 @@ }, "comments": "", "filter": { - "name": "simplnx::ConvertOrientations", + "name": "nx::core::ConvertOrientationsFilter", "uuid": "501e54e6-a66f-4eeb-ae37-00e649c00d4b" }, "isDisabled": false @@ -109,14 +113,14 @@ { "args": { "comparison_data_path": "fw-ar-IF1-aptr12-corr/Cell Data/Error", - "loop": true, - "min_confidence": 0.0, "comparison_index": 0, - "input_image_geometry_path": "fw-ar-IF1-aptr12-corr" + "input_image_geometry_path": "fw-ar-IF1-aptr12-corr", + "loop": true, + "min_confidence": 0.0 }, "comments": "", "filter": { - "name": "simplnx::ReplaceElementAttributesWithNeighborValuesFilter", + "name": "nx::core::ReplaceElementAttributesWithNeighborValuesFilter", "uuid": "65128c53-d3be-4a69-a559-32a48d603884" }, "isDisabled": false @@ -137,7 +141,7 @@ }, "comments": "", "filter": { - "name": "simplnx::ComputeIPFColorsFilter", + "name": "nx::core::ComputeIPFColorsFilter", "uuid": "64cb4f27-6e5e-4dd2-8a03-0c448cb8f5e6" }, "isDisabled": false @@ -146,13 +150,13 @@ "args": { "file_name": "Data/Output/fw-ar-IF1-aptr12-corr/fw-ar-IF1-aptr12-corr_001.png", "image_array_path": "fw-ar-IF1-aptr12-corr/Cell Data/IPF_001", - "input_image_geometry_path": "fw-ar-IF1-aptr12-corr", "index_offset": 0, + "input_image_geometry_path": "fw-ar-IF1-aptr12-corr", "plane_index": 0 }, "comments": "", "filter": { - "name": "simplnx::ITKImageWriter", + "name": "nx::core::ITKImageWriterFilter", "uuid": "a181ee3e-1678-4133-b9c5-a9dd7bfec62f" }, "isDisabled": false @@ -173,7 +177,7 @@ }, "comments": "", "filter": { - "name": "simplnx::ComputeIPFColorsFilter", + "name": "nx::core::ComputeIPFColorsFilter", "uuid": "64cb4f27-6e5e-4dd2-8a03-0c448cb8f5e6" }, "isDisabled": false @@ -182,13 +186,13 @@ "args": { "file_name": "Data/Output/fw-ar-IF1-aptr12-corr/fw-ar-IF1-aptr12-corr_010.png", "image_array_path": "fw-ar-IF1-aptr12-corr/Cell Data/IPF_010", - "input_image_geometry_path": "fw-ar-IF1-aptr12-corr", "index_offset": 0, + "input_image_geometry_path": "fw-ar-IF1-aptr12-corr", "plane_index": 0 }, "comments": "", "filter": { - "name": "simplnx::ITKImageWriter", + "name": "nx::core::ITKImageWriterFilter", "uuid": "a181ee3e-1678-4133-b9c5-a9dd7bfec62f" }, "isDisabled": false @@ -209,7 +213,7 @@ }, "comments": "", "filter": { - "name": "simplnx::ComputeIPFColorsFilter", + "name": "nx::core::ComputeIPFColorsFilter", "uuid": "64cb4f27-6e5e-4dd2-8a03-0c448cb8f5e6" }, "isDisabled": false @@ -218,13 +222,13 @@ "args": { "file_name": "Data/Output/fw-ar-IF1-aptr12-corr/fw-ar-IF1-aptr12-corr_100.png", "image_array_path": "fw-ar-IF1-aptr12-corr/Cell Data/IPF_100", - "input_image_geometry_path": "fw-ar-IF1-aptr12-corr", "index_offset": 0, + "input_image_geometry_path": "fw-ar-IF1-aptr12-corr", "plane_index": 0 }, "comments": "", "filter": { - "name": "simplnx::ITKImageWriter", + "name": "nx::core::ITKImageWriterFilter", "uuid": "a181ee3e-1678-4133-b9c5-a9dd7bfec62f" }, "isDisabled": false @@ -233,19 +237,19 @@ "args": { "active_array_name": "Active", "cell_feature_attribute_matrix_name": "Cell Feature Data", + "cell_mask_array_path": "fw-ar-IF1-aptr12-corr/Cell Data/ThresholdArray", "cell_phases_array_path": "fw-ar-IF1-aptr12-corr/Cell Data/Phases", + "cell_quats_array_path": "fw-ar-IF1-aptr12-corr/Cell Data/Quats", "crystal_structures_array_path": "fw-ar-IF1-aptr12-corr/Cell Ensemble Data/CrystalStructures", "feature_ids_array_name": "FeatureIds", - "cell_mask_array_path": "fw-ar-IF1-aptr12-corr/Cell Data/ThresholdArray", "input_image_geometry_path": "fw-ar-IF1-aptr12-corr", "misorientation_tolerance": 5.0, - "cell_quats_array_path": "fw-ar-IF1-aptr12-corr/Cell Data/Quats", "randomize_features": true, "use_mask": true }, "comments": "", "filter": { - "name": "simplnx::EBSDSegmentFeaturesFilter", + "name": "nx::core::EBSDSegmentFeaturesFilter", "uuid": "1810c2c7-63e3-41db-b204-a5821e6271c0" }, "isDisabled": false @@ -255,13 +259,13 @@ "cell_phases_array_path": "Phases", "feature_ids_path": "fw-ar-IF1-aptr12-corr/Cell Data/FeatureIds", "ignored_data_array_paths": [], - "min_allowed_defect_size": 10, "input_image_geometry_path": "fw-ar-IF1-aptr12-corr", + "min_allowed_defect_size": 10, "store_as_new_phase": false }, "comments": "", "filter": { - "name": "simplnx::FillBadDataFilter", + "name": "nx::core::FillBadDataFilter", "uuid": "a59eb864-9e6b-40bb-9292-e5281b0b4f3e" }, "isDisabled": false @@ -278,7 +282,7 @@ }, "comments": "", "filter": { - "name": "simplnx::ComputeFeatureSizesFilter", + "name": "nx::core::ComputeFeatureSizesFilter", "uuid": "c666ee17-ca58-4969-80d0-819986c72485" }, "isDisabled": false @@ -295,11 +299,44 @@ }, "comments": "", "filter": { - "name": "simplnx::RequireMinimumSizeFeaturesFilter", + "name": "nx::core::RequireMinimumSizeFeaturesFilter", "uuid": "074472d3-ba8d-4a1a-99f2-2d56a0d082a0" }, "isDisabled": false }, + { + "args": { + "removed_data_path": [ + "fw-ar-IF1-aptr12-corr/Cell Feature Data/Active", + "fw-ar-IF1-aptr12-corr/Cell Feature Data/EquivalentDiameters", + "fw-ar-IF1-aptr12-corr/Cell Feature Data/NumElements", + "fw-ar-IF1-aptr12-corr/Cell Feature Data/Volumes" + ] + }, + "comments": "", + "filter": { + "name": "nx::core::DeleteDataFilter", + "uuid": "bf286740-e987-49fe-a7c8-6e566e3a0606" + }, + "isDisabled": false + }, + { + "args": { + "equivalent_diameters_name": "EquivalentDiameters", + "feature_attribute_matrix_path": "fw-ar-IF1-aptr12-corr/Cell Feature Data", + "feature_ids_path": "fw-ar-IF1-aptr12-corr/Cell Data/FeatureIds", + "input_image_geometry_path": "fw-ar-IF1-aptr12-corr", + "num_elements_name": "NumElements", + "save_element_sizes": false, + "volumes_name": "Volumes" + }, + "comments": "", + "filter": { + "name": "nx::core::ComputeFeatureSizesFilter", + "uuid": "c666ee17-ca58-4969-80d0-819986c72485" + }, + "isDisabled": false + }, { "args": { "avg_euler_angles_array_name": "AvgEulerAngles", @@ -312,7 +349,7 @@ }, "comments": "", "filter": { - "name": "simplnx::ComputeAvgOrientationsFilter", + "name": "nx::core::ComputeAvgOrientationsFilter", "uuid": "086ddb9a-928f-46ab-bad6-b1498270d71e" }, "isDisabled": false @@ -322,18 +359,18 @@ "cell_phases_array_path": "fw-ar-IF1-aptr12-corr/Cell Data/Phases", "crystal_structures_array_path": "fw-ar-IF1-aptr12-corr/Cell Ensemble Data/CrystalStructures", "feature_ids_path": "fw-ar-IF1-aptr12-corr/Cell Data/FeatureIds", + "input_image_geometry_path": "fw-ar-IF1-aptr12-corr", "kernel_average_misorientations_array_name": "KernelAverageMisorientations", "kernel_size": [ 1, 1, 1 ], - "quats_array_path": "fw-ar-IF1-aptr12-corr/Cell Data/Quats", - "input_image_geometry_path": "fw-ar-IF1-aptr12-corr" + "quats_array_path": "fw-ar-IF1-aptr12-corr/Cell Data/Quats" }, "comments": "", "filter": { - "name": "simplnx::ComputeKernelAvgMisorientationsFilter", + "name": "nx::core::ComputeKernelAvgMisorientationsFilter", "uuid": "61cfc9c1-aa0e-452b-b9ef-d3b9e6268035" }, "isDisabled": false @@ -347,7 +384,7 @@ }, "comments": "", "filter": { - "name": "simplnx::ComputeFeatureCentroidsFilter", + "name": "nx::core::ComputeFeatureCentroidsFilter", "uuid": "c6875ac7-8bdd-4f69-b6ce-82ac09bd3421" }, "isDisabled": false @@ -360,15 +397,15 @@ "do_triple_lines": false, "feature_ids_path": "fw-ar-IF1-aptr12-corr/Cell Data/FeatureIds", "g_bdistances_array_name": "GBManhattanDistances", + "input_image_geometry_path": "fw-ar-IF1-aptr12-corr", "nearest_neighbors_array_name": "NearestNeighbors", "q_pdistances_array_name": "QPManhattanDistances", "save_nearest_neighbors": false, - "input_image_geometry_path": "fw-ar-IF1-aptr12-corr", "t_jdistances_array_name": "TJManhattanDistances" }, "comments": "", "filter": { - "name": "simplnx::ComputeEuclideanDistMapFilter", + "name": "nx::core::ComputeEuclideanDistMapFilter", "uuid": "ba9ae8f6-443e-41d3-bb45-a08a139325c1" }, "isDisabled": false @@ -388,7 +425,7 @@ }, "comments": "", "filter": { - "name": "simplnx::ComputeFeatureReferenceMisorientationsFilter", + "name": "nx::core::ComputeFeatureReferenceMisorientationsFilter", "uuid": "24b54daf-3bf5-4331-93f6-03a49f719bf1" }, "isDisabled": false @@ -403,19 +440,20 @@ }, "comments": "", "filter": { - "name": "simplnx::WriteFeatureDataCSVFilter", + "name": "nx::core::WriteFeatureDataCSVFilter", "uuid": "d734293f-3017-4699-b458-c05aca078b96" }, "isDisabled": false }, { "args": { + "create_new_data_group": true, "histogram_suffix": " Histogram", "max_range": 1.0, "min_range": 0.0, - "create_new_data_group": true, "new_data_group_path": "fw-ar-IF1-aptr12-corr/Histograms", "number_of_bins": 256, + "output_data_group_path": "", "selected_array_paths": [ "fw-ar-IF1-aptr12-corr/Cell Feature Data/EquivalentDiameters" ], @@ -423,26 +461,27 @@ }, "comments": "", "filter": { - "name": "simplnx::ComputeArrayHistogramFilter", + "name": "nx::core::ComputeArrayHistogramFilter", "uuid": "c6b6d9e5-301d-4767-abf7-530f5ef5007d" }, "isDisabled": false }, { "args": { - "output_path": "Data/Output/fw-ar-IF1-aptr12-corr/EqDiamHistogram.csv", "delimiter_index": 2, "file_extension": ".csv", "header_option_index": 1, - "max_val_per_line": 0, - "output_style_index": 1, "input_data_array_paths": [ "fw-ar-IF1-aptr12-corr/Histograms/EquivalentDiameters Histogram" - ] + ], + "max_val_per_line": 0, + "output_dir": "", + "output_path": "Data/Output/fw-ar-IF1-aptr12-corr/EqDiamHistogram.csv", + "output_style_index": 1 }, "comments": "", "filter": { - "name": "simplnx::WriteASCIIDataFilter", + "name": "nx::core::WriteASCIIDataFilter", "uuid": "06c8bfe8-2b42-4956-aca3-580bc0620716" }, "isDisabled": false @@ -454,11 +493,11 @@ }, "comments": "", "filter": { - "name": "simplnx::WriteDREAM3DFilter", + "name": "nx::core::WriteDREAM3DFilter", "uuid": "b3a95784-2ced-41ec-8d3d-0242ac130003" }, "isDisabled": false } ], - "workflowParams": [] -} + "version": 1 +} \ No newline at end of file diff --git a/src/Plugins/OrientationAnalysis/pipelines/avtr12_Analysis.d3dpipeline b/src/Plugins/OrientationAnalysis/pipelines/avtr12_Analysis.d3dpipeline index 230d7eab51..df912c6f3d 100644 --- a/src/Plugins/OrientationAnalysis/pipelines/avtr12_Analysis.d3dpipeline +++ b/src/Plugins/OrientationAnalysis/pipelines/avtr12_Analysis.d3dpipeline @@ -1,26 +1,26 @@ { "isDisabled": false, - "name": "avtr12_Analysis.d3dpipeline", - "pinnedParams": [], + "name": "Untitled Pipeline", "pipeline": [ { "args": { "cell_attribute_matrix_name": "Cell Data", "cell_ensemble_attribute_matrix_name": "Cell Ensemble Data", - "output_image_geometry_path": "fw-ar-IF1-avtr12-corr", "degrees_to_radians": true, "edax_hexagonal_alignment": true, - "input_file": "Data/T12-MAI-2010/fw-ar-IF1-avtr12-corr.ctf" + "input_file": "Data/T12-MAI-2010/fw-ar-IF1-avtr12-corr.ctf", + "output_image_geometry_path": "fw-ar-IF1-avtr12-corr" }, "comments": "", "filter": { - "name": "simplnx::ReadCtfDataFilter", + "name": "nx::core::ReadCtfDataFilter", "uuid": "7751923c-afb9-4032-8372-8078325c69a4" }, "isDisabled": false }, { "args": { + "input_image_geometry_path": "fw-ar-IF1-avtr12-corr", "output_image_geometry_path": "", "remove_original_geometry": true, "rotate_slice_by_slice": false, @@ -56,12 +56,11 @@ 1.0 ] ], - "rotation_representation_index": 0, - "input_image_geometry_path": "fw-ar-IF1-avtr12-corr" + "rotation_representation_index": 0 }, "comments": "", "filter": { - "name": "simplnx::RotateSampleRefFrameFilter", + "name": "nx::core::RotateSampleRefFrameFilter", "uuid": "d2451dc1-a5a1-4ac2-a64d-7991669dcffc" }, "isDisabled": false @@ -83,11 +82,16 @@ "type": "collection", "union": 0 }, - "output_data_array_name": "ThresholdArray" + "created_mask_type": 10, + "custom_false_value": 0.0, + "custom_true_value": 1.0, + "output_data_array_name": "ThresholdArray", + "use_custom_false_value": false, + "use_custom_true_value": false }, "comments": "", "filter": { - "name": "simplnx::MultiThresholdObjects", + "name": "nx::core::MultiThresholdObjectsFilter", "uuid": "4246245e-1011-4add-8436-0af6bed19228" }, "isDisabled": false @@ -101,7 +105,7 @@ }, "comments": "", "filter": { - "name": "simplnx::ConvertOrientations", + "name": "nx::core::ConvertOrientationsFilter", "uuid": "501e54e6-a66f-4eeb-ae37-00e649c00d4b" }, "isDisabled": false @@ -109,14 +113,14 @@ { "args": { "comparison_data_path": "fw-ar-IF1-avtr12-corr/Cell Data/Error", - "loop": true, - "min_confidence": 0.0, "comparison_index": 0, - "input_image_geometry_path": "fw-ar-IF1-avtr12-corr" + "input_image_geometry_path": "fw-ar-IF1-avtr12-corr", + "loop": true, + "min_confidence": 0.0 }, "comments": "", "filter": { - "name": "simplnx::ReplaceElementAttributesWithNeighborValuesFilter", + "name": "nx::core::ReplaceElementAttributesWithNeighborValuesFilter", "uuid": "65128c53-d3be-4a69-a559-32a48d603884" }, "isDisabled": false @@ -137,7 +141,7 @@ }, "comments": "", "filter": { - "name": "simplnx::ComputeIPFColorsFilter", + "name": "nx::core::ComputeIPFColorsFilter", "uuid": "64cb4f27-6e5e-4dd2-8a03-0c448cb8f5e6" }, "isDisabled": false @@ -146,13 +150,13 @@ "args": { "file_name": "Data/Output/fw-ar-IF1-avtr12-corr/fw-ar-IF1-avtr12-corr_001.png", "image_array_path": "fw-ar-IF1-avtr12-corr/Cell Data/IPF_001", - "input_image_geometry_path": "fw-ar-IF1-avtr12-corr", "index_offset": 0, + "input_image_geometry_path": "fw-ar-IF1-avtr12-corr", "plane_index": 0 }, "comments": "", "filter": { - "name": "simplnx::ITKImageWriter", + "name": "nx::core::ITKImageWriterFilter", "uuid": "a181ee3e-1678-4133-b9c5-a9dd7bfec62f" }, "isDisabled": false @@ -173,7 +177,7 @@ }, "comments": "", "filter": { - "name": "simplnx::ComputeIPFColorsFilter", + "name": "nx::core::ComputeIPFColorsFilter", "uuid": "64cb4f27-6e5e-4dd2-8a03-0c448cb8f5e6" }, "isDisabled": false @@ -182,13 +186,13 @@ "args": { "file_name": "Data/Output/fw-ar-IF1-avtr12-corr/fw-ar-IF1-avtr12-corr_010.png", "image_array_path": "fw-ar-IF1-avtr12-corr/Cell Data/IPF_010", - "input_image_geometry_path": "fw-ar-IF1-avtr12-corr", "index_offset": 0, + "input_image_geometry_path": "fw-ar-IF1-avtr12-corr", "plane_index": 0 }, "comments": "", "filter": { - "name": "simplnx::ITKImageWriter", + "name": "nx::core::ITKImageWriterFilter", "uuid": "a181ee3e-1678-4133-b9c5-a9dd7bfec62f" }, "isDisabled": false @@ -209,7 +213,7 @@ }, "comments": "", "filter": { - "name": "simplnx::ComputeIPFColorsFilter", + "name": "nx::core::ComputeIPFColorsFilter", "uuid": "64cb4f27-6e5e-4dd2-8a03-0c448cb8f5e6" }, "isDisabled": false @@ -218,13 +222,13 @@ "args": { "file_name": "Data/Output/fw-ar-IF1-avtr12-corr/fw-ar-IF1-avtr12-corr_100.png", "image_array_path": "fw-ar-IF1-avtr12-corr/Cell Data/IPF_100", - "input_image_geometry_path": "fw-ar-IF1-avtr12-corr", "index_offset": 0, + "input_image_geometry_path": "fw-ar-IF1-avtr12-corr", "plane_index": 0 }, "comments": "", "filter": { - "name": "simplnx::ITKImageWriter", + "name": "nx::core::ITKImageWriterFilter", "uuid": "a181ee3e-1678-4133-b9c5-a9dd7bfec62f" }, "isDisabled": false @@ -233,19 +237,19 @@ "args": { "active_array_name": "Active", "cell_feature_attribute_matrix_name": "Cell Feature Data", + "cell_mask_array_path": "fw-ar-IF1-avtr12-corr/Cell Data/ThresholdArray", "cell_phases_array_path": "fw-ar-IF1-avtr12-corr/Cell Data/Phases", + "cell_quats_array_path": "fw-ar-IF1-avtr12-corr/Cell Data/Quats", "crystal_structures_array_path": "fw-ar-IF1-avtr12-corr/Cell Ensemble Data/CrystalStructures", "feature_ids_array_name": "FeatureIds", - "cell_mask_array_path": "fw-ar-IF1-avtr12-corr/Cell Data/ThresholdArray", "input_image_geometry_path": "fw-ar-IF1-avtr12-corr", "misorientation_tolerance": 5.0, - "cell_quats_array_path": "fw-ar-IF1-avtr12-corr/Cell Data/Quats", "randomize_features": false, "use_mask": true }, "comments": "", "filter": { - "name": "simplnx::EBSDSegmentFeaturesFilter", + "name": "nx::core::EBSDSegmentFeaturesFilter", "uuid": "1810c2c7-63e3-41db-b204-a5821e6271c0" }, "isDisabled": false @@ -255,13 +259,13 @@ "cell_phases_array_path": "Phases", "feature_ids_path": "fw-ar-IF1-avtr12-corr/Cell Data/FeatureIds", "ignored_data_array_paths": [], - "min_allowed_defect_size": 10, "input_image_geometry_path": "fw-ar-IF1-avtr12-corr", + "min_allowed_defect_size": 10, "store_as_new_phase": false }, "comments": "", "filter": { - "name": "simplnx::FillBadDataFilter", + "name": "nx::core::FillBadDataFilter", "uuid": "a59eb864-9e6b-40bb-9292-e5281b0b4f3e" }, "isDisabled": false @@ -278,7 +282,7 @@ }, "comments": "", "filter": { - "name": "simplnx::ComputeFeatureSizesFilter", + "name": "nx::core::ComputeFeatureSizesFilter", "uuid": "c666ee17-ca58-4969-80d0-819986c72485" }, "isDisabled": false @@ -295,11 +299,44 @@ }, "comments": "", "filter": { - "name": "simplnx::RequireMinimumSizeFeaturesFilter", + "name": "nx::core::RequireMinimumSizeFeaturesFilter", "uuid": "074472d3-ba8d-4a1a-99f2-2d56a0d082a0" }, "isDisabled": false }, + { + "args": { + "removed_data_path": [ + "fw-ar-IF1-avtr12-corr/Cell Feature Data/Active", + "fw-ar-IF1-avtr12-corr/Cell Feature Data/EquivalentDiameters", + "fw-ar-IF1-avtr12-corr/Cell Feature Data/NumElements", + "fw-ar-IF1-avtr12-corr/Cell Feature Data/Volumes" + ] + }, + "comments": "", + "filter": { + "name": "nx::core::DeleteDataFilter", + "uuid": "bf286740-e987-49fe-a7c8-6e566e3a0606" + }, + "isDisabled": false + }, + { + "args": { + "equivalent_diameters_name": "EquivalentDiameters", + "feature_attribute_matrix_path": "fw-ar-IF1-avtr12-corr/Cell Feature Data", + "feature_ids_path": "fw-ar-IF1-avtr12-corr/Cell Data/FeatureIds", + "input_image_geometry_path": "fw-ar-IF1-avtr12-corr", + "num_elements_name": "NumElements", + "save_element_sizes": false, + "volumes_name": "Volumes" + }, + "comments": "", + "filter": { + "name": "nx::core::ComputeFeatureSizesFilter", + "uuid": "c666ee17-ca58-4969-80d0-819986c72485" + }, + "isDisabled": false + }, { "args": { "avg_euler_angles_array_name": "AvgEulerAngles", @@ -312,7 +349,7 @@ }, "comments": "", "filter": { - "name": "simplnx::ComputeAvgOrientationsFilter", + "name": "nx::core::ComputeAvgOrientationsFilter", "uuid": "086ddb9a-928f-46ab-bad6-b1498270d71e" }, "isDisabled": false @@ -322,18 +359,18 @@ "cell_phases_array_path": "fw-ar-IF1-avtr12-corr/Cell Data/Phases", "crystal_structures_array_path": "fw-ar-IF1-avtr12-corr/Cell Ensemble Data/CrystalStructures", "feature_ids_path": "fw-ar-IF1-avtr12-corr/Cell Data/FeatureIds", + "input_image_geometry_path": "fw-ar-IF1-avtr12-corr", "kernel_average_misorientations_array_name": "KernelAverageMisorientations", "kernel_size": [ 1, 1, 1 ], - "quats_array_path": "fw-ar-IF1-avtr12-corr/Cell Data/Quats", - "input_image_geometry_path": "fw-ar-IF1-avtr12-corr" + "quats_array_path": "fw-ar-IF1-avtr12-corr/Cell Data/Quats" }, "comments": "", "filter": { - "name": "simplnx::ComputeKernelAvgMisorientationsFilter", + "name": "nx::core::ComputeKernelAvgMisorientationsFilter", "uuid": "61cfc9c1-aa0e-452b-b9ef-d3b9e6268035" }, "isDisabled": false @@ -347,7 +384,7 @@ }, "comments": "", "filter": { - "name": "simplnx::ComputeFeatureCentroidsFilter", + "name": "nx::core::ComputeFeatureCentroidsFilter", "uuid": "c6875ac7-8bdd-4f69-b6ce-82ac09bd3421" }, "isDisabled": false @@ -360,15 +397,15 @@ "do_triple_lines": false, "feature_ids_path": "fw-ar-IF1-avtr12-corr/Cell Data/FeatureIds", "g_bdistances_array_name": "GBManhattanDistances", + "input_image_geometry_path": "fw-ar-IF1-avtr12-corr", "nearest_neighbors_array_name": "NearestNeighbors", "q_pdistances_array_name": "QPManhattanDistances", "save_nearest_neighbors": false, - "input_image_geometry_path": "fw-ar-IF1-avtr12-corr", "t_jdistances_array_name": "TJManhattanDistances" }, "comments": "", "filter": { - "name": "simplnx::ComputeEuclideanDistMapFilter", + "name": "nx::core::ComputeEuclideanDistMapFilter", "uuid": "ba9ae8f6-443e-41d3-bb45-a08a139325c1" }, "isDisabled": false @@ -388,7 +425,7 @@ }, "comments": "", "filter": { - "name": "simplnx::ComputeFeatureReferenceMisorientationsFilter", + "name": "nx::core::ComputeFeatureReferenceMisorientationsFilter", "uuid": "24b54daf-3bf5-4331-93f6-03a49f719bf1" }, "isDisabled": false @@ -403,19 +440,20 @@ }, "comments": "", "filter": { - "name": "simplnx::WriteFeatureDataCSVFilter", + "name": "nx::core::WriteFeatureDataCSVFilter", "uuid": "d734293f-3017-4699-b458-c05aca078b96" }, "isDisabled": false }, { "args": { + "create_new_data_group": true, "histogram_suffix": "Histogram", "max_range": 1.0, "min_range": 0.0, - "create_new_data_group": true, "new_data_group_path": "fw-ar-IF1-avtr12-corr/Histograms", "number_of_bins": 256, + "output_data_group_path": "", "selected_array_paths": [ "fw-ar-IF1-avtr12-corr/Cell Feature Data/EquivalentDiameters" ], @@ -423,27 +461,27 @@ }, "comments": "", "filter": { - "name": "simplnx::ComputeArrayHistogramFilter", + "name": "nx::core::ComputeArrayHistogramFilter", "uuid": "c6b6d9e5-301d-4767-abf7-530f5ef5007d" }, "isDisabled": false }, { "args": { - "output_path": "Data/Output/fw-ar-IF1-avtr12-corr/EqDiamHistogram.csv", "delimiter_index": 2, "file_extension": ".csv", - "output_dir": "", "header_option_index": 1, - "max_val_per_line": 0, - "output_style_index": 1, "input_data_array_paths": [ "fw-ar-IF1-avtr12-corr/Histograms/EquivalentDiametersHistogram" - ] + ], + "max_val_per_line": 0, + "output_dir": "", + "output_path": "Data/Output/fw-ar-IF1-avtr12-corr/EqDiamHistogram.csv", + "output_style_index": 1 }, "comments": "", "filter": { - "name": "simplnx::WriteASCIIDataFilter", + "name": "nx::core::WriteASCIIDataFilter", "uuid": "06c8bfe8-2b42-4956-aca3-580bc0620716" }, "isDisabled": false @@ -455,11 +493,11 @@ }, "comments": "", "filter": { - "name": "simplnx::WriteDREAM3DFilter", + "name": "nx::core::WriteDREAM3DFilter", "uuid": "b3a95784-2ced-41ec-8d3d-0242ac130003" }, "isDisabled": false } ], - "workflowParams": [] -} + "version": 1 +} \ No newline at end of file diff --git a/src/Plugins/SimplnxCore/docs/ComputeSurfaceAreaToVolumeFilter.md b/src/Plugins/SimplnxCore/docs/ComputeSurfaceAreaToVolumeFilter.md index c3c9055773..708a9cf770 100644 --- a/src/Plugins/SimplnxCore/docs/ComputeSurfaceAreaToVolumeFilter.md +++ b/src/Plugins/SimplnxCore/docs/ComputeSurfaceAreaToVolumeFilter.md @@ -6,14 +6,35 @@ Statistics (Morphological) ## Description -This **Filter** calculates the ratio of surface area to volume for each **Feature** in an **Image Geometry**. First, all the boundary **Cells** are found for each **Feature**. Next, the surface area for each face that is in contact with a different **Feature** is totalled. This number is divided by the volume of each **Feature**, calculated by taking the number of **Cells** of each **Feature** and multiplying by the volume of a **Cell**. - -*Note:* The surface area will be the surface area of the **Cells** in contact with the neighboring **Feature** and will be influenced by the aliasing of the structure. As a result, the surface area to volume will likely be over-estimated with respect to the *real* **Feature**. +This **Filter** calculates the ratio of surface area to volume for each **Feature** in an **Image Geometry**. This filter also optionally calculate the [Sphericity](https://en.wikipedia.org/wiki/Sphericity) of each feature. ![Equation for Sphericity used in the filter](Images/Sphericity_Equation.png) +This **Filter** determines whether a **Feature** touches an outer *Surface* of the sample volume. A **Feature** is considered touching the *Surface* of the sample if either of the following conditions are met: + ++ Any cell location is xmin, xmax, ymin, ymax, zmin or zmax ++ Any cell has **Feature ID = 0** as a neighbor. + +## Algorithm Details + +- First, all the boundary **Cells** are found for each **Feature**. +- Next, the surface area for each face that is in contact with a different **Feature** is totalled as long as that neighboring *featureId* is > 0. +- This number is divided by the volume of each **Feature**, calculated by taking the number of **Cells** of each **Feature** and multiplying by the volume of a **Cell**. + +### WARNING - Aliasing + +The surface area will be the surface area of the **Cells** in contact with the neighboring **Feature** and will be influenced by the aliasing of the structure. As a result, the surface area to volume will likely be over-estimated with respect to the *real* **Feature**. + +### WARNING - Skewed Results for features touching the surface + +Because the filter does not include any surface that is touching/connected to a "FeatureId = 0", those features that are in contact with the edge of the virtual volume or in contact with internal features that are labeled as "FeatureId = 0" will have their values skewed. + +### Warning - 2D Image Geometry Results + +Because even a single slice has *volume* according to DREAM3D-NX, results will still be computed. These results should **NOT** be interpreted as "Boundary Length to Area" values. + % Auto generated parameter table will be inserted here ## Example Pipelines diff --git a/src/Plugins/SimplnxCore/docs/ComputeSurfaceFeaturesFilter.md b/src/Plugins/SimplnxCore/docs/ComputeSurfaceFeaturesFilter.md index d908f93d8b..e05dd45880 100644 --- a/src/Plugins/SimplnxCore/docs/ComputeSurfaceFeaturesFilter.md +++ b/src/Plugins/SimplnxCore/docs/ComputeSurfaceFeaturesFilter.md @@ -15,9 +15,13 @@ This **Filter** determines whether a **Feature** touches an outer *Surface* of t The output of this filter is a **Feature** level array of booleans where 0=Interior/Not touching and 1=Surface/Touching. -*Note*: If there are voxels within the volume that have **Feature ID=0** then any feature touching those voxels will be considered a *Surface* feature. +### WARNING -*Note*: The version of this filter in legacy DREAM.3D had two bugs: one that indexed into neighboring features incorrectly (DREAM3D repo issue #988), and another that incorrectly labeled feature 0 as a surface feature when feature 0 exists in the feature ids array (DREAM3D repo issue #989). Both of these bugs have been fixed in this new version. +If there are voxels within the volume that have **Feature ID=0** then any feature touching those voxels will be considered a *Surface* feature. + +### WARNING + +The version of this filter in legacy DREAM.3D had two bugs: one that indexed into neighboring features incorrectly (DREAM3D repo issue #988), and another that incorrectly labeled feature 0 as a surface feature when feature 0 exists in the feature ids array (DREAM3D repo issue #989). Both of these bugs have been fixed in this new version. ### 2D Image Geometry @@ -25,10 +29,10 @@ If the structure/data is actually 2D, then the dimension that is planar is not c ### Example Output -| | | +| | | |-------|--------| | ![ComputeSurfaceFeatures_Cylinder](Images/ComputeSurfaceFeatures_Cylinder.png) | ![ComputeSurfaceFeatures_Square](Images/ComputeSurfaceFeatures_Square.png) | -| Example showing features touching Feature ID=0 (Black voxels) | Example showing features touching the outer surface of the bounding box | +| Example showing features touching Feature ID=0 (Black voxels) "Mark Feature 0 Neighbors" is **ON** | Example showing features touching the outer surface of the bounding box | % Auto generated parameter table will be inserted here diff --git a/src/Plugins/SimplnxCore/docs/ErodeDilateBadDataFilter.md b/src/Plugins/SimplnxCore/docs/ErodeDilateBadDataFilter.md index 1dd2cde668..12c423f2cf 100644 --- a/src/Plugins/SimplnxCore/docs/ErodeDilateBadDataFilter.md +++ b/src/Plugins/SimplnxCore/docs/ErodeDilateBadDataFilter.md @@ -47,6 +47,11 @@ would remove the single **Cells** and reduce the pores by one **Cell**. If this operation, then the pores would grow by one **Cell** and return to near their original size, while the single **Cells** would remain removed and not "grow back". + +## WARNING: Feature Data Will Become Invalid + +By modifying the cell level data, any feature data that was previously computed will most likely be invalid at this point. Filters that compute feature level data should be rerun to ensure accurate final results from your pipeline. + % Auto generated parameter table will be inserted here ## Example Pipelines diff --git a/src/Plugins/SimplnxCore/docs/FillBadDataFilter.md b/src/Plugins/SimplnxCore/docs/FillBadDataFilter.md index 8c5a2c88cf..0835c0ae1a 100644 --- a/src/Plugins/SimplnxCore/docs/FillBadDataFilter.md +++ b/src/Plugins/SimplnxCore/docs/FillBadDataFilter.md @@ -14,6 +14,10 @@ This **Filter** removes small *noise* in the data, but keeps larger regions that The above images show the before and after results of running this filter with a minimum defect size of 1000 voxels. Note that because the minimum defect size was set to 1000 voxels that the over scan area was not modified (the area in all black around the sample). +## WARNING: Feature Data Will Become Invalid + +By modifying the cell level data, any feature data that was previously computed will most likely be invalid at this point. Filters that compute feature level data should be rerun to ensure accurate final results from your pipeline. + % Auto generated parameter table will be inserted here ## Example Pipelines diff --git a/src/Plugins/SimplnxCore/docs/RequireMinNumNeighborsFilter.md b/src/Plugins/SimplnxCore/docs/RequireMinNumNeighborsFilter.md index c90cba1241..d9d3ca1676 100644 --- a/src/Plugins/SimplnxCore/docs/RequireMinNumNeighborsFilter.md +++ b/src/Plugins/SimplnxCore/docs/RequireMinNumNeighborsFilter.md @@ -12,7 +12,7 @@ The **Filter** can be run in a mode where the minimum number of neighbors is app ## WARNING: Feature Data Will Become Invalid -By modifying the cell level data, any feature data that was previously computed will most likely be invalid at this point. Filters such as "Find Sizes", "Find Shapes" should be re-run if you want accurate final results from your pipeline. +By modifying the cell level data, any feature data that was previously computed will most likely be invalid at this point. Filters that compute feature level data should be rerun to ensure accurate final results from your pipeline. ## WARNING: NeighborList Removal diff --git a/src/Plugins/SimplnxCore/docs/RequireMinimumSizeFeaturesFilter.md b/src/Plugins/SimplnxCore/docs/RequireMinimumSizeFeaturesFilter.md index 1fd055be34..2829f3b2da 100644 --- a/src/Plugins/SimplnxCore/docs/RequireMinimumSizeFeaturesFilter.md +++ b/src/Plugins/SimplnxCore/docs/RequireMinimumSizeFeaturesFilter.md @@ -12,7 +12,7 @@ The **Filter** can be run in a mode where the minimum number of neighbors is app ## WARNING: Feature Data Will Become Invalid -By modifying the cell level data, any feature data that was previously computed will most likely be invalid at this point. Filters such as "Find Sizes", "Find Shapes" should be re-run if you want accurate final results from your pipeline. +By modifying the cell level data, any feature data that was previously computed will most likely be invalid at this point. Filters that compute feature level data should be rerun to ensure accurate final results from your pipeline. ## WARNING: NeighborList Removal diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ComputeBiasedFeatures.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ComputeBiasedFeatures.cpp index 59b561d0be..b86e1e1a75 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ComputeBiasedFeatures.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ComputeBiasedFeatures.cpp @@ -2,6 +2,7 @@ #include "simplnx/DataStructure/DataArray.hpp" #include "simplnx/DataStructure/Geometry/ImageGeom.hpp" +#include "simplnx/Utilities/DataArrayUtilities.hpp" using namespace nx::core; @@ -42,31 +43,33 @@ Result<> ComputeBiasedFeatures::operator()() } // ----------------------------------------------------------------------------- -void ComputeBiasedFeatures::findBoundingBoxFeatures() +Result<> ComputeBiasedFeatures::findBoundingBoxFeatures() { const ImageGeom imageGeometry = m_DataStructure.getDataRefAs(m_InputValues->ImageGeometryPath); const auto& centroids = m_DataStructure.getDataRefAs(m_InputValues->CentroidsArrayPath); - const auto& surfaceFeatures = m_DataStructure.getDataRefAs(m_InputValues->SurfaceFeaturesArrayPath); - Int32Array* phases = nullptr; + Int32Array* phasesPtr = nullptr; if(m_InputValues->CalcByPhase) { - phases = m_DataStructure.getDataAs(m_InputValues->PhasesArrayPath); + phasesPtr = m_DataStructure.getDataAs(m_InputValues->PhasesArrayPath); } auto& biasedFeatures = m_DataStructure.getDataRefAs(m_InputValues->BiasedFeaturesArrayName); biasedFeatures.fill(false); + std::unique_ptr surfaceFeatures = nullptr; + try + { + surfaceFeatures = InstantiateMaskCompare(m_DataStructure, m_InputValues->SurfaceFeaturesArrayPath); + } catch(const std::out_of_range& exception) + { + // This really should NOT be happening as the path was verified during preflight BUT we may be calling this from + // somewhere else that is NOT going through the normal nx::core::IFilter API of Preflight and Execute + std::string message = fmt::format("Surface Features Array DataPath does not exist or is not of the correct type (Bool | UInt8) {}", m_InputValues->SurfaceFeaturesArrayPath.toString()); + return MakeErrorResult(-54900, message); + } + const usize size = centroids.getNumberOfTuples(); - float boundBox[6] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; - float32 coords[6] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; - float32 x = 0.0f; - float32 y = 0.0f; - float32 z = 0.0f; - float32 dist[7] = { - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - }; - float32 minDist = std::numeric_limits::max(); - int32 sideToMove = 0; - int32 move = 0; + std::vector boundBox = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + std::vector coords = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; // loop first to determine number of phases if calcByPhase is being used int32 numPhases = 1; @@ -74,9 +77,9 @@ void ComputeBiasedFeatures::findBoundingBoxFeatures() { for(usize i = 1; i < size; i++) { - if((*phases)[i] > numPhases) + if((*phasesPtr)[i] > numPhases) { - numPhases = (*phases)[i]; + numPhases = (*phasesPtr)[i]; } } } @@ -87,10 +90,10 @@ void ComputeBiasedFeatures::findBoundingBoxFeatures() m_MessageHandler(IFilter::Message::Type::Info, fmt::format("Working on Phase {} of {}", iter, numPhases)); } // reset boundBox for each phase - const BoundingBox3D bb = imageGeometry.getBoundingBoxf(); + const BoundingBox3D boundingBox = imageGeometry.getBoundingBoxf(); - auto min = bb.getMinPoint(); - auto max = bb.getMaxPoint(); + const auto& min = boundingBox.getMinPoint(); + const auto& max = boundingBox.getMaxPoint(); boundBox[0] = min.getX(); boundBox[1] = max.getX(); boundBox[2] = min.getY(); @@ -100,28 +103,26 @@ void ComputeBiasedFeatures::findBoundingBoxFeatures() for(usize i = 1; i < size; i++) { - if(surfaceFeatures[i] && (!m_InputValues->CalcByPhase || (*phases)[i] == iter)) + if(surfaceFeatures->isTrue(i) && (!m_InputValues->CalcByPhase || (*phasesPtr)[i] == iter)) { - sideToMove = 0; - move = 1; - minDist = std::numeric_limits::max(); - x = centroids[3 * i]; - y = centroids[3 * i + 1]; - z = centroids[3 * i + 2]; - coords[0] = x; - coords[1] = x; - coords[2] = y; - coords[3] = y; - coords[4] = z; - coords[5] = z; + int32 sideToMove = 0; + int32 move = 1; + float32 minDist = std::numeric_limits::max(); + + coords[0] = centroids[3 * i]; + coords[1] = centroids[3 * i]; + coords[2] = centroids[3 * i + 1]; + coords[3] = centroids[3 * i + 1]; + coords[4] = centroids[3 * i + 2]; + coords[5] = centroids[3 * i + 2]; for(int32 j = 1; j < 7; j++) { - dist[j] = std::numeric_limits::max(); + float32 dist = std::numeric_limits::max(); if(j % 2 == 1) { if(coords[j - 1] > boundBox[j - 1]) { - dist[j] = (coords[j - 1] - boundBox[j - 1]); + dist = (coords[j - 1] - boundBox[j - 1]); } if(coords[j - 1] <= boundBox[j - 1]) { @@ -132,16 +133,16 @@ void ComputeBiasedFeatures::findBoundingBoxFeatures() { if(coords[j - 1] < boundBox[j - 1]) { - dist[j] = (boundBox[j - 1] - coords[j - 1]); + dist = (boundBox[j - 1] - coords[j - 1]); } if(coords[j - 1] >= boundBox[j - 1]) { move = 0; } } - if(dist[j] < minDist) + if(dist < minDist) { - minDist = dist[j]; + minDist = dist; sideToMove = j - 1; } } @@ -153,7 +154,7 @@ void ComputeBiasedFeatures::findBoundingBoxFeatures() } for(usize j = 1; j < size; j++) { - if(!m_InputValues->CalcByPhase || (*phases)[j] == iter) + if(!m_InputValues->CalcByPhase || (*phasesPtr)[j] == iter) { if(centroids[3 * j] <= boundBox[0]) { @@ -184,35 +185,43 @@ void ComputeBiasedFeatures::findBoundingBoxFeatures() if(getCancel()) { - return; + return {}; } } + + return {}; } // ----------------------------------------------------------------------------- -void ComputeBiasedFeatures::findBoundingBoxFeatures2D() +Result<> ComputeBiasedFeatures::findBoundingBoxFeatures2D() { const ImageGeom imageGeometry = m_DataStructure.getDataRefAs(m_InputValues->ImageGeometryPath); const SizeVec3 imageDimensions = imageGeometry.getDimensions(); const FloatVec3 imageOrigin = imageGeometry.getOrigin(); const auto& centroids = m_DataStructure.getDataRefAs(m_InputValues->CentroidsArrayPath); - const auto& surfaceFeatures = m_DataStructure.getDataRefAs(m_InputValues->SurfaceFeaturesArrayPath); auto& biasedFeatures = m_DataStructure.getDataRefAs(m_InputValues->BiasedFeaturesArrayName); biasedFeatures.fill(false); + std::unique_ptr maskCompare = nullptr; + try + { + maskCompare = InstantiateMaskCompare(m_DataStructure, m_InputValues->SurfaceFeaturesArrayPath); + } catch(const std::out_of_range& exception) + { + // This really should NOT be happening as the path was verified during preflight BUT we may be calling this from + // somewhere else that is NOT going through the normal nx::core::IFilter API of Preflight and Execute + std::string message = fmt::format("Surface Features Array DataPath does not exist or is not of the correct type (Bool | UInt8) {}", m_InputValues->SurfaceFeaturesArrayPath.toString()); + return MakeErrorResult(-54900, message); + } + const usize size = centroids.getNumberOfTuples(); - float32 coords[4] = {0.0f, 0.0f, 0.0f, 0.0f}; - float32 x = 0.0f; - float32 y = 0.0f; - float32 dist[5] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; - float32 minDist = std::numeric_limits::max(); - int32 sideToMove = 0; - int32 move = 0; + std::vector coords = {0.0f, 0.0f, 0.0f, 0.0f}; float32 xOrigin = 0.0f; float32 yOrigin = 0.0f; - int32 xPoints = 0, yPoints = 0; + int32 xPoints = 0; + int32 yPoints = 0; FloatVec3 spacing; usize centroidShift0 = 0; @@ -249,29 +258,27 @@ void ComputeBiasedFeatures::findBoundingBoxFeatures2D() centroidShift1 = 1; } - float32 boundBox[6] = {xOrigin, xOrigin + xPoints * spacing[0], yOrigin, yOrigin + yPoints * spacing[1], 0.0f, 0.0f}; + std::vector boundBox = {xOrigin, xOrigin + static_cast(xPoints) * spacing[0], yOrigin, yOrigin + static_cast(yPoints) * spacing[1], 0.0f, 0.0f}; for(usize i = 1; i < size; i++) { - if(surfaceFeatures[i]) + if(maskCompare->isTrue(i)) { - sideToMove = 0; - move = 1; - minDist = std::numeric_limits::max(); - x = centroids[3 * i + centroidShift0]; - y = centroids[3 * i + centroidShift1]; - coords[0] = x; - coords[1] = x; - coords[2] = y; - coords[3] = y; + int32 sideToMove = 0; + int32 move = 1; + float32 minDist = std::numeric_limits::max(); + coords[0] = centroids[3 * i + centroidShift0]; + coords[1] = centroids[3 * i + centroidShift0]; + coords[2] = centroids[3 * i + centroidShift1]; + coords[3] = centroids[3 * i + centroidShift1]; for(int32 j = 1; j < 5; j++) { - dist[j] = std::numeric_limits::max(); + float32 dist = std::numeric_limits::max(); if(j % 2 == 1) { if(coords[j - 1] > boundBox[j - 1]) { - dist[j] = (coords[j - 1] - boundBox[j - 1]); + dist = (coords[j - 1] - boundBox[j - 1]); } if(coords[j - 1] <= boundBox[j - 1]) { @@ -282,16 +289,16 @@ void ComputeBiasedFeatures::findBoundingBoxFeatures2D() { if(coords[j - 1] < boundBox[j - 1]) { - dist[j] = (boundBox[j - 1] - coords[j - 1]); + dist = (boundBox[j - 1] - coords[j - 1]); } if(coords[j - 1] >= boundBox[j - 1]) { move = 0; } } - if(dist[j] < minDist) + if(dist < minDist) { - minDist = dist[j]; + minDist = dist; sideToMove = j - 1; } } @@ -303,7 +310,7 @@ void ComputeBiasedFeatures::findBoundingBoxFeatures2D() if(getCancel()) { - return; + return {}; } } for(usize j = 1; j < size; j++) @@ -327,7 +334,8 @@ void ComputeBiasedFeatures::findBoundingBoxFeatures2D() if(getCancel()) { - return; + return {}; } } + return {}; } diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ComputeBiasedFeatures.hpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ComputeBiasedFeatures.hpp index 464654eda4..527a35d0c7 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ComputeBiasedFeatures.hpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ComputeBiasedFeatures.hpp @@ -40,8 +40,8 @@ class SIMPLNXCORE_EXPORT ComputeBiasedFeatures const std::atomic_bool& getCancel(); protected: - void findBoundingBoxFeatures(); - void findBoundingBoxFeatures2D(); + Result<> findBoundingBoxFeatures(); + Result<> findBoundingBoxFeatures2D(); private: DataStructure& m_DataStructure; diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ComputeSurfaceAreaToVolume.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ComputeSurfaceAreaToVolume.cpp index 9c4ffea11e..619cae2bcc 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ComputeSurfaceAreaToVolume.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ComputeSurfaceAreaToVolume.cpp @@ -31,6 +31,7 @@ Result<> ComputeSurfaceAreaToVolume::operator()() { // Input Cell Data const auto& featureIds = m_DataStructure.getDataRefAs(m_InputValues->FeatureIdsArrayPath); + // Input Feature Data const auto& numCells = m_DataStructure.getDataRefAs(m_InputValues->NumCellsArrayPath); @@ -67,11 +68,6 @@ Result<> ComputeSurfaceAreaToVolume::operator()() { return {MakeErrorResult(-5555, errorMessage)}; } - // - // if(largestFeature != (numFeatures - 1)) - // { - // return {MakeErrorResult(-5555, fmt::format("The number of Features in the NumCells array ({}) does not match the largest Feature Id {} in the FeatureIds array", numFeatures, largestFeature))}; - // } SizeVec3 dims = imageGeom.getDimensions(); FloatVec3 spacing = imageGeom.getSpacing(); @@ -84,79 +80,81 @@ Result<> ComputeSurfaceAreaToVolume::operator()() std::vector featureSurfaceArea(static_cast(numFeatures), 0.0f); - int64_t neighpoints[6] = {0, 0, 0, 0, 0, 0}; - neighpoints[0] = -xPoints * yPoints; - neighpoints[1] = -xPoints; - neighpoints[2] = -1; - neighpoints[3] = 1; - neighpoints[4] = xPoints; - neighpoints[5] = xPoints * yPoints; - - int32_t feature = 0; - float onsurf = 0.0f; - bool good = false; - int64_t neighbor = 0; - - int64_t zStride = 0, yStride = 0; - for(int64_t i = 0; i < zPoints; i++) + // This stores an offset to get to a particular index in the array based on + // a normal orthogonal cube + int64_t neighborOffset[6] = {0, 0, 0, 0, 0, 0}; + neighborOffset[0] = -xPoints * yPoints; // -Z + neighborOffset[1] = -xPoints; // -Y + neighborOffset[2] = -1; // -X + neighborOffset[3] = 1; // +X + neighborOffset[4] = xPoints; // +Y + neighborOffset[5] = xPoints * yPoints; // +Z + + // Start looping over the regular grid data (This could be either an Image Geometry or a Rectilinear Grid geometry (in theory) + for(int64_t zIdx = 0; zIdx < zPoints; zIdx++) { - zStride = i * xPoints * yPoints; - for(int64_t j = 0; j < yPoints; j++) + int64_t zStride = zIdx * xPoints * yPoints; + for(int64_t yIdx = 0; yIdx < yPoints; yIdx++) { - yStride = j * xPoints; - for(int64_t k = 0; k < xPoints; k++) + int64_t yStride = yIdx * xPoints; + for(int64_t xIdx = 0; xIdx < xPoints; xIdx++) { - onsurf = 0.0f; - feature = featureIds[zStride + yStride + k]; - if(feature > 0) + float onSurface = 0.0f; // Start totalling the surface area + int32 currentFeatureId = featureIds[zStride + yStride + xIdx]; + // If the current feature ID is not valid (< 1), then just continue; + if(currentFeatureId < 1) + { + continue; + } + + // Loop over all 6 face neighbors + for(int32_t neighborOffsetIndex = 0; neighborOffsetIndex < 6; neighborOffsetIndex++) { - for(int32_t l = 0; l < 6; l++) + if(neighborOffsetIndex == 0 && zIdx == 0) // if we are on the bottom Z Layer, skip { - good = true; - neighbor = zStride + yStride + k + neighpoints[l]; - if(l == 0 && i == 0) - { - good = false; - } - if(l == 5 && i == (zPoints - 1)) - { - good = false; - } - if(l == 1 && j == 0) - { - good = false; - } - if(l == 4 && j == (yPoints - 1)) - { - good = false; - } - if(l == 2 && k == 0) + continue; + } + if(neighborOffsetIndex == 5 && zIdx == (zPoints - 1)) // if we are on the top Z Layer, skip + { + continue; + } + if(neighborOffsetIndex == 1 && yIdx == 0) // If we are on the first Y row, skip + { + continue; + } + if(neighborOffsetIndex == 4 && yIdx == (yPoints - 1)) // If we are on the last Y row, skip + { + continue; + } + if(neighborOffsetIndex == 2 && xIdx == 0) // If we are on the first X column, skip + { + continue; + } + if(neighborOffsetIndex == 3 && xIdx == (xPoints - 1)) // If we are on the last X column, skip + { + continue; + } + // + int64_t neighborIndex = zStride + yStride + xIdx + neighborOffset[neighborOffsetIndex]; + + if(featureIds[neighborIndex] != currentFeatureId) + { + if(neighborOffsetIndex == 0 || neighborOffsetIndex == 5) // XY face shared { - good = false; + onSurface = onSurface + spacing[0] * spacing[1]; } - if(l == 3 && k == (xPoints - 1)) + if(neighborOffsetIndex == 1 || neighborOffsetIndex == 4) // YZ face shared { - good = false; + onSurface = onSurface + spacing[1] * spacing[2]; } - if(good && featureIds[neighbor] != feature) + if(neighborOffsetIndex == 2 || neighborOffsetIndex == 3) // XZ face shared { - if(l == 0 || l == 5) // XY face shared - { - onsurf = onsurf + spacing[0] * spacing[1]; - } - if(l == 1 || l == 4) // YZ face shared - { - onsurf = onsurf + spacing[1] * spacing[2]; - } - if(l == 2 || l == 3) // XZ face shared - { - onsurf = onsurf + spacing[2] * spacing[0]; - } + onSurface = onSurface + spacing[2] * spacing[0]; } } } - int32 featureId = featureIds[zStride + yStride + k]; - featureSurfaceArea[featureId] = featureSurfaceArea[featureId] + onsurf; + int32 featureId = featureIds[zStride + yStride + xIdx]; + featureSurfaceArea[featureId] = featureSurfaceArea[featureId] + onSurface; } } } diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ComputeBiasedFeaturesFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ComputeBiasedFeaturesFilter.cpp index 5e3adb2438..c8c45d292f 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ComputeBiasedFeaturesFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ComputeBiasedFeaturesFilter.cpp @@ -61,7 +61,7 @@ Parameters ComputeBiasedFeaturesFilter::parameters() const params.insert(std::make_unique(k_CentroidsArrayPath_Key, "Centroids", "X, Y, Z coordinates of Feature center of mass", DataPath{}, ArraySelectionParameter::AllowedTypes{DataType::float32}, ArraySelectionParameter::AllowedComponentShapes{{3}})); params.insert(std::make_unique(k_SurfaceFeaturesArrayPath_Key, "Surface Features", "Flag of 1 if Feature touches an outer surface or of 0 if it does not", DataPath{}, - ArraySelectionParameter::AllowedTypes{DataType::boolean}, ArraySelectionParameter::AllowedComponentShapes{{1}})); + ArraySelectionParameter::AllowedTypes{DataType::boolean, DataType::uint8}, ArraySelectionParameter::AllowedComponentShapes{{1}})); params.insert(std::make_unique(k_PhasesArrayPath_Key, "Phases", "Specifies to which Ensemble each Feature belongs. Only required if Apply Phase by Phase is checked", DataPath{}, ArraySelectionParameter::AllowedTypes{DataType::int32}, ArraySelectionParameter::AllowedComponentShapes{{1}})); params.insertSeparator(Parameters::Separator{"Output Feature Data"}); @@ -102,10 +102,11 @@ IFilter::PreflightResult ComputeBiasedFeaturesFilter::preflightImpl(const DataSt if(!tupleValidityCheck) { return {MakeErrorResult(-7460, fmt::format("The following DataArrays all must have equal number of tuples but this was not satisfied.\n{}", tupleValidityCheck.error()))}; - }; + } - auto action = std::make_unique(DataType::boolean, dataStructure.getDataRefAs(pSurfaceFeaturesArrayPathValue).getTupleShape(), std::vector{1}, - pCentroidsArrayPathValue.replaceName(pBiasedFeaturesArrayNameValue)); + const auto& surfaceFeaturesMaskArray = dataStructure.getDataRefAs(pSurfaceFeaturesArrayPathValue); + auto action = + std::make_unique(DataType::boolean, surfaceFeaturesMaskArray.getTupleShape(), std::vector{1}, pCentroidsArrayPathValue.replaceName(pBiasedFeaturesArrayNameValue)); resultOutputActions.value().appendAction(std::move(action)); return {std::move(resultOutputActions), std::move(preflightUpdatedValues)}; diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ComputeSurfaceFeaturesFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ComputeSurfaceFeaturesFilter.cpp index 54fe5eedde..4ce694378a 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ComputeSurfaceFeaturesFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ComputeSurfaceFeaturesFilter.cpp @@ -109,7 +109,7 @@ void findSurfaceFeatures3D(DataStructure& dataStructure, const DataPath& feature { const auto& featureGeometry = dataStructure.getDataRefAs(featureGeometryPathValue); const auto& featureIds = dataStructure.getDataRefAs(featureIdsArrayPathValue); - auto& surfaceFeatures = dataStructure.getDataRefAs(surfaceFeaturesArrayPathValue); + auto& surfaceFeatures = dataStructure.getDataRefAs(surfaceFeaturesArrayPathValue); const usize xPoints = featureGeometry.getNumXCells(); const usize yPoints = featureGeometry.getNumYCells(); @@ -133,7 +133,7 @@ void findSurfaceFeatures3D(DataStructure& dataStructure, const DataPath& feature { if(IsPointASurfaceFeature(Point3D{x, y, z}, xPoints, yPoints, zPoints, markFeature0Neighbors, featureIds)) { - surfaceFeatures[gNum] = true; + surfaceFeatures[gNum] = 1; } } } @@ -146,7 +146,7 @@ void findSurfaceFeatures2D(DataStructure& dataStructure, const DataPath& feature { const auto& featureGeometry = dataStructure.getDataRefAs(featureGeometryPathValue); const auto& featureIds = dataStructure.getDataRefAs(featureIdsArrayPathValue); - auto& surfaceFeatures = dataStructure.getDataRefAs(surfaceFeaturesArrayPathValue); + auto& surfaceFeatures = dataStructure.getDataRefAs(surfaceFeaturesArrayPathValue); usize xPoints = 0; usize yPoints = 0; @@ -183,7 +183,7 @@ void findSurfaceFeatures2D(DataStructure& dataStructure, const DataPath& feature { if(IsPointASurfaceFeature(Point2D{x, y}, xPoints, yPoints, markFeature0Neighbors, featureIds)) { - surfaceFeatures[gNum] = true; + surfaceFeatures[gNum] = 1; } } } @@ -280,7 +280,7 @@ IFilter::PreflightResult ComputeSurfaceFeaturesFilter::preflightImpl(const DataS } auto createSurfaceFeaturesAction = - std::make_unique(DataType::boolean, tupleDims, std::vector{1}, pCellFeaturesAttributeMatrixPathValue.createChildPath(pSurfaceFeaturesArrayNameValue)); + std::make_unique(DataType::uint8, tupleDims, std::vector{1}, pCellFeaturesAttributeMatrixPathValue.createChildPath(pSurfaceFeaturesArrayNameValue)); resultOutputActions.value().appendAction(std::move(createSurfaceFeaturesAction)); return {std::move(resultOutputActions), std::move(preflightUpdatedValues)}; @@ -298,19 +298,19 @@ Result<> ComputeSurfaceFeaturesFilter::executeImpl(DataStructure& dataStructure, // Resize the surface features array to the proper size const Int32Array& featureIds = dataStructure.getDataRefAs(pFeatureIdsArrayPathValue); - auto& surfaceFeatures = dataStructure.getDataRefAs(pSurfaceFeaturesArrayPathValue); + auto& surfaceFeatures = dataStructure.getDataRefAs(pSurfaceFeaturesArrayPathValue); auto& surfaceFeaturesStore = surfaceFeatures.getDataStoreRef(); const usize featureIdsMaxIdx = std::distance(featureIds.begin(), std::max_element(featureIds.cbegin(), featureIds.cend())); const usize maxFeature = featureIds[featureIdsMaxIdx]; const std::vector surfaceFeaturesTupleShape = {maxFeature + 1}; - Result<> resizeResults = ResizeDataArray(dataStructure, pSurfaceFeaturesArrayPathValue, surfaceFeaturesTupleShape); + Result<> resizeResults = ResizeDataArray(dataStructure, pSurfaceFeaturesArrayPathValue, surfaceFeaturesTupleShape); if(resizeResults.invalid()) { return resizeResults; } - surfaceFeaturesStore.fill(false); + surfaceFeaturesStore.fill(0); // Find surface features const auto& featureGeometry = dataStructure.getDataRefAs(pFeatureGeometryPathValue); diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ErodeDilateBadDataFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ErodeDilateBadDataFilter.cpp index 18544b743a..0688e905a2 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ErodeDilateBadDataFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/ErodeDilateBadDataFilter.cpp @@ -102,6 +102,11 @@ IFilter::PreflightResult ErodeDilateBadDataFilter::preflightImpl(const DataStruc std::vector preflightUpdatedValues; + std::string featureModificationWarning = "By modifying the cell level data, any feature data that was previously computed will most likely be invalid at this point. Filters that compute feature " + "level data should be rerun to ensure accurate final results from your pipeline."; + preflightUpdatedValues.emplace_back(PreflightValue{"Feature Data Modification Warning", featureModificationWarning}); + resultOutputActions.warnings().push_back(Warning{-14600, featureModificationWarning}); + if(pOperationValue != ::k_DilateIndex && pOperationValue != ::k_ErodeIndex) { MakeErrorResult(-16700, fmt::format("Operation Selection must be 0 (Dilate) or 1 (Erode). {} was passed into the filter. ", pOperationValue)); diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FillBadDataFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FillBadDataFilter.cpp index 601202e822..0f750d41b2 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FillBadDataFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/FillBadDataFilter.cpp @@ -102,11 +102,10 @@ IFilter::PreflightResult FillBadDataFilter::preflightImpl(const DataStructure& d std::vector preflightUpdatedValues; - // const auto* cellDataGroup = dataStructure.getDataAs(cellDataGroupPath); - // if(cellDataGroup == nullptr) - // { - // return {MakeErrorResult(-11501, fmt::format("Could not find cell data Attribute Matrix at path '{}'", cellDataGroupPath.toString()))}; - // } + std::string featureModificationWarning = "By modifying the cell level data, any feature data that was previously computed will most likely be invalid at this point. Filters that compute feature " + "level data should be rerun to ensure accurate final results from your pipeline."; + preflightUpdatedValues.emplace_back(PreflightValue{"Feature Data Modification Warning", featureModificationWarning}); + resultOutputActions.warnings().push_back(Warning{-14600, featureModificationWarning}); auto storeAsNewPhase = filterArgs.value(k_StoreAsNewPhase_Key); // Get the Feature Phases Array and get its TupleShape diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RequireMinNumNeighborsFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RequireMinNumNeighborsFilter.cpp index 17b77c4422..147eb34e81 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RequireMinNumNeighborsFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RequireMinNumNeighborsFilter.cpp @@ -400,6 +400,9 @@ IFilter::PreflightResult RequireMinNumNeighborsFilter::preflightImpl(const DataS nx::core::Result resultOutputActions; std::vector preflightUpdatedValues; + std::string featureModificationWarning = "By modifying the cell level data, any feature data that was previously computed will most likely be invalid at this point. Filters that compute feature " + "level data should be rerun to ensure accurate final results from your pipeline."; + preflightUpdatedValues.emplace_back(PreflightValue{"Feature Data Modification Warning", featureModificationWarning}); std::vector dataArrayPaths; diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RequireMinimumSizeFeaturesFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RequireMinimumSizeFeaturesFilter.cpp index 619c05651c..cae48b7e63 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RequireMinimumSizeFeaturesFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/RequireMinimumSizeFeaturesFilter.cpp @@ -370,6 +370,10 @@ IFilter::PreflightResult RequireMinimumSizeFeaturesFilter::preflightImpl(const D nx::core::Result resultOutputActions; std::vector preflightUpdatedValues; + std::string featureModificationWarning = "By modifying the cell level data, any feature data that was previously computed will most likely be invalid at this point. Filters that compute feature " + "level data should be rerun to ensure accurate final results from your pipeline."; + preflightUpdatedValues.emplace_back(PreflightValue{"Feature Data Modification Warning", featureModificationWarning}); + // This section will warn the user about the removal of NeighborLists auto result = nx::core::NeighborListRemovalPreflightCode(dataStructure, featureIdsPath, numCellsPath, resultOutputActions); if(result.outputActions.invalid()) diff --git a/src/Plugins/SimplnxCore/test/ComputeSurfaceFeaturesTest.cpp b/src/Plugins/SimplnxCore/test/ComputeSurfaceFeaturesTest.cpp index c276f36520..132a80f736 100644 --- a/src/Plugins/SimplnxCore/test/ComputeSurfaceFeaturesTest.cpp +++ b/src/Plugins/SimplnxCore/test/ComputeSurfaceFeaturesTest.cpp @@ -86,10 +86,10 @@ void test_impl(const std::vector& geometryDims, const std::string& featu auto executeResult = filter.execute(dataStructure, args); SIMPLNX_RESULT_REQUIRE_VALID(executeResult.result) - REQUIRE_NOTHROW(dataStructure.getDataRefAs(k_SurfaceFeaturesArrayPath)); + REQUIRE_NOTHROW(dataStructure.getDataRefAs(k_SurfaceFeaturesArrayPath)); REQUIRE_NOTHROW(dataStructure.getDataRefAs(k_SurfaceFeaturesExemplaryPath)); - BoolArray& surfaceFeatures = dataStructure.getDataRefAs(k_SurfaceFeaturesArrayPath); + UInt8Array& surfaceFeatures = dataStructure.getDataRefAs(k_SurfaceFeaturesArrayPath); Int8Array& surfaceFeaturesExemplary = dataStructure.getDataRefAs(k_SurfaceFeaturesExemplaryPath); REQUIRE(surfaceFeatures.getSize() == surfaceFeaturesExemplary.getSize()); REQUIRE(surfaceFeatures.getSize() == 796); @@ -106,7 +106,7 @@ void test_impl(const std::vector& geometryDims, const std::string& featu } } // namespace -TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: Valid filter execution in 3D", "[SimplnxCore][ComputeSurfaceFeaturesFilter]") +TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: 3D", "[SimplnxCore][ComputeSurfaceFeaturesFilter]") { Application::GetOrCreateInstance()->loadPlugins(unit_test::k_BuildDir.view(), true); const nx::core::UnitTest::TestFileSentinel testDataSentinel(nx::core::unit_test::k_CMakeExecutable, nx::core::unit_test::k_TestFilesDir, "6_5_test_data_1.tar.gz", "6_5_test_data_1"); @@ -137,12 +137,12 @@ TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: Valid filter execution in } { - REQUIRE_NOTHROW(dataStructure.getDataRefAs(computedSurfaceFeaturesPath)); + REQUIRE_NOTHROW(dataStructure.getDataRefAs(computedSurfaceFeaturesPath)); DataPath exemplaryDataPath = Constants::k_CellFeatureDataPath.createChildPath(k_SurfaceFeaturesExemplar); - const DataArray& featureArrayExemplary = dataStructure.getDataRefAs>(exemplaryDataPath); + const BoolArray& featureArrayExemplary = dataStructure.getDataRefAs(exemplaryDataPath); - const DataArray& createdFeatureArray = dataStructure.getDataRefAs>(computedSurfaceFeaturesPath); + const UInt8Array& createdFeatureArray = dataStructure.getDataRefAs(computedSurfaceFeaturesPath); REQUIRE(createdFeatureArray.getNumberOfTuples() == featureArrayExemplary.getNumberOfTuples()); for(usize i = 0; i < featureArrayExemplary.getSize(); i++) @@ -152,17 +152,17 @@ TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: Valid filter execution in } } -TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: Valid filter execution in 2D - XY Plane", "[SimplnxCore][ComputeSurfaceFeaturesFilter]") +TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: 2D(XY Plane)", "[SimplnxCore][ComputeSurfaceFeaturesFilter]") { test_impl(std::vector({100, 100, 1}), k_FeatureIds2DFileName, 10000, k_SurfaceFeatures2DExemplaryFileName); } -TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: Valid filter execution in 2D - XZ Plane", "[SimplnxCore][ComputeSurfaceFeaturesFilter]") +TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: 2D(XZ Plane)", "[SimplnxCore][ComputeSurfaceFeaturesFilter]") { test_impl(std::vector({100, 1, 100}), k_FeatureIds2DFileName, 10000, k_SurfaceFeatures2DExemplaryFileName); } -TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: Valid filter execution in 2D - YZ Plane", "[SimplnxCore][ComputeSurfaceFeaturesFilter]") +TEST_CASE("SimplnxCore::ComputeSurfaceFeaturesFilter: 2D(YZ Plane)", "[SimplnxCore][ComputeSurfaceFeaturesFilter]") { test_impl(std::vector({1, 100, 100}), k_FeatureIds2DFileName, 10000, k_SurfaceFeatures2DExemplaryFileName); }