Skip to content

Commit f51a0c9

Browse files
imikejacksonclaude
andcommitted
DOC: Redesign top-level README with IPF/pole-figure visual showcase
Rework README.md into a polished landing page for the 3.0 release: - Centered title, tagline, CI/license/standard badges - Feature list highlighting IPF color maps, IPF legends, pole figures, the three color keys (TSL/PUCM/Nolze-Hielscher) and MTEX validation - Visual gallery: a Ni-superalloy IPF orientation map paired with its composite pole figure (same scan), the cubic standard triangle in all three color keys, and a hexagonal legend - New "MTEX Compatibility" section citing the 396/396 pole-figure position validation (worst deviation 6.29e-8) and the NH/ipfHSVKey color-key equivalence - Preserved the crystallographic-class and orientation-transformation reference tables, examples, citation; added a vcpkg/dependency note Showcase PNG/JPG assets added under Docs/readme_images/ (generated with the bundled render_ebsd tool). Mark image formats binary in .gitattributes so they are never LF-normalized. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent e3eaae8 commit f51a0c9

8 files changed

Lines changed: 168 additions & 50 deletions

File tree

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
*.bat text eol=crlf
88
*.scpt binary
99
*.h5 binary
10+
*.png binary
11+
*.jpg binary
12+
*.jpeg binary
13+
*.gif binary
14+
*.tif binary
15+
*.tiff binary
1016

1117
# Custom for Visual Studio
1218
*.cs diff=csharp
1.13 MB
Loading
107 KB
Loading
113 KB
Loading
100 KB
Loading
77.2 KB
Loading
471 KB
Loading

README.md

