DREAM3D-NX Python Docs (v24.12.02)
Installation
Attention
MacOS Machines will need to export an environment variable BEFORE trying to do the conda installer.
export CONDA_OVERRIDE_OSX=11.0
The simplnx library can be installed through an Anaconda packages from the BlueQuartzSoftware channel. This can be achieved by creating a new virtual environment and installing the dream3dnx python package. Please check the latest release notes for the latest changes to the API.
DREAM3D-NX is built on top of a library called simplnx which is why all of the python code is prefixed as such.
conda config --add channels conda-forge
conda config --set channel_priority strict
conda create -n nxpython python=3.12
conda activate nxpython
conda install -c bluequartzsoftware dream3dnx
How to use SIMPLNX from Python
Attention
All users should start with the SIMPLNX Python Introduction
Attention
Users wanting to integrate the functionality included with SIMPLNX/DREAM3D-NX from within Python, you should use the link to SIMPLNX User API Docs
Attention
Users wanting to extend DREAM3D-NX by writing filters in the python language should go to the Writing a Python Filter
- Python Example Usage
- SIMPLNX Python API
- Tutorial 1: Basic Python Integration
- 1.1 Anaconda Virtual Environment Setup
- 1.2 Introduction
- 1.3 Necessary Import Statements
- 1.4 Set Output Directory
- 1.5 Creating the DataStructure Object
- 1.6 First Steps: Create a Group in the DataStructure
- 1.7 Result Objects
- 1.8 Creating a DataArray Object
- 1.9 Modifying the DataArray Object using Numpy
- 1.10 Saving your Data to a .dream3d file
- 1.11 Full Example
- Tutorial 2: Manipulating Pipelines
- Tutorial 3: Writing a Custom DREAM3D-NX Filter
- Writing a Python Filter
- 0. Environment Setup
- 1. Generating the Skeleton Code
- 2. Loading The New Plugin
- 3. Understanding the Plugin Structure
- 4. Understanding the Filter Skeleton Structure
- 1. Defining Parameters
- 6. Writing the Preflight Implementation
- 8. Writing the Execute Implementation
- 9. Providing Feedback to the user during execution.
- 10. Debugging the Python Filter.
- SIMPLNX Filter Writing API