Skip to content

Commit

Permalink
ENH: Add option to save the Counts or MRD values to an array for Pole…
Browse files Browse the repository at this point in the history
… Figures (BlueQuartzSoftware#995)

* ENH: Add ability to save intensity data arrays as image geometries
* ENH: Add option to NormalizeToMRD. Add Metadata DataArray
* Use the RTree.hpp from simplnx/Utilities

---------

Signed-off-by: Michael Jackson <[email protected]>
Co-authored-by: Jared Duffey <[email protected]>
  • Loading branch information
imikejackson and JDuffeyBQ committed Aug 3, 2024
1 parent 94eae8a commit bfb84bd
Show file tree
Hide file tree
Showing 13 changed files with 1,722 additions and 151 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(FETCH_FILE_PATH "${simplnx_BINARY_DIR}/simplnx_fetch_remote_files.cmake")
set_property(GLOBAL PROPERTY FETCH_FILE_PATH "${FETCH_FILE_PATH}")
file(WRITE ${FETCH_FILE_PATH} "# -----------------------------------------------------------------------
# This file is programmatically generated from the CMake file ${CMAKE_CURRENT_LIST_FILE}
# This file has the commands to download each of the test files.
# The WORKING_DIRECTORY is set to the following CMake code:
# ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>
Expand Down
3 changes: 3 additions & 0 deletions src/Plugins/OrientationAnalysis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ set(PLUGIN_EXTRA_SOURCES
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/SIMPLConversion.hpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/TiffWriter.hpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/TiffWriter.cpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/delaunator.cpp"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/delaunator.h"
"${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities/IntersectionUtilities.hpp"
)
target_sources(${PLUGIN_NAME} PRIVATE ${PLUGIN_EXTRA_SOURCES})
source_group(TREE "${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}/utilities" PREFIX ${PLUGIN_NAME} FILES ${PLUGIN_EXTRA_SOURCES})
Expand Down
31 changes: 25 additions & 6 deletions src/Plugins/OrientationAnalysis/docs/WritePoleFigureFilter.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ IO (Output)

## Description

This **Filter** creates a standard crystallographic pole figure image for each **Ensemble** (phase)in a selected **Data Container**. The **Filter** uses Euler angles in radians and requires the crystal structures and material names for each **Ensemble** array and the corresponding **Ensemble** Ids on the **Cells**. The **Filter** also optionally can use a *mask* array to determine which **Cells** are valid for the pole figure computation.
This **Filter** creates a standard crystallographic pole figure image for each **Ensemble** (phase) in a selected **Data Container**. The **Filter** uses Euler angles in radians and requires the crystal structures and material names for each **Ensemble** array and the corresponding **Ensemble** Ids on the **Cells**. The **Filter** also optionally can use a *mask* array to determine which angles are valid for the pole figure computation.

In a practicale sense, this means that the following information is available to the filter:
In a practical sense, this means that the following information is available to the filter:

- Cell Level

Expand All @@ -23,17 +23,36 @@ In a practicale sense, this means that the following information is available to

### Algorithm Choice

1: The pole figure algorithm uses a *modified Lambert square* to perform the interpolations onto the unit circle. This is an alternate type of interpolation that the EBSD OEMs do not perform which may make the output from DREAM.3D look slightly different than output obtained from the OEM programs.
1: The pole figure algorithm uses a *modified Lambert square* to perform the interpolations onto the unit circle. This is an alternate type
of interpolation that the EBSD OEMs do not perform which may make the output from DREAM.3D look slightly different than output
obtained from the OEM programs.

**Only an advanced user with intimate knowledge of the modified Lambert projection should attempt to change the value for the "Lambert Image Size (Pixels)" input parameter.**
**Only an advanced user with intimate knowledge of the modified Lambert projection should attempt to change the value for
the "Lambert Image Size (Pixels)" input parameter.**

2: Discrete Pole figure. The algorithm will simply mark each pixel that had at least 1 count as a black pixel.

### Layout
## Output Options

### Write Image to Disk

The user can select to have the combined set of pole figures written to disk as a tiff image file

### Save Pole Figure as Image Geometry

The combined pole figure image will be saved into the DataStructure as an Image Geometry

### Save Raw Intensity Data

The normalized count data is saved for each pole figure into a Data Array that is stored inside an Image Geometry. This allows
the user to select their own color plots. The Image Geometry will also have a string DataArray that lists the pertinent
data that went into the creation: Number of points, which hemisphere, Phase Name, etc.

### Image Layout

The 3 pole figures can be laid out in a Square, Horizontal row or vertical column. Supporting information (including the color bar legend for color pole figures) will also be printed on the image.

| Lambert Projection | Discrete |
| Colorized Intensity | Discrete |
|--------------------|----------|
| ![Example Pole Figure Using Square Layout](Images/PoleFigure_Example.png) | ![Example Pole Figure Using Square Layout](Images/Pole_Figure_Discrete_Example.png) |

Expand Down
Loading

0 comments on commit bfb84bd

Please sign in to comment.