Skip to content

Commit

Permalink
BUG: Pipeline and Filter human facing label cleanup (#934)
Browse files Browse the repository at this point in the history
- Fixed all broken pipelines
- Fixed pipeline installation issues
- Fixed python files to work properly
- Fixed spacing issues in human facing strings
- Changed Separator Parameters to use a more consistent terminology
- Changed some parameter human labels to use consistent terminology
- Renamed FindNeighbors to FindFeatureNeighbors

Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
  • Loading branch information
imikejackson committed May 6, 2024
1 parent e5d3be3 commit db204c3
Show file tree
Hide file tree
Showing 332 changed files with 1,742 additions and 1,640 deletions.
32 changes: 4 additions & 28 deletions CMakeLists.txt
Expand Up @@ -892,42 +892,18 @@ set(PIPELINE_DEST_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CX_CONFIG_DIR}/pipeli
set(PIPELINE_EXAMPLES_DEST_DIR "${PIPELINE_DEST_DIR}/Examples")

if(SIMPLNX_DOWNLOAD_TEST_FILES AND TARGET SimplnxCore AND TARGET ITKImageProcessing AND TARGET OrientationAnalysis)
add_custom_target(Copy_PorosityAnalysis_Pipelines ALL
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${simplnx_SOURCE_DIR}/pipelines/PorosityAnalysis.d3dpipeline" "${PIPELINE_EXAMPLES_DEST_DIR}/Examples/PorosityAnalysis.d3dpipeline"
COMMENT "Copying Example Pipelines into Binary Directory"
COMMAND_EXPAND_LISTS
VERBATIM
)
set_target_properties(Copy_PorosityAnalysis_Pipelines PROPERTIES FOLDER ZZ_COPY_FILES)

add_custom_target(Copy_CAxis_Pipelines ALL
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${simplnx_SOURCE_DIR}/pipelines/Combo-EBSD-osc_r0c0.d3dpipeline" "${PIPELINE_EXAMPLES_DEST_DIR}/Examples/Combo-EBSD-osc_r0c0.d3dpipeline"
COMMENT "Copying Example Pipelines into Binary Directory"
COMMAND_EXPAND_LISTS
VERBATIM
set(PREBUILT_PIPELINE_NAMES
)
set_target_properties(Copy_CAxis_Pipelines PROPERTIES FOLDER ZZ_COPY_FILES)

# Install the pipeline files
install(FILES
"${simplnx_SOURCE_DIR}/pipelines/PorosityAnalysis.d3dpipeline"
"${simplnx_SOURCE_DIR}/pipelines/Combo-EBSD-osc_r0c0.d3dpipeline"
${PREBUILT_PIPELINE_NAMES}
DESTINATION "pipelines/Examples"
COMPONENT Applications
)

download_test_data(DREAM3D_DATA_DIR ${DREAM3D_DATA_DIR} ARCHIVE_NAME 6_6_caxis_data.tar.gz SHA512 6c3eefac62aecf3344de735c0df932dd9a2623653f39174ec72402c54e8911402ad9903ae2122bc23ff2dba8c94973b2882715908e1913973dff604b614a5293)
add_custom_target(Copy_CAxis_Data ALL
COMMAND ${CMAKE_COMMAND} -E tar xzf "${DREAM3D_DATA_DIR}/TestFiles/6_6_caxis_data.tar.gz"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${DREAM3D_DATA_DIR}/TestFiles/6_6_caxis_data/Combo-EBSD-120130.osc_r0c0.ang" "${DATA_DEST_DIR}/OrientationAnalysis/Combo-EBSD-120130.osc_r0c0.ang"
COMMAND ${CMAKE_COMMAND} -E rm -rf "${DREAM3D_DATA_DIR}/TestFiles/6_6_caxis_data"
WORKING_DIRECTORY "${DREAM3D_DATA_DIR}/TestFiles"
COMMENT "[DATA EXTRACT/COPY] 6_6_caxis_data into Binary Directory"
DEPENDS Fetch_Remote_Data_Files # Make sure all remote files are downloaded before trying this
COMMAND_EXPAND_LISTS
VERBATIM
)
set_target_properties(Copy_CAxis_Data PROPERTIES FOLDER ZZ_COPY_FILES)
create_pipeline_tests(PLUGIN_NAME OrientationAnalysis PIPELINE_LIST ${PREBUILT_PIPELINE_NAMES})

endif()

if(SIMPLNX_ENABLE_INSTALL)
Expand Down
6 changes: 3 additions & 3 deletions docs/Porting_Filters.md
Expand Up @@ -243,15 +243,15 @@ Use proper grouping in the parameters to help the User Interface.
There are potentially 3 sections of parameters:
```cpp
params.insertSeparator(Parameters::Separator{"Input Parameters"});
params.insertSeparator(Parameters::Separator{"Input Parameter(s)"});
```

```cpp
params.insertSeparator(Parameters::Separator{"Required Input Data Objects"});
params.insertSeparator(Parameters::Separator{"Input Data Objects"});
```
```cpp
params.insertSeparator(Parameters::Separator{"Created Output Data Objects"});
params.insertSeparator(Parameters::Separator{"Output Output Data Objects"});
```

these should be used as needed by the filter.
Expand Down
Expand Up @@ -8,7 +8,7 @@
"cell_attribute_matrix_name": "Cell Data",
"image_data_array_name": "ImageData",
"output_image_geometry_path": "ImageDataContainer",
"image_transform_choice": 0,
"image_transform_index": 0,
"input_file_list_object": {
"end_index": 174,
"file_extension": ".tif",
Expand Down Expand Up @@ -119,7 +119,7 @@
"component_count": 1,
"data_format": "",
"initialization_value_str": "1",
"numeric_type": 4,
"numeric_type_index": 4,
"output_array_path": "ImageDataContainer/Cell Data/Phases",
"tuple_dimensions": [
[
Expand Down
Expand Up @@ -8,7 +8,7 @@
"cell_attribute_matrix_name": "Cell Data",
"image_data_array_name": "ImageData",
"output_image_geometry_path": "ImageDataContainer",
"image_transform_choice": 0,
"image_transform_index": 0,
"input_file_list_object": {
"end_index": 174,
"file_extension": ".tif",
Expand Down
@@ -1,14 +1,18 @@
{
"isDisabled": false,
"name": "(02) Image Segmentation.d3dpipeline",
"pinnedParams": [],
"name": "(04) Porosity Analysis",
"pipeline": [
{
"args": {
"cell_attribute_matrix_name": "Optical Data",
"color_weights": [
0.21250000596046448,
0.715399980545044,
0.07209999859333038
],
"convert_to_gray_scale": false,
"image_data_array_name": "ImageData",
"output_image_geometry_path": "RoboMet.3D Image Stack",
"image_transform_choice": 0,
"image_transform_index": 0,
"input_file_list_object": {
"end_index": 174,
"file_extension": ".tif",
Expand All @@ -25,15 +29,16 @@
0.0,
0.0
],
"output_image_geometry_path": "RoboMet.3D Image Stack",
"spacing": [
1.0,
1.0,
1.0
]
},
"comments": "This example pipeline shows how to read in a 3D stack of images, segment them and perform some basic size statistics on the segmented features. Since this data set is from an image there is no phase data which is created in a filter and phase data is also generated during the pipeline. Note the technique for accomplishing this as it is handy to do for other pipelines.",
"comments": "",
"filter": {
"name": "simplnx::ITKImportImageStack",
"name": "nx::core::ITKImportImageStackFilter",
"uuid": "dcf980b7-ecca-46d1-af31-ac65f6e3b6bb"
},
"isDisabled": false
Expand All @@ -55,11 +60,16 @@
"type": "collection",
"union": 0
},
"output_data_array_name": "Mask"
"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": "simplnx::MultiThresholdObjects",
"name": "nx::core::MultiThresholdObjectsFilter",
"uuid": "4246245e-1011-4add-8436-0af6bed19228"
},
"isDisabled": false
Expand All @@ -68,17 +78,17 @@
"args": {
"active_array_name": "Active",
"cell_feature_group_name": "Pore Data",
"feature_ids_path": "FeatureIds",
"input_image_geometry_path": "RoboMet.3D Image Stack",
"feature_ids_name": "FeatureIds",
"input_array_path": "RoboMet.3D Image Stack/Optical Data/ImageData",
"input_image_geometry_path": "RoboMet.3D Image Stack",
"mask_path": "RoboMet.3D Image Stack/Optical Data/Mask",
"randomize_features": true,
"scalar_tolerance": 0,
"use_mask": true
},
"comments": "",
"filter": {
"name": "simplnx::ScalarSegmentFeaturesFilter",
"name": "nx::core::ScalarSegmentFeaturesFilter",
"uuid": "e067cd97-9bbf-4c92-89a6-3cb4fdb76c93"
},
"isDisabled": false
Expand All @@ -95,7 +105,7 @@
},
"comments": "",
"filter": {
"name": "simplnx::CalculateFeatureSizesFilter",
"name": "nx::core::CalculateFeatureSizesFilter",
"uuid": "c666ee17-ca58-4969-80d0-819986c72485"
},
"isDisabled": false
Expand All @@ -104,23 +114,25 @@
"args": {
"created_array_suffix": "",
"feature_ids_path": "RoboMet.3D Image Stack/Optical Data/FeatureIds",
"selected_feature_array_paths": ["RoboMet.3D Image Stack/Pore Data/EquivalentDiameters"]
"selected_feature_array_paths": [
"RoboMet.3D Image Stack/Pore Data/EquivalentDiameters"
]
},
"comments": "",
"filter": {
"name": "simplnx::CopyFeatureArrayToElementArrayFilter",
"name": "nx::core::CopyFeatureArrayToElementArrayFilter",
"uuid": "4c8c976a-993d-438b-bd8e-99f71114b9a1"
},
"isDisabled": false
},
{
"args": {
"set_tuple_dimensions": false,
"component_count": 1,
"data_format": "",
"initialization_value_str": "1",
"numeric_type": 4,
"numeric_type_index": 4,
"output_array_path": "RoboMet.3D Image Stack/Optical Data/Phases",
"set_tuple_dimensions": false,
"tuple_dimensions": [
[
0.0
Expand All @@ -129,22 +141,23 @@
},
"comments": "",
"filter": {
"name": "simplnx::CreateDataArrayFilter",
"name": "nx::core::CreateDataArrayFilter",
"uuid": "67041f9b-bdc6-4122-acc6-c9fe9280e90d"
},
"isDisabled": false
},
{
"args": {
"conditional_array_path": "RoboMet.3D Image Stack/Optical Data/Mask",
"invert_mask": false,
"remove_value": "0",
"replace_value": "2",
"selected_array_path": "RoboMet.3D Image Stack/Optical Data/Phases",
"use_conditional": true
},
"comments": "",
"filter": {
"name": "simplnx::ConditionalSetValueFilter",
"name": "nx::core::ConditionalSetValueFilter",
"uuid": "bad9b7bd-1dc9-4f21-a889-6520e7a41881"
},
"isDisabled": false
Expand All @@ -158,7 +171,7 @@
},
"comments": "",
"filter": {
"name": "simplnx::FindFeaturePhasesFilter",
"name": "nx::core::FindFeaturePhasesFilter",
"uuid": "da5bb20e-4a8e-49d9-9434-fbab7bc434fc"
},
"isDisabled": false
Expand All @@ -172,71 +185,48 @@
},
"comments": "",
"filter": {
"name": "simplnx::FindFeatureCentroidsFilter",
"name": "nx::core::FindFeatureCentroidsFilter",
"uuid": "c6875ac7-8bdd-4f69-b6ce-82ac09bd3421"
},
"isDisabled": false
},
{
"args": {
"cell_ensemble_attribute_matrix_name": "RoboMet.3D Image Stack/EnsembleAttributeMatrix",
"crystal_structures_array_name": "CrystalStructures",
"ensemble": [
[
"Cubic-High m-3m",
"Matrix",
"Matrix"
],
"data_object_path": "RoboMet.3D Image Stack/Ensemble Data",
"tuple_dimensions": [
[
"Cubic-High m-3m",
"Precipitate",
"Pores"
3.0
]
],
"phase_names_array_name": "PhaseNames",
"phase_types_array_name": "PhaseTypes"
},
"comments": "We only need the phase names array for this ensemble data so we will be immediately deleting the crystal structures and phase types arrays after this filter.",
"filter": {
"name": "simplnx::CreateEnsembleInfoFilter",
"uuid": "8ce3d70c-49fe-4812-a1eb-7ce4c962a59d"
},
"isDisabled": false
},
{
"args": {
"removed_data_path": [
"RoboMet.3D Image Stack/EnsembleAttributeMatrix/CrystalStructures",
"RoboMet.3D Image Stack/EnsembleAttributeMatrix/PhaseTypes"
]
},
"comments": "",
"filter": {
"name": "simplnx::DeleteDataFilter",
"uuid": "bf286740-e987-49fe-a7c8-6e566e3a0606"
"name": "nx::core::CreateAttributeMatrixFilter",
"uuid": "a6a28355-ee69-4874-bcac-76ed427423ed"
},
"isDisabled": false
},
{
"args": {
"biased_features_array_path": "",
"cell_ensemble_attribute_matrix_name": "RoboMet.3D Image Stack/EnsembleAttributeMatrix",
"cell_ensemble_attribute_matrix_path": "RoboMet.3D Image Stack/Ensemble Data",
"centroids_array_path": "RoboMet.3D Image Stack/Pore Data/Centroids",
"clustering_list_array_name": "ClusteringList",
"equivalent_diameters_array_path": "RoboMet.3D Image Stack/Pore Data/EquivalentDiameters",
"feature_phases_array_path": "RoboMet.3D Image Stack/Pore Data/Phases",
"input_image_geometry_path": "RoboMet.3D Image Stack",
"max_min_array_name": "RDFMaxMinDistances",
"number_of_bins": 10,
"phase_number": 2,
"rdf_array_name": "RDF",
"remove_biased_features": false,
"seed_array_name": "FindFeatureClustering SeedValue",
"seed_value": 5489,
"input_image_geometry_path": "RoboMet.3D Image Stack",
"set_random_seed": false
},
"comments": "",
"filter": {
"name": "simplnx::FindFeatureClusteringFilter",
"name": "nx::core::FindFeatureClusteringFilter",
"uuid": "d6e01678-3a03-433f-89ad-4e9adf1f9a45"
},
"isDisabled": false
Expand All @@ -248,11 +238,11 @@
},
"comments": "",
"filter": {
"name": "simplnx::WriteDREAM3DFilter",
"name": "nx::core::WriteDREAM3DFilter",
"uuid": "b3a95784-2ced-41ec-8d3d-0242ac130003"
},
"isDisabled": false
}
],
"workflowParams": []
}
"version": 1
}
Expand Up @@ -67,14 +67,14 @@ Parameters ITKAbsImageFilter::parameters() const
{
Parameters params;

params.insertSeparator(Parameters::Separator{"Required Input Cell Data"});
params.insertSeparator(Parameters::Separator{"Input Cell Data"});
params.insert(std::make_unique<GeometrySelectionParameter>(k_InputImageGeomPath_Key, "Image Geometry", "Select the Image Geometry Group from the DataStructure.", DataPath({"Image Geometry"}),
GeometrySelectionParameter::AllowedTypes{IGeometry::Type::Image}));
params.insert(std::make_unique<ArraySelectionParameter>(k_InputImageDataPath_Key, "Input Image Data Array", "The image data that will be processed by this filter.", DataPath{},
params.insert(std::make_unique<ArraySelectionParameter>(k_InputImageDataPath_Key, "Input Cell Data", "The image data that will be processed by this filter.", DataPath{},
nx::core::ITK::GetScalarPixelAllowedTypes()));

params.insertSeparator(Parameters::Separator{"Created Cell Data"});
params.insert(std::make_unique<DataObjectNameParameter>(k_OutputImageArrayName_Key, "Output Image Array Name",
params.insertSeparator(Parameters::Separator{"Output Cell Data"});
params.insert(std::make_unique<DataObjectNameParameter>(k_OutputImageArrayName_Key, "Output Cell Data",
"The result of the processing will be stored in this Data Array inside the same group as the input data.", "Output Image Data"));

return params;
Expand Down
Expand Up @@ -67,14 +67,14 @@ Parameters ITKAcosImageFilter::parameters() const
{
Parameters params;

params.insertSeparator(Parameters::Separator{"Required Input Cell Data"});
params.insertSeparator(Parameters::Separator{"Input Cell Data"});
params.insert(std::make_unique<GeometrySelectionParameter>(k_InputImageGeomPath_Key, "Image Geometry", "Select the Image Geometry Group from the DataStructure.", DataPath({"Image Geometry"}),
GeometrySelectionParameter::AllowedTypes{IGeometry::Type::Image}));
params.insert(std::make_unique<ArraySelectionParameter>(k_InputImageDataPath_Key, "Input Image Data Array", "The image data that will be processed by this filter.", DataPath{},
params.insert(std::make_unique<ArraySelectionParameter>(k_InputImageDataPath_Key, "Input Cell Data", "The image data that will be processed by this filter.", DataPath{},
nx::core::ITK::GetScalarPixelAllowedTypes()));

params.insertSeparator(Parameters::Separator{"Created Cell Data"});
params.insert(std::make_unique<DataObjectNameParameter>(k_OutputImageArrayName_Key, "Output Image Array Name",
params.insertSeparator(Parameters::Separator{"Output Cell Data"});
params.insert(std::make_unique<DataObjectNameParameter>(k_OutputImageArrayName_Key, "Output Cell Data",
"The result of the processing will be stored in this Data Array inside the same group as the input data.", "Output Image Data"));

return params;
Expand Down

0 comments on commit db204c3

Please sign in to comment.