Lines changed: 162 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,112 @@
1-
# EbsdLib #
2-
3-
EBSDLib is a C++ Library that can read EBSD Files from OEMs and perform basic EBSD processing such as orientation conversion and IPF Color generation. Another important aspect of the
4-
library is to be able to convert between the seven orientation representations that
5-
are typically used through out materials science and engineering domains.
6-
7-
The [DREAM.3D](https://dream3d.bluequartz.net) project and [DREAM3D-NX](https://www.dream3d.io) uses this library for all the EBSD processing.
1+
<h1 align="center">EbsdLib</h1>
2+
3+
<p align="center">
4+
<b>A modern C++20 library for reading, processing, and visualizing Electron Backscatter Diffraction (EBSD) data.</b>
5+
</p>
6+
7+
<p align="center">
8+
<a href="https://github.com/BlueQuartzSoftware/EbsdLib/actions/workflows/windows.yml"><img alt="Windows" src="https://github.com/BlueQuartzSoftware/EbsdLib/actions/workflows/windows.yml/badge.svg"></a>
9+
<a href="https://github.com/BlueQuartzSoftware/EbsdLib/actions/workflows/linux.yml"><img alt="Linux" src="https://github.com/BlueQuartzSoftware/EbsdLib/actions/workflows/linux.yml/badge.svg"></a>
10+
<a href="https://github.com/BlueQuartzSoftware/EbsdLib/actions/workflows/macos.yml"><img alt="macOS" src="https://github.com/BlueQuartzSoftware/EbsdLib/actions/workflows/macos.yml/badge.svg"></a>
11+
<br>
12+
<img alt="C++20" src="https://img.shields.io/badge/C%2B%2B-20-blue.svg">
13+
<img alt="Version" src="https://img.shields.io/badge/release-3.0-brightgreen.svg">
14+
<a href="LICENSE"><img alt="License" src="https://img.shields.io/badge/license-BSD--3--Clause-orange.svg"></a>
15+
</p>
16+
17+
---
18+
19+
EbsdLib reads EBSD files from all major OEM instruments and performs the core
20+
crystallographic processing used throughout materials science:
21+
conversion between the seven orientation representations, Laue-class–aware
22+
fundamental-zone reduction, **Inverse Pole Figure (IPF) coloring**,
23+
**IPF color-key legends**, and **pole figure** generation.
24+
25+
It is the crystallographic engine behind the
26+
[DREAM.3D](https://dream3d.bluequartz.net) and
27+
[DREAM3D-NX](https://www.dream3d.io) projects.
28+
29+
## Features
30+
31+
- **Read every major OEM format** — EDAX/AMETEK (`.ang`, HDF5), Oxford Instruments (`.ctf`, `.h5oina`), and Bruker (HDF5).
32+
- **All 32 crystallographic point groups**, dispatched through the 11 Laue classes.
33+
- **Seven orientation representations** with direct, mathematically exact conversions between them.
34+
- **IPF color maps** rendered directly from a scan, with three selectable color keys — **TSL** (EDAX/AMETEK), **PUCM** (Perceptual unique-color mapping), and **Nolze–Hielscher** (MTEX-compatible HSV).
35+
- **Publication-ready IPF legends** for every Laue class, in standard or gridded styles.
36+
- **Composite pole figures** with color-intensity rendering, RD/TD framing, and a quantitative intensity scale.
37+
- **MTEX-validated** pole figure positions — agreement to better than 1×10⁻⁷ across all Laue classes (see below).
38+
- **Lean dependencies** — the core requires only Eigen; HDF5 and Qt are optional, enabled when you need the file readers or GUI integration.
39+
- A suite of **command-line tools** (`render_ebsd`, `make_ipf`, `make_pole_figure`, `generate_ipf_legends`, …) that double as worked examples.
40+
41+
## 🎨 IPF Color Maps & Pole Figures
42+
43+
A single scan, processed end-to-end — the IPF orientation map and its pole
44+
figures, both produced by EbsdLib from the same Ni-superalloy `.ctf` file
45+
(a cube-textured cubic *m**m* microstructure):
46+
47+
<table>
48+
<tr>
49+
<td align="center" width="46%">
50+
<img src="Docs/readme_images/ipf_map_ni_superalloy.jpg" width="100%"><br>
51+
<sub><b>IPF orientation map</b> · reference direction Z, TSL color key</sub>
52+
</td>
53+
<td align="center" width="54%">
54+
<img src="Docs/readme_images/example_pole_figure/Phase_1.png" width="100%"><br>
55+
<sub><b>Composite pole figure</b> · (001), (011), (111) with intensity scale</sub>
56+
</td>
57+
</tr>
58+
</table>
59+
60+
## IPF Color Keys
61+
62+
Every Laue class ships with a labeled standard-stereographic-triangle legend.
63+
EbsdLib provides three independent color keys so output can match whichever
64+
convention your downstream tools expect:
65+
66+
<table>
67+
<tr>
68+
<td align="center"><img src="Docs/readme_images/ipf_legend_cubic_tsl.png" width="240"></td>
69+
<td align="center"><img src="Docs/readme_images/ipf_legend_cubic_nh.png" width="240"></td>
70+
<td align="center"><img src="Docs/readme_images/ipf_legend_cubic_pucm.png" width="240"></td>
71+
</tr>
72+
<tr>
73+
<td align="center"><sub><b>TSL</b> — EDAX/AMETEK OIM</sub></td>
74+
<td align="center"><sub><b>Nolze–Hielscher</b> — MTEX-compatible HSV</sub></td>
75+
<td align="center"><sub><b>PUCM</b> — Perceptual unique-color mapping</sub></td>
76+
</tr>
77+
</table>
78+
79+
Legends are available for all 11 Laue classes — hexagonal, for example:
80+
81+
<p align="center">
82+
<img src="Docs/readme_images/ipf_legend_hexagonal.png" width="360">
83+
</p>
84+
85+
> Pre-made IPF legends for every Laue class are also checked in under [`Data/IPF_Legend`](Data/IPF_Legend).
86+
87+
## MTEX Compatibility
88+
89+
EbsdLib's pole figure mathematics are validated directly against
90+
[MTEX](https://mtex-toolbox.github.io/)
91+
92+
- **Pole figure positions** are checked against MTEX 6.1.0 goldens across every
93+
Laue class × canonical orientation × plane family × Cartesian convention.
94+
All **396 / 396** test buckets agree, with a worst-case point deviation of
95+
**6.29 × 10⁻⁸** over 1,752 emitted poles.
96+
- The **Nolze–Hielscher** color key reproduces MTEX's default `ipfHSVKey`
97+
coloring, so IPF maps can be compared 1:1 with an MTEX workflow.
98+
- Both the **X‖a** and **X‖a\*** hexagonal/trigonal Cartesian conventions are
99+
supported and selectable — see [`Docs/Index.md`](Docs/Index.md) for the
100+
convention notes and the
101+
[`x_parallel_a_star_convention.svg`](Docs/x_parallel_a_star_convention.svg) diagram.
8102

9103
## Supported EBSD OEM Data Files
10104

11-
+ EDAX/AMETEK: .ang and HDF5 based file formats
12-
+ Oxford Instruments: .ctf and .h5oina file formats
13-
+ Bruker: HDF5 based file format
105+
| Vendor | Formats |
106+
|--------|---------|
107+
| EDAX / AMETEK | `.ang`, HDF5-based |
108+
| Oxford Instruments | `.ctf`, `.h5oina` |
109+
| Bruker | HDF5-based |
14110

15111
Please have a look at the unit tests for examples on using the various readers.
16112

@@ -51,6 +147,11 @@ Please have a look at the unit tests for examples on using the various readers.
51147
| 31 | (\bar{4}3m) | 23 | 215–220 | T(_d) | Cubic | m(\bar{3})m | |
52148
| 32 | m(\bar{3})m | 432 | 221–230 | O(_h) | Cubic | m(\bar{3})m | CubicOps |
53149

150+
Each Laue class is exposed as a `LaueOps` subclass that performs class-specific
151+
calculations, including the generation of IPF colors. Note that each vendor uses
152+
a slightly different coloring algorithm; the default TSL key aligns with
153+
AMETEK/EDAX output, and the PUCM and Nolze–Hielscher keys are available as
154+
alternatives.
54155

55156
## Orientation Transformations
56157

@@ -65,62 +166,73 @@ Please have a look at the unit tests for examples on using the various readers.
65166
| Cubochoric | hao | ha | h | ha | ha | X | -- | q |
66167
| Stereographic | a | a | X | X | a | X | hc | -- |
67168

68-
**LEGEND**: X = Direct mathematical conversion between the representations
69-
lower case letters denote the conversion uses other more basic conversions. For
70-
example to go from Euler->Homochoric the conversion process calls the Euler->AxisAngle->OrientationMatrix->Homochoric functions.
169+
**LEGEND**: `X` = a direct mathematical conversion between the two representations.
170+
Lower-case letters denote a conversion that is composed from more basic conversions.
171+
For example, Euler → Homochoric internally calls
172+
Euler → AxisAngle → OrientationMatrix → Homochoric.
71173

72-
In addition to the Orientation class there are also classes that represent
73-
the 11 Laue classes that allow a user to perform Laue class specific calculations
74-
including the generation of an IPF Color which is a prevalent visualization scheme within
75-
the EBSD community. Note that each vendor has slightly different algorithms and this
76-
library has selected to align with the AMETEK/EDAX output.
174+
## Conventions
77175

78-
The folder Data/IPF_Legend has premade IPF Legends for all the Laue classes.
176+
- **Quaternions** are organized Vector–Scalar `(X, Y, Z, W)` by default. If your
177+
quaternions are laid out Scalar–Vector `(W, X, Y, Z)`, reorder them before use.
178+
- **Rotations** are **passive** by convention.
79179

80-
## Quaternion Convention
180+
## Dependencies
81181

82-
Please also note that by default EbsdLib organizes Quaternions as Vector-Scalar (X,Y,Z,W). If your quaternions
83-
are laid out as Scalar-Vector (w,x,y,z) you will need to reorder your data before
84-
using this library.
182+
**Required**
85183

86-
## Dependent Libraries
184+
- [Eigen](https://eigen.tuxfamily.org) 3.4
87185

88-
EbsdLib is dependent on:
186+
**Optional**
89187

90-
+ Eigen 3.4
188+
- HDF5 1.10.4 (only required for the HDF5-based file readers/writers)
91189

190+
EbsdLib uses [vcpkg](https://vcpkg.io) for dependency management and a
191+
CMake-based build system.
92192

93-
## Optional Libraries
193+
## Examples
94194

95-
+ HDF5 1.10.4 (HDF5 is optional only if you want the HDF5 functionality)
96-
+ Qt5 5.15.x (minimum: Optional)
195+
Transform an Euler angle into any of the other six representations:
97196

98-
## Rotation Convention
197+
```cpp
198+
// Note: angles are in radians
199+
ebsdlib::EulerDType euler(0.707, 1.23, 0.45);
99200

100-
By convention this library uses **Passive** rotations
201+
OrientationMatrix om = euler.toOrientationMatrix();
202+
AxisAngle ax = euler.toAxisAngle();
203+
Rodrigues rod = euler.toRodrigues();
204+
Quaternion quat = euler.toQuaternion();
205+
Homochoric ho = euler.toHomochoric();
206+
Cubochoric cu = euler.toCubochoric();
207+
Stereographic stereo = euler.toStereographic();
101208

102-
## Citations
209+
// Any representation streams to std::ostream
210+
std::cout << euler << std::endl;
211+
```
103212
104-
D Rowenhorst, A D Rollett, G S Rohrer, M Groeber, M Jackson, P J Konijnenberg and M De Graef _et al_ 2015 _Modelling Simul. Mater. Sci. Eng._ **23** 083501
213+
Render a full IPF map, pole figure, and legend from a scan with the bundled CLI:
105214
106-
[DOI: https://doi.org/10.1088/0965-0393/23/8/083501](https://doi.org/10.1088/0965-0393/23/8/083501)
215+
```bash
216+
render_ebsd my_scan.ang ./output --color-key tsl --ref-dir 0,0,1
217+
```
107218

108-
## Examples
219+
The images at the top of this README were produced with exactly this tool.
109220

110-
If you want to transform an Euler angle into any other representation the following works:
221+
## Citation
111222

112-
```
113-
// Note use of Radians for angles
114-
ebsdlib::EulerDType euler(0.707, 1.23, 0.45);
115-
OrientationMatrix om = euler.toOrientationMatrix();
116-
AxisAngle ax = euler.toAxisAngle();
117-
Rodrigues rod = euler.toRodrigues();
118-
Quaternion quat = euler.toQuaternion();
119-
Homochoric ho = euler.toHomochoric();
120-
Cubochoric cu = euler.toCubochoric();
121-
Stereographic stereo = euler.toStereographic();
122-
123-
// To print out any representation, just use the C++ std::out or std::ostream
124-
std::cout << euler << std::endl;
223+
> D. Rowenhorst, A. D. Rollett, G. S. Rohrer, M. Groeber, M. Jackson,
224+
> P. J. Konijnenberg and M. De Graef *et al* 2015
225+
> *Modelling Simul. Mater. Sci. Eng.* **23** 083501
226+
>
227+
> DOI: [10.1088/0965-0393/23/8/083501](https://doi.org/10.1088/0965-0393/23/8/083501)
125228
126-
```
229+
## License
230+
231+
EbsdLib is distributed under the BSD 3-Clause License. See [LICENSE](LICENSE) for details.
232+
233+
## Other Open-Source Projects
234+
235+
EbsdLib incorporates a few other open-source projects directly into its own source code:
236+
237+
- [https://github.com/a-e-k/canvas_ity](https://github.com/a-e-k/canvas_ity)
238+
- [https://github.com/wlenthe/crystallography](https://github.com/wlenthe/crystallography)

0 commit comments

Comments
 (0)