Users Guide Avizo Software 2019
Users Guide Avizo Software 2019
Avizo Software
2019
Copyright Information
Copyright (c) 1995-2019 Konrad-Zuse-Zentrum für Informationstechnik Berlin (ZIB), Germany
The Avizo XEarth Extension and the Avizo XLVolume Extension include user protection under license for
Landmark U.S. Patent Numbers 6,765,570.
This manual has been prepared for Thermo Fisher Scientific licensees solely
for use in connection with software supplied by Thermo Fisher Scientific and
is furnished under a written license agreement. This material may not be used, reproduced
or disclosed, in whole or in part, except as permitted in the license agreement or by prior
written authorization of Thermo Fisher Scientific. Users are cautioned that
Thermo Fisher Scientific reserves the right to make changes without notice to the
specifications and materials contained herein and shall not be responsible for any
damages (including consequential) caused by reliance on the materials presented,
including but not limited to typographical, arithmetic or listing errors.
Contents
1 Introduction 1
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Features overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.1 Data import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.2 Viewing, navigation, interactivity . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.3 Visualization of 3D Image Data . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.4 Image processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.5 Model reconstruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.6 Visualization of 3D models and numerical data . . . . . . . . . . . . . . . . . 6
1.2.7 General Data Processing and Data Analysis . . . . . . . . . . . . . . . . . . 7
1.2.8 MATLAB integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2.9 High Performance Visualization . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2.10 Automation, Customization, Extensibility . . . . . . . . . . . . . . . . . . . 8
1.3 Editions and Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3.1 Editions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3.2 Optional Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3.3 License keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.4.1 Prioritizing hardware for Avizo . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.4.2 How hardware can help optimizing . . . . . . . . . . . . . . . . . . . . . . . 18
1.4.3 Special considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.5 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.5.1 Standard Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.5.2 Silent Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.6 Avizo License Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.6.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.6.2 About Avizo Licensing Management . . . . . . . . . . . . . . . . . . . . . . 25
1.6.3 License Manager Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.6.4 Licensing Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
1.6.5 Contacting the License Administrator . . . . . . . . . . . . . . . . . . . . . . 48
1.7 First steps in Avizo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
1.8 Contact and Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2 Getting Started 53
2.1 Start the program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
2.2 Loading Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2.3 Invoking Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
2.4 Visualizing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
2.5 Interaction with the Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
2.6 Data Import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
CONTENTS ii
3.2.3 Resampling the Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
3.2.4 Displaying an Isosurface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
3.2.5 Cropping the Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
3.2.6 Volume Rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
3.3 Combined 3D and 2D views with Ortho Views (Avizo) . . . . . . . . . . . . . . . . . 87
3.3.1 Quick start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
3.3.2 Manage combined 3D and 2D views with Ortho Views . . . . . . . . . . . . 89
3.4 Intensity Range Partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
3.5 Segmentation of 3D Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
3.5.1 Interactive Image Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . 99
3.5.2 Volume and Statistics Measurement . . . . . . . . . . . . . . . . . . . . . . . 101
3.5.3 Threshold Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
3.5.4 Refining Threshold Segmentation Results . . . . . . . . . . . . . . . . . . . 102
3.5.5 More Hints about Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . 103
3.6 Deconvolution for light microscopy . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
3.6.1 General remarks about image deconvolution . . . . . . . . . . . . . . . . . . 105
3.6.2 Data acquisition and sampling rates . . . . . . . . . . . . . . . . . . . . . . . 106
3.6.3 Standard Deconvolution Tutorial . . . . . . . . . . . . . . . . . . . . . . . . 108
3.6.4 Blind Deconvolution Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . 113
3.6.5 Bead Extraction Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
3.6.6 Performance issues and multi-processing . . . . . . . . . . . . . . . . . . . . 122
CONTENTS iii
4.1.8 Save the ISP recipe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
4.1.9 Export multiple outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
4.1.10 Remove/replace steps and manage errors . . . . . . . . . . . . . . . . . . . . 145
4.1.11 Add external inputs to the workflow . . . . . . . . . . . . . . . . . . . . . . 146
4.1.12 Export workflow parameters for easy access from the Image Stack Processing
module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
4.1.13 Quit the workroom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
4.1.14 Use the ISP recipe from the project room . . . . . . . . . . . . . . . . . . . . 149
4.1.15 Processing a 3D image in IVP room . . . . . . . . . . . . . . . . . . . . . . 150
4.2 Batch process a stack of large images . . . . . . . . . . . . . . . . . . . . . . . . . . 150
CONTENTS iv
6.1.12 Label images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
6.1.13 Processing data on disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
6.1.14 Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
6.1.15 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
6.2 Example 1: Measuring a Catalyst . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
6.2.1 Object Detection and Masks . . . . . . . . . . . . . . . . . . . . . . . . . . 182
6.2.2 More about Region of Interest and Masks . . . . . . . . . . . . . . . . . . . 186
6.2.3 Using Distance Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
6.2.4 More about Distance Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
6.2.5 Measurement Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
6.3 Example 2: Separating, Measuring and Reconstructing . . . . . . . . . . . . . . . . . 191
6.3.1 Principle of the Watershed Algorithm . . . . . . . . . . . . . . . . . . . . . . 191
6.3.2 Prior Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
6.3.3 Separation using Watershed step by step . . . . . . . . . . . . . . . . . . . . 194
6.3.4 Separation Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
6.3.5 Filtering Individual Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
6.3.6 Geometry Reconstruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
6.4 Example 3: Further Image Analysis - Distribution of Pore Diameters in Foam . . . . 204
6.4.1 First step: pore detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
6.4.2 Second step: pore post-processing . . . . . . . . . . . . . . . . . . . . . . . 204
6.4.3 Third step: custom measure group definition to determine the distribution of
pore diameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
6.4.4 Fourth step: custom measure definition to compute the sphericity of pore . . . 210
6.5 Example 4: Further Image Analysis - Average Thickness of Material in Foam . . . . . 213
6.5.1 Porosity Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
6.5.2 Detection of the Separation Surfaces . . . . . . . . . . . . . . . . . . . . . . 214
6.5.3 Distance Map of the Material . . . . . . . . . . . . . . . . . . . . . . . . . . 216
6.5.4 Calculation of the Material Average Thickness . . . . . . . . . . . . . . . . . 218
6.6 Watershed Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
6.6.1 Segmenting sand pack with watershed tool in the Segmentation Editor . . . . 219
6.6.2 Segmenting multiphase using the Watershed Segmentation wizard . . . . . . 223
CONTENTS v
6.7 More about Image Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
6.7.1 Choosing image filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
6.7.2 Tuning image filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
6.7.3 Compositing image filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
6.8 More about label measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
6.8.1 The Measures Group Selection dialog . . . . . . . . . . . . . . . . . . . . . 242
6.8.2 Custom measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
6.8.3 Configurable native measures . . . . . . . . . . . . . . . . . . . . . . . . . . 246
6.8.4 About measures group backup . . . . . . . . . . . . . . . . . . . . . . . . . 248
6.8.5 Scripting tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
6.9 Cavity Analysis using Ambient Occlusion . . . . . . . . . . . . . . . . . . . . . . . 249
6.9.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
6.9.2 Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
CONTENTS vi
7.4.1 Avizo features for surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
7.4.2 Supported grids in Avizo XMesh Extension . . . . . . . . . . . . . . . . . . 281
7.4.3 Avizo XMesh Extension features for 3D grids . . . . . . . . . . . . . . . . . 282
7.4.4 Scalar fields visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
7.4.5 Vector fields visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
7.4.6 Time dependent data visualization . . . . . . . . . . . . . . . . . . . . . . . 285
7.4.7 Compute modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
7.5 Skeletonization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
7.5.1 Getting started with Skeletonization: the Auto Skeleton module . . . . . . . . 287
7.5.2 Displaying and exporting skeletonization results . . . . . . . . . . . . . . . . 289
7.5.3 Skeletonization step-by-step . . . . . . . . . . . . . . . . . . . . . . . . . . 299
7.5.4 Skeletonization with large data . . . . . . . . . . . . . . . . . . . . . . . . . 303
CONTENTS vii
8.4 Registration of 3D image data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
8.4.1 Getting started with Register Images module . . . . . . . . . . . . . . . . . . 339
8.4.2 Register Images guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
8.4.3 Using the Image Registration Wizard - example with partially overlapping
images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
8.4.4 More about the Register Images module . . . . . . . . . . . . . . . . . . . . 351
8.5 Registration of 2D image and 3D image data sets . . . . . . . . . . . . . . . . . . . . 356
8.5.1 Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
8.5.2 Pre-alignment: Searching for a 2D slice (needle) in a 3D volume (haystack) . 357
8.5.3 Refined alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
8.6 Alignment of 2D images stacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
8.6.1 Basic manual alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
8.6.2 Automatic alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
8.6.3 Alignment via landmarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
8.6.4 Optimizing the least-squares quality function . . . . . . . . . . . . . . . . . . 365
8.6.5 Resampling the input data into result . . . . . . . . . . . . . . . . . . . . . . 366
8.6.6 2D alignment guidelines, more about Align Slices . . . . . . . . . . . . . . . 367
8.7 Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard 369
8.7.1 Images import, voxel size and foreshortening correction . . . . . . . . . . . . 371
8.7.2 Geometric corrections overview . . . . . . . . . . . . . . . . . . . . . . . . . 374
8.7.3 Getting started with FIB Stack Wizard . . . . . . . . . . . . . . . . . . . . . 376
8.7.4 Selecting what to align using masks . . . . . . . . . . . . . . . . . . . . . . 383
8.7.5 Further processing of FIB Stacks . . . . . . . . . . . . . . . . . . . . . . . . 385
8.8 Alignment and pre-processing of FIB/SEM image stacks using the DualBeam 3D
Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
8.8.1 Importing Thermo Scientific EM Systems images . . . . . . . . . . . . . . . 387
8.8.2 Getting started with the DualBeam 3D Wizard . . . . . . . . . . . . . . . . . 388
8.8.3 Step 1: Compensating for the geometric effects of the stage tilt . . . . . . . . 389
8.8.4 Step 2: Cropping before alignment . . . . . . . . . . . . . . . . . . . . . . . 391
8.8.5 Step 3: Removing bad slices . . . . . . . . . . . . . . . . . . . . . . . . . . 391
8.8.6 Step 4: Alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
CONTENTS viii
8.8.7 Step 5: Cropping after alignment . . . . . . . . . . . . . . . . . . . . . . . . 394
8.8.8 Step 6: Use FFT Filter to reduce curtaining artifacts . . . . . . . . . . . . . . 394
8.8.9 Step 7: Noise reduction with Non-Local Means filter . . . . . . . . . . . . . 395
8.8.10 Step 8: Intensity correction . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
8.8.11 Saving results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
8.9 Registration of 3D surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
8.9.1 Getting started with Align Surfaces module . . . . . . . . . . . . . . . . . . 398
8.9.2 Align Surfaces guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
8.9.3 Alignment of surface subsets . . . . . . . . . . . . . . . . . . . . . . . . . . 405
8.9.4 Measure and visualize surface distance . . . . . . . . . . . . . . . . . . . . . 407
8.10 Registration of 3D image and surface, nominal-actual analysis . . . . . . . . . . . . . 409
8.10.1 A simple workflow for nominal-actual analysis . . . . . . . . . . . . . . . . . 410
8.10.2 Advanced - Image/surface registration step by step . . . . . . . . . . . . . . . 414
CONTENTS ix
10 User Interface Components, General Concepts, Start-Up 435
10.1 User Interface Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
10.1.1 File Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
10.1.2 Edit Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
10.1.3 Project Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
10.1.4 View Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
10.1.5 Window Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
10.1.6 Help Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
10.1.7 Standard Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
10.1.8 Workrooms Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
10.1.9 Project View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
10.1.10 Properties Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
10.1.11 Progress Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
10.1.12 Viewer Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
10.1.13 Consoles Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
10.1.14 Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
10.1.15 Histogram Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
10.1.16 Correlation Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
10.1.17 File Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
10.1.18 Job Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
10.1.19 Preferences Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482
10.1.20 Snapshot Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
10.1.21 System Information Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
10.1.22 Object Popup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
10.1.23 Create Object Popup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
10.2 General Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
10.2.1 Class Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
10.2.2 Scalar Field and Vector Fields . . . . . . . . . . . . . . . . . . . . . . . . . . 504
10.2.3 Coordinates and Grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
10.2.4 Surface Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
CONTENTS x
10.2.5 Vertex Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
10.2.6 Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
10.2.7 Data parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
10.2.8 Shadowing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
10.2.9 Units in Avizo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
10.2.10 Automatic Display in Avizo . . . . . . . . . . . . . . . . . . . . . . . . . . . 516
10.2.11 Workroom Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
CONTENTS xi
11.7 Using MATLAB with Avizo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
11.7.1 Using MATLAB Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
11.8 Using Maps with Avizo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
11.8.1 Maps - Avizo Connectivity Bridge . . . . . . . . . . . . . . . . . . . . . . . 591
11.8.2 Export Sites to Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592
CONTENTS xii
14.1.1 First Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632
14.1.2 Inspecting the Generated Mesh . . . . . . . . . . . . . . . . . . . . . . . . . 634
14.1.3 Fast Meshing versus Precise Meshing . . . . . . . . . . . . . . . . . . . . . . 637
14.1.4 Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639
14.1.5 Controlling the Refinement of the Mesh . . . . . . . . . . . . . . . . . . . . 639
14.1.6 Slider Quality and Grouping . . . . . . . . . . . . . . . . . . . . . . . . . . 639
14.1.7 Preserve Thin Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640
14.1.8 Boundary Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641
14.1.9 Advanced Meshing Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641
14.1.10 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643
14.1.11 Assigning Boundary Conditions to the Mesh . . . . . . . . . . . . . . . . . . 644
14.1.12 Exporting the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647
14.1.13 Scripting the Room: TCL Command List . . . . . . . . . . . . . . . . . . . . 647
14.1.14 Progress Bar Indications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651
14.2 Meshing WorkroomTutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651
14.2.1 First Mesh Generation and Inspection . . . . . . . . . . . . . . . . . . . . . 652
14.2.2 Global Mesh Refinement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654
14.2.3 Mesh Refinement of Groups of Materials . . . . . . . . . . . . . . . . . . . . 657
14.2.4 Advanced Mesh Refinement . . . . . . . . . . . . . . . . . . . . . . . . . . 657
14.2.5 Boundary Layer Refinement . . . . . . . . . . . . . . . . . . . . . . . . . . 660
14.2.6 Optimization of Mesh Quality . . . . . . . . . . . . . . . . . . . . . . . . . . 662
14.2.7 Color Mapping of Material Properties . . . . . . . . . . . . . . . . . . . . . 663
14.2.8 Boundary Conditions and Export to CFD/FEA Solvers . . . . . . . . . . . . 664
14.3 Avizo XWind Extension Measurements . . . . . . . . . . . . . . . . . . . . . . . . . 666
14.3.1 3D measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666
14.3.2 Histograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668
14.3.3 Data probing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
14.4 Getting Started with reading and visualizing CAE/CFD data . . . . . . . . . . . . . . 672
14.4.1 User interface short overview . . . . . . . . . . . . . . . . . . . . . . . . . . 672
14.4.2 Reading data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674
CONTENTS xiii
14.4.3 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676
14.4.4 Units and legends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678
14.4.5 Saving your project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678
14.4.6 Tip: Template projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679
14.4.7 Time animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680
14.5 Avizo XWind Extension Models Information and Display . . . . . . . . . . . . . . . 682
14.5.1 Properties and parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
14.5.2 Colormaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
14.5.3 Viewing the grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685
14.5.4 Viewing the boundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
14.6 Avizo XWind Extension Scalar Fields Display . . . . . . . . . . . . . . . . . . . . . 690
14.6.1 Scalar field profile on a cross section . . . . . . . . . . . . . . . . . . . . . . 690
14.6.2 Scalar field isolines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691
14.6.3 Legend and captions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692
14.6.4 Isosurfaces of pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693
14.7 Avizo XWind Extension Vector Fields Display . . . . . . . . . . . . . . . . . . . . . 696
14.7.1 Particles animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696
14.7.2 Illuminated streamlines (ISL) . . . . . . . . . . . . . . . . . . . . . . . . . . 699
14.7.3 Line integral convolution (LIC) . . . . . . . . . . . . . . . . . . . . . . . . . 700
14.7.4 Vectors in a plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701
14.7.5 Stream ribbons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702
14.7.6 Find the 3D critical points . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703
14.8 Avizo XWind Extension Statistical and Arithmetic Computations . . . . . . . . . . . 704
14.8.1 Surface and volume integrals . . . . . . . . . . . . . . . . . . . . . . . . . . 705
14.8.2 Arithmetic computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710
14.9 Avizo XWind Extension Vorticity Identification . . . . . . . . . . . . . . . . . . . . 712
14.9.1 Vorticity-related variables computation . . . . . . . . . . . . . . . . . . . . . 712
14.9.2 Vortex core lines identification . . . . . . . . . . . . . . . . . . . . . . . . . 714
14.9.3 Vortical flow visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716
14.10 Avizo XWind Extension Measurements . . . . . . . . . . . . . . . . . . . . . . . . . 718
CONTENTS xiv
14.10.1 3D measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
14.10.2 Histograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720
14.10.3 Data probing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722
CONTENTS xv
15.3.5 Step 4 - Remove non-percolating void space . . . . . . . . . . . . . . . . . . 777
15.3.6 Step 5 - Selection of a sub-region . . . . . . . . . . . . . . . . . . . . . . . . 778
15.3.7 Step 6 - Formation factor experiment simulation . . . . . . . . . . . . . . . . 779
15.3.8 Step 7 - Effective formation factor calculation . . . . . . . . . . . . . . . . . 781
15.3.9 Step 8 - Formation factor computation validation . . . . . . . . . . . . . . . . 783
15.4 Getting started with thermal conductivity computation . . . . . . . . . . . . . . . . . 785
15.4.1 Theoretical elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785
15.4.2 Step 1 - Load the data set . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789
15.4.3 Step 2 - Set the voxel size . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790
15.4.4 Step 3 - Create a label image from the data set . . . . . . . . . . . . . . . . . 790
15.4.5 Step 4 - Remove isolated conducting materials parts . . . . . . . . . . . . . . 791
15.4.6 Step 5 - Selection of a sub-region . . . . . . . . . . . . . . . . . . . . . . . . 791
15.4.7 Step 6 - Thermal conductivity experiment simulation . . . . . . . . . . . . . 792
15.4.8 Step 7 - Effective thermal conductivity calculation . . . . . . . . . . . . . . . 796
15.4.9 Step 8 - Thermal conductivity computation validation . . . . . . . . . . . . . 797
CONTENTS xvi
16.2.7 Adding a Read Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819
16.2.8 Adding a Write Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 820
16.2.9 Creating the Build System Files . . . . . . . . . . . . . . . . . . . . . . . . . 821
16.2.10 The Package File Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821
16.3 File I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824
16.3.1 On file formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824
16.3.2 Read Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825
16.3.3 Write Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835
16.3.4 Use the AmiraMesh API to read and write files in Avizo data format . . . . . 840
16.4 Writing Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846
16.4.1 A Compute Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846
16.4.2 A Display Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 854
16.4.3 A Module With Plot Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 862
16.4.4 A Compute Module on GPU . . . . . . . . . . . . . . . . . . . . . . . . . . 867
16.5 Data Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 878
16.5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 878
16.5.2 Data on Regular Grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 881
16.5.3 Unstructured Tetrahedral Data . . . . . . . . . . . . . . . . . . . . . . . . . 887
16.5.4 Unstructured Hexahedral Data . . . . . . . . . . . . . . . . . . . . . . . . . 889
16.5.5 Unstructured Mixed Models . . . . . . . . . . . . . . . . . . . . . . . . . . . 891
16.5.6 Other Issues Related to Data Classes . . . . . . . . . . . . . . . . . . . . . . 893
16.6 Documentation of Modules in Avizo XPand Extension . . . . . . . . . . . . . . . . . 897
16.6.1 The documentation file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 897
16.6.2 Generating the documentation . . . . . . . . . . . . . . . . . . . . . . . . . 898
16.7 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 899
16.7.1 Time-Dependent Data And Animations . . . . . . . . . . . . . . . . . . . . . 899
16.7.2 Important Global Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 901
16.7.3 Save-Project Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 903
16.7.4 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 904
CONTENTS xvii
17.1 Data Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
17.1.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
17.1.2 Metrology Surface Determination . . . . . . . . . . . . . . . . . . . . . . . . 907
17.2 Data Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 909
17.2.1 Metrology 3D Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 909
17.2.2 Volume Rendering Options . . . . . . . . . . . . . . . . . . . . . . . . . . . 910
17.2.3 Surface Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 910
17.2.4 Ortho Views Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 910
17.3 Geometries Fitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 911
17.3.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 911
17.3.2 Geometry Fitting Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912
17.3.3 Fitting Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 913
17.3.4 Fitting Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 913
17.4 Inherited Geometries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 919
17.4.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 919
17.4.2 Inherited Geometry Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . 919
17.4.3 Intersection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 920
17.4.4 Composition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 921
17.4.5 Projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 921
17.4.6 Inherited Geometry Updates . . . . . . . . . . . . . . . . . . . . . . . . . . 921
17.5 Local Coordinate Systems (LCS) Creation . . . . . . . . . . . . . . . . . . . . . . . 922
17.5.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 922
17.5.2 LCS Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 922
17.6 Measurements Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 923
17.7 Test Plans Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 924
CONTENTS xviii
19.1.2 Generating and Analyzing the Network . . . . . . . . . . . . . . . . . . . . . 938
CONTENTS xix
Chapter 1
Introduction
Avizo is a 3D data visualization, analysis and modeling system. It allows you to explore and analyze
data sets from various areas, including:
Examples from these disciplines are illustrated by several demo scripts contained in the online version
of the user’s guide.
3D data can be quickly explored, analyzed, compared, and quantified. 3D objects can be represented
as image volumes or geometrical surfaces and grids suitable for numerical simulations, notably as tri-
angular surface and volumetric tetrahedral grids. Avizo provides methods to generate such grids from
voxel data representing an image volume, and it includes a general-purpose interactive 3D viewer.
Section 1.1 (Overview) provides a short overview of the fundamentals of Avizo, i.e., its object-oriented
design and the concept of data objects and modules.
Section 1.2 (Features) summarizes key features of Avizo, for example direct volume rendering, image
processing, and surface simplification.
Section 1.3 (Editions and Extensions) briefly describes optional extensions and editions available for
Avizo and for what they can be used for.
Section 1.4 (System Requirements) provides system specific information.
Section 1.5 (Avizo Installation) gives information on installation process.
Section 1.6 (Avizo License Manager) details for entering and managing Avizo license passwords.
Section 1.7 (First steps) provides hints about tutorials included in this guide.
Section 1.8 (Contact and Support) provides contact information for your technical support, license
administrator, or sales representative.
1.1 Overview
Avizo is a modular and object-oriented software system. Its basic system components are modules and
data objects. Modules are used to visualize data objects or to perform some computational operations
on them. The components are represented by little icons in the Project View. Icons are connected
by lines indicating processing dependencies between the components, i.e., which modules are to be
applied to which data objects. Alternatively, modules and data objects can be displayed in a Project
Tree View. Modules from data objects of specific types are created automatically from file input data
when reading or as output of module computations. Modules matching an existing data object are
created as instances of particular module types via a context-sensitive popup menu. Projects can be
created with a minimal amount of user interaction. Parameters of data objects and modules can be
modified in Avizo’s interaction area.
For some data objects such as surfaces or colormaps, there exist special-purpose interactive editors
that allow the user to modify the objects. All Avizo components can be controlled via a Tcl command
interface. Commands can be read from a script file or issued manually in a separate console window.
The biggest part of the screen is occupied by a 3D graphics window. Additional 3D views can be
created if necessary. Avizo is based on the latest release of Open Inventor by FEI SAS, a part of
Thermo Fisher Scientific. In addition, several modules apply direct OpenGL rendering to achieve
special rendering effects or to maximize performance. In total, there are more than 270 data object and
module types. They allow the system to be used for a broad range of applications. Scripting can be
used for customization and automation. User-defined extensions are facilitated by the Avizo developer
version.
Overview 2
1.2.1 Data import
Avizo can load directly different types of data, including:
A large number of file formats are supported in Avizo or through specific optional readers. For an
introduction to data import, see section 3.1. For more details, see section 2.6.
You can quickly explore 3D images looking at single or multiple orthographic or oblique sections.
Data sets can be superimposed on slices, displayed as height fields, or with isolines contouring. You
can cut away parts of your data to uncover hidden regions. Curved or cylinder slices are also available.
One of the most intuitive and most powerful techniques for visualizing 3D image data is direct volume
rendering. Light emission and light absorption parameters are assigned to each point of the volume.
Simulating the transmission of light through the volume makes it possible to display your data from any
view direction without constructing intermediate polygonal models. By exploiting modern graphics
hardware, Avizo is able to perform direct volume rendering in real time, even on very large data when
Features overview 3
using the Avizo XLVolume Extension. Thus volume rendering can instantly highlight relevant features
of your data. Volume rendered images can be combined with any type of polygonal display. This
improves the usefulness of this technique significantly. Moreover, multiple data sets can be volume
rendered simultaneously – a unique feature of Avizo. Transfer functions with different characteristics
required for direct volume rendering can be either generated automatically or edited interactively using
an intuitive colormap editor. Avizo volume rendering can use the latest techniques for high quality
visualization effects such as lighting or shadows.
1.2.3.3 Isosurfaces
Isosurfaces are most commonly used for analyzing arbitrary scalar fields sampled on discrete grids.
Applied to 3D images, the method provides a very quick, yet sometimes sufficient method for recon-
structing polygonal surface models. Beside standard algorithms, Avizo provides an improved method,
which generates significantly fewer triangles with very little computational overhead. In this way, large
3D data sets can be displayed interactively even on smaller desktop graphics computers.
With the Avizo XLVolume Extension, even very large data sets that cannot be fully loaded in mem-
ory can be manipulated at interactive speed. Multi-resolution techniques can manage and visualize
extremely large amounts of volume data of up to hundreds of gigabytes. You can then, for instance,
quickly select a region of interest and extract down-sampled or partial data for further processing.
The image Align Slices enables you to build a consistent stack of images with manual or automatic
tools, if, for instance, physical cross sections have been shifted during image acquisition.
Image features can be enhanced by applying a wide range of filters for controlling contrast, smoothing,
noise reduction and feature enhancement. See Section 6.7 More about Image Filtering.
Segmentation means assigning labels to image voxels that identify and separate objects in a 3D image.
Avizo offers a large set of segmentation tools, ranging from purely manual to fully automatic: brush
(painting), lasso (contouring), magic wand (region growing), thresholding, intelligent scissors, contour
fitting (snakes), contour interpolation and extrapolation, wrapping, smoothing and de-noising filters,
Features overview 4
morphological filters for erosion, dilation, opening and closing operations, connected component anal-
ysis, images correlation, objects separation and filtering, etc. See section 3.5 for a tutorial about image
segmentation with Avizo.
Avizo provides tools for probing image data, extracting profiles, value or correlation histogram. It can
extract information from segmented images such as area, volumes, intensity statistics. Avizo provides
an extensive set of tools for image quantification and analysis. See Advanced Image Processing,
Segmentation and Analysis examples.
Once the interesting features in a 3D image volume have been segmented, Avizo is able to create a
corresponding polygonal surface model. The surface may have non-manifold topology if there are lo-
cations where three or more regions join. Even In this case, the polygonal surface model is guaranteed
to be topologically correct, i.e., free of self-intersections. Fractional weights that are automatically
generated during segmentation allow the system to produce optionally smooth boundary interfaces.
This way realistic high-quality models can be obtained, even if the underlying image data are of low
resolution or contain severe noise artifacts. Making use of innovative acceleration techniques, surface
reconstruction can be performed very quickly. Moreover, the algorithm is robust and fail-safe.
Surface simplification is another prominent feature of Avizo. It can be used to reduce the number of tri-
angles in an arbitrary surface model according to a user-defined value. Thus, models of finite-element
grids, suitable for being processed on low-end machines, can be generated. The underlying simplifi-
cation algorithm is one of the most elaborate available. It is able to preserve topological correctness,
i.e., self-intersections commonly produced by other methods are avoided. In addition, the quality of
the resulting mesh, according to measures common in finite element analysis, can be controlled. For
example, triangles with long edges or triangles with bad aspect ratio can be suppressed.
A surface editor is also available for smoothing or refining surface in whole or part, cutting and copy-
ing parts of surfaces, defining boundary conditions for further numerical simulation, checking and
modifying surface triangles.
Surface Path Set can be created interactively - for instance as geodesic contours, edited and used to cut
surface patches. Surface path can also be obtained by intersecting surfaces,
Avizo and Avizo XWind Extension also provide a powerful Remesh Surface module that can be used
for producing high quality surfaces.
Features overview 5
1.2.5.3 Generation of Tetrahedral Grids
Avizo allows you not only to generate surface models from your data but also to create true volumetric
tetrahedral grids suitable for advanced 3D finite-element simulations. These grids are constructed
using a flexible advancing-front algorithm. Again, special care is taken to obtain meshes of high
quality, i.e., tetrahedra with bad aspect ratio are avoided. Several different file formats are supported,
so that the grid can be exported to many standard simulation packages.
Avizo can also reconstruct surfaces from scattered points (see Delaunay Triangulation and Point Wrap
Triangulation modules).
1.2.5.5 Skeletonization
A set of tools is included for reconstructing and analyzing a dendritic, porous or fracture network from
3D image data.
Avizo can visualize arbitrary functional data given on 3D Point Cloud sets or Line Sets.
A number of drawing styles and coloring schemes help to yield meaningful and informative visualiza-
tions of polygonal models, whether generated from image data or imported from CAD or simulation
package. Surface and 3D grid meshes can be colored or textured in order to visualize a second inde-
pendent data set.
Another Avizo feature comprises the realistic view-dependent way of rendering semi-transparent sur-
faces. By correlating transparency with local orientation of the surface relative to the viewing direction,
complex spatial structures can be understood much more easily.
Avizo allows you to analyze numerical data coming from measurements or simulations. Avizo supports
polygonal surfaces such as triangular meshes, 3D lattices with uniform, rectilinear of curvilinear coor-
dinates, and 3D tetrahedral or hexahedral grids. Most general purpose image visualization techniques
and analysis tools can be applied, such as: slice extraction, computation of isolines or isosurfaces, data
probing and histograms. In addition, scalar quantities can be visualized with pseudo-colors on the grid
itself.
Features overview 6
Beside visualization, data representations such as isosurfaces, grid cuts or contour lines can be ex-
tracted as first class data objects.
Displacement vectors can be visualized on grids or applied as grid deformation that can be animated.
Avizo XWind Extension provides extensive additional support for numerical data import/export, visu-
alization and analysis.
Avizo provides many advanced tools for vector fields and flow visualization. Vector arrows can be
drawn on a slice, within a volume, or upon a surface. The flow structure may be better revealed by
representations such as fast Line Integral Convolution on slices or arbitrary surfaces, illuminated and
animated streamlines, stream ribbons, stream surfaces, particle animations, synthetic Vector Probe...
All of these stream visualization techniques are highly interactive. While seed point distributions can
be automatically calculated, you can also select and interactively manipulate seed points and structures,
thus supporting the investigation of the flow field and highlighting of different features. Avizo can also
support six-component complex vector fields and phase visualization, e.g., electromagnetic fields.
Avizo XWind Extension provides extensive support for flow and CFD post-processing.
Avizo has support for iconic visualization of tensor field, extraction of eigenvalues, computation of
rate of strain tensor, and gradient tensor.
Avizo XWind Extension can compute many secondary variables from simulation results including
various tensor.
Multiple data sets can be combined to compare images of different objects, or images of an object
recorded at different times or with different imaging modalities such as X-ray CT and MRI. In ad-
dition, fusion of multi-modal data by arbitrary arithmetic operations can be performed to increase
the amount of information and accuracy in the models. Avizo allows manual registration through
interactive manipulators, automatic rigid or non-rigid registration through landmarks, and automatic
registration using iterative optimization algorithms (see Register Images module).
Surfaces can also be registered using rigid or non-rigid transformations, based on landmarks sets warp-
ing, alignment of centers or principal axes, or distance minimization algorithms.
Features overview 7
1.2.7.2 Operating on 3D data
Many utilities are available for data processing. Here are some important ones. Resampling can reduce
or enlarge the resolution of a 3D image or data sets defined on regular grids, and different sampling
kernels are supported. Data can be cropped or regions of interest can be defined. Data can be converted
to any supported primitive type, from byte to 64-bits floating point numbers. Multi-component data
such as multi-channel images or vector data can be composed or decomposed. Standard 3D field op-
erators such as scalar field gradient or vector field curl are available. Surface curvatures and distances
between surfaces can also be computed, as scalar or vector information. The powerful Arithmetic
module allows the user to perform calculations on data sets with user-defined expression, and can be
used to interpolate data between regular grids and polyhedral grids. Data sets can also be created from
arithmetic expressions.
Features overview 8
All Avizo components can be controlled via a Tcl command language interface. Tcl scripts are used
for saving your work session. Tcl scripts also allow the advanced user to automate or customize tasks
with Avizo for routine workflows, without the need for C++ programming. Custom Avizo modules
with user interface can even be created as Tcl scripts. Avizo module behaviour and 3D interaction can
be customized by using Tcl. Avizo can also be used for batch processing.
See Chapter 11.5, including a short introduction to the Tcl scripting language.
C++ programming
With the Avizo XScreen Extension, Avizo can also be extended by programmers. The Avizo XPand
Extension permits creation of new custom components for Avizo such as file readers and writers,
computation modules, and even new visualization modules, using the C++ programming language.
New modules and new data classes can be defined as subclasses of existing ones. In order to simplify
the creation of new custom extensions, a development wizard is included.
See the Avizo XPand Extension User’s Guide for detailed information.
Template projects
Template projects can be used to ease repetitive tasks on a set of similar data. A template project
consists of a backup of an original project that can be replicated on another data of the same type. See
Chapter 11.1.1.
1.3.1 Editions
Currently, the following editions are available for Avizo 2019.
Avizo Lite Edition. The application for scientific visualization. Avizo is a versatile and flexible
application framework providing powerful 3D visualization capabilities to researchers and scientists.
Avizo delivers advanced visualization techniques allowing you to gain detailed insight into your
3D data. It provides exactly the same level of capabilities as the previous Avizo Standard edition,
extended by the enhancements and new features introduced by version 9, but excluding Avizo
advanced image processing, analysis and quantification features, and other Avizo extension-specific
features. The Avizo Lite Edition includes the following extensions: Avizo XSkeleton Extension and
Avizo XMesh Extension.
Avizo. The application for Material Sciences. Avizo is used for industrial tomography, crystallog-
raphy, material microstructure evolution, modality inspection for nano-structure, non-destructive
investigation and surface analysis. Avizo delivers the whole feature-set allowing Material Scientists
Avizo for Industrial Inspection. This is the application for Industrial Inspection, Digital Inspection,
and Materials Analysis. Avizo for Industrial Inspection streamlines the process of industrial inspec-
tion and materials design for off-line, near-line, and in-line, including dimensional metrology with
advanced measurements; an extensive set of inspection workflows, called recipes for quantification
of indications, porosity, inclusions, and defects; fiber characterization of parts and materials; ability
to do actual/nominal comparison by integrating CAD models; and reverse engineering workflows
for additive manufacturing. Avizo for Industrial Inspection includes all Avizo features as well as the
following extensions: Avizo XMetrology Extension, Avizo XReporting Extension, Avizo XReadIGES
Extension, Avizo XReadSTEP Extension and Avizo XLVolume Extension.
Avizo XInline Extension. This is the framework for automatizing high-volume inspection processes.
Avizo XInline Extension includes the following extensions:
• packXInlineReceiverDaemon: Receives pushed images from a scanner and can perform reg-
istration using a reference data.
• packXInlineDesigner: Provides the Designer tool which allows defining inspection scenario
on a data.
• packXInlineInspector: Provides the Inspector tool which inspects the data using scenario de-
fined in Designer tool.
• packXInlineReviewer: Provides the Reviewer tool which is used to analyse the results of the
Inspector tool and to understand why a model has been rejected.
• packXInlineIndustDaemon: Automatizes the inspection done by the Inspector tool. To be
used in industrialization workflows.
• packXInlineDaemon: Provides a Receiver service and an Industrialization service.
• packXInlineSystemSetup: Provides several tools to help the administrator to import new data
and control all other tools settings.
• Avizo XWind Extension includes all features previously available in the Avizo Wind edition
for advanced post-processing of simulation data (i.e., ranging from flow to thermal) and stress
data; an extensive array of advanced visualization and analysis tools to CFD and multi-physics;
mechanical and thermal engineering; manufacturing simulation and micro-structural prediction;
and non-linear structural and geotechnical problems. It also includes an advanced meshing
(*) With cluster configurations, Avizo XScreen Extension requires as many licenses as slave rendering
nodes in the cluster configuration. Ex: A configuration with a master node driving a cluster of 4 nodes
will require 4 Avizo XScreen Extension licenses.
For additional information about Avizo and its extensions, please refer to the Avizo web site,
http://www.thermofisher.com/amira-avizo.
Some of the Editions and Extensions or functionalities are limited to some platforms:
System Requirements 13
• Avizo XWind Extension: support of the Abaqus reader (.odb format) and STAR-CCM reader
are available only on the Microsoft Windows and Linux. The meshing workroom is only avail-
able on Microsoft Windows platform,
• Avizo XScreen Extension is supported only on Microsoft Windows and Linux, not Mac OS X.
• Avizo XReadIGES Extension, Avizo XReadSTEP Extension, Avizo XReadCATIA5 Ex-
tension, Avizo XReadCATIA6 Extension, Avizo XReadJT Extension, Avizo XReadXMT
Extension, Avizo XReadPROE Extension, Avizo XReadSOLIDEDGE Extension, Avizo
XReadSOLIDWORKS Extension, Avizo XReadUG Extension, Avizo XReadVDA Exten-
sion are supported only on Microsoft Windows, not on Linux or Mac OS X,
• Avizo XLabSuite Extension: molecular diffusivity, formation factor and thermal conductivity
computation are supported only on Microsoft Windows, not on Linux or Mac OS X.
• Avizo XMetrology Extension is supported only on Microsoft Windows, not on Linux or Mac
OS X.
• Avizo XDigitalVolumeCorrelation Extension is supported only on Microsoft Windows and
Linux, not Mac OS X.
• Recipes functionality (Avizo) is supported only on Microsoft Windows and Linux, not Mac OS
X.
• Embossed Slice visualization module is supported only on Microsoft Windows and Linux, not
Mac OS X.
• Olympus and TXM file formats are supported only on Microsoft Windows, not on Linux or Mac
OS X.
• GATAN reader (Avizo) is supported only on Microsoft Windows and Linux, not Mac OS X.
This document is intended to give recommendations about choosing a suitable workstation to run
Avizo.
The four most important components that need to be considered are the graphics card (GPU), the CPU,
the RAM and the hard drive.
The performance of direct volume rendering of large volumetric data or large triangulated surface
visualization extracted from the data depends heavily on the GPU capability. The performance of
image processing algorithms depends heavily on the performance of the CPU. The ability to quickly
load or save large data depends heavily on the hard drive performance. And, of course, the amount of
available memory in the system will be the main limitation on the size of the data that can be loaded
and processed.
Because the hardware requirements will widely vary according to the size of your data and your work-
flow, we strongly suggest that you take advantage of our supported evaluation version to try working
with one of your typical data sets.
System Requirements 14
In this document, the term Avizo refers to all Avizo editions and all Avizo extensions.
The single most important determinant of Avizo performance for visualization is the graphics card.
Avizo should run on any graphics system (this includes GPU and its driver) that provides a complete
implementation of OpenGL 2.1 or higher (certain features may not be available depending on the
OpenGL version and extensions supported). However, graphics board and driver bugs are not unusual.
The amount of GPU memory needed depends on the size of the data. We recommend a minimum of
1 GB on the card. Some visualization modules may require having graphics memory large enough to
hold the actual data.
High-end graphics cards have 16 to 32 GB of memory. Optimal performance volumetric visualization
at full resolution requires that data fit in graphics memory (some volume rendering modules of Avizo
are able to go around this limitation).
Avizo will not benefit from multiple graphics boards for the purpose of visualization on a single moni-
tor. However, some of the image processing algorithms rely on CUDA for computation, and while the
computation can run on the single CUDA-enabled graphics board, this computation can also run on a
second CUDA-enabled graphics card installed on the system. A multiple graphics board configuration
can be useful to drive many screens or in immersive environments.
When comparing graphics boards, there are many different criteria and performance numbers to con-
sider. Some are more important than others, and some are more important for certain kinds of ren-
dering. Thus, it’s important to consider your specific visualization requirements. Integrated graphics
boards are not recommended for graphics-intensive applications such as Avizo except for basic visu-
alization.
Wikipedia articles on NVIDIA GeForce/Quadro and AMD Radeon/FirePro cards will detail specific
performance metrics:
• Memory size: This is very important for volume visualization (both volume rendering and slices)
to maximize image quality and performance because volume data is stored in the GPU’s texture
memory for rendering. It is also important for geometry rendering if the geometry is very large
(large number of triangles).
• Memory interface / Bandwidth: This is important for volume rendering because large amounts
of texture data need to be moved from the system to the GPU during rendering. The PCI Express
3 buses are the fastest interfaces available today.
• Number of cores (also known as stream processors): This is very important for volume rendering
because every high-quality rendering feature you enable requires additional code to be executed
on the GPU during rendering.
• Triangles per second: This is very important for geometry rendering (surfaces, meshes).
• Texels per second / Fill rate: This is very important for volume visualization (especially for vol-
System Requirements 15
ume rendering), because a large number of textures will be rendered and pixels will be ”filled”
multiple times to blend the final image.
• A professional graphics boards will benefit from the professional support offered by the ven-
dors (driver bug fixes).
• Always use a recent driver version for your graphics board.
• With an NVIDIA Quadro board we recommend to use the driver profile ”3D App - Visual
Simulation”. In case of rendering or performance issues you may want to experiment with
different ”3D App” profiles.
• Turning off the Vertical sync feature improves frame rate.
• Visit http://en.wikipedia.org/wiki/List of Nvidia graphics processing units for a complete list
of NVIDIA boards and comparisons.
• Visit http://en.wikipedia.org/wiki/List of AMD graphics processing units for a complete list of
AMD boards and comparisons.
• Some visualization modules like Volume Rendering may not support Intel graphic cards.
System memory is the second most important determinant for Avizo users who need to process large
data.
You may need much more memory than the actual size of the data you want to load within Avizo.
Some processing may require several times the memory required by the original data set. If you want
to load, for instance, a 4 GB data set in memory and apply a non-local means filter to the original
data and then compute a distance map, you may need up to 16 or 20 GB of additional memory for the
intermediate results of your processing. Commonly you need 2 or 3 times the memory footprint of the
data being processed for basic operations. For more complex workflows you may need up to 6 or 8
times amount of memory, so 32 GB may be required for a 4 GB dataset.
Also notice that size of the data on disk may be much smaller than memory needed to load the data as
System Requirements 16
the file format may have compressed the data (for instance, loading a stack of JPEG files).
Avizo’s Large Data Access (LDA) technology enables you to work with data sizes exceeding your
system’s physical memory. LDA is an excellent way to stretch the performance, but it is not a direct
substitute for having more physical memory. The best performance and optimal resolution is achieved
by using Avizo’s LDA technology in combination with a large amount of system memory. LDA
provides a very convenient way to quickly load and browse your whole dataset. Note that LDA data
will not work with most compute modules, which require the full resolution data to be loaded in
memory.
Avizo provides another loading option to support for 2D and 3D image processing from disk to disk,
without requiring loading the entire data into memory; modules then operate per data slab. This
enables processing and quantification of large image data even with limited hardware memory. Since
processing of each slab requires loading data and saving results from/to the hard drive, it dramatically
increases processing time. Thus, processing data fully loaded in memory is always preferred for best
performance.
When working with large files, reading data from the disk can slow down your productivity. A standard
hard drive (HDD) (e.g., 7200rpm SATA disk) can only stream data to your application at a sustained
rate of about 60 MB/second. That is the theoretical limit; your actual experience is likely to be closer
to 40 MB/second. When you want to read a 1 GB file from the disk, you likely have to wait 25 seconds.
For a 10 GB file, the wait is 250 seconds, over 4 minutes. LDA technology will greatly reduce wait
time for data visualization, but disk access will still be a limiting factor when you want to read data
files at full resolution for data processing. Compared to traditional HDDs, solid state drives (SSD) can
improve read and write speeds.
For best performance, the recommended solution is to configure multiple hard drives (3 or more HDD
or SSD) in RAID5 mode; note that RAID configurations may require substantially more system ad-
ministration. For performance only, RAID 0 could be used, but be warned of risk of data loss upon
hard-drive failure. If you want performance and data redundancy then RAID 5 is recommended.
Reading data across the network, for example from a file server, will normally be much slower than
reading from a local disk. The performance of your network depends on the network technology (100
Mb, 1 Gb, etc.), the amount of other traffic on the network, and number/size of other requests to the
file server. Remember, you are (usually) sharing the network and server and will not get the theoretical
bandwidth. LDA technology may also facilitate visualization of volume data through the network, but
if data loading is a bottleneck for your workflow, we recommend making a local copy of your data.
1.4.1.5 CPU
While Avizo mostly relies on GPU performance for visualization, many modules are computational
intensive and their performance will be strongly affected by CPU performance.
System Requirements 17
More and more modules inside Avizo are multi-threaded and thus can take advantage of multiple CPUs
or multiple CPU cores available on your system. This is the case for most of the quantification modules
provided with Avizo (with some limitations on Mac platform, see Mac OS X Limitation section), a
number of modules of the Avizo XLabSuite Extension,and also various computation modules.
Fast CPU clock, number of cores, and memory cache are the three most important factors affecting
Avizo performance. While most multi-threaded modules will scale up nicely according to the number
of cores, the scaling bottleneck may come from memory access. From experience, up to 8 cores show
almost linear scalability while more than 8 cores do not show much gain in performance. A larger
memory cache improves performance.
Large geometry rendering such as large surfaces from Isosurface or Generate Surface, large point
clusters, large numerical simulation meshes:
• Multiple CPU cores (for many modules, including most image processing modules)
• CPU clock frequency
Anisotropic Diffusion, Non-Local Means Filter (high-performance smoothing and noise reduction im-
age filters), Avizo XLabSuite Extension (absolute permeability computation):
System Requirements 18
Other compute modules, display module data extraction:
Multi-display systems with Avizo XScreen Extension: tiled displays, immersive displays, virtual real-
ity:
GPU computing using custom module programmed using Avizo XPand Extension and GPU API:
An internet access is necessary to activate Avizo. Your firewall may prevent the connection to the
license server.
For more information, please refer to Licensing Troubleshooting (Firewall Problem).
1.4.3.2 Linux
• CentOS R 7, the official Linux distribution on which Avizo has been fully tested.
• Red Hat R Enterprise Linux R 7.x.
Notes:
System Requirements 19
-no stencils) to get acceleration.
• On some distributions, some parts of the user interface, the segmentation editor for example,
may not display correctly. This is a known Qt issue. You can work around this by disabling the
composite option in the extension section of your Xorg.conf configuration file:
Section "Extensions"
Option "Composite" "disable"
EndSection
• To work properly on Linux systems where SELinux is enabled, Avizo requires the modification
of the security context of some Avizo shared object files so they can be relocated in memory.
The user (maybe root) that installs Avizo has to run the following command from a shell
console in order to set the right security context:
chcon -v -t texrel shlib t "${AVIZO ROOT}"/lib/arch-Linux*-*/lib*.so
• Even if Avizo should work with any desktop (like KDE), it has been validated only with
GNOME.
1.4.3.3 Mac OS X
In order to run CUDA enabled modules, Mac OS X requires the most recent CUDA driver for Mac to be
installed. It can be found at the following URL: http://www.nvidia.com/object/mac-driver-archive.html
and must be installed manually. If this driver is not installed, modules of Avizo using GPU compute
capabilities will not be able to run properly.
1.4.3.4 XPand
To add custom extensions to Avizo with Avizo XPand Extension on Windows, you will need Microsoft
Visual Studio R 2013, Update 4. The compiler you need depends on the version of Avizo you have.
You can obtain the version information by typing app uname into the Avizo console. It is important
to install Visual Studio prior to run Avizo in debug mode.
To add custom extensions to Avizo with Avizo XPand Extension on Linux, you will need gcc 4.8.x on
RHEL 7. Use the following command to determine the version of the GNU compiler:
gcc --version
To add custom extensions to Avizo with Avizo XPand Extension on Mac OS X, you will need at least
XCode 7.
System Requirements 20
1.4.3.5 MATLAB
To use the Calculus MATLAB module that establishes a connection to MATLAB (MathWorks, Inc.),
follow these installation instructions:
Windows
If you did not register during installation, enter the following command on the Windows command
line: matlab /regserver.
Linux
The PATH environment variable should be also set to MATLAB INSTALLATION PATH/bin.
If you still have trouble starting Calculus MATLAB after setting the environment variable, it might
be because the GNU Standard C++ Library (libstdc++) installed on your platform is older
than the one required by MATLAB. You can check MATLAB’s embeded libstdc++ version in
MATLAB INSTALLATION PATH/sys/os/glnxa64 on Linux 64-bit.
Mac OS X
The LD LIBRARY PATH environment variable should be set and the PATH variable must be updated
with the MATLAB binaries directory. For example, for MATLAB2017a:
This will set the environment variables for the current terminal session.
Avizo must be run from this terminal session to enable access to MATLAB librairies.
System Requirements 21
To set these variables for a global environment, please refer to the Mac developer zone.
MATLAB can be used on OSX 10.12 and 10.13 only after deactivation of System Integrity Protection:
Deactivation of System Integrity Protection (http://www.imore.com/el-capitan-system-integrity-
protection-helps-keep-malware-away):
We have detected some incompatibility issues with former versions (< 1.9) of Dell Backup and Re-
covery Application which can make Avizo crash when opening files with the file dialog. Please update
your Dell Backup and Recovery Application to 1.9.2.8 or higher if you encounter this issue.
1.5 Installation
1.5.1 Standard Installation
Follow the instructions below for your operating system.
1.5.1.1 Windows
When the download is finished, double-click on the Avizo installer and follow the instructions. Note
that administrator rights are required.
In the Select Components section, specify the desired installation type:
Installation 22
After selecting the installation type, follow the Avizo installation instructions.
1.5.1.2 Linux
When the download is finished, go to the directory where the Avizo installer is and open a terminal
window.
1. In the command line, enter: sudo ./Avizo-XXX-Linux64-gccYY.bin (XXX denotes the product
version of Avizo and YY the compiler version).
2. Click Next and press Enter.
3. In the Select Destination Folder, choose the Avizo installation destination.
4. In Select Components, choose components:
• Main / Runtime files to install Avizo
• Developer files to install developer files and binaries files for the developer to debug
Note: You must have an Avizo XPand Extension license for this option.
5. Click Next and press Enter to finalize the Avizo installation.
After downloading the application, check that your Security and Privacy settings allow the Avizo
installation. Then, double-click on the Avizo installer and follow the instructions.
In the Installation Type section, you can specify which components you want to install. Default settings
only install the Avizo application on your system. If you check the Avizo Developer Kit, you will also
install developer files. Note: You must have an Avizo XPand Extension license for this option.
After selecting the installation type, click Next to continue the Avizo installation.
1.5.2.1 Windows
1. Open a Windows command prompt (This procedure will not work in a Unix shell).
2. Navigate to the Avizo installer.
Installation 23
3. In the command prompt, enter:
Avizo-XXX-Windows64-VCYY.exe /VERYSILENT /SUPRESSMSGBOXES /NORESTART /NO-
CANCEL /DIR=installPath
Note: XXX denotes the product version of Avizo and YY the compiler version.
1.5.2.2 Linux
With the silent argument, the installer is in silent mode and does not ask you for any confirmation or
question. All needed information is expected in the command line.
Open a terminal and run the Avizo installer with the following command line:
./Avizo-XXX-Linux64-gccYY.bin -- --silent --eula-ok --dir <install dir>
Command line explanations follow.
• Use the double dash -- with no keyword preceding the entire set of arguments.
• If you are in the silent mode, the EULA must be accepted by using mandatory command-line
argument --eula-ok.
• Modify the installation directory with the command-line argument --dir <install dir>, so that
the product is unpacked in the <install dir> / <product> / <version> directory. You can set
absolute path or path relative to installer script location.
• By default, the silent installer only unpacks the runtime of Avizo. For the developer installation,
add command-line argument --dev-install.
There are two main types of licenses: node-locked licenses and floating licenses.
Node-locked licensing allows the software to run on a single, identified computer only.
If you have purchased Avizofloating licenses, one or several concurrent users can run Avizo sessions
at the same time from their computers located on your local network. The number of concurrent users
is given by the number of Avizo tokens purchased. In this case, you must install FlexNet Publisher
license server manager on a local server. Then, on each end user’s computer, you will need to specify
the location of this local licensing server (see FNP license server mode).
Licenses can be time-limited or perpetual. Time-limited licenses are valid until a given date, which is
shown in the product splash screen at start up or in the About dialog (accessible via the Help > About
menu). After this date, Avizo will stop working. This is usually the case for trial licenses, Beta, or for
renewable rented licenses (i.e., yearly subscriptions).
• Use online local activation codes: to activate one or several node-locked licenses on a computer
with an Internet connection
• Use offline local activation codes: to activate one or several node-locked licenses on a computer
with no Internet connection
• Use FNP license server: to specify a license server to activate one or several Avizo (editions
and/or extensions) licenses
When you work in local activation mode, Avizo allows you to manage your licenses. Different actions
are available on depending on the status of your licenses.
Note: An Internet connection is required for all following actions. If you do not have any In-
ternet connection, please refer to the 1.6.3.2 documentation.
When you purchase one or more Avizo (editions and/or extensions) licenses, you should receive an
email from [email protected] containing a set of activation codes for each purchased product
or option.
The Activate button is enabled when the activation codes into the provided text field respect this format:
Once Avizo is activated, you can add other node-locked license to activate new extensions or editions.
To do so:
The Activate button is enabled when the activation codes into the provided text field respect this
format:
<EntitlementId> [<HostId>] <ProductName>_<ProductVersion> .
HostId is optional.
After activating a node-locked license on a computer, you may wish to move it to a new one. To do
so, you first need to de-activate the first license by returning the associated activation code and then
activate it again on the new computer.
To do so:
When a new version of Avizo is released, a dialog is displayed if the activation process was used
for a previous version after installing and launching the new Avizo version. It offers several choices,
including an Upgrade Local Licenses option (see Figure 1.6).
If the licensed modules are under maintenance, they will be immediately available for use after the
upgrade process.
Note: The previous version can still be used on the same computer even after upgrading to the new
version.
Reactivating a License
When you use a renewable license (i.e., through a subscription agreement), Avizo will stop working
when the license expiration date is reached.
When you launch a new session of Avizo, an error dialog is displayed with several choices, including
a Reactivate option.
As soon as you have renewed your subscription, you can re-activate your node-locked license to allow
Avizo to run again for a new period of time.
• On the first page of the Activation Wizard, select Use local activation codes and click on Next.
• On the Activate Demo Licenses page, simply copy and paste your activation codes into the
provided text field and press Activate.
The Activate button is enabled when the format of activation code into the provided text field respect
this format:
<EntitlementId> [<HostId>] <ProductName>_<ProductVersion> .
HostId is optional.
A connection to the online activation server will start immediately. When activation is complete, the
product is ready to be used.
When you launch a Beta version for the first time, or if your Beta licenses are expired, the Activation
Wizard is opened at the Configure Beta Version Licensing page.
The Activate button is enabled when the format of activation code into the provided text field respect
this format:
<EntitlementId> [<HostId>] <ProductName>_<ProductVersion> .
HostId is optional.
A connection to the online activation server will start immediately. When finished, the product is ready
to be used.
Figure 1.9: License Manager - Demo Activation Wizard - Activate Demo Licenses
In offline activation mode, you will be able to perform the same actions described in 1.6.3.1, but
without any Internet connection.
Note: Access to a computer with an internet connection will be required.
Figure 1.11: License Manager - Beta Activation Wizard - Activate Beta Licenses
When you purchase one or more Avizo licenses (i.e., editions and/or extensions), you should receive
The Next button is enabled when the path of XML request file is specified. The format of activation
code uses the following template:
<EntitlementId> [<HostId>] <ProductName>_<ProductVersion> .
HostId is optional.
The next page (see Figure 1.13) explains the remaining steps to perform before completing the offline
activation request:
When activation is complete, the product is ready to be used and the license manager displays
information related to the activation.
Once Avizo is activated, you can add other node-locked license to activate new extensions or editions.
To do so:
• Select Help > License Manager and click Activate Additional Extensions or Editions (see
Figure 1.15).
• The license manager wizard is opened and displays the page Activate Licenses (see Figure 1.12).
Copy and paste your activation codes into the provided text field and specify a path to an XML
file that will contain your offline activation request.
• Then click Next and follow the displayed instructions (listed also in the 1.6.3.2 section).
The Next button is enabled when the path of XML request file is specified. The format of activation
code uses the following template:
<EntitlementId> [<HostId>] <ProductName>_<ProductVersion> .
HostId is optional.
After activating a node-locked license on a computer, you may wish to move it to a new one. To do
so, you first need to deactivate the first license by returning the associated activation code and then
When a new version of Avizo is released, a dialog is displayed if the activation process was used
for a previous version after installing and launching the new Avizo version. It offers several choices,
including an Upgrade Local Licenses option.
After clicking Upgrade Local Licenses, a dialog will open (see Figure 1.18), allowing you to select the
licenses you want to upgrade and the path to the XML file that will contain your offline upgrade request.
Click Next to display the offline instructions dialog (also listed in the 1.6.3.2 section). Once the import
of the upgrade request has been performed (and if the licensed modules are under maintenance), the
selected licenses will be upgraded and the new version of Avizo can be used immediately.
Note: The previous version can still be used on the same computer even after upgrading to the new
version.
Reactivating a License
When you use a renewable license (i.e., through a subscription agreement), Avizo will stop working
Click Reactivate Local Licenses to open the License Manager dialog box (see Figure 1.19) and
select the licenses you want to activate plus the path to the XML file that will contain your offline
reactivation request (see Figure 1.20). Click Next to display the offline instructions dialog (also listed
in the 1.6.3.2 section). Once the import of the reactivation request has been performed (and if you
have renewed your subscription), the selected licenses will be reactivated and the new version of
Avizo can be used immediately for a new period of time.
The Next button is enabled when the path of XML request file is specified. The format of activation
code uses the following template:
<EntitlementId> [<HostId>] <ProductName>_<ProductVersion> .
HostId is optional.
• Click Next to display the offline instructions dialog (also listed in the 1.6.3.2 section).
Once the import of the activation request has been performed, the product is ready to be used.
When you launch a Beta version for the first time or if your Beta licenses are expired, the Activation
Wizard will open on the Configure Beta Version Licensing page.
• You must select Use offline activation codes and click Next (see Figure 1.23).
• On the Activate Beta Licenses page, simply copy and paste your activation codes into the pro-
vided text field and specify a path to an XML file that will contain your offline activation request
(see Figure 1.6.3.2)
The Next button is enabled when the path of XML request file is specified. The format of activation
code uses the following template:
<EntitlementId> [<HostId>] <ProductName>_<ProductVersion> .
HostId is optional.
Figure 1.22: License Manager - Demo Activation Wizard - Activate Demo Licenses Offline
• Click Next to display the offline instructions dialog (also listed in the 1.6.3.2 section).
Figure 1.23: License Manager - Beta Activation Wizard - Configure Beta Version Licensing Offline
Figure 1.24: License Manager - Beta Activation Wizard - Activate Beta Licenses Offline
1. Install FlexNet Publisher license server manager on a local server of your LAN
2. Activate your Avizo licenses on this license server
3. Configure each Avizo instance on local computers to use this license server
Refer to the following website to install a FlexNet license server and manage floating licenses,
including activation, upgrade, reactivation, and return:
www.fei-software-center.com/flexnet-server-doc/
At Avizo startup, select the Activate option and then Use FNP license server on the first page of the
Activation Wizard.
You will need to specify the name of the FNP license server. Optionally, you can specify a port number
with a separator ”:” (<ServerName>:<PortNumber>). Using a specific port number depends on the
way the server is configured. In such a case, please contact your server license administrator for more
information about the FNP license server configuration and the potential need to indicate a specific
port number.
A connection to the FNP license server will start immediately. When done, the product is ready to be
used.
Note: It is possible to test the connection to the specified server using the Test button.
Reconfigure
You can change your configuration mode at any time, but this action requires that you restart the
application.
To do so (in local activation mode), select Help > License Manager and click on the Reconfigure
Licensing button.
When Avizo is running, you can see the activated licenses on your computer.
Select Help > Show Available Extensions.
Note: One activation code can activate several licenses.
When using Avizo activation codes, please deactivate them before any of the following operations:
• Uninstalling Avizo
• Reinstalling or replacing the operating system
• Replacing the hard drive
• Disposing of the system
Otherwise, you will not be able to reactivate them on another system since they will still be active on
the original system, and it will be difficult or impossible for you to deactivate them for a transfer.
To deactivate Avizo, please read the following instructions according to your licensing mode: online
or offline.
To use node-locked and floating licenses at the same time, you need to:
To do so:
• Select Activate option from the License Manager dialog (see Figure 1.1),
In the case where the application is already configured for server licensing and the application can be
launched, you need to go in the menu Help > License Manager, select Reconfigure and do the steps as
indicated above.
If you have an Internet connection and encounter the error ”Unable to connect to server https” when
trying to activate a license, it originates from your firewall configuration.
You need to configure your firewall to allow the connection to the online activation server:
• Server: vsg3d.flexnetoperations.com
• IP: 64.14.29.85
• Port: 443 (https)
If an error occurs during Avizo activation, you can find more details in the licensing events log.
However, most likely you will need to send it to the technical support team for analysis (Help >
Online Support menu).
This log file details all activation actions and licensing information only when an error occurs.
If the VSG LICENSE DEBUG environment variable is set to a file name, licensing debug output is
written to the specified file when Avizo is launched. You can open and read this debug file yourself.
Note: For using a license debug filename as indicated below, you need sufficient privileges to write
into the Avizo installation directory. Otherwise, set VSG LICENSE DEBUG to a path where you can
write files. For example, /home/<your login name>/debug.txt, or C:\Temp\debug.txt.
You can set the environment variable via the Control Panel for Windows or you can set it in a
command prompt on all platforms.
1. On Windows you can get to a command prompt via the Windows Start menu as follows:
Start > Programs > Accessories > Command Prompt
2. In the command prompt window, type:
set VSG LICENSE DEBUG=debug.txt
3. Change the current directory to where your Avizo executable is. For example:
cd C:\Program Files\Avizo2019\bin\arch-Win64VC12-Optimize
4. Run Avizo as follows:
Avizo.exe
1. On Linux and Mac OS X systems, the exact command to use for setting environment variables
depends on the kind of shell you are using. Here are examples for a few commonly used shells.
Bash shell:
export VSG LICENSE DEBUG=debug.txt
C shell:
setenv VSG LICENSE DEBUG debug.txt
2. In the window in which you set the environment variable, change to the Avizo installation di-
rectory. For example:
cd /opt/Avizo2019
3. Run Avizo as follows:
bin/start
The License Manager uses the Unique Machine Number (UMN) to validate the identity of the machine
that initiated the request. The Unique Machine Number value is retrieved from your system hardware
information, or from hypervisor-controlled information for virtual machines. If your system hardware
is modified since the original activation, the UMN of your machine can be changed and the License
Manager will consider your machine to be a different machine. Consequently, the following error
message may appear:
”Trying to return a fulfillment issued to a different machine.”
If this error message occurs, contact Technical Support for assistance. Section 1.8 (Contact and Sup-
port).
• Avizo
• Getting Started with Image Processing and Analysis - the basics for 3D image process-
ing
• Distribution of distance between 2 phases - measuring a catalyst
• Separation, Measures and Reconstruction - advanced pore reconstruction
• Granulometry - distribution of pore diameters
Avizo technical support can be contacted using the Online Support item in Avizo Help menu or using
the contact information in Section 1.8 (Contact and Support). Thermo Fisher Scientific technical
support is dedicated to customers having purchased or renewed a maintenance contract. To speed up
the management of your questions, please don’t forget to provide the license number or license file of
your Thermo Fisher Scientific product, the platform where you use it, and depending on your issue,
a log file (VSG LICENSE DEBUG export, Help/SystemInformation for Avizo), images and a small
sample project.
If you are evaluating Avizo, do not hesitate to contact your support application engineer or sales rep-
resentative to assist you in learning how Avizo can help you.
Thermo Fisher Scientific also provides trainings and consulting services.
Hotline requests
Phone: +33 556 13 37 71
Fax: +33 556 13 02 10
Email: [email protected]
Getting Started
The following text has the form of a short step-by-step tutorial. Each step builds on the steps described
before. We recommend that you read the text online and carry out the instructions directly on the
computer. Instructions are indicated by a dot so you can execute them quickly without reading the
explanations between the instructions.
• Run Avizo Lite Edition from the start menu for the Avizo Lite Edition for Scientific Visualization
• Run Avizo from the start menu for the Avizo for Materials Science
• On a Windows system, select the Avizo or AvizoLite icon from the start menu.
• On a Unix system, start Avizo or AvizoLite by launching the script bin/start.
• On a Mac OS X system, select the Avizo or AvizoLite icon from the Application menu.
When Avizo is running, a window like the one shown in Figure 2.1 appears on the screen. This Start
Figure 2.1: The AvizoStart page
1. Recent Data: allows opening data using Open Data button and displays all data recently
opened (at first start, this section is empty).
2. Recent Project: allows opening project using Open Project button and displays all project
recently opened (at first start, this section is empty).
3. Create New Project: allows creating a new project using Blank Project button.
4. Help: contains some links to help of Avizo.
5. News: contains some news on Avizo.
6. Follow us: contains some links to follow Avizo community.
7. Workrooms toolbar: provides quick access to some important workrooms. See specific docu-
mentation of workroom toolbar.
When switching to Project workroom, a window like the one shown in Figure 2.2 appears on the
screen. The user interface is divided into three major regions.
1. The Project View will contain small icons representing data objects and modules.
2. The Properties Area displays interface elements (ports) associated with Avizo objects.
3. The 3D viewer window displays visualization results, e.g., slices or isosurfaces.
You can also activate the help browser by pressing F1, selecting User’s Guide from the Help menu, or
by typing help in the console window.
After selecting this menu item, the file dialog appears (see Figure 2.3). By default, the dialog displays
the contents of the directory defined in the environment variable AVIZO DATADIR
If no such variable exists, the contents of Avizo’s demo data directory are displayed. You can quickly
switch to other directories, e.g., to the current working directory, using the directory list located in the
upper part of the dialog window.
At the top of the Project View is an Open Data button which is a shortcut to the File/Open Data dialog.
You may use it for opening data files in the tutorials that follow. However, the tutorials will instruct
you to use the File/Open Data command.
Avizo is able to determine many file formats automatically, either by analyzing the file header or the
file name suffix. The format of a particular file will be printed in the file dialog right beside the file
name.
Now, we would like to load a scalar field from one of the demo data directories contained in the Avizo
distribution.
• Change to the directory data/tutorials, select the file chocolate-bar.am and press
Open.
The data will be loaded into the system. Depending on its size this may take a few seconds. The file
is stored in Avizo’s native Avizo format. The file chocolate-bar.am contains 3D image data of
Loading Data 55
Figure 2.3: Data sets can be loaded into Avizo using the file browser. In most cases, the file format can be determined
automatically. This is done by either analyzing the file header or the file name suffix.
a chocolate bar. The data represents a series of parallel 2D image slices across a 3D volume. Once it
has been loaded, the data set appears as a green icon in the Project View. In the following, we call this
data set ”chocolate-bar data set”.
• Click on the green data icon with the left mouse button to select it.
This causes some information about the data record to be displayed in the Properties Area (Figure 2.4).
In our case, we can read off the dimensions of the data set, the primitive data type, the coordinate type,
as well as the voxel size. To deselect the icon, click on an empty area in the Project View window. You
may also pick the icon with the left mouse button and drag it around in the Project View.
Figure 2.4: Data objects are represented by green icons in the Project View. Once an icon has been selected information about
the data set such as its size or its coordinate type is displayed in the Properties Area.
Loading Data 56
Clicking on an object typically causes additional buttons to be displayed in the button area at the top of
the Project View. These buttons are convenience buttons allowing easy one-click access to the modules
most frequently used by the selected object. The tutorials, however, will have you access modules via
the menu interface to help familiarize you with the organization of modules within Avizo.
Further information about particular editors is provided in the user’s reference manual.
• Right-click on the green data icon. Choose the entry called Bounding Box.
After you release the mouse button, a new Bounding Box module is created and is automatically
connected to the data object. The Bounding Box object is represented by a yellow icon in the Project
View and the connection is indicated by a gray line connecting the icons. At the same time, the graphics
output generated by the BoundingBox module becomes visible in the 3D viewer. Since the output is
not very interesting, in this case we will connect a second display module to the data set:
• Choose the entry called Ortho Slice from the popup menu of the chocolate bar data set.
Invoking Editors 57
Figure 2.5: In order to attach a module to a data set, click on the green icon using the right mouse button. A popup menu
appears containing all modules which can be used to process this particular type of data.
Now a 2D slice through the chocolate bar is shown in the viewer window. Initially, a slice oriented
perpendicular to the z-direction and centered inside the image volume is displayed. Slices are num-
bered 0, 1, 2, and so on. The slice number as well as the orientation are parameters of the Ortho Slice
module. In order to change these parameters, you must select the module. As for the green data icon,
this is done by clicking on the Ortho Slice icon with the left mouse button. By the way, in contrast to
the Bounding Box, the Ortho Slice icon is orange, indicating that this module can be used for clipping.
Now you should see various buttons and sliders in the Properties Area, ordered in rows. Each row
represents a port allowing you to adjust one particular control parameter. Usually, the name of a port
is printed at the beginning of a row. For example, the port labeled Slice Number allows you to change
the slice number via a slider.
By default, Ortho Slice displays slices with xy orientation, i.e., perpendicular to the z-direction. How-
ever, the module can also extract slices from the image volume perpendicular to x- and y-direction.
• Select different buttons of the Orientation port of the Ortho Slice module.
• Rotate the object in a more general position.
• Disable the adjust view toggle in the Options port.
• Change the orientation using the Orientation port again.
• Choose different slices using the Slice Number port or directly in the viewer with the interaction
mode described above.
Figure 2.7: The Ortho Slice module is able to extract arbitrary orthogonal slices from a regular 3D scalar field or image volume.
Each display module has a viewer toggle by which you can switch off the display without removing
the module. This button is just to the right of the colored bar where the module name is shown, as
• Deactivate and activate the display of the Ortho Slice or Bounding Box module using the viewer
toggle.
If you want to remove a module permanently, select it and choose Remove Object from the Project
View menu. Choose Remove All from the same menu to remove all modules.
• Remove the Bounding Box module by selecting its icon and choosing Remove Object from the
Project View menu.
• Remove all remaining modules by choosing Remove All Objects from the same menu.
Now the Project View should be empty again. You may continue with the next tutorial.
Data Import 61
Finally, in case of images or regular fields with uniform coordinates, you may also read binary raw
data. Note that for raw data the dimensions and the bounding box of the data volume must be entered
manually in a dialog box which pops up after you have selected the file in the file browser.
Data Import 62
Chapter 3
Avizo provides extensive support for importing, visualizing, and processing 2D and 3D images. For
an overview of related features, please refer to the section 1.2. The tutorials in this chapter introduce
the following topics:
1. Using the File/Open Data... browser and setting the file format.
2. Reading 3D image data from multiple 2D slices.
3. Setting the bounding box or voxel size of 3D images.
4. The Stacked Slices file format.
5. Working with Large Disk Data.
Example:
• Files containing the string Avizo in the first line are considered Avizo files.
• Files with the suffix .stl are considered STL files.
If automatic file format detection fails, e.g., because some non-standard suffix has been used, the
format may be set manually using the File/Open Data As... dialog.
• Enter 1 in the first, second, and third text field of the Voxel Size port.
• Click OK.
This method will always create a data set with uniform coordinates, i.e., uniform slice distance. In
case of variable slice distances, the StackedSlices format should be used.
• # Avizo Stacked Slices is an optional header that allows Avizo to automatically deter-
mine the file format.
• pathname is optional and can be included if the pictures are not in the same directory as the
description file. A space separates the tag ”pathname” from the actual pathname.
• On Windows systems, pathname should still be specified with / and not \.
• pixelsize is optional, too. The statement specifies the pixel size in x- and y-directions. The
bounding box of the resulting 3D image is set from 0 to pixelsize*(number of pixels-1).
• picture1.tif 10.0 is the name of the slice and its z-value, separated by a space character.
• end indicates the end of the description file.
• Comments are indicated by a hash-mark character (#).
The data will be displayed in the Project View as a regular green data icon. The info line indicates that
it belongs to the data class HxRawAsExternalData.
This retrieves a down-sampled version of the data. Disconnect the grain.view data icon from
the Extract Subvolume module by selecting NO SOURCE in the Master port of grain.view, and
use it as an overview (e.g., with Ortho Slice). Selecting NO SOURCE in the DATA port of Extract
Subvolume doesn’t disconnect grain.view from Extract Subvolume
• Selecting the Extract Subvolume module in the Project View and deselect the subsample check
box.
• Use the dragger box in the viewer to resize the subvolume.
• Press the Apply button.
• Attach an Isosurface module to the grain2.view (set threshold set to 100).
• Press Apply.
Although you will most likely not notice any difference with the small image data used in this tutorial,
this method for retrieving large data significantly accelerates the Apply operation.
or microscopy data, using a limited amount of memory. It is possible to convert original data of the
following types: Avizo, RawData, and StackedSlices (stacks of SGI, TIFF, GIF, JPEG, BMP, PNG,
JPEG2000, PGX, PNM, and RAS raster files). LDA data allows subvolume extraction to display parts
of the volume, or multi-resolution access to have a full subsampled view or accurate refined local
views.
Note: in standard, Avizo can support up to 8GB size LDA data. Above 8GB, you will need the Avizo
XLVolume Extension.
In particular, the following topics will be discussed in this tutorial:
4. Out-of-core conversion
5. Displaying an ortho slice, a slice, and a 3D volume
Please follow the instructions below. Each step builds on the step before.
In the Edit menu, select the Preferences item. This opens the AvizoPreferences dialog. Please select
the LDA tab (see Figure 3.6). Using the slider or text field, set the threshold to 10MB. When you load
a file of file size greater than this threshold, the out-of-core data dialog will be displayed.
Note: To see the images as laid out in this tutorial, you should also use the Layout tab of the
Edit/Preferences menu, and toggle on show viewer in top-level window.
Please open the file grain.raw using the File/Open Data... menu (see Figure 3.7). The file is located in
$AVIZO ROOT/data/tutorials/outofcore/ in the Avizo install directory. Its size is 16MB,
above the defined threshold.
The Out-Of-Core data dialog is displayed. Three loading options are displayed (see Figure 3.8):
• Convert to Large Data Access (LDA) format: convert the file to an LDA file, and then load it.
• PRO: This builds a multiresolution file allowing full interactive view or local full resolu-
tion viewing.
• CON: This can be time consuming, with an initial pass and then the true conversion pass.
• Read as External Disk Data: read data blocks from disk, allowing almost continuous disk access.
• PRO: No need to generate an extra file.
• CON: Continuous access to disk. Slow with data sets larger than 4GB.
• Read complete volume into memory: load full data into memory and then access to memory
only.
• PRO: Adapted for average sized data.
• CON: Requires as much RAM as your data set size.
Please select ”Convert to Large Data Access (LDA) format”. Then, on the next dialog (Destination
file), specify the LDA destination file. grain.lda in a temporary folder for instance (see Figure 3.9).
Note: A .lda file can be loaded then, without any conversion required.
Another option allows you to perform conversion in batch mode so you can run other processes while
the conversion is done in the background.
As the input data is raw, please fill in the raw data parameters dialog with information as on the
following figure (see Figure 3.10):
Data type is ”8-bit unsigned”, dimension 256*256*256.
During conversion, the out-of-core conversion progress is showed in the progress bar (see Figure 3.11).
This process is done in two steps. First of all, an initial step, and then the conversion step at about
The converted file is now in the Project View ready to be used and connected to other modules.
Right-click on the data icon in the Project View. In the Display submenu, choose the Ortho Slice
module. Repeat these steps for a Slice and a Volume Rendering. You can also display the bounding
box of the full volume.
In order to view this scene with the same settings, after converting grain.raw into grain.lda (lda
file required, with the right name) please load the project grain.hx (in the same directory
$AVIZO ROOT/data/tutorials/outofcore).
1. orthogonal slices
2. simple threshold segmentation
3. resampling the data
4. displaying an isosurface
5. cropping the data
6. volume rendering
We start by loading the data you already know from Section 2 (Getting Started): a 3D image data set
of a part of a 235 x 175 x 295 CT scan of a chocolate bar.
Visualizing 3D Images 74
Figure 3.12: Project display (viewer and Project View)
• Connect a Bounding Box module to the data (use right mouse on chocolate-bar.am).
• Connect an Ortho Slice module to the data.
• Connect a second and third Ortho Slice module to the data.
• Select Ortho Slice 2 and press xz in the Orientation port.
Visualizing 3D Images 75
• Similarly, for Ortho Slice 3, choose yz orientation.
• Rotate the object in the viewer to a more general position.
• Change the slice numbers of the three Ortho Slice modules in the respective ports or directly in
the viewer as described in the section Getting Started.
Figure 3.13: Chocolate bar data set visualized using three orthogonal slices.
In addition to the Ortho Slice module, which allows you to extract slices orthogonal to the coordinate
axes, Avizo also provides a module for slicing in arbitrary orientations. This more general module is
called Slice. You might want to try it by selecting it from the Display submenu of the chocolate bar
data popup menu.
Visualizing 3D Images 76
3.2.2 Simple Data Analysis
The values of the Colormap port of the Ortho Slice module determine which scalar values are mapped
to black or white, respectively. If you choose a range of e.g., 30...100, any value smaller or equal to
30 will become black, and all pixels with an associated value of more then 100 will become white.
Try modifying the range. This port provides a simple way of determining a threshold, which later can
be used for segmentation, e.g., to separate background pixels from other structures. This can be most
easily done by making the minimum and maximum values coincide.
A more powerful way of quantitatively examining intensity values of a data set is to use a data probing
module Point Probe or Line Probe. However, we will not discuss these modules in this introductory
tutorial.
A new green data icon representing the output of the resample computation named chocolate-
bar.Resampled is created. You can treat this new data set like the original chocolate bar data. In
the popup menu of the resampled chocolate bar you will find exactly the same attachable modules and
you can save, export and load it like the original data.
You may want to compare the resampled data set with the original one using the Ortho Slice module.
You can simply pick the black line indicating the data connection and drag it to a different data source.
Whenever the mouse pointer is over a valid source, the connection line appears highlighted in gray.
Visualizing 3D Images 77
Figure 3.14: By adjusting the data window of the Ortho Slice module a suitable value for threshold segmentation can be found.
Intensity values smaller than the min value will be mapped to black, intensity values bigger than the max value will be mapped
to white.
Visualizing 3D Images 78
Figure 3.15: Chocolate bar data set visualized in 3D using an isosurface.
Visualizing 3D Images 79
Figure 3.16: The crop editor works on uniform scalar fields. It allows you to crop a data set, to enlarge it by replicating boundary
voxels, or to modify its coordinates, i.e., to scale or shift its bounding box.
A new window pops up. There are two ways to crop the data set. You can either type the desired
ranges of x, y, and z coordinates into the crop editor’s window or put the viewer into interaction mode
and adjust the crop box using the green handles directly in the viewer window.
The new dimensions of the data set are given in the Properties Area. If you want to work with this
cropped data record in a later sessions, you should save it by choosing Save Data As ... or Export Data
As ... from the File menu.
As you already might have noticed, the crop editor also allows you to rescale the bounding box of the
data set. By changing the bounding box alone, no voxels will be cropped. You may also use the crop
editor to enlarge the data set, e.g., by entering negative values for the Min index fields. In this case, the
first slice of the data set will be duplicated as many times as necessary. Also, the bounding box will be
updated automatically.
Visualizing 3D Images 80
3.2.6 Volume Rendering
Volume Rendering is a visualization technique that gives a 3D impression of the whole data set without
segmentation. The underlying model is based on the emission and absorption of light that pertains to
every voxel of the view volume. The algorithm simulates the casting of light rays through the volume
from pre-set sources. It determines how much light reaches each voxel on the ray and is emitted or
absorbed by the voxel. Then it computes what can be seen from the current viewing point as implied
by the current placement of the volume relative to the viewing plane, simulating the casting of sight
rays through the volume from the viewing point.
By default, emission-absorption volume rendering is shown. The amount of light being emitted and
absorbed by a voxel is taken from the color and alpha values of the colormap connected to the Volume
Rendering module. In our example the colormap is less opaque for smaller values. You may try to set
the lower bound of the colormap to 0 or 900 in order to get a better feeling for the influence of the
transfer function.
The module Volren is the latest addition to volume rendering in Avizo and takes full advantage of the
capabilities of modern graphics boards.
The Volren module provides several visualization techniques: shaded and classical texture-based vol-
ume rendering (VRT), maximum intensity projection (MIP), and digitally reconstructed radiograph
(DRR). The standard VRT and its shaded version enable a direct 3D visualization with flexible color
Visualizing 3D Images 81
Figure 3.17: The Volume Rendering module can be used to generate volume renderings based on an emission-absorption model.
and transparency colormaps with virtual lighting effects for better rendering of complex spatial struc-
tures and enhancing fine detail. The MIP rendering allows the visualization of the highest or lowest
intensity in a data volume along the current line of sight. The DRR simulates a radiograph display
from arbitrary views using the loaded volume data. Furthermore, the Volren module enables you to
render segmented regions at the same time with different colormaps. A LabelField can be attached
to the Volren and each material of the label list can be rendered separately. In order to optimize the
performance, the image volumes are represented at lower resolution when the rendering is done inter-
actively. For relatively large image volumes, you can also switch to a constant ”Low Resolution” mode
(see below). Volren is built for use with popular graphics accelerator technology such as the NVIDIA
Quadro FX graphics boards.
• Remove all objects in the Project View other than the chocolate-bar.am data record.
• Connect a Volren module to the data.
• Select the data icon and read off the range of data values printed on the first info line
Visualizing 3D Images 82
Figure 3.18: Lighting computation are applied to the volume rendering, resulting in an easier to understand representation.
(410...1910).
• Select the Volren module and enter the range in the Colormap port.
• On some systems, a significant slowdown can occur if the data set is larger than the available
texture memory (which is typically 4 - 16 MB). In this case, select the option LowRes only (see
below).
• When two or more Volren modules are used to render intersecting volumes (multivolume render-
ing), some rendering inaccuracies may occur. In case of multivolume rendering, the supported
combinations of modes are one MIP together with one MIP or one VRT with one VRT (see
below Mode). Other modes and combinations may lead to incorrect visual results.
• The Apply button is enabled only when the rendering must be recomputed.
Visualizing 3D Images 83
Figure 3.19: The Volren module can be used to generate maximum intensity projections as well as volume renderings based on
an emission-absorption model.
Visualizing 3D Images 84
3.2.6.3 Comparisons between Volren, Voltex and Volume Rendering modules
The Volume Rendering module has been developed to take advantage of modern graphics hardware.
Rendering may fail on old generation graphics hardware. In some cases this can be solved by updating
the graphics driver. Otherwise the Volren or the Voltex module can be tried alternatively. Comparisons
between the three modules are given into Figure 3.20.
Visualizing 3D Images 85
Features Voltex module Volren module Volume Rendering module
(deprecated)
Mouse Picking No No Yes
Isosurface Rendering No No Yes (separate module)
Voxelized Rendering No No Yes (separate module)
Not supported for Physical render-
ing
DDR Rendering No Yes No
simulated Digitally Reconstructed
Radiograph
MIP Rendering Yes Yes Yes
Maximum Intensity Projection
Physically Based Lighting No No Yes
Lighting and Shade effects No Yes Yes
Diffuse, Specular Diffuse, Specular, Enhanced,
Edge, Boundary, Ambient,
Deferred, High Quality
User-defined light coefficients No Yes No
Light angle control No Yes Yes
Port Shading: User-defined Menu View / Light
to create custom light and
deactivate headlight
Cast shadows No No Yes
Multi-Channel Field input Yes No Yes
Color Field input (RGBA) Yes Yes Yes
Label field secondary input and No Yes No
per-label colormap
Label colormap support (cy- No No Yes
cling, no interpolation)
Multi-Volume support Limited Yes Yes
Support for data larger than Yes Yes Yes
graphics memory Very limited bricking Full resolution when still, Progressive adaptive resolution,
with uniform resolution Low resolution during interaction limited by memory threshold
Support for data larger than the No No Yes
main memory (RAM) converting data into LDA format
LDA format support No No Yes
Large Data Access for progressive
loading, instant preview,
quick extract from out-of-core
data
ROI Box: Region of Interest Yes Yes Yes
Custom ROI No Yes Yes
Corner Cut: exclusion corner ROI Box for Volume Rendering:
exclusion box, fence, cross, sub-
volume
Hardware Support Old graphics boards Modern graphics boards with up- Modern graphics boards with up-
dated driver (e.g. NVIDIA dated driver (e.g. NVIDIA
Quadro) Quadro).
Requires support for advanced
shaders
Requires high-level OpenGL fea-
tures that
may be unavailable or buggy on
specific graphic cards,
consider using Voltex as an alter-
native
To create a Voltex from the Con-
sole, type command:
create HxVoltex
Figure 3.20: Comparisons between Volren, Volume Rendering and Voltex modules
Visualizing 3D Images 86
3.3 Combined 3D and 2D views with Ortho Views (Avizo)
This tutorial requires an Avizo license (Avizo Lite Edition license is not sufficient).
In this tutorial, you will learn the basics to efficiently visualize and examine 3D images with Avizo:
You may use this tutorial as a quick start for visualizing and manipulating 3D images with Avizo.
However, you should be familiar with the basic concepts of Avizo to take full advantage of this tutorial.
In particular, you should be able to load files, to interact with the 3D viewer, and to connect modules to
data modules. All these issues are discussed in Avizo chapter 2 - Getting started. To complement this
tutorial, you may also review section 3.2 (Visualizing 3D images) of Avizo Lite Edition about basic
3D image visualization techniques.
You can now try some interaction. You can refer to Section 2 (Getting Started) in 3D navigation with
viewer windows.
• In the 2D viewers, you can zoom by dragging the mouse with the left button pressed, or pan the
view with the middle mouse button. For this, the mouse cursor shape should be a magnifying
glass icon, otherwise press the [ESC] key or use a toolbar button to switch to viewer navigation
mode.
• In the 3D viewer, you can rotate the view. For this, the mouse cursor shape should be a hand
icon, otherwise press [ESC] key or use a toolbar button to switch to viewer navigation mode.
• In the Properties panel of the Ortho Views module, you can drag the sliders controlling the slice
number.
• You can alternatively pick crosshair lines in the 2D views to move the corresponding slices. For
this, you may need to switch to pick interaction mode by pressing the [ESC] key or pressing
viewer toolbar button Interact.
1. an Ortho Views managing the display of three orthogonal slices in a 4-viewers window layout.
The next section describes it in more details.
2. a Intensity Ranges Contours overlay module displaying over the orthogonal slices a set of con-
tours corresponding to intensity levels defined by Intensity Range Partitioning, a concept ex-
plained later in this chapter.
3. a Volume Rendering module displaying the 3D image in the top-left viewer window.
4. an Isosurface Rendering module, initially invisible in the viewer windows.
• In the Properties panel, click on the clip button (the little cube split by a blue line, see Figure
3.23) of the Slice Number Z ports of the Ortho View (if the slider is not visible in Properties
panel, select the Ortho Views module in the Project View). You will then see a cut in the 3D
volume rendering representations (see Figure 3.24).
• Move the Z slice by any means explained above and see the updated 3D view.
• Rotate the 3D view (see above about navigation). The clipped side is always facing the camera.
Note that this is as specific feature of Ortho Views, in contrast with the standard behavior for
clipping planes in other slice modules in Avizo.
Visibility of slices in the 2D and 3D viewers can be controlled in the standard way with Avizo by
clicking on the orange square buttons in the icon in Project View, or beside the module title in the
Properties panel. See chapter 10.1.9 about in Project Views.
• You can hide slices, intensity ranges contours, and crosshair, and show volume rendering, as
shown in Figure 3.25. You will need to use visibility buttons of Ortho Views, Bkg Properties,
Intensity Ranges Contours and Volume Rendering modules as shown in Figure 3.26.
Going further: here are some more hints for using Ortho Views, see the related reference help for
more details.
• To quit Ortho Views mode, you can simply delete the Ortho Views module. You can also click
on the viewer toolbar button to set the active viewer (with white frame) as Single Viewer. Ortho
Views is then still active: click again on Single viewer button to cycle through the different
viewers, and press the Four viewer button to restore the Ortho Views layout.
• Overlay representations can be combined with images slices, as illustrated by the Intensity
Ranges Contours of the Ortho Views Template described earlier in this chapter. You can also
control the display ordering of overlays by the Layer order port of the Bkg Properties module
Note: There can only be one Ortho View in use in the Project, so you can’t attach a second Ortho
View from a data object menu. It is, however, possible to change data visualized by Ortho View by
changing the connection from one image to another. For this, you can either drag the connection line in
the Project Graph View, drag the Ortho Views icon to another data item, or change the data connection
port in the Properties panel.
Whereas, in CT scans of industrial parts, intensities may differentiate materials such as:
Avizo’s Intensity Range Partitioning tools let you define ranges so that visualization and computation
modules can take advantage of this pre-defined identification. Intensity Range Partitioning is used at
several locations in Avizo. For example, it allows adjusting the range depicted by a port to a particular
• Let’s start from scratch and create a new Project (choose New Project in the File menu).
• Select the entry Preferences in the Avizo Edit menu, and make sure that Intensity Range Parti-
tioning options are set according to the defaults shown on Figure 3.28: automatic guess of two
material densities in the loaded image data (i.e., void and solid ranges/regions in the intensities
scale).
• Load the file motor.am located in subdirectory data/tutorials of Avizo installation di-
rectory.
• Attach a Volume Rendering to the data: right-click on the green data icon appeared in the Project
View, click on Volume Rendering and press on Create, see Figure 3.29
As outlined in section 3.2 (Visualizing 3D images), the Volume Rendering module displays the inten-
sities of input data voxels with color and opacity depending on the colormap port. With colormaps
like the default (volrenWhite.am), the voxels with intensity values below the lower bounds (less than
the minimum) of the colormap port are fully transparent, see Figure 3.30. Changing this minimum is
an easy way to filter out parts of the 3D volume image that are void or low density materials. Here the
colormap bounds have been set according to Intensity Range Partitioning presets on data as explained
below.
• Select the Volume Rendering module in the Project View and view its colormap port in the
Properties panel (see Figure 3.31).
• Change the minimum boundary in the colormap port: the Volume Rendering is adjusted accord-
ingly. Tip: Use the virtual slider to change value continuously: hold down the Shift key while
you click and drag the mouse in the numerical text field.
Intensity Range Partitioning intends to provide presets matching to some intensity ranges. This ranges
can be easily selected to display a given data set. Avizo can automatically guess thresholds separating
different densities of phases or materials by analysing the intensity distribution histogram of the input
data. In the example above, Avizo identified an optimal threshold separating void and solid.
• Select the data object motor.am in the Project View and look at the data info in the Properties
panel (see Figure 3.32).
You can see: the actual min-max of data intensities, the data window defining intensity boundaries
for exterior to be hidden and used by the colormap port of the Volume Rendering, and the number of
ranges that have been defined for this data.
• Invoke the Intensity Range Partitioning editor by clicking its toggle button (with an histogram
ruler symbol) beside data title in the Properties panel as shown below. You can see the defined
• Press the Show range distribution button to display the data histogram, separated here in two
regions/ranges as shown in Figure 3.34.
As you can see, separations between phases/materials are found at local minima of the histogram.
Tip: Other tools are available for automatic threshold determination. See Auto Thresholding module.
Note: Intensity Range Partitioning is helpful for making visualizations more easily. For ideal quality
images with respect to the features of interest, that can be enough for quantitative analysis. For accu-
rate identification of different phases/materials, in particular with noise, inhomogeous background or
artifacts, image filtering and segmentation tools may be needed. See the next chapters for more about
image segmentation.
The engine block used in this example is actually made of at least two materials of significantly differ-
ent density and X-ray absorption: aluminum and steel inserts.
Modify the Intensity Range Partitioning as follows:
• Set the Number of ranges to 3, and press Detect. You can see a new slider port and an updated
histogram with a new region/range as shown on Figure 3.35.
More hints:
• In the Preferences, you can disable Intensity Range Partitioning, if you wish, to get the behavior
of the previous Avizo’s version and use the default range for data min-max (or Data Window if
defined as data parameter).
• You can use the Preferences to set a number of phases/materials to be detected in your data.
Keep in mind that detection relies on the shape of the image histogram. Avizo can automatically
guess the number of ranges that may be detected, but you may prefer to override this if Avizo
fails to find the expected ranges.
• All modules using colormaps or range slider ports such as Isosurface can take advantage of
Intensity Range Partitioning.
• Tip: The data window and ranges are defined as persistent data parameters when you save your
data to an Avizo format (see Section 10.2.7 Data parameters).
Segmentation of 3D Images 98
images and desired results.
This tutorial introduces each approach and comprises of the following steps:
This will automatically launch the Segmentation workroom thereby replacing the Project View and
Properties panels on the left and the 3D viewer on the right. At the same time and not currently visible,
a new data object will be added to the Project View that will hold the segmentation results. This is
the data object to be saved. By default, the Segmentation Editor operates in four-viewer mode. In
this mode, the three-slice viewer with XY, XZ, and YZ orientations are shown together with one 3D
viewer. Alternatively, single- or two-viewer layouts are possible. In two-viewer layouts (horizontally
stacked or side-by-side) a slice viewer is combined with a 3D viewer while in single viewer mode
one (XY) slice of the image is shown. You can change the orientation of the slice by either selecting
another orientation from the Segmentation / Orientation menu or by clicking Single-viewer in the
viewer toolbar multiple times to cycle the different 2D views (XY, XZ, and YZ) and a 3D view.
The tools of the Segmentation Editor are displayed in the panel where the Project View and Properties
Area are normally displayed.
• Switch to the four-viewer layout by clicking Four viewers in the viewer toolbar.
• In the XY view, use the slider on the bottom to scroll through the slices. Go to slice 30 and you
will see six bright structures.
• If necessary, click - associated with the Zoom Tool in the upper-right corner of the viewer to get
a view of the entire slice.
• Click the brush icon in the Tools area of the Segmentation Editor’s main panel.
• Mark one of the structures with the mouse. Hold down CTRL to deselect incorrect pixels, if
necessary.
• When finished, select Inside in the Materials list. Then click + in the Selection group.
The pixels selected previously are now assigned to material Inside. Right-click Inside in the Materials
list to select a different draw style (e.g., dotted).
Segmentation of 3D Images 99
Figure 3.39: Selecting Two Structures by Using One Slice
• Click the Materials list and select New Material from the right-button menu.
• Mark a second structure using the brush, select the new material in the Materials list, and assign
the pixels to that structure (see Figure 3.39).
• Go to slice 31 and practice by segmenting the same two structures.
Tip: If you prefer to work with one large view rather than four small views, click Single Viewer in
the viewer toolbar. To cycle through each of the four views, click Single Viewer repeatedly. To return
to four-viewer mode, click Four Viewers.
If the changes from slice-to-slice are small, use interpolation.
• Go to slice 30 and mark the top-right structure using the brush. Go to slice 35 and mark the
same structure.
• Select from the menu bar: Selection / Interpolate.
• Scroll through the dataset. You will see that the slices 30 to 35 are now also selected.
• To assign the selected pixels of all slices to the material Inside, select it in the Materials list,
then click + in the Selection group.
• Repeat the procedure between slice 35 and 45.
• Repeat the procedure for one of the left structures.
Tips:
A new panel in the application window shows a similar table. The *.MaterialStatistics object can
be saved to text (*.txt), to comma separated values file (*.csv), or to Micrsosoft XML Spreadsheet
(*.xml).
Note: If Units Management (see Edit / Preferences / Units) is turned off, the physical units of the values
in the volume column are implicit and the voxel size scales objects only within this implicit physical
unit. No physical units are shown in the column headers. In the case of motor.am, the voxel size is
in m. Thus, the numbers given in the Volume column have to be read as m3 . If Units Management is
turned on, the physical units specified as Display units are shown in the column header.
• Clear the Project View area by selecting Project / Remove All Objects from the main menu.
• Load the motor.am data record from the directory data / tutorials.
• Attach a Image Segmentation / Multi-Thresholding module to the data icon and select it.
• Type 85 into the text field of port Exterior-Range1. You may also determine some other thresh-
old that separates exterior and interior as described in the tutorial on Image Data Visualization.
• Click Apply.
With this procedure, each voxel value lower than the threshold is assigned to Exterior and each voxel
value greater than or equal to the threshold is assigned to Inside. However, this may cause voxels to be
labeled that are not part of the object but have voxel values above the threshold. Set the remove couch
option to suppress it, which assures that only the largest coherent area will be labeled as the foreground
(Inside) and all other voxels are assigned to the background (Exterior).
Clicking Apply creates a new data object motor.labels. This data object is a Label Field, has the same
dimensions as motor.am, and contains an Range1 or Exterior label for each voxel according to the
segmentation result.
• Select the motor.labels icon and click Segmentation Editor in the Properties Area.
• In the YZ view, use the slider on the bottom to select slice 206 (see Figure 3.40).
• Select a suitable magnification by clicking the + or - buttons of the Zoom Tool (last tool in the
Tools area).
The image segmentation editor shows the image data to be segmented (motor.am) as well as grey-
ish contours representing the borders between Range1 and Exterior regions as contained in the mo-
tor.labels data object. As you can see, the borders are not smooth and there are small islands bordered
by cyan contours. This is what we want to improve now.
• Select Remove Islands... from the Segmentation menu. In response, a dialog box will appear.
• In the dialog box, select the All slices mode. Then click Highlight all islands to highlight all
islands smaller or equal to 15 voxels.
• Click Apply to merge all islands with the material they are embedded in.
• Then click Close in order to close the Islands Filter window.
• To further clean up the image, select Smooth Labels... from the Segmentation menu. Another
dialog box will appear.
• Select the 3D volume mode and click Apply to execute the smoothing operation.
• Click the Close button to close the Smooth Labels window.
• To examine the results of the filter operations, browse through the label image slice-by-slice. In
addition to the slice slider, you may also use the cursor-up and cursor-down keys for this.
• Return to the Project View using the workroom toolbar.
Prior to segmentation, think about improving image quality and reducing noise in the dataset with:
An advanced Segmentation using the Watershed tool can be found in the Watershed Segmentation
tutorial.
Examples:
Before grabbing images from the microscope’s camera, the light level should be adjusted in such a
way that saturated pixels, either black or white ones, are avoided. Saturated pixels are pixels that are
clamped to either black or white because their actual intensity values are outside the range of rep-
resentable intensities. In any case, saturation means a loss of information and thus prevents proper
post-processing or deconvolution. At the same time, a high background level should be avoided be-
cause it decreases the dynamic range of the imaging system and the deconvolution works worse. This
means that empty regions not showing any fluorescence should appear almost black. A background
level close to zero is especially important when bead measurements are performed in order to extract an
experimental point spread function. Details are discussed is a separate tutorial about bead extraction.
As an example we are going to use a confocal test data set (polytrichum.am) provided with the Avizo
deconvolution modules. The data file is located in the directory AVIZO ROOT/data/deconv.
The data set shows four chloroplasts in a spore of the moss polytrichum commune.
Besides the image data itself, for the standard non-blind deconvolution algorithm a so-called point
spread function (PSF) is also required. The PSF is the image of a single point source, or as a close
approximation, the image of a single fluorescing sub-resolution sphere. PSF images can either be
computed from theory (see below) or they can be obtained from measurements. In the latter case, tiny
so-called beads are recorded under the same conditions as the actual object. This means that the same
objective lens, the same dye and wavelength, and the same immersion medium are used. Typically, the
images of multiple beads are averaged to obtain an estimate of a single PSF. Avizo provides a module
The PSF appears as a bright spot located in the middle of the image volume (Figure 3.41). It is
important that the PSF is exactly centered. Otherwise, the deconvolved data set will be shifted with
respect to the original image. Also, it is important that the PSF fades out to black at the boundaries. If
this is not the case, the black level of the PSF image needs to be adjusted using the Arithmetic module.
Finally, neither the PSF nor the image to be deconvolved should exhibit intensity attenuation artifacts,
i.e., image slices with decreased average intensity due to excessive light absorption in other slices. If
such artifacts are present, they can be removed using the Correct Z Drop module.
Next, select both the PSF and the image data. You’ll notice that the voxel sizes of both objects are not
the same. It is recommended to adjust different voxel sizes of PSF and image data prior to deconvo-
lution using the Resample module. The deconvolution module itself also accounts for different voxel
sizes, but it does so by using point sampling with trilinear interpolation. This is OK as long as the
voxel size of the PSF is larger than that of the image data. However, in our case the voxel size of the
The voxel size option means that the PSF will be resampled on a grid with exactly the same voxel
size as the image data set, which is connected to the Reference port. While the original PSF had a
resolution of 12 x 12 x 30 voxels, the resampled one only has 12 x 12 x 16 voxels. However, the extent
of a single voxel in z-direction is bigger now.
After a suitable PSF has been obtained, we are ready for deconvolving the image data set. This can be
done by attaching a Deconvolution module to the image data.
The actual deconvolution process is started by pressing the Apply button. Please press this button now.
The deconvolution should take about 10 seconds on a modern computer. During the deconvolution,
the progress bar informs you about the status of the operation. Also, after every iteration, a message
is printed in the Avizo console window indicating the amount of change of the data. If the change
seems to be small enough, you can terminate the deconvolution procedure by pressing the Stop button.
However, note that the stop button is evaluated only once between two consecutive iterations.
When deconvolution is finished, a new data set called polytrichum.deconv appears in the Project View.
You might take a look at the deconvolved data by moving the Image Ortho Projections connection line
from polytrichum.am to polytrichum.deconv.
Sometimes bead measurements are difficult to perform, so that an experimental PSF cannot easily be
obtained. In such cases, a theoretical PSF can be used instead. Avizo provides the module Generate
Figure 3.44: The Generate Point Spread Function module calculates theoretical PSFs.
Once you have computed a theoretical PSF, you can perform non-blind deconvolution as described
above. However, for convenience the Deconvolution module is also able to compute a theoretical
PSF by itself. You can check this by disconnecting the Kernel port of the Deconvolution module.
If no input is present at this port, additional input fields are shown, allowing you to enter the same
parameters (numerical aperture, wavelength, refractive index, and microscopic mode) as in PSFGen.
After these parameters have been entered, the deconvolution process again can be started by pressing
the Apply button.
Note that any previous result connected to the Deconvolution module will be overwritten when starting
the deconvolution process again. Therefore, be sure to disconnect a previous result if you want to
compare deconvolution with different input PSFs.
The data set has been recorded using a standard fluorescence microscope under so-called widefield
conditions. It shows a neuron from the alpha-lobe of the honeybee brain. Compared to the confocal
data set used in the standard deconvolution tutorial, alphalobe.am is much bigger. It has a resolution
of 248 x 248 x 256 voxels with a uniform voxel size of 1 micrometer. In the xy-plane of the projection
view the structure of the neuron can be clearly identified. However, the contrast of the image is quite
poor because there is a significant amount of out-of-focus light or haze present. With Avizo’s blind
deconvolution algorithm we can enhance the image data without needing to know an explicit PSF in
advance.
Microscope:
After all parameters have been entered, the deconvolution process can be started. This computation
can take some time. Especially, if you want to deconvolve multiple data sets at once, it is inconvenient
to do this in an interactive session. Therefore, multiple deconvolution jobs can be submitted to the
Avizo job queue and then, for example, processed overnight. This works as follows:
• Press the Setup... button of the Batch Job port. A dialog as shown in Figure 3.46 pops up.
• In the dialog choose a file name under which you want to save the deconvolved data set, e.g.,
C:/Temp/alphalobe-deconv.am.
• Modify the text field, so that check point files are written after every 5 iterations.
Check point files are used to store intermediate results. With the above settings, the decon-
volved data is written into a file after every 5 iterations. Check point files are named like the
final result, but a consecutive number is inserted just before the file name suffix. For example,
if the result file name is C:/Temp/alphalobe-deconv.am, the check point files are named
C:/Temp/alphalobe-deconv-0005.am, C:/Temp/alphalobe-deconv-0010.am and
so on. Now we are ready to actually submit the batch job.
• Press the Submit button of the deconvolution dialog. After a few seconds the Avizo batch job
dialog appears, compare Figure 3.47.
• Select the deconvolution job and press the Start button.
You now have to wait about 20 minutes until the deconvolution job is finished. Once the job queue
has been started, you can quit Avizo. The batch jobs will be continued automatically. If Avizo is
still running when the deconvolution job exits, then the result will be loaded automatically in Avizo.
Otherwise, you have to restart Avizo and load the deconvolved data set manually.
1. Bead measurements
2. Projection Settings View and Projection Settings View Cursor
3. Resampling and averaging the beads
Bead Measurements
The PSF is the image of a single point source recorded under the same conditions as the actual spec-
imen. It can be approximated by the image of a fluorescing sub-resolution microsphere, a so-called
bead. Performing good bead measurements requires some practice and expertise. In order to obtain
good results, the following hints should be obeyed:
1. Use appropriate beads. It is important that the bead size be smaller than approximately 1/2
full width at half maximum (FWHM) of the PSF. Good sources for obtaining beads suitable
for PSF measurements are Molecular Probes ( http://www.probes.com/ ) or Polysciences (
http://www.polysciences.com/ ).
2. The beads must be solid. Besides solid beads, there are also beads with the shape of a spherical
shell, allowing to check the focus plane of a mircoscope. Such beads cannot be used as a source
for PSF generation in the current version of Avizo.
3. Don’t record clusters of multiple beads. Sometimes multiple beads may glue together, appearing
as a single big bright spot. Computing a PSF from such a spot obviously leads to wrong results.
4. Note that beads are not resistant to a variety of embedding media. In particular, beads will be
destroyed in xylene-based embedding media such as Permount (Fisher Scientific) and methyl
salicylate (frequently used to clear up the tissue). As a substitute, you might use immersion oil
instead, which has a refractive index similar to methyl salicylate, for example.
5. Sample and beads should always be imaged as close to the coverslip as possible. When it is not
possible to attach the sample to the coverslip, the beads should also be imaged in a comparable
depth, embedded in the same mounting medium. Imaging the beads with better quality than
the sample will yield a slightly blurred deconvolution result. However, when the PSF used for
deconvolution is too wide, artifacts can arise during deconvolution.
The objective lense should always be selected according to the mounting medium, i.e., if the
sample is attached to the slide and embedded in a buffer of refractive index close to water, a
severe loss of image quality can be expected when using an oil-immersion objective without a
correction collar. Deconvolution of properly imaged data will allways be superior to deconvo-
lution of data suffering from aberrations.
6. Problems occur if the mounting medium remains liquid. In that case, the sample distribution
An example of an image data set containing multiple beads is provided in the file beads.am in the
directory AVIZO ROOT/data/deconv.
The landmarks do not need to be located exactly at the center of a bead. The exact center positions can
be fitted automatically later on.
You can remove incorrect bead positions from the landmark set by invoking the landmark set editor.
In order to activate the editor, select the landmark set object and press Landmark Editor button. If you
want to add additional bead positions to an existing landmark set object, make sure that the master port
of the landmark set object is connected to the Cursor module. Otherwise, a new landmark set object
will be created.
• Make sure that the Data port of Extract Point Spread Function is connected to the bead data set
beads.am. If the landmarks are still connected to the beads via the Projection Cursor and Image
Ortho Projections modules, the connection is established automatically.
The Extract Point Spread Function module provides two buttons called Adjust centers and Estimate
size, which should be invoked in a preprocessing step before the beads are actually extracted.
The first button (Adjust centers) modifies the landmark positions so that they are precisely located in
the center of gravity of the individual beads.
The second button (Estimate size) computes an estimate for the number of voxels of the PSF image
to be generated. This button is only active if no PSF image is connected as a result to BeadExtract.
If there is a result object, the resolution and voxel sizes of the result are used and the port becomes
insensitive.
Any of the actions of the two preprocessing buttons can be undone using the Undo button. This can be
necessary for example if two beads are too close so that no correct center position could be computed.
In general, overlaps between neighboring beads should be avoided. Small overlaps might be tolerated
because during resampling intensities are weighted according to the influence of surrounding beads.
The data type of the resulting PSF will be float, irrespective of the data type of the input image. The
individual beads will be weighted on a per-voxel basis and added to the result. No normalization
will be performed afterwards. You may investigate the resulting PSF image using any of the standard
visualization modules. In Figure 3.50 a volume rendering of the resulting PSF is shown.
In some cases, you may want to average multiple beads recorded in different input data sets. This can
be easily achieved by creating a Landmarks object for each input data set. For the first input data set,
extract the beads as described above. For the other input data set, also use the Extract Point Spread
Function module. However, make sure that the PSF obtained from the first input data set is connected
as a result object to BeadExtract before pressing the Apply button. In order to use an existing PSF as a
result object, connect the Master port of the PSF to Extract Point Spread Function (once this is done
the Resolution and Voxel size ports of Extract Point Spread Function become insensitive, see above).
If an existing result is used, new beads simply will be added into the existing data set. Therefore, data
sets should be scaled in intensity according to their quality prior to bead extraction and summation to
obtain a suitable weighting of the individual extracted beads in the final result.
• 3 working arrays for the non-blind algorithm with no or with fixed overrelaxation
• 5 working arrays for the non-blind algorithm with optimized overrelaxation
• 5 working arrays for the blind algorithm
The number of voxels of a working array is the product of the number of voxels of the input data
set plus the border with along each spatial dimension. The primitive data type of a working array is
a 4-byte floating point number. For example, if the number of voxels of the input data set plus the
border width is 256 x 256 x 256 (as for the alphalobe.am data set in the blind deconvolution tutorial),
each working array will be about 64 MB, irrespective of the primitive data type of the input data set.
Therefore, at least 192 MB (3x4x256x256x256 bytes) are required for non-blind deconvolution with
fixed overrelaxation, and 320 MB (5x4x256x256x256 bytes) for blind deconvolution. Keep this in
mind when configuring the computer on which to perform deconvolution! However, also note that for
most platforms it usually doesn’t make sense to have more than 1.5 GB of main memory. For more
memory, a 64-bit operating system is required.
Finally, it should be mentioned that the deconvolution algorithm can make use of a multi-processor
CPU board. Although you do not get twice the performance on a dual-processor PC, a speed-up of
almost 1.5 can be achieved. By default, Avizo uses as many processors as there are on the com-
puter. If for some reason you want to use less processors, you can set the environment variable
AVIZO DECONV NUM THREADS to the number of processors you actually want to use simultane-
ously.
The following tutorial requires an Avizo license (Avizo Lite Edition license is not sufficient).
Image data can be interpreted as a stack of 2D images or as a single 3D volume.
The Image Stack Processing (ISP) module allows the creation and execution of image processing
recipes (a recipe automates the execution of a series of modules to reapply it on any compatible data),
to process image data as a 2D stack (each image of the stack is processed individually).
The Image Volume Processing (IVP) module allows the creation and execution of image processing
recipes to process image data as a 3D volume.
Each of these two modules (Image Stack Processing or Image Volume Processing, respectively) opens
a distinct editing workroom (Image Stack Processing workroom or Image Volume Processing work-
room, respectively).
These editing workrooms feature an interactive and dynamic edition environment, giving constant
feedback about the recipe being built. Any step of the recipe can be accessed and modified, with
immediate feedback about the impact of each change on the final output. It is an optimized setup to
enhance and segment data in Avizo software.
Note: The main differences between an ISP recipe and a general recipe (see Creating recipes to auto-
mate workflow execution) are summarized in the table below:
ISP or IVP recipe General recipe
Used for Automating an image processing Automating a general workflow
workflow on an image stack (ISP)
or on a 3D volume (IVP)
Input/output of a recipe step Image data type only Any data type
Editing Unlimited Limited
Note: An ISP module can be a step within a general recipe, not the other way around.
Both the ISP and the IVP workspaces give access to a catalog of tools dedicated to image processing.
The editing of a recipe is always done on a preview of the input image data (a single slice in stack
mode or a slab in volume mode), with two 2D viewers. By default, the two 2D viewers display the
data of a given recipe step before (left) and after (right) the processing of that step. The viewers can be
set up to display a step input, a step output, the workflow input, or the workflow output (see viewers).
The ISP extension can also be used in a batch mode from a command line (see How to batch process).
This mode is useful for online processing (live image processing during acquisition).
A recipe can process the input data slice-by-slice, or globally as a 3D volume, depending on the module
you used to create the recipe (ISP or IVP module).
If the input data is 3D, and the module used to create a recipe is ISP, then the input will be interpreted
as a stack of 2D slices. The recipe will be applied slice-by-slice.
You can use the stack processing mechanism on a stack of large images, from an input directory to an
output directory with a maximum of one image in memory at a time by:
To learn more about the tools available in the extension, refer to the following links:
128
• Process Stack On Disk module
• Batch process a stack of large images
The following tutorial explains how to use the Image Stack Processing (ISP) workroom and how to
build an ISP recipe to process a stack of 2D images. The Image Volume Processing workroom (IVP)
works exactly as the ISP workroom does, so you can follow this tutorial for both.
The tutorial is separated into the following:
1. The ”reference” data is the main input of the workroom. An ISP workflow always starts from
Figure 4.2: Linear workflow in pool and Image Stack Processing workroom
However, the reference of a workflow can be changed within the room anytime to start a new
linear workflow, from the data which are available and listed in the workroom (see Change a
reference). See example in Figure 4.3.
2. The ISP workroom is modal. It prevents you from returning to another workroom and changing
the reference data that is associated with the workroom. You must explicitly close the room
(Quit ) before returning to a different room.
3. The primary data (main connection) of a selected tool automatically connects to the preceding
output. If you need to connect to a different output, then a reference step must be added (see
Changing reference).
4. The workroom only manipulates image data.
5. Only modules computing an output (no modification of input) and preserving dimensions (out-
put has same dimension as input) are available.
6. Tools inserted into an existing workflow are always inserted below the selected step.
7. To add data external to the workflow, the data must be of same size in X, Y, and Z dimensions
as the initial reference, so that changing slice number is coherent in all data.
8. The data listed in the combo box of a secondary data input of a tool refers to the output of the
steps listed in the Workflow panel, and are preceded by their step number.
9. If any error occurs during the computation of a given slice, then the processed slice will be filled
with null values.
• AVIZO ROOT/data/tutorials/chocolate-bar.am
• AVIZO ROOT/data/tutorials/isp/chocolate-bar.nougat invert.am
Right-click on the chocolate-bar.am data module displayed in the pool and select Image Stack
Processing from the Object Popup under the Image Processing directory.
Select the module and in the Properties panel, and then click Create Workflow of Action port.
The ISP workroom opens with the reference data being displayed on the left and right viewers (see
Figure 4.5).
A binary or label image output is automatically blended with the last greyscale image of the stack, if
Label Blending switch is on.
Evaluate the value of a pixel under the mouse with the quick probe tool. You can create snapshots of
the views using the snapshot tool (note that the capture all viewers check box will allow you to create
a snapshot of only one or both viewers).
It is automatically selected, and the module properties are displayed in the Properties panel.
At the same time, the module is automatically applied to the last output step (the original reference
data in this case). Its result is displayed in the right viewer.
Change the scale port to 0.1. The right viewer is updated with the changes.
Add the following tools to the workflow to build a mask for the nougat phase:
• A Dilation to overdilate selection. This will fill holes and smooth boundaries. Size is set to 12.
• Another Erosion to erode selection to have net-zero erosion/dilation on nougat selection (go
back to original data shape without holes). Size is set to 9.
Our mask is now ready. You will use it to segment the porosity within the nougat phase.
Note: The ISP workroom supports insertion of Python Script Object module, on condition that it
respects the following requirements:
• The module takes images as input and create images with the same size and bounding box;
When Python Script Object module is used in the workflow, neither Pack&Go export nor pinned ports
are supported.
The step is preceded with the error icon (warning), because it is not yet set so it can create an output.
You need to select a data set directly from the workflow panel.
The available list represents the data created during the workflow. Each data set is preceded with a
number corresponding to the step the output comes from.
In this case, select: 3 Thresholding.
Continue with the workflow in a new branch starting from the output of the module.
• Mask out anything outside the nougat phase with a Mask module our the initial mask created.
In this last added step, you can see that our mask is too large. The workflow could benefit from some
improvements. In ISP, it is easy to change and test variations within a workflow.
First, set up the viewers so you see the effect of a particular step on the final workflow output:
Select the Erosion step (7) by clicking it in the workflow panel and position your cursor in the size port
of the Properties panel. Use the mouse wheel to increase the value incrementally. The border slowly
disappears until only the pores remain in the workflow output (final value is 13).
Go back to the mask step by clicking it in the workflow panel. Set the left view combo box to Step
Input. Add a Labeling module to label the pores.
Try inserting a Marker-Based Watershed after the labeling module. An error appears, because a
By setting the left view as step output and the right view as workflow output, you can see the effect of
the noise removal on the pore selection in the final data. Try lowering iterations to 1 and changing the
type port to disk. Now only the major pores remain in the selection.
To go on with the workflow, you also need an inverted mask of the nougat phase to capture the caramel
phase and ensure no overlap between the two phases.
• Enhance overall contrast to facilitate caramel selection with a Normalize Grayscale. Set Range
Mode to other. Input range is set to 100-160 and output range to 0-150.
• Roughly select pixels belonging to caramel with a Thresholding module, and then set the inten-
sity range to 54-98.
• Dilate the selection to join disconnected features and smooth boundaries with a Dilation module.
Set the type to Disc and set Size to 3.
The selection looks good on the current slice at this stage, but it might suffer from artifacts on a
different slice.
To further inspect the workflow and check if it is valid on every slice of the stacked data, you can
change the slice on which the workflow is applied.
Move the Preview workflow on image slider of the Workflow panel to slice 135.
You see the following display with a spot that still remains after dilation.
Remove this artifact by inserting a Remove Small Holes module with a size of 200.
Add a Dilation module to re-dilate the caramel selection for net-zero erosion/dilation (go back to
original shape without artifacts removed with morphological steps). Set Size to 6 with a Disc type.
Subtract the nougat selection from the caramel to ensure no overlap between the two.
Add a Mask module where the binary image is step 9 (Invert), which you prepared in the Insert steps
section (see Figure 4.39).
When you click Apply to execute the ISP module from the main project workroom, the module outputs
the last step of the ISP recipe and the data that are selected as additional outputs in the workroom (as
described above).
• Select step 7 and click delete icon. The workflow is automatically recalculated to take the
changes into account.
• Select the Erosion step (now step 7), and then click delete icon.
• In this case, the Workflow panel detects an error and highlights it using the error icon in step 10
(more information available in the console window). The mask step was using the output of the
step you just deleted. The disconnection in the stack is highlighted by the unavailable steps:
• The workroom does not delete every step. There is still a chance to fix it by simply re-editing
the workflow.
• Select step 6 (now Remove Small Spots) and type ”selective” in the quick search toolbar of the
module browser.
• Select Selective Closing from the list.
• Set the number of iterations to 5 and set the threshold to 3.
• Click the mask step where the error appears, and then set the Selective Closing output as a binary
image.
• Look in the External Input field at the bottom of the workflow panel.
The list is populated with external data compatible with the current workflow.
• Select the external data to add to the workflow: chocolate-bar.nougat invert.am
• Click Add button.
• A message notifies you that the data is now available.
• In the last Mask step, select the new data from the Properties panel.
Go back to the main project workroom. Additional input is now available in the ISP module.
For the purpose of the tutorial, remove this extra step to have only one main input:
• In the last Mask step, select back the result of Invert step as binary image.
• Click Clean.
4.1.12 Export workflow parameters for easy access from the Image Stack Pro-
cessing module
For the tutorial, you will select and export specific parameters from the ISP workroom to make them
available from the ISP module in the project workroom.
Since the ISP recipe can be used on any input data from the project workroom using the ISP module, it
is sometimes practical to have specific parameters of the workflow readily available directly from the
module. You can then fine tune the recipe when applied on a different data set than the one that you
used to create it. Any parameter can be exported using the pin icon from the Properties panel. When
the icon is pinned down, the parameter will be available directly from the ISP module in the project
workroom.
Click the Thresholding step and click the pin icon of the Intensity Range parameter:
Figure 4.51: Thresholding port now available in Image Stack Processing Module
Now that the workflow is ready as an ISP recipe, it can be applied on any data. The user may test it on
a different data by changing the inputs of the Image Stack Processing module.
Now that the ISP recipe example is built with a single image, we will read each slice of the teddybear
dataset from disk, process it, and then output the results directly on disk:
• Copy the AVIZO ROOT/data/teddybear/ input data directory into the directory of
your choice. The batch processing script will write the outputs into the input data directory,
so you need to have write permission.
• Open a DOS command window.
• From the window, go to the directory where the Avizo executable is stored
(AVIZO ROOT/bin/arch-Win64VC12-Optimize) and type the following com-
mand:
Avizo.exe -nogui -tclargs "’<your data directory>/teddybear’
’<temporary directory>/dummy.hxisp’ jpg {load
-unit mm -jpg +box 0 127 0 127 0 1 +mode 100}"
../../share/isp/disk2disk isp.hx
The command populates the teddybear directory with an output directory containing the processed
slices.
The command works as follows:
Avizo.exe inputDirectoryName hxispFileName extensionOfFilesToLookFor
LoadCommand scriptPath
If you do not know the LoadCommand, then you can load the data in Avizo and look for it in the
data parameter editor under the LoadCmd section.
Avizo allows for the creation of user-defined recipes to automate the execution of a series of modules.
Avizo recipes facilitate the application of high-level workflows such as filtering, segmentation, and
the extraction of user-defined statistics from an image. Recipes integrate your knowledge and make it
available for other users as push button solutions.
A dedicated workroom is available to create, edit, and execute recipes. The workroom can be launched
by selecting the Recipes icon located on the Workroom Toolbar. The workroom consists of three
panels: an instance of the common 3D Viewer, a dedicated Recipes panel presenting the sequence of
steps in a list, and the Properties panel showing the module properties of the current step. The main
interaction area is the Recipes panel, which let’s you edit and execute your recipes (see Figure 5.1).
Once a recipe has been selected from the dropdown menu in the Recipes panel, it can be played back
and edited. Avizo will load all recipes found in the standard recipe folder of your home directory. By
default, this folder is located at %APPDATA%/Thermo Fisher Scientific/Recipes. You
can click Load Recipe to load additional recipes, and click Save Recipe to save the recipes on disk to
share them with other users.
Figure 5.1: The Recipes Panel
You can click Edit Recipe to change the recipe name and add some documentation to it (see figure 5.2).
153
Figure 5.2: Edit Recipe
Recipes can be executed at once or with breakpoints in which case the execution of the recipe will
pause at user-defined steps (see Figure 5.4). By default, the recipe configures the modules as you save
them. Breakpoints allow you to change the properties of a module used in the recipe during runtime.
In this way, a recipe can be executed several times by only changing one parameter to evaluate the
sensitivity of that parameter. For example, you can change a threshold to evaluate if porosity is
sensitive to the segmentation parameter.
Note: Modules that require user interaction (e.g., paint) will automatically force a breakpoint.
154
For each step, you can turn on/off saving the results to disk and exporting them in the Project
workroom. If the export to the Project workroom is off, the data will be removed from memory as
soon as it is no longer needed. This action allows you to reduce the memory consumption.
Note: Your results will be saved to disk only if Production Mode is turned on. The recipe result
location can be found in the Recipes tab of the Preferences menu.
When a recipe has been played back, hovering with the mouse over a step displays a preview thumbnail
of the result image (see Figure 5.5).
155
Figure 5.5: Recipe Preview
At each step, it is possible to take a snapshot of its result and save it in the application data directory. By
default, the display module defined in Edit > Preferences > Auto Display is used. However, you can
add an explicit snapshot step with a breakpoint to change it. When executing the recipe, it will pause
at this step and allow you to customize the display module in the Properties panel (see Figure 5.6).
156
Figure 5.6: Adding a Snapshot
• Attach a Create Recipe module to Result.label (result from previous Label Analysis module),
and click Apply. Avizo will switch automatically to the Recipes workroom (see Figure 5.8).
• Switch to the Project workroom by selecting its icon in the Workroom Toolbar.
• Go to Project > Remove All Objects from the main menu.
• Load AVIZO ROOT/data/tutorials/chocolate-bar.am
• Switch to the Recipes workroom by clicking its tab in the Workroom Toolbar.
• Make sure that chocolate-bar.am is shown in the Input dropdown box of the Recipes panel
• Play the recipe on the chocolate-bar.am. The recipe will compute statistics as shown in Fig-
ure 5.9.
When you are satisfied with your recipe, save the recipe to be used again and shared.
1. Choose the data in the Object Pool, and right-click on one of them.
2. Create a Create Recipe module from the Object Popup.
The number of inputs of the recipe depends on how the selected data has been created, by comparing,
merging and/or concatenating their history logs.
Although all types of object in the object pool can be selected, a recipe can only be created by right-
clicking on data object type, excluding the camera path and the colormap. The other types of object
are not taken into account in the creation of the recipe.
• Start Avizo.
• Load AVIZO ROOT/data/tutorials/chocolate-bar.am
• Attach a Volume Rendering to chocolate-bar.am
• Attach an Extract Subvolume module to chocolate-bar.am data and extract a small portion
of the image (see Figure 5.10 and Figure 5.11).
• Run the recipe until it reaches the breakpoint. At this stage, it is not possible to change the input
data or to quit the Recipes workroom. Only the properties of the tool are available for change.
In port Measures, select Standard Shape Analysis. Click Play to continue (see Figure 5.13).
The recipe described in this tutorial can also be loaded directly from
• Step Deletion
• You can only delete the first step or last step of a recipe except snapshot steps that you
can always delete.
• If a recipe’s last step has more than one input, then the step cannot be deleted. Deleting
the step would imply having more than one recipe result as the deleted step inputs would
become the new outputs. For now, the recipe mechanism can only handle one final recipe
result.
• If only one step remains in the recipe, it cannot be deleted.
Example: A step with a module like Or Image cannot be deleted if it is the last step.
• Input steps cannot be deleted.
• Step Insertion
• For now, only snapshot steps can be inserted in a recipe.
• Default Display
• The Ortho Views module cannot be used since there is only one instance of this module.
• Clean of recipe intermediate data
The following tutorials require an Avizo license (Avizo Lite Edition license is not sufficient).
• Getting Started with Advanced Image Processing and Quantitative Analysis - the basics for
using Avizo for image processing and analysis
• Examples:
• Measuring a Catalyst - Masking and Distance Map
• Separating, Measuring and Reconstructing - Watershed Separation
• Distribution of Pore Diameters in Foam - Custom Measurement
• Average Thickness of Material in Foam - Separation Thickness
• Watershed Segmentation - advanced Segmentation
• More about Image Filtering - reduce image noise or artifacts or enhance features of interest
• More about label measures - manage several groups of measures
• Cavity Analysis Tutorial - cavity analysis using Ambient Occlusion
6.1 Getting Started with Advanced Image Processing and Quan-
titative Analysis
In this step-by-step tutorial, you will learn the basics for using Avizo for image processing and analysis.
The example used below can be easily extended to other applications and follows a typical workflow
of image analysis:
1. Image enhancement
2. Features extraction
3. Data measures and analysis
You should be familiar with the basic concepts of Avizo to follow this tutorial. In particular, you should
be able to load files, to interact with the 3D viewer, and to connect modules to data modules. All these
issues are discussed in Avizo chapter 2 - Getting started. For routine use of Avizo you may benefit
from familiarity with Avizo image filtering and segmentation (see chapter 3 - Images and volumes
visualization and processing).
Getting Started with Advanced Image Processing and Quantitative Analysis 167
type the first letters of Ortho Slice, then selecting the module in the list will automatically create
it in the Project View.
• Attach two other Ortho Slice modules. In the Properties panel of the second Ortho Slice, select
the xz orientation and the yz orientation in the Properties panel of the third Ortho Slice. See the
resulting display on Figure 6.1.
• Attach a Median Filter module to the data. (Use the search field and type the first letters of
Median Filter, then select the module in the list.)
• Select 3D in the Interpretation port of Median Filter.
• Press on the Apply button.
Once computed, the result is stored in a new image object foam.filtered (see Figure 6.2).
• Attach the three Ortho Slice to the resulting image. To do so, change the Data of each slice in
the Properties panel. See the resulting display on Figure 6.3.
Getting Started with Advanced Image Processing and Quantitative Analysis 168
Figure 6.2: Median Filter network
Getting Started with Advanced Image Processing and Quantitative Analysis 169
6.1.4 Binarization
Binarization means transforming a grayscale image into a binary image (i.e., a label image with only
interior and exterior materials). Threshold binarization is used when the relevant information in the
grayscale image corresponds to a specific gray level interval. Thresholding is a simple segmentation
method - more sophisticated automatic, semi-automatic or manual segmentation tools are also avail-
able in Avizo. Threshold binarization can be done with the Interactive Thresholding module which
prompts you to set the levels with a visual feedback.
You can interactively modify the threshold values with immediate 2D or 3D visual feedback. The
selected pixels appear in blue in the displayed image.
• In the Properties panel of the module, you can set the Intensity range port to the range 0-30 for
instance.
• Check and uncheck the 3D option in the Preview Type port to get a 2D only or 3D preview (see
Figure 6.4).
• Press the Apply button to start the module.
The output binary image named foam.thresholded is generated in the Project View (see Figure
6.5).
In the output binary image, all pixels with an initial gray level value lying between the two bounds are
set to 1, all the other pixels are set to 0.
The Interactive Thresholding module has created a binary image. For binary images, the Avizo dis-
plays the voxels of intensity 1 with a blue color. If you attach an Ortho Slice to the resulting image, an
appropriate colormap is selected by default.
Getting Started with Advanced Image Processing and Quantitative Analysis 170
Figure 6.5: Interactive Thresholding network
• Hide the Interactive Thresholding preview by switching of the orange visibility button in the
module icon in the Project View or next to the module name in the Properties panel.
• Connect the first Ortho Slice to the thresholded data. See the resulting display on Figure 6.6.
Getting Started with Advanced Image Processing and Quantitative Analysis 171
Extensive tools are available in Avizo for effective data binarization and segmentation of images.
The process can be automated in many cases, possibly by combining a number of steps, sometimes
requiring user input. In some cases, it may be necessary or easier to proceed to semi-automatic or
manual segmentation: in particular, the Segmentation Editor is designed for that purpose (note that
the Segmentation Editor only supports 8-bit label images). Also keep in mind that improving image
acquisition might be much easier than analyzing bad images.
Here are some of the Avizo modules that can facilitate automated binarization:
• Auto Thresholding automatically computes a threshold. You can choose the criterion best suited
to your data, generally factorisation.
• Interactive Top-Hat is a powerful tool for segmenting areas with non uniform backgrounds,
when simple thresholding fails to capture wanted features without unwanted noise. A top-hat
transform can be seen as a ”local thresholding”. Top-hat results are often combined with thresh-
old results using logical operation OR Image.
• Hysteresis Thresholding is used to achieve intermediate binarization between low and high
thresholds defining a safe retained area and a rejected area. You may use, for instance, In-
teractive Thresholding interface to interactively choose the thresholds before using Hysteresis
Thresholding. See also the Canny Edge Detector module.
• Many image filters like gradient or Laplacian can be used to help binarization, e.g., for Edge
Detection.
• Filtering regions based on measures, as shown later in this tutorial, can also be a powerful
technique for segmentation.
After binarization, it may be necessary to separate some objects, as shown in the next section.
6.1.7 Separation
In the example data set, some of the pores in the foam appear to be touching, but ideally, should be
separated for proper analysis. Thresholding cannot avoid this type of output when the acquisition data
is too coarse or noisy, because the gray levels of the considered objects are not uniform enough across
the volume, or because the resolution is too low to distinguish some objects’ boundaries. You can use
the Separate Objects module to separate connected particles.
The principle of the Separate Objects module is to compute watershed lines on a distance map. The
Getting Started with Advanced Image Processing and Quantitative Analysis 172
Separate Objects module is a high-level combination of the watershed, distance map and H-Maxima.
It can be used as a simple and straightforward separation tool, satisfying in many cases. You may
notice, however, that some separation may be missing or unwanted, in particular with non-convex
shapes (considering also 3D). For more details and advanced separation, see Example 2: Separating,
Measuring, and Reconstructing Individual Objects - Pores in Foam.
6.1.8 Analysis
You can then use an analyze module to get the volume, surface area, mean value, number of voxels,
etc., individually for each separated particle. This analysis on the stack of images is undertaken by
using the Label Analysis module to extract statistical and numerical information, including the measure
of objects.
A new label image data object foam.label is created in the Project View, and the Tables panel is
displayed, showing a spreadsheet-style table of results: the analysis foam.Label-Analysis, also created
in the Project View (see Figures 6.8 and 6.9).
The toolbar offers the possibility to:
Getting Started with Advanced Image Processing and Quantitative Analysis 173
Figure 6.8: Analysis network
The basic measures (as selected in the Measures port of the module) are displayed in the Tables panel
as shown below (Volume3d, Area3D, etc.).
Getting Started with Advanced Image Processing and Quantitative Analysis 174
Figure 6.10: Analysis Panel toolbar: the histogram button
Volume3d, Area3d, BaryCenterX, BaryCenterY, BaryCenterZ and Mean. It is possible to define new
groups of measures, composed of pre-defined measures but also of user-defined measures. To learn
more on the subject, please refer to the dedicated tutorial in chapter 6.4 - Further Image Analysis.
Note: By default, if the unit management of Avizo is not enabled, the results are given in the same
units as the voxel size was specified in. You can enable the unit management of Avizo to display data
and measurements with units. Please refer to chapter 10.2.9 - Units in Avizo for all the details on how
to use the unit management in Avizo.
Loading the project data/tutorials/image-processing-advanced/GettingStartedBasics-5-Analysis.hx
will complete the steps above.
• Click on the label seek button of the analysis panel toolbar (see Figure 6.12) or hit the L key
Getting Started with Advanced Image Processing and Quantitative Analysis 175
of your keyboard. A new Ortho Slice is automatically attached to the separated image and
displayed in the 3D viewer, as well as a point dragger (see Figure 6.13).
• Select a cell of the analysis lower table. The point dragger will move to the corresponding object
location in the 3D view. If the histogram of one of the analysis measures is displayed, a vertical
line appears that displays the position and value of the selected row, as shown on Figure 6.14.
• In the viewer window, you can move the dragger using the rectangular handles, then upon button
release, the analysis table will highlight the corresponding object row. In order to move the
dragger, you must set the viewer into interaction mode (press the ESC key). Then move the
mouse over one of the dragger’s crosshairs and press the left mouse button. The color of the
picked crosshair changes. The movement of the dragger is restricted to the corresponding plane.
• You can also click with the middle mouse button over a pickable object in the scene displayed
in the 3D viewer, for instance, over a particular pore on a displayed slice: the dragger will move
to the picked point and the corresponding spreadsheet row will also be highlighted.
• Click on the label seek button or hit the L key to exit the label seek mode.
Figure 6.13: Point dragger (brown lines crossing) in the 3D viewer corresponding to row 92
Getting Started with Advanced Image Processing and Quantitative Analysis 176
Figure 6.14: Line in the histogram corresponding to row 92
• You can verify that fewer objects have been created by connecting the Ortho Slice to the new
label image foam.label-filtering, as shown on Figure 6.16.
Tip: Filtering driven by measures can be a powerful tool for data segmentation. It allows you to select
or eliminate regions based, for instance, on size, shape factor, orientation, or combinations of several
criteria.
Loading the project data/tutorials/image-processing-advanced/GettingStartedBasics-6-
FilterAnalysis.hx will complete the steps above.
Getting Started with Advanced Image Processing and Quantitative Analysis 177
Figure 6.16: Filtering result
In the label image created along with the result spreadsheet, each particle has been identified and
assigned a unique index. This label data is stored in this case as a 16-bit label image. Such images are
displayed by default using a cyclic colormap so that particles in close proximity are more likely to be
shown in a different color, as shown on Figure 6.19.
Note: Avizo label images coming from the Segmentation Editor and Multi-Thresholding modules are
Getting Started with Advanced Image Processing and Quantitative Analysis 178
Figure 6.17: Sieve Analysis workflow
Getting Started with Advanced Image Processing and Quantitative Analysis 179
Figure 6.19: Each particle has been identified and assigned a unique index
6.1.14 Scripting
A complete processing sequence can be put in a script in order to automate analysis for routine tasks.
For details about scripting with Avizo see the chapter 6.3 - Example 3: Separating, Measuring and
Reconstructing.
6.1.15 Conclusion
This tutorial has introduced you to:
Getting Started with Advanced Image Processing and Quantitative Analysis 180
These concepts can be extended in countless ways to tackle new challenges. Try to relate your image
processing problems back to this simple workflow:
This introduction has highlighted how Avizo can be used to perform sophisticated segmentation and
analysis of 3D data, but there are many more processing operations and measurements in addition to
those presented here.
Avizo gives you this extensive toolkit so that you can map the appropriate tools to any processing
challenge that confronts you.
To follow this tutorial, you should have read the first tutorial chapter 6.1 - Getting Started with Ad-
vanced Image Processing and Quantitative Analysis and be familiar with basic manipulation of Avizo.
Display module visibility can be managed in the usual way with Avizo by clicking on the orange
square button in the icon visible in Project View, or beside the module title in the Properties panel. See
chapter 10.1.9 about Project Views.
The 3D image used in this example is acquired by microtomography: an almost spherical support
contains catalyst and pores. The catalyst appears with dark levels in the image (low intensity voxels).
The pores and background appear with bright levels (high intensity voxels). Intermediate gray levels
correspond to the support.
The goal of this example is to get a distribution of distances between the catalyst voxels and the
background (exterior). Here, a difficulty is the exterior intensity is close or identical to the intensity
within the pores, which prevents the use of simple thresholding to isolate exterior. Moreover, some
pores are connected with exterior, which prevents the use of ”flood fill” approaches like magic wand
of the Segmentation Editor, or the Reconstruction from Markers module.
Note: in this tutorial, you will find hints on how to manage an arbitrary region of interest. Another
common example of a similar problem is to isolate the pore space of a rock core sample from core
exterior, in order to compute rock porosity, for instance.
The process is split in several steps/sections that describe a step-by-step measurement workflow:
For searching an appropriate threshold, you can directly change the Intensity Range port. According
to the Preview Type port, the 2D or 3D preview is interactively rendered. Remember to check through
the whole volume by changing the Preview Slice Number and Preview Orientation ports. Other Avizo
modules can also be helpful for this task (see Section 3.2 Visualizing 3D Images).
Here, thresholding the image between 0 and 225 gives a binary image where:
Applying the Interactive Thresholding module will create a binary image (image label with only inte-
rior and exterior materials) as described below:
• Select the Interactive Thresholding module in the Project view, then change the Intensity Range
values to the range 0-225 by using the slider handles or the text areas of this port.
• Change the Preview Slice Number port to 45 by dragging the slider of this port.
• Press the Apply button to start processing.
The Closing module actually makes a dilation of the binarized regions, followed by an erosion: in-
tuitively, the dilation fills holes and reconnects separated regions, then the erosion restores original
exterior shape.
Loading the project CatalystDistribution-3-Closing.hx will complete this tutorial step (see Figure
6.25).
Note: The artifact you may notice on the right side of the image above is due the dilation too close to
• Many modules support a Region Of Interest (ROI) input. You can attach a ROI Box module to
your data, then connect the ROI input of the display or compute module to the ROI Box module.
• The image Crop Editor can cut or extend your data.
• The Extract Subvolume module copies a portion of your data in memory, possibly sub-sampled.
If you need an arbitrary mask or region of interest - for instance a cylindrical ROI, you can use the
following tools:
• A number of modules sorted into Image Processing/Image Morphology from the popup menu
of every binary image can be used to create or combine masks like the one shown above. Other
examples include Convex Hull (applies slice by slice), Fill Holes, Reconstruction from Markers.
• The Volume Edit module is used to modify a volume with interactive tools like cylinder. It may
also be used by script.
• The Segmentation Editor has a number of useful tools that can be used to quickly create masks,
like brush, shaped lasso, Selection/Interpolate.
Loading the project CatalystDistribution-4-DistanceMap.hx will complete this tutorial step (see Figure
6.26).
Masking
a gray level image for first input, a binary image for second input (mask image), and provides a gray
level image for output where:
• each black voxel of the mask image is set to 0 in the output image,
• each blue voxel of the mask image is set to the initial level from the gray image.
Masking the distance map image by the catalyst image gives a gray image where:
• Apply a Mask module: the first input is Catalyst.distmap (the distance map
image), and the second input is the catalyst binary image obtained previously
Catalyst2.thresholded.
• Attach a new Ortho Slice to the result to see the object’s distance map. To get a better ren-
dering, you can map the colormap range of the Ortho Slice to the full range (min-max) of
Catalyst.masked: set 0...93 as min-max in the Colormap port.
Loading the project CatalystDistribution-6-Masking.hx will complete this tutorial step (see Figure
6.28).
• Use the Multiply by Value on Catalyst.masked as first input (Input Image 1 port). Set the
Value port to 5 (assuming a voxel size of 5 micrometers).
• Click on Apply to get Catalyst.mult as result.
• Retrieve the maximum value with the Info port displayed in the Properties panel when selecting
the image icon in the Project View.
• Attach an Histogram module on Catalyst.mult to compute and plot for each gray level
i, the number of voxels at intensity i. The number of points per each level will be graphed
as a histogram. Set the Range port to {3,400} and the Max Num Bins port to 80. Uncheck
logarithmic in the Options port and click on Apply to display the histogram window. Using the
File menu, you can take a snapshot of the histogram or save the histogram data to a csv file.
• Applying an Histogram module on the catalyst distance map generates a graph showing the
number of catalyst voxels located at a given distance from the object envelope.
Loading the project CatalystDistribution-7-Histogram.hx will complete this tutorial step (see Figure
6.29).
To follow this tutorial, you should have read the first tutorial chapter 6.1 - Getting Started with
Advanced Image Processing and Quantitative Analysis and be familiar with basic manipulation of
Avizo.
The 3D image used in this example was generated using data from several slices of foam.
The aim of the example is to isolate and quantify these bubbles, in a more detailed way than the Getting
Started example, for better controlling on the results. Separation is essential in a number of cases for
compensating too low image resolution, noise, or intensity variations across the image.
1. A label image containing labeled marker regions that are used as seed areas for the flooding.
There will be at the end of the process as many separated object as markers labeled differently.
These are like rivers for which one want to retrieve the catchment area.
2. A gray image playing the role of the landscape height field or altitude map that controls the flood
progression and finally the location of watershed separations. These separations are located on
the crest lines between valleys of our landscape.
Different applications can be achieved by carefully choosing both inputs: markers and priority map.
An example is the Separate Objects module used for separating foam pores in the Getting Started
tutorial. It first computes a distance map (see the chapter 6.2 - Measuring a Catalyst tutorial for more
about distance maps). This distance map provides the priority map input for a watershed process.
Maxima regions of the distance maps - the most inner areas of the pores - provide the markers input
used for the watershed. The process is described in details in the next section.
Loading the project WatershedSeparation-1-Thresholding.hx will complete this tutorial step (see Fig-
ure 6.32).
By dragging the cursor of the Slice Number port, you may notice some artifact holes (e.g., in slices 4,
Loading the project WatershedSeparation-2-DistanceMap.hx will complete this tutorial step (see Fig-
ure 6.33).
• Attach a H-Maxima module. Leave the Contrast port to default value (4) and click on Apply.
• Attach an Ortho Slice to foam.hMaxima and set the Transparency type to Alpha.
Loading the project WatershedSeparation-3-MergedMaxima.hx will complete this tutorial step (see
Figure 6.34).
This module creates a binary image containing the regional maxima of the input distance map image,
which are ”merged” within the contrast variation given as parameter. Since distance map is used as
input, the result is the set of most inner regions within objects.
The watershed algorithm requires a unique label for each region finally separated. Two regions with
the same value in input image would be merged.
Loading the project WatershedSeparation-4-Markers.hx will complete this tutorial step (see Figure
6.36).
The distance map also needs to be inverted, as the watershed algorithm will expand the markers towards
increasing values of the input priority map (i.e., landscape altitude).
Loading the project WatershedSeparation-6-SeparationLines.hx will complete this tutorial step (see
Figure 6.38).
To complete the separation, you can subtract separation lines from the binary image of pores:
• If you look to markers image on a particular slice, markers may seem missing in some pores just
because they lay somewhere else in 3D.
• In some case, however, a marker can be really missing because two objects are considered
merged from the standpoint of distance map regional maxima, then a separation will also be
missing. You can try lowering the contrast factor of H-Maxima (or Separate Objects) to make
markers smaller and more separated.
• If a separation is missing, it means that a marker is missing,
• Separation ’lines’ may look too thick or wrong, just because the slice you are looking at is
somewhat tangent to a separation face.
• Unwanted separation may occur if the object shape is non-convex: this leads multiple local
maxima, therefore separated object. Small concavity in an object can lead to a separation across
it. A solution may be to increase the contrast factor of H-Maxima in order to make markers
larger and merged,
• A separation based on distance map may follow the shortest path, i.e., straight line instead of the
desired shape. This is because the watershed is driven by the distance: the separation is driven
by geometrical criterion.
• Chamfer Distance Map is a discrete chamfer map. You could use instead a more accurate eu-
clidian distance map (see Distance Map or other distance map types referenced into Image Pro-
cessing/Distance Maps from the object popup); however, this has little impact in most cases.
• The number of objects is not satisfying: in this case, you must work on markers.
• The lines of separation are not satisfying: you must work on the priority map, the ’landscape
height field’.
For markers, the Separate Objects solution is to work on the distance map. In this case, you take into
account the geometry (most inner regions), but markers may be obtained by other ways. Sometimes it
may be interesting to use the grayscale image (intensity) if the centers of grains are darker or lighter.
If the objects are fairly homogeneous, you must stick with geometric information. One may need to
adjust the contrast factor setting of H-Maxima. Basically, the H-Maxima parameter corresponds to the
minimum depth of between two maxima. With geographic analogy: the difference in height between
the collar and a summit so that you keep the two distinct peaks.
It can be easier to make trials on a cropped data set showing object(s) that should not be split and
tune settings in order to make sure that only one marker is inside each object. One possibility for
• isolate the added separations: get the difference between original and separated image using the
AND NOT Image module for instance,
• label these separations with the Labeling module,
• use the Label Analysis module to do some measurement in each separation, for instance, the
maximum of distance map value within a separation region could indicate whether a separation
goes too deep inside an object.
You will find more example applications of watershed in the next tutorials, using different methods to
create the markers and the priority map.
Loading the project WatershedSeparation-8-SegmentedPores.hx will complete this tutorial step (see
Figure 6.41).
Secondly, you want to filter unwanted small objects, and finally, measure the volumes of individual
pores.
In order to remove small objects, you can use measures and measure filters as described in the Getting
Started tutorial. This involves two steps:
In one of the next tutorials (chapter 6.4 - Further Image Analysis), you will find more example appli-
cations of measurement and advanced analysis.
Loading the project WatershedSeparation-9-FilteredPores.hx will complete this tutorial step (see Fig-
ure 6.42).
• Attach a Generate Surface module to the result label image (foam3.labels), uncheck Adjust
Coords in the Border port, and press Apply to generate foam3.surf.
• Display the resulting surface by attaching a Surface View module.
Loading the project WatershedSeparation-10-Reconstruction.hx will complete this tutorial step (see
Figure 6.43).
As the result image already contains integer values for material labels, it can be used directly for
surface reconstruction. Other image types may require conversion to Avizo label data (for instance by
using the Convert Image Type module). Notice that the Generate Surface module can work with more
than 256 labels.
Displaying the resulting surface with a Surface View module may be very slow due to the large number
of surface polygons. In this case, a prior simplification of the surface is recommended for faster display
on your hardware.
Avizo also allows you to export the surfaces to various file formats, or to generate and export a tetra-
hedral model suitable, for instance, for finite element simulation with some external solver.
A demo script corresponding to this whole tutorial can be found in:
data/tutorials/image-processing-advanced/PorositySurfaceReconstruction.hx
It uses a script object located in data/tutorials/image-processing-advanced for automating the process-
ing. It matches the workflow described on the figure 6.40.
Once the script is loaded, you can optionally change several port values and click on the Apply button
of the Action port to start the processing.
• pore detection,
• pore post-processing,
• custom measure group definition to determine the distribution of pore diameters,
• custom measure definition to compute the sphericity of pore.
The image used in this example is acquired by microtomography. It represents foam that consists of
material and pores. Pores appear with dark levels in the image (low intensity voxels). Material appears
with luminous levels (high intensity voxels).
As shown on Figure 6.45, thresholding the image between 0 and 50 gives a binary image where:
intensity level 1 = porosity, intensity level 0 = support (material).
Applying morphological opening on the previously computed pores binary image gives a filtered image
where noise and artifacts are reduced, as shown on Figure 6.46.
The Separate Objects module detects surfaces that separate agglomerated particles. These surfaces are
subtracted from the initial image, see Figure 6.47.
6.4.3 Third step: custom measure group definition to determine the distribu-
tion of pore diameters
The AvizoLabel Analysis module allows computation of a set of measures for each particle of a 3D
image. Once the individual analysis is performed, a histogram of a given measure may be plotted in
order to produce a representation of the measure distribution.
In the Measures port of the module, basic is a group of pre-selected native measures. It might
happen that you don’t need all the measures of the basic measure group, or you would like to bundle a
different set of measures in the analysis table. For these cases, you can create your own measure group.
For a given particle, the equivalent diameter measure computes the diameter of the spherical particle
• Create a new measure group by pressing the dedicated button next to the measure group selector
(1).
• In the popup window, name the new group diameter and press OK.
• Select EqDiameter in the native measures list (2) and use the arrow button to add it to the group
(3).
• Press OK.
The new diameter group, containing only the equivalent diameter measure, is now selected in the
Measures port of the Label Analysis module.
A new label image data object FoamPoro.label is created in the Project View, and the Tables panel
6.4.4 Fourth step: custom measure definition to compute the sphericity of pore
Avizo provides a set of pre-defined native measures but it is also possible to save user-defined custom
measures.
• Enter the shericity formula in the dedicated field of the panel (see Figure 6.54).
• Press Close.
• Select Sphericity in the custom measures list and use the arrow button to add it to the diameter
group.
• Press OK.
The Analysis panel is updated and displays the EqDiameter and Sphericity measures.
• Porosity Detection
• Detection of the Separation Surfaces
• Distance Map of the Material
• Calculation of the Material Average Thickness
Loading the project PorosityThickness-1-SeparationObjects.hx will complete this tutorial step (see
Figure 6.56).
Apply the Influence Zones module on the binary image of porosity FoamPoro.separate.
Loading the project PorosityThickness-2-InfluenceZones.hx will complete this tutorial step (see Figure
6.57).
The NOT module inverts the levels of a binary image. Applying NOT on an skeleton by influence zone
(SKIZ) gives a binary image where:
• each black voxel of the output image is closer to the object located at the center of the zone in
the input image,
• each blue voxel is equidistant from at least two closer objects.
So the Influence Zones and NOT combination provides a binary image of surfaces that separate pores
through the material.
Apply the NOT module to FoamPoro.zones.
Loading the project PorosityThickness-3-SeparationSurfaces.hx will complete this tutorial step (see
Figure 6.58).
• each black voxel of the output image represents a background or porosity voxel,
• each blue voxel represents a material voxel.
The Chamfer Distance Map module applied on a binary image gives a gray level image where each
voxel intensity represents the minimal distance in voxels from the object boundary. For a given voxel
intensity:
Apply a Chamfer Distance Map module with 3D Interpretation on the material binary image
FoamPoro2.not.
Loading the project PorosityThickness-4-DistanceMap.hx will complete this tutorial step (see Figure
6.60).
The Mask module:
Apply a Mask module to the distance map image FoamPoro2.distmap and set the Input Binary
Image to the separation surfaces image FoamPoro.not.
Masking the distance map image by the separation surfaces image gives a gray image where:
Loading the project PorosityThickness-5-Mask.hx will complete this tutorial step (see Figure 6.61).
The Volume Fraction module with 3D Interpretation gives on the column ”Label Voxel Count” the
number of labeled voxels for each label in a 3D image. A binary image has only one label so ”Label
Voxel Count” returns N bV oxSep.
The Intensity Integral module with 3D Interpretation gives on the column ”Volume” the sum of the
voxels intensities in a 3D image i.e., Σi .
Loading the project PorosityThickness-6-Thickness.hx will complete this tutorial step.
• Correct or unique threshold cannot be easily or accurately determined with edges blurred by
noise and partial volume effect. Partial volume effect is caused by resolution limits in image
acquisition, which blurs the transition between phases and features, i.e., voxels do not map
single homogeneous physical volumes.
• When segmenting more than two phases, a transition between high and low intensity phases
may introduce artifacts with unwanted intermediate ”coating” phase.
• Variations in illumination or intensity across image may lead to different thresholds on different
regions.
The watershed technique provides an effective solution for these issues in many cases. See documen-
tation about watershed principle.
In this tutorial, you will learn how to use watershed for segmentation using different Avizo tools:
To follow this tutorial, you should have completed Avizo tutorial on Image Processing and Analysis
and be familiar with basic manipulation of Avizo. Preferably, you should also be familiar with the use
of the Segmentation Editor.
6.6.1 Segmenting sand pack with watershed tool in the Segmentation Editor
For this tutorial, we will use a subset image of a compacted silica sand sample, partially saturated with
water (see Figure 6.62). This sample was acquired by X-ray micro-tomography with a voxel size of
about 11.2 µm (data courtesy Mr. Felix Kim and Dr. Dayakar Penumadu, University of Tennessee,
Knoxville, TN, USA).
There are actually 3 phases that can be clearly distinguished in this data set:
• Air
• Water
• Silicate grains, with a few higher density areas in places
For this tutorial, we are interested here only in pores space vs. grains.
The threshold may look too low and leave unselected areas, but a higher threshold might capture noise
within the grains, or select voxels across the actual phase boundary. We want here a ”safe” selection,
• In the Materials list, select ”Pore Space”, then in the Selection group, press the button with a
large ”+” or press key ’A’. The current selection voxels are then labeled as the ”Pore Space”.
• Set bounds of Threshold Tool to 10000-51000 and click on ”Select Masked Voxels”. All slices
should still be checked.
• Select ”Grains” in Materials list, use the large + button in the Selection group or press key ’A’
to assign the selection to ”Grains” material (see Figure 6.64).
The labels we have defined will now be used as seed markers for watershed expansion.
A gradient magnitude image is calculated using quick Canny method, that will provide the landscape
image controlling the expansion of markers.
Tip: Depending on your application, you might select instead any image previously loaded or created
in your project, such as a smoother or more accurate gradient image, or a distance map for watershed
separation (see related tutorial in Avizo User’s Guide).
• One can choose the materials used as markers for watershed in the ”Marker” column in the
materials list, which appeared when you invoked the Watershed Tool. You can just leave all
materials checked by default for now.
• Leave the option Output catchment basins to default value side-by-side in order to get contiguous
labels instead of labels separated by exterior voxels.
• Press Apply and create new label field (see Figure 6.65).
A new label image is created with markers expanded to the edges of the landscape image (i.e., maxima
of gradient magnitude gradient). This becomes the current label image being edited in the Segmenta-
tion Editor, instead of the original marker labels. The boundaries are fitting the optimal location in the
transition between phase intensities, based on the seed markers and the gradient image.
Tips:
1. When not satisfied by result, you may easily cancel the watershed step by deleting the current
label: this will take you back to the original marker labels, that you could then adjust or complete
before applying again the watershed tool (see Figure 6.66).
2. You may also use the Label field: selector menu to simply go back and forth between markers
and watershed results or different segmentation results.
3. You may also use the Image: selector menu to temporarily change segmented image used as
background, then go back to actual image being segmented. This also allows the user to display
in the background of the labels the landscape image created using Create a new gradient image.
You may need to adjust the data for better visualization.
4. You can notice that grains may not be separated as one could expect: that could happen because
of truly consolidated grains with an intermediate intensity phase in some case, or because of
image resolution and partial volume effects. This could then require improving the seed markers
(see for instance TopHat tool) and/or gradient (see Image Gradient module), or this could be
solved by separating particles using for instance Separate Objects.
5. After using the watershed tool, you may want to polish the segmentation for instance by using
Smooth labels... or Remove islands... in Segmentation menu (illustrated in the tutorial about
advanced meshing).
• Open data/tutorials/chocolate-bar.am.
Auto-Thresholding
This dataset contains regions with mousse, caramel, chocolate and air.
One could try first segmenting 3 phases (air, mousse filling, chocolate) using for instance Multi-
Thresholding, or the Segmentation Editor. We will try using Auto Thresholding: this module analyses
the image histogram to guess 1 or 2 threshold(s) separating voxels classes statistically. This module
provides a quick way to segment images automatically.
A mousse layer (light blue) seems to surround the chocolate topping (dark blue): the mousse between
the exterior and the chocolate is actually an artifact due to partial volume effect (see Figure 6.67 and
Figure 6.68). Adjusting the thresholds will not solve that issue. As illustrated in figure 6.69, the image
gradient gives useful hints on actual boundaries. Instead of using direct intensity thresholding, a more
robust method is shown in the next section that takes advantage of the image gradient.
1. Define ”conservative” thresholds defining initial seed markers for air, mousse and chocolate,
2. Calculate image gradient magnitude mapping material edges ”sharpness”,
3. Mark sharp edges between air and chocolate to prevent ”coating effect” by masking the seed
markers,
4. Complete watershed expansion of the seed markers towards objects edges.
• Remove Auto Thresholding module and its result data, leaving only chocolate-bar.am in
The wizard module being selected in the Project View, you can see in the Properties panel the module’s
ports showing the current step with possible options and parameters (see Figure 6.70). You can go back
and correct previous actions at any step.
Tip: The wizard keeps intermediate data for going back in the steps. For large data that might exceed
available memory, you may want to show and remove intermediate when going to next step (use object
menu ”show”). Unrolling the steps will then no longer be possible.
• At any time you can move the slice or change its orientation. The current view is XY slice
number 147.
• At first step, you need to input the number of separate materials or phases to segment: let the
number of phases to 3 for air (exterior), caramel and chocolate.
• Press the Apply button (in the port Action).
The next step is intended to allow attaching optionally a pre-computed gradient image (port Gradient)
• Simply press Apply to trigger computation of gradient magnitude for the images.
At the next step ”Threshold Gradient Magnitude”, you can use a slider to adjust a threshold to mark
sharp edges based on gradient obtained at previous step.
The three next steps ”Threshold Phase...” allow you to define marker labels for each material.
In the next step, you can set the range for phase 1 (mousse).
• You can use 629-674 as range here. Again, the goal is to mark inner areas of the given material.
(see Figure 6.74). If you select a lesser lower range, areas between the air and the chocolate will
be selected, and it will result in the same artifact than the one introduced in Figure 6.67.
• Press Apply to complete this step.
Finally, in the next step, you can set the range for phase 2 (chocolate).
• You can use 1041-1910 as range here (see Figure 6.75). The mousse area should be avoided as
much as possible.
• Press Apply to complete this step.
You may want to get rid of the air phase that has been segmented as label 1 by the wizard. To do this,
you can simply use the Subtract Value module with value 1, or the more general Arithmetic module
with expression ”A-1” (see Figure 6.77).
If not satisfying, the segmentation editor can be used to correct or refine the segmentation in a few
steps. It is possible to use the segmentation editor to adjust interactively marker regions, and then
apply the watershed tool as shown in previous tutorial.
As another example, small pores could be separately segmented, for instance using the Interactive Top-
Hat module, and combined with previous segmentation using the Segmentation Editor or Arithmetic
module.
An example result is data/tutorials/chocolate-bar-labels-4-phases.am (See Fig-
ure 6.79).
1. Distinguish the different types of image filters available in Avizo, and the main filters typically
used.
2. Use image filters effectively to tune parameters and compare results.
3. Compose application of several image filters.
To follow this tutorial, you should have read the first tutorial chapter 6.1 - Getting Started with Image
Processing and Analysis and be familiar with basic manipulation of Avizo. In particular, in the Getting
started tutorial, you can see how to apply an image filter and the complete quantification workflow
afterwards.
This is the most important category for preparing data for image segmentation. These filters help
smooth noisy images. Some users call these ”denoising” filters. They can effectively reduce noise, but
may require careful use to not alter information contained in the image, especially for quantification
purposes. The most commonly used smoothing filters in Avizo are:
• Median Filter - a basic filter preserving edges. Very effective on salt-and-pepper noise (scatter
dots).
• Bilateral Filter - filter balancing smoothing and edge preserving (in particular sharp angles). It
requires an Avizo license.
• Non-Local Means (GPU accelerated). This filter is extremely effective on noisy data while pre-
serving edges (best with white noise). It is generally the first choice for noisy images. However,
it can be very time consuming. Reducing the search window will decrease computation time,
but it may also reduce the smoothing efficiency (depending on the noise distribution). Edge
enhancement should preferably not be applied before this filter. It requires an Avizo license.
• Edge-Preserving Smoothing - a diffusion filter preserving edge
• Anisotropic Diffusion - a GPU accelerated diffusion filter. It requires an Avizo license.
• Curvature-Driven Diffusion - a diffusion filter that may better preserve thin structures. It requires
an Avizo license.
Tip: Make sure that the filter parameters such as contrast thresholds for edge preserving diffusion are
set according to your data range. Default ranges are usually intended for 8-bit data, and need to be
dramatically increased for higher dynamics of 16-bit images.
6.7.1.2 Sharpening
These filters help reinforce the contrast at edges and make details appear sharper. Commonly used
sharpening filters are:
• Unsharp masking
• Delineate - also acts as smoothing filter. It requires an Avizo license.
These filters highlight boundaries between different materials or phases. They can be used, for in-
stance, to directly extract feature contours and edges, or in watershed-based segmentation.
(See tutorial 6.6.1 - Advanced segmentation).
Here are the most commonly used modules in that category:
• Sobel Filter - quick basic edge detection, that can be used as approximation of gradient magni-
tude
• FFT - Fourier transform, basis module for many image filtering techniques
• Deconvolution - specific module for deconvolution of 3D light microscopy images
Modules in that category are not strictly speaking image filters. Filters mentioned above usually oper-
ate on pixels by examining a neighborhood of intensity values around each pixel. Grayscale transforms
independently act on pixels, i.e., without considering neighboring pixel values. The following modules
can be useful to correct globally image grayscale or shading:
• Shading Correction, Shading Correction Wizard, Correct Z Drop, Background Detection Cor-
rection - these modules can help to compensate non-uniform background in images
• Match Contrast - adjust image dynamics according to a reference. It requires an Avizo license.
Here is how to use the Filter Sandbox module. The Filter Sandbox can be very helpful to choose a filter
and adjust its parameters. Note however that this convenience script module proposes only a selection
of the most commonly used filters, among the filters available in Avizo.
An Ortho Slice is displayed in the 3D viewer, with an overlaid preview box surrounded by a dragger
with blue tabs.
• In the properties panel, set the Filter port to Median. You can see that the filter is applied in the
preview area.
• You may pick and drag or resize the preview box (first press the ESC key to set the 3D viewer
in interaction mode). Keeping a small size at first may save time when trying filters.
• You can change filter parameters such as the number of iterations. Note that when setting in-
terpretation to 3D, the filter is applied to a 3D slab with a depth depending on parameters. 3D
filtering can be significantly slower, even on a limited preview area.
• You can temporarily hide preview (port Preview) to see original vs. filtered.
• With the port Histograms, you can display histograms calculated on original and filtered preview
area, in order to see how the filter helps to better separate peaks. You can right-click in the
histogram plot to switch plot scaling between linear and logarithmic. A statistics summary is
displayed in the Properties panel.
• Change Preview type to Interactive Thresholding: you can then adjust a threshold and verify the
For information about how to compare results of image filters, see also the tutorial chapter 8.2 Data
fusion, comparing and merging data, in particular the example showing how to synchronize views and
display modules.
The following example illustrates possible techniques for filter combination, however it is not intended
to show the preferred solution in a specific realistic case, nor a general solution. In general, filters such
as Bilateral or Non-Local Means can achieve a good job at smoothing while preserving edges and
should still be tried first.
The process is split in several steps:
Now, you will use an Arithmetic module to basically compose the filtered image using the bilateral-
filtered image (B) for the edge areas and the median-filtered image (C) for the uniform areas. Both
images are blended linearly using the normalized Sobel-filtered image (A) as follows:
B ∗ A + C ∗ (1.0 − A)
• As Catalyst-filtered.am type is 8-bit unsigned byte image with 0-255 as range, set
output type to 32-bit float and Scaling: scale so that output range is 0...1 (use 0.00392157,
almost equal to 1/256). You could alternatively change A by A/256 in expression below.
• Press Apply to create Catalyst-filtered.to-float
• Attach an Arithmetic module to the Catalyst-filtered.to-float.
• Set Input B to Catalyst.filtered (result of Median Filter), Input C to
Catalyst2.filtered (result of Bilateral Filter).
• Set Expr to B*A + C*(1-A) and press Apply.
• Attach an Ortho Slice module to Result.
• Set Colormap range to 0-255.
The top of the dialog displays the list of all measure groups and a set of tools. The list can be used to
browse the measure groups, and to select a group.
When the dialog is opened from a module such as Label Analysis, the group selected in the measure
selection port is directly displayed in the dialog. On the other side, when the dialog is validated, the
measure selection port is updated with the measure group selected in the dialog.
With the measure group tools, you can:
The following default groups are not editable. However each one can be copied with a new name and
then this copy can be edited.
• basic group, used for 3D images, contains the measures Volume3d, Area3d, BaryCenterX/Y/Z
and Mean.
• basic2D group, used for 2D images, contains the measures Area, BaryCenterX/Y and Mean.
• Standard Shape Analysis group contains standard shape parameters measures.
• Weighted Shape Analysis group, contains weighted shape parameters measures.
Selecting measures
The left panel lists the user and native measures. The right panel lists the measures selected in the
current group. To add a measure to the selection group or remove it, just double-click the selection
from the list. To add or remove several measures at once, select them and use the central buttons [>]
and [<]. The <Delete> key shortcut is also available to remove the selected measures.
• Feret angles: Used for Feret 2D measures which perform measurements on a XY plane along
a given numbers of diameters of each cell. Angles are uniformly sampled by the range [0,180].
By default, there are 10 angles every 18 degrees.
• Feret 3D angles: Used for Feret 3D measures, which perform measurements in a 3D space
around each cell. By default, 31 3D samples are used.
• Co-occurrence directions: Used for measures based on the computation of a co-occurrence
matrix, to classify a given direction (dx,dy) in pixels pairs by their gray level. The co-occurrence
matrix components are given by the following formula:
where I(x,y) is the image gray level at coordinates (x,y). This equation means that for a given
pair (i,j), M(i,j) contains the number of pixels verifying I(x,y) = i and I(x+dx,y+dy) = j. This
matrix is symmetric and normalized such as:
N
X
∀(i, j), M (i, j) = M (j, i) and M (i, j) = 1 with N the number of gray levels of the image
i,j=1
These operations allow being independent to the image size and to hold properties on a direction
and its symmetry.
• Histogram parameters: Used for measures based on the computation of the gray level histogram
of each label. Configurable attributes are in the range of gray values to consider and the size of
the bins to generate. By default, those settings are computed automatically.
• Quantile values: Used for configurable HistoQuantile measures. See also Quantile of an his-
togram.
• Breadth 3D sampling: Used for the Breadth 3D measures that search for the biggest orthogonal
Feret diameter to the major axis found with Feret 3D. The Breadth 3D value defines the sampling
that will be used on each orthogonal plane after Feret 3D has been used. The sampling of Feret
3D should be set to the desired value before using this measure.
Important note: Attribute values are common between measures. This means that when you edit the
number of Feret angles for the measure, FeretShape for example, all other measures based on the Feret
angles will use this new value.
Note: Only the attributes supported by the edited measure are enabled in the dialog.
This is fine in the console , but it may cause hidden dependencies issues when used in scripts where a
measure named ”mymeasure” already exists. In scripts, the following is preferred:
6.9.1 Requirements
6.9.1.1 Binarization of the input image
The algorithm requires a binary image as input. Hence, as a first step a binary segmentation of the
image is needed to distinguish between foreground and background. Gray-scale images can be bi-
narized by thresholding. See also the section ”Binarization of grayscale image” in Getting Started
with Advanced Image Processing and Quantitative Analysis. We typically use one of the following
methods:
To follow the next steps, load the data set Stone binary-segmentation.am from
data/tutorials/cavityanalysis/ folder.
6.9.1.2 Hardware
The Compute Ambient Occlusion module requires an NVIDIA graphics card supporting CUDA Com-
pute Capability version 2.0 or higher. To prevent CUDA errors and time-outs, it is highly recommended
that a high-end graphics card is used.
In order to compute the ambient occlusion field, please carry out the following steps.
• Click on the Stone binary-segmentation.am object in the object pool with the right mouse button
and type the word Ambient into the search line of the popup dialog. Select the Compute Ambient
Occlusion entry. As result, a new red object appears in the object pool (see Figure 6.91).
• The default value of the Max Distance port is set to its maximum. This ensures that the rays
being cast do not terminate before either reaching a foreground voxel or the bounding box. In
order to speed up the computation, decrease this value.
• Set the Number of Rays port to 100, to increase the sampling, though 50 usually suffices (see
Figure 6.92). In order to compute the ambient occlusion field for the background of the binary
image press the Apply button and wait. Depending on your graphics card, it might take a few
seconds up to a minute to compute.
As result, a new data object has appeared in the object pool named Stone binary-
segmentation.ambientOcclusion (see Figure 6.93). This is a float scalar field containing values be-
tween -0.1 and 1.0. Values of -0.1 are reserved for the foreground voxels. For background voxels,
In order to compute a threshold segmentation using the ambient occlusion field as input, please carry
out the following steps.
1. Right-click on the ambient occlusion field in the object pool and attach an Interactive Thresh-
olding module to it.
2. Go to the Intensity Range port and set the lower threshold to 0.7. Our experience has shown that
this is a suitable range for many datasets to compute a threshold segmentation from the ambient
occlusion field.
3. Press the Apply button.
This generates a binary segmentation of the cavity structure that can be visualized, for example, using
the Voxelized Rendering module (see Figure 6.94).
6.9.2.3 Postprocessing
In most of the cases, the result of this segmentation will still contain some noise. That is, small labels
that are not connected. You can do the post-processing in the Segmentation Workroom. One way to
do so is to use the Magic Wand tool (see Figure 6.95). For more details, see the Segmentation Tools
section.
References
1 D. Baum, J. Titschack, Cavity and Pore Segmentation in 3D Images with Ambient Occlusion,
EuroVis 2016 - Short Papers, 2016, DOI: dx.doi.org/10.2312/eurovisshort.20161171
2 J. Titschack, D. Baum, K. Matsuyama, K. Boos, C. Färber, W.-A. Kahl, K. Ehrig, D. Meinel,
C. Soriano, S. R. Stock, Ambient occlusion - a powerful algorithm to segment shell and
skeletal intrapores in computed tomography data, Computers and Geosciences, Vol.115, pp.
75-87, 2018, DOI: dx.doi.org/10.1016/j.cageo.2018.03.007
Avizo allows the user to create geometric models derived from various types of data: surfaces from
point sets, surfaces from 3D images, tetrahedral grid from surfaces, center line spatial graphs from
3D images. For an overview of related features, please refer to the Features overview section. The
tutorials in this chapter introduce the following topics:
As a prerequisite for the following steps, you need a label image, which holds the result of a previ-
ous image segmentation. Please load the provided motor.labels.am data set from the data/tutorials
directory.
The Border option ensures that the created surface be closed. A new data object motor.labels.surf is
generated. Again, it is represented by a green icon in the Project View.
• Select the surface motor.labels.surf. Since the Simplifier is directly modifying the surface data,
you may want to duplicate your initial surface before proceeding so you can start again if you
do not reach the expected result.
• Click on the Simplification Editor icon in the Properties Area.
• You can set the desired number of faces in the Simplify port, or preferred method, you can
assign a maximum and minimum size for the triangles. Try 0.02 for max distance and 0.01 for
min one. You can estimate this size by looking for instance at the bounding box min and max
value of the data. Giving a too small number of faces or a too large max distance may result in
an over-simplified surface with self intersecting faces.
• Testing for intersections can be necessary, particularly if you are simplifying a multi-material
surface or a complex surface. In order to activate this, you can check the intersection tests
strategies toggle in the Options port and set your intersection tests strategy in the Intersections
port.
• Push the Simplify now button in the Action port.
The number of triangles is reduced from over 1.2 millions to 50K. The progress bar tells you how
much of the simplification task has already been done.
To examine the simplified surface, attach a Surface View module to the motor.labels.surf data object.
The Surface View module maintains an internal buffer and displays all triangles stored in this buffer. By
default, the buffer shows all triangles forming the boundary to the exterior. If you change the selection
at the Materials port, the newly selected triangles are highlighted, i.e., they are displayed using a red
wireframe representation. The Add and Remove buttons cause the highlighted triangles to be added to
or removed from the buffer, respectively. You may easily visualize a subset of all triangles using a 3D
selection box or by drawing contours in the 3D viewer. Press the Clear button of the Buffer port to see
the display shown in Figure 7.1.
As a prerequisite for the following steps, you need a triangular surface, which is usually the result of
a previous surface reconstruction. Please follow the Surface Reconstruction tutorial and keep the last
surface in the Project View.
Automatically, a Surface View module will be attached to the motor.labels.surf surface. For details
about that module see, its description.
When the Surface Editor is invoked, the Surface menu is added to Avizo’s menu bar and a new toolbar
is placed just below Avizo’s viewer toolbar. The Surface/Tests menu contains 8 specific tests which are
useful for preparing a tetrahedral grid generation. Each of the tests creates a buffer of triangles which
can be cycled through using the back and forward buttons.
• Select Intersection test from the Surface/Tests menu. The total number of intersecting triangles is
printed in the viewer window. Intersections shouldn’t occur too often if toggle fast was switched
off during surface simplification. In case they occur, the first of the intersecting triangles and its
neighbors are shown in the viewer window.
• You can manually repair intersections using four basic operations: Edge Flip, Edge Collapse,
Edge Bisection, and Vertex Translation. See the description of the Surface Editor for details.
• After repairing, invoke the intersection test again by selecting it from the Surface/Tests menu or
by pressing the Compute button.
• When the intersection test has been successfully passed, select the Orientation test from the
Surface/Tests menu. After surface simplification, the orientation of a small number of triangles
may be inconsistent, resulting in a partial overlap of the materials bounded by the triangles. In
case of such incorrect orientations, which should occur quite rarely, there is an automatic repair.
A successful pass of the intersection and orientation test is mandatory for tetrahedral grid generation.
These tests are automatically performed at the beginning of grid generation. So you can directly enter
the Generate Tetra Grid module (see below) and try to create a grid. If one of the tests fails, an error
message will be issued in the console window. You can then go back to the Surface Editor and start
editing.
• Select Aspect ratio from the Surface/Tests menu. This computes the ratio of the radii of the
circumcircle and the incircle for each triangle. The triangle with the worst (i.e., largest) value is
shown first, and the actual value is printed in the viewer window. The largest aspect ratio should
be below 20 (better below 10). Fortunately there is an automatic tool for improving the aspect
ratio included in the Surface Editor.
• Select Flip edges from the Surface/Edit menu. A small dialog window appears. In the Radius
ratio area, set the value of the ”Try to flip an edge if ratio is worse than” field to 10. Select
mode operate on whole surface. Press the Flip button. All triangles with an aspect ratio larger
than 10 will be inspected. If the aspect ratio can be improved via an edge flip, this will be done
automatically. The console window will tell you the total number of bad triangles and how many
of them could be repaired. Press the Close button to leave the Flip edges tool.
• Select again Aspect ratio from the Surface/Tests menu. Only a small number of triangles with
large aspect ratio should remain after applying the Flip edges tool.
• Select Dihedral angle from the Surface/Tests menu. For each pair of adjacent triangles, the
angle between them at their common edge will be computed. The triangle pair including the
worst (i.e., smallest) angle is shown and the actual value is printed in the viewer. The smallest
dihedral angle should be larger than 5 degrees (better larger than 10).
• For a manual repair of a small dihedral angle, proceed as follows: select the third points of both
triangles (i.e., the points opposite to the common edge) and move them away from each other.
For moving vertices, you must enter Translate Vertex mode by clicking on the first icon from the
right on the top of the viewer window or by pressing the "t" key. If the viewer is in viewing
mode, switch it into interaction mode by pressing the ESC key or by clicking on the arrow icon
(the first icon from the top) on the right of the viewer window. Click on the vertex to be moved.
At the picked vertex, a point dragger will be shown. Pick and translate the dragger for moving
the vertex.
• In some cases, an edge flip might also improve the situation. Enter Edge Flip mode by clicking
on the third icon from the right on the top of the viewer window or by pressing the "f" key.
Switch the viewer into interaction mode. Click on the edge to be flipped.
Hint: In order to see the entire surface again, select the Surface View icon, then press its Clear button
and press the Add button, then press the ViewAll button in the viewer toolbar.
• Connect a Generate Tetra Grid module to the motor.labels.surf surface by choosing Compute /
Generate Tetra Grid from the popup menu over the motor.labels.surf icon. You can also choose
to start by loading the motor.simplified surface from the tutorial directory.
• Leave toggle improve grid switched on and toggle save grid switched off at the Options port.
The improve grid option will invoke an automatic post-processing of the generated grid, which
improves tetrahedral quality by some iterations that move inner vertices and flip inner edges and
faces. See the description of the Grid Editor for details.
If toggle save grid is selected, an additional port Grid appears, where you can enter a filename.
The resulting tetrahedral grid will be stored automatically under that name. If you want to run
grid generation as a batch job, you must select the save grid option.
• Press the Meshsize button of the Action port. An editor window will appear. It allows you to
define a desired mesh size, i.e., mean length of the inner edges to be created, for each region.
For this you must enter the bundle of that region, and select parameter MeshSize. Then you can
change the value in the text field at the lower border of the editor. There are some predefined
region names in Avizo for which a default mesh size will be automatically set. Make sure that
the default values are suitable for your application. If you are not sure about a suitable value,
set the desired mesh size to 0. In this case, the mean edge length of the surface triangles will be
used.
• Press the Run now button at port Action. A popup dialog appears asking you whether you really
Once grid generation is running, the progress bar informs you about the number of tetrahedra which
already have been created. In some situations, grid generation may fail, for example, if the input
surface intersects itself. Then an error message will occur at the Console Window. In this case, go
back to the Surface Editor to interactively fix any intersections.
After the tetrahedral grid has been successfully created, a new icon called motor.labels.grid will be
put in the Project View. You can select this icon in order to see how many tetrahedra the created grid
contains. If grid generation takes too long, you may also load the pre-computed grid motor.tetragrid.am
from the data/tutorials directory.
As the very last step, you may want to have a look at the fruits of your work:
• Hide the Surface View module by switching off its visibility toggle or removing it from the
Project View.
• Attach a Tetra Grid View module to the motor.labels.grid.
• Select the Tetra Grid View icon
• Set the Materials port to Material 3
• Press the Remove button of the Buffer port.
• Select outlined in the port Draw Style
The Tetra Grid View module maintains an internal buffer and displays all tetrahedra stored in this
buffer. By default the buffer contains all tetrahedra. You may easily visualize a subset of all tetrahedra
using a 3D selection box or by drawing contours in the 3D viewer.
Similar to the Surface Editor, there is a Grid Editor which can be invoked by selecting the green icon of
the tetrahedral grid and clicking on the pencil icon (first from the right in the title bar) in the Properties
Area. The editor aims to select tetrahedra with respect to different quality of measures, e.g., aspect
ratio, dihedral angles at tetrahedron edges, solid angles at tetrahedron vertices, and edge length. The
editor contains several modifiers that can be applied for improving mesh quality.
Avizo is used for geometry modeling from 3D images in a wide range of areas: industrial inspection
and reverse engineering, digital rock physics, characterization of materials and design such as fuel
cells, concrete, catalysts, metals, composites, carbon nanotubes, etc.
• Extract 3D surfaces and grids with image-driven accuracy and consistency for single or multi-
materials.
• Simplify and refine meshing for manageable mesh size and controlled mesh quality.
• Assign boundary conditions for simulation and export the resulting data.
You may skip the last two steps if you are only interested in surface extraction and not in grid genera-
tion.
You should be familiar with the basic concepts of Avizo to follow this tutorial. In particular, you should
be able to load files, to interact with the 3D viewer, and to connect modules to data modules. All these
issues are discussed in Avizo chapter 2 - Getting started.
To apply this tutorial to your data, the image filtering and segmentation steps may be critical: you will
find important information about this in Avizo tutorials.
For the purpose of numerical simulation, Avizo can be complemented with Avizo XWind Extension
in order to export and import data to standard and commercial software file formats such as Abaqus,
ANSYS, CGNS, OpenFOAM, etc. Avizo XWind Extension provides advanced visualization and post-
processing of numerical simulation results. See chapter 14 - Avizo XWind Extension User’s Guide for
more information.
Avizo actually provides support for different numerical simulation approaches: FEA/CFD solvers
as illustrated in this tutorial, but also pre-processing for Pore Network Modeling (see chapter 7.5 -
Avizo Skeletonization User’s Guide), and direct simulation add-on for Avizo (see chapter 15 - Avizo
XLabSuite Extension User’s Guide) . Avizo XLabSuite Extension does not require geometry pre-
processing and provides experiment simulation and effective property tensor calculation for properties
such as absolute permeability, molecular diffusivity, electrical resistivity (formation factor) and thermal
conductivity.
• SandPack128.labels.am is the data set from which are obtained all the pictures in this
tutorial,
• SandPack50.labels.am is a smaller data set, extracted from the previous one, that you
can use to complete the tutorial steps in a shorter time.
In order to build a 3D mesh made of 3D elements or cells, you need first to build 3D surfaces repre-
senting the boundaries of the volumes you want to mesh. In order to do this, you can use the Generate
Surface module onto the label image. However, you may first want to clean up the label image by
removing unwanted or useless features and by smoothing noise and voxel aliasing, in order to get an
accurate, yet not unnecessarily complex surface.
• With Open Data in File menu, load SandPack128.labels.am from the data/sandpack
subdirectory in the Avizo installation directory. Remove the Ortho Slice that was created at data
loading.
• In the label image property area, invoke the Segmentation Editor in order to access the tools
necessary to clean up the labels (see Figure 7.5).
The Label Filters tools, available in the Segmentation menu of the menu bar, provide means to modify
the current labeling.
There may be small islands in the label image, that are not meaningful for the material visualization or
for the simulation to come.
• In the top-right viewer, use the cursor to move the XY slice to position 107.
Looking at this slice, you can observe a small island that needs to be cleaned in order to generate a
suitable surface. If you move the slider back and forth, you will see that the island is part of a small
bubble and not of a large material. The Segmentation Editor provides a tool to detect and remove
automatically such disconnected regions.
Notice that if you select Current slice or All slices, the size is defined as the area of contour in a 2D slice
and you may remove thin material that may have a large and meaningful volume, possibly connected
in 3D.
In order to correct contour roughness due to voxel aliasing, the Smooth labels tool can be used. This
smoothing process can be iterated until the desired level of smoothness is reached. Smoothing slightly
changes the labeling, but also assigns probability weights to voxels that can be used later on by Gen-
erate Surface for generating smoother surfaces.
Note: Smoothing can alternatively be performed during the surface generation in the Generate Surface
module as discussed in the next section.
Tip: The smoothing and islands removing tools will work along one direction unless ”3D volume”
option is selected in the tool’s dialog box. The direction will then be the one corresponding to the
currently selected view in the 3 orthogonal views of the Segmentation Editor. In some cases, you may
want to repeat the smoothing or removing islands process in all of the 3 directions, instead of applying
the tools to ”3D volume” at once.
Tip: The Segmentation Editor is especially appropriate for fine control of the segmentation with visual
feedback. For some workflows, you can also consider filtering the label image by using modules such
Label Analysis and Analysis Filter, Filter by Measure, or Axis Connectivity (binary label image).
Figure 7.9: Results of the different kind of smoothing on a segmented grain: None (top left), Existing Weights (top right),
Constrained Smoothing (low left) and Unconstrained Smoothing (low right).
Note: If you have a thin material, a strong smoothing can actually delete the material. Look at the
Generate Surface documentation for a full description of all parameters.
• Connect a Generate Surface module to the label image (see Figure 7.10).
• Check that the Smoothing Type is set to Existing Weights. This option is only available if the label
image contains probability weights information, which was created when applying smoothing
in the Segmentation Editor in the previous steps.
• In the Border port, check the Fit To Edges option. This will cause the resulting surface to sharply
fit to the edges of its bounding box.
• Press Apply.
• Attach a Surface View display module to the resulting surface (see Figure 7.11).
You now have a 3D surface object that consists of three patches corresponding to the number of mate-
rials identified in the label image (including the Exterior). The number of triangles resulting from the
Generate Surface module may be very large and not suitable for visualization or simulation. The trian-
gles generated through this first step may also not be suitable for simulation, considering the triangles
aspect ratio for instance.
Figure 7.11: Surface generated from the two phases label image.
For the purpose of meshing the 3D volume from the generated surface, some quality checks for the
surface are available with the Generate Tetra Grid module. This is useful to see if some improvements
are required to perform the grid generation instead of directly running a grid generation that would fail
or result in a bad quality grid.
• Connect a Generate Tetra Grid module to the surface (see Figure 7.12).
• Press on the Check button in port Action.
Note: The Simplification Editor will do in-place simplification, so the exact initial surface will be lost.
As a consequence it is recommanded to duplicate the surface prior to simplification. A shortcut for
this is to select the surface data object in the project view and press Ctrl-D. You may also want to use
later on the shortcut F2 to rename a surface data for better reflecting its content.
Look at the Simplification Editor documentation for a full description of all parameters. Default pa-
rameters will simplify the surface and generate large triangles in flat areas while generating smaller
ones in areas of high curvature, so details are preserved. This is suitable to speed up visualization of a
large surface, or to export a lightweight triangular surface file (see Figure 7.14).
For simulation purpose, most of the time, one wants balanced triangles, so instead of using the default
option of decimating to a given number of faces, you can use the max dist field in the Simplify port to
tell the editor what edge maximum length you are trying to achieve.
Tip: A good estimate of max dist can be to initialize this port to roughly 1% of the minimum dimension
of the volume. You can use Local Axes to display the actual dimension of your volume.
Note: The resulting number of triangles should be targeted to be around twice the number of triangles
targeted for simulation because in a next step (the remeshing step), this number will be reduced by
half. So if a suitable surface for simulation is containing around 100,000 triangles, you need after this
simplification step to have a surface twice as complex so around 200,000 triangles.
When the Surface Editor is activated, a tool bar and a new menu Surface are available (see Figure
7.17).
• Open the Surface menu and in the Tests submenu, select Intersection test. You can alternatively
pick the Intersection test in Selector tool of the tool bar (see Figure 7.18).
The result of the test is displayed on top of the 3D viewer. In the current case, there is no intersection,
so you can skip to the next test. However, be aware that intersections can be fixed automatically using
the Fix intersections... tool in the Edit submenu (see Figure 7.19) or manually by using the Surface
Editor tools in tool bar.
The triangle with the highest aspect ratio is displayed in the 3D viewer and the value of the aspect ratio
is given in the top left corner (see Figure 7.20). It is possible to observe the next highest aspect ratio
triangle by pressing on the right-pointing arrow in the Surface editor tool bar.
Prepare Generate Tetra Grid combines the Flip edges..., Fix small dihedral angles..., and Fix tetra
quality... tools.
If you run the Aspect ratio test again on the surface, you notice that the highest triangle aspect ratio
has a much more acceptable value (below 30).
At this point, you can perform quality checks again thanks to the Generate Tetra Grid module and see
also that all tests results are more acceptable.
If the surface you are editing happens to have intersections or too high triangle aspect ratio or any other
issue revealed by some test on it, you may need to interact with the surface to correct it. To do so, you
have to use the Tests menu and to select the test corresponding to your issue. The first problematic
triangle, will be displayed, highlighted in red, among its neighbors.
For example, on the surface considered for this tutorial, the triangle with the highest aspect ratio can
be improved:
Another way to improve the quality of triangles is to collapse one edge of the triangle using the Con-
tract Edges tool:
• Run the Aspect ratio test to get the next bad triangle.
• Switch to interaction mode (press [Esc]).
• Select the Contract Edges button in the Surface Editor toolbar (or press shortcut O key) (see
Figure 7.23).
• Click on the edge of the triangle you want to remove (see Figure 7.24).
Figure 7.24: Editing a triangle with the Contract Edges tool to improve its quality.
At this step, you may want to re-run the Prepare Generate Tetra Grid tool.
You can ask now Avizo to remesh the surface using Remesh Surface module.
In the Desired Size port of the module, it is possible to set the targeted number of triangles as a
percentage of the original surface number of triangles.
If the surface is quite simple, the rest of the default parameters can be used, but if the surface is not
so simple, for example if it includes multiple patches, tuning the parameters in advanced mode will be
useful.
Smoothness is an important parameter in the advanced options. This parameter allows for controlling
how sharp you want to keep angles between triangles. This is important if you want to keep sharp
edges, for instance, in your surface (see Figure 7.25).
Figure 7.25: Surface remeshed with two different values for smoothness parameter: 0 (left) and 0.6 (right).
As the current surface includes multiple patches with a lot of common interfaces, in order to mini-
mize intersections near contours, between the generated triangles, the process should be split in two
remeshing steps.
• Check the fix contours check box in the Contour Options port.
• Press Apply to run the remesher a first time.
At this step, there are no intersections, but the contours have shorter edge lengths than the rest of the
mesh. This might be undesired. The next step will adjust the edge length of the contours.
Figure 7.26: From left to right: initial surface, fix contours remeshing, remeshing around contours only.
The triangle based surface can then be exported to various formats including STL, using Export Data
As... in File menu.
At this point, you may want to go through the Surface Editor process again to finalize cleaning of the
surface, check for intersections and check for aspect ratio.
The module is generating a report showing some information about the quality of the mesh (see Figure
7.27). The generated tetrahedral grid can be visualized with a Tetra Grid View display module.
By default, all tetrahedra are generated according to the size of the triangles they are going to be
”attached” to onto the surface.
If you look at the Meshsize parameters for the two phases (pore space is Material1 and grains is
Material2), the value is set to the default value 0, which will trigger automatic sizing of tetrahedra
Figure 7.29: Left: Mesh size set to default (0), right: mesh size set to 2 for pore space (Material1) and 5 for grains (Material1).
Note: If you want to change the size of the tetrahedra on the surface, you can use the Surface Editor
before the grid generation in order to refine or simplify a particular surface patch. You can, for
instance, select a material in the Surface Editor (that will be highlighted in red) and then refine this
patch using the Refine faces command in the Edit submenu of the Surface Editor menu (see Figure
7.30).
• Select the remeshed surface you used to generate the tetrahedral grid.
• Open the Surface Editor.
• Switch to interaction mode (press [Esc]).
• Press on the Magic Wand tool.
The Magic Wand tool can be used in order to select a patch of coplanar triangles. You have to define
the crease angle, which is the criteria used to define coplanarity of triangles and will be used by the
Magic Wand to select neighboring triangles.
• Set the Degrees parameter to a value small enough, such as 10 (see Figure 7.31).
• Select a patch by picking any triangle from this particular patch.
• Open the Surface menu, select the Set boundary ids... in the Edit submenu.
• In the right column, select the type of boundary condition you want to assign to the patch and
then press on Set.
• Repeat the operation as many times as needed to have no face left undefined (see Figure 7.32).
Using the Selector tool from the Surface Editor, you can also select different patches on the whole
surface and assign, for instance, a Wall boundary condition to all of the grain walls.
Figure 7.33: Surface colored by boundary ids: for instance here, top pore space faces are velocity inlet, bottom ones are pressure
outlet (not visible), side ones are periodic boundaries and grain faces are walls.
Once boundary conditions have been assigned to the surface, you can re-assign them to the 3D grid that
was generated previously, so that if saved, these boundary conditions will be exported to the simulation
solver.
• Connect an Assign Boundary Conditions module to the grid (see Figure 7.34).
• In the Surface port, select the remeshed surface on which you just assigned boundary ids.
• Press Apply.
A new grid is created, with boundary conditions assigned. It is suitable for simulation and can be
exported to FEA/CFD software using the File / Export Data As... menu (see Figure 7.35) .
FEA/CFD software format export is available with Avizo XWind Extension.
You can then use Avizo XWind Extension to post-process results of simulation back from the solver
• 3D mesh generation for numerical simulation applications such as flow, stress, or thermal anal-
ysis,
• Export of surfaces or 3D meshes to numerical solvers,
• Post-processing of result data coming from solvers,
• Powerful visualization and analysis of scalar, vector, and tensor fields, coming from either sim-
ulation or measurements.
Avizo XWind Extension is the software suite that includes the Avizo Lite Edition feature set and all
of its extensions required for visualizing, post-processing, analyzing, and presenting results from CAE
and CFD simulations.
For extended support for numerical data - import/export, analysis, and visualization - please refer to
Visualization and Analysis of 3D Models and Numerical Data with Avizo 280
chapter 14 Avizo XWind Extension User’s Guide.
Avizo provides a first level of support summarized in the following sections:
For convenience, in Avizo Lite Edition, the Avizo XMesh Extension gathers modules providing basic
support for visualization of FEA and CFD data.
For a complete overview of features that can complement analysis and presentation of numerical data,
please refer to Features overview section and Chapter 14 Avizo XWind Extension User’s Guide.
The recommended tutorials for post-processing using Avizo XWind Extension can be found in Chapter
14 Avizo XWind Extension User’s Guide.
The on-line version of this chapter contains tutorials for the following topics using Avizo:
Visualization and Analysis of 3D Models and Numerical Data with Avizo 281
specific kind of grid. This is specified in the module help.
In Avizo you can work on:
• Regular grids,
• Unstructured tetrahedral grids,
• Unstructured hexahedral grids.
• Unstructured models grids (arbitrary sets of tetrahedron, hexahedron, wedge and pyramid ele-
ments).
Note: If an Avizo XWind Extension license is detected at run-time, whenever loading files with format
AVS, Fluent, Ideas, Tecplot, or any format supported in Avizo XWind Extension (see File Formats
index for a complete list), an unstructured model grid is created automatically that can be connected
to Avizo XWind Extension modules. This is true even if the file contains only tetrahedra, or only
hexahedra or if the mesh is a regular grid.
Regular grids include four types of grids:
• Uniform grids, the simplest form of regular grids because all grid cells are axis-aligned and of
equal size;
• Stacked grids, that are composed of a stack of uniform 2D slices with variable slice distance;
• Rectilinear grids, where the grid cells are aligned to the axes, with distance between cells that
may vary in each direction;
• Curvilinear grids, each node of which has its position stored as a 3D vector and is numbered one
after another.
For more details, please refer to section 16.5.2.2 for regular coordinate types.
Section 16.5.3 for tetrahedral grids and section 16.5.4 for hexahedral grids contain information on
these grid properties and on their coordinates or data storage systems.
Several display modules exist for the visualization of a grid and of its components, such as the mesh,
the faces, the boundaries or the nodes. It is also possible to visualize only a part of the grid, depending
on the region of interest chosen or on one (or several) material(s) chosen among the different materials
the set under study is made of. To that end, the modules Tetra Grid View for tetrahedral grids and Hexa
Grid View for hexahedral grids provide the user with various powerful display features.
Boundary faces of a tetrahedral grid can be displayed with the previously mentioned modules or with
Visualization and Analysis of 3D Models and Numerical Data with Avizo 282
Grid Boundary and the boundary conditions can be displayed with Boundary Conditions.
Cross sections are available for tetrahedral grids using Grid Cut.
The compute modules Lattice to Hexa Grid, Tetra Grid to Hexa Grid and Hexa Grid to Tetra Grid
convert a grid of one type to another type. Conversion of data might be performed at the same time.
Several tools for grid generation and transformation exist for tetrahedral grids, such as Generate Tetra
Grid (generation of a tetrahedral grid from a 3D triangulated surface), Merge Tetra (combination of
grids) and Align Surfaces (to align triangulated surfaces). You will find an example of grid generation
in the tutorial section 7.2 Creating a Tetrahedral Grid from a Triangular Surface.
The quality of a mesh is critical for the accuracy of the computation that are done on the grid. There-
fore, quality measurement tools such as Tetra Quality for tetrahedral grids and Hexa Quality for hexa-
hedral grids are very useful. Triangulated surfaces can be tested with Triangle Quality.
Figure 7.36: Chocolate bar grid representation colored with respect to the diameter ratio of the tetrahedral cells.
Visualization and Analysis of 3D Models and Numerical Data with Avizo 283
Figure 7.37: Density used as colorfield for the pseudo-coloring of the hexahedral grid of a helicopter combustion chamber
section.
Field Cut for tetrahedral grids has the same pseudo-coloring capability for visualizing cross sections
of a 3D scalar field.
Isosurfaces (e.g., Isosurface for tetrahedra) are powerful display tools to aid in the understanding of
physical phenomena and they are available for every kind of grid supported by Avizo XMesh Exten-
sion.
Visualization and Analysis of 3D Models and Numerical Data with Avizo 284
Vectors module.
The Particle Plot module represents vector fields (for all kind of grids supported by Avizo XMesh
Extension) by particles (cones) pointing in the direction of the local flow. The particle plot can also be
animated to show the flow motion.
Drawing the pathlines of particles is a good way to represent and understand the behavior of a flow,
for example, for turbulent flows with many recirculations. To do so, you can use the Stream Ribbons
module or the Illuminated Streamlines module. The choice of the seed points can be done in different
ways, for example, using the Seed Surface module.
Finally, the Stream LIC Surface module visualizes a vector field defined on an arbitrary 3D triangular
surface using a line integral convolution (LIC) algorithm which generates a surface texture that reveals
the directional structure of the vector field. A similar 2D algorithm is implemented by the Stream LIC
Slice module.
Please refer to tutorial Air flow around an airfoil, especially for Line Integral Convolution and Illumi-
nated Streamlines techniques applications. This tutorial is available in the online documentation.
Figure 7.38: Stream LIC Slice display of the air velocity vector field behind an airfoil.
Visualization and Analysis of 3D Models and Numerical Data with Avizo 285
This technique is especially appropriate for the Particle Pathlines display module. Combined with the
Time Series Control, it represents a vector field by a set of particles that move in time according to the
vector direction and velocity.
Please refer to the Flow around a square cylinder tutorial for suggestions on other Avizo XMesh
Extension modules to use for time dependent data visualization. This tutorial is available in the online
documentation.
Avizo XMesh Extension provides some computational and visualization support for symmetric second
order tensors.
The Extract Eigenvalues module computes the eigenvalues of a symmetric second order tensor. Eigen-
vector to Color creates a color representation of the eigenvectors.
Finally, Tensor View displays symmetric second order tensors using tensor glyphs.
7.5 Skeletonization
Avizo XFiber Extension gathers a set of powerful tools for analysis of network or tree-like structures
Skeletonization 286
in 3D images such as porous, dentritic, vascular, fractured or fibrous networks.
The 3D image must first be segmented into a label or binary image. Avizo offers for this a rich set
of tools, including the Segmentation Editor, as well as advanced image processing tools available
in Avizo. With skeletonization tools, the labeled regions can then be thinned to a 1-voxel thickness
skeleton, equidistant to shape boundaries according to a Distance Map that can be computed by Avizo.
The image skeleton can be converted into a geometrical Spatial Graph for further analysis.
In this chapter you will learn how to:
You should be familiar with the basic concepts of Avizo to follow this tutorial. In particular, you should
be able to load files, to interact with the 3D viewer, and to connect display modules to data modules.
All these issues are discussed in the chapter 2 - Getting Started. For actual use of skeletonization with
your data, you may also need to be familiar with image filtering and segmentation (see chapter 3 -
Images and Volumes Visualization and Processing in Avizo). Further related tools can also be found
in Avizo.
• If the Project View is not empty, press [CRTL+N] to start a new empty project.
• Choose File / Open Data... from the File menu and load the file
data/core/coreSample.am from the Avizo root directory
• Remove the Ortho Slice module.
• Attach an Auto Skeleton module to the data set by selecting Image Processing / Skeletonization
/ Auto Skeleton in the data context menu.
• Adjust the Threshold port of Auto Skeleton module to 27. Leave other ports to their default
settings.
• Press the Apply button to start the processing.
Skeletonization 287
• You may also attach some Display module to coreSample.am such as Image Ortho Projec-
tions.
Figure 7.39: Visualization of the Auto Skeleton result and associated Project View.
The Auto Skeleton module automatically converts the voxel skeleton to a Spatial Graph object. A
Spatial Graph consists of nodes and segments where nodes are the branching points and endpoints,
and segments are the curved lines connecting the nodes. The three dimensional course of a segment is
given by a sequence of points in 3D space. A set of nodes connected by segments is called a graph.
A Spatial Graph data object can store several graphs. Furthermore, Spatial Graph objects can hold
scalar values such as the thickness.
The Spatial Graph is created by Auto Skeleton with a Trace Lines module. Lines may appear jagged
because they connect centers of voxels. By default, Auto Skeleton smoothes the graph lines with a
Smooth Line Set module. Smoothing can be adjusted or disabled. With the default Output Options
port setting Create SpatialView, a Spatial Graph View module is attached to display it.
Skeletonization 288
The distance to the nearest boundary (boundary distance map) is stored at every point in the Spatial
Graph object as the thickness attribute (using Eval on Lines).
Note: The thickness attribute is computed by the Auto Skeleton module as a discrete chamfer
distance multiplied (by default) by 1/3 of voxel size, with a minimum of half voxel size. This may be
used as an estimate of the local thickness. Optionally, a distance map data can define a data parameter
ChamferMapScaleFactor used to adjust thickness attribute (see details in Eval on Lines).
Tip: It may be useful to resample the data to an isotropic voxel size, before using Auto Skeleton
module (Resample). This optional step may improve the result of the distance map and skeletonization
process, and may lead to a smoother spatial graph. Depending on the initial voxel aspect ratio, this
may, however, increase significantly the data size, unless subsampling is used in some direction.
Note: You may notice some star-shaped sets of connected segments in the spatial graph. This may
happen, for example, when the segmentation resulted in a background boundary surrounding a very
small area - like a solid region hanging fully surrounded by void. This may be the sign of too much
noise in the data which would require cleanup processing, such as a Gaussian filter, median filter, or
more advanced filters of Avizo. Such solid islands in segmentation may also be eliminated by using
the segmentation editor or morphological tools.
Tip: In the case of a strict tree topology, it may be advantageous to restrict the search to a tree. You
may want to use the module Centerline Tree to extract a graph with guaranteed tree topology. Note that
Centerline Tree cannot apply directly to a gray image but only to segmented image data: it requires a
label image as input.
It is possible to modify the graph visualization by changing options in the Spatial Graph View module
(Figure 7.40). For example, it is easy to show the segments as tubes whose diameter depends on the
thickness defined by the distance map. This is achieved by selecting the checkbox Tubes on the
Segment style port and changing Tube scale to Thickness. However, be warned that this can be
slow depending on the complexity of the spatial graph and the graphics hardware used. In this tutorial,
the segments will be displayed with a color depending on their thickness:
Skeletonization 289
Figure 7.40: Properties of the Spatial Graph View module.
Figure 7.41: Visualization of the Spatial Graph View result and associated project view.
Skeletonization 290
7.5.2.2 Exporting the Spatial Graph
You can export Spatial Graph data, including connectivity and thickness information, to various for-
mats such as Avizo Spatial Graph ASCII format, SWC and MV3D formats.
• For this, select the data module and select Export Data As... in File menu or data object context
menu.
Parameters {
ContentType "HxSpatialGraph"
}
Skeletonization 291
@5
0.00393701
0.00393701
<...>
You can get some statistics directly from the Spatial Graph data:
Spatial Graph statistics can be saved in several file formats (CSV, XML, TXT).
It can be useful to convert the Spatial Graph object to a Line Set. Line sets provide additional tools
for display, editing, processing or export. For instance, the Line Set Editor can be used to interactively
identify line or node indexes.
Note: in the following, the Line Set Editor is going to be used. It requires Avizo console to be visible,
since it outputs information in it. By default, the console is not visible but it can be easily activated by
clicking on the Console button of the main toolbar.
• Attach a Convert / Spatial Graph to Line Set module to the Spatial Graph data
coreSample.Smt.SptGraph.
• Press the Apply button to create a Line Set.
• Select the created Line Set. In the properties panel, click on Line Set Editor button (see
Figure 7.43).
• Hide the Spatial Graph View attached to coreSample.am. This step is necessary due to the
fact that the lines drawn by this module are overlapping the line drawn by the Line Set Editor. It
could cause problems for picking lines and points during the next step.
Skeletonization 292
Figure 7.42: Spreadsheet containing the results of Spatial Graph Statistics.
Figure 7.43: Properties of a Line Set. The button allowing starting the Line Set Editor is highlighted.
• Set the 3D viewer window to interaction mode (press the [ESC] key or click on the arrow button).
You can now select segments and points of the line set. Corresponding information is displayed
in the console.
• You may also want to see coordinates and image intensity value when picking a point. For this,
attach a Measure And Analyze / Point Probe module to the image data coreSample.am. Make
sure that the Point Probe module remains selected in the Project View. Then, when clicking with
Skeletonization 293
Figure 7.44: Visualization of the Line Set Editor result after a few selections and the associated Project View. Values appearing
are not shown since it depends on the selected points and lines.
the middle mouse button on the line set’s displayed points and segments, the Point coordinates
and Current value of input field are displayed. You could also attach the Point Probe to the
distance map data to display the estimated thickness. See the section below on how to display
the distance map data object.
During visualization of large data sets, there is often the need to restrict the displayed geometry to a
subvolume of the total data set. The ROI Box can help for that. You can attach it to any spatial data
object. A number of display modules have an input connection called ROI that can be attached to the
ROI Box module to restrict the view.
Skeletonization 294
from the Display submenu of the context menu.
• Attach a Display / Line Set View module to the line set data object.
• In the Optional Connections port of the Line Set View, connect the port named ROI to the ROI
Box module. To do this, right-click on the white square on the left side of the Line Set View icon
and select ROI. A blue line is attached to the mouse pointer; after you click on the ROI Box icon,
the two modules are connected.
• Switch the viewer to interaction mode and click and drag one of the green squares. This will
adjust the region of interest and the Line Set View will adopt the new restriction immediately.
• Click and drag on the (invisible) faces of the cuboid to move it to another position.
Figure 7.46 shows an example and the parameters of the Line Set View module.
In the viewer, the lines are now displayed as tubes. The thickness is scaled with the data associated
with the lines.
Note: The data value associated with the lines is the local radius. The Line Set View scales by the local
diameter. To scale to the physical size, you therefore must use a Scale Factor 2.
It can be useful to color the lines in different ways. In the next example, the line set will be colored by
the local z value. First create an Analytic Scalar Field to provide the depth (z value), then set line set
coloring according to values evaluated from this field.
To create the scalar field:
• Right-click in the Project View, then on Create Object... and select Images And Fields / Analytic
Scalar Field.
• Select the newly created icon.
• Type z into the Expr field. The Range info is updated to -0.9...0.9.
• Select the Line Set View object,
• Attach its Scalar field 1 input port in the Optional Connections group to the Analytic
Scalar Field data object.
• Set the Color Mode port in the Coloring group of Line Set View module to
Skeletonization 295
Figure 7.45: Visualization of the Line Set View reduced to the ROI Box and associated project view.
Analytic-Scalar-Field
• Use the Colormap port to change colormap and data range. See Figure 7.47 for more details
about the parameters to modify.
Figure 7.47: Parameters modified in the Line Set View module for coloring the tubes.
Skeletonization 296
Figure 7.46: Visualization of the Line Set View reduced to the ROI Box and the parameters of the Line Set View module.
Figure 7.48: Visualization of the colored Line Set View and the associated project view.
Skeletonization 297
The Line Set object also provides a Tcl script interface to inquire or modify the data. See chapter 11.5
for an introduction to Tcl scripting.
It is possible to convert a Line Set back to a Spatial Graph.
• Delete the Line Set View module, the coreSample.Smt.SptGraph-LS spatial graph
(which should also remove the ROI Box), the Analytic Scalar Field data created in
previous steps, the Spatial Graph Statistics module, the Point Probe module, the
coreSample.Smt.statistics data and the Spatial Graph to Line Set module.
• Select Auto Skeleton module.
• In the Properties panel, Create Objects port, check Distance Map
• In the Properties panel, Options port, uncheck Show Spatial Graph
• Press the Apply button to process skeletonization again.
• Attach an Ortho Slice to the distance map field coreSample.DistField. Result may look
like Figure 7.49.
Figure 7.49: Visualization of the colored Line Set View and the associated project view.
Skeletonization 298
Note that the distance map coreSample.DistField - created by Auto Skeleton with a Distance
Map For Skeleton module - is extended with a 15 voxel border as required by the Thinner module in
this version when attached to data in memory.
• Remove all objects from the Project View (you can right-click in the Project View , then select
Remove All Objects).
• Choose File / Open Data... from the File menu.
• Load the file data/core/coreSample.am from the Avizo root directory.
• Attach a Multi-Thresholding module to the data set by selecting Image Segmentation / Multi-
Thresholding in the data context menu.
• Adjust the Exterior-Range1 threshold port of Multi-Thresholding module to 27.
• Press the Apply button to create a label image coreSample.Labels.
The Auto Skeleton module internally uses a Image Processing / Distance Maps / Distance Map for
Skeleton which in turn internally creates a Image Processing / Distance Maps / Distance Map module
with default settings for chamfer distance. In addition, Distance Map for Skeleton adds to the data a
background border, which is required by the Thinner module.
We will do this step-by-step using the Image Processing / Distance Maps / Distance Map module.
Other distance maps such as those provided by Avizo could be used in a similar way.
Skeletonization 299
Figure 7.51: Visualization of the distance map and the associated project view.
Euclidean distance may be more accurate, yet much slower to compute than the Chamfer distance.
Chamfer distance is generally fine for most applications. In particular, it makes little difference with
the data used in this tutorial.
The result of a Euclidean distance map is a scalar field with floating point values. The Thinner module
expects the distance map input to use positive short integers. An additional 15 voxels border must
also be added in the current implementation. The following steps are needed to adapt the distance map
data:
Skeletonization 300
• In the Crop Editor dialog set Min index to -15 -15 -15 and Max index to 142 142 142.
• Uncheck Add mode port Replicate and set Pixel value to 0.
• Press the OK button: this will extend the image with a border of 15 voxels.
• As an alternative to the Crop Editor, you could also type in the console the command:
coreSample.to-ushort crop -15 142 -15 142 -15 142 0
Next, we can build a spatial graph from the skeleton and display it with geometrical information:
Skeletonization 301
• Attach Spatial Graph Statistics and Spatial Graph View to Spatial Graph to display 3D graph
and statistics as shown in the ”getting started” section.
• In order to improve visualization of the Spatial Graph, click on the module Spatial Graph View.
Toggle off Node. In Segment, change the port Segment Coloring to thickness and in the port
Segment Colormap click on Edit and Adjust range.
Figure 7.52: Visualization of the skeleton as a spatial graph and the associated project view.
Skeletonization 302
7.5.4 Skeletonization with large data
This section is about achieving skeletonization on very large data that may not fit in memory. For the
next tutorial steps, you should have access to a directory to which you’re allowed to write intermediate
files.
The modules Auto Skeleton, Distance Map for Skeleton, Thinner, Trace Lines, Eval on Lines can
operate directly on data on disk, allowing processing of data that cannot fit in memory. Another
distance map module Distance Map on Disk Data is also available for operating on disk data.
These modules currently support reading input and writing image results using the former Large
Disk Data (LDD) format. For converting image data to LDD, you can use Convert to Large
Data Format, accessible by right-clicking in project view, then selecting File / Convert to Large
Data Format. Prior to conversion, you’ll need to type "Convert to Large Data Format"
forceAmira311Format 1 in the console in order to convert the data to a format compatible with
skeletonization modules.
The Auto Skeleton module and Thinner algorithm on disk data also expect a black border around the
data. This border should be at least of size len of ends used during thinning (see the section
above). If the BorderWidth parameter is not specified on the disk data object, a default border is
automatically created with size of len of ends. The Auto Skeleton module expects disk data object
to specify a data parameter BorderWidth. When using Thinner with disk data, you can set the len of
ends parameter manually in the console, for instance: Thinner setVar lenOfEnds 10. This
will set the maximum length of branches to 10 voxels before they are detected as unconnected ends.
Avizo data sets may be saved as separate blocks, which can be useful for multiple acquisitions or large
data sets split into separate files. Avizo has a special data object (Mosaic) for storing links to files
on disk, arranging them in 3D, and other operations on these blocks such as alignment and template
operations like filtering or resampling.
Note: There is no way to convert the new multiresolution LDA format to LDD format directly. A
possible solution is to use Extract Subvolume to extract and save separate blocks, and use Mosaic to
convert these to LDD format.
For now, we will simply use Mosaic as a convenience for converting our data to LDD format while
adding the border necessary for skeletonization process. For more general information about using
large data with Avizo, see section 3.1.6 : Working with out-of-core data files (LDA).
A green icon appears. A Bounding Box display module also appears. When you select the green
module, you see that it contains no bricks (0 bricks in the Info port). The buttons below the Info port
Skeletonization 303
are used to add data objects.
The selected file is added to the Mosaic. The Info port shows the single bricks added. You can visualize
the brick outline with a Mosaic Outline module.
• Create a Mosaic Outline module by right-clicking on the Mosaic and selecting Display / Mosaic
Outline from the context menu.
• Switch off the Bounding Box module.
• You may save the data.
• You can check information stored by Mosaic object by clicking on its Data Parameter Editor
button in the Properties panel.
The next step is to create a new Large Disk Data object and sample the brick onto it. With multiple
Skeletonization 304
bricks, the overlapping regions could be blended with each other. A border can also be added.
Note: The thinning algorithm expects a black border around the data. The border should be at least of
size len of ends used during thinning (see below). By default, a border of 15 voxels on each side
in each dimension. Be sure to check this if you manually set len of ends.
• Attach a Mosaic to Large Disk Data to the Mosaic by right-clicking on the Mosaic and selecting
Convert / Mosaic to Large Disk Data from the submenu in the context menu.
• The red Mosaic to Large Disk Data icon should be selected so the module ports appear in the
Properties area.
You can see several options in the Properties Area. The default options are fine for the tutorial, while
the border could be set to a lower value.
• You need to set the Filename port to a path to output LDD file. Write access is, therefore,
needed. If you saved the Mosaic data object on disk, a default filename derived from the mosaic
file location is displayed in the Filename port. You might want to override it.
• Leave the other ports as they are by default and press the Apply button.
A new green icon which represents the new Disk Data data object will appear in the Project View.
After this, the bricks will be loaded one after the other and will be sampled. This may take some time
for large data.
Some information about the data stored on disk is displayed in the Properties Area. Next,
The second box is slightly bigger than the bounding box of the Mosaic. This is due to the border added
by the Mosaic to Large Disk Data module.
Skeletonization 305
Figure 7.54: Visualization of Large Disk Data and the associated Project View
A few display modules are available for visualization of LDD data (note that the LDA disk data format
offers more powerful visualization capabilities). Several computation modules are also able to handle
the Large Disk Data directly. These include thresholding, computation of a distance map, thinning,
extracting a spatial graph set from a voxel skeleton, and computation of the thickness of the lines
(evaluating the distance map at the points of the line set). You can, therefore, apply skeletonization
directly to large disk data. For other operations, you may need to load a subvolume into the workspace
as an in-memory object, or use Avizo modules for on-disk processing.
The next step is to apply a simple thresholding.
• Attach a Threshold to the image icon by right-clicking on it and selecting Threshold from the
Image Segmentation submenu in the popup menu.
Skeletonization 306
• Set Threshold to 140 in the Properties Area.
• Select a filename to which you want to store the result. In the tutorial, we will use the default
name image.labels.
• Press the Apply button.
A new green icon that contains the labels will appear. Connect an Extract Subvolume module to this
new data, click on the buttons Max width, Max height and Max depth to fit the volume to
extract to the complete volume. Finally, click on the Apply button. Connect an Ortho Slice to the
extracted volume to visualize the result of the threshold.
You might want to correct the result of the segmentation procedure manually. This might be useful to
fill big vessels or remove uninteresting parts. Avizo has a Segmentation Editor to perform this task.
Due to the size of the data, you will have to work on subblocks of the whole data set.
In the next step, we’ll use Auto Skeleton on disk data.
You could also achieve step-by-step skeletonization, computing distance maps with either Distance
Map for Skeleton or Distance Map on Disk Data module, using Thinner, Trace Lines and Eval on
Lines manually, in a similar way to processing memory data.
Here is an example showing skeletonization, which uses a script object module that can be attached to
any label image: ”Porosity network reconstructed”, located in demo/core/coreSkeleton.hx, that can be
accessed from the Examples help menu (in Rock Core Sample Analysis demos).
Skeletonization 307
Figure 7.55: Visualization of the skeleton of the LDD and the associated project view.
Skeletonization 308
Chapter 8
Spatial registration is about aligning or overlaying two or more data sets into the same coordinate
system. In registration, typically one of the data sets is taken as the reference, and the other one is
transformed - moved and possibly rescaled - until both data sets match. Registered data can be pro-
duced by different sensors, at different times, from different object regions, or from different specimens
or models. Image registration methods can be manual, automatic, or semi-automatic. Closely related
to registration is the task of data fusion, i.e., the simultaneous visualization of registered data sets, or
combination into derivative data.
A variety of tools related to registration can be used in Avizo depending on your purpose and on your
data - geometric surfaces, 2D image stacks, or 3D volumes. Registration with Avizo is used in a wide
range of applications, including:
• Industrial inspection of products with respect to reference models and nominal/actual analysis
and reverse engineering,
• Multi-modality image acquisitions such as CT/ MRI (Computed Tomography, Magnetic Reso-
nance Imaging),
• FIB-SEM/µ-CT (Focused Ion Beam-Scanning Electron Microscope, micro-tomography),
• Correlative microscopy,
• 3D image reconstruction from 2D cross sections,
• Imaging of physical experiments or processes - e.g., samples subjected to heat, flooding, com-
pression,
• 3D montage assembly - merging 3D volumes with small overlap.
The following tutorials and examples provide the basics for typical registration tasks.
• Getting started with spatial data registration using the Transform Editor
• Data fusion, comparing and merging data
• Registration with landmarks, warping surfaces and images
• Registration of 3D image data sets
• Registration of 2D image and 3D image data sets
• Alignment of 2D images stacks
• Alignment and pre-processing of FIB/SEM images stacks using the DualBeam 3D Wizard
• Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard
• Registration of 3D surfaces
• Registration of 3D image and surface, nominal-actual analysis
You should be familiar with the basic concepts of Avizo to follow these tutorials. In particular, you
should be able to load files, to interact with the 3D viewer, and to connect modules to data modules.
All of these topics are discussed in Avizo chapter 2 - Getting started. The tutorial section 8.1.1 Using
the Transform Editor is recommended as a starting point in most cases. You can then jump to the topic
for your specific task. In particular, the 2D Slice Alignment tutorial may be read independently.
These tutorials cover common use cases. For specific requirements or applications that differ from
these use cases, you may contact the Thermo Fisher Scientific Hotline for further discussion.
8.1 Getting started with spatial data registration using the Trans-
form Editor
In this section, you will learn how to: change the spatial position of data objects interactively us-
ing various manipulators; how to specify numerically a geometric transformation as a combination of
translation, rotation, and scaling; how to copy/paste geometric transformations; how to apply geomet-
ric transformations to data in order to change actual data coordinates or voxel image axis alignment;
and where to find related tools.
This section has the following parts:
Getting started with spatial data registration using the Transform Editor 310
world origin; likewise it can be rotated with respect to the global axes, and it can be independently
scaled (enlarged or shrunk).
Select View / Global Axes to display the global coordinate axes. Global axes are centered at the origin
of the world coordinates. By default, the x-, y-, and z-axes are drawn in red, green, and blue, respec-
tively. You can also use the viewer’s compass to see 3D space orientation. Select Edit / Preferences /
Layout to change Compass settings.
Every spatial data object in Avizo has an associated 3D bounding box as well as an optional geometric
transformation, which can be defined as a combination of translation, rotation, and scaling (internally
represented as a 4x4 homogeneous affine transformation matrix).
Rotating a scene within the viewer in ”trackball” mode (hand mouse cursor) does not alter the object
position or orientation relative to world coordinates. Rather, it changes the point of view of the camera
around the whole scene. In order to change the geometric transformation of an object, i.e., translate,
rotate or scale it with respect to other objects or to world coordinates, a Transform Editor is available
for every spatial data object.
In the following example, we use the Transform Editor to manipulate surface data objects. This ex-
ample would also apply to images, 3D volumes, or regular scalar fields, using modules such as Ortho
Slice for display.
• Start a new Avizo Project (menu File / New Project, or press Ctrl-N).
• With menu File / Open Data, load the chocolate-bar.simplified surface from the data
/ tutorials subdirectory in the Avizo installation directory.
• Attach a Surface View module to chocolate-bar.simplified data set (i.e., choose Sur-
face View entry from the popup menu of the data set).
• Duplicate the data object. For this, you can select chocolate-bar.simplified and
Getting started with spatial data registration using the Transform Editor 311
press Ctrl-D or right-click and use data menu Object / Duplicate Object. The result is
chocolate-bar2.simplified.
• Attach a Surface View module to the copy chocolate-bar2.simplified. You can still
only see one engine shape in the viewer for now since the two data sets are overlaid.
• Select chocolate-bar2.simplified in the Project View.
• In the Properties Area, invoke the Transform Editor by clicking on the dragger box button. A
manipulator appears around the engine surface in the viewer window: it allows you to change
the transformation in 3D. The white square on the left of the data object icon in the Project View
is changed to blue, indicating that an editor is active.
• Make sure to switch the viewer to interaction mode: press the arrow button in the upper left
corner of the viewer, or toggle between viewing mode and interaction mode using the ESC key.
• Then click and drag a side face of the manipulator: one of the two surfaces that are currently
displayed is translated along the face plane. The data object label is then displayed in italics to
indicate that the data or its attached information has been modified. A manipulator has several
dragger gadgets for controlling the transformation in various ways. Details of how to interact
with the manipulator draggers can be found at the end of this Transform Editor tutorial.
Getting started with spatial data registration using the Transform Editor 312
In the Properties Area, the active Transform Editor adds several button ports to the data object.
• The Manipulator port lets you choose among several interactive manipulators, or select a Dialog
to input numerical values. These are described later in this tutorial.
• The Reset button list lets you restore the independent components of a transformation, e.g., can-
celing the rotation part. Using the Action port, it is possible to Undo/Redo the last transformation
change.
• You can copy/paste a transformation from one data set to another. For instance:
In order to copy transformation from one data set to another, you could alternatively use the module
Copy Transformation from the object menu Geometry Transforms. The Geometry Transforms menu
contains most of the tools related to registration, alignment, and transforms.
The Apply Transform button that you may have noticed in the dialog, commits the transformation. This
topic is explained in more detail in the next section.
To facilitate visual control during interactive transformations, you may create an additional viewer,
adjust the camera for convenient interaction, and control transformation in the other viewer.
Getting started with spatial data registration using the Transform Editor 313
some other modules. However, it does not modify the original coordinates of data unless explicitly
requested. That is to say, how the object is positioned in the 3D world is updated with transformations,
but the coordinates stored in the data object are not updated. For instance, the bounding box of a
3D volume or the point coordinates of a triangulated surface - sometimes referred to as data ”local
coordinates” - as stored in memory remain unchanged by the geometric transformation. This geometric
transformation simply ”presents”, when needed, the transformed world coordinates to the attached
modules.
It is necessary, in some cases, to actually apply the transformation in order to change the data’s initial
local coordinates into world coordinates. For instance:
1. Before exporting data to non-Avizo file formats. When saving data to Avizo format and a few
other formats, the geometric transform is stored at the same time in the file and can therefore
be restored when reloading the data. However, be careful when saving or exporting transformed
data sets. Most file formats do not allow you to store geometric transformations. In this case,
you must apply the current transformation to the data prior to saving it. Nevertheless, when
saving a project, the project file stores transformations for the referred data.
2. When some data processing or manipulation does not support geometry transformation, it re-
quires transformed data coordinates. For instance, the lattice of a transformed volume image or
regular scalar field may need to be aligned with global axes or with respect to another lattice.
This is useful to perform certain lattice-aligned operations as illustrated below.
Here is a first example showing how to apply a transformation to the surface data that you already used
in a previous section:
Getting started with spatial data registration using the Transform Editor 314
Figure 8.5: Before applying transform to surface
Getting started with spatial data registration using the Transform Editor 315
make the volume data appear to stay at the same location, although without any transformation set.
The Transform Editor’s Apply Transform button is not available for images, regular volumes, or scalar
fields. You must instead use the Resample Transformed Image module as in the following example:
Getting started with spatial data registration using the Transform Editor 316
Figure 8.8: After applying Resample Transformed Image
The Resample Transformed Image module can be used for sampling a volume data onto a reference
lattice connected as input. Another useful feature of this module is to reorient volume data along a
given plane by sampling the data on a lattice parallel to this plane. The plane can be set using a Slice
or Surface Cross Section module, by arbitrary rotations, by picking three points, or by a point set to be
fitted.
Applying transformations can also be performed by using the Tcl command applyTransform in
the Avizo console or in a script. Tcl commands relating to transformations are introduced in the next
section.
• The Dialog... button of the Transform Editor pops up the Transform Editor dialog.
Getting started with spatial data registration using the Transform Editor 317
Figure 8.9: Transform Editor Dialog
Advanced users can alternatively retrieve the numerical values of a transformation, by using the Tcl
command getTransform in Avizo console (see spatial data reference for more details on available
commands). The transformation is then printed in the console as the list of matrix values. For instance:
>"chocolate-bar.simplified" getTransform
0.257115 -0.306418 0 0 0.306418 0.257115 0 0 0 0 0.4 0 -4.30079 23.5849 -6.7025 1
This provides another way to copy/paste transformation between objects. It can be done using a single
command as follows:
The components of the transformation can be obtained in human-readable form in the Transform Editor
dialog, or by using the getTransform command with the option -d:
>"chocolate-bar.simplified" getTransform -d
translation: -12 0 -18
rotation: 0 0 -1 50
scaleFactor: 0.4 0.4 0.4
scaleOrientation: 0 0 1
center: 20.0481 23.4785 18.8292
Getting started with spatial data registration using the Transform Editor 318
As explained in the previous section, the transformation is at first set transiently and can be stored by
saving the project, but is not a property of the object. To make the transformation permanent, enter:
<data> applyTransform
and then save the data object. A module is also available for this purpose: Geometry Trans-
forms/Resample Transformed Image. For instance, type in the Avizo console:
>"chocolate-bar.am" applyTransform
The chocolate-bar.am data is changed to a resampled volume and the transient transformation
is reset to zero. In order to provide more flexibility on the resolution of the output grid and the type of
resampling, use the module Resample Transformed Image introduced in a previous section.
• The default manipulator is the Transformer. It allows translations, rotations, and scaling. It is
the most general manipulator for doing an approximate registration.
Figure 8.10: Transformer: Click-drag a corner cube to scale (hold Shift key to constrain direction, hold Ctrl key to fix
opposite corner or face). Click-drag any face to translate (hold Shift key to constrain direction, hold Ctrl key for perpendicular
translation). Click-drag a green ball to rotate one way (hold Shift key for free rotation, hold Ctrl key to change center).
• The Jack manipulator is convenient for translations along an axis and uniform scaling.
Getting started with spatial data registration using the Transform Editor 319
Figure 8.11: Jack: Click-drag rectangle or cylinder rod to translate. Press Ctrl key to change axis. Click-drag cubes to scale.
Click-drag axial lines to rotate.
• The TransformBox is a simplified version of the Transformer that allows translation, rotation
and uniform scaling.
Figure 8.12: TransformBox: Click-drag any small cube to scale. Click-drag any face to translate. Hold Shift to constrain axis.
Click-drag any box edge to rotate.
Figure 8.13: Trackball: Click-drag stripes to rotate. Click-drag anywhere to rotate freely. Hold Ctrl key to scale. Hold Shift
key for user axis and stripe.
Getting started with spatial data registration using the Transform Editor 320
Figure 8.14: Centerball: Click-drag circles to rotate. Click-drag anywhere to rotate freely. Click-drag green arrows to translate
rotation center (Hold Shift key to constrain translation axis).
• The HandleBox allows translation, uniform scaling and anisotropic scaling. It is the most suit-
able manipulator for anisotropic scaling operations.
Figure 8.15: HandleBox: Click-drag any face to translate (Hold Shift key to constrain translation axis). Click-drag a small cube
to scale.
• The TabBox allows translation and anisotropic scaling by box resize. It is used by modules such
as Extract Subvolume or ROI Box (Region Of Interest).
Figure 8.16: TabBox: Click-drag any face to translate. Click-drag green vertex to modify the bounding box.
• Color Wash
• Ortho Views
• Mapping a 3D volume overlaid on a surface
• Side-by-side viewers, synchronized views and objects
• More about Data Fusion
• Load the image stack file chocolate-bar.am located in subdirectory data / tutorials/.
• Load the file chocolate-bar.labels.am from directory data / tutorials. The data set
chocolate-bar.labels.am contains labeling of different regions, obtained by a segmen-
tation of the grayscale image.
• Attach an Ortho Slice module to chocolate-bar.am.
• Attach a Color Wash module to the Ortho Slice module: right-click on Ortho Slice icon in the
Project View and select Color Wash in the popup menu.
• Select the yellow icon of the Color Wash module.
• Connect the Data input port of the Color Wash module to the second data object,
chocolate-bar.labels.am. To do this, you can set the port Data in the Properties Panel.
• You can change the Colormap port of Color Wash module to adjust the range. The Weight Factor
port allows adjustment of the blending between the two data sets. You can also try other Fusion
Method such as Magic Lens, useful for checking data alignment.
• Activate the Transform Editor of chocolate-bar.am and move the data set. You can also
change the Ortho Slice orientation or slice number to control the image in a different plane.
• Note that the Color Wash data doesn’t need to be the same size or resolution as the Ortho Slice
data - data can be unrelated as far as they overlap spatially. For instance, load the image stack
file coreSample.am located in subdirectory data / core / and attach it as Color Wash data
instead of chocolate-bar.labels.am.
• Load the image stack file chocolate-bar.am located in subdirectory data / tutorials /.
• You can hide the Transform Editor manipulator in some views, while keeping the data visi-
ble: toggle the visibility of the data object off - this will make invisible both the slice and the
manipulator, then toggle the slice visibility on.
• Load the image stack file chocolate-bar.am located in subdirectory data / tutorials /.
• Load the supplied chocolate-bar.simplified surface data file from the data / tutorials
directory.
• Attach a Surface View module to chocolate-bar.simplified data set (i.e., choose Sur-
face View entry from the popup menu of the data set)
• Connect Surface View’s Colorfield input port to chocolate-bar.am data object. The surface
is now colored according to chocolate-bar.am data and colormap port.
• Choose, for instance, the colormap physics.icol. Then right-click on the colorbar and
choose Adjust range to chocolate-bar.am and select Data min-max.
• Use the Transform Editor to move chocolate-bar.am relative to the surface.
• Change the colorfield mapping type. With ”Per-vertex” mode, the colors are probed at the
vertices and interpolated inside the surface triangles, leading to a fast but less precise rendering.
Colorfield mapping precision is then limited by vertices density of the surface. The ”Per-voxel”
mode accurately maps the data texture onto the surface at the expense of memory consumption
and lower performance. It may be useful then to simplify the surface by using the Surface
Simplification Editor.
Figure 8.22: View of the Colormap port with the labels.am connected
For now only one Ortho Slice is visible since the data sets overlap.
• In the viewer toolbar, toggle on the Two-Viewers (vertical) button, and make sure that the viewer
button ”Link Object Visibility” is off.
• Toggle the visibility of Ortho Slices to make chocolate-bar.am visible, for instance, only
in the left viewer and chocolate-bar.labels.am visible only in the right viewer.
• Select the Ortho Slice module. In the in Properties Area activate the Connection Editor (as
shown in picture below). Then, click on the chain-link icon that appeared beside the Slice
Number port of the Ortho Slice module, and drag onto the Ortho Slice 2 module in the Project
View. The Slice Number ports are now interconnected: changing one will change the other
instantaneously.
Figure 8.26: Interconnecting ports: (1) activate Connection Editor, (2) drag chain-link from one port to a module or port to be
connected
You can then at any time Unlink the viewers in the viewer’s popup menu (right-click in viewer). You
can also disconnect the ports by right-clicking on the link-chain icon of one of the interconnected ports
and selecting ”disconnect” in the popup menu. This technique can be useful to compare a data set
before and after processing, as shown in the following example:
Note: See also modules Image Processing / Filter Sandbox and Slice to display on-the-fly effects of
image filters.
• You can superimpose surfaces using transparency. Here are some useful settings to tradeoff
quality and performance. Best results can be achieved with the default options fancy alpha
• Connect the Arithmetic module (Compute submenu) to one data set (Input A). Connect
the second data set as Input B.
• Type ”a-b” or ”abs(a-b)” in Expr field. Press Apply. The result as same dimension as
Input A.
• The powerful module Compute / Arithmetic can attach to surface, grid, or image, and can be
used to interpolate and map values from one data set to another or to a regular grid.
• The Merge module is available for blending images that can be arbitrarily overlapping.
• Measure / Correlation Histogram can be used for creating a label image from correlated regions
in two images sets, typically after registration.
• Multi-Channel Field can group multiple grayscale images of same size for convenient display
with Ortho Slice or Volume Rendering. Multi-channel objects are created automatically when
reading some file formats containing multi-channel information. Alternatively, channels can be
manually attached to a multi-channel object created via the Project >Create Object... menu
(category Images And Fields).
To follow this tutorial, you should know how to load files, how to interact with the 3D viewer, how to
use the two-viewer layout and the viewer visibility toggles.
Registration with landmarks in this tutorial applies to 3D images and triangulated surfaces. For align-
ing 2D images or slices see tutorial in section 8.6 (Alignment of 2D images stacks). See also section
8.1.2 (Applying Transforms) on how to align a volume with an arbitrary plane or Slice defined by
picking or point sets.
• From the Project >Create Object... menu, select Points And Lines / Landmarks (2 sets) in order
to create an empty landmark object. A new green icon will show up in the Project View. Since
we are going to match two objects by means of corresponding landmarks we had to select the
landmark object containing two sets of landmarks (Landmarks (2 sets)).
• Select object Landmarks-2-sets in the Project View.
• Set Image Set1 port of Landmarks-2-sets to motor.part1.simplified.surf, and set
Image Set2 to motor.part2.simplified.surf.
• Setting Image Set input ports may not be mandatory for the next steps in this tutorial, but this
would be required for the Landmark object to take into account the transformations set, for
instance, if you would move the surfaces with the Transform Editor.
• Launch the Landmark Editor by clicking on the Landmark Editor button in the Properties Area.
When the editor is started, a Landmark View module is automatically created and connected to the
Landmarks data object. As indicated on the info line, two empty landmark sets are available now. We
use the editor to define some markers in both objects.
• Make sure that the Landmarks object is selected in the Project View, and check in the Properties
Area that Edit Mode is set to Add. Note that landmarks can be edited in the viewer windows
only if the Landmarks object is selected.
• Click on the viewer toolbar arrow button or press the ESC key to turn on picking interaction
mode (arrow mouse cursor). Click on a particular point of surface1. This point must be in the
common region between surface1 and surface2. Click on the corresponding point in surface2.
A pair of points is created. Repeat this step to create several pairs of landmarks (at least 3, 8
pairs are probably sufficient). You may want to change the view of the objects to set landmarks
on parts that are initially hidden.
• If you want to change the position of an existing landmark set, select Edit Mode: Move. Click
on the landmark to be moved, and then just click on the desired position.
• A pair of landmarks can be removed by choosing Edit Mode: Remove and by clicking on one of
the landmarks (blue or yellow).
Note: When editing landmarks, make sure that no transparent object, such as a Transform Editor
manipulator, is intercepting the mouse click instead of the expected visible surface. You may not
immediately notice that the landmark has been added at the wrong location.
Once landmarks have been created, the next step is to transform the two objects into each other. The
Landmarks object can calculate a rigid or linear transformation that best fits one landmark set to an-
other (you will see later below how to retrieve it), or you can attach a compute module that can trans-
form a surface or image data object into a new one according to the landmark sets.
• Attach a Compute / Landmark Surface Warp module to the Landmarks-2-sets object created in
previous steps.
• In its Properties area, set the Surface data port to motor.part2.simplified.surf,
choose the Direction 2>1 and Rigid Method with uniform scale.
• Press Apply.
• Attach Surface View 2 to motor.part2.simplified.Warped.
The Landmark Surface Warp module creates a new surface copy from motor.simplified.surf,
with coordinates already transformed. You can verify with the Transform Editor that no geometric
• Try setting Transformation type to rigid+scale, or affine (different scale along x, y, z, possibly
with shear). Press the Apply button, or toggle on auto-refresh for automatic apply upon port
change. Depending on the landmarks that were set, you may observe small differences in the
result.
• Attach a Landmark Surface Warp module to the Landmarks set (see Registration via Rigid
Transformation section).
• Choose Bookstein method, press Apply, and visualize the result.
Depending on the landmarks you place, the surface may have been slightly deformed to best fit the
transformation from landmark set 2 to landmark set 1. You can try different methods and options.
• Remove the Landmark Surface Warp module and the previous result
motor.part2.simplified2.Warped.
• Switch back to single-viewer mode: click on left viewer to select it (a white frame surrounds the
viewer area), then press the Single view toolbar button.
• Load motor.am located in data / tutorials.
• Attach a Bounding Box module and a Volume Rendering module to motor.am. You can see it
is overlapped by motor.part1.simplified.surf.
• Turn off the viewer visibility toggle for motor.part1.simplified.surf and Landmark
View.
• Attach a Landmark Image Warp module to Landmarks-2-sets created in previous steps.
You can see that volume has been moved and warped following the transformation from landmarks set
1 to landmarks set 2. However, the result volume looks cropped within the extent of the initial input
volume motor.am. By default, the result of Landmark Image Warp is sampled over the same lattice
as input. To overcome this, you could extend the input volume using the Crop Editor. Or you could
attach another image to the Master port of Landmark Image Warp as a reference for bounding box and
resolution, overlapping the expected destination area. An Arithmetic module can be used to prepare
such reference (main window’s menu Project >Create Object..., select Images And Fields / Arithmetic,
then choose regular result type, resolution and volume box location).
• You may then try different methods and options. See Landmark Image Warp reference for more
detail.
>"Landmarks-2-sets" computeRigidTransform
0.939504 -0.0555508 -0.338004 0 0.0390105 0.997694 -0.0555385 0 0.34031
0.0389928 0.939505 0 -0.0165833 0.212631 0.110712 1
By default, computeRigidTransform transforms the 1st landmark set into the 2nd one. You can
specify which sets and order to use in the command. The command computeLinearTransform
is available to compute transformations with scaling. See reference Data Type: Landmarks for more
detail.
To follow this tutorial, you should know how to load files, interact with the 3D viewer, use modules
and Transform Editor basics.
The following example shows step by step how to quickly register two 3D images of the same object.
A later section in this tutorial will show you an even simpler workflow using the convenience script
module Image Registration Wizard.
• Load the image stack file chocolate-bar.am located in subdirectory data / tutorials.
• Load the label image chocolate-bar.labels.am located in subdirectory data / tutorials.
This file contains labeling of different regions, obtained by a segmentation process
Let’s now set up some convenient visualization for the data. You could simply attach Ortho Slices and
Bounding Box modules to each data object. You may prefer to observe the data simultaneously in all
three directions as described in the tutorial on section 8.2.2 (Data Fusion, Ortho Views).
• Attach 3 Ortho Slices to chocolate-bar.am, with different orientation (xy, xz and yz).
• Attach a Colorwash module to each Ortho Slice. Set the Data input to
chocolate-bar.labels.am, and the Fusion Method to Weighted Sum
• Activate the Transform Editor for chocolate-bar.labels.am and arbitrarily change the
position and orientation for this image as shown in figure below. You can then deactivate the
Transform Editor, and attach a Bounding Box module to chocolate-bar.labels.am.
• Attach a module Geometry Transforms / Register Images to chocolate-bar.labels.am,
which is, therefore, considered as the model to be transformed.
• Attach the Reference input port of Register Images to chocolate-bar.am.
• Make sure that the Register Images module is selected in the Project View in order to display its
control ports in the Properties Area.
You are now ready to experiment with registration following the steps below. The Register Images
ports Metric, Transform, and Advanced options basically control the matching quality measure used,
the degrees of freedom for the transform, and other advanced options. They will be detailed later.
Let’s focus for now on the Action port, exposing two pre-alignment methods and the actual optimized
registration.
• Then press the Align principal axes button. The centers of gravity and moment of inertia of
both data sets are computed, again taking voxel values as mass density. The corresponding
principal axes are used to change the model transform. The best of 24 possible alignments of
the principal axes is determined according to the image-matching quality measure (Metric port).
The two images are then nearly matching again, but there is some orientation drift, in addition to
translation shift: the principal axes of both data sets do not align exactly because of the different
spatial distributions of voxel intensities.
• Last, press the Apply button. This starts the actual iterative registration optimization, which may
take a few seconds depending on your hardware. You can then see a best-fit matching of the
label image segmentation to the grayscale image.
Depending on the data sets characteristics and location, orientation, scale, you might be able to per-
form a successful refined registration directly by clicking on the Apply button, without pre-alignment.
However, the registration may happen to fail to find the optimal position as illustrated below.
• Activate the Transform Editor for chocolate-bar-labels.am, and then change both its
orientation by 90 degrees and its scaling by a factor of 2 (by Dialog, or by dragging green
spherical knobs and white cubic knobs).
• Then select the Register Images Module. In the Properties Panel, check Iso- in the Transform
port, to enable search of scaling in addition to Rigid transform.
• Press the Apply button. The registration clearly fails (with extended parameters left to default
values). The position was not close enough in order to guarantee the expected optimal solution.
The search stopped as it could not find a way to improve further.
• Press the Align principal axes button, then the Apply button. The registration succeeds.
1. When differences between the model and reference data set are such that the voxels moment of
inertia can’t match enough anymore. E.g., some added components, particles or parts changed
the model’s principal axis significantly.
2. When the model and the reference have some symmetry in voxel intensity distributions that
makes the moment of inertia ambiguous. E.g., a cylindrical core sample without significant
mass asymmetry.
Here are further guidelines for using the Register Images module. More details are given in a later
section of this tutorial.
1. Make sure your data sets have identifiable references for pre-alignment, or keep track of
information about the approximate location of the model relative to the reference. In some
cases, especially if you want fully automated registration, you may need to consider adding
physical markers, radio-opaque paint, or fiduciaries to your samples before acquiring images.
2. Use as few degrees of freedom as possible, if only to shorten computation. That is, prefer to
set the Transform port to Rigid rather than Rigid+Iso, etc. You can also restrict the registration
search to a 2D plane if appropriate (see below advanced options). Whenever possible, set the
correct voxel sizes for reference and models (see Crop Editor), then set the Transform port to
”Rigid” instead of searching also for an isotropic scaling.
3. You can select a range of voxel intensities to be considered in registration (see advanced options
in a later section). Register Images provides robust image matching metrics with respect to
different modalities and voxel intensity ranges. However, it can be very useful to ignore the high
and/or low intensity voxels of data set components that would otherwise affect the registration.
4. You may need to tune metrics and advanced parameters, depending, for instance, on the data
set modality, voxel intensity distribution, dimensions, and aspect ratio. More on this available
in a later section.
5. Use reduced data when necessary. Register Images uses an efficient hierarchical algorithm.
However, in some cases, you can accelerate processing by subsampling the input data without
losing significant precision. Also, you can reserve registration for the most relevant subset or
derivative of your data set, e.g., cropped, resampled, filtered, masked or segmented, instead of
processing the full original data. You can then copy the transformation from such registered
”proxy” model to the original data. As a special example, the next section shows how to register
8.4.3 Using the Image Registration Wizard - example with partially overlap-
ping images
It is sometimes necessary to assemble 3D images taken separately. Unless a careful acquisition
recorded the accurate image locations, you may need to take advantage of image overlapping to regis-
ter precisely the images. The overlapping regions must still contain enough information for successful
registration. The Register Images module gives most flexibility for addressing this. Here is the method
outlined:
For convenience, you can use the Image Registration Wizard that helps to register 3D volumes. It al-
lows you to select the image subvolumes to be registered and manages for you the registration process.
(Advanced users familiar with scripting may look at the Image Registration Wizard as an example of a
workflow-driven script module.)
• Since you have already set up the data display, you can press the Skip button. Otherwise, if you
press Apply, the wizard will set up Ortho Views for you.
In the next two steps, you will specify overlapping subvolumes from the model and the reference vol-
umes, with optional subsampling. The subvolumes should correspond approximately to the common
region between the model and the reference. Subsampling may be useful for large data.
Note that if you leave the default options, the full volumes will be used directly. It is then possible to
use the Image Registration Wizard to register fully overlapping volumes.
You can also register images that are not fully loaded in memory, stored on disk using the LDA file
format. When attached to such an ”out-of-core” data set, the subsampling rate is set to 4 by default.
To better visualize the subvolume location with axis-aligned display, you may find it convenient to use
the viewer’s orthographic projection mode.
• For instance, in the viewer toolbar, click on the Perspective / Orthographic button, then click on
the YZ button (or press X key), then Ctrl-Shift+click on the Rotate button for 90 degrees rota-
tion. Click again the Perspective/Orthographic button when you want to go back to perspective
display. Note: The Ortho Views module is another useful display alternative.
You are now ready to proceed to registration. Some of the Register Images options are exposed (further
explanation of the Register Images options is provided in the next section).
Since the overlapping regions we have selected are suitable for principal axes pre-alignment, you can
simply leave the default options.
As a final additional step, you can now merge the registered volumes into a single data set.
1. Degrees of freedom
2. Image comparison metrics
3. Optimization control
Let’s first outline how the iterative optimization of image registration works. The algorithm considers
a model data set to be transformed, and a reference data set to which the model is registered.
1. The first step is to resample internally both data sets, using an adjustable resampling rate.
Degrees of freedom
The number of transformation parameters can be selected. Four different transformations are available:
Figure 8.50: Degrees of freedom: rigid (translation+rotation), uniform scaling, anisotropic scaling, shearing
2D constrained registration
In addition, you can restrict the search to transformations within the same plane. For this, switch to
advanced mode and toggle the Register 2D mode.
Note that if the model or reference input is a 2D image (1 slice only in z direction), the Register port
is automatically set to 2D, which constrains the search space to one plane.
You can work around this by resampling the 2D slice on a slab with at least 2 voxels depth as dimen-
sion, keeping the bounding box size to 1 voxel. Then a 3D degree of rotational freedom can be applied.
This can be done with the Crop Editor, as follows: Note the bounding box extent in z direction, set
Image crop max z index to 1 or more, leaving the Add mode: replicate option enabled. Make sure that
the bounding box extent is set to the same extent as before (i.e., the voxel size in z direction).
Similarity metrics
The Metric port specifies the similarity measure between the two data sets.
• (Normalized) Mutual Information uses model and reference histograms to compute an en-
ergy/entropy. The goal is to minimize the entropy, so as to maximize the mutual information
between the two data sets. This is the most generic and robust metric. It is recommended (es-
pecially the normalized version) when images come from different modalities (e.g., CT/MRI,
ECT/XCT). Also note that the histogram range can then be specified to define the relevant voxel
values to be considered for registration. You can use this to ignore high or low intensity voxels.
• Euclidean Distance: computes the distance between the gray values of the two images. It is well
suited for data sets with similar histograms (or similar signal response). For instance, images
acquired using the same modality and intensity calibrations, or overlapping parts of the same
image
• Correlation: computes a correlation value between the model and the reference, suited for data
Optimizer control
You may need to adjust optimization parameters in order to balance improved accuracy, search robust-
ness, and processing time.
• Optimizer Step: set the initial and final value for the step width applied in the optimization. The
greater the initial value, the larger will be the transformation tested. The smaller the final value,
the finer will be the transformation tested. Default values are based on the data bounding box
and voxel size (see reference help for detail). If the pre-alignment is precise enough, you can
reduce the initial value closer to the voxel size. When the bounding box aspect ratio is rather
flat and images tend to flee away during registration, you may need to reduce the initial step in
order to keep the images overlapping longer.
• Coarsest Resampling: set the coarsest level of resolution. Data sets will be resampled many
times until the coarsest resampling rate is reached. For the coarsest search, these values can be
increased.
• Ignore finest resolution: if this box is checked (default), the highest level of resolution will be
left out. Often, full resolution is not needed to register images, which can dramatically save
processing time.
• The Extensive Direction or Best Neighbor, well suited for coarse resolution levels;
• Quasi Newton or Line Search, suited for finest resolution, or when information overlap is re-
duced due, for instance, to flat aspect ratio;
• Conjugated Gradient.
1. Pre-alignment with manual or automatic approximate registration. It is preferable for the ap-
proximate location and orientation of the 2D slice to be known in advance. Landmark-based
registration from some identifiable or automatically segmented markers can also be an option.
Last, a systematic search can be employed as shown in the next section, possibly using subsam-
pled data.
2. Refined registration. The registration settings may need to be adjusted to take into account the
limited information overlap within the 2D slice.
• Open the following files in the in data / core directory: the 3D image file Plug.am, the 2D
image file Plug-slice93.am, and the script file SearchSlice.scro.
• For convenient display, you may split the viewer using the Two viewer toolbar button. Then
attach a Bounding Box module to the 3D image, and an Ortho Slice module to each image. Set
the visibility of the 3D image to the left viewer, and display the 2D image in the right viewer.
• For quicker trial, you can restrict the slices considered for search to 90-95.
• Press the Apply button at the bottom of the Properties Area.
It may take a few seconds for the script to computes image similarity for best registration at different
z-position in the 3D image and store the results in a Spreadsheet object. For each selected slice position
in z, different initial orientations can be used for registration.
In this example, the script extract all slices between the search window defined at Slices consid-
ered port. At each extraction step, the extracted slice, named Plug.view, is registered with
Plug-slice93.am using the Register Images module. For each slice, four initial positions are con-
sidered, consisting in 90 degrees rotation about the z-axis. Four values are obtained, which correspond
to the distances between the extracted slice and the reference slice, measured with the transformation
computed at the end of the registration and the metric chosen. The minimal and the maximal distances,
or similarity values, are saved in the Spreadsheet for each extracted slices.
You can check the best score, corresponding to the higher maximal distance value, in the spreadsheet.
It corresponds to the slice with the best similarity value. Note that the slices are numbered starting
from one by this script, unlike the Ortho Slice module slice, whose numbers start from zero.
Advanced users familiar with scripting may extend this script for specific purposes. See chapter 11.5
(Scripting Guide) for guidance on how to extend scripts.
• If necessary, press the zoom out button to allow the entire slice to be visible in the viewer.
• Translate the upper slice by moving the mouse with the left mouse button pressed down.
• Rotate the upper slice by moving the mouse with the left mouse button and the Ctrl key pressed
down. Alternatively, slices can be rotated using the middle mouse button.
• Make the lower slice editable by selecting the lower slice tool button. Translate and rotate the
lower slice.
• Hold down key number 1. While this key is hold down, only the lower slice is displayed.
• Hold down key number 2. While this key is hold down, only the upper slice is displayed.
• Pressing key number 1 and 2 also changes the editable slice. Note how the slice tool buttons
change their state.
Other pairs of slices can be selected using the slider in the upper left part of the align window. Note
that the number displayed in the text field at the right side of the slider always refers to the editable
slice. The next, or the previous pair of slices, can also be selected using the space bar or the backspace
key, respectively. The cursors keys are used to translate the current slice by one pixel in each direction.
• Browse through all slices using the space bar and the backspace key. Translate and rotate some
slices in an arbitrary way.
• Translate all slices at once by moving the mouse with the left mouse button and the Shift key
pressed down.
• Rotate all slices simultaneously by moving the mouse with the left mouse button and the Shift
and Ctrl key pressed down. Moving all slices simultaneously can be useful in order to move the
• Activate landmark edit mode by pressing the landmark alignment mode button.
In landmark edit mode only one slice is displayed instead of two. Two default landmarks are defined
in every slice.
• Once you have activated the landmark edit mode (arrow mouse cursor), click on one of the
default landmarks. The landmark gets selected and is drawn with a red border.
• Click somewhere into the image in order to reposition the selected landmark.
• Click somewhere into the image while no landmark is selected. This causes the next landmark
to be selected automatically.
• Click at the same position again in order to reposition the next landmark.
Two landmarks should be visible now, a red one, and a yellow one. Next, let us move these landmarks
to some reasonable positions so that we can perform an alignment.
Once all landmarks have been set, we can align the slices. It is possible to align only the current pair
of slices, or to align all slices at once. Note that all alignment actions, as well as landmark movements,
• Switch back to transform mode by pressing the manual alignment button. Two slices should be
displayed again.
• Align the current pair of slices by pressing the align current slice pair button.
• Align all slices by pressing the corresponding button.
• Move and rotate the whole object into the center of the image using the mouse with the Shift
key hold down.
Figure 8.65: (1) Manual alignment button; (2) Align current slice pair; (3) Align all slices
In most slices the alignment now should be quite good. However, looking at the pairs 3-4 and 4-5
(displayed in the lower left corner of the align window) you’ll notice that there is something wrong. In
fact, slice number 4 has been accidentally inverted when taking the microscopic images. Fortunately,
this error can be compensated for in Avizo.
• Select slice pair 3-4 and make sure that the upper slice, i.e., slice number 4, is editable.
• Invert the upper slice by pressing the mirror editable slice button.
• Realign the current pair of slices by pressing the corresponding button.
• Select slice pair 4-5 and realign this pair of slices as well.
Figure 8.66: (1) Mirror editable slice button; (2) Align current slice pair
Alternatively, you could have aligned all slices from scratch by pressing the first button from the right.
Figure 8.67: (1) Least-squares alignment button; (2) Align current slice pair
Automatic alignment is an iterative process. It may take quite a long time depending on the resolution
of the images and of the quality of the pre-alignment. You can interrupt automatic alignment at any
time using the Stop button.
• Automatically align all slices by pressing the first button from the right.
• Press the Resample button of the Align Slices module. The images are resampled using an
accurate interpolation method. Note that the Align Slices’ port Resample Method lets you alter-
natively choose a fast preview mode.
• Before visualizing the result, you could open an extra viewer (menu View / Layout / Extra
Viewer). For now, simply press the Close button of Align Slices module in the Properties Area
to close the slice aligner window and display again the main viewer window. When closing the
Align Slices edit mode, you can confirm to save the modified transformation information into
the data parameter section of the input object (next section shows how this can be used).
• Attach an Ortho Slice module to the resulting object leaf.align and verify how the slices
are aligned.
By default, the dimensions of the resampled image result are the same as the dimensions of the input
image. When Align Slices editor is active, you can choose menu Align / Options and select Output tab,
then you can define a different output size, including automatic fit for all slices. See Align Slices help
for more details.
• Make sure that the slice aligner window was closed as described in previous steps, so that the
slice transformations are recorded in the data parameters of the input object leaf.info. Note
that you can Choose Save transformation from the Options menu of the slice aligner at any time
while you are modifying slice alignment.
• Delete the Align Slices module.
• Save leaf.info in Avizo format. For this use menu File / Save Data As, then make sure an
Avizo native format is selected.
• Reload the saved object leaf.am.
• Attach a new Align Slices module to leaf.am and click the Edit button. You can verify that
the original alignment is restored.
The guard cells of the stomatal pore are marked in the label image. Segmentation has been performed
before the images were aligned. Now we want to apply the same transformation defined for the image
data to the labels.
• Connect port Reference of Align Slices to leaf.am. This is done by activating the popup
menu over the small rectangular area at the left side of the Align Slices icon. Observe how the
transformations are applied to the label image.
• Export an aligned label image by pressing the Resample button.
Note about color image segmentation: The image volume used in this tutorial is an RGBA color field.
You can use Interactive Thresholding for color image segmentation. However, other tools such as the
• When using grayscale image input, selecting an appropriate data window is a way to filter out
unwanted high or low pixel values.
• Align Slices can use a label image connected to its Mask input port to restrict the region consid-
ered for automatic alignment. You can easily produce such a mask by using, for instance, the
Segmentation Editor or the Volume Edit module.
• In complex cases, you could perform alignment based on any subset or derivative of initial image
stack (e.g., cropped, filtered, or segmented), and then reapply the alignment to the original data.
• If alignment of a full stack fails, you may save time by trying to identify the first slices that fail
and improving alignment for those slices at first.
• In the General tab, uncheck the Allow Rotation checkbox to disable rotation in the alignment.
• In the Least Squares tab, you can increase the Max number of iterations (e.g., to 5000) if the
alignment process stops before correct match.
• In the Least Squares tab, you can reduce the Resample size scale factor if a slice ’flees’ out of
the canvas. This may happen if there is not enough information or overlapping for meaningful
quality measure at the coarse resolution that is used to speed up the first steps of the process.
• You can fix the reference slice used for alignment across the whole stack with menu Options /
Fix Reference. This could be used in combination with an input Mask image to select a limited
image area as a fixed reference.
slice044 6 4 -16.3025 -1
indicates that slice ] 44 was translated 6 voxels in X, 4 voxels in Y, and rotated -16.3025 degrees about
Z. The -1 means that the slice was not mirrored (If 1, it would mean that the slice has been mirrored).
Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard 369
sections. A variety of detectors (SE, low kV BSE, EDX, EBSD, etc.) can be used for analyzing the
sample’s materials and structure.
After such a FIB serial sectioning acquisition, a 3D model can be reconstructed from the 2D images.
Depending on the input data and purpose, some pre-processing including alignment and other steps
may be required, in particular to ensure the accuracy of the 3D model for further quantitative analysis.
The angle between the ion beam and the electron beam is typically 52 degrees. Because of angle be-
tween milled surface and imaging axis is not 90 degrees, the raw captured images shows a geometrical
Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard 370
artifact compared to real sections:
• Apparent vertical shift upward that grows with each image in the stack
• Foreshortening: vertical size (y axis relative to capture) appears compressed.
You may get images already corrected for these effects, but in some cases it may be necessary to
compensate them with downward shift, i.e., stack shearing and stretching.
Another unwanted artifact is lateral drift that may occur, especially during long acquisitions, yet even
shorter ones can show some jittering drift between images, due to environment vibration, for instance.
In addition to geometrical artifacts, some further image processing may be needed to correct for noise
or non-uniform illumination (sometimes described as shadowing).
Avizo provides a number of tools for processing and analyzing FIB/SEM image, including a conve-
nience script module that steers you along the most common processing steps: the FIB Stack Wizard.
In this tutorial, you will learn in particular how to use the FIB Stack Wizard and other Avizo tools for:
Advanced users familiar with scripting may look at the FIB Stack Wizard as an example of a workflow-
driven script module.
Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard 371
Figure 8.70: MoSi2 sample - courtesy C. Kong, University of New South Wales
• With menu File / Open Data, load the data file MoSi2-shear-corrected.am located in
subdirectory data / fib in Avizo installation directory. This image stack was saved as a native
Avizo data file. About loading stacks of image files, see the tutorial section 3.1 (How to load
image data).
• You can attach one or two Ortho Slice modules to MoSi2-shear-corrected.am to exam-
ine the data, or use the Ortho Views module to set up 4-view display.
The full data set extent is 64 micrometers in width and 36 micrometers in depth, i.e., for the resampled
images about 0.125µm pixel size (X-Y field-of-view) and 0.486µm slice thickness (Z voxel size).
Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard 372
Depending on the input file format, you can specify the pixel size and slice thickness as ’voxel size’
when loading the data if information could not be retrieved from the file. You can always check and
adjust it afterwards by using the Crop Editor.
• Activate the Crop Editor for MoSi2-shear-corrected.am to see the bounding box extent
and corresponding voxel size in the dialog box. You can then deactivate the Crop Editor.
Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard 373
data with irregular, so-called ”stacked slice” coordinates. You may also turn the images into a uniform
scalar field using Arithmetic or Resample modules (use a uniform lattice as reference input for the
Resample module).
Foreshortening
Depending on how the data was collected, you may have to correct the foreshortening effect seen in
introduction. If you entered the field-of-view for the Y-axis, then there will be no need to make this
correction. If you entered the same voxel size for x and y, and the instrument did not already apply a
stretching correction, then you may want to correct by entering the corrected voxel height directly into
the Crop Editor. To apply the foreshortening correction in the Crop Editor, multiply the voxel height
by a correction factor, depending on the angle between FIB and SEM columns. For instance, for a 52
degrees angle: 1/sin(52◦ ) = 1/cos(90◦ −52◦ ) ≈ 1.269. The file MoSi2-shear-corrected.am
was already corrected for foreshortening.
Measurement units
Note: Indicating ”nm” as Display units in the Preferences will output measurements in nm. To learn
about unit management in Avizo, see the section 10.2.9 (Units in Avizo) in Avizo User’s Guide.
Raw image stack display showing vertical shift of the serial sections. A clipping oblique Slice is used
to highlight the sample slope.
Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard 374
We’ll see later in this tutorial how to address this case using data set MoSi2-sheared.am.
The data set MoSi2-shear-corrected.am was already corrected for electron beam angle as
you can see below. The sample sections are aligned horizontally, while the surrounding trench looks
sheared in turn since it is fixed relative to the microscope raw images.
Drift correction
Images corrected for viewpoint angle may still need correction from drift as show below, mostly visible
in XZ slices of MoSi2-shear-corrected.am.
Cropping
Cropping is necessary to remove unwanted areas in the 3D reconstruction, such as the trench surround-
ing area, or textual information that may be located at the bottom of the images.
Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard 375
8.7.3 Getting started with FIB Stack Wizard
The FIB Stack Wizard, accessible from the menu Geometry Transforms / FIB Stack Wizard, can be
used for alignment/shearing correction as well as for shading correction. The wizard module guides
you step by step along the process. Data will be duplicated since the wizard allows you to go backward
in the steps to correct specific actions. The following steps are proposed by the FIB Stack wizard:
• You can now remove any remaining Ortho Slice or other display modules in the project: the FIB
Stack Wizard automatically sets up an Ortho Slice display.
• Attach the module FIB Stack Wizard to MoSi2-shear-corrected.am.
An Ortho Slice with a tight Color Wash module is attached to the data set, and a Crop Editor dialog is
displayed.
Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard 376
Figure 8.76: FIB Stack Wizard at step 1
Once the FIB Stack Wizard is selected in the Project View, its control ports are displayed in the Prop-
erties Area.
A Mask input connection port lets you attach a label image serving as a mask during alignment. This
will be detailed later.
• You can use the Slice Number port to change the displayed slice along current axis.
• You can change the Slice Orientation.
The Info port indicates the current processing step. Buttons are available to proceed to next step,
possibly skip it, or go back to previous step.
Step 1: Crop before alignment
Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard 377
This step lets you crop the input data before applying the alignment. For now you will select a region
contained within the serial sections.
• Drag the green corners of the tab box in the viewer, or index values in the Crop Editor dialog.
• You can use the Slice number and orientation ports to control the selected region.
• Be sure to slice all the way from the front of the stack to the back of the stack to verify that you
are not cropping out desired regions. You may also change temporarily the Slice orientation.
• Once set, press on the Apply button in order to go to the next step.
Step 2: Alignment
In this step, the wizard will use automatically the Align Slices module. The wizard exposes the fol-
Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard 378
lowing alignment options:
• For this example our case let’s keep the default values: least squares alignment method without
rotation.
Important note: when processing grayscale images, the visible gray values for display and for align-
ment can be restricted to a data window defined for the data set. Only the values between the two
bounds of the data window are used by the gray value-based alignment algorithm. You can check if
an appropriate data window is defined in the data information displayed in the Properties Area. For
editing the data window, see the Intensity Range Partitioning editor and tutorial section 3.4 on Intensity
Range Partitioning.
• Press on the Apply button in order to go to the next step. The Align Slices editor window is
displayed showing the alignment progression. You can see how slices are aligned relative to
each other. Depending on the distribution and the orientation of shapes across the slice stack,
some smooth drift may occur.
• Change slice number to browse slices. You can see black uncovered area as slices have been
translated.
• You can select a new crop region to exclude these black areas.
Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard 379
Figure 8.79: Crop after alignment with FIB Stack Wizard
• Once set, press on the Apply button in order to go to the next step.
Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard 380
• For now, alignment has been performed, so click on the Skip button in order to go to the next
step.
• Change the Low mask threshold value. You can see the non-uniform distribution of background
intensity. See the figure 8.80 below to adjust values.
• Change both thresholds to cover as much as possible the area to be approximated for back-
ground, excluding as much as possible the dark or bright features that could alter the background
estimate. See the figure 8.80 below to adjust values.
• The shading correction parameter is a factor applied to the voxel values normalized according
to the estimated background.
Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard 381
Figure 8.80: Shading correction with FIB Stack Wizard
• You can click on the Back button in order to go to previous steps and modify some processing
parameters.
• Remove the FIB Stack Wizard in order to delete intermediate modules and data objects.
Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard 382
8.7.4 Selecting what to align using masks
Three methods can actually be used to choose what to align:
With previous steps, you could achieve quickly reasonable results, with limited image drift. However,
in some cases, you may need to select more precisely the image information to be considered for
alignment.
1. The overall image structure may induce drift, in particular if there are few large or oriented
structures. Subsets of images might better drive the alignment.
2. You may want to take advantage of fixed markers or fiducials. If the volume and resolution you
wish to capture allow for it, you can keep such markers in the field of view for the purpose of
accurate alignment.
3. You may have raw images with uncorrected upward shift. For best results you should normally
apply first a shearing before aligning the sections area so that images are roughly axis aligned.
You can use the AvizoShear module for this. Alternatively, you could instead align images based
on the fixed area surrounding the sections.
Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard 383
We now need to create a mask to be used as input by the FIB Stack Wizard. For this one could use
the Segmentation Editor or any other tools creating a label image. Using the Volume Edit module is
convenient here.
• Attach the result mask MoSi2-sheared.mask as Mask input for the FIB Stack Wizard.
• Press the Apply button to trigger alignment. The Align Slices editor window shows the image
masked by the region you defined.
• Press Apply to keep all volume at Crop step.
• Apply Shear step with -38 degrees (i.e., 52 - 90).
• Proceed to Shading correction as above.
Alignment and pre-processing of FIB/SEM images stacks using the FIB Stack Wizard 384
8.7.5 Further processing of FIB Stacks
More image processing may be required to further improve FIB/SEM images, for compensating for
instance noise or curtaining effects. Filtering can be applied either before or more usually after align-
ment such as processing by FIB Stack Wizard. In particular if you want to apply image filters in 3D
mode, images should be properly aligned.
See section 6.7 for hints about image filtering. In particular, the Non-Local Means image filter is
usually effective with FIB/SEM image. See also Filter Sandbox for trying conveniently image filters.
The capture of image stacks using FIB/SEM devices (Focused Ion Beam / Scanning Electron Micro-
scope) may require alignment and other pre-processing such as foreshortening, shear, and shading
correction. A module DualBeam 3D Wizard is available to support this workflow.
FIB/SEM is a powerful technique for imaging samples in 3D at the nanometer scale, optionally with
compositional information. A FIB/SEM DualBeam device combines a Focused Ion Beam for milling
serial cross sections in the sample, and a Scanning Electron Microscope for imaging the milled 2D
sections. See figure 8.83.
A variety of detectors (SE, low kV BSE, EDX, EBSD, etc.) can be used for analyzing the sample’s
materials and structure.
After such a FIB serial sectioning acquisition, a 3D model can be reconstructed from the 2D images.
Depending on the input data and purpose, some pre-processing including alignment and other steps
may be required, in particular to ensure the accuracy of the 3D model for further quantitative analysis.
The angle between the ion beam and the electron beam in Thermo Scientific EM Systems is typically
52 degrees. Because the angle between milled surface and imaging axis is not 90 degrees, the raw
captured images shows a geometric artifact compared to real sections:
• apparent vertical shift upward that grows with each image in the stack;
• foreshortening: vertical size (y axis relative to capture) appears compressed.
You may get images already corrected for these effects, but in some cases it may be necessary to
compensate for them with downward shift, i.e., stack shearing and vertical scaling.
Another unwanted artifact is small lateral shift that may occur between images, especially during long
acquisitions. Yet even shorter ones can show some jittering, due to environment vibration, for instance.
In addition to geometric artifacts, some further image processing may be needed to correct for noise,
artifacts (such as curtaining) and non-uniform illumination (sometimes described as shadowing).
Alignment and pre-processing of FIB/SEM image stacks using the DualBeam 3D Wizard 385
Figure 8.83: FIB/SEM principle
Avizo provides a number of tools for processing and analyzing FIB/SEM images, including a module
that guides you through the most common processing steps: the DualBeam 3D Wizard.
In this tutorial, you will first learn:
• how to import Thermo Scientific EM Systems images, especially Auto Slice & View projects,
• the basic knowledge regarding the DualBeam 3D Wizard,
and then you will learn how to use the DualBeam 3D Wizard and other Avizo tools for:
Alignment and pre-processing of FIB/SEM image stacks using the DualBeam 3D Wizard 386
8.8.1 Importing Thermo Scientific EM Systems images
The images used in this tutorial are Thermo Scientific SEM series from a coated wire. You will find
the TIFF images in subdirectory data/fib/coatedwire/TIFFimages in the Avizo installation
directory and the related Auto Slice & View project file in data/fib/coatedwire.
You have two ways to import the image stack:
• with menu File / Open Data, load all TIFF images located in
data/fib/coatedwire/TIFFimages as explained in tutorial section 3.1 (How to
load image data).
• or with menu File / Open Data, load ProjectData.xml located in
data/fib/coatedwire.
In both cases, a dialog dedicated to EM data will open, providing information retrieved either from the
EM TIFF files only, or from both the EM TIFF files and the project file. See figures 8.84 and 8.85.
Retrieved parameters, such as acquisition settings, are stored in the data parameters of the loaded
image stack. Importing the project file also gives you the opportunity to choose which series of images
to import if several series have been collected and stored. For your convenience, a preview of the series
is displayed in the dialog.
Unit management is activated by default (to learn about unit management in Avizo, see the section
10.2.9 (Units in Avizo) in Avizo User’s Guide). The display unit is set to nanometers. Therefore, the
dialogs display the voxel size, the bounding box, as well as the target thickness in nm.
The thickness between slices is considered as uniform at import but you can modify its value. You
can also modify the name of the image stack. Finally, you have the option to automatically launch the
DualBeam 3D Wizard from the dialogs.
Alignment and pre-processing of FIB/SEM image stacks using the DualBeam 3D Wizard 387
Figure 8.85: Importing an Auto Slice & View project.
The images are loaded and the DualBeam 3D Wizard is created and connected to the data, as well as
an Ortho Slice module, displaying a preview in the viewer. See figure 8.86.
Note: All results of the following wizard tutorial are obtained with this image stack. However, to save
time when re-running the tutorial or if your computer has main memory limitation (i.e., 4GB on 32-bit
architecture), you might want to skip some steps or even use a downsampled image stack. Such an
image stack is MoSi2-sheared.am, stored in the subdirectory data/fib. As the data is in Avizo
format, no Thermo Scientific EM Systems dedicated dialog will open and the DualBeam 3D Wizard
will not be launched automatically, so you have to connect it to the data from the Favorites category
or from the Geometry Transforms category. For example, it could be useful to connect the wizard to
the Resample module result (on 32-bit architecture, downsample the input data by a factor 3 on each
direction, so 512*341*40 as final resolution, is sufficient to complete all following steps).
To reduce memory consumption, you can also check the Remove intermediate data box in the Memory
consumption port of the wizard (see explanations in the next section).
Alignment and pre-processing of FIB/SEM image stacks using the DualBeam 3D Wizard 388
Figure 8.86: Ortho Slice display and DualBeam 3D Wizard in Project View
8.8.3 Step 1: Compensating for the geometric effects of the stage tilt
Depending on how the data was collected, you may have to correct two geometric effects described in
the introduction:
To observe those effects on the current data, change the slice orientation of the Ortho Slice to YZ.
Alignment and pre-processing of FIB/SEM image stacks using the DualBeam 3D Wizard 389
Figure 8.87: DualBeam 3D Wizard properties at first step.
Use the slice number slider to move the slice along the X axis. The sections appear shifted, while
the surrounding background and trench stay aligned horizontally across the series. Obviously the 3D
structures inside the sections looks sheared on an YZ slice and need to be corrected. This can also be
observed using a Volume Rendering display. See figure 8.88.
Figure 8.88: Sheared image stack: YZ slice left, volume rendering right
The angle between the ion beam and the electron beam in Thermo Scientific EM Systems is typically
52 degrees. This information is stored in EM TIFF images and retrieved by Avizo. A preset value is
displayed accordingly in the Stage tilt angle port and can be corrected, if necessary. See figure 8.87.
Depending whether the stack has been corrected or not before the import into Avizo, and how, the verti-
cal scaling can be applied or not by checking or unchecking the vertical scaling box in the Compensate
port.
In the same way, through port Vertical slice shift, the shearing can be applied or not, and more precisely,
you can choose to apply it before or after the alignment step (fourth step). Applying the shearing after
the alignment step might be interesting in case the alignment is done with respect to a region located
on the surrounding of the milled face (such as a fudicial) and not on the milled face itself.
Alignment and pre-processing of FIB/SEM image stacks using the DualBeam 3D Wizard 390
8.8.4 Step 2: Cropping before alignment
The Crop Editor is automatically launched. The wizard displays the second step. See figure 8.89.
Cropping is necessary to remove unwanted areas in the 3D reconstruction, such as the trench surround-
ing area. Cropping is also useful to remove the black uncovered areas due to the shearing correction.
Finally, it might also be used before alignment to reduce the data if it is to be taken fully as reference
for the alignment. In any case, it is possible to define a mask or a subregion as a reference for the
alignment at the alignment step itself.
Alignment and pre-processing of FIB/SEM image stacks using the DualBeam 3D Wizard 391
8.8.6 Step 4: Alignment
As mentioned in the introduction of this tutorial, images may present some lateral shift or jittering
effect and therefore necessitate some correction. Jittering effects are mostly visible in XZ slices.
Change the slice orientation of the Ortho Slice in order to observe those effects on the current data.
See figure 8.91.
In this step, the wizard will automatically use the least-square method of the Align Slices module. The
wizard exposes the following alignment parameters:
• Translation step size port defines the step size for the translation parameter used by Align Slices.
• Initial subsampling port defines the resample factor parameter used by Align Slices.
• The overall image structure may be prone to deformation, in particular if there are few large or
oriented structures. As an illustration, a sliced banana could have the shape of a cucumber after
slice alignment. Subsets of images might better drive the alignment.
• You may want to take advantage of fixed markers or fiducials. If the volume and resolution you
wish to capture allow for it, you can keep such markers in the field of view for the purpose of
Alignment and pre-processing of FIB/SEM image stacks using the DualBeam 3D Wizard 392
accurate alignment.
• You may have raw images with uncorrected upward shift. For best results you should normally
first apply a shearing before aligning the sections area so that images are roughly axis aligned.
Alternatively, you could instead align images based on the fixed area surrounding the sections.
Finally, in the Alignment reference port, an optional reference can be defined. For advanced users, this
reference can be defined outside the wizard and selected as reference inside the wizard. The gradient
of the image data can also be computed to be used as a reference. By default, the current image is
used.
• In port Alignment mask, select define by box. A tab box with green corners appears in the viewer.
• Drag the green corners to define a mask as displayed on figure 8.93.
• Press Apply to perform the alignment.
The Align Slice editor window is displayed showing the alignment progression. You can see how
slices are aligned relative to each other. Depending on the distribution and the orientation of shapes
Alignment and pre-processing of FIB/SEM image stacks using the DualBeam 3D Wizard 393
across the slice stack, some smooth image drift may occur. See figure 8.94.
Note: When processing grayscale images, the visible gray values for display and for alignment can
be restricted to a ”data window” defined for the data set. Only the values between the two bounds of
the data window are used by the gray value-based alignment algorithm. You can check if an appropri-
ate data window is defined in the data information displayed in the Properties Area. For editing the
data window, see the Intensity Range Partitioning editor and tutorial section 3.4 on Intensity Range
Partitioning.
• Select a new crop region to exclude these black areas, as well as the surrounding of the milled
surface and the redeposition at the bottom of the images.
• Press Apply.
Alignment and pre-processing of FIB/SEM image stacks using the DualBeam 3D Wizard 394
Figure 8.95: Cropping after alignment.
• Press Apply to launch Non-Local Means filter or Skip to save time while running the tutorial.
Alignment and pre-processing of FIB/SEM image stacks using the DualBeam 3D Wizard 395
Figure 8.97: DualBeam 3D Wizard properties at Non-Local Means filter step.
Figure 8.98: Initial image with noise (left) and image filtered with Non-Local Means (right).
• The first method, uniform intensity drop, automatically corrects the intensity attenuation by
fitting an exponential curve to the average intensities in each slice in the Y direction.
• The second method, background estimate, normalizes the voxel values by an estimated back-
ground. Voxels to be considered for estimating background can be specified either by threshold-
ing or by defining a mask with a box or draw tools.
Alignment and pre-processing of FIB/SEM image stacks using the DualBeam 3D Wizard 396
Figure 8.99: DualBeam 3D Wizard properties at intensity correction step.
background estimate.
• Set Intensity normalization to 120.
• Press Apply.
Alignment and pre-processing of FIB/SEM image stacks using the DualBeam 3D Wizard 397
Figure 8.101: Image before (left) and after (right) intensity correction.
Once this is done, the wizard is removed from the Project View, as well as all intermediate data. The
only remaining data are the initial image stack and the result of the wizard.
In order to introduce some differences between the surfaces before experimenting with alignment, we
will use the Surface Simplification Editor. This tool reduces the number of triangles by edge collapsing
and vertex shifting to approximate the original surface. This operation can also be very useful to reduce
the computation time for alignment, especially for large surfaces.
Let’s focus for now on the Align port, exposing two pre-alignment methods and the actual optimized
registration.
You can see that the surfaces are now centered. However, the model orientation does not match the
reference orientation.
The model and reference are now almost aligned. You can still notice some discrepancy.
• Press the Surfaces button in the Align port. This starts the iterative alignment optimization.
Note: you could alternatively use an Ortho Views module for display, for instance, to overlay cross
sections or cross contours of the surfaces.
Despite optimized search for nearest neighbors, this can be time consuming especially for large sur-
faces. The center of mass and principal axes can be aligned quickly.
Like for image registration, in order to limit computation time and risk for mismatch, it is recom-
mended to perform the surface alignment in two steps.
Pre-alignment could be done using the Transform Editor or Landmarks. For automatic alignment, you
can more simply attempt in order:
1. Centers
2. Principal Axes
3. Surfaces
• Click on the Surfaces button in the Align port. At most 100 iterations will be computed for
the alignment. If the relative RMS is smaller then 0.001, the algorithm will end too. You can
press the Stop button to interrupt the registration. You can repeat this step if the alignment is not
accurate enough: the relative RMS should be reduced.
Once you obtained an optimized registration, you can optionally check the surface distance using a
Surface Distance module.
The computed distance statistics and distance field may depend on the distribution of vertices over the
two surfaces. You may want to choose the two-sided Direction for a symmetric distance calculation.
You could also remesh the surfaces using the Surface Simplification Editor or the Remesh Surface
module to redistribute vertices uniformly.
A Surface Thickness module and a Shortest Edge Distance module are also available.
Note: For checking surface distance from objects in a 3D volume, one could compute a 3D distance
map from the segmented 3D image (using Image Processing / Distance Maps / Distance Map), then
use the result as a color field with Surface View, as shown in Data fusion tutorial, or use Compute /
Surface Scalar Field to attach the distance measures to the surface.
Note about file formats: Beside the many 2D and 3D images format that are supported by Avizo,
Avizo can also directly import a number of geometric and surface data formats such as STL or Open
Inventor. Additional readers for CAD files formats such as CATIA 5, IGES, and STEP are available in
the Avizo XReader extension. The Avizo XWind Extension and bundle provides import capability for
You then see the NominalActualComparison object icon in the Project View. Its user interface appears
in the Properties Area.
• In the Properties Area, press Apply. You are then prompted for loading the reference CAD
geometry file.
• In the Open dialog, choose Pump-bracket-CAD-model.surf (in data / pump-bracket
directory), then press the Open button.
The CAD surface is displayed in blue. The next step is to load the model’s CT scan 3D volume.
• Press Apply, then in the Open dialog select Pump-bracket-CT-scan.am, and press the
Open button.
Note: This data set corresponds to the CT scan acquisition of the raw casting prior to machining. This
is used below to better highlight the obvious differences between reference and model. You may also
try the included file Pump-bracket-machined-CT-scan.am, for a more relevant comparison between the
CAD model and the actual machined part.
The 3D CT volume is displayed in addition to the CAD surface at a different location. You can rotate
and move the scene in the 3D viewer window for a closer look.
The 3D volume is displayed using internally an Isosurface module with an automatically calibrated
threshold to show the object boundaries. See tutorial section 3.4 on Intensity Range Partitioning for
more details.
In the Properties Area, you could optionally control simplification parameters for faster computation.
Let’s now proceed to the registration of the scanned part with respect to the reference CAD geometry.
A model boundary surface is extracted from the 3D volume using the automatic calibration mentioned
above. Then a few seconds are required to prepare the surfaces, simplifying the surfaces according to
options, and to register the surfaces after automatic principal axis pre-alignment. You can then see the
two surfaces overlaid.
The last step computes and displays a map of nominal-actual distances. You can optionally define a
simplified surface resolution for faster processing.
We outline here two approaches available in the current version of Avizo for aligning a 3D image and a
3D surface. For more details, please refer to sections about Registration of 3D Images and Registration
of 3D Surfaces.
Approach 1: Align a surface generated from the 3D image with the reference surface.
1. Create a surface from the image using Isosurface and Extract Surface, or Generate Surface from
segmented image.
2. Use Align Surfaces module for pre-alignment and refined registration.
This method is the most robust with respect to possible topological inconsistencies in surfaces im-
ported from the CAD model, i.e., holes. This is the approach used in the example above. Advanced
users familiar with scripting may look at the NominalActualComparison wizard as an example of a
workflow-driven script module.
Approach 2: Register the 3D image with another 3D image generated from the reference surface
This method can be effective for fast or repeated registration of 3D images with a single reference.
Once you have learned how to define an animated demo sequence, you can further learn how to record
the demonstration into a movie file in Section 9.2.
Figure 9.1: Data chocolate-bar.am with a Bounding Box and an Ortho Slice
Like the other widgets, this widget is also dockable and you can place it at a convenient position within
the Avizo user interface. When activating the Animation Director, all ports of the currently available
modules that can be animated are extended by an additional button representing a stopwatch .
Before we start animating the Ortho Slice slice position, let us first have a quick look at some GUI
elements of the Animation Director widget (shown in Figure 9.4).
As you can see, the user interface is divided into a left and right panels. On the left panel, you can
control the timeline that is displayed on the right panel. The timeline has a main time slider.
The name of the current animation can be changed by writing directly into the current animation name
field. For example, we can name it ”CandyAnimation”.
We can now animate the Ortho Slice slice position. We do this by clicking the stopwatch button of the
Slice Number port in order to schedule the start event:
Clicking on the stopwatch button creates a new keyframe in the Animation Director timeline and the
event is listed in the left panel of the user interface. If you hold the mouse cursor above the small
orange diamond symbol in the timeline panel, this activates a small input field where you can adjust
the time and the accompanying value for the port with which it is associated. In order to adjust the
schedule, you can simply drag the diamond icon to the desired position on the timeline.
We have now defined the beginning of the animation of the slice position. Next we want to define
the time where the animation should end. To do this, we drag the master time slider to the desired
time on the timeline, for example, to 00:04.000, which means 4 seconds. As a next step, we set the
slice position of the Ortho Slice module by either setting the Slice Number port in the properties of the
module or by positioning the slice interactively in the viewer window. Using either method, set the
value of the Slice Number port to 294.
After you click the stopwatch button again, the keyframe is created in the timeline.
You can test your first animation by positioning the master time slider back to 00:00, either by
clicking the Jump To Start button or by entering the desired time into the Current Time control
. Start the animation by clicking the Play button or by pressing F4. To stop
the animation click the Stop button or press F3.
Note: The animation time is not a real physical time. The time that has been specified is the time
that Avizo will try to respect, if possible. If an animated property needs a specific amount of time to
be processed (computation, viewer redraw, etc.), Avizo will wait until the animation step has finished
before continuing. This implies that, for instance, an animation with a time range of 30 seconds won’t
run for exactly 30 seconds, but will run 30 seconds or longer.
Tip: As an exercise, adjust the master time slider to the time 00:12, set the position of the Slice
Number of the Ortho Slice to the value 0, and click the stopwatch button again. This will create
another keyframe in the timeline. Restart the animation as described above. The slice should first
move from slice number 147 up to 294 during the 4 seconds, and then decrease down to the value 0
within the next 8 seconds.
Note: As described above, you can edit the time and the value of single keyframes by hovering the
mouse cursor above the keyframe icon and by clicking the user interface after it has been become
visible (hover dialog box). Alternatively, you can modify the time of the keyframe by dragging it to
the timeline. In order to change the value of the associated port, you can position the master time slider
on the time of the keyframe and then adjust the value of the port in the Properties area of the module.
In order to shift all keyframes of a port forwards or backwards on the timeline, position the mouse
cursor between two subsequent keyframes. You will notice a connecting bar in dark gray and that all
keyframes of this sequence are selected (indicated by orange colored diamonds, show in Figure 9.8).
Shift all selected keyframes forwards or backwards by dragging the dark gray bar.
Figure 9.9: Viewer and Network when Visualizing Ortho Slice and Surface View Tools
To test the newly added event, set the master time slider of the Animation Director back to zero. A
new event has been automatically added at time 00:00 to consider the surface model as invisible by
default. Start the animation. As before, the slice moves back and forth. When the master time slider
reaches 00:12, the surface model is turned on.
Note: You can change the time when the Surface View becomes visible by simply dragging the appro-
priate keyframe diamond on the timeline.
1. Set the master time slider to the time where you want the camera rotation to begin, for example:
00:10.
2. Select Camera Orbit module.
3. Click the stopwatch button next to the Time port of the Camera Orbit module and click Time:
Value.
4. Set the master time slider to the time where you want the camera rotation to end, for example:
00:14.
5. Adjust the Time port of the Camera Orbit module to its maximum (360).
6. Click the stopwatch button of the Time port again.
1. Attach a second Surface View module to the chocolate-bar.surf dataset. Since Exterior and All
are selected as the default materials, this brings up the exterior surface.
2. Click on the second Surface View module. It should be called Surface View 2.
3. Select Transparent from the Draw Style port.
4. Inside the Buffer port, select Chocolate and All in the Materials port, and then click Add. It
can be helpful to show the inside surfaces underneath the exterior surface, so jump time step to
00:14 or later in the Animation Director widget .
5. Adjust the grade of transparency using the BaseTrans slider in Surface View 2 (for instance 0.7).
6. Smooth out the outer surface by clicking more options in the Draw Style port and selecting
Vertex normals.
Like we did with the inside surfaces model, we can switch on the outer surface model at some point in
the animation sequence:
1. Set the master time slider to the time where our surface should become visible, for example:
00:14.
2. Click the topmost stopwatch icon in the properties area of the Surface View 2 module.
3. Select Visibility in Viewer 0 from the drop-down menu.
Again, check out the results by playing the animation sequence (Figure 9.11).
1. Move the master time slider to the time that you selected to make the Surface View 2 module
visible, for example: 00:14.
2. Click the Surface View 2 module.
3. Click the top-most stopwatch icon in the Properties area of the Surface View 2 module.
4. From the drop-down list, select Clip using Ortho Slice
5. Move the mouse cursor over the newly created keyframe in the timeline and wait for the interface
to open.
6. In the keyframe’s user interface, select the radiobox on to enable Clipping using Ortho Slice.
In order to make the outer surface visible, we must animate the Ortho Slice near the bottom of the
scene:
1. Set the master time slider to the position where you have set the keyframe to make the Surface
View2 visible, for example: 00:14.
2. Select the Ortho Slice module in the Project View.
3. Click the small stopwatch icon of the port Slice Number to set a new keyframe in the timeline.
4. Move the master time slider to the time where you want the animation to finish, for example:
00:22.
5. Move the Slice Number value to the value 294 .
6. Click the small stopwatch icon of the Slice Number port.
Start the animation, either from the beginning or from 00:14, then watch the result.
As a last step, you might want to rotate the view again as the outer surface appears. You can simply
reuse the old camera rotation during a second time range:
1. Set the master time slider to the time where you started to make the outer surface visible, for
example: 00:14.
2. Select the Camera-Orbit module.
3. Click the stopwatch icon of the Time port and select Time: value. This will insert a new
keyframe to the timeline.
4. Move the master time slider to the time where you want the camera rotation to be finished, for
example: 00:22.
5. Set the time value of the Time port to 0.
6. Click again the stopwatch icon of the Time port and select Time: value.
To avoid the Ortho Slice to hide the surface view when displaying the slice 294, you can change its
Transparency mode during the animation.
1. Move the master time slider to the time where you want to change the Transparency value, for
example: 00:12.
2. Set the Transparency port of the Ortho Slice module to Alpha, then click the stopwatch icon
Start the animation, either from the beginning or from 00:14, then watch the result.
1. Set the master time slider to a time prior to the actual clipping.
2. Update the animation of the module that will do the clipping, the Ortho Slice module in our
case.
3. Click the topmost stopwatch icon in the Ortho Slice Properties area.
4. Select Invert clipping orientation from the drop-down list.
You do not need to use an Ortho Slice module to do clipping. As you may have observed, the Ortho
Slice module might occlude parts of what you want to display. If so, it is better to create an empty
Clipping Plane module by selecting Other / Clipping Plane from the Project / Create Object menu.
Attach the module to the data set you want to clip (for example: chocolate-bar.surf ), and then use the
Clipping Plane for clipping as used in the Ortho Slice module.
1. Set the master time slider to the time when the Surface View appears, for example: 00:12.
2. In the left panel of the Animation Director click the + Add special event button.
3. Select Add Break from the drop-down list. A new keyframe is created on top of the timeline
indicating the Break.
Note: The break causes the animation stop at time 00:12, which is right when the model is
switched on. When you play the animation from the start, you notice that after the inner structure
is switched on, the animation stops.
Figure 9.17: Loop Options: Play Once, Play Loop, or Play Swing
Now if you play the animation, it will play from beginning to end once (Play Once), start over from
the beginning (Play Loop), or play forwards, backwards, and so on (Play Swing).
However, you may want to define some part of the demo to run in a loop, and then stop the loop and
continue with the animation. You can easily do this with the Goto feature of the Animation Director
module:
1. In the Animation Director module adjust the main time control to the time 00:11:950.
2. Click the + Add special event button.
3. Select Add Goto from the drop-down list. A new keyframe is created on top of the timeline.
4. Move the mouse cursor right over the new created keyframe icon and a user interface for this
Goto will appear.
5. In the Time To Jump To field enter the time where you want to go from here, for example,
00:04:000 as shown in Figure 9.18.
When you run the animation sequence now, it will loop in the segment between time 00:04 and 00:12,
only showing the Ortho Slice as it moves up, jumps down, and so on. You can stop this by clicking
the stop button of the Animation Director control panel or by pressing F3. To continue after the loop,
you need to jump to the next segment by pressing F10. To play again, press F4.
After loading the project, you can start the demo by clicking the play button of the Animation Director
module, or by pressing F4. If you want to run the demo automatically after the project is loaded, you
can use the auto-start feature that appears when you check Activate Auto Start in the Options panel.
Activate the Activate Auto Start functionality by checking the Yes radio button, then save the project.
When you load it again, the demo will start running automatically.
The easiest way to create a simple camera path is to use the Camera Orbit module. From the Project /
Create Object... menu, select Animations And Scripts / Camera Orbit and press the play button of the
In the Movie Maker module, first click on the Browse button in the Filename port and enter a movie file
name like C:/tmp/test.mpg. The .mpg suffix suggests that the movie file format will be MPEG,
which is a widely accepted standard format for digital movies achieving a good compression ratio.
Next, adjust the parameters of the Movie Maker module to your liking, e.g., change the number of
frames, the image size, or the compression quality. Please refer to the Movie Maker documentation for
details.
This chapter contains a description of Avizo interface components, data types, general concepts and
start-up options. No in-depth knowledge of Avizo is required to understand the following sections, but
it is a good idea to have a look at one of the tutorials contained in Chapter 1.7 (First steps in Avizo),
particularly the very first one described in Section 2 (Getting Started).
• File Menu, Edit Menu, Project Menu, View Menu, Window Menu, Help Menu
• Standard Toolbar, Workrooms Toolbar
• Project View, Properties Area, Progress Bar, Viewer Window, Console Window, Online Help,
Histogram Panel, Correlation Panel
• File Dialog, Job Dialog, Preferences Dialog, Snapshot Dialog, System Information
• Object Popup, Create Object Popup
The Open Data button activates Avizo’s file dialog and lets you import data sets stored in a file. Most
file formats supported by Avizo will be recognized automatically via the file header or the file name
extension. If you try to load a file for which the format couldn’t be detected automatically, an additional
dialog pops up asking you to select the format manually.
A list of all supported file formats is contained in the reference manual. Hints on how to import your
own data sets are given in Section 2.6.
If you select multiple files in the file dialog, all of them will be loaded, provided all of them are stored
in the same format. 2D images stored in separate files usually will be combined into a single 3D data
object. On the other hand, there are some file formats for which multiple data objects will be created.
Finally, you can also import and execute Avizo project scripts using the Open button.
The format of input data can be forced using Open Data As. A format selection dialog will be opened,
allowing you to choose between all of the supported Avizo file formats. All selected files will be
treated as being in the specified format.
This button also activates the file dialog, but in contrast to the ordinary Open option it is assumed that
all selected files represent different time steps of a single data object. When loading such a time series,
an instance of a Time Series Control module is created. This module provides a time slider allowing
you to adjust the current time step. Whenever a new time step is selected, the corresponding data file
is read, and data objects associated with a previous time step are replaced. The module also provides
a cache so that the data files only need to be read once, provided the cache is large enough.
This menu entry works the same way as Open Time Series Data except that the format of the input
data can be forced (same as Open Data As). A format selection dialog will be opened, allowing you
to choose between all supported Avizo file formats. All selected files will be treated as being in the
specified format.
The Save Data button allows you to save a single modified data object in the native Avizo file format
(.am). If the data originally loaded is an Avizo file, the save button will only be active if the data object
to be saved is selected and if this data object has been modified (crop, transform, etc).
Important Note: If you use the Save Data option, the original Avizo file format is overriden with the
new modified data without any notice.
This button allows you to write a data object into a file with a native file format. To do so you must
first select the data object (click on the corresponding green data icon). Then choose Save Data As to
activate Avizo’s file dialog. The file dialog presents a list of all native file formats suitable for saving
that data object. Choose the one you like and click on OK. Note that you must specify the complete
file name including the suffix. Avizo will not automatically add a suffix to the file name. However, it
will update the suffix whenever you select a new format from the file format list. Also, Avizo will ask
you before it overwrites an existing file.
If no native file format has been registered at all for a certain type of data object, the Save Data As
button will be disabled. It will also be disabled if more than one data object is selected in the Project
View.
A native file format is a file format that can save all data properties in Avizo. Actually, there are only
two native file formats: Avizo Data Format and HxSurface.
This button does the same thing as the Save Data As button, however, the file dialog presents a list of
all file formats suitable for saving that data object, native or not.
Some file formats create multiple files for a single data object. For example, each slice of a 3D image
data set might be saved as a separate raster file. In this case, you can add to the file name a sequence of
hashmarks (for instance <filename>####.jpg). This sequence will be replaced by consecutive
numbers formatted with leading zeros.
If no file format has been registered at all for a certain type of data object, the Export Data As button
will be disabled. It will also be disabled if more than one data object is selected in the Project View.
When selecting this menu entry, a Convert to Large Data Format object will be instantiated and added
to the Project View. This module allows you to convert large image data to LDA file format.
This button does a Remove all objects so that you can start building a new project in the Project View.
It also sets the new project name to ”Untitled.hx”.
The Open Project button activates Avizo’s file dialog and lets you load a project stored in a file. Project
files show up in the dialog as being in the format ”Avizo Project”. A Remove all objects will be done
before the new project is loaded so that effectively the new project replaces the old project in the
Project View. Currently, only files with extension .hx can be opened.
This button allows you to save the complete project of icons and connections shown in the Project
View. The first time a project is saved in Avizo, a Save Project policy dialog box is displayed (see
Figure 10.1). This dialog box suggests different policies and a short description of each of them. More
details about the related choices can be found in the General Tab section. The chosen policy will apply
for the project being saved only, unless the checkbox is selected. If the checkbox is selected, the policy
applying to the project being saved will apply to all future projects. This setting can be modified later
in the General Tab of the Preferences dialog box.
If the project has not been saved previously, you will need to specify the name of an Avizo Project
script in the file dialog box. When executed, the project script restores all data objects and modules
as well as the current object transformations and camera settings. This feature is useful for resuming
work from a point where you left off previously.
Note that usually all data objects must have been stored in a file to be able to save the project. If this
is not the case, a dialog box is shown listing all the data objects that still need to be saved. In the
dialog box, you can specify that all required data objects should be saved automatically in a separate
subdirectory.
Instead of selecting the option Avizo Project, you can also choose Avizo Project and data files (pack &
go) from the file dialog box’s format menu. In this situation all data objects currently loaded will be
This button works like the Save Project button except that, in this case, you will always need to specify
the name of an Avizo Project script in the file dialog.
This button allows you to save the current Project View as a template project. A template project
consists of a backup of an original project that can be replicated on different data of the same type. See
Section 11.1.1 Template Projects Description.
This button can be used to load recently used files. When choosing this menu entry a submenu appears
listing the five most recent files. If multiple 2D images have been loaded this is indicated with the
name of the first file followed by an ellipsis (...). The number of files displayed in the most recent files
list can be modified in the General tab of the Preferences Dialog.
This button can be used to load recently used project scripts. When choosing this menu entry, a
submenu appears listing the five most recent project scripts. The number of projects displayed in the
most recent projects list can be modified in the General tab of the Preferences Dialog.
10.1.1.16 Quit
This button terminates Avizo and prompts you to save the current project configuration, if there are
unsaved changes.
10.1.2.1 Cut
In the Console, this command cuts selected text and copies it to the clipboard. In the Project View, this
command removes the selected objects.
In the Console, this command copies the selected text to the clipboard. In the Project View, this
command copies the selected objects.
10.1.2.3 Paste
In the Console, this command pastes the text in the clipboard to the current text insertion point. In the
Project View, this command creates cut or copied objects.
10.1.2.4 Delete
In the Console, this command deletes the selected text. In the Project View, this command deletes the
selected objects.
In the Console, this command selects all the text. In the Project View, this command selects all objects.
10.1.2.6 Preferences
This option opens the AvizoPreferences Dialog. This dialog allows you to adjust certain global settings
of Avizo like the Project View options, the user interface layout, how project scripts are exported,
segmentation, rendering and performance options...
10.1.2.7 Dialogs
This toggle allows you to select the Graph View as current Project View.
This toggle allows you to select the Tree View as current Project View.
The Hide Object button hides all currently selected objects. The object’s icons are removed from the
Project View but the objects themselves are retained. You get the same effect by pressing the Ctrl-H
key. Hidden objects can be made visible again using Show Object or Show All Objects. This option
will be unavailable if the current Project View is the Tree View.
The Remove Object button deletes all selected objects and removes the corresponding icons from the
Project View. You can get the same effect by pressing the Delete key. If you want to reuse a data
object later on, be sure to save it in a file before deleting it. If a data object has been modified but
has not yet been saved to a file, it is marked by a little asterisk in the object icon. In the Preferences
Dialog, you can choose whether a warning dialog should be printed if you try to delete unsaved data
objects which cannot be recomputed by an up-stream compute module. If you delete a data object, all
connected modules will be deleted as well. However, if you delete a module, connected data objects
(e.g., the results of a compute module) will be retained.
The Duplicate Object button creates copies of all selected data objects. For each copy, a new data icon
is put in the Project View. The name of a duplicated data object differs from the original one by one
or more appended digits. The duplicate option is not available if you have selected icons that do not
represent data objects (e.g., display or compute modules).
This button allows you to change the name of a selected object. In Graph View, a small dialog box
will be popped up when the button is pressed. In Tree View, you can directly edit the object item in the
view. The button is disabled if no object is selected or if multiple objects re selected. Note that two
objects in Avizo can’t have the same name. Therefore, the name entered in the dialog may be modified
by appending digits to it, if necessary. You can also rename an object by pressing the F2 key when it
is selected or by double clicking on the item in Tree View mode.
This button allows you to keep visible in the viewer only the display modules of the selected objects.
This button allows you to display the Create Object popup in order to create modules or data objects
that cannot be accessed via the popup menu of any other object. Please refer to the Create Object
popup documentation for more details.
The Show button allows you to make hidden objects visible, so that their icons are displayed in the
Project View. Among the hidden objects there are usually some colormaps which are loaded at start-
up. This option will be unavailable if there are no hidden objects or if the current Project View is the
Tree View.
The Show All button makes all currently hidden objects visible, so that their icons are displayed in the
Project View. This option will be unavailable if there are no hidden objects or if the current Project
View is the Tree View.
The Remove All Objects button deletes all currently visible icons and the associated objects from the
Project View. A pre-loaded colormap that is currently visible is also deleted, but all hidden objects are
This button makes all display modules in the Project View pickable. A display module is pickable if
the associated 3D object can be picked.
This button makes all display modules in the Project View unpickable. So, the associated 3D object of
all the display modules in the Project View can’t be picked.
This mode is applicable when multiple modules of the same type will be attached to a single data
object. If the toggle is on, the port values of the first module will be used to initialize the port values
of subsequently attached modules. This can be convenient if you want the modules to have the same
initial port values.
Example: Attach an Ortho Slice to your data object and set the Mapping type to ”Colormap” and the
colormap range to 0-3. If you attach another Ortho Slice to the same data object, its Mapping type will
be ”Colormap” and its colormap range will be 0-3.
This option specifies the default behavior of colormap ports. If this option is checked, the auto adjust
range option of colormap ports will be on.
Note: For some modules, the auto adjust range option of their colormap ports is always checked by
default, independently of the global value.
10.1.4.1 Layout
The Layout button lets you select between one, two, or four 3D viewers. All viewers will be placed
inside a common window using a default layout. If you want to create an additional viewer in a separate
window, choose Extra Viewer. You may create even more viewers using the Tcl command viewer
<n> show. Starting from n=4, viewers will be placed in separate windows.
The Background button opens the background dialog, allowing you to switch between the uniform and
gradient background styles. In addition, the dialog allows you to adjust the two colors used by these
styles. Note that the checkerboard style is deprecated.
In order to change the background color via the command interface, use the viewer commands
viewer <n> setBackgroundColor and viewer <n> setBackgroundColor2. The
command interface also allows you to place an arbitrary raster image into the viewer background
(see Section 11.5.4.1 Viewer command options).
10.1.4.3 Transparency
The Transparency button controls the way of calculating pixel values with respect to object transparen-
cies during the rendering process.
Note: Antialiasing is not supported by Sorted Layers and Sorted Layers Delayed mode.
10.1.4.4 Lights
The Lights menu lets you activate different light settings for the 3D viewer. By default, the viewer
uses a single headlight, i.e., a directional light pointing in almost the same direction as the camera
is looking. The headlight can be switched on or off in each viewer via the viewer’s popup menu.
Alternatively, the headlight can be switched on or off for all viewers using the headlight toggle in
10.1.4.5 Fog
The Fog button introduces a fog effect into the displayed scene and controls how opacity increases
with the distance from the camera. The fog effect will only be seen on a uniform background. More
fine tuning is provided by the fogRange Viewer command.
10.1.4.6 Antialiasing
The Antialiasing... button opens a dialog with which the antialiasing quality values of all active viewers
can be modified. Antialising is the process of smoothing jagged edges on graphic images by using
intermediate shades.
The dialog provides several different interface components: a checkable group box, a quality slider,
and three buttons.
The checkable group box allows you to turn antialising on or off for all viewers. The slider and
corresponding text field let you set antialiasing quality with a value ranging from 0 to 1, 1 being the
best. The buttons are used to apply, save or reset changes and to quit the dialog. A detailed description
of the interface components is given below.
Antialiasing group box: The group box is composed of a slider and a checkbox. When checked,
antialiasing is applied with the quality value given. Otherwise, antialiasing is disabled.
Quality slider: The antialiasing quality slider presents the quality range. If the slider value changes,
the corresponding antialiasing is applied. This slider is accompanied by a text edit field to view the
exact value of the current antialiasing and to set its numerical value. The component values are always
in the range of 0 to 1.
Antialiasing can be done in two different ways. If full-scene antialiasing is supported via the
ARB multisample and ARB pixel format OpenGL extensions, it is used for rendering. Note that
the number of samples used in the antialiasing computation depends on your graphics hardware and
This toggle allows you to activate/deactivate the shadowing for display modules. For more information
about shadow casting, please refer to the Shadowing documentation.
10.1.4.8 Axis
The Global Axes button creates a Global Axes module which immediately displays a coordinate frame
in the viewer window. This button is a toggle, so clicking on it again deletes the Global Axes module
and removes the coordinate frame from the viewer window. The axes will be centered at the origin of
the world coordinate system. You may also create local axes by selecting the appropriate entry from a
data object’s popup menu.
10.1.4.9 Measuring
The Measuring button creates an instance of a Measurement module that lets you measure distances
and angles on objects within the viewer.
Note: Depending on the Avizo edition, the created Measurement module won’t be the same.
The Frame Counter toggle lets you switch on a frames-per-second counter that will be displayed in the
first viewer (viewer 0).
This toggle allows you to show/hide all the panels of Avizo except the viewers.
10.1.5.2 Colormap
This toggle allows you to show/hide the Colormap Editor panel of Avizo.
10.1.5.3 Console
10.1.5.4 Tables
This toggle allows you to show/hide the Tables panel of Avizo, i.e., the one containing the tables of a
spreadsheet data.
This toggle allows you to show/hide the Project View panel of Avizo, i.e., the one containing the
Project View (Graph View or Tree View).
10.1.5.6 Properties
10.1.5.7 Help
10.1.5.8 Correlation
10.1.5.9 Histogram
10.1.5.10 Toolbars
In addition of these panels, you can also manage the visibility of some Avizo toolbars via the Toolbars
submenu.
This button shows the Help dialog on the Avizo documentation home page. You will have access to
the entire Avizo documentation.
10.1.6.2 Examples
This button shows the Help dialog on the Avizo documentation demos page. You will have access to
the Avizo provided Examples.
This button shows the Help dialog on the Avizo documentation Programmer’s Guide page. You will
have access to the programmer’s documentation which is useful if you have an Avizo XPand Extension
license.
This button launches the AvizoLicense Manager which displays the status of your Avizo licenses.
This button launches a dialog which displays the activated licenses on your computer.
This button launches the AvizoSystem Information Dialog which displays some information about
your system. This information allows you and the Avizo support team to better analyze software
problems.
This button launches an external web browser on the Technical Support contacts web page of Avizo.
10.1.6.9 About
This button launches a dialog containing Avizo build and copyrights information.
Note: by default, this toolbar is hidden, it can be shown via the Window / Toolbars menu.
To learn more about workrooms concept, please refer to the following documentation.
• the Graph View where objects are represented with icons and dependencies between objects are
indicated with connection lines,
• the Tree View where objects are arranged in a tree in which objects are displayed underneath
those objects on which they depend.
To change the current Project View, you can click on the Graph View or Tree View buttons in the Project
Menu.
Note: Other than when attention is being specifically called to highlight the differences between the
Project Graph View and the Project Tree View, Project View will be used throughout the Avizo doc-
umentation to refer generically to the pane of the Avizo main window containing the collection of
objects and modules that define the visualization project.
Concepts
The Project Graph View is displayed if Graph View is selected. This selection is made by clicking the
Graph View button in the Project Menu.
Once a data object has been loaded or a module has been created, it will be represented by an icon
in the Project Graph View. Some objects, especially initially loaded colormaps, may not be visible
here. Such hidden objects are listed in the Project > Show Object menu of the Avizo main window.
Selecting an object from this menu causes the corresponding icon to be made visible in the Project
Graph View.
Icon colors are used to indicate different types of objects. Data objects are shown in green and are the
only objects which can be saved to disk using File > Save Data, File > Save Data As or File > Export
Data As menu entries. Computational modules are shown in red, visualization modules are yellow,
and visualization modules of slicing type are orange. These modules, Ortho Slice for example, may be
used to clip the graphical output of any other module.
Connections between data objects and processing modules, shown as blue lines, represent the flow of
data. For display modules, these connections show the data used to generate the display. You may
connect or disconnect objects by picking and dragging a blue line between object icons.
As you might expect, not all types of processing modules are applicable to all kinds of data objects.
If you click on a data object icon with the right mouse button, a menu pops up that shows all types of
modules that can be connected to that object (alternatively, you can click on the small white triangle on
hold down the left mouse button over the Project Graph View background, then sweep out a rectangle).
Clicking on the icon of a selected object deselects it again. Clicking somewhere on the background of
the Project Graph View causes all selected objects to be deselected. One or more selected icons may
be dragged around in the Project Graph View by clicking on them and moving the mouse pointer while
holding down the mouse button.
Interface
At the right of the Project View banner are the Auto-Display activator , Project View Select Mode
, Project View Pan Mode , Reorder Project View and the Switch To Project Tree View
buttons. In Project View Select Mode, the mouse is used for selecting, positioning, connecting, and
disconnecting objects in the Project Graph View. In Project View Pan Mode, moving the mouse pans
the Project Graph View workspace. In case your current Project is not well organized, i.e., contains a
lot of objects and you are not able to easily find an object icon among others or visualize dependencies
between objects, you can click on the Reorder Project View button. In this case, the Project Graph
View will be reorganized with object icons reordered according to the following rule: data objects are
on the left, compute objects in the middle and visualization modules on the right. The last button
switches the Project View to Project Tree View.
At the top of the Project Graph View is a region containing shortcut (or macro) buttons. The Open Data
button is a shortcut to the File > Open Data menu item. Up to 4 additional buttons are automatically
The Project Tree View is displayed if Tree View is selected. This selection is made by clicking on the
Tree View button in the Project Menu.
Figure 10.4: The Project Tree View contains data objects and module icons organized in a tree view.
Once a data object has been loaded or a module has been created, it will be represented by a new entry
in the tree view.
Each object has an associated control panel containing buttons and sliders for setting or changing
additional parameters of the object. The control panel becomes visible in the Properties Area once
the object has been selected, i.e., by clicking on its icon with the left mouse button. In order to select
• Organization: The tree is organized into folders containing different kinds of objects: Data,
Display, Compute, etc. Most of the folders are predefined and cannot be modified. A few,
however, such as the Data folder, can have more folders added beneath.
Currently, there are two ”templates” which control the organization of the tree view: a default
template for most Avizo users and a ”geophysics” template in the Avizo XEarth Extension
which includes predefined folders for 3D surveys, horizons, faults, etc.
• Connections: If you right-click on a data object icon, a menu pops up that shows all types of
modules that can be connected to that object (alternatively, you can press [Ctrl]+[Space]).
For more details about this menu, please refer to the Object Popup documentation. Selecting
one of the modules will automatically create an instance of that module type and connect it to
the data object. A new item in the tree view will appear in response. In this way you can set
up a more or less complex project that represents the computational steps required to carry out
a specific visualization task and is used to trigger them. Note that modules used will appear as
shortcut (also known as ”macro”) buttons in the upper part of the window.
For most objects, the required connections are automatically established on creation. The con-
nection is shown in the connected object’s input port in its control panel in the Properties Area.
For example, when you attach a Ortho Slice to my data.am, in the ”Data” port of the Ortho
Slice control panel, you will see ”my data.am” in the pulldown list. If other objects in the Project
Tree View can be connected to the Ortho Slice, they will be in the list as well. To switch the
connection, simply select a different item from the list. The tree view (and possibly the viewer
display) will be updated accordingly. Selecting ”NO SOURCE” from the list disconnects the
module from any object.
Reasons for not being able to connect an input to a port can include the following: incompatible
data type (use Convert Image Type to change), incompatible dimensionality of the input (use
Channel Works to change), incompatible grid type of the data (for example, use Arithmetic to
sample on a regular grid), or simply that the connection does not make sense, for example,
connecting a display module for surfaces to a volume data set.
Data objects possess a special connection port called Master. This port refers to the computa-
tional module or editor to which the data object is attached. It indicates that the computational
• Expand/Collapse: You can click on the arrow icons at the left to expand or collapse portions
of the tree.
• Drag-and-Drop: You can use drag-and-drop to move items in the tree view. For example, to
connect an existing visualization module to a different data set, you can drag and drop it from
its current location onto a compatible data set. Drag-and-drop does not work for disconnecting
objects. You must use the connection ports for this.
• Viewer Toggle: The check boxes control the visibility of the object in the currently active
viewer. If there are multiple viewers, e.g., a 4-viewer layout, you can select a viewer, set the
object’s visibility in that viewer, then repeat as often as necessary to set the desired visibility
options for each viewer. However, it will probably be more convenient to control the visibility
in individual viewers by using the viewer toggle button in the object’s control panel in the
Properties Area. The viewer toggle button is the orange square just to the right of the module
name in its control panel. The button is divided into regions corresponding to the current viewer
layout. Click on the region to toggle visibility of the object on/off in the corresponding viewer.
If there are more than 4 viewers, each additional viewer will have it own toggle button.
• Adding a Folder: At the right of the Project Tree View banner are the New Folder and the
Switch To Project Graph View buttons. The New Folder button is used for adding a new
folder directly below the currently selected folder. You can also add a folder by right-clicking
on an existing folder and selecting New Folder from the context menu. At some positions in the
tree, it may not be possible to add a new folder. The last button switches the Project View to
Project Graph View.
• Removing an Object: To remove one or more objects from the Project Tree View, first select
the object(s) to be removed. You can then use the Remove Object item from the Project context
menu, or you can press the [Delete] key to remove selected object(s). If you remove a data
object, all modules downstream from that module will be deleted as well.
• Hovering: Hovering the mouse over an item in the tree view displays information about that
item, usually its type, e.g., HxUniformScalarField3.
Column 2: Shows, for certain objects, the current value of a port of interest. Currently, the slice
number is shown for slice modules (Ortho Slice, Inline, etc.) and the time scale factor is shown for the
Seismic Settings module.
Column 3: Shows the current colormap, if any, associated with the module or object. You can right-
click on it to show the standard colormap context menu. Or you can left-click on it to bring up the
Colormap Editor.
example, if you have two viewers and two Isosurface modules you may want to display one Isosurface
in each viewer.
Display modules of slicing type (orange ones like Ortho Slice) provide a clip button. Clicking this
button will cause the graphical output of any other module to be clipped by that slice. Clipping does
not affect modules with hidden geometry, or modules that are created after the clip button has been
pressed.
Data objects provide a number of additional editor buttons. Editors are used to modify the contents
of a data object interactively. For example, you can perform manual segmentation of 3D image data
by editing Label Fields using the Segmentation Editor. Some editors display their controls in the
Properties Area like all other objects, while others use a separate dialog box that allows you to perform
object manipulations.
As mentioned, specific input controls of an object or a module are organized into Ports. Each port has
a pin button on its left. If a port is pinned, it will still be visible even when the object is deselected. The
ports are composed of widgets that can be used to set the parameters pertaining to various operations
(e.g., a value is entered by a slider, a state is set by radio buttons, a binary choice is presented as a
toggle button). The control elements have a uniform layout and are divided into several basic types.
Only display modules have pickable toggles (See Figure 10.7). When the pickable toggle of a display
module is off, the user cannot pick it in the viewer.
Figure 10.9: State of the Progress Bar during a resampling operation (Resample module): current computational action is
”Resampling” and the Stop button is red and enabled.
• hold down the left mouse button and move the mouse to rotate the camera around its current
focal point (the focal point can be changed by doing a seek operation), hold down the left mouse
button + [SHIFT] to constrain this rotation around the X or Y axis, and the left mouse button
+ [CTRL] for the Z axis.
• Hold down the left + middle mouse buttons to zoom / dolly, or [CTRL] + the middle mouse
button, or [CTRL] + [SHIFT] + the left mouse button
• Click the right mouse button to open the popup menu (see Viewer popup description for more
• Press the [S] key, then click on an object with the left mouse button to ”seek” to that position.
• Press the [P] key, then click the left mouse button to pick a 3D Object in the viewer. The
corresponding module will be selected.
• Press the [ESC] key to switch between ”interaction” mode and ”trackball” mode.
The virtual trackball, controlled by the left mouse button, allows for free rotation of the camera.
Some viewer gadgets may be displayed in one of the corners of the display:
• camera trackball: used for constrained rotation of the camera about the screen-aligned X, Y, or
Z axes. Click on the vertical wheel (it becomes red when you select it) and move the mouse
up/down (while the left mouse button is pressed) to rotate about the X axis. Click on the hori-
zontal wheel (it becomes green when you select it) and move the mouse left/right (while the left
mouse button is pressed) to rotate about the Y axis. Click on the third wheel (it becomes blue)
and move the mouse up/down (while the left mouse button is pressed) to rotate about the Z axis.
• 3D compass: indicates the current camera viewing direction. It is an indicator only; you cannot
use it to control the viewing direction.
The Edit > Preferences > Layout dialog can be used to control the visibility, auto-hide option, and
position of the trackball and the compass. Refer to the Viewer gadgets section for more details.
Sometimes you need to manipulate objects directly in the 3D viewer. For example, this technique,
called 3D interaction, is used by the Transform Editor. You can swith on this editor with the transform
editor button in the properties of a data object. The editor provides special draggers that can be picked
and translated or rotated in order to specify the transformation of a data object. Before you can interact
with these draggers, you must switch the viewer into interaction mode. This is done by clicking on
the arrow button in the upper left corner. If the viewer is in interaction mode, the mouse cursor will be
an arrow instead of a hand symbol. You can use the [ESC] key in order to quickly switch between
interaction mode and viewing mode. If the viewer is in interaction mode, use the [Alt] key to
temporarily switch to viewing mode.
More than one viewer can be active at a time. Standard screen layouts with one, two, or four viewers
can be selected via the View menu. Additional viewers can be created using the Tcl command viewer
<n> show, where <n> is an integer number between 0 and 15. While viewers 0 to 3 will be placed
in a common panel window, viewers 4 to 15 will create their own top-level window. For more specific
control, the viewer provides an extensive command set, which is documented in Section 11.5.4.1
Viewer command options.
The toolbar of the main viewer window provides several buttons and controls, allowing you, for exam-
ple, to switch between viewing mode and interaction mode, to choose certain orientations, or to take
snapshots. The precise meaning of these controls is described below.
Interact:
Switches the viewer into interaction mode. You can also use the [ESC] key to toggle between viewing
mode and interaction mode.
Trackball:
Switches the viewer into viewing mode. You can also use the [ESC] key to toggle between interaction
mode and viewing mode. The left mouse button is used to change the view direction by means of a
virtual trackball.
Same as Trackball except that the left mouse button is used for panning (translation).
Zoom:
Same as Trackball except that, in this mode, vertical motion of the left mouse button controls zooming.
Rotate:
Rotates the camera around the current view direction. By default, a clockwise rotation of one degree is
performed. If the [SHIFT] key is pressed while clicking, a 90 degree rotation is done. If the [CTRL]
key is pressed, the rotation will be counterclockwise.
Seek:
Pressing the seek button and then clicking on an arbitrary object in the scene causes the object to be
moved into the center of the viewer window. Moreover, the camera will be oriented parallel to the
normal direction at the selected point. Seek mode may also be activated by pressing the [S] key in
the viewer window.
Important note: When using front face culling mode on an object, Seek will work on the hidden faces
unless you move the camera ”through” front hidden faces. This limitation will be solved in the future
Avizo releases.
Home:
Repositions the camera so that all objects become visible. The orientation of the camera will not be
changed.
XY-, XZ- and YZ-Views:
Adjusts the camera according to the specified viewing direction. The viewing direction is parallel
to the coordinate axis perpendicular to the specified coordinate plane. The opposite view direction is
used if the [SHIFT] key is pressed.
Note: In the some Editions, these buttons will be replaced by the geographic view orientation buttons.
Adjusts the camera according to the specified viewing direction: from top, from bottom, from west,
from east, from south, from north.
Note: In some Editions, these buttons replace the XYZ view buttons.
Perspective/Ortho:
Toggles between a perspective and an orthographic camera. By default, a perspective camera is used.
Orthographic camera may be used in order to measure distances or to exactly align objects in 3D
space.
Note: Only one of these buttons will be visible at a time, the button indicating the currently active
camera type.
Stereo:
Allows you to enable or disable stereo viewing, as well as specify various stereo viewing parameters
via the Stereo Preferences dialog.
Pick:
Pressing the pick button and then clicking on an arbitrary object in the scene causes the corresponding
module to be selected. Picking mode may also be activated by pressing the [P] key in the viewer
window.
Measuring:
Pressing this button creates an instance of a Measurement module that lets you measure distances and
angles on objects within the viewer. Clicking on the down arrow will display a menu of measuring
tools from which to choose: 3D Length, 3D Angle, 3D Annotation, 3D Box, 3D Circle. Only one of
these buttons will be visible on the toolbar at a time, the button of the measuring tool most recently
accessed from the viewer toolbar.
Note: Depending on the Avizo edition, the created Measurement module won’t be the same.
Quick Probe:
This button allows you to choose the probing mode available in Interaction mode.
By default, Quick Probe is move sensitive, i.e., voxel value and coordinates under the mouse cursor
are displayed in the progress bar.
With click on this button you can disable the quick probe mode, make it move sensitive or click
sensitive. Click sensitive behavior displays coordinates and value if [SHIFT] key is pressed and left
mouse is clicked on some visualization in the viewer.
Note: If [SHIFT] key is pressed, no other interaction is possible in the viewer except clicking to
Takes a snapshot of the current rendering area and saves it to a file. The filename as well as the desired
output format must be entered through the Snapshot dialog. Snapshots may also be taken using the
viewer command snapshot.
Layout:
Selects the viewer layout: a single view, two viewers side-by-side, two viewers stacked, or four
viewers.
Fullscreen:
Selects fullscreen mode. In this mode, the viewer occupies the entire screen and no other windows
will be visible. To exit fullscreen mode, click the right mouse button and uncheck Fullscreen in the
popup menu.
Link objects visibility:
Links the visibility of objects between all viewers. When checked, it means that changing the visibility
(viewer mask) of an object in one viewer will change it in all viewers.
In addition to these buttons, the Avizo viewers provide an extensive set of Tcl commands, which are
listed in Section 11.5.4.1 Viewer command options.
All viewers include a popup menu that allows you to configure various options. A right mouse button
click opens this popup menu. The following menu options are available:
Functions:
Contains a sub-menu with items which are respectively shortcuts to Home, Set Home, View All and
Seek icons.
• Seek to point: When activated, the Seek tool will focus on the clicked point, else it will focus on
the object’s origin.
• Auto clip planes: Adjusts the camera near and far plane at each camera move.
• Automatic interactive mode: This option allows to get better performance when viewer is in
Interact mode.
• Stereo: Shortcut to the Stereo icon.
• Spin animation: When spin animation is enabled, if the mouse is moving while you release it,
the trackball will continue to spin afterwards. By default, spin animation is disabled.
• Rotation axes: Displays rotation axes at the center of the viewer.
Show trackball:
Shows/hides the camera trackball (see Viewer gadgets section for more details).
Show compass:
Shows/hides the compass (see Viewer gadgets section for more details).
Link camera to:
This menu option creates a camera link from the current viewer to the one you select (by clicking it
after you select the menu option); pressing the [ESC] key before selecting a viewer aborts the link
operation. When the cameras of two viewers are linked, they view both scenes from the same 3D point
and looking in the same direction. The section Unlink camera below explains how to remove a camera
link.
Unlink camera:
This menu option removes a camera link between two viewers by selecting the viewer to unlink.
Show objects in extra viewer:
This menu option allows showing objects from the current viewer in the extra viewer using the same
viewer masks.
Object visibility:
This sub-menu controls the object visibility in the viewer.
The following options are available:
Identify:
This menu option briefly displays the viewer identifier in the viewer.
Identify all viewers:
This menu option causes each viewer to briefly display its viewer identifier.
Figure 10.11: The Consoles Panel for Info Messages and Scripting Commands
Two command shells are available: one based on the Tcl script language (Tool Command Language),
one based on Python script language.
The default shell of Avizo serves two purposes. First, it gives you some feedback on what is currently
going on. Such feedback messages include warnings, error indications and notes on problems as well
as information on results. Second, it provides a command line interface where Avizo commands can
be entered using the Tcl script language. Examples are:
load C:/MyData/something.am
viewer 0 setSize 200 200
viewer 0 snapshot C:/snapshot.tif
The Tcl scripting syntax and the specific commands are described in the chapter Scripting. To execute
a single command, just type in its name and arguments and press Enter. If you select an object and
then press the TAB key on the empty command line, then the name of the object will be automatically
inserted.
You can also type the beginning of a command word and type the TAB key to complete the word. This
only works if the beginning is unique. Pressing TAB a second time will show the possible completions.
Often, this saves a lot of typing. Commands provided by data objects and modules are documented
in the reference section of the users guide. Pressing the F1 key for such a command without any
arguments pops up the help text for this command. This is also true for commands provided by the
ports of an object.
Additionally, the Tcl Console provides a command history mechanism. Use up arrow and down arrow
to scroll up and down in the history list.
To execute a file containing many Tcl commands, use source <filename> or load the script
file via Avizo’s file dialog from the file menu. Avizo script files are usually identified by the
extension .hx. For advanced script examples, take a look at Avizo’s demo files located in
$AVIZO ROOT/share/demo.
An alternative script shell is available, based on Python language. For more information, go to the
Python section.
• modules,
• data types,
You can access the documentation of any such object via a separate index page accessible from the
home page of the online help browser. Avizo modules also provide a question mark button in the
Properties Area. Pressing this button directly pops up the help browser for the particular module.
By default, the help browser is displayed in its own top-level window, but you can easily integrate it
where you want into the Avizo main window since the help browser is a dock widget.
Going through the online documents is similar to text handling within any other hypertext browser. In
fact, the documentation is stored in HTML format and can be read with a standard web browser as
well. Use the Backward and Forward buttons to scroll in the document history and Home to move to
the first page.
Searching the online documentation
The online help browser provides a very simple interface for a content and full text search. If you
want to search through the complete documentation, enter the desired text into the text field. Pressing
CTRL-SHIFT-F moves the focus to this text field and marks all text in this field for quick access. The
search will be performed upon pressing the Enter key.
The search is done by using the complete search phrase. For example, suppose you are looking for
information about the Surface Editor. The output shows the page title where the phrase is contained
and a small text surrounding the search phrase.
Searching in a help document is done by entering text in the Find pane. You can open it by clicking
on the Show find pane icon or by pressing CTRL-F. This function searches the content and looks
for the occurrence of the complete phrase you type into the text edit field. Pressing Enter, F3 or
clicking on next will mark the searched phrase in the text. Another click/keypress takes you to the next
occurrence of this phrase. You can search backwards by pressing SHIFT-F3 or clicking on prev to find
the previous occurrence of the phrase. If the search reaches the beginning or end of the document,
it starts over continuing in the same search direction. The searched phrase is colored with a yellow
background wherever it is found in the text. The Find pane can be closed by clicking the red X on the
pane or by unchecking the Show find pane icon.
All searches are case insensitive!
Commands
help
Makes the help dialog appear and loads the home page of the online help.
help getZoomFactor
Returns the zoom factor of the browser.
help setZoomFactor <ZoomFactor>
Sets the zoom factor of the browser.
help load file.html
Loads the specified hypertext document in the file browser. Note that only a subset of HTML is
supported.
help reload
Reloads the current document.
help invalidateCache
Destroys the search cache. In order the search function in Avizo’s help to be more responsive, the
help files are parsed and cached. If for any reason there is a need to invalidate this cache, it could
be performed by typing this Tcl command.
• Choose a material and press the + button. Two histograms are now displayed next to each other.
• The second histogram shows the pixel distribution which correspond to the selected material at
the step before.
Note: When a first histogram has been displayed, only histogram from the same data type can
be overlayed. If you load a 3D image data, it will not be present in the new input drop down list,
if an histogram has already been displayed. You will need to remove the histogram to get this
option or create a new tab (see below).
• Load data/tutorials/chocolate-bar.am
• Click the Add New Histogram tab button:
• New histogram tab can also be renamed using the Rename Tab button:
• In the histogram panel, select chocolate-bar.am in the pool down menu of the new input option.
• Select and click the Add Histogram:
• As you see in the last image, it is possible to set the range in which the histogram should be
displayed. The number of bins can also be set to increase or decrease the histogram resolution.
• New tabs can be removed: Hover the mouse on the tab to see the Close button.
It is also possible to restrict the histogram of an image within a region of interest defined by a box
(ROI). This ability is a way of extracting a subvolume representative of the larger one. Multiple ROI
can be created and set, and then the histogram of each can be calculated and displayed to see which
one fits best the full volume.
• Load data/tutorials/chocolat-bar.am
• Attach a ROI Box to the data.
• Attach another ROI Box to the data.
• Select the Histogram Panel
• In the histogram panel, select chocolat-bar.am in the pool down menu of the new input option
• In the histogram panel, select ROI Box in the pool down of the ROI input.
• Press the + button.
• In the histogram panel, select ROI Box 2 in the pool down of the ROI input.
• Press the + button.
In the correlation panel, the X axis option defines the values to be used as X for all graphs.
The Correlation Panel plots CurvedLength spatial graph at a given ChordLength for each segment of
Neuron-SpatialGraph.attributgraph.
In this exemple, the Correlation Panel helps to conclude majority
data/tutorials/neuron/Neuron-SpatialGraph.attributgraph segments are
straight lines because the repartition is overall linear.
Other plots can be placed on top of the first one by selecting new data in Y axis and hitting +. All plots
For each job, a temporary directory is created containing any required input data, scripts, state
information, and log files. On Unix systems, this directory is created at the location speci-
fied by the environment variable TMPDIR. If no such variable exists, /tmp is used. On Win-
dows systems, the default temporary directory is used. Typically, this will be C:/TEMP or
%USERPROFILE%/AppData/Local/Temp.
A job’s state may be manipulated using the action buttons shown above the job list. In order to start
the job queue, select the first job waiting for execution and then press the Start button. Note that only
one job can be executed at a time. In order to kill a running job, select it in the job list and press the
Kill button. You may delete a job from the job queue using the Delete button. When deleting a job, the
temporary job directory will be removed as well.
Once you have selected a job in the job queue, more detailed information about it will be displayed
in the lower part of the dialog window, notably the state of the job, the temporary job directory, the
submit time, the time when the job has been started, the run time, and the name of the command to be
executed. Any console output of a running job will be redirected to a log file located in the temporary
job directory. Once such a log file exists and has non-zero size, you may inspect it by pushing the View
output button.
network issues
Job success and failure notifications require that Avizo open a TCP/IP port. Depending on your net-
work configuration, it is possible that you will not be able to receive these notifications. In these cases,
contact your system administrator or change your firewall settings, if you have sufficient permissions.
Commands
job submit cmd info [tmpdir]
Submits a new job to the job queue. cmd specifies the command to be executed. info specifies
the info string displayed in the Job Dialog. tmpdir specifies the temporary job directory. If this
• Minimize project size: Only necessary data to restore the project is saved to disk. Data that can
be computed will be computed at project loading. Some data that could not be recomputed may
be saved to disk if needed. This is the legacy and default behavior.
• Minimize project computation: All of the data of the project are saved to disk. No computation
will be done at project loading, unless that data cannot be saved in its current state.
• Always ask: Always ask what policy to use when saving a new project.
Language
Set program language to
As mentionned, this option allows selecting the language that will be used inside the program.
Online Documentation
Display only available features
Only the available features are displayed in the online documentation.
Preferences and Settings
The first button allows you to restore default preferences and/or default layout and/or to clear the recent
documents lists. The second and third buttons allow you to load or save predefined sets of preferences.
Current Profile
Here you could select which profile you wish to launch Avizo:
The application must be restarted in order for the option to apply. This group box is available in the
Avizo and Avizo Lite Edition editions only.
Maximum Number of Recent Documents
Set here the number of available recent files and projects.
Windows
These items allow you to configure the layout of the Avizo windows.
Save window layout on exit
The window layout is saved when Avizo is closed. The default is on.
Show viewer in top-level window
The main Viewer window will be displayed in a top-level window. This gives you additional flexibility
in managing the ”real-estate” of your graphics display. For example, on a dual-head display, it can
be interesting to display the Viewer window on one display and the rest of the Avizo interface on the
• Tool button icon only: only the tool button icon is displayed
• Tool button text only: only the tool button text is displayed
• Tool button text beside icon: the tool button text is displayed beside its icon
• Tool button text under icon: the tool button text is displayed under its icon
• Tool button follow style: the tool button is styled according to the style of your platform
The default tools buttons style is Tool button text under icon for Mac and Tool button text beside icon
for other platforms.
Finally, you have the choice to Restore current layout, and Save current layout.
Viewer gadgets
There are two viewer gadgets, a camera trackball and a compass.
The camera trackball, used for constrained rotation of the camera about the screen-aligned X, Y, or Z
axes, is described in Section 10.1.12.
The 3D compass indicates the direction from which the camera is viewing the scene. See Section
10.1.12 for more details on the compass.
Click on the tab of the gadget whose attributes you wish to control, then set its attributes as described
below.
Show the camera trackball / Show the compass
This toggle controls the visibility of the trackball/compass. The default is off.
Auto-hide the camera trackball / Auto-hide the compass
When this box is checked, the trackball/compass is only displayed while the mouse is within the
trackball/compass display area. It is hidden as soon as the mouse moves outside the trackball/compass
display area. The default is on for the trackball and off for the compass. This item is not active if the
Show the trackball/compass item is off.
Camera trackball position / Compass position
These options allow you to control what conditions are checked for in the projects when Avizo exits.
Color Schemes
These check boxes allow you to chose alternate color schemes: CPK for atoms, and RasMol for amino
acids.
Selection Info
Conversion
This process has low performances, and may take a long time to compute.
Out-of-core threshold
Specifies the upper limit in Mb beyond which data sets are processed as out-of-core data.
Compression
Specifies the type of data compression. It enables generation of smaller LDA files, however it could
be a little bit slower at the loading stage because of the decompression process.
Sampling
Specifies the algorithm of data sampling. Available options are:
Tile Size
Sets the size of the tiles to be compressed.
• Voxels (Volumes) option sets the tile size in voxel for volume data.
• Pixels (Images) option sets the tile size in pixel for slice data.
Rendering Quality
Main Memory Amount
Sets the maximum main memory allowed in MB for the out-of-core and in-core data sets. Increasing
this value enables the use of higher resolutions when loading very large files.
It is set by default at the lowest value between either 12.5% of the maximum RAM available on the
system, and 16 GB.
Video Memory for Slice Amount
Sets the maximum texture memory allowed in MB for the out-of-core and in-core slice data sets.
• The Main Memory Amount value is linked to the volatile memory attached with the motherboard,
whereas the Video Memory for Slice Amount and Video Memory for Volume Amount are linked
to the video memory on which the graphic processor executes its computations.
• If the sum of the Video Memory for Slice Amount and Video Memory for Volume Amount values
exceeds the maximum VRAM available on the system, a warning will appear, and display errors
may occur.
• It is advised to allocate less memory to the Video Memory for Slice Amount than the Video
Memory for Volume Amount.
Options
Viewpoint Refinement
If set, refinement depends on the viewpoint.
View Culling
If set, refinement takes place only in the view frustum. The View Culling setting is ignored with
XScreen immersive configurations because of incompatibilities.
Screen Resolution Culling
If set, only tiles with the projection of a voxel that is greater than or equal to 1 pixel will be loaded. It
avoids unnecessary loading of high resolution data for large volumes.
Loading policy
Sets loading behavior. If No Interaction is selected, the asynchronous loading thread will only load
when the user does not interact with the scene. If Always is selected, loading occurs as long as there is
something to load. If Never is selected, no loading occurs. The default is No Interaction.
3D Draw Style
This option lets you choose the material draw style used in the 3D viewer.
Selection Draw Style
This option lets you choose the draw style used to highlight the voxels selection.
Labels Draw Style
This option lets you choose the default draw style used to render a material in the material list. You
can also individually change the draw style for a particular material in the Segmentation Editor.
Undo Memory Limit (MB)
This numeric field allows you to define the maximum amount of memory in Megabytes that the Undo
system is allowed to use.
See the Segmentation Editor documentation for more details.
Quality
Simplified rendering during interaction
This option activates a set of rendering techniques to speed the interactions. This option has some
effect only with a small set of display modules (e.g., Isosurface).
Raycasted spheres
This rendering option brings a huge improvement in terms of quality and performance in the rendering
of spheres, such as in point clouds. This option has, for example, effect on the Point Cloud View
module used with the Plates option activated.
Limitations: this option is not activated by default because of two limitations that should be solved in
a next release:
CPU
Here you can decide to specify the maximum number of threads for compute modules or to let Avizo
automatically choose the number of threads.
Connections
By checking Open listening port, a socket will be opened at the port indicated by Port.
In the Outgoing Connections section, the Host and Port are the default host and port used by the app
send command. See section Application Commands.
Email Notification
By selecting the Email Notification option, an email will be sent when an Avizo Module terminates a
long computation. The following settings must be defined:
Web News
Do not show news
Web News will not be displayed at Avizo startup, if checked. The default is off. Web News are
displayed in the middle of the welcome workroom.
Unit Management
Select None to deactivate the unit management or Spatial information to activate it and use coordinates
and angle units information.
Show units dialog when loading data
This checkbox activates the units editor dialog when loading spatial data objects.
Automatically determine working units
When this checkbox is selected, Avizo automatically determines the working coordinate units.
See the description of available options linked with unit management, the Units chapter and the Units
Editor documentation for more details.
Note that this tab will be only available if you have an Avizo license. Even with an Avizo license, it
will be unavailable if you launch Avizo in its Avizo Lite Edition.
Automatic Intensity Range Partitioning at load
When enabled, activates automatic Intensity Range Partitioning on data loaded and generated by Avizo.
Then you can choose to impose the number of regions that must be found or to let the Intensity Range
Partitioning algorithm detect it automatically.
Use only for 3D boundaries displays and segmentation thresholds
When enabled, the data window computed by the Intensity Range Partitioning will only be applied for
initializing the colormap range of 3D display modules such as Volume Rendering and for intensity re-
lated ports such as threshold. Any other display will be initialized with the data min-max range. When
disabled, all display modules will use the data window computed by the Intensity Range Partitioning
to set the initial range of the display module.
See the Intensity Range Partitioning editor documentation for more details.
Fitting Options
Fitting method: The fitting method used by default to do the fit.
Auto-Adjustment Refit:
Auto-Adjustment Refit is an algorithm used to improve support points distribution and fitting accuracy.
Its computation is easily customizable through input parameters (see section Auto-Adjustment Refit).
Location Options
Geometries Location options:
• Enable automatic location from the Measures panel: The latest geometry selected in the combo
box of the Measures panel is automatically located. The viewers are automatically set to display
the slices where the current selected geometry appears.
• Enable automatic location from the Local Coordinate System wizard: The latest geometry
selected in the combo box of the Local Coordinates System wizard is automatically located.
The viewers are automatically set to display the slices where the current selected geometry
appears.
• Enable automatic location from the Measures panel: The current measure selected in the Mea-
sures panel is automatically located. The viewers are automatically set to display the slices
where the current selected measure appears.
Decimal Display
Option to customize the number of decimals displayed in the Metrology Workroom.
Directories
These parameters control the default directories when looking for existing recipes and saving the
recipes results.
Note: The recipes results directory is automatically determined from the recipes directory.
Automatic Display
Check the box to activate the Automatic Display, uncheck to deactivate it.
Automatically connect a display module:
These three buttons allow you to adapt the automatic display behavior to your working habits.
Select the display module to auto-connect to:
Allows you to customize each association between data type and their associated display module.
See the chapter Automatic Display for more details.
Figure 10.29: The Snapshot Dialog allows you to save or print the contents of a Viewer window.
• Output: Specifies the output device. With to file, the grabbed image is saved to a file, with
to printer, the image is sent directly to the printer, and with to clipboard, it is sent to the
clipboard. In the to printer mode, you must first select and configure a printer by pressing the
Configure printer button. In addition, you may enter an arbitrary text string which is printed as
an annotation text below the snapshot image.
• Offscreen: Lets you grab images larger than the actual screen size. When this option is
checked, the output dimensions can be specified in the width and height text fields. If one of the
offscreen dimension is bigger than 4096, the tiles algorithm is automatically used. Notice that
the offscreen option overwrites the tiles option.
• Antialias: Use this option to render snapshots with antialiasing enabled. In this mode, the
antialiasing is performed by using the tiling rendering followed by a downscale. The Antialias
factor determines the degree of antialiasing.
• Capture all viewers: This option cancels the Render tiles option and allows creating one
snapshot of all viewers when several viewers are used.
• Filename: Lets you specify the filename, if the to file option is set. The Browse button allows
you to browse to a desired location within the filesystem.
• Format: The format option lets you select the file format to be produced for file output.
The following formats are supported: TIFF (.tif,.tiff), SGI (.rgb,.sgi,.bw), JPG
(.jpg,.jpeg), PPM (.pgm,.ppm), BMP (.bmp), PNG (.png), DCM (.dcm), Encapsu-
lated PostScript (.eps), JPEG2000 (.jp2) and PDF (.pdf). In addition, this port offers three
radio buttons to choose between grayscale, rgb, and rgb alpha type of raster images. If rgb al-
pha option is set, images are produced such that the viewer background is assigned to the alpha
channel. This option is not available for file formats that do not support an alpha channel.
• Auto-save project: Use this option to save the project in addition to the snapshot. If the option
is checked, the prohect will be saved at the same location as the snapshot specified by filename,
and ending with .hx. (i.e snapshot.jpg.hx )
Warning: it is not possible to generate a snapshot bigger than 2GB. The picture size depends on:
If the snapshot size exceeds 2GB, a warning tooltip is displayed and the value leading to the bigger
size is not validated.
Commands
snapshot [options] [filename] [filename2 (for stereo mode only)]
• -stereo
If this option is used, the stereo mode image is created. In this case, filename2 file can be
used to specify where the second image of the stereo image is stored.
• -alpha
If this option is used, the snapshot image is created with a transparent background.
• -tiled nx ny
If this option is used tiled rendering is used with nx number of tiles in the horizontal direction,
and ny number of tiles in the vertical direction.
• -offscreen [witdh height]
If this option is used offscreen rendering is used where width and height are width and height
of rendered image.
This page displays information about the system on which you are running Avizo. This information
can be useful when reporting problems to technical support.
This page displays information about the current OpenGL graphics driver. In particular, a list of
available OpenGL extensions is printed. This list allows it to check if certain rendering techniques,
like direct volume rendering via 3D textures, are supported on a particular hardware platform or not.
• An explorer used to browse the different categories of modules and data objects.
• A preview panel displaying information about the selected module or data object.
To create an object like a Bounding Box, select the Annotate category and, then, double-click (or press
[Enter]) on the Bounding Box item.
For a quicker access, it is also possible to use the search field and start to enter the ”Bounding Box”
string. A search will be done on the categories tree to find the modules and data objects whose names
begin with the entered string and the search results are automatically displayed within a completion
popup. You can instantiate the requested object by clicking on the associated completion result.
10.1.22.1 Explorer
This component is used to browse the categories of modules which can be attached to the object. The
categories tree is represented using cascading panels allowing you to navigate through the categories,
visualizing the modules hierarchy.
Once a category is selected (items with a folder icon), the next panel is automatically updated with
the category contents (note that a horizontal scrollbar can be displayed when the sub-categories level
exceeds three). Specific categories are listed before the other:
• Favorites: lists the modules which have been set as favorites (using the star button within the
preview panel). This category contains default favorites modules at the first start of Avizo.
• Recents: lists the modules which have recently been created on the object. By default, this
category is empty but its contents are saved from one Avizo execution to another, allowing you
to retrieve the modules created during the last session.
• Editors: lists the editors which can be attached on the object. Note that this category is not
displayed when no editor is available.
• Templates: lists the template modules which can be attached on the object. Note that this cate-
gory is not displayed when no template module is available.
Once an object item is selected, the preview panel is displayed on the right, displaying information
about the selected object. To create the selected object, double-click (or press [Enter]) on the item,
or click on the button within the preview panel.
This component is displayed when an object item is selected within the categories explorer. It provides
information about the selected object such as a short description, the object’s type and its former
name(s).
This component is used to search a specific object without navigating through the categories explorer.
When entering a search string, the objects whose names contains the entered string will be displayed
within a completion popup, allowing you to quickly create an object. Note that, when the search
string exceeds 3 characters, an item is displayed at the end of the list of completion results to search
the entered string within the Avizo documentation (the results will be displayed within the AvizoHelp
dialog).
Once the completion popup is displayed, you can create the requested object by double-clicking on it
or pressing [Enter] after selecting it.
By default, the search is performed on:
It is possible to filter the completion results by selecting the search filters via a menu displayed when
clicking on the search field arrow button.
When clicking on the object’s name, a menu is shown providing different actions on the object:
• Hide Object: to hide the object from the Project View (only in Graph View mode).
• Remove Object: to delete the object.
• Duplicate Object: to create a copy of an object and add it to the Project View.
• Rename Object...: to rename the object (will pop up a renaming dialog).
• Hide All From Viewer But This: to keep visible in the viewer only the display modules of the
selected objects.
The first button allows saving the data, the second button allows exporting the data.
• An explorer used to browse the different categories of modules and data objects.
• A preview panel displaying information about the selected module or data object.
• A search field used to search an item within the categories tree.
This popup menu looks and works like the popup menu of objects within the Project View. For more
details about the popup menu components, please refer to the Object Popup documentation.
To create an object like a Caption, select the Annotations category and, then, double-click (or press
[Enter]) on the Caption item.
For a quicker access, it is also possible to use the search field and start to enter the ”Caption” string. A
search will be done on the categories tree to find the modules and data objects whose names contains
the entered string and the search results are automatically displayed within a completion popup. You
can instantiate the requested object by clicking on the associated completion result.
The icon of a newly created object usually will not be connected to any other object in the Project
View. In order to establish connections later on, use the popup menu over the small white square on
the left side of the object’s icon.
You can also put in links to scripts in the Create Object popup menu. Details are defined in Section
11.5.6 (Configuring popup menus).
A 3D scalar field is a mapping R3 → R. The base class of all 3D scalar fields in Avizo is HxS-
calarField3. Various sub-classes represent different ways of defining a scalar field. There are a num-
ber of visualization methods for them, for example pseudo-coloring on cutting planes, iso-surfacing,
or volume rendering. However, many visualization modules in Avizo rely on a special field represen-
tation. Therefore, they can only operate on sub-classes of a general scalar field. Whenever a given
geometry is to be pseudo-colored, any kind of scalar field can be used (cf. Color Wash, Tetra Grid
View, Isosurface).
The class HxTetraScalarField3 represents a field which is defined on a tetrahedral grid. On each grid
vertex, a scalar value, e.g., a temperature, is defined. Values associated with points inside a tetrahedron
are obtained from the four vertex values by linear interpolation. This class does not provide a copy of
As for scalar fields Avizo provides a number of vector field classes, derived from the base classes
HxVectorField3 and HxComplexVectorField3. While ordinary vector fields return a three-component
vector at each position, complex vector fields return a six-component vector. Complex vector fields are
used for encoding stationary electromagnetic wave pattern as required by some applications. Usually
complex vector fields are visualized by projecting them into the space of reals using different phase
offsets. The Vectors Slice module even allows you to animate the phase offset. In this way, a nice
impression of the oscillating wave pattern is obtained.
A regular grid consists of a three-dimensional array of nodes. Each node may be addressed by an index
triple (i,j,k). Regular grids are further distinguished according to the kind of coordinates being used.
The most simple case comprises uniform coordinates, where all cells are assumed to be rectangular and
axis-aligned. Moreover, the grid spacing is constant along each axis. A grid with stacked coordinates
may be imagined as a stack of uniform 2D slices. However, the distance between neighboring slices
in z-direction may vary. In case of rectilinear coordinates, the cells are still aligned to the axes, but
the grid spacing may vary from cell to cell. Finally, in the case of curvilinear coordinates each, node
of the grid may have arbitrary coordinates. Grids with curvilinear coordinates are often used in fluid
dynamics because they have a simple structure but still allow for accurate modeling of complex shapes
like rotor blades or airfoils.
The Tetra Grid class represents a volumetric grid composed of many tetrahedrons. Such grids can
generally be used to perform finite-element simulations, e.g., E-field simulations.
A considerable amount of information is maintained in a Tetra Grid. For each vertex, a 3D coordinate
vector is stored. For each tetrahedron, the indices of its four vertices are stored as well as a number
indicating the segment the tetrahedron belongs to as obtained by a segmentation procedure. Beside
this fundamental information, a number of additional variables are stored in order for the grid being
displayed quickly. In particular, all triangles or faces are stored separately together with six face
indices for each tetrahedron. In addition, for each face, pointers to the two tetrahedrons it belongs to
are stored. This way the neighborhood information can be obtained efficiently.
When simulating E-fields using the finite-element method, the edges of a grid need to be stored explic-
itly, because vector or Whitney elements are used. These elements and their corresponding coefficients
are defined on a per-edge basis. When a grid is selected, information on the number of its vertices,
edges, faces, and tetrahedrons is displayed.
10.2.6 Transformations
Data objects in Avizo can be modified using an arbitrary affine transformation. For example, this
makes it possible to align two different data objects so that they roughly match each other. Internally,
affine transformations are represented by a 4x4 transformation matrix. In particular, a uniform scalar
field remains a uniform scalar field, even if it is rotated or sheared. Display modules like Ortho Slice
still can exploit the simple structure of the uniform field. The possible transformation is automatically
applied to any geometry shown in the 3D viewer.
In order to interactively manipulate the transformation matrix, use the Transform Editor (documenta-
tion is contained in the index section of the user’s guide).
Be careful when saving transformed data sets! Most file formats do not allow you to store affine
transformations. In this case, you have to apply the current transformation to the data. This can be
done using the applyTransform Tcl command. In the case of vertex set objects, the transformation is
applied to all vertices. Old coordinates are replaced by new ones, and the transformation matrix is
reset to identity afterwards. After a transformation has been applied to a data set, it cannot easily be
unset.
If a transformation is applied to uniform fields, e.g., to 3D image data, the coordinate structure is
not changed, i.e., the field remains a uniform one. Instead, the data values are resampled, i.e., the
transformed field is evaluated at every vertex of the final regular grid. The bounding box of the resulting
grid is modified so that it completely encloses the transformed original box.
• LoadCmd cmd
This parameter is usually set by import filters when a data object is read. It is used when saving
the current project into a file and it allows the object to be restored automatically. Internal use
only.
Note that there are many file formats which do not allow parameters to be stored. Therefore, informa-
tion might get lost when you export the data set in such a format. If in doubt, use the specific Avizo
Format.
10.2.8 Shadowing
Real time shadow casting is enabled through the Rendering tab of the Preferences Dialog (accessible
via the Preferences button in the Standard Toolbar or the Edit > Preferences menu entry).
Once enabled, most of display modules can cast or receive shadows.
Different modes are available, and switching from one to another is possible by clicking on the shadow
icon of a display module
•
No Shadows: the displayed shape neither casts or receives shadows
•
Cast Shadows: the displayed shape only casts shadows
•
Receive shadows: the displayed shape only receives shadows
•
Cast & Receive shadows: the displayed shape both casts and receives shadows
Shadowing may impact performance and is only fully supported by some display modules/modes (such
as Volume Rendering). Setting the environment variable AVIZO FORCE SHADOW MAPenables acti-
vating a less restrictive shadowing mode (i.e. more modules supports it but not the Volume Rendering)
• Presentation:
this section describes globally the unit management in the entire product.
10.2.9.1 Presentation
When activating the unit management in Avizo, you will be able to:
• associate a coordinate unit with each spatial data object, retrieving it directly from the data files
(depends on readers and file formats) or setting it manually with a Units Editor.
• store coordinates values of all loaded spatial data object with the same coordinate units (e.g.,
meters). The coordinate units storage in Avizo and used internally is called working units.
Working units could be specified by the user or automatically determined (see Automatically
determine or manually set the working coordinate units).
• display values related to coordinates information in the Avizo user interface (such as bounding
box, length...) in the coordinate units you want.
The units used to display values in the Avizo user interface are called display units.
To know how to activate/deactivate the unit management in Avizo, you can refer to the following
section: Activate/desactivate unit management in Avizo.
When the unit management is activated in Avizo, a coordinate unit will be assigned to each spatial data
object.
This can be done in 2 different ways:
In the most possible cases, Avizo readers will try to extract the coordinate unit directly from the
information stored in the data file. This is the case, for instance, with Avizo or MCAD readers (like
IGES).
If the coordinate unit can’t be determined by the reader (the information is missing or not supported
by the file format), it will be specified via the Units Editor. This editor is launched at data loading but
is also accessible after the data has been registered into the Project View, in the same way as the other
editors.
Once a coordinate unit has been assigned to the spatial data object, its coordinates values can possibly
be converted. This will happen if the specified coordinate unit for this data is not the same as the one
used internally by Avizo to store coordinates values for all spatial data objects (i.e., named working
• in the Units Editor, where you can see and modify the original coordinate unit of a spatial data
(i.e., the one specified ad data loading) after that the data has been loaded
• in the Parameter Editor on the spatial data where the coordinate unit of the spatial data is speci-
fied under a Units bundle. In fact, under this bundle are displayed 2 informations:
• the current (working) coordinate unit of the spatial data stored in the Coordinates param-
eter (the one in which are currently stored the coordinates in memory),
• the original coordinate unit of the spatial data stored in the OriginalCoordinates parameter
(the one specified via the Units Editor at data loading or edited furtherly).
10.2.9.3 How to modify the coordinate unit used for displaying information
Even if the coordinate unit used to internally store spatial data objects coordinates (i.e., named working
unit) is fixed, values related to coordinates information that are displayed in the product user interface
can be expressed in any coordinate units.
For example, you can load a spatial data object with coordinates stored in meters (i.e., working unit),
connect it a Bounding Box module and freely modify the coordinate unit used to display the coordi-
nates (i.e., named display unit) of the corners in the info tags of this module (by selecting millimeters,
for instance).
In this case, the displayed coordinates values will be converted from the working unit (in which are
internally stored coordinates values) to the display unit (in which are displayed these values in the
Avizo user interface).
To specify what coordinate unit is used for displaying coordinates values in the user interface:
The quickest way to modify this display unit is accessible on the main viewer toolbar between Measure
button and snapshot button (see Viewer toolbar description).
Several options linked with unit management are available and allow you to customize the way you
are using units in the product.
These options are the following:
All these options can be modified via the Avizo Preferences dialog.
To access the preferences linked with unit management:
In order to be compatible with older versions of Avizo, you are not forced to use/set units information
in spatial data objects so it’s possible to deactivate the unit management in the entire product. In this
case, spatial data objects won’t contain any unit information and no conversion linked with units will
be performed: Avizo will work as in its previous versions, in the same way you are used to.
To activate/deactivate the unit management in the entire product:
• In the Unit management section, select None to deactivate the unit management or Spatial
information to activate it and use coordinates and angle units information
When the unit management is activated, some units conversions could occur if you are loading data
whose coordinate unit is different from the working unit, used by Avizo to internally store coordinates
values.
To limit as much as possible these conversions, we recommand you let Avizo automatically determine
the working coordinate units.
In this case, when spatial data is loaded, the working coordinate unit will be automatically set to the
Activate/deactivate the units editor dialog when loading spatial data objects
As explained before, when the unit management is activated, some readers can launch a specific dialog
used to specify the coordinate unit of the loaded spatial data.
This dialog will be launched only if the reader has failed to automatically retrieve the coordinate unit
from the information stored in the data file.
To deactivate the units editor dialog when loading spatial data objects:
Unit management is not yet available for all the components of Avizo. The components (data types,
files formats, modules) for which the unit management has been implemented are listed here.
Data types
When unit management is activated in the product, it is possible to assign coordinate units and poten-
tially make units conversion on coordinate values for all data objects for which the type is listed in
table 10.1 below.
For all other data types, coordinate values can’t be converted so these are always stored internally using
original values. In this case, the coordinate units are set to the working coordinate units.
Note:
Data fields (Hexa*Field, Tetra*Field, Reg*Field and Surface*Field) have coordinate units but they
are assumed to always be the same as the one specified on the associated data (HexaGrid, TetraGrid,
Lattice, Surface). Consequently, it’s not possible to explicitly specify the coordinate units of such field
data thanks to the Units Editor. However, setting or modifying the coordinate units of a data field will
automatically update the coordinate units of all attached fields.
Files formats
Some file formats can provide information about the coordinate units of stored data. The following
The following modules have been modified to support unit management in case it has been activated:
Module Unit management support
Local Axes axis tick values and labels
Bounding Box coordinates of the lower left front and upper right back corners of the box
ROI Box minimum and maximum port values
Spline Probe point coordinates, length value and plot window
Line Probe point coordinates, length value and plot window
Measurement length and angle values
Scalebars axis tick values and labels
Several options linked with automatic display are available and allow you to customize the way you
are using it in Avizo. These options are the following:
• Choose the associations between data type and display module associated with
The contents of this preference tab looks like the following figure:
Activate/deactivate the automatic display in Avizo
The first available option is a global one that allows you to enable (if you check the box) or
disable (if you uncheck the box) the automatic display mechanism in Avizo.
Select the functional mode for automatic display mechanism
Three functional modes are available allowing you to adapt the automatic display behavior to
your working habits.
You can activate automatic display to:
• All data added to the project view, i.e., the loaded ones and the computed ones
• Loaded data only, i.e., computed data will never be automatically connected to a display module
• First loaded data only, i.e., only the first data loaded after the Avizo opening will be connected
automatically to a display module
Association management
The last section of the Automatic Display preference tab is the associations between data types
and display modules to auto-connect with. Currently, the four main data types used in Avizo are
available:
• Image
• Label Image
• Surface
• Other, i.e., all spatial data different from images, label images or surfaces.
To modify the predefined associations, you can click on the associated module to drop down a menu
as follows:
This menu lets you choose between four options:
• A custom module: This user defined module is selected by the Change Custom... entry.
• A recommended module: This module is selected by default. It has been chosen as the answer
to the most frequently usages and because of its low computation time.
• Nothing: This option allows you to use the automatic display, but not with all data type.
• A way to change the custom choice: Click on this menu entry to open the object explorer
allowing you to change the custom choice.
An easy way to enable/disable the automatic display mechanism is also available in the Project View.
It consists in a toggle button with two states. If the button is down, automatic connection is enabled,
disabled otherwise.
To create a template project, choose Save Project As Template from the File menu. An input selection
dialog appears and lists all the possible template inputs (all the current data objects). A template
input stands for a data set that must be supplied when the template is executed. You can change the
label for each selected template input. This label should be general and meaningful since it will be
displayed during template execution. The default label is the original data object name. Note: Unused
data objects are filtered by default, but you can include them in the template project by selecting the
Include unused data option.
If the template contains exactly one input, a dialog will ask if you wish to associate the template with
data of this type. If you click OK, then the template will be available in the right-click menu (Templates
submenu) for all data objects of the same data type.
Finally, a file dialog will appear to name the output file. The file name is also the name of the template,
i.e., the name that will appear in the Templates menu. Built-in template projects are stored in the folder
share/templates, but you may not have sufficient privileges to create new files in that directory.
Figure 11.1: The template project save dialog.
Figure 11.2: Data Type association is possible if template has only one input.
You can save custom templates in any directory. They will be automatically reloaded on each Avizo
start-up.
Built-in template projects and known custom user template projects are loaded automatically on Avizo
start-up. Loading a template does not mean instantiating the template project. Template projects are
only created on user demand, for example, using the Project >Create Object... menu. One exception: if
user loads a template file via the Open Data dialog, the template resource is loaded, and then executed.
If the template is associated with a data type, you can create an instance using the right-click menu for
a data object of that type. In this case, the template will be immediately created using the selected data
object.
For other templates, you can create an instance from the Templates submenu of the Project >Create
Object... menu. The template may also appear in the macro buttons list. If this case, the following
Each template input is shown with its template input name and a combo box to select the data set to be
used for that input. The candidates listed in each combo box are filtered according to their data type.
You can disable this filter and display all data present in the Project View by unselecting the Check
input type option. If there are no appropriate data objects, the combo box will be empty. You can
always select the ”<load file...>” item to display a file open dialog and choose a data file.
A special treatment for colormaps: by default, colormaps that are already in the Project View are
re-used as is. This means, for instance, that objects in the template project may be affected by range
changes. You can also choose not to share colormaps with existing objects by selecting the Independant
colormaps option.
11.2 Recipes
Avizo allows for the creation of user-defined recipes for automating a complex scenario, making use
of multiple tools, and workspaces. These recipes define high-level workflows, such as extracting user-
defined statistics from an image. For more information, refer to Chapter 5 Creating recipes to automate
workflow execution.
Recipes 522
• Command Line Options
• Environment Variables
• Avizo start-up script
• -help
Prints a short summary of command line options.
• -version
Prints the version string of Avizo. On windows, because of limitations, if a Command Prompt
(cmd.exe) is used, the command must be run this way:
start "" /B /WAIT Avizo.exe -version.
• -no stencils
Tells Avizo not to ask for a stencil buffer in its 3D graphics windows. This option can be set to
exploit hardware acceleration on some low-end PC graphics boards.
• -no overlays
Tells Avizo not to use overlay planes in its 3D graphics windows. Use this option if you experi-
ence problems when redirecting Avizo on a remote display.
• -no gui
Starts up Avizo without opening any windows. This option is useful for executing a script in
batch mode.
• -logfile filename
Causes any messages printed in the console window also to be written into the specified log file.
Useful especially in conjunction with the -no gui option.
• -depth number
• AVIZO DATADIR
A data directory path. This directory will be used as the default directory of the file dialog.
Note that for quick access to several directories, one can use operating system, for instance,
by adding directories to the list of Favorites places in the file dialog or by using a directory
containing shortcuts or links to other directories.
• AVIZO TEXMEM
Specifies the amount of texture memory in megabytes. If this variable is not set, some heuristics
are applied to determine the amount of texture memory available on a system. However, these
heuristics may not always yield a correct value. In such cases, the performance of the Volume
Rendering module might be improved using this variable.
• AVIZO MULTISAMPLE
On high-end graphics systems, a multi-sample visual is used by default. In this way, efficient
scene anti-aliasing is achieved. If you want to disable this feature, set the environment vari-
Image Stack Processing (ISP) and Image Volume Processing (IVP) Recipes 527
Section 11.5.6 (Configuring Popup Menus) describes how the popup menu of an object can be config-
ured using script commands, and how new entries causing a script to be executed can be created.
Section 11.5.7 (Registering pick callbacks) describes how script callbacks can be attached to objects
or viewers and be invoked on user pick events.
Section 11.5.8 (File readers in Tcl) describes how to register a custom file reader implemented in Tcl.
Section 11.5.9 (Creating recipe-compliant script-object) describes how to create a script-object that
can be used to create recipe.
Section 11.5.10 (Versioning of Script Objects and backward compatibility) describes backward com-
patibility considerations and lists all modules with deprecated ports.
First, please note that Tcl is case sensitive: set and Set are not the same.
A Tcl command is a space-separated list of words. The first word represents the command name,
all further words are treated as arguments to that command. As an example, try the Avizo-specific
command echo, which will print all its arguments to the Avizo console. Try typing
This will output the string Hello World. Note that Tcl commands can be separated by a semi-colon
(;) or a newline character. If you want to execute two successive echo commands, you can do it this
way:
or like this:
Instead of a command, you can also place a comment in Tcl code. A comment starts with a hash
character (#) and is ended by the next line break:
# this is a comment
echo Hello World
Variables can be used in Tcl. A variable represents a certain state or value. Using Tcl code, the value
of the placeholder can be queried, defined, and modified. To define a variable use the command
e.g.,
set i 1
set myVar foobar
Note that in Tcl, internally all variables are of string type. Since the set command requires exactly one
argument as the variable value, you have to quote values that contain spaces:
or
In order to substitute the value of a variable with name varname, a $ sign has to be put in front of
that name. The expression $varname will be replaced by the value of the variable. After the above
definitions,
echo $Output
would print
would yield the output 1.) Hello World. Note that variable substitution is performed for strings quoted
in ", while it is not done for strings enclosed in braces {}. Even newline characters are allowed in a {
} enclosed string. Note however, that it is not possible to type in multi-line commands into the Avizo
console.
To do mathematical computations in Tcl, you can use the command expr which will evaluate its
arguments and return the value of the expression. Examples are:
expr 5 / ( 7 + 3)
expr $i + 1
In order to use the result of a command like expr for further commands, an important Tcl mechanism
has to be used: command substitution, denoted by brackets []. Any list enclosed in brackets [] will
be executed as a separate command first, and the [...] construct will be replaced with the result of
the command. This is similar to the ‘...‘ construct in Unix command shells. For example, in order to
increase the value of the variable i by one you can use:
set i [expr $i + 1]
Of course, command expressions can be arbitrarily nested. The order of execution is always from the
innermost bracket pair to the outermost one:
Further important language elements are if-else constructs, for loops and while loops. These
constructs typically are multi-line constructs and therefore can not be typed conveniently into the Avizo
console. If you want to try the examples shown below, write them into a file like C:\test.txt by
using a text editor of your choice, and execute the file by typing
source C:/test.txt
set a 7
set b 8
if {$a < $b} {
echo "$a is smaller than $b"
} elseif {$a == $b} {
echo "$a equals $b"
} else {
echo "$a is greater than $b"
}
The elseif and else parts are optional. Multiple elseif parts can be used, but only a single if
and else part.
Another important construct is the conditional loop. Like the if command, it is based on checking a
conditional expression. In contrast to if, the conditional code is executed multiple times, as long as
the expression evaluates to true:
set i 1
while {$i < 100} {
echo $i
set i [expr $i * 2]
}
foreach x {1 2 4 8 16 32 64} {
echo $x
}
This will generate the same output as the previous example. Note that the expression enclosed in
braces is a space-separated list of words.
A new function or procedure is defined in Tcl using the proc command. Proc takes two arguments:
a list of argument names and the Tcl code to be executed. Once a procedure is defined, it can be used
just like any other Tcl command:
proc computeAverageA {a b} {
return [expr ($a+$b)/2.0]
}
proc computeAverageB {a b c} {
return [expr ($a+$b+$c)/3.0]
}
echo "average of 2 and 3: [computeAverageA 2 3]"
echo "average of 2,3,4: [computeAverageB 2 3 4]"
As you can see in the example, the argument list defines the names for local variables that can be used
in the body of the procedure (e.g. $a). The return command is used to define the result of the
procedure. This result is the value that is used in the command bracket substitution [].
If you want to define a procedure with a flexible number of arguments, you must use the special
argument name args. If the argument list contains just this word, the newly defined command will
accept an arbitrary number of arguments, and these arguments are passed as a list called args:
In this example, the llength command returns the number of elements contained in the args list.
Note that the variable result defined in the procedure has local scope, meaning that it will not be
known outside the body of the procedure. Also, the value of globally defined variables is not known
within a procedure unless that global variable is declared using the keyword global:
set x 3
proc printX {} {
global x
echo "the value of x is $x"
}
Finally, at the end of this brief Tcl introduction, we come back to the concept of lists. Basically
everything in Tcl is constructed using lists, so it is very important to know the most important list
manipulation commands as well as to understand some subtle details.
Here is an example of how to take an input list of numbers and construct an output list in which each
element is twice as big as the corresponding element in the input list:
You can think of lists as simple strings in which the list elements are separated by spaces. This means
that you can achieve the same result as in the previous example without using the list commands:
The append command is similar to lappend, but it just adds a string at the end of an existing string. List
manipulation becomes much more involved when you start nesting lists. Nested lists are represented
using nested pairs of braces, e.g.
set input {1 2 {3 4 5 {6 7} 8 } 9}
foreach x $input {
echo $x
}
1
2
3 4 5 {6 7} 8
9
set i [list 1 2 3]
lappend i "4 5 6"
echo $i
1 2 3 {4 5 6}
You can use the lindex command to access a single element of a list. lindex takes two arguments: the
list and the index number of the desired element, starting with 0:
set i [list a b c d e]
echo [lindex $i 2]
For example, if an object called ”Global Axes” exists (choose View/Axis from the Avizo menu) then
you can use commands like
"GlobalAxes" deselect
"GlobalAxes" select
"GlobalAxes" setIconPosition 100 100
Note: Modules are renamed in camel case. These three words are possible in commands: ”Global
Axes”, ”GlobalAxes” or GlobalAxes.
When you type in these commands, you will notice that the values in the user interface change imme-
diately. However, the module’s compute method is not called until explicitly firing the module using
the fire command. This allows you to first set values for multiple ports without a recomputation
after each command. However, note that some modules automatically reset some of their ports, for
example, when a new input object is connected. In such cases, you may need to call fire after setting
the value of every single port.
Usually the name of a port is identical to the text label displayed in the graphical user interface, except
that white spaces are removed and command names start with a lower case letter. To find out the names
of all ports of a specific module, use the command
<object-name> allPorts
Almost all ports provide a setValue and a getValue command. The number of parameters and
the syntax, of course, depend on the ports.
Commands of the type <object-name> <port-name> setValue ... make up more than
90% of a typical Avizo script. However, besides the port commands, many Avizo objects provide
additional specific commands. The command interface for a particular tool can be quickly accessed by
clicking the corresponding ? button in the Properties Area when the module has been selected.
As a quick help, entering an object’s name without further options will display all commands available
for that object. Note that this will also show undocumented, unreleased, and experimental commands.
In order to get more information about a particular module or port command, you can type it into the
console window without any arguments and then press the F1 key. This opens the help browser with a
command description.
Avizo objects are part of a class hierarchy. Similar to the C++ programming interface, script commands
are also inherited by derived classes from its base classes. This means that a particular object like the
Some variables in Avizo Tcl exist that are predefined and have a special meaning. These are
The basic command interface of Avizo modules and data objects is described in the data type chapter
of the reference part of the user’s guide in the Object section. The basic syntax of object commands is
where <object> refers to the name of the object and <command> denotes the command to be
executed. Each module or data object may define its own set of commands in addition to the commands
defined by its base classes. The commands described in the Object section are provided by all modules
and data objects.
Global commands are described in the following section.
Performance issues can occur in a script which creates/applies modules many times. This could be
caused by the History Logging, used to create Recipes from module results.
To improve script performance, the History Logging can be deactivated (resp. activated) using the
startLogInhibitor (resp. stopLogInhibitor) command. Once deactivated, it is not possi-
ble to create recipe from the script result. See Creating recipe-compliant script-object section for more
information.
Commands
viewer [<number>] snapshot [-offscreen [<width> <height>]]
[-stereo] [-alpha] [-tiled <nx> <ny>] <filename> [filename2]
This command takes a snapshot of the current scene and saves it under the specific filename.
The image format will be automatically determined by the extension of the file name. The list
of available formats includes: TIFF (.tif,.tiff), SGI-RGB (.rgb,.sgi,.bw), JPEG
(.jpg,.jpeg), PNM (.pgm,.ppm), BMP (.bmp), PNG (.png), and Encapsulated PostScript
(.eps). If the viewer number is not given, the snapshot is taken from all viewers, if you have
selected the 2 or 4 viewer layout from the View menu.
If the -offscreen option is specified, offscreen rendering with a maximum size of 2048x2048
is used. In this case, the viewer number is required even if viewer 0 is addressed. If the width and
height is not specified explicitly, the size of the image is the current size of the viewer.
Caution: If you have more than one transparent object visible in the viewer and you want to use
offscreen rendering, set the transparency mode to Blend Delayed and check to see if all objects are
rendered properly prior to taking a snapshot.
If -stereo option is used, the stereo mode image is created. In this case, filename2 file can be
used to specify where the second image of the stereo image is stored.
If -alpha option is used, the snapshot image is created with transparent background.
If -tiled nx ny option is used, tiled rendering is used with nx number of tiles in horizontal
direction, and ny number of tiles in vertical direction.
• the viewer is in top level and the given size is too small (ex: (10, 10))
• the viewer is not in top level and the main window can’t be resized to a smaller size (Example:
a widget is blocking the main window resize like the unified title and tool bar on Mac or a
dock widget with a minimal width).
The last option does the same as the rotate button of the user interface. In most cases the m option
is most adequate. For backward-compatibility the default is u.
viewer [<number>] setDecoration <state>
Deprecated.
viewer [<number>] saveScene [-b] [-r] [-z] <filename>
Saves all of the geometry displayed in a viewer in Open Inventor 3D graphics format. Warning:
Since many Avizo modules use custom Open Inventor nodes, the scene usually can not be displayed
correctly in external programs like ivview. The following options are available:
The command theMain allows you to access and control the Avizo main window. Besides the spe-
cific command options listed below, all sub-commands listed in Section 11.5.4.4 (Common commands
for top-level windows) can also be used.
Commands
theMain snapshot filename
Creates and saves a snapshot image of the main window. The format of the image file is determined
from the file name extension. Any standard image file format supported by Avizo can be used, e.g.,
.jpg, .tif, .png, or .bmp.
theMain setViewerTogglesOnIcons {0|1}
Enables or disables the display of the orange viewer toggles on object icons in the Avizo Project
View.
theMain ignoreShow [0|1]
Enables or disables the special purpose no show flag. If this flag is set, subsequent mainWindow
show commands are ignored. This can be useful to run standard Avizo scripts in a Avizo XScreen
Extension environment. Calling the command without an argument just returns the current value of
the flag.
theMain showConsole [0|1]
Enables or disables display of console window in Avizo.
The command theMsg allows you to access and control the Avizo console window. Besides the spe-
cific command options listed below, all sub-commands listed in Section 11.5.4.4 (Common commands
for top-level windows) can also be used.
These commands are available for all Avizo objects which open a separate top-level window. In par-
ticular, these are the Avizo main window (theMain), the console window (theMsg), and the viewer
window (viewer 0). For example, you can set or get the position of these windows using the corre-
sponding global command followed by setPosition or getPosition.
Commands
getFrameGeometry
Returns the position and size of the window including the window frame. In total, four numbers are
returned. The first two numbers indicate the position of the upper left corner of the window frame
relative to the upper left corner of the desktop. The last two numbers indicate the window size in
pixels.
getGeometry
Returns the position and size of the window without the window frame. In total, four numbers are
returned. The first two numbers indicate the position of the upper left corner of the window relative
to the upper left corner of the desktop. The last two numbers indicate the window size in pixels.
The command workArea allows you to access the progress bar located in the lower part of the Avizo
main window. You can print messages or check if the stop button was pressed.
Commands
workArea setProgressInfo <text>
Sets an info text to be displayed in the progress bar. The text can be used to describe the status
during some computation.
workArea setProgressValue <value>
Sets the value of the progress bar. The argument must be a floating point number between 0 and 1.
For example, a value of 0.8 indicates that 80% of the current task has been done.
workArea startWorking [<message>]
Activates the stop button. After calling this command, the Avizo stop button becomes active. In
your script, you can check if the stop button was hit by calling workArea wasInterrupted.
When the stop button is active, you can’t interact with any other widget unless you call workArea
stopWorking in your script. Therefore, you must not enter this command directly in the console
window, but you should only use it in a script file or in a Tcl procedure.
workArea stopWorking
Deactivates the stop button. Call this command when the compute task started with workArea
startWorking is done or if the user pressed the stop button. This command also restores the
progress info text which was shown before calling startWorking.
workArea wasInterrupted
Checks if the user pressed the stop button. You should only use this command between workArea
startWorking and workArea stopWorking. If there are multiple nested compute tasks
and the user presses the stop button, all subsequent calls to wasInterrupted return true until
the first level is reached.
The app command provides several options not related to a particular object or component in Avizo,
but related to Avizo itself.
Commands
app version
Returns the current Avizo version.
app uname
Returns simplified name of operating system.
Commands
addTimeout msec procedure [arg]
Schedules a Tcl procedure for being called after msec milliseconds. If arg is specified, it will
be passed to the procedure. The specified procedure will be called only once. If necessary, you
can schedule it again in the time-out procedure. Example: addTimeout 10000 echo {10
seconds are over.}
all [-selected | -visible | -hidden] [type]
Returns a list of all Avizo objects currently in the Project View. If type is specified, only objects
with that C++ class type (or derived objects) are returned. Search can be limited to selected, visible,
or hidden objects, respectively. Example: all -hidden HxColormap.
aminfo [-a outfile|-b outfile] Avizo-File
If used with only a file name as argument, this command will open the file which has to be in Avizo
data format and print header information. If used with the -a or -b option, the outputfile specified as
argument outfile will be written in ASCII (-a) or binary (-b) format, respectively. Thus, aminfo can
be used to convert binary Avizo data into ASCII and vice versa.
clear
Clears console window.
create class name [instance name]
Creates an instance of an Avizo object like a module or data object. Returns the instance name.
Note that data objects are normally not created this way but by loading them from a file. Example:
create HxOrthoSlice MySlice.
dso options
Controls loading of dynamic libraries (”dynamic shared objects”). The following options are pro-
vided:
• addPath path ...: Adds a path to the list of directories to be searched when loading a
dynamic library.
• verbose {0|1}: Switches on and off debug information related to dynamic libraries.
• open <package>: Trys to load the specified dynamic library. It is enough to specify the
package name, e.g., hxfield. This name will be automatically converted into the platform
dependent name, e.g., libhxfield.so on Linux or hxfield.dll on Windows.
• unloadPackage <package>: Unloads (if possible) the specified dynamic library.
• execute <package> <function>: Executes the function defined in the specified dy-
namic library.
echo args
mem
Prints out some memory statistics.
quit
Immediately quits Avizo.
remove {objectname | -all | -selected}
Removes objects from Project View.
# Avizo Script
There are some Tcl files that are loaded automatically when Avizo starts. At startup, the program
looks for a file called .Avizo in the current directory or in the home directory (see Section 11.3.3
(Start-up script) for details). If no such user-defined start-up script is found, the default initialization
script Avizo.init is loaded from the directory $AVIZO LOCAL/share/resources/Avizo
or $AVIZO ROOT/share/resources/Avizo. This script then reads in all files ending with .rc
from the share/resources subdirectory. The .rc files are needed to register modules and data
types. Therefore, one can customize the startup behavior of Avizo by simply adding a new .rc file to
that directory or by modifying the Avizo.init file.
Note:
These script files must be encoded in utf-8 in order to work with non ascii characters.
Another way of executing Tcl code is to define procedures that are associated with function keys. If
predefined procedures with the names onKeyF2, onKeyF3, ..., onKeyShiftF2, ...,
onKeyCtrlF2, ..., onKeyCtrlShiftF2, ... exist, these procedures will be automat-
ically called when the respective key is pressed in the Avizo main window, console window, or
viewer window. To define these procedures, write them into a file and source it or write them
into Avizo.init or in one of the .rc files. An example is
proc onKeyF2 { } {
echo "Key F2 was hit"
viewer 0 viewAll
}
• The option -name specifies the name or label of the module as it will be printed in the popup
menu.
• The option -primary says that this module can be attached to data objects of type
HxUniformScalarField3 or HxStackedScalarField3. This means that Multi-
Thresholding will be included in the popup menu of such objects only.
Besides these standard options, additional Tcl commands to be executed after the module has been
created can be specified using the additional option -proc. For example, imagine you are working in
a medical project where you have to identify stereotactic markers in CT images of the head. Then it
might be a good idea to add a customized version of the Multi-Thresholding module to the popup menu,
which already defines appropriate material names and thresholds. This could be done by adding the
following command either in a new resource file in $AVIZO ROOT/share/resources or directly
in hxlattice.rc:
The variable $this used in the Tcl code above refers to the newly created module, i.e., to the Multi-
Thresholding module. Note that the commands are executed before the module is connected to the
source object for which the popup menu was invoked. Some modules do some special initialization
when they are connected to a new input object. These initializations may overwrite values set using
Here the Tcl variable $PRIMARY refers to the input object. The same variable is also used in Tcl
expressions defined by a -check option, as described above.
Besides creating custom popup menu entries based on existing modules, it is also possible to define
completely new entries which do nothing but execute Tcl commands. For example, we could add a new
submenu Edit to the popup menu of every Avizo object and put in the Hide, Remove, and Duplicate
commands here which are normally contained in the Edit menu of the Avizo main window. This can
be achieved in the following way:
Of course, it is also possible to execute an ordinary Avizo script or even an Avizo script object with a
-proc command.
<module> setPickCallback
viewer <n> setPickCallback
The optional argument <EventType> refers to the kind of event that will invoke the callback. Other
events will be ignored. This argument can take the following values:
• object, the name of Avizo object the picked geometry belongs to,
• x, the x coordinate of picked point,
• y, the y coordinate of picked point,
• z, the z coordinate of picked point,
• idx, the index of picked element,
• stateBefore, the modifier state just before event occurs,
• stateAfter, the modifier state just after event occurs.
The procedure should return 0 if the picking event was not handled, in which case other callback
procedures could be invoked. Here is an example:
Note that any module is free to add specific information to this argument array. All elements can be
displayed with:
Then, the Tcl reader function must be registered into the wanted file format declaration with the fol-
lowing template:
You indicate the custom Tcl reader function with ’-loadArgs’. The arguments ’-package hxcore -load
hxReadByTcl’ must be filed as is, without change. This sets the internal wrapper that will call the Tcl
interpreter.
You can declare your custom reader in a Tcl script, or include it in a resource file to be loaded when
the application starts up.
• Using inhibitors
• Modifying the input
The script-object should have an Apply (i.e., portDoIt) button. The computation should be launched
only if this button has been clicked.
In terms of code:
The recipe system is based into the HistoryLog of a data. The HistoryLog is a record of each step or
tool that has been applied to produce the data.
The script-object should create a result dataset, and set it as result by using the setResult command.
The setResult command will correctly record the HistoryLog of the data.
In terms of code:
The sections below describe how to handle some particular scripts, which modify the script connec-
tions or the input data.
In some particular case, the recipe created from the script result contains ”internal steps” since the
internal tools used in the script-object appear in the recipe.
This appends when the connection port of the script-object is modified by the script.
If such a use case occurs, and if there is no reason these tools should appear in the recipe, the internal
tool recording should be inhibited using the startLogInhibitor and stopLogInhibitor
TCL commands. The script setResult command should be called after the stopLogInhibitor
command.
In terms of code:
• Start the inhibitor in the compute method before creating any other tool.
• Stop the inhibitor before setting the result.
This can also be used to improve performance in script using a lot of modules.
If you want to modify the input of the script-object (e.g., by changing its transformation), the
setResult rule cannot be applied since the result of a tool cannot be connected as an input.
In this use case, to make the script-object recipe-compliant, we need to manually record the recipe
step, by using the recordInputUpdateInHistoryLog command.
In terms of code:
What is Python
Python is a high-level, object-oriented, interpreted language first implemented in 1989.
(https://www.python.org/dev/peps/pep-0020/)
What is Included
Avizo utilizes Python 3.5.2. Detailed information on how to use Python 3.X can be found here:
https://docs.python.org/3.5/tutorial/index.html. Many packages are included in the Python installation
(See the List of Python Packages here). Numpy and Scipy are two of the most popular Python
packages included in this installation.
Numpy is an extension for handling multi-dimensional array, which allows for elementwise opera-
tions, comparisons, logical operations, and statistics among others. The numpy array is implemented
in C allowing for faster computation. More information can be found here: http://www.numpy.org/.
Scipy is an extension that provides a toolbox for scientific computing such as interpolation, in-
tegration, image processing, linear algebra, signal processing, and statistics. More information can be
This section is not meant to cover all applications and details of the Python language. See the links in
the previous section to learn more about Python, Scipy, and Numpy. To learn more about how Python
interacts with Avizo, continue to chapter 11.6.1.2 Embedded Python Usage.
Python Console
The console can be accessed by going to Windows > Consoles (see Figure 11.4). The consoles panel
has a tabbed interface with several different tools available (see Figures 11.5 and 11.6).
Remove Pythonic Objects: This removes all python objects created within the console from
Avizo’s workspace
Redirect All Output: This pushes all output from all interpreters to the main console
Redirect This Output: This pushes all output from the current console to the main console
The console acts as a Python interpreter, so any written commands will be immediately executed after
pressing Enter. The assignment, or return value, will be displayed after execution.
TAB
When nothing is written in the console, TAB will auto-complete the following command
hx project.get(module), which will create a Python handle for the object. When text exists in the con-
sole, TAB will attempt to auto-complete the current string from a list of available methods, attributes,
and modules. The highlighted choice from the pulldown list will be completed.
UP or DOWN
These buttons cycle through your recent history. UP retrieves your previous command, while DOWN
retrieves the subsequent command.
Packages
Python is an object-oriented language, meaning that code is typically broken down into classes in
which variables and methods can be inherited by objects at instantiation.
>>>import numpy
The Numpy package contains a sin(x) method that can then be accessed to calculate sin(π/2):
>>>numpy.sin(3.1415/2)
0.99999999892691405
Numpy already contains a global variable defining π that you can access in the same way:
>>>numpy.pi
3.141592653589793
>>>numpy.sin(numpy.pi/2)
1.0
Packages can be assigned to variables when imported to the namespace to simplify code:
>>>import numpy as np
>>>np.sin(np.pi/2)
1.0
Syntax
Python supports several different object types:
Type Description Example
Number Integers, floats, complex, 1, 1.05, 3j+2, 3>2 is True
booleans
String Sequence of characters "String of charaters"
List Container to group items [1, 5, "Dragon", 948.5]
that can be changed
Tuple Container to group items (948.5, "Dragon", 5, 1)
that cannot be changed
Dictionary Associated arrays with {’a’:99, ’b’:’red’, ’c’:’balloons’}
unique keys
Array Vectorized numeric array numpy.ones ((10,5))
optimized for C
Some types are denoted using specific characters. For example, single or double quotes are used to
create strings:
11.6.1.2.1 Overview
Similar to TCL, Python has been implemented in Avizo using a Pythonic API. Commands specific to
Avizo allow you to access information and functionalities contained within Avizo modules. There are
two main ways to interact with Avizo using Python. The first way to use Python is through the Python
console, which is separate from the TCL console. This is an interpreter. The basic functionality of
this console, such as tab completion, is described in chapter 11.6.1.1 Introduction to Python.
The second way to use Python in Avizo is through script modules. Python script modules allow you to
inherit properties from the pre-defined PyScriptObject class before you override them to create their
own integrated extensions to Avizo. Script modules act like regular modules in Avizo and can be
accessed in the Object Popup menu when accompanied by a resource file. The resource file still must
be written in TCL. There are four methods included in the PyScriptObject class for your convenience:
• If you are unsure what an object’s type ID is, you can create the object in the GUI then
use the <module> getTypeId command in the TCL console to learn its type.
>>>hx_project.create(’HxOrthoSlice’)
4. Now we need to connect Ortho Slice to chocolate-bar.am, but we will first assign the Ortho Slice
to a variable using the get() method to make it easier to access in the future. We will do the
same for chocolate-bar.am:
>>>ortho = hx_project.get(’Ortho Slice’)
>>>input_data = hx_project.get(’chocolate-bar.am’)
5. To connect the Ortho Slice to chocolate-bar.am, we will need to see how to access the Data
port of Ortho Slice. Expose a list of possible ports to interact with by printing the results of the
portnames command to the console:
>>>ortho.portnames
[’data’, ’origin’, ’normal’, ’frameSettings’,
...]
7. We can also change the slice location by setting the sliceNumber port’s value:
>>>ortho.ports.sliceNumber.value = 100
>>>ortho.fire()
8. Experiment with the other ports in Ortho Slice to see if you are able to change the slice orienta-
tion and the colormap. For help accessing these ports, pass the access command to the help()
method:
>>>help(ortho.ports.sliceOrientation)
9. Read further on the methods and classes available for your manipulation by passing them to the
help() method:
>>>help(ortho.fire)
>>>bbox = hx_project.create(’HxBoundingBox’)
4. Retrieve the extents of the bounding box in X, Y, and Z to calculate its volume. There is already
a bounding box command you can use to get this information, which is stored as a tuple defined
as ((xmin, ymin, zmin),(xmax, ymax, zmax)).
>>>type(data.bounding_box)
<class ’tuple’>
>>>data.bounding_box
((0.0, 0.0, 0.0),
(0.02807999961078167,
0.020880000665783882,
0.035280000418424606))
5. Python also makes it easy to extract two variables at once from this two-list tuple.
>>>min_bounds, max_bounds = data.bounding_box
6. Access each of the indices from the minimum and maximum boundary lists using brackets []
and plug this information into a formula to calculate the box’s volume.
>>>x_extent = max_bounds[0] - min_bounds[0]
>>>y_extent = max_bounds[1] - min_bounds[1]
>>>z_extent = max_bounds[2] - min_bounds[2]
>>>volume = x_extent * y_extent * z_extent
• If you do this directly in the Avizo console, press SHIFT+ENTER to enter a line break in your
code without executing it.
• Python requires consistent indentation within the body of a function. The best practices conven-
tion is to indent the body of code by four spaces (not a tab).
3. An ellipses is shown in the interpreter to show that it is waiting for more code before executing
the current input. Manually type four spaces, then assign the minimum and maximum bounding
box lists to variables as before.
... min_bounds, max_bounds = data_arg.bounding_box
4. Pressing SHIFT+ENTER to make a new line, enter another four spaces, and proceed with the
rest of the volume calculator.
... x_extent = max_bounds[0] - min_bounds[0]
... y_extent = max_bounds[1] - min_bounds[1]
... z_extent = max_bounds[2] - min_bounds[2]
... volume = x_extent * y_extent * z_extent
... print(’The volume of %s is %.3f. ’ % (data_arg.name, volume))
5. Finally, include a return statement to send the volume variable back to the console. This
allows you to set the result of the calculation to a variable.
... return volume
6. Execute the function definition by pressing ENTER, then test the code with chocolate-bar.am.
Test your ability to assign the calculation result to a variable as well.
>>>bbVol(hx_project.get(’chocolate-bar.am’))
The volume of chocolate-bar.am is 2e-05.
2e-05
>>>chocolatebar_volume = bbVol(hx_project.get(’chocolate-bar.am’))
There are two mains functions that greatly help the user to explore the structure of Python within
Avizo. The dir() function allows the user to see a list of attributes and methods that are available
for a given object.
This information is also available in a pulldown list when you begin typing a command (See Figure
11.7).
The help() function has more detailed information about attributes and methods and examples of
their use. Output from help() also contains information about related parent classes.
>>>help(ortho)
Help on HxPlanarModBase object:
class HxPlanarModBase(HxModule)
| This is the first class of HxBase hierarchy which represents items that
• print() is a native Python command that prints results to the Python console in Avizo.
>>>x = 3
>>>y = 2
>>>print(’The sum of %i + %i is %i.’ % (x,y,x+y))
The sum of 3 + 2 is 5.
• import is a native Python command that adds extended functionality to Python by loading
extra packages.
>>>x = 3
>>>y = 2
>>>import numpy
>>>numpy.add(x,y)
5
A complete reference manual with many code snippets explaining how to configure all ports and
modules, is accessible from the Python Reference Help menu item
What is an Attribute
An attribute is a data field contained within a class. Some attributes may be read-only.
What is a Method
A method is a function contained within a class. Many methods do not need an argument.
List of Common Methods
Here the variable ’a’ refers to the python handle for your object.
a.compute():
This method performs the computation of the object if a.ports.doIt.was hit = True. This simulates
clicking Apply of the object when conditions permit.
a.update():
This method updates the object GUI for the properties window.
a.fire():
This method calls a.update() and a.compute().
• HxConnection
This port class allows the user to connect modules. The type of module can also be restricted.
1. Open a text editor and create a new file with the following structure. Name the object
BoundingBoxVolume.
class BoundingBoxVolume(PyScriptObject):
def __init__(self):
# Initialization code will go here
def update(self):
# Update code will go here
def compute(self):
# Computation code will go here
2. The script object needs to be able to connect to a data object to know which bounding box
needs the volume calculated. By default, Python script objects inherit a data connection from
the PyScriptObject class. Make sure it is visible in the init () method.
def __init__(self):
self.data.visible = True
def update(self):
pass
4. In the compute method, we want to halt the volume computation if there is no data object
connected to the script module. Add an if statement that checks if the data connection is
empty. If the data connection is empty, use a return statement to exit the compute()
method.
• Python makes this easy with the None keyword (i.e., if <expression> is None)
def compute(self):
# Check if input data is connected
if self.input.source() is None:
return
5. Finally, if the logic check fails because a data object is attached, calculate the volume using the
bbVol script. Get the name of the connected data object using the source() method.
def compute(self):
# Check if input data is connected
if self.input.source() is None:
return
data = self.input.source()
min_bounds, max_bounds = data.bounding_box
x_extent = max_bounds[0] - min_bounds[0]
y_extent = max_bounds[1] - min_bounds[1]
z_extent = max_bounds[2] - min_bounds[2]
volume = x_extent * y_extent * z_extent
print(’The volume of %s is %.g. ’ % (data_arg.name, volume))
6. Once your module is complete, create a resource file in TCL that displays this module in the
Object Popup menu as an option to attach to all data objects.
• Refer to Configuring Popup Menus to learn more about creating resource files.
-name
This is the name of your module in the menu.
-package
This defines the package of your object.
-primary
This restricts the data type that is required for your script to appear.
-proc
This is the body of the resource file where you can identify while .pyscro loads along with
connecting your script to the object that you originally right-clicked.
-add
This creates a name for your button.
-color
This controls the color of your button.
-proc
This is the body of the resource file where you can identify while .pyscro loads or the procedure
runs.
The EDM tool should be used to find available Python packages and install new ones. It allows
viewing, updating, and removing installed packages. Moreover, it allows reverting to previous states
and restoration of the original Avizo Python environment.
How to install and configure EDM
Note: The EDM installer might need to restart your computer.
edm help
1. Enter the following command in the EDM console in order to start the EDM shell (hxEnv
corresponds to the Python environment name you created from the How to install and configure
EDM chapter):
Note that OpenPNM is compatible with Python 3.5 in version lower or equal than 1.7.
3. Since OpenPNM 1.7.0 needs sympy you will also need to install this package which is directly
available in EDM:
Providing that the HX FORCE PYTHON PATH environment variable is set to the hxEnv environment,
OpenPNM is now directly available from within the Avizo Python console or a pyscro script.
alabaster 0.7.10-1
appdirs 1.4.3-1
babel 2.4.0-2
backports.abc 0.5-1
One of the advantages of integrating Python into Avizo is that Python tools can now be used to extend
Avizo functionality. This extension allows writing script objects that encapsulate Python functions to
make them available as modules in the Avizo graphical user interface. These Python tools can then be
controlled through standard Avizo ports.
This tutorial demonstrates how to integrate the Fast Fourier Transform (FFT) from scipy as
an alternative to the FFT used in Avizo. You can follow it using the step by step ex-
planations or have a look to the resulting files (ScipyFFT.pyscro and ScipyFFT.rc) within the
$AVIZO ROOT/share/python script objects directory.
Copy PythonScriptObjectTemplate.pyscro from the $AVIZO ROOT/share/python script objects direc-
tory to a location of your choice and rename it to ScipyFFT.pyscro.
1. Open the file in a text editor and give your new module a name by changing the first line to:
class ScipyFFT(PyScriptObject):
2. In the initialization function, the default data input port will be used for the data connection to
your module and the allowed connection types will be defined:
self.data.valid_types = [’HxUniformScalarField3’]
5. The computation of the FFT will be done in the compute function. After checking if Apply was
clicked and if an input dataset was selected, import a few packages from Python. In this case,
we need the fftpack from scipy, numpy for some mathematical functions, and the time package
to measure execution time:
6. As a first step in the computation, create a variable to store the result from the FFT computation
as a 3D uniform scalar field.
result = hx_project.create(’HxUniformScalarField3’)
7. To measure execution time, you first need to take a time stamp at the beginning of the computa-
tion:
start_time = time.time()
9. To compute the absolute value of the FFT of our input data, execute the following three com-
mands:
# Compute the discrete Fourier transform
F1 = fftpack.fftn(input.get_array())
10. After the computation has finished, assign the result array to the result variable that you created
earlier:
result.set_array(F3)
start_time = time.time()
13. To make this module available in the graphical user interface of Avizo, you will also need to
write a resource file. Create a new file with your text editor and save it as ScipyFFT.rc. Resource
files typically start with a comment line:
15. Specify the data type we would like to be able to attach it to:
-primary "HxUniformScalarField3" \
17. The next line defines the location where it will appear in Avizo’s Object Popup menu:
-category "{Python Scripts}" \
18. Run a few TCL commands to initialize the module in Avizo’s graphical user interface. The first
command will create the script object and set a label for the module:
-proc {
set this [[create HxPythonScriptObject] setLabel "Python FFT"]
19. Set the file name to find the Python script location for this module, where the
<PRODUCT PATH> is $AVIZO ROOT:
"$this" startStop hideMaskIncrease
"$this" filename hideMaskIncrease
"$this" filename setValue \
<PRODUCT_PATH>/share/python_script_objects/ScipyFFT.pyscro
20. The script will run for the changes to take effect:
"$this" startStop hit 0
"$this" fire
21. Connect the dataset to the default input data port on which you right-clicked to create the mod-
ule:
22. The entire resource file will look like this at the end, where the <PRODUCT PATH> is
$AVIZO ROOT:
#############################################################
# .rc for pyscro ScipyFFT
#############################################################
23. To make this Python script object available to Avizo, you need to copy both files (overwrite
existing files) to $AVIZO ROOT/share/python script objects/ and restart Avizo after changing
the resource file if you followed the above steps.
If you want to re-use the embedded Python FFT example, edit the
$AVIZO ROOT/share/python script objects/ScipyFFT.rc file and change the -category
value from ”None” to ”{Python Scripts}”.
24. To test this module, do the following:
1. Start Avizo.
2. Load $AVIZO ROOT/data/tutorials/chocolate-bar.am
Figure 11.8: Maps Connectivity Bridge: Network and Shared Folder Configuration
Incoming connections must be enabled in Avizo, so that it can receive images from Maps.
To do so, add the line app listen at the end of the startup script used by Avizo
($AVIZO ROOT/share/resources/Avizo/Avizo.init).
For more information about the Avizo startup script and the app Tcl commands, please refer to User-
Defined Startup Script and Application Command Options sections, respectively.
For more information about Avizo Connectivity Bridge within Maps, please refer to the Maps docu-
mentation chapter, Maps-Avizo/Amira Connectivity Bridge.
Dedicated to correlative workflows and Thermo Scientific TM SEM, FIB, DualBeamTM and TEM Sys-
tems, Avizo for EM Systems is a tailored software solution for Materials Science, Electronics, and
Digital Rock Physics based on the popular Avizo software for 3D data visualization and analysis.
Avizo for EM Systems embeds the Avizo base package with the following extensions described later
in this guide:
Avizo for EM Systems can read the Thermo Fisher Scientific Inspect3DTM extended MRC format,
Auto Slice & ViewTM extended TIFF format and XML project files. Avizo also provides an extended
wizard for creating and pre-processing volumes from FIB/SEM image stacks. For information about
loading and pre-processing DualBeam image stacks, read the Chapter 8.8 DualBeam 3D Wizard
tutorial
Chapter 13
Avizo XFiber Extension is an extension that provides specific support for analyzing fibers, filaments,
tunnels, and other networks or tree-like structures. This option assists segmentation and analysis with
automatic, semi-automatic, and interactive tools.
The extension provides tools for tracing centerlines in various modality acquisitions, such as X-ray
microtomography, to detect fibers or tube-like structures.
The Avizo XFiber Extension includes many analysis tools to compute advanced fiber statistics. Various
distributions and properties can be calculated and plotted. Various tools also allow for fibers to be
filtered based on properties and attributes.
The Avizo XFiber Extension also includes the Filament Editor workroom that offers automatic and
interactive tracing tools for segmenting the centerline of the fibers and measuring their thickness in
fiber networks and other filamentous structures. This workroom also offers editing of spatial graphs
obtained by skeletonization.
To access the Filament Editor, click the icon in the Workrooms Toolbar. We will begin our work by
loading the 3D image dataset.
Browse Slice:
The browsing tool allows using the mouse to navigate through an image stack in the 2D viewer (or
MPR viewer).
Image Thickness:
The thickness of the slice can be set by sliding the Image Thickness slider. When displaying a thick
slice, data values are computed as maximum intensity of the values of the original slices.
The Auto Skeleton tool traces connected regions according to a user-defined window level and converts
1. Click Identify Graphs in the Edit panel to automatically detect and label all graphs (i.e., all
connected components) in the Spatial Graph object. This creates a new label group in the Label
Editor named Identified Graphs under which all identified graphs are listed as Graph0, Graph1,
..., GraphN.
2. To visually identify them, click on one of the items in the Identified Graphs list. The selected
item is highlighted with red in both viewers.
3. Under Identified Graphs, select Graph2 and press SHIFT while selecting Graph25, then re-
move them by clicking Delete selected nodes, edges and points in the toolbar.
4. Click Identify Graphs again. Now, you should have only two graphs.
5. Scale the nodes by moving the Node Scaling Factor slider in the View tab of the Tool Box (see
details below).
At this point, we have only two graphs: Graph0 is the large tree, while Graph1 is just three segments
and four nodes. Switch back to the Edit tab in the Tool Box.
It should perhaps be noted that the Auto Skeleton tool is also available as a compute module in the
Object Popup by selecting Image Processing / Skeletonization / Auto Skeleton. Also, there is a rich set
of tools available in the Segmentation Editor to perform the threshold segmentation necessary for the
skeletonization process. Finally, in the case of a strict tree topology it may be advantageous to restrict
1. Switch back to the Project View, save the object called neuron.Smt.SptGraph in a directory of
your choice, and then remove it from the Project Graph View.
2. Switch again to the Filament Editor to prepare the next step.
Figure 13.2: The Spatial Graph Object obtained with the Auto Skeleton Tool, Identify Graphs and Identify Loops.
1. Click New at the Graph Data port to create a new Spatial Graph data object.
2. Click in the 2D viewer. Using the Browse Slices tool or the mouse wheel, slice through the
volume until you reach the root of the neuron.
3. Set the Image thickness slider to 10 for a better visualization.
4. Activate the Interactive Tracer by clicking Trace Filament in the toolbar and make sure that
the Thick structures option is selected in the Trace tab.
If you click Identify Graphs, you will see only one graph. You can also access some statistical
information by clicking Graph Info in the Edit tab. This opens a spreadsheet window containing
a list of all segments in the graph. The spreadsheet is interactive (i.e., if you click on a line, the
corresponding segment will be highlighted in the viewer).
Repeat the actions to trace the first branching sections from the root.
1. Right-click Label Editor and select Add graph label group / Empty label group.
2. Right-click on the created label and rename it Topology.
3. Right-click on the Topology label and select Add label. Repeat this action to add three labels.
4. Select and right-click on each of the created labels and rename them Central, Right, and Left.
5. Select Draw a line to select nodes, edges and points and select-lasso the right-hand branch.
You can use the Draw a line to select nodes, edges and points tool in combination with the Alt
+ Right-click to deselect-lasso or with CTRL to add elements.
6. Right-click on label Right and select Assign selection.
For an advanced network visualization, you can switch to the Project View. If you do so, you may
attach a Spatial Graph View module to the Spatial Graph object you previously created.
Figure 13.3: The Spatial Graph Obtained with the Auto Skeleton and Tracing Tools
1. If the label neuron.labels is not available, create this new label image by clicking New in the
Label field port located in the upper section of the user interface.
2. Right-click the Inside material in the Material List, select Rename Material, and enter neuron.
3. In the Tools tool box at the bottom section of the user interface, select Threshold Tool.
4. In the Threshold Tool area, set the threshold to 100-255, select the All Slices option and click
Select Masked Voxels.
5. In the selection, click + to assign the selected region to neuron material.
6. Switch back to the Filament Editor and select neuron.labels from the Image Data pulldown
menu.
The dataset used in this tutorial is an Ultra High-Performance Fibre Reinforced Concrete (UH-
PFRC), courtesy provided by Dr. Alenka Mauko and Dr. Aljosa Sajna from the Slovenian National
Building and Civil Engineering Institute (www.zag.si; [email protected]), Log Cezsoski
Bridge, Slovenia, WP7 project Assessment and Rehabilitation of Central European Highway Struc-
tures (ARCHES) http://arches.fehrl.org/ (see Figure 13.4).
Figure 13.4: Volume Rendering of the Ultra High-Performance Fibre Reinforced Concrete
Once all parameters have been configured, click Apply. For the example project, the computation
of the correlation field takes several minutes. Note that this time consumption is not representative of
what it would be for the whole dataset since the time consumption is not a linear function of the dataset
size. The algorithm requires you to internally add a fixed size border to the dataset; which has an effect
on time consumption for small datasets, but has a negligible effect on large datasets. Depending on the
The cross correlation is computed on the GPU. Because the GPU memory is limited, the port CUDA
memory allows you to limit the amount of GPU memory used for the computation. The preset value
is estimated automatically depending on the memory available on the chosen CUDA Device. If you
run other processes that consume GPU memory, computing the cross correlation might fail due to lack
of memory. In this use case, you should set a reasonable limit. In practice, 80% of the free memory
should work.
Computing the cross correlation is time consuming. To minimize computation time, consider cropping
the image data to remove empty space. However, do not crop them too tightly (see section 13.2.1.3).
If you plan to process many datasets of similar characteristics, it is usually worth investing some time
to determine the lowest reasonable resolution as a higher resolution does not substantially increase
quality. The right voxel size is data dependent, but for solid cylindrical fibers as glass or carbon fibers,
an apparent resolution with a fiber diameter of about 5 voxels should already yield good results.
The Cylinder Correlation module will try to correlate a cylinder template with the data in all ori-
entations to mark each voxels with a score (i.e., maximum cross correlation). Before starting the
computation, this template needs to be well defined and to fit with a fiber structure of the data. This is
done by specifying the length and the radius of the cylinder. A visual cylinder template is provided to
easily set those parameters:
3. Once a fiber is visible on the slice along its main orientation, middle-click twice on the fiber to
set the length of the cylinder with a start and end points. If the length is not satisfactory, repeat
middle-clicking twice on the data (see Figure 13.7).
4. Set the radius of the cylinder template. The slice can now be changed to see the cross section of
the fiber on which the visual template has been set. Left-click on the visual template and move
the mouse to interactively change the cylinder radius until it fits the cross section on the slice
(see Figure 13.8).
By using the visual cylinder, the Outer Cylinder Radius, the Mask Cylinder Radius, and the Cylinder
Length ports are automatically set. Changing those ports while visualizing the template will interac-
tively change the cylinder shape.
Alternatively, the values can be based on a priori information about the structures or on measurements
taken from the image data. The measurement tool (i.e., Measurement in the viewer toolbar) is often
useful to determine reasonable lengths and radii. Note that parameters are specified as radii; diameters
need to be divided by 2. In the following sections, we use the concrete fibers as an example:
• Radius: For structures like steel fibers, a solid cylinder template is appropriate. Specify only
the Outer cylinder radius and set the Inner cylinder radius to 0. Based on the measurements of
the image data (see Figure 13.9), the fibers have a diameter of 8, so the Outer cylinder radius of
4 should be fine. Note that parameters are specified as radius, so diameters need to be divided
by two. The Mask cylinder radius can be set to 8 for this example (i.e., diameter of 16). In the
case of a hollow cylinder, a non-zero inner cylinder radius should be specified. The thickness of
the cylinder wall is then equal to the Outer cylinder radius - Inner cylinder radius. Acquisition
artifacts, like shrinking, might introduce a slight difference between the fiber real size and the
size in the image.
• Length: The Cylinder length defines the template length in physical units. A longer template is
more robust to noise, but it also reduces the sensitivity to curved structures and to the ends of
structures. A longer template also requires you to stay further away from the image boundary
(see section 13.2.1.3). A reasonable compromise depends on image quality and the structures
to be extracted. In this example, a cylinder length of 30 is a good compromise. The tradeoff is
different for other structures.
• Contrast: This specifies the contrast of the signal to be detected. Fibers, for example, are lighter
than the surrounding image, so you should select Bright on dark.
13.2.1.3 Limitations
Boundary: The correlation field may contain artifacts close to the boundary (i.e., within half the cylin-
der size). The reason is that the cross correlation is computed in Fourier space using the Discrete
Fourier transformation (DFT) with periodic boundary conditions. The practical implication of this is
that a template that is close to the boundary senses structures close to the opposing boundary of the im-
age. Sharp edges in the image signal, like rapid foreground to background transition, may also create
undesired effects. A general recommendation is:
• To acquire image data, so that the relevant structures are far enough away from the image bound-
ary.
• To keep enough of the original image data when cropping, so that the relevant part of the corre-
lation field is away from the image boundary; yet, ideally have a reasonable image signal up to
the boundary (i.e., no sharp transitions to black).
• Either crop the resulting correlation field to the section that is far enough away from the bound-
ary and cut the orientation field to the same size before running Trace Correlation Lines, or clean
up the resulting lines if they look unreasonable close to the boundary.
Template size: The template is sampled onto a cubic grid, which must fit into the image volume. For a
large Cylinder length, the template may be too large for the image volume. In particular, if the image
• Attach a Trace Correlation Lines module to concrete.CorrelationField (in category Fiber Trac-
ing).
• Choose concrete.OrientationField as Orientation field input of Trace Correlation Lines module.
• Set parameters as shown in Figure 13.10.
Figure 13.10: Default Parameter Settings of the Trace Correlation Lines Module
Trace Correlation Lines traces lines that start at points whose correlation value is greater than the
value of Min seed correlation. It is useful to inspect the correlation field to determine an initial value
to refine the choice. If too few lines are extracted, consider lowering the value. If too many lines are
extracted, consider increasing the value. The initial values should be chosen so that all points with
a greater correlation value are clearly useful seed points. This can be done in various ways such as
using an Ortho Slice (see Figure 13.11 and Figure 13.12 with same reasonable data range for Min
seed correlation (max of range) and Min continuation quality (min of range)). Alternatively, use an
Isosurface and adjust its threshold such that the isosurface contains only parts that are clearly useful as
It is not necessary that a given fiber looks continuous on the correlation score image, but a fiber cannot
be traced if it has not at least 1 voxel above the Min Seed Correlation threshold.
The Min continuation quality can be determined in a similar way (see Figure 13.11). It controls where
line tracing stops. If lines are unexpectedly short, try a smaller value. If lines are too long, try a larger
value.
The purpose of Min Line Distance is to avoid that additional lines are traced inside the diameter of other
lines, which might happen if correlation values are not clearly separated. To determine a reasonable
distance value, use the measurement tools (i.e., Measurement in the viewer toolbar).
Another data-specific parameter is the Direction coefficient. If the tube-like structures are more or less
straight, a smaller value is appropriate. If the data also contain curved lines, a larger value might be
• Chord Length: straight distance between start and end point of the segmentation
• Curved Length: curved segment length
• Tortuosity: Curved Length / Chord Length
• Orientation (Theta and Phi) of the segment between the start and end points
Those statistics are stored as attributes in the spatial graph. Those attributes can be displayed in the
table view, with the Show button of the Spatial Graph module (i.e., Table port). The graph can also be
displayed by using the Spatial Graph View module (see Figure 13.13).
It is also possible to use a Spatial Graph Statistics module on this attributed graph to output the statistics
in a regular spreadsheet (see Figure 13.14).
1. Attach a Spatial Graph Statistics module to the generated SpatialGraph. To do so, right-click
the green data object CorrelationLines. From the context menu, select Measure And Analyze.
Then click SpatialGraphStatistics.
2. In the Properties Area of the SpatialGraphStatistics, click Apply. A concrete.statistics spread-
sheet, as shown in Figure 13.14, is generated and displayed in the Project View.
3. Select the concrete.statistics spreadsheet and then click Show. A new dialog box will be dis-
played that presents the results in a table.
You can also load the project concrete tutorial.hx to complete these tutorial steps. The result of Cylin-
der Correlation and Trace Correlation Lines applied on the whole example dataset, is shown in Figure
13.15.
13.2.4 References
1 Weber, B., Greenan, G., Prohaska, S., Baum, D., Hege, H.-C., Mueller-Reichert, T., Hyman,
A. A., and Verbavatz, J.-M. (2012). Automated tracing of microtubules in electron tomograms
of plastic embedded samples of caenorhabditis elegans embryos. Journal of Structural Biology,
178(2):129-138.
2 Rigort, A., Guenther, D., Hegerl, R., Baum, D., Weber, B., Prohaska, S., Medalia, O., Baumeis-
ter, W., and Hege, H.-C. (2012). Automated segmentation of electron tomograms for a quanti-
tative description of actin filament networks. Journal of Structural Biology, 177:135-144.
The dataset used in this tutorial is an Ultra High-Performance Fibre Reinforced Concrete (UH-
PFRC), courtesy provided by Dr. Alenka Mauko and Dr. Aljosa Sajna from the Slovenian National
Building and Civil Engineering Institute (www.zag.si; [email protected]), Log Cezsoski
Bridge, Slovenia, WP7 project Assessment and Rehabilitation of Central European Highway Struc-
tures (ARCHES) http://arches.fehrl.org/.
The tutorial will be applied on a cropped volume of this dataset. To apply the workflow to your data,
you might need to adapt these parameters as explained below.
The tutorial assumes that you are familiar with the basic concepts of Avizo. In particular, you should
know how to load files, how to interact with the viewer, and how to connect modules to data objects.
All these topics are covered in Chapter 2 - Getting Started of the Avizo User’s Guide. Note that
the modules presented in this tutorial require an NVIDIA graphics card supporting CUDA Compute
Capability 1.3 or higher. To find your graphics card CUDA Compute Capability, see NVIDIA’s list of
CUDA GPUs ( http://developer.nvidia.com/cuda-gpus/ ).
Figure 13.16: Default Parameter Settings of the Convert Geometry to Label Module
4. Once all parameters have been configured, click Apply. This module will create a label data, in
which the fibers’ centerlines are individually labeled. There is a direct correspondence between
the label Id and the graph Id.
6. To dilate the centerlines back to fit the original data, attach a Ball Dilation module to con-
crete.converted and set the parameters as shown in Figure 13.18:
7. Once all parameters have been configured, click Apply. Attach the voxelized rendering module
to the Ball Dilation result. The centerlines are dilated back to their original size as shown in
Figure 13.19.
8. Finally, contact points can be identified using a Label Interfaces. Attach a Label Interfaces
module to the convert.dilated data and set the parameters as shown in Figure 13.20.
9. Click Apply.
10. Contact points are now identified. Attach the voxelized rendering module to concrete.interfaces
(see Figure 13.21).
11. Those contact points can be quantified. Label the contact point using a Labeling module while
leaving the default values and then click Apply.
12. Attach a Label Analysis to the labeled contact points concrete.labels to get basic statistics. Keep
the default values and then click Apply (see Figure 13.22).
4. The module will output the following statistics in a spreadsheet (see Figure 13.24).
3. Attach a Plot SpreadSheet module to the output and set the parameters as shown in Figure 13.26,
and click Show in the Plot port (see Figure 13.27).
The data is filtered, so that only fibers matching the user’s equation remain. The Figures 13.31 and
13.32 show respectively the display before and after filtering.
• Spatial Graph Local Statistics computes local statistics from a Spatial Graph representing the
fiber’s centerlines (generated from the Trace Correlation Lines module). Use this module when
the fibrous sample can be separated. Statistics include:
• Volume Density
• Surface Density
• Tensor
• Orientation (i.e., vector field corresponding to the main eigen vector of the tensor)
• Local Orientation computes local statistics directly from a greyscale volume. Use this module
when the fiber’s centerlines cannot be traced. Statistics include:
• Confidence
• Orientation (Theta, Phi)
As an example, local statistics from the concrete dataset are extracted, using the Spatial Graph Local
Statistics module:
The Data of the module are the centerlines of the fibers. From this, local statistics relative to the
volume fraction, surface area, and orientation tensors, can be computed. The major orientation
corresponding to the main eigenvector of the tensor can also be extracted. When a mask of
Object Mask is provided, the volume fraction is computed from the number of voxels, and the
surface area is derived from a triangle mesh generated from the mask. In the present use case,
no mask is provided and the calculation of those statistics is based on a perfect cylindrical fiber
model with a known section radius. To determine a reasonable section radius, the measurement
tool may be used (i.e., Measurement in the viewer toolbar). The third optional input is a mask
to limit the local statistics computation to a given area in the sample. The local statistics are in-
tegrated within blocks, or subvolumes, regularly distributed in the bounding box of the volume.
The optional Reference may be used to define a different bounding box for the data. The num-
The statistics can also be generated in the form of scalar images (i.e., volume fraction and surface area),
vector field (i.e., major orientation) and tensor fields (i.e., orientation tensors), useful for visualization
and data export. For instance, attach an Ortho Slice to concrete.am, then create a colorwash to visualize
volume density on top of the data (see Figure 13.34).
The same setup can be done with the area density map to compare zone of influence of the fibers’
volume and the fibers’ area (see Figure 13.35).
Figure 13.35: Comparison Between the Volume Fraction and Surface Area Densities
Orientation tensors may be visualized as ellipsoids using the Tensor View module.
Tensors are now mapped on top of the density map as shown in Figure 13.37.
Note that you have to click Apply or select Auto-refresh to update the Tensor View module display.
The resolution and scale in particular need to be adjusted. Please refer to the documentation of Tensor
View for more details.
Finally, it is also possible to visualize orientations using a Volume Rendering module by converting
the orientation output to RGB data using the Vector to RGB module.
The external viewer should display the orientation in 3D as shown in Figure 13.39.
• Theta represents the angle formed with the Z-axis and varies in the range [0-90] degrees.
• Phi is the angle in the XY plane, measured from the X-axis towards the Y-axis in the range
[0-360[ degrees.
• Standard: A sample of small length should not account as much as a sample of high length on
height mapping.
• Averaged: You can calculate the average by adding the weight of each sample with the same
orientation and dividing the total weight by the number of samples. For example, if the weight
property is length and there are 5 samples of a given orientation, the weight assigned should be
Using the Export to lattice button, the module outputs the plotted data as a regular 2D scalar field that
can be visualized using the Bar Chart Slice or the Height Map Slice module (see Figures 13.40 and
13.41).
Figure 13.40: Plotted Data Displayed Using a Bar Chart Slice Module
Figure 13.41: Plotted Data Displayed Using a Height Map Slice Module
Experiment with the Tube Complexity port of the Extract Surface from Spatial Graph module and
You will notice that the tubes are now assembled from much more equally spaced segments.
The Avizo XWind Extension provides tools for creating, analyzing, visualizing, and presenting nu-
merical solutions from CAE and CFD simulations.
The Avizo XWind Extension provides advanced support for the following:
The Avizo Lite Edition provides base post-processing support limited mostly to visualization. Avizo
XWind Extension extends the Avizo Lite Edition feature set by adding advanced Delaunay-based mesh
generation and post-processing computation, and analysis of derived variables, statistics and feature
extraction. Avizo XWind Extension brings also the robust support for unstructured mixed meshes
made up of tetrahedra, hexahedra, pyramids, and wedges. Most CAE file formats are supported in
Avizo XWind Extension only. See the File Formats Index of the User’s Guide for a complete list of
supported file formats.
By following the provided tutorials, you will learn how to use these modules on your own datasets. To
start you do not have to read the tips sections.
The data used for this tutorial is normally installed in the directory
data/tutorials/cfd-fea-advanced under your AVIZO ROOTdirectory.
Defining simulation inputs:
The Meshing Workroomis a pre-processing tool for creating simulation inputs. It allows com-
puting a tetrahedral mesh with boundary conditions. The mesh can then be exported to various
solvers’ file formats such as Fluent, COMSOL Multiphysics (c), etc. see XWind file formats.
The Meshing Workroomdoes not use the legacy meshing engine available in Avizo, which is based on
advancing front technique. The meshing engine used in the Workroomis based on Delaunay refine-
ment and is available with the Avizo XWind Extension license .Currently, the Meshing Workroomis
The Meshing Workroomtakes a label field (currenty, only 8-bit Label Fields are supported) as input to
generate a mesh. A label field may be created with the Segmentation Workroom or other tools such as
Interactive Thresholding, Auto Threshold, etc.
No other inputs are required. Optionally, various uniform scalar fields may be used to control the
mesh density (see Advanced mode (Meshing Tab)).
• First steps
• Inspecting the generated mesh
• Fast meshing versus precise meshing
• Controlling the refinement of the mesh
• Advanced meshing mode
• Troubleshooting
• Assigning boundary conditions to the mesh
• Exporting the mesh
• Scripting the room: TCL command list
• Progress bar indications
All illustrations using the corn kernel dataset are courtesy of, Pawan S Takhar, University of Illinois at
Urbana-Champaign.
• A general area: This area of the Workroomlets you see or select the mesh currently set in the
Workroom. It also lets you select the solver type that is targeted in the workflow. An Export
button is available whenever a mesh is created. It will export the mesh in the format selected
from the type field (Figure 14.1).
• A Meshing tab: This is where you build the mesh. A label input can be set using the label data
field. Once you set the Create button so that it becomes accessible, you may generated a mesh
(Figure 14.2).
• A Boundary tab: This is where boundary conditions are assigned to the mesh. Various tools let
you select the elements (triangles) which are part of a given boundary condition group (given
name and ID). This tab is available only if the selected file format allows exporting boundary
conditions (Figure 14.3).
1. Create a label field (see for example Segmentation Workroom) with as little noise (small dots,
misalignment, etc.) as possible.
2. Set the export format in the general section located above the tabs. The Boundary tab will be
available if the export format allows it.
3. Set the label into the Meshing tab’s label data input of the Meshing Workroom.
4. Set the meshing options and create the mesh by clicking Create. Once created, the mesh will
be displayed in the main viewer of the room.
5. (Option) Assign the boundary conditions to the mesh if the export format allows it.
6. Finally, export the mesh into the selected format by clicking Export in the general section
located above the tabs.
Various mesh quality and optimization settings are available and are described in the next sections
of the Meshing Workroomdocumentation. You can either create a new version of a mesh for a given
label field using Create, or override the current mesh set in the Mesh input using Replace.
After the mesh creation, the mesh is automatically visualized in the main viewer (Figure 14.4).
The generated mesh is automatically set in the Mesh input of the Meshing Workroom.
The mesh properties (number of nodes, triangles, tetrahedra) are available from the Project tab in the
Properties area (Figure 14.5) when selecting the green module corresponding to the mesh:
The console outputs some statistics about the mesh generation.
To inspect interior elements, a clipping plane dedicated to the visualization of tetrahedral meshes is
available from the main toolbar. To activate clipping, switch Clip button on in the main toolbar. See
result on Figure 14.8
The clipping plane automatically clips any tetrahedron that does not intersect the plane and is on the
clipped side. Various options are available to manipulate the clipping planes:
• Select the plane with the left mouse button and move the mouse while keeping the left button
pressed. This will translate the plane along its normal.
• Set the plane perpendicular to the main axis (X, Y, Z) by clicking XY, XZ, or YZ in the main
toolbar.
• Click Rotate in order to show a dedicated manipulator located at the center of the plane (Fig-
ure 14.9). Select the manipulator with the left mouse button and rotate by moving the mouse
while keeping the left mouse button pressed.
• Click Clipping plane side selector in main toolbar in order to change clipping side.
• Turn Interactive Mode off if the interaction with the clipping plane is slow
In this case, the clipping is not enabled while you interact with the software, and is only applied
when the left mouse button is released.
It is recommended that you input a smoothed label with weights, so there is no or little staircase areas
that would need to be topologically preserved by the mesher (those areas will need to be very refined).
The label should also be as clean as possible, with all unnecessary small materials areas cleaned out
because such areas might create unnecessary over refinement. For example, in the Figure 14.10, the
small orange material dot in the middle of the brown material will be preserved so the mesher will over
refine around that area:
It is possible to specify a different surface than the one generated internally, using a hidden port.
This port allows you to use a custom surface (e.g., smoothed or simplified by the user).
• First, if you set a surface to the port, the internal surface generation will not happen so you
can generate your surface and then test various settings with fast meshing mode deactivated.
Otherwise at each create or replace, the surface will be generated internally.
• Second, if the internal surface is dense, the meshing might take a long time. You can control
the size of your surface (through simplification) to speed up the meshing. However, the input
surface must respect the following criteria:
• Watertight surface
• No autointersection between the different materials (this can be checked with the autoin-
14.1.4 Optimization
In both modes (fast meshing or not), it is possible to optimize the tetrahedron node locations to reduce
the amount of slivers in the mesh. A sliver tetrahedron is formed by placing its four vertices near
the equator of its circumsphere (e.g., flat tetrahedron). Slivers may slow down the convergence of
numerical simulations. The less sliver the better.
The Optimize Mesh option aims at reducing the amount of sliver by perturbing them through random
vertex relocation. The mesh generation may be a bit longer if the option is activated.
Changing the quality will affect the constant there. Each quality level sets a factor that is multiplied by
the voxel size (for isotropic voxel): the higher the quality, the lower the factor. The average voxel size
along X, Y and Z is used for anisotropic voxels. Note that the mesh quality does not ensure that every
cell size will have the same dimension, because the highest constraint of the mesher is to preserve the
topology of the input label. It will, however, try to fit a given area with the indicated parameters if
possible. By default, the quality set by the slider is applied on the default group. The selected group is
written in the meshing tab.
Figure 14.13 and 14.14 show the difference between using this mode or not using it: Figure 14.13
shows mesh with Preserve Thin Structures option deactivated. A structure (pointed by the left arrow)
is lost. Activating the mode will preserve the structures.
To be able to customize the mesh quality (i.e., not using the presets of the Mesh Quality slider), enable
This will grey out the Mesh Quality slider and enable the advanced parameters (Figure 14.16).
• Facet Size: This parameter controls the size of surface facets (size of the triangles of surface
facet). It provides an upper bound for the radii of a ball circumscribing the surface facet and
centered on the surface patch.
• Facet distance: This parameter controls the approximation error of boundary and subdivision
surfaces. The meshing engine will create small elements close to curved surfaces and large
elements away from the surfaces.
• Cell size: This parameter controls the size of tetrahedral mesh. It provides an upperbound on
the circumradii of the tetrahedra mesh.
When the advanced mode is turned on, optional scalar field inputs also become available (Fig-
ure 14.17).
Each individual advanced parameter can be set as a constant value or as a varying scalar field. If set
as a scalar field, the advanced parameter constant is not available anymore and is reported as being
managed by a varying field (Figure 14.18).
See the Meshing WorkroomTutorial to know how to create a scalar field that can control an advanced
parameter. When a scalar field is used, it controls the parameter globally for the whole mesh, and not
for a given group. You can mix scalar field that control a parameter globally and constant values that
control other parameters individually per group.
14.1.10 Troubleshooting
With parameters between low and medium, you might get a mesh containing holes , like the following
example created by meshing data/tutorials/motor.labels.am in fast meshing mode and medium quality.
This is because the object is thin and the approximation error tolerated by such parameters does not
ensure its full preservation. In this case, you should select the thin structures option or lower the facet-
distance setting in advanced mode. Check out the Thin Structures section for deeper understanding of
this issue.
Sometimes you may get an inhomogeneous quality with some elongated triangles such as the following
example created by meshing data/tutorials/motor.labels.am with a low quality, fast-
meshing disabled and with thin structures ON:
This occurs because of a parametrization issue where the facet size parameter set by the user is not
consistent with the facet size imposed by the engine to respect the geometry constraints: In some areas
the mesh engine is forced to refine the facet to a smaller size than the specified facet size (typically
when needing to respect thin structure). To fix the varying quality, from the project Workroom, display
the mesh using a Tetra Grid View module, and measure the size of the facet outside the bad quality
area using Measure Tools
In the meshing Workroomin advanced mode, set the facet size parameter to the measured parameter
(here, 0.005). Mesh again by hitting the create button.
• Plan: This mode allows you to select the triangles of a given material which lie close to the
bounding box plan. The plan can be selected from the plan combo box. The material is selected
from the materials list (Figure 14.25). When the elements are not exactly in the bounding box
plan, or follow a curved wall, it is possible to select them using a tolerance through a dedicated
slider, that increases the area of selection away from the selected plan.
• Contact: The contact mode allows selecting interfaces between two materials. Select the two
materials from the materials list (Figure 14.26).
• Equation: The equation mode lets you select any element of a given material based on a given
equation (Figure 14.27). The vertex components are accessed through X, Y, and Z variables. A
triangle is selected if all three vertice positions match the equation condition. For example, the
”x <5” will select all triangles in which the X component of all three vertices is less than 5.
Once a selection is made, the boundary condition is added by selecting an identifier and a name. Once
you click Add, the corresponding boundary condition is added in the results section (Figure 14.28).
Note that some characters are forbidden in the boundary name. If one of those characters are part of
the name, Add will have no effect. Allowed characters include: a-z, A-Z, 0-9, - and .
Selecting a boundary from the results section will result in the highlighting of the elements in green in
the main viewer (Figure 14.29).
Highlight of a boundary condition can be disabled by clicking again on it in result section.
The names that are valid will be available from the Name combo box. It allows you to edit an existing
boundary to add more elements.
• ”theMeshingTabController” followed by the commands below can be used to script the meshing
of the label data
• setLabelData <lableName>
set the label data into the meshing tab
• create
create the mesh
• update
replace the current mesh
• setMeshOptimizationEnabled <0|1>
activate/deactivate optimization
• isMeshOptimizationEnabled
optimization state
• setAdvancedMode <0|1>
activate/deactivate advanced mode of the meshing tab
• isAdvancedMode
advanced mode state
• setMeshQuality <groupId> <0|1|2|3|4>
set the mesh quality on a given group. Default group ID is -1.
• getAvailableBoundaryIds
get the available boundary IDs for the selected software;
• getCurrentBoundaryId
get the selected boundary ID
• setDrawStyle <drawyStyle>
draw style selection
• enableClippingPlane <enable>
activate/deactivate the clipping plane
• setClippingPlaneOrigin <posX> <posY> <posZ>
set the origin of the plane
• setClippingPlaneNormal <vecX> <vecY> <vecZ>
set the normal of the plane
• ”theMeshExporter” followed by the commands below to configure the export of the mesh:
• setMesh <mesh>
select the mesh
• setSoftware <software id>
select export format
• getMesh
get the name of the selected mesh
• The first messages come from the internal surface generation based on the Generate Surface
module (Smoothing labels, Computing triangulation). If those messages take a long time, the
internal surface used for constraining the meshing will be very large. You can alternatively gen-
erate your own simplified surface (making sure that it is watertight, and that there is no autointer-
section between the different materials) and pass it on to the meshing room via TCL command
(”theMeshingTabController” enableSurfaceSelection 1 or ”theMeshingTabController” setSur-
faceData yourSurface).
• Computing: Converting Avizo surface to internal structure for meshing
• Generating Meshing Domain: Building constraints based on input surface
In this step-by-step tutorial, you will learn how to use Meshing Workroom high-end pre-processing
capabilities to create simulation inputs. The Meshing Workroom allows you to compute a tetrahedral
mesh, assign boundary conditions to it, and export it to various CFD or FEA solver’s file formats such
as Fluent, COMSOL Multiphysics (c), etc. The meshing engine used in the workroom is based on
Delaunay refinement (while Avizo legacy meshing engine is based on advancing front technique).
The tutorial illustrates this typical workflow with the following sections:
To follow this tutorial, you should be familiar with the basic concepts of Avizo such as data import,
interaction with the 3D viewer, etc. All these topics are discussed in AvizoGetting Started chapter. You
should also be familiar with the workflow of generating label images, which are detailed in the Visu-
alizing and Processing 2D and 3D Images chapter, and more specifically:
All illustrations using the corn kernel dataset are with the kind courtesy of, Pawan S Takhar, University
of Illinois at Urbana-Champaign.
Note: In the following tutorial, units are not activated. All parameter sizes (i.e., measurement, cell
size, ...) should be given within the current unit if units are activated.
You can also find information about the size of the mesh in terms of nodes, triangles, and tetrahedra in
the Properties Area of the mesh object.
Go back to the Meshing Workroom.
By default the Fast Meshing mode is activated in the Meshing tab. This mode allows for fast prototyp-
ing the meshing of a given label. It is fast, because the meshing is not constrained by geometry. The
resulting mesh is fast to build, but is missing precision at boundaries between materials.
Uncheck the Fast Meshing option and click CREATE.
When the Fast Meshing option is not used, the meshing engine is constrained to respect interfaces at
boundaries between labels. Those interfaces are defined by surfaces that are automatically generated
using an underlying Generate Surface modulewith the constrained mode and the fit to edge options
turned on.
The generated mesh KernelCorn.labels2.tetra has been set in the Mesh input field (Fig-
ure 14.31).
You can compare the two generated meshes by switching from one to the other in the Mesh combo list.
You will notice how the contours of the second mesh (KernelCorn.labels2.tetra) are clearer
Figure 14.32: Fast Meshing Option turned On (left) and turned Off (right)
To push further the visual inspection of the mesh, the visibility of its materials can be turned on and off
to inspect the different parts, and more specifically, the interior elements of the mesh. The visibility of
each individual material can be accessed from the Meshing tab in the Materials section.
In the Materials section, hide the Germ material by unchecking it (Figure 14.33).
We will come back to these parameters later in the tutorial. You can also refer to the Meshing Work-
room documentation for details about the parameters.
Select KernelCorn.labels.tetra in the Mesh field.
Move the Mesh Quality slider to Low and click REPLACE.
KernelCorn.labels.tetra is replaced with a coarse mesh.
Select KernelCorn.labels2.tetra in the Mesh field.
Move the Mesh Quality slider to High and click REPLACE.
KernelCorn.labels2.tetra is replaced with a refined mesh.
Use the Mesh field for a first comparison of the two generated meshes (Figure 14.36).
To inspect interior elements, a clipping plane dedicated to the visualization of tetrahedral mesh is
available from the main toolbar. The clipping plane automatically clips any tetrahedron that does not
intersect the plane and is on the clipped side.
To activate clipping, turn on Clip (Figure 14.37).
Again, use the Mesh field to switch from one mesh to the other and compare the refinement inside the
meshes (Figure 14.38).
Figure 14.38: Clipped Meshes with Low (left) and High (right) Quality
In Interaction mode (press Esc), pick the plane with the left button of the mouse and move the mouse
while keeping the left button pressed. This will translate the plane along its normal. Various options
are available to manipulate the clipping planes. See more details manipulating the clipping plane in
the Meshing Workroom help section.
• The Facet Size parameter controls the size of surface facets (i.e., the size of the triangles of
surface facets). It provides an upper boundary for the radii of a ball circumscribing the surface
facet and centered on the surface patch.
• The Facet Distance parameter controls the approximation error of boundary and subdivision
surfaces. The meshing engine will create small elements close to curved surfaces and large
elements away from the surfaces.
• The Cell Size parameter controls the size of mesh tetrahedra. It provides an upper bound on the
circumradii of the tetrahedra.
Figure 14.41: SoftEndosperm (red) with Cell Size 0.2 (left) and 0.1 (right)
Go to the Project Workroom and remove all three tetra meshes attached to the label field. Go back to
the Meshing Workroom.
Scalar fields can also be used to customize the refinement of a specific area by controlling the value of
an advanced parameter. The scalar field will control the parameter globally (i.e., for the whole mesh)
and not for a given group. You can, however, mix scalar field controlling on the whole mesh for a
given parameter, and set constant values per group for another parameter. Be aware that the scalar field
must have the same dimension as the label field.
Here is an example of how you can create such a scalar field. You can skip this part and retrieve the
scalar field in the tutorial folder: data/tutorials/meshing/KernelCornField.am.
Go back to the Project Workroom. Connect a Distance Map moduleto the label field
KernelCorn.labels.am. The Distance Map moduleassigns to each voxel a value depending
on the distance to the nearest object boundary. The boundary voxels of the object are assigned a value
of zero and the value increases in the object as the distance increases.
Click Apply.
Attach an Interactive Thresholding moduleto the Distance Map result. Set the Intensity Range to 1-15.
Click Apply. A layer of voxels is isolated on the boundary of the whole label field (i.e., regardless of
the materials).
Attach a second Interactive Thresholding moduleto the Distance Map result. Set the Intensity Range
The resulting scalar field takes value 0.05 outside of the object (0.0 would also be correct), 0.1 in a
layer of voxels close to the boundary inside the object, and 2 in the rest of the voxels inside the object.
In case of any problems or uncertainties you can find the network generating the scalar field in the
tutorial folder: data/tutorials/meshing/CreateKernelCornField.hx.
Go back to the Meshing Workroom.
Set the Facet Distance back to 0.01. Set the cell size scalar field to Result in the Scalar Fields section.
Notice that in the Materials section, the cell size port has been greyed out and replaced with Managed
by scalar field.
Click REPLACE and see result in Figure 14.44.
You can observe how the mesh is refined in a boundary layer for the whole object regardless of the
material.
Create a mesh with Mesh Quality set to Medium for all materials.
Visualize the clipped mesh in YZ plan.
Create a group containing only the HardEndosperm material. Set the Mesh Quality to Medium for this
group, disable the Fast Meshing in Global Parameters, and in the Boundary layer field, set the Layer
Thickness to 0.4 and the Layer Cell Size to 0.2.
Note: to measure the layer thickness which is suitable for your data, you may go back to the the Project
Workroom, attach an orthoslice to your label field and measure a given thickness using a line measure.
Press REPLACE. KernelCorn.labels.tetra is updated.
Set the same boundary layer parameters for all groups of materials.
Press CREATE. KernelCorn.labels2.tetra is created.
Observe the mesh refinement in the two meshes that have just been generated.
3. For both, click Show/Hide then Remove in the Buffer port to select all tetrahedra and then hide
them all in the viewer.
The viewer now displays the slivers in the non-optimized mesh (Figure 14.47). You can also retrieve
Toggle off the visibility of the Tetra Grid View attached to KernelCorn.labels2.tetra.
Repeat the previous actions on the Grid Editor of the optimized mesh
KernelCorn.labels.tetra.
You can see in the viewer that there are less slivers in the optimized mesh. The Console displays the
number: you can observe that there are much less selected tetra.
It is possible to further improve the quality of the mesh using the Grid Editor. In the Modifier port,
select Repair Bad Tetras. Click Modify. Press Select again in the Selector port. In the Console, you
will notice that the number of slivers has further decreased.
For the purpose of next section, remove both Tetra Grid View modules.
Figure 14.48: Curvature Field Interpolated on Nodes (left) and on Cells (right)
• Using plans, for example to define a flow rate input on a whole face of the bounding box of a
sample,
• Using the contact surface between two materials,
• Defining a surface by its equation.
You can visualize the contact surface by toggling off the visibility of the SoftEndosperm and Germ
materials (Figure 14.51).
The contact triangles are highlighted in red. You can also visualize it by enabling a clipping plane
(Figure 14.52).
Figure 14.52: Contact Surface without (left) and with (right) Clipping.
14.3.1 3D measurements
You can access measuring tools via the View / Measuring menu or via the measuring tool button
(and its pulldown menu - click on the little arrow) at the top of the viewer.
You now have a Measurement object in the Display folder of the Project View. This module provides
access to two-dimensional and three-dimensional measuring tools.
Line measurement
We will measure the leading edge of the wing. A line measurement (Line) is already selected.
• In the 3D viewer, click on one end of the leading edge of the wing.
Notice that cursor changes to indicate when a valid object can be selected.
• Click on the other end of the wing edge.
You can measure that the wing has a leading edge of approximately 4.44 meters and a side edge of
approximately 1.55 meters.
3D angle measurement
• In the Properties area of the Measurement module, click on the ”eye” icons of the two lines to
hide them in the 3D viewer.
• In the Add port, click the Angle button.
• In the 3D viewer, click on the intersection of the attack edge of the wing and the fuselage.
• Click on the other end of the attack edge (intersection with the side edge).
• Click on the other end of the side edge.
14.3.2 Histograms
The Histogram module computes the histogram of a scalar field in 3D cells. We will use it on the
Pressure scalar field.
• Right-click on the Pressure and select Histogram in the Measure And Analyze menu.
• Click Apply in the Histogram Properties area.
A window pops up, that contains a histogram in logarithmic scaling. The mean value (approx. 1849 Pa)
and the standard deviation (approx. 23187 Pa) of the Pressure field are displayed in the Properties
area.
• for all cells where the pressure is in the new range, the mean value is approximately 10647 Pa
and the standard deviation is approximately 26442 Pa,
• in this same range, 2.44 percent of the cells have a pressure greater than 100000 Pa,
• in this same range, 50 percent of the cells have a pressure lower than 1784 Pa (and 50 percent
greater).
• Right-click on Pressure.
• In the Measure And Analyze menu, select Spline Probe.
To position the control points within the bounding box of the given geometry you can either type in
the coordinates in the Points port (see below) or you can move the points dragger interactively with
the mouse. (You may have to zoom out to see the points dragger.)
• In the Points port, the coordinates of the first control point are displayed. Change them to 4, 2,
0.
• In the Points port, use the spin box to select the second point and set its coordinates to 0, 2, 0.
• Select the third point and set its coordinates to 0, 2, 0.3.
Figure 14.56: Pressure values against the spline probe line length.
A plot window appears where the sampled pressure values are plotted against the length of the probe
line. In case of any problems or uncertainties you can find the same project predefined in your tutorial
folder under the file name data/tutorials/cfd-fea-advanced/wind splineprobe.hx.
Probing along a surface path
For probing purposes, it is often useful to have tools to define specific lines on a surface. The Surface
Path Editor and the Surface Intersector module are designed to this end.
The Surface Path Editor allows creating paths on surfaces. Paths can be useful to cut surfaces, define
regions or features of a surface, probe, etc. The editor can be accessed from the Properties area of a
Surface Path Set by clicking on the editor button . Two types of editor are then provided:
• the Generic Path Editor allows defining paths arbitrarily across the surface mesh,
• the Vertex Path Editor allows defining paths only along the surface mesh edges.
Note that the Vertex Path Editor can be accessed directly from the Mesure And Analyze submenu of a
surface (entry named Create Surface Vertex Path).
The Surface Intersector module intersects two surfaces, computes a path along the intersection and
attaches it to each of the surfaces.
• Remove all objects from the Project View (use [Ctrl+N] or right click in the Project View
and select Remove All Objects).
• Open fan-0070.cas from the tutorials/cfd-fea-advanced/fan folder.
• Load the Pressure scalar field.
• Hide the Bounding Box.
We will plot the Pressure along a radial line section of the fan surface. We have to create a cylin-
drical surface first, in order to intersect it with the fan and then get the intersection line.
• Right click on the surface fan-0070.surf and create a Surface Intersector from the Compute
submenu.
In the Surface Intersector Properties area, the second surface still has to be set. We will use the
Parametric Surface module to create the intersecting surface we need, available from Project / Create
Object... (Surfaces And Grids submenu).
Two paths along the intersection are created, one attached to each of the surfaces.
• Hide the Parametric Surface and connect a Line Set View display module to
IntersectionPath2. The path is displayed on the fan surface.
• In the Measure And Analyze submenu of Pressure, select Line Set Probe.
• Attach the Line Set Probe to IntersectionPath2 in the Line set port and press the Show
button.
A window displaying the Pressure along the line probe appears. We will improve the display.
Figure 14.57: Pressure values along the radial 0.12m line section of the fan surface.
For more information about the user interface and especially the Viewer window, please refer to the
Program Description and to its Viewer Window subsection.
A model contains:
• the mesh of the domain under study, with 2D or 3D cells depending on the dimension of the
model,
• the different regions the domain might be composed of (e.g. the rotor and the stator of a pump),
• the boundaries which are the physical limits of the domain,
• the material the domain is made of.
A data set attached to a model contains one or more scalar, vector or tensor fields defined on the mesh
and/or the boundaries of the model. These are the physical quantities that have been computed during
the simulation and need to be visualized and analyzed.
Display modules will be listed in the Display folder and compute modules in the Compute folder.
Shortcuts to the input and output data of a module appear below the module, with green and red
arrows indicating inputs and outputs respectively.
In the Colormaps folder you will find the default colormaps and also any colormaps you have loaded.
To get the same project tree view organization than in the tutorial screenshots, go to Edit / Preferences
/ Layout and select Group by display/compute/data in tree view). You can alternatively use the Avizo
Lite Edition version of the Project Tree View (without the ”Group by display/compute/data in tree
view” option) or switch to the Project Graph View from the Project Menu.
In the remaining of the tutorial, the Project Tree View will be named only Project View for easing the
reading.
• Abaqus
Please refer to the file formats index of the User’s Guide for details.
We will start this tutorial by loading a Fluent data set:
The Datasets selector pops up. Many scalar and vector fields can be attached to a given model and it
might be very memory-consuming to load them all. It can also be space-consuming in the project tree
view and make it difficult to read. The Datasets selector allows you to load only a part of the solution
and, if necessary, to unload some data and load additional data later (see Figure 14.61).
Select Pressure in the data column and click Add-> then OK. The Pressure now appears in the
Project View under the model it is attached to and its colormap is displayed.
• Remove the bounding box by right-clicking on the module in the Project View and selecting
Bounding Box / Remove Object (or press on [Del]).
We do this because the bounding box encloses the entire data set and we will initially focus on a specific
region of the model. Removing (or simply hidding) the bounding box makes it more convenient to
”zoom in” on this smaller region.
If you want to load other data from the same model, you can access the Datasets selector at any time
by clicking on its button in the Properties area of the model (aircraft mach.cas).
The Boundary View module now appears in the Display folder of the Project View and the green arrow
shows its input is the aircraft model. Its properties are displayed in the Properties area. You now see
the boundaries of the model in the 3D viewer. Remember that boundaries are the limits of the domain
under study, here they delimit the air flow. In Avizo XWind Extension, boundaries are classified
according to their type, which is the physical condition imposed on a boundary for the simulation
(boundary condition).
The types of boundaries are listed in the Properties area of the module in the multi-selection port
Boundary types.
• In the Boundary types port, deselect the items: Symmetry and Pressure Far Field.
Only the boundaries of type Wall remain and they delimit half of a YF-17 Cobra aircraft.
• Click in the 3D viewer window and press the [SPACE] key to enlarge the aircraft view (this
does a View All operation).
You can also zoom in and out more accurately by using your mouse wheel, moving your mouse
while simultaneously pressing the left and middle buttons, or by clicking the zoom mode button
and moving your mouse up and down. If necessary, go back to viewing mode by clicking
You can make a snapshot by selecting the camera in the toolbar of the 3D viewer. Please refer to
Snapshot Dialog description for more details.
If you want to display a compass on your viewer, like in Figure 14.62:
Figure 14.63: Pressure field on the boundaries of a YF-17 Cobra plane, with legend.
The legend is displayed in the 3D viewer and a Data Legend module is created under the Pressure data
in the Project View. Use the Properties area of the module to set the legend properties (position, size...)
as desired.
In case of any problems or uncertainties you can find the same project predefined in your tutorial folder
under the file name data/tutorials/cfd-fea-advanced/wind firstvisu.hx.
In case of any problems or uncertainties you can find the same template project predefined in your
tutorial folder under the file name cfd-fea-advanced/wind templatenetwork.hxtemplate (load it by se-
lecting Open Data... in the Project View).
Now that the template is saved, you can easily make the same kind of visualization on any Fluent
model connected to a scalar field.
• Select the new model aircraft mach2.cas and the scalar field Pressure2.
• Click OK.
The Boundary View visualization of the second model has now appeared in the 3D viewer and should
be perfectly identical to the previous one (see Figure 14.63, appart from the zooming and rotation).
This project was rather simple and was reloaded on the same model, to keep the example simple, but
keep in mind that template projects become very useful and will save you time if you have several
modules to connect in the same way to different models and data sets.
In the Compute directory of the Project View, a time Sequence Controller module has appeared.
• Create a Boundary View module as before (right-click on the model in the Project View).
• In the Boundaries port, click on the Deselect all button and then select only wall-7.
• Set the Colorfield port to Pressure.
• In the Coloring port, choose Data Mapping.
• Select Node values in the Value Mapping port.
• Rotate the display.
In case of any problems or uncertainties you can find the same project predefined in your tutorial fan
folder under the file name data/tutorials/cfd-fea-advanced/fan/wind timeseries.hx.
Use the time sequence controller module to animate the display of pressure over time. Select the
controller in the Project View.
• Keep the Time mode port on time step. The physical time stands for the physical time associated
with each time step.
• Move the slider in the Time step port rightwards. With the step button next to the time slider
You might have noticed that the range of the Colormap port of the Pressure data set does not
change with each time step. This is because the colormap range is set by default to the global range of
the first time step data set. You can change it by setting the minimum and maximum to the values you
want and the colormap range will remain set to this range during the animation.
• Select the model in the Project View. Details about it appear in the Properties area (see Fig-
ure 14.67).
In the Properties area of the model you can find the grid type (volume or surface), the number of nodes
of the mesh, the number of cells and their type.
The Parameter Dialog window pops up (see Figure 14.69). In this window you will find additional
information about the model, including the boundary and region names, id numbers and types, physical
details about the material(s) under study and solver information about the model. Close this dialog.
Data field
• Now select the Pressure scalar field in the Project View. Details about it appear in the Prop-
erties area.
In the Properties area of the scalar field you can find (see Figure 14.70):
14.5.2 Colormaps
In the Properties area of the Pressure field, you can see that a colormap is connected. For conve-
nience a default colormap is defined for each type of data field. The colormap connected to the data
field will (initially) be used by all the display modules connected to the field. And therefore modifying
the data field colormap affects all the connected display modules. It is also possible to use a different
colormap for any of the display modules.
We will now see in detail what you can do with the options of the Edit menu of the Colormap port.
In case the range has been changed and you want to adjust it back to the data field range:
• Select Adjust range to in the Edit menu of the Colormap port and select the data.
Tip: The range of the colormap is set to Local and adjusted to the field global range (except for the
time series data, as seen in the Time Animation section of the Getting Started chapter). You can switch
between the global and local range modes by selecting and deselecting Options->Local range. In the
global range mode, the coordinates used to map data values to colors are taken from the colormap
itself. If the same colormap is used by two different fields and if the range is modified, both fields
colormap ranges are updated. In contrast, in the local range mode the coordinates are defined by the
port itself. Thus, although the same colormap is used by two different fields, the ranges can still be
different. As many fields may share the same colormap in the Avizo XWind Extension, we advise you
to be very careful when using the global range mode.
Two new ports appear that allow you to select and deselect regions and/or materials. In the present case
there is only one of each so this option is not useful but keep in mind that it exists for more complex
geometries (e.g., a pump with a rotor and a stator).
In this view you can observe the mesh on the boundaries of the model (see Figure 14.72).
• Select the model and open the Model Colors Editor (click on the button ).
• Click on the color of the gridelements part.
• The Color Dialog window pops up. Define a new color and press OK.
• Back in the Model Colors Editor, click Apply. The color is updated in the 3D viewer. Now click
Close.
In case there are several regions in the model and you want them all to have the same color, you can
choose a uniform coloring.
Select the Grid View module then:
• Select Uniform in the Coloring section of the Rendering port. A Uniform color port appears.
• Click on the color sample. The Color Dialog window pops up.
• Define a new color and click OK. The color is updated.
Cell information
• Click in the 3D viewer window (to change focus) and press the [ESC] key to switch the viewer
Information about the cell will appear in the upper left corner of the 3D viewer and a Spreadsheet in
Viewer module appears in the Project View. The behavior is controlled by the On left mouse click
port of the Grid View module. This way you can retrieve, for the selected cell:
Go back to viewing mode, for example by clicking in the 3D viewer window and pressing the [ESC]
key.
The pressure contour is now displayed on the boundaries of the model. The colormap that is used is
the Pressure field’s colormap. If you want to modify the colormap or its range, do that in the data
Properties area of the Pressure field.
Tip1: If the Boundary View is currently selected, you can quickly select the Pressure field by
clicking the right-arrow button in the Colorfield port.
Tip2: For convenience you can keep the Pressure field’s Colormap port visible in the Properties
area even when the Boundary View (or other display module) is selected. Select the Pressure field,
then click on the pin to the left of the Colormap port. Select the Boundary View again. Results are
shown in Figure 14.74.
Figure 14.74: Data mapping of the pressure on the boundaries of the model.
• In the Boundary types port, deselect Symmetry and Pressure Far Field types.
• Enlarge the view and rotate it in order to get a better image of the aircraft (see Figure 14.75).
You can see that in the Boundaries port, the boundaries that are of type Symmetry and Pressure
Far Field are now deselected. So you could have achieved the same effect by deselecting non-wall
boundaries one by one in this port.
In case of any problems or uncertainties you can find the same project predefined in your tutorial folder
under the file name data/tutorials/cfd-fea-advanced/wind boundariesview02.hx.
Extracting surfaces from boundaries
We will now create a surface from the boundaries of the aircraft.
• Click the create button in the Create surface port of the Boundary View.
The surface aircraft mach.surf has been created. This surface can then be used as a seed region
In the Properties area of the module you can see some ports that we have studied in Chapter 14.5.
• Value mapping port: The node values and cell values options specify if a value of the field under
consideration will be affected to each node of the mesh and interpolated along the cells or if a
constant value will be associated with each cell.
Select node values in the Value Mapping port.
• The cell filtering option allows restricting the Cross Section to selected regions of the model.
• On left mouse click port: Display cell info allows you to left click on cells and get cell informa-
tion. This option is visible in the Display Option port.
• Draw Style allows you to set different draw styles. Solid Outline and Wireframe display the
intersection of the mesh with the section plane. Keep (or come back to) the Solid setting.
Several coloring modes are available in the Rendering port. The default setting is Data Mapping
which means the representation of the scalar field using its colormap with local range. You have
already seen the Uniform mode and the Per Region mode that colors the parts of the cross section
according to the region of the model they belong to.
• Now select the Iso Contouring mode in the Coloring section of the Rendering port.
• The Uniform distribution port has appeared. Set the count value to 30.
This option virtually transforms the colormap into a colormap with 30 steps (the actual attached col-
ormap is not modified).
In case of any problems or uncertainties you can find the same project predefined in your tutorial folder
under the file name data/tutorials/cfd-fea-advanced/wind crosssection01.hx.
In case of any problems or uncertainties you can find the same project predefined in your tutorial folder
under the file name data/tutorials/cfd-fea-advanced/wind crosssection02.hx.
Two coupled objects were added to the Project View: a Clipping Plane that defines the plane in which
the isolines are plotted, and the Isocontour Slice module itself. We want the Clipping Plane to coincide
with our existing Cross Section plane.
In the Clipping Plane module:
• Select xz as Orientation.
• Set the slider in the Translate port to 0.
In case of any problems or uncertainties you can find the same project predefined in your tutorial folder
under the file name data/tutorials/cfd-fea-advanced/wind isolines01.hx.
The colormap, the range, the data name and the data unit are now displayed in the 3D viewer. You can
set the size, position... of the legend in the Properties area of the module.
Caption
We will now give a title to our display.
In case of any problems or uncertainties you can find the same project predefined in your tutorial folder
under the file name data/tutorials/cfd-fea-advanced/wind isolines02.hx.
(To hide the Isocontour Slice you must actually hide the Clipping Plane.)
• Right-click on the Pressure scalar field.
• Select Isosurface in the Display menu.
• Set the Isovalue port to 1000.
• Select Data Mapping as coloring mode.
• Choose the Pressure as Colorfield.
• Change the title to ”Pressure isosurfaces: P = 1000 Pa” in the Text port of the Caption.
We would like to see the Mach cones from different points of view. In order to see the aircraft too, we
In case of any problems or uncertainties you can find the same project predefined in your tutorial folder
under the file name data/tutorials/cfd-fea-advanced/wind isosurfaces.hx.
You can see a wing in the 3D viewer. We will study the air flow around this wing.
Remember that you must be in interaction mode, indicated by the arrow cursor, to affect the ROI.
Switch modes by pressing the [ESC] key or clicking the buttons in the viewer menu bar.
Tip: You often need to switch between interaction mode and trackball mode multiple times while
performing tasks like resizing and positioning an ROI box. While in interaction mode, you can tem-
porarily switch to trackball mode by holding down the [ALT] key. When the key is released, the
viewer returns to interaction mode.
Animated Particles
What we can learn by observing the Properties area of the Animated Particles module is that 10 parti-
cles are seeded randomly accross the ROI every 10 time steps. They are colored by age, which means
the longer a particle remains in the model, the more red it becomes.
The behavior of the particles indicates the presence of a region of vorticity close to the wing: indeed
you can see some particles swirling and becoming red (that is to say old) close to the upper side of the
wing (see Figure 14.84).
• Move the ROI closer to the wing. To do so, switch to interaction mode and drag the ROI by
clicking on one of the faces of the box and holding while you move the mouse.
• Right-click on Velocity and select Illuminated Streamlines in the Display menu.
• In the Seed ROI port, select the ROI Box ROI.
• Set the number of lines in Num Lines to 400.
• Set the lines Length to 100.
• Set the Step size to 0.001.
• Click Apply.
• Hide the ROI.
• In the Properties area of ROI Box, select/unselect the display on the right viewer by clicking on
the right red half of the viewer toggle . This will make the ROI appear/disappear from the
right viewer. You can do the same for the Bounding Box if desired.
• Rotate and zoom in and out to get two different views, something like Figure 14.85.
In case of any problems or uncertainties you can find the same project predefined in your tutorial folder
under the file name data/tutorials/cfd-fea-advanced/wind displayisl.hx.
Tip: You might want to seed the ISLs from a given boundary (a velocity inlet for example). To do
so, first extract the chosen boundary (use the Create surface option of the Boundary View module as
explained at the end of Chapter 14.5). Then connect the created surface to the Distribution port of
the Illuminated Streamlines module. Be aware though that a line will be seeded from each node of the
surface mesh and that, therefore, the display might take a while to appear in the viewer.
Two other modules use illuminated streamlines: Illuminated Streamlines Slice, visualizes a surface
vector field using ISLs, and Illuminated Streamlines Surface, intersects an arbitrary 3D vector field and
visualizes its directional structure in the cutting plane using ISLs. A demonstration of these modules
is given at the end of Chapter 14.9.
• Go back to only one viewer (click on the one viewer button in the 3D viewer menu).
• Create a new ROI that contains the wing and a part of the domain behind it.
Tip: You already know how to create a new ROI by right-clicking the model and using the
Display sub-menu. However, this results (as before) in a ROI the same size as the bounding
box, meaning that you have to zoom out to manipulate it down to the desired size. It may be
more convenient to duplicate the existing ROI that is already close to the desired size. Right-
click on the ROI Box in the Project View and select Object/Duplicate Object in the popup menu.
• Right-click on Velocity and select Stream LIC Slice in the Display menu.
• Select the new ROI ROI Box 2 in the ROI port.
Tip: You can move the plane using the Translate port in the Properties area or by dragging the plane
in the Viewer window (switch to interaction mode if necessary). After moving the plane, press the
Apply button in the Properties area to recompute the LIC.
In case of any problems or uncertainties you can find the same project predefined in your tutorial folder
under the file name data/tutorials/cfd-fea-advanced/wind planarlic.hx.
Now we would like the vectors to be colored in accordance with the vector’s magnitude.
Similar to the Stream LIC Slice you can move the plane using either the Translate port or direct
dragging. Unlike Stream LIC Slice the vectors are dynamically recomputed as the plane moves.
In case of any problems or uncertainties you can find the same project predefined in your tutorial folder
under the file name data/tutorials/cfd-fea-advanced/wind vectorplane.hx.
A dragger appears for the line from which the streamlines are seeded.
In case of any problems or uncertainties you can find the same project predefined in your tutorial folder
under the file name data/tutorials/cfd-fea-advanced/wind streamribbons.hx.
be classified by an eigenvalue/eigenvector analysis of the Jacobian matrix. The Critical Points display
module finds and represents critical points by icons of different shapes, depending on the critical point
classification. Please refer to the documentation of Critical Points for more details.
• Hide or remove the previous display modules, keep only the Boundary View.
• Right-click on Velocity and select Critical Points in the Display menu.
• Reduce the Icons size to 0.05.
• Click Apply.
• Select the show option to display the illuminated streamlines seeded from the critical points.
In case of any problems or uncertainties you can find the same project predefined in your tutorial folder
under the file name data/tutorials/cfd-fea-advanced/wind cp3d.hx.
The results of the computation are printed to a spreadsheet that pops up. It contains the total area of
all the boundaries of the model under study.
In the Boundaries filter port, all the boundaries are selected, which means that the computation is
done on all the boundaries. The globally option is selected in the Compute port, which means that the
area that is computed is the sum of the areas of all the boundaries.
You can now see that the area of each boundary has been printed to the spreadsheet.
You can see that the area of the half aircraft (composed of boundaries 2, 4, 5, 6, 7, 9, 10 and 11) is
equal to approximately 83.61 square meters.
Volume computation
A new spreadsheet pops up and you can see that the volume of the flow domain is equal to approx-
imately 1024215 cubic meters. In case the model is composed of several regions, you can use the
Regions filter port to restrict your computation to some regions the same way we did for boundaries.
Pressure force vector computation
Note that for convenience only boundaries of type Wall are preselected in this module.
The Force module computes the pressure force vector generated on the aircraft surface and the pressure
moment about the moment center which is here set to the origin. Notice that the Pressure scalar
field was identified and automatically selected in the Pressure port.
Scalar Field mean value computation
Volume and surface integrals can also be computed on data fields.
As new if integral type is new is checked by default in the Table port, a new table opens, which title is
mean in accordance with the field integral type.
Many other types of volumetric and surfacic integrals and statistics can be computed from the Volume
Integrals and Surface Integrals modules. Computations on data fields can always be restricted to
regions or boundaries using the appropriate filter.
Figure 14.95: The mean value of pressure in the model is approx. 1849 Pa.
An Animate Ports module is created in the Project View. We will use this module to animate the value
of the Translate port of the Cross Section.
Note there is a new port Surfaces in the Properties area of the module. This port is displayed because
a surface (the Cross Section) has been detected in the Project View.
Figure 14.96: Pressure surface integral on a sequence of plane cuts orthogonal to the aircraft.
• Load the Velocity data from the Datasets selector by clicking on its button in the Prop-
erties area of the model (aircraft mach.cas).
• Right-click on the Velocity vector field.
• Select Arithmetic in the Compute submenu.
• Select the Density as second input Input B.
• The momentum is a vector so you can keep same as input or select vector in the Output data
type port.
• Enter the components of the momentum vector field: B*Ax in Expr X, B*Ay in Expr Y, B*Az
in Expr Z.
• Click Apply.
A new data module named Result appears under the model.
• Rename this module Momentum.
To do this, right-click the module, select Object/Rename Object and type a new name in the
dialog box. Alternatively, you can select the module, press [F2] and type a new name directly
in the Project View.
In case of any problems or uncertainties you can find the same project predefined in your tutorial folder
under the file name data/tutorials/cfd-fea-advanced/wind arithmetic.hx.
Regular data field generation
You can also use the arithmetic module to generate a data field on a regular grid and then use some
other Avizo Lite Edition display modules that take only regular inputs, such as the Volume Rendering
module.
• Use a Boundary View on the model to display the aircraft boundaries (display only walls).
• In the Display right-click submenu of Pressure.Regular, select Volume Rendering.
• In the Properties area of the Volume Rendering module, load and select physics VolRend.am in
the Colormap port:
• Click on the Colormap port ”Edit” button, then ”Option / Load colormap...”
• Open data/colormaps/physics VolRend.am
• Set the colormap range to -5000, -1000.
• Open the Colormap Editor (through the Window menu or the Standard Toolbar shortcut).
• Click on the edit button for values superior to max range . The Color Dialog opens.
• Set alpha (A) to 0.
• Click OK.
In the Properties area of the compute module you can see the Category port that lists the main cate-
gories of the secondary variables Avizo can compute.
In the Variable port, several vorticity related quantities that can be computed from the velocity vector
field are listed. The velocity vector field has been retrieved by Avizo and set by default in the Velocity
port. The vorticity related variables might be used to find vorticity regions, by plotting cross sections
or by delimiting regions with isosurfaces for example.
Some examples of the most common criteria that can be computed and used to identify vortices:
Example 2: lambda2
The Isosurface of LambdaTwo isolates a region with negative lambda2 where there are likely to be
vortices. Sub-regions with high vorticity are located close to the wing (see Figure 14.9.1).
In case of any problems or uncertainties you can find the same project predefined in your tutorial folder
A Line Set has been created in the Models directory, under the name VortexCorelines. We will
now display the result.
• Select the VortexCorelines object and connect a Line Set View in the Display submenu.
You can see that there are some very small lines and some noisy lines. If we want to focus only on the
main core line, we should filter those lines. Filtering tools are provided for this purpose in the Vortex
Corelines module.
• First we will remove lines that are too small: set the minimum line size to 35.
• Click Apply.
The Line Set View is updated. All lines with less than 35 core points are deleted. There remains three
lines among which one is obviously outside of the previously plotted lambda2 isosurface.
Again, the Line Set View is updated. All core points where lambda2 is bigger than -500 are removed,
that is to say all points outside of the volume delimited by the Isosurface previously studied. The
filtering has been effective and there remain only the core line of the illuminated streamlines swirls. If
you select the VortexCorelines line set, you will see in its Properties area that there are actually two
lines composed of a total of 115 core points.
• Click several times on the smooth button of the Line Set port if you want the line to appear
smoother.
• Select the Line Set View module.
• Choose Circle in the Shape port.
• Set the Scale Factor to 0.02.
In case of any problems or uncertainties you can find the same project predefined in your tutorial folder
under the file name data/tutorials/cfd-fea-advanced/wind vcl.hx.
You can complete this visualization with the display of the 3D critical points (see Chapter 14.7). The
illuminated streamlines seeded from them (with the show option) swirl around the core line.
• Hide or delete Illuminated Streamlines or Critical Points that might remain in the Project View.
• Select the Boundary View. Only the wing should be selected in the Boundaries port.
• Press the create button in the Create surface port. A wing.surf surface is created and added
to the Project View.
• Right-click on the new surface and select Illuminated Streamlines Surface in the Display sub-
menu.
• Select the Illuminated Streamlines Surface module and set the Vector field to Velocity.
• Uncheck the early termination option in Options port.
• Set the Seed port to 1.
• Press Apply.
Streamlines on the wing are displayed and vortical phenomena appear pretty well. A main swirl
corresponds to the starting point of the main core line and smaller swirls correspond to small core lines
we noticed in the first core lines display and then filtered.
In case of any problems or uncertainties you can find the same project predefined in your tutorial folder
under the file name data/tutorials/cfd-fea-advanced/wind surfaceISL.hx.
Illuminated Streamlines Slices
This module visualizes the directional structure of a vector field in a cutting plane using illuminated
streamlines (ISLs). What would be interesting here is to visualize the ISLs in a plane orthogonal to the
core line. To do so, we will use the Trajectory module.
The Clipping Plane is now orthogonal to the core line. If you use the Position slider of the Trajectory
module, the plane will slide along the core line, remaining orthogonal. As the core line is actually
composed of two lines, you have to use the Line slider to slide the plane along the other part of the
core line.
You can also animate the streamlines to see them swirl around the core line by selecting animate in the
View options port.
Figure 14.102: Illuminated streamlines on a plane othogonal to the main core line.
In case of any problems or uncertainties you can find the same project predefined in your tutorial folder
under the file name data/tutorials/cfd-fea-advanced/wind planarISL.hx.
14.10.1 3D measurements
You can access measuring tools via the View / Measuring menu or via the measuring tool button
(and its pulldown menu - click on the little arrow) at the top of the viewer.
You now have a Measurement object in the Display folder of the Project View. This module provides
access to two-dimensional and three-dimensional measuring tools.
Line measurement
We will measure the leading edge of the wing. A line measurement (Line) is already selected.
• In the 3D viewer, click on one end of the leading edge of the wing.
Notice that cursor changes to indicate when a valid object can be selected.
• Click on the other end of the wing edge.
• To adjust the position of a measurement line,
select it in the Properties area, then click on one of its red handles and drag it to a new location
or use the text ports Point 0 and Point 1 to change the position.
• Do the same on the side edge of the wing.
Tip: You may need to reposition the camera to select measurement points. As usual you can
press the [ESC] key to toggle between interactive mode and trackball mode or hold down the
[Alt] key to temporarily switch to trackball mode.
You can measure that the wing has a leading edge of approximately 4.44 meters and a side edge of
approximately 1.55 meters.
3D angle measurement
• In the Properties area of the Measurement module, click on the ”eye” icons of the two lines to
hide them in the 3D viewer.
• In the Add port, click the Angle button.
• In the 3D viewer, click on the intersection of the attack edge of the wing and the fuselage.
• Click on the other end of the attack edge (intersection with the side edge).
14.10.2 Histograms
The Histogram module computes the histogram of a scalar field in 3D cells. We will use it on the
Pressure scalar field.
• Right-click on the Pressure and select Histogram in the Measure And Analyze menu.
• Click Apply in the Histogram Properties area.
A window pops up, that contains a histogram in logarithmic scaling. The mean value (approx. 1849 Pa)
and the standard deviation (approx. 23187 Pa) of the Pressure field are displayed in the Properties
area.
• for all cells where the pressure is in the new range, the mean value is approximately 10647 Pa
and the standard deviation is approximately 26442 Pa,
• in this same range, 2.44 percent of the cells have a pressure greater than 100000 Pa,
• in this same range, 50 percent of the cells have a pressure lower than 1784 Pa (and 50 percent
greater).
• Right-click on Pressure.
• In the Measure And Analyze menu, select Spline Probe.
To position the control points within the bounding box of the given geometry you can either type in
the coordinates in the Points port (see below) or you can move the points dragger interactively with
the mouse. (You may have to zoom out to see the points dragger.)
• In the Points port, the coordinates of the first control point are displayed. Change them to 4, 2,
0.
• In the Points port, use the spin box to select the second point and set its coordinates to 0, 2, 0.
• Select the third point and set its coordinates to 0, 2, 0.3.
• Select the fourth point and set its coordinates to 4, 2, 0.3.
• You might want to hide the points and the dragger using the options submenu of the Points port.
• Click the Show button in the Plot port.
Figure 14.106: Pressure values against the spline probe line length.
A plot window appears where the sampled pressure values are plotted against the length of the probe
Surface Path Set by clicking on the editor button . Two types of editor are then provided:
• the Generic Path Editor allows defining paths arbitrarily across the surface mesh,
• the Vertex Path Editor allows defining paths only along the surface mesh edges.
Note that the Vertex Path Editor can be accessed directly from the Mesure And Analyze submenu of a
surface (entry named Create Surface Vertex Path).
The Surface Intersector module intersects two surfaces, computes a path along the intersection and
attaches it to each of the surfaces.
• Remove all objects from the Project View (use [Ctrl+N] or right click in the Project View
and select Remove All Objects).
• Open fan-0070.cas from the tutorials/cfd-fea-advanced/fan folder.
• Load the Pressure scalar field.
• Hide the Bounding Box.
• Connect a Boundary View to the model.
• Unselect everything except wall-1 in the Boundaries port and create the surface from the
Create surface port.
We will plot the Pressure along a radial line section of the fan surface. We have to create a cylin-
drical surface first, in order to intersect it with the fan and then get the intersection line.
• Right click on the surface fan-0070.surf and create a Surface Intersector from the Compute
submenu.
In the Surface Intersector Properties area, the second surface still has to be set. We will use the
Parametric Surface module to create the intersecting surface we need, available from Project / Create
Object... (Surfaces And Grids submenu).
Two paths along the intersection are created, one attached to each of the surfaces.
• Hide the Parametric Surface and connect a Line Set View display module to
IntersectionPath2. The path is displayed on the fan surface.
• In the Measure And Analyze submenu of Pressure, select Line Set Probe.
• Attach the Line Set Probe to IntersectionPath2 in the Line set port and press the Show
button.
A window displaying the Pressure along the line probe appears. We will improve the display.
Avizo XLabSuite Extension provides numerical simulation capabilities to calculate physical properties
of materials from the 3D image of a sample (for instance, scanned with CT, FIB/SEM, MRI, etc.).
Material properties are directly computed from the segmented 3D image.
The calculated materials properties are:
• absolute permeability,
• molecular diffusivity,
• formation factor and electrical conductivity,
• thermal conductivity.
Note: see section 1.4 System Requirements about system requirements and hardware platform avail-
ability.
For each of these properties, two different modules are available, corresponding to two different sim-
ulation approaches. The first approach consists of estimating a given property as the result of an ex-
periment performed in a laboratory. To do that, the external conditions of an experiment are simulated
by imposing boundary conditions resembling those existing in a laboratory. This way it is possible to
compare the module results to actual experimental results. The second approach is an effective prop-
erty calculation. In that case, the material is considered as representative of an infinite medium from
which it is extracted. By imposing spatially periodic boundary conditions, it is possible to obtain the
effective property of the macroscopic medium.
Experiment simulation is designed to be close to realistic laboratory experiment. It considers very
perturbing boundary conditions: the sample is hermetically closed on four faces and constant values
are imposed on the remaining two. The transport phenomenon is highly constrained by these kinds of
conditions.
Tensor calculation is based on a mathematical approach which considers the sample to be represen-
tative of an infinite or macroscopic material. Periodicity is a lot softer boundary condition and the
transport phenomenon is more free. Tensor calculation is usually the preferred method when the Rep-
resentative Elementary Volume is reached.
Provided modules are:
The following sections provide, for each property, an overview of the theory on which the computation
modules are based, and tutorials for getting started with the modules.
In the tutorials, some steps are mandatory: you must folow them for successful completion of the
727
tutorial. Other steps are optional: you should at least read them, because their content could be useful
later. Whether a step is optional or mandatory is indicated at the beginning of each section of the
tutorial.
Acknowledgements
Avizo XLabSuite Extension has been developed in cooperation with Dr. Bernard, Research Director
at ICMCB-CNRS (Pessac, France)
A demo script is also provided. This script will automatically perform all the steps detailed in the
tutorial.
• Q is the global flow rate that goes through the porous medium (unit: m3 .s−1 );
• S is the cross section of the sample which the fluid goes through (unit: m2 );
• k is the absolute permeability (unit: m2 );
• µ is the dynamic viscosity of the flowing fluid (unit: P a.s);
• ∆P is the pressure difference applied around the sample (unit: P a);
• L is the length of the sample in the flow direction (unit: m).
Q
S is often noted v and accounts for the superficial or mean fluid flow velocity through the porous
medium or Darcy’s velocity.
Only single-phase fluids are considered for absolute permeability. Multi-phase flows are concerned by
relative permeability.
where:
→
−
• ∇. is the divergence operator;
→
−
• ∇ is the gradient operator;
→
−
• V is the velocity of the fluid in the fluid phase of the material;
• µ is still the dynamic viscosity of the flowing fluid;
• ∇2 is the Laplacian operator;
• P is the pressure of the fluid in the fluid phase of the material.
The permeability tensor is extracted from the solution of this problem by calculating the mean value
→
−
→
−
of D over the volume V on which the system was solved:
→
−
→
− 1
Z → −
→
−
k = D dV
V V
This permeability tensor gives additional information about the intensity of permeability along any
direction of space. It can give rise to the anisotropy of a porous medium, i.e., the dependence of the
permeability intensity on the direction of the flow. It is computed by the Absolute Permeability Tensor
Calculation module.
Boundary conditions
Avizo XLabSuite Extension provides two approaches to estimate absolute permeability.
The second approach solves the closure problem derived from Stokes equation by volume averaging.
This is done in the Absolute Permeability Tensor Calculation module. The tensorial problem that is
→
−
− →
→ −
solved in this case is closed by imposing periodic boundary conditions to D, d and the geometry. A
no-slip condition is imposed at the fluid-solid interfaces. The sample represents a macroscopic, infinite
material and must thus be representative of this porous medium.
Artificial compressibility
The equation systems cannot be solved using fully implicit methods (matrix inversion) because the
matrices of this kind of system are singular. This is why an artificial compressibility coefficient and
some time derivative terms are introduced in the system. The method of artificial compressibilty was
first described in [5].
Introducing these terms in the equation system allows an iterative resolution of the problem. The
unique solution is attained when the time derivatives tend to zero. The time that is introduced in the
equations has no physical sense.
Bibliography
1. Darcy, H., Les fontaines publiques de la ville de Dijon , V. Dalmont, Paris, 1856
2. Reynolds, O., An experimental investigation of the circumstances which determine whether the
motion of water shall be direct or sinuous, and of the law of resistance in parallel channels ,
Figure 15.1: (1) In the Edit > Preferences... dialog, select the Units tab. (2) Select Spatial information only and (3) keep all the
boxes checked.
15.1.3 Step 2 - Load the data set and select the length unit for voxel size
Purpose Load the data set in Avizo and set the unit length.
Mandatory step Yes.
The data set that is used in this tutorial is a random packing of glass spheres. It was scanned by
Dominique Bernard, Research Director at ICMCB-CNRS. The spherical particles were sieved to have
diameters in the 100-120 microns range. The sample was sintered for 10 minutes at 700◦ Celsius prior
to scanning. Figure 15.2 shows the data set.
The complete 3D data set used in this tutorial is a 200×200×200 cube.
Note: The file 10mc3_200.vol.am has embedded unit information, therefore length unit is auto-
matically set for this data. However, the file 10mc3_400.vol.am doesn’t have such unit informa-
tion. Since the Avizo unit management tool was activated at step 1, you will need to specify the length
unit every time the file is opened. The dialog presented by Figure 15.4 will appear each time a data
set without length unit information is loaded. For instance, for the file 10mc3_400.vol.am, please
select micrometer [µm] as the coordinate units for the data set of the tutorial.
Note: If a data set is saved after the length unit has been selected, this information is stored in Avizo
format and will be reused at its next loading. Length unit then can be modified using the Units Editor
(see Figure 15.5) and a dialog box appearing, which looks like Figure 15.4.
Figure 15.3: Open Data... dialog to load the data set of this tutorial. Choose the path to the data set, then select and open it.
Figure 15.5: The Units Editor button is in the red square (visible only when a data set is selected in the Project View).
The voxel size is stored in Avizo format, for example, but not all data format save this information. In
case the stored values are wrong, Avizo provides an editor allowing modification of the voxel size of
the loaded data set.
• Open the Crop Editor by clicking on the highlighted button in Figure 15.7.
• The voxel size of the data set can be modified in the dialog that appeared (see Figure 15.8).
Figure 15.8: Fields to fill to modify the voxel size in the Crop Editor.
For the data set of this tutorial, the correct voxel size is 3.8, which is set by default.
If the Avizo unit management is not activated, the voxel size indicated in the data set will be considered
to be in microns. Otherwise, the length unit was set at data set loading time.
• Right-click on 10mc3_200.vol.am in the Project View and select Image Processing >
Smoothing and Denoising > Median Filter .
• Set the Filter interpretation to 3D (see Figure 15.9).
• Click on Apply.
• Right-click on the result of the filtered image (10mc3_200.vol.filtered) in the Project
View and select Display > Ortho Slice (see Figure 15.10).
Figure 15.9: Modified parameter of the Filter > Median Filter module is highlighted by a red arrow.
Figure 15.11: Modified parameter of the Segment > Multi-Thresholding module is highlighted by a red arrow.
• Right-click on 10mc3_200.vol.labels in the Project View and select Compute > Logical
Operations > Invert.
• Click on Apply.
• Right-click on the result (10mc3_200.vol.invert) in the Project View and select Display
> Ortho Slice (see Figure 15.13).
This image contains all the 1-valued voxels of the void space that can be reached starting from the
plane z = 0 and moving only in 1-valued voxels until plane z = 200. The isolated void spaces are
removed, which makes the computation to follow a little faster. The usefulness of this test is increased
when the resulting image is empty. It means that there is no connected porosity, and permeability is
nil.
Figure 15.15: Modified parameters of the Display > ROI Box module are highlighted by the red rectangle.
This ROI defines a cube with 50 voxel edges centered in the complete volume (see Figure 15.16). It
will be used in this tutorial to compute permeability on small volumes. It can be moved through the
data set at will during the tutorial, although its initial position will be used for illustrating purposes.
Figure 15.17: Modified parameters of the XLab Simulations > Absolute Permeability Experiment Simulation module are high-
lighted by red arrows. (1) Connect the ROI Box module to reduce the computation domain. (2) Select the label 1 as it represents
the void space between the spheres.
The default parameters simulate an experiment along the Z axis with the input pressure at 1.3 × 105
Pa and the atmospheric pressure at output. The default viscosity is the viscosity of water. The options
The spreadsheet containing all results and related information can be visualized by selecting it in the
project view and clicking on the Show button (in the Properties area). See Figure 15.18.
Figure 15.18: Spreadsheet containing the main results of the Absolute Permeability Experiment Simulation computation.
A spreadsheet can be exported into several formats (CSV, XML, txt for example).
• Hide Bounding Box and the five Ortho Slice by clicking on their viewer toggle.
• Right-click on 10mc3_200.vol.VelocityZ and select Compute > Magnitude.
• Right-click on 10mc3_200.vol.VelocityZ and select Display > Illuminated Streamlines
and set its parameters as described in Figure 15.19.
• Click on Apply.
The resulting visualization and Project View are described by Figure 15.20.
Figure 15.19: Modified parameters for Illuminated Streamlines representing the velocity field in the experiment simulation are
highlighted by red arrows.
Figure 15.22: Visualization of the Height Map Slice representing the pressure field in the experiment simulation. The viewer
and Project View should look like in this picture.
Note: The experimental setups are automatically designed after the calculation is initiated. Figure
• a channel with a square section to stabilize (from a numerical point of view) the flow in the
system, to ease convergence of the iterative algorithm;
• a diverging part to minimize the amount of void space added to the system and to spread the
flow on the input face;
• a totally fluid zone to be sure that the fluid can enter through the complete surface of the sample.
On the other faces of the sample, a one-voxel-wide solid plane is added, to be sure that the fluid is
contained in the system.
Figure 15.23: 2D example of experimental setups created The experimental setup (left and right of the system) enables the flow
to spread through the sample.
With these parameters, the module will compute the full intrinsic permeability tensor. A full tensor
computation requires three computations equivalent in time and memory consumption to the experi-
ment simulation.
Figure 15.24: Modified parameters of the XLab Simulations > Absolute Permeability Tensor Calculation module are high-
lighted by red arrows. (1) Connect the ROI Box module to reduce the computation domain. (2) Select the label 1 as it represents
the void space between the spheres.
Figure 15.25: Spreadsheet containing the main results of the Absolute Permeability Tensor Calculation computation.
A spreadsheet can be exported into several formats (CSV, XML, txt for example).
The resulting visualization and Project View are described by Figure 15.27.
The other velocity fields can be visualized by replaying the same procedure for each.
We work here with the complete volume, high-resolution version of the data set. It
can be found in the same directory as the resampled data set used in this tutorial:
data/tutorials/xlab/10mc3_400.vol.am.
Mean diameter of the spheres could be determined using Avizo toolset, following a procedure similar
to tutorial Example 4: Further Image Analysis - Distribution of Pore Diameters in Foam. Using the
experimental parameters, the spheres diameters are between 100 and 120µm.
Porosity can also be estimated with Avizo, and the value is 36.35%.
From these two elements, the permeability value calculated from the Kozeny-Carman equation is be-
tween 6.59d and 8.00d.
These values can be compared to the permeabilities obtained with absolute permeability simulations
modules on the complete geometry (without the region of interest used in this tutorial). Experiment
simulation in each direction gives the following values:
kX = 7.80d
kY = 7.85d
kZ = 7.75d
The intrinsic permeability tensor of the material is:
7.57 0.25 −0.23
0.25 7.54 −0.18
−0.23 −0.18 7.15
The simulated experimental values and the diagonal values of the tensor are all in the range
of permeabilities estimated with Kozeny-Carman equation. We remind the user that these
values were computed with the complete volume, high-resolution version of the data set:
data/tutorials/xlab/10mc3_400.vol.am. A second demo script is also provided, which
runs the steps of this tutorial on the full resolution data set, restricted to a region of interest.
As the subject of data preparation for simulation has been addressed in the previous tutorial for absolute
permeability computation, it will only be shortly evoked here:
A demo script is also provided (for Microsoft Windows only). This script will automatically perform
all the steps detailed in the tutorial.
where:
VR ∂C∂t
in (t) ~ ndS
R
= D Sin ∇c.~
where Sin and Sout the faces of the sample where the reservoirs are connected.
Once the diffusion process starts, the concentration in the sample quickly evolves and the exchanges
with the reservoirs are dissymmetrical. This transient state is then replaced by an established state,
when the exchanges with the reservoirs are equal.
This established state is characterized by the fact that ∂C∂t
in (t)
= − ∂Cout
∂t
(t)
. Once this state is attained,
the concentration in the reservoirs will continue to vary until they reach the equilibrium concentration
c∞ . The difference of these concentrations, Cout (t) − Cin (t), follows an exponential law:
where c (X, t) is the local concentration at position X and time t, A is a constant coefficient.
Knowing this solution must verify the previous hypothesis of flux equality ( ∂C∂t
in (t)
= − ∂Cout
∂t
(t)
), the
following equation is derived:
cos √ λ − 1
Dapp λ
−λ2 = Dapp β p
D app
sin √ λ
Dapp
which links the λ2 coefficient to the apparent diffusivity Dapp of the sample.
To sum up:
A change of scale is necessary to get equations valid on the entire volume. The method of volume aver-
aging is a technique that accomplishes a change of scale. Its main goal is to spatially smooth equations
by averaging them on a volume. The interested reader will find relevant details and references in
[Whitaker, S., The Method of Volume Averaging, Kluver Academic Publishers, 1999].
This theory performs to develop a closure problem that transforms the Fick’s equations to a vectorial
problem; closure variable ~b is used to state the concentration perturbation in a new problem:
∇2~b = 0
When the problem is solved, it is possible to compute the dimensionless diffusivity tensor defined as:
→
−
→
− →
−
!
→
− →
−
Z
D 1 −→
= I + nf s b ds
Dsolution Vf Sf s
where:
• is the porosity,
• Dsolution is the bulk solution diffusivity,
• Vf is the volume of fluid,
• Sf s is the area of the fluid-solid interface,
• −
n→f s is the normal to the fluid-solid interface directed from the fluid to the solid phase.
Boundary conditions
Avizo XLabSuite Extension provides two approaches to estimate molecular diffusivity.
The first is an experiment simulation based on Fick’s equations resolution. As said previously, this
is done in the Molecular Diffusivity Experiment Simulation module. The rate of reaction of the solid
is assumed to be zero: there is no reaction occuring at the fluid-solid interface. Then the boundary
where −
n→
f s is the normal to the fluid-solid interface directed from the fluid to the solid phase.
Besides this fluid-solid interface condition, a one-voxel-wide plane of solid is added on the faces of the
image that are not perpendicular to the main diffusion direction. This allows isolation of the sample
from the outside.
Boundary conditions at inlet and outlet require knowledge of the concentrations in the reservoirs.
These concentrations evolve over time:
→→ −
Z
∂Cin −
Vr = n−Sin . ∇cds
∂t Sin
−→ → −
Z
∂Cout −
Vr =− n−Sout . ∇cds
∂t Sout
when Sin and Sout are respectively the input and output face of the sample; −n− → −−−→
Sin and nSout are
respectively the normal to the input and output face.
The second approach solves the closure problem derived from the Fick’s equation by volume averag-
ing. This is done in the Molecular Diffusivity Tensor Calculation module. The vectorial problem that
is solved in this case is closed by imposing periodic boundary conditions to ~b and the geometry. The
fluid-solid interface condition has the following similar form:
−→
→ −
−−
n→ −→
f s . ∇ b = nf s
The default parameters simulate an experiment along the Z axis with a concentration in the input reser-
voir at initial time of 1711 mol.m−3 and the concentration in the output reservoir at initial time being
Figure 15.32: Spreadsheet containing the main results of the Molecular Diffusivity Experiment Simulation computation.
The resulting visualization should look like Figure 15.33. One can notice that the input and output
concentrations are far from having reached the end concentration (described as C∞ in the theory
pages). As explained in the theory pages, the computation is stopped once the behavior of the logarithm
of the difference between the input and end concentrations becomes linear w.r.t. time.
Figure 15.33: Visualization of the evolution of both input and output reservoirs concentration.
• Hide all current display modules, such as Bounding Box or Ortho Slice, by clicking on their
viewer toggle.
• Right-click on 10mc3_200.vol.ConcentrationZ and select Display > Ortho Slice.
• In the Ortho Slice properties, change the selected colormap to temperature.icol from the Edit
The resulting visualization should look like Figure 15.34. You can observe the decrease of the con-
centration from the input reservoir (at the bottom of the slice, in yellow), to the output reservoir (at the
top of the slice, in light blue).
Figure 15.34: Visualization of concentration field in an experiment simulation with molecular diffusion in Z direction.
With these parameters, the module will compute the full intrinsic diffusivity tensor. A full tensor
computation requires three computations, each equivalent in time and memory consumption to one
experiment simulation.
Note that the concentration field output is not selected by default. This output corresponds to the ~b
vector, solution of the vectorial problem derived from the Fick’s equation with the volume averaging
approach (see molecular diffusion simulations theory pages). It is used in the computation of the
effective molecular diffusivity but its visualization is hard to interpret.
A spreadsheet can be exported into several formats (CSV, XML, txt for example).
Figure 15.35: Tables of the spreadsheet containing the main results of the Molecular Diffusivity Tensor Calculation computa-
tion.
Finaly, Vrettos (1989) and Quintard (1993) obtained numerical results on Voronoi networks and on
cubic configurations.
All these results are displayed on Figure 15.36.
We compare these values to the values computed with Avizo XLabSuite Extension modules on the
data set used in this tutorial, which is a random packing of spheres. We work here with the complete
geometry of the complete volume, high-resolution version of the data set (that is to say a label image
obtained from data/tutorials/xlab/10mc3_400.vol.am, without any ROI Box).
Porosity can be estimated with Avizo (with Measure And Analyze > Global Measures > Intensity In-
tegral in 3D interpretation connected to 10mc3_400.vol.Axis-Connectivity), and the value
is 36.35%.
Experiment simulation in each direction gave the following results:
DX
• Dsolution = 0.249
DY
• Dsolution = 0.255
DZ
• Dsolution = 0.257
These values are also displayed in Figure 15.36. One can see that Avizo XLabSuite Extension results
are in good agreement with the different studies results.
Figure 15.36: Comparison of experimental measurements, empirical laws and numerical simulations (among which Avizo
XLabSuite Extension modules) for the determination of molecular diffusivity with respect to the porosity.
A second demo script is also provided (for Microsoft Windows only), which runs the steps of this
tutorial on the full resolution data set, restricted to a region of interest.
Bibliography:
1. Carman P.C., Flow of Gases through Porous Media, Butterworths, London, 1956
2. Currie J.A., Gaseous diffusion in porous media. Part I - a non-steady state method, Brit. J.
Appl. Phys., II, 314-324, 1960
As the subject of data preparation for simulation has been addressed in the previous tutorial for absolute
permeability computation, it will only be shortly evoked here:
Getting started with formation factor and electrical conductivity computation 771
• defining a region of interest.
A demo script is also provided (for Microsoft Windows only). This script will automatically perform
all the steps detailed in the tutorial.
where:
As we consider conductive solution, there is no charges accumulation. Ohm’s law and conservation of
charge lead to the following equation:
~ ~j = 0
∇.
and as we consider only one homogeneous fluid phase, the electrical conductivity σ does not vary in
space, which leads to:
∇2 v = 0
The experiment that is simulated in the Formation Factor Experiment Simulation module consists of
applying a constant electrical potential difference between two opposite faces of the material sample
(direct current is used). The other faces of the sample are enclosed with an electrical insulator. When
the final state is attained, input and output current fluxes are equal, and by using the Ohm’s law on the
Getting started with formation factor and electrical conductivity computation 772
entire volume, the apparent electrical conductivity is estimated by:
jtotal Vin − Vout
=σ
S L
where
• jtotal is the total electrical flux going through the input face,
• S is the area of the input face,
• σ is the electrical conductivity of the material,
• Vin and Vout are the input and output imposed potentials,
• L is the length of the material sample.
The total electrical flux going through the input face jtotal can be computed by locally applying Ohm’s
law: Z
jtotal = ~ ds
−σsolution ∇v. ~
S
where σsolution is the electrical conductivity of the free solution.
Important remark: in the experiment, we consider direct current (there is no transient phenomenon)
and we neglect the skin effect and the concentration variations. An experimenter will usually have
to use correction models to remove those experimental phenomena, which we avoid here with this
experiment simulation in ideal conditions.
The formation factor is directly linked with the electrical conductivity through its inverse: the electrical
resistivity. Indeed, it is ”the ratio of the resistivity of a rock filled with water to the resistivity of that
water” (Schlumberger Oilfield Glossary: formation factor, 2009).
When the problem is solved, it is possible to compute the dimensionless electrical conductivity tensor
Getting started with formation factor and electrical conductivity computation 773
defined as: →
−
→
− →
−
!
→
− →
−
Z
σ 1 −
= I + n→
f s b ds
σsolution Vf Sf s
where:
• is the porosity,
• σsolution is the solution electrical conductivity,
• Vf is the volume of fluid
• Sf s is the area of the fluid-solid interface,
• −
n→f s is the normal to the fluid-solid interface directed from the fluid to the solid phase.
The inverse of the conductivity tensor is the formation factor tensor and the formation factor scalar is
the average value of the eigenvalues of this last tensor. All this is computed by the Effective Formation
Factor Calculation module.
Boundary conditions
Avizo XLabSuite Extension proposes two approaches to estimate electrical conductivity.
The first is an experiment simulation based on Ohm’s equations resolution. As said previously, this
is done in Formation Factor Experiment Simulation module. The material is generally composed of
rocks, which can be considered as insulator. The boundary condition at fluid-solid interface is:
→
−
−−
n→
f s . ∇v = 0
where − n→f s is the normal to the fluid-solid interface directed from the fluid to the solid phase. Besides
this fluid-solid interface condition, boundary conditions are:
• one-voxel-wide plane of electrical insulator added on the faces of the image that are not per-
pendicular to the electrical flux main direction. This allows isolation of the sample from the
outside.
• the input and output (the faces that are perpendicular to the flux main direction) designed as
one-voxel-wide plane where the potential is imposed.
The second approach solves the closure problem derived from Ohm’s equation by volume averaging.
This is done in Effective Formation Factor Calculation module. The vectorial problem that is solved
in this case is closed by imposing periodic boundary conditions to ~b and the geometry. The fluid-solid
interface condition has the following similar form:
−→
→ −
−−
n→ −→
f s . ∇ b = nf s
Getting started with formation factor and electrical conductivity computation 774
Avizo XLabSuite Extension uses a finite volume method to solve the equation systems.
The discretization scheme supposes that the voxel is isotropic (cubic).
System resolution
Once discretized, the equation systems can be written as Ax = b, A being a sparse, symmetric matrix.
The equation systems are solved using a fully implicit method (matrix inversion). PETSc (Portable,
Extensible Toolkit for Scientific Computation) library is used for the direct resolution of the linear
systems.
An iterative resolution with conjugate gradient and ILU preconditioner is performed. The convergence
criterion used is the relative decrease of the residual l2 -norm.
Getting started with formation factor and electrical conductivity computation 775
Figure 15.37: 3D visualization of the sphere pack used in this tutorial.
As mentioned in the previous step, unit management is not mandatory here. However, refer to step 2
of absolute permeability simulations tutorial to learn more about editing the units of length.
Getting started with formation factor and electrical conductivity computation 776
Figure 15.38: Visualization of the thresholded data set.
Getting started with formation factor and electrical conductivity computation 777
Figure 15.39: Visualization of the percolating porosity in data set.
Getting started with formation factor and electrical conductivity computation 778
Figure 15.40: Visualization of the cube representing the region of interest.
The default parameters simulate an experiment along the Z axis with an input potential of 1 V and the
output potential being null. The default solution electrical conductivity is 0.0001 S.m−1 . The options
can be modified to simulate several experiments. For example, the direction of the electrical flux can
Getting started with formation factor and electrical conductivity computation 779
be adjusted to X, Y or Z direction (default is Z). If several directions are selected, the computations
will be done successively. The potential values used as boundary conditions of the experiment can
also be modified. Modifying these values will not change the electrical conductivity or the formation
factor, which are intrinsic to the porous media. It will only modify the output potential field.
The spreadsheet containing all the relevant information can be visualized by selecting it in the Project
View and clicking on the Show button (in the Properties area). See Figure 15.41. A spreadsheet can
be exported into several formats (CSV, XML, txt for example).
Figure 15.41: Spreadsheet containing the main results of the Formation Factor Experiment Simulation computation.
• Hide all current display modules, such as Bounding Box or Ortho Slice, by clicking on their
viewer toggle.
Getting started with formation factor and electrical conductivity computation 780
• Right-click on 10mc3_200.vol.PotentialZ and select Display > Ortho Slice.
• In the Ortho Slice properties, change the selected colormap to temperature.icol from the Edit
menu.
• Select the Edit menu of the colormap again, and then select Adjust range to > Data min-max.
• In the Orientation port, select the yz orientation.
• Zoom on the slice to visualize it.
The resulting visualization should look like Figure 15.42. You can observe the decrease of the potential
from the input of the device (at the bottom of the slice, in yellow), to the output of the device (at the
top of the slice, in light blue).
Figure 15.42: Visualization of potential field in an experiment simulation with electrical flux in Z direction.
Getting started with formation factor and electrical conductivity computation 781
label of the void space in 10mc3_200.vol.Axis-Connectivity is 1. If step 4 was not
completed, check the box refering to label 0 in the Pore space, since the label of the void space
in 10mc3_200.vol.Labels is 0.
• Click on Apply.
With these parameters, the module will compute the full intrinsic conductivity tensor. A full tensor
computation requires three computations, each equivalent in time and memory consumption to one
experiment simulation.
→
−
Note that the potential field output is not selected by default. This output corresponds to the b vec-
tor, solution of the vectorial problem derived from the Ohm’s equations with the volume averaging
approach (see electrical conductivity simulations theory pages). It is used in the computation of the
effective electrical conductivity but its visualization is hard to interpret.
As the formation factor tensor is computed as the inverse of the conductivity tensor, the second table
is generated only if all the three directions have been selected and the full conductivity tensor has been
computed.
A spreadsheet can be exported into several formats (CSV, XML, txt for example).
Getting started with formation factor and electrical conductivity computation 782
Figure 15.43: Tables of the spreadsheet containing the main results of the Effective Formation Factor Calculation computation.
• Archie’s law (1942): F = A−m where A is often assumed to be 1 and m depends on the
geometry of the porous medium (m usually belongs to range [1,3]),
• Sen et al (1981): F = −3/2 which is a good approximation for sintered packings of glass
spheres for > 0.2.
• Berryman (1983): F = 2/((1 + )) which is well adapted to materials with a large porosity.
It appeared that the experimental values measured on mixtures of glass spheres by Lemaitre et al were
in a range defined by the values obtained from the theories of Sen et al and Berryman and were well
fit by Archie’s law with m=1.46.
The data set used in this tutorial is a random packing of spheres. We work here with the complete
geometry of the complete volume, high-resolution version of the data set (that is to say a label image
Getting started with formation factor and electrical conductivity computation 783
obtained from data/tutorials/xlab/10mc3_400.vol.am, without any ROI Box).
Porosity can be estimated with Avizo (with Measure And Analyze > Global Measures > Intensity In-
tegral in 3D interpretation connected to 10mc3_400.vol.Axis-Connectivity), and the value
is 36.35%.
The formation values calculated from the different empirical laws are:
We compared these values to the values computed with electrical conductivity simulations modules on
data/tutorials/xlab/10mc3_400.vol.am.
Experiment simulation in each direction gave the following results:
• FX = 4.599
• FY = 4.602
• FZ = 4.623
1. Archie G.E., The electrical resistivity log as an aid in determining some reservoir characteris-
tics, Petroleum Transactions of AIME, 146, 54-62, 1942
2. Berryman J.G., Effective conductivity by fluid analogy for a porous insulator filled with a con-
ductor, Phys. Rev. B 27, 7789-7792, 1983
3. Lemaitre J., Troadec J.P., Bideau D., Gervois A. and Bougault E., The formation factor of the
pores space of binary mixtures of spheres , J. Phys. D: Appl. Phys., 21, 1589-1592, 1988
4. Sen P.N., Scala C. and Cohen M.H., A self-similar model from sedimentary rocks with applica-
tion to dielectric constant of fused glass beads, Geophysics, 46, 781-795, 1981
Getting started with formation factor and electrical conductivity computation 784
15.4 Getting started with thermal conductivity computation
The purpose of this step-by-step tutorial is to become more familiar with the usage of thermal conduc-
tivity computation modules provided with the Avizo XLabSuite Extension for Avizo. The following
subjects will be addressed in this chapter:
As the subject of data preparation for simulation has been addressed in the previous tutorial for absolute
permeability computation, it will only be shortly evoked here:
A demo script is also provided (for Microsoft Windows only). This script will automatically perform
all the steps detailed in the tutorial.
∂Tα
(ρcp )α − λα ∇2 Tα = 0
∂t
where:
We consider that the steady state is reached. Then the equation we now want to solve is:
λα ∇2 Tα = 0
The experiment that is simulated in the Thermal Conductivity Experiment Simulation module consists
of applying a constant heat flux between two opposite faces of the material sample. For example, the
input and output temperatures might be maintained constant by a heating resistor for the input and a
freezing bath for the outut. The other faces of the sample are perfect thermal insulator planes. When
the final state is attained, input and output heat fluxes are equal and Fourier’s law writes on the entire
volume:
ϕtotal Tin − Tout
=λ
Sin L
where
The apparent thermal conductivity λ can be computed thanks to the previous expression, provided that
we know the other terms. The experimenter controls the temperatures Tin and Tout and it is easy to
determine the total heat flux through the input face by locally using Fourier’s law:
→
−
Z
ϕtotal = −λα ∇Tα .ds ~
Sin
where λα and Tα are the thermal conductivity and temperature of any phase α of the material in contact
with the input surface Sin .
−→
→ − →
−
→
−
∇(λα ( ∇ b α + I )) = 0
→
− →
−
where b might be considered as a perturbation of the temperature field. b also verifies:
−
−−
−→→ 1 X
Z
−→
→ − →
−
→
−
λef f = λα ∇ b α + I dv
V α Vα
where:
−
−−−→
→
• λef f is the effective thermal conductivity tensor,
• V is the total volume of the sample,
• α is a conducting phase,
• Vα is the volume occupied by each phase α.
The interested reader will find relevant details and references in [Auriault, J.-L., Boutin, C. and Gein-
dreau, C., Homogénéisation de phénomènes couplés en milieux hétérogènes 1, Lavoisier, 2009].
Boundary conditions
As said previously, most materials are not homogeneous and contain more than one phase. Charac-
teristics of each phase can be completely different and the interfaces between the components of the
material play a major role in the global thermal conductivity.
λξ ∇2 Tξ
=0 for ξ = α, β
Tα = Tβ at α − β interface
−−→ → − → → −
−nαβ .λα ∇Tα = −−
n−αβ .λβ ∇Tβ at α − β interface
where −
n−
→
αβ is the unit vector normal to the interface between the two phases and oriented from α to β.
These boundary conditions specify that the temperature and the normal component of the heat flux are
continuous at the interface between the phases.
Avizo XLabSuite Extension proposes two approaches to estimate thermal conductivity.
The first is an experiment simulation based on Fourier’s equations resolution. As said previously, this is
done in Thermal Conductivity Experiment Simulation module. Besides the phases interface condition,
boundary conditions are:
• one voxel wide plane of thermal insulator is added on the faces of the image that are not perpen-
dicular to the heat flux main direction. This allows isolating the sample from the outside.
• the input and output (the faces that are perpendicular to the flux main direction) are designed as
one voxel wide planes where the temperature is imposed.
• two among the following three conditions can be imposed by the user, the third being estimated
from the chosen two: input temperature, output temperature, heat flux.
The second approach solves the canonical problem derived from Fourier’s equation by homogeneiza-
tion on an infinite periodic domain. This is done in the Thermal Conductivity Tensor Calculation
module. Two boundary conditions result from the condition of continuity of the temperature and of
the normal component of the heat flux at a two-phases interface:
( →
− →
−
bα = bβ
−→
→ − →
−
→
− −→
→ − →
−
→
−
−λ →α
−
n .( ∇ b + I ) = −λ →
αβ α
−
n .( ∇ b + I )
β αβ β
→
−
A periodic boundary condition is imposed to b α and to the geometry.
System resolution
Once discretized, the equation systems can be written as Ax = b, A being a sparse, symmetric matrix.
Figure 15.46: Removal of voxels belonging to a conductig material but surrended with insulator material.
The default parameters simulate an experiment along the Z axis with an input temperature of 298 K
and an output temperature of 273 K. The options can be modified to simulate several experiments.
For example, the direction of the thermal flux can be adjusted to X, Y or Z direction (default is Z). If
several directions are selected, the computations will be done successively. The boundary conditions
of the experiment can also be modified. Two values among three must be imposed: input temperature,
output temperature, heat flux. Modifying these values will not change the thermal conductivity, which
is intrinsic to the material. It will only modify the output temperature field.
The spreadsheet containing all the relevant information can be visualized by selecting it in the Project
View and clicking on the Show button (in the Properties area). See Figure 15.48. A spreadsheet can
be exported into several formats (CSV, XML, txt for example).
Figure 15.48: Spreadsheet containing the main results of the Thermal Conductivity Experiment Simulation computation.
• Hide all current display modules, such as Bounding Box or Ortho Slice, by clicking on their
viewer toggle.
• Right-click on 10mc3_200.vol.TemperatureZ and select Display > Ortho Slice.
• In the Ortho Slice properties, change the selected colormap to temperature.icol from the Edit
menu.
• Select the Edit menu of the colormap again, and then select Adjust range to > Data min-max.
• In the Orientation port, select the yz orientation.
• Zoom on the slice to visualize it.
The resulting visualization should look like Figure 15.49. You can observe the decrease of the temper-
ature from the input of the device (at the bottom of the slice, in yellow), to the output of the device (at
the top of the slice, in light blue). You can also guess that the heat front is moving forward faster in
the phase with the greatest thermal conductivity.
Figure 15.49: Visualization of temperature field in an experiment simulation with thermal flux in Z direction.
The aspect of the isosurface contours highlights the fact that the heat front is moving forward faster in
the particules of phase Inside. (If this is not obvious, you can use a Volume Rendering to help visualize
the particules in 3D).
Again, the heat front, represented by the isolines, obviously moves faster in the particules of phase
Inside.
The resulting visualization should look like Figure 15.50.
Figure 15.50: Visualization of the temperature isosurface T = 284 K and of 30 temperature isolines on an Ortho Slice with
Color Wash rendering.
With these parameters, the module will compute the full intrinsic thermal conductivity tensor. A full
tensor computation requires three computations, each equivalent in time and memory consumption to
one experiment simulation.
Note that the temperature field output is not selected by default. This output corresponds to the ~b
vector, solution of the vectorial problem derived from the Fourier’s equation with the homogeneization
approach (see thermal conductivity simulations theory pages). It is used in the computation of the
effective thermal conductivity but its visualization is hard to interpret.
A spreadsheet can be exported into several formats (CSV, XML, txt for example).
The first model we study is a periodic array of non-touching 3d cylinders, as displayed on Figure 15.52.
The cylinders are refered to as the β-phase and the material surrending the cylinders as the α-phase.
In Ochoa-Tapia et al. (1994), the following analytical estimation of the effective thermal conductivity
2Λ − α (Λ − 1)
Λef f =
2 + α (Λ − 1)
In Perrins et al. (1979), analytical estimations of the effective thermal conductivity are gathered in a
table of values of conductivities for square arrays of cylinders with various conductivities ratio Λ and
volume fractions.
We apply the formula by Ochoa-Tapia et al. to our model, where α = 0.49, and we compare it with the
results obtained from both Avizo experiment simulation and tensor computation and with the values
of thermal conductivity given in Perrins et al. for α = 0.5 (as 0.49 is not in the table):
We observe a good agreement between the analytical estimations and the simulations.
In Meredith and Tobias (1960), the following analytical estimation of the effective thermal conductivity
of an array of non-touching cylinders in parallel distribution (where the two phases are thermally in
parallel with respect to the direction of the heat flux) is given:
Λef f = α + (1 − α )Λ
We apply the formula to our model, where α = 0.49, and we compare it with the results obtained from
Avizo experiment simulation and tensor computation:
Figure 15.53: Comparison between Avizo simulation and Nozad et al. computation of thermal conductivity.
The second model we study is a periodic array of non-touching 3d spheres, as displayed on Figure
15.54. The spheres are refered to as the β-phase and the material surrending the spheres as the α-
phase.
Maxwell (1881) obtained the following expression for the thermal conductivity of a packed-sphere bed
where the spheres are sufficiently apart that they do not interact:
3Λ − 2α (Λ − 1)
Λef f =
3 + α (Λ − 1)
Meredith and Tobias (1960) gave an analytical expression for the same problem:
2+Λ 6 + 3Λ 7/3 3 − 3β 10/3
− 2β + 0.409 − 2.133
1−Λ 4 + 3Λ β 4 + 3β β
Λef f =
2+Λ 6 + 3Λ 7/3 3 − 3Λ 10/3
+ β + 0.409 − 0.906
1−Λ 4 + 3Λ β 4 + 3Λ β
We apply the two formula to our model, where α = 0.64, and we compare it with the results obtained
from both Avizo experiment simulation and tensor computation:
We observe a good agreement between the analytical estimations and the simulations.
The third model we study is a periodic array of 3d spheres with particle-particle contact, as displayed
on Figure 15.55. The contact surface is controled by the ratio between the contact size and the spheres
Figure 15.55: Two spheres in particle-particle contact extracted from a periodic array.
Whitaker (1999) reports the results computed by Nozad et al. (1985) on a two-dimensional square
array with particle-particle contact. In there study Nozad et al. compared those results with experi-
mental measurements on a narrow range of porosities (α in [0.39, 0.41]). The theory and experiment
agreed well, despite the important differences between their characteristics. Based on this observation,
we compare Nozad et al. computational results with Avizo simulations on our model, where α =
0.51. Only one curve is displayed for both Avizo experiment simulation and tensor computation as
their results are almost equal.
Figure 15.56: Comparison between Avizo simulation and Nozad et al. computation of thermal conductivity.
The last model we study is a periodic bilaminar composit material, as displayed on Figure 15.57. The
thinest layers material is refered to as the β-phase and the other material as the α-phase. We define r,
the thickness ratio between the layers. The stratification is supposed to be in the Z direction.
Auriault (2009) presents an analytical expression of the effective thermal conductivity tensor for such
a bilaminar material:
rλα + (1 − r)λβ 0 0
→
−
→
−
λ ef f = 0 rλα + (1 − r)λβ 0
λα λβ
0 0 rλα +(1−r)λβ
We compare the analytical expression with the result of Avizo tensor computation for two pairs of
thickness ratio and thermal conductivity ratio:
1. Maxwell J.C., Treatise on Electricity and Magnetism, Vol. I, 2nd edition, Clarendon Press,
Oxford, 1881
2. Meredith R.E., Tobias C.W., Resistance to potential flow through a cubical array of spheres, J.
Applied Phys., Vol. 31, 1270-1273, 1960
3. Nozad I., Carbonell R.G., Whitaker S., Heat conduction in multiphase systems I: Theory and
experiment for two-phase systems, Chem. Engng. Sci. 40, 843-855, 1985
4. Ochoa-Tapia J.A., Stroeve P., Whitaker S., Diffusive transport in two-phase media: Spatially
periodic models and Maxwell’s theory for isotropic and anisotropic systems, Chem. Engng.
Sci. 49, 709-726, 1994
5. Perrins W.T., McKenzie D.R., McPhedran R.C., Transport properties of regular arrays of cylin-
ders, Proc. Roy. Soc. Lond. A369, 207-225, 1979
6. Whitaker S., The method of volume averaging, Theory and applications of transport in porous
media Vol. 13, Kluwer Acad. Pub., Dordrecht, 1999
7. Auriault, J.-L., Boutin, C., Geindreau, C., Homogénéisation de phénomènes couplés en milieux
hétérogènes 1, Lavoisier, 2009
This document describes how to develop custom extensions for the Avizo visualization system. Such
extensions may include file read and write routines, new visualization modules, data objects and other
components. In order to be able to develop custom extensions, you will need the developer extension
for Avizo, called Avizo XPand Extension for short. In addition, you will need a C++ development
environment like Microsoft Visual Studio on Windows (for details see subsection 16.1.2).
To understand the document, you need some basic know-how in C++ programming. Also, you should
be already familiar with the standard Avizo system. If you do not know Avizo yet, we recommend that
you go through the tutorials in the Avizo User’s Guide.
Avizo is based on a number of external libraries, such as Open Inventor, OpenGL, Qt, and Tcl. This
document does not provide a documentation for these libraries. It merely gives some basic hints where
it is needed to understand the examples. In general, this will be sufficient to write your own standard
I/O routines and Avizo modules. For details, we refer to the original documentation of the external
libraries.
Note: an Avizo project is actually a set of interconnected modules and data objects. In Avizo XPand
Extension programming interface, the Avizo project is often referred as the network or module network,
or the object pool. The pool also refers to Avizo Project View, more specifically the Project Graph
View.
Avizo is an object-oriented software system. Besides the core components like the graphical user
interface or the 3D viewers, it contains a large number of data objects, modules, readers and writers.
Data objects and modules are C++ classes, readers and writers are C++ functions.
Instead of being compiled into a single static executable, these components are grouped into packages.
A package is a shared object (usually called .so or .sl on Unix or .dll on Windows) which can be
dynamically loaded by Avizo at runtime when needed. This concept has two advantages. On the one
hand, the program remains small since only those packages are loaded which are actually needed by
the user. On the other hand, it provides almost unlimited extensibility since new packages can be added
any time without recompiling the main program.
Therefore, in order to add custom components to the Avizo developer version, new packages or shared
objects must be created and compiled. A package may contain an arbitrary number of modules and it
You also need the appropriate C++ development environment. C++ compilers are generally not com-
patible, therefore the compilers and compiler versions listed in section System Requirements should be
used. Other compiler versions may work too, but this is not guaranteed. In particular, it is not possible
to use the GNU gcc compiler except on Linux.
On all Unix platforms, the GNU make utility (gmake) is needed in order to use the GNUmakefiles
provided with Avizo XPand Extension. To proceed, you should create a link in a directory already
listed in your path, e.g., in /usr/bin.
On Mac OS X platforms, the GNU make utility (gmake) is basically needed in order to use the
GNUmakefiles provided with Avizo XPand Extension. You can also modify and build your code by
using other development tools based on GNU gcc compilers as Xcode.
More general hardware requirements such as installed memory or special graphics adapters are listed
in the Avizo User’s Guide. On all systems, an OpenGL library together with the OpenGL header files
must be installed.
The contents of the Avizo root directory may differ slightly from platform to platform. For example,
on Windows, there will be no subdirectory lib. Instead, the compiled shared objects are located under
bin/arch-*-Optimize. The online documentation directory (share/devref/oiv) of Open
Inventor C++ classes. The online documentation directory (share/devrefAvizo/) of Avizo C++
classes does not exist on Windows. Instead, a compressed archive file Avizo.chm is provided and
is accessible by shortcut. This is how a typical Avizo installation directory looks like:
AvizoRoot/.............................................................Avizo installation directory
bin/
arch-*-Debug/........................................Avizo debug binaries (Windows only)
Avizo.exe........................................Avizo debug executable (Windows only)
arch-*-Optimize/...............................................Avizo binaries (Windows)
Avizo.exe .................................................. Avizo executable (Windows)
start...............................................................Avizo start script (Unix)
include/.....................................................................C++ header files
make/........................................................Make environment for Unix systems
share/
resources/...........................................Resource files of all standard packages
devref/........................................Documentation of Open Inventor C++ classes
devrefAvizo/.........................................Documentation of Avizo C++ classes
doc/...................................................................Avizo documentation
The workspace and project files for Visual Studio are generated automatically from the Avizo Package
files by the Development Wizard. There should be no need to change the project settings manually.
By default, Visual Studio will compile in debug mode. In order to generate optimized code, you need
to change the active configuration. This is done by choosing Configuration Manager... from the Build
menu. In the Active Solution Configuration pulldown menu, select Release.
In order to execute the debug mode version of your local packages, you must start Avizo with the debug
Avizo.exe located in the bin/arch-*-Debug folder. For convenience, a link Avizo (Debug) is
provided in the start menu. However, if you want to debug your code, you need to start Avizo from
Visual Studio. Thus, you need to specify the correct executable in the project properties dialog.
You can bring up the project properties dialog by choosing Properties from the Project
menu. Select Debugging from the left pane. In the field Command, choose the file
bin/arch-<version>-Debug/Avizo.exe located in the Avizo root directory (see Figure
16.2). Replace <version> with the version of Avizo you have (see system requirements).
You can now start Avizo from Visual Studio by pressing F5 or by choosing Start from the Debug menu.
In order to debug your code, you may set breakpoints at arbitrary locations in your code. For example,
if you want to debug a read routine, set a breakpoint at the beginning of the routine, execute Avizo and
invoke the read routine by loading some file.
If the specified directory does not exist, the development wizard asks you whether it should be created.
If you confirm, the directory and its subdirectories will be created. You may also specify an existing
empty directory in the text field. Then the subdirectories will be created in that location.
Finally, you may choose the existing directory previously created by the development wizard. In this
case, a simple check validates the specified directory.
To unset the local Avizo directory, clear the text field and click OK. The directory will not be deleted,
but the next time Avizo is started, modules and IO routines defined in the local Avizo directory will
The development wizard provides a toggle for copying an example package to the local Avizo
directory. You will get a warning if this button is activated and an existing local Avizo directory
already containing the example package has been specified. The example package is copied to the
You can select toggle Copy GPU example package to provide another example package. To build this
package, install the CUDA toolkit first. This example is copied in the local Avizo directory in the
subdirectorie src/gaussianfiltercudac.
The name of a package must not contain any white spaces or punctuation characters. When a package
is added, a subdirectory of the same name is created under src in the local Avizo directory. In this
directory, the source code and header files of all the modules and IO routines of the package are stored.
In addition, in each package directory, there must be a Package file from which the build system files
can be generated.
Initially, a default Package file will be copied into a new package directory. This default file adds the
most common Avizo libraries for linking. It also selects all C++ source files in the package directory
to be compiled. In order to generate the build system from the Package file, please refer to subsection
16.2.9.
In addition to the Package file, the file version.cpp will also be copied into a new package direc-
tory. This file allows you to put version information into your package, which can later be viewed in
the Avizo system information dialog. Finally, an empty file package.rc will also be copied into
share/resources. Later modules and IO routines will be registered in this file.
To create the template for an ordinary module using the development wizard, you must enter the C++
class name of the module, the name to be shown in the popup menu of possible input data objects, the
C++ class name of possible input data objects, and the package where the input class is defined (see
Figure 16.7).
Once you click OK, two files are created in the package directory: a header file and a source code
file for the new module. In addition, a new module statement is added to the package resource file
located under share/resources in the package directory. After you have added a new module to
a package, you need to recreate the build system files before you can compile the module. Details are
described in subsection 16.2.9.
Moreover, the name of the file format and the preferred file name extension must be specified. The
extension will be used by the file browser in order to identify the file format. The format name will be
displayed next to any matching file.
Finally, a toggle can be set in order to create the template of a read routine supporting the input of
multiple files. Such a routine will have a slightly different signature. It allows you to create a single
data object from multiple input files. For example, multiple 2D image files can be combined in a single
3D image volume. Details are provided in subsection 16.3.2.3.
After you press OK a new file <name>.cpp will be created in the package directory, where <name>
denotes the name of the read routine. In addition, the read routine will be registered in the package
resource file. Some file formats can be identified by a unique file header, not just by the file name
extension. In such a case, you may want to modify the resource file entry as described in subsection
16.3.2.1.
Remember, that after you have added a new read routine to a package, you need to recreate the build
system files before you can compile it. Details are described in subsection 16.2.9.
Remember, that after you have added a new write routine to a package, you need to recreate the build
system files before you can compile it. Details are described in subsection 16.2.9.
set LIBS {
hxplot hxtime hxsurface hxcolor hxfield
hxcore amiramesh mclib oiv tcl qt
}
set SHARE {
share/resources/mypackage.rc
}
In most cases, the default file works well and do not need to be modified. However, in order to
accomplish special tasks, the default values of the variables can be changed or additional variables can
be defined. Here is a detailed list describing the meaning of the different variables:
PACKAGE
The variable PACKAGE indicates the name of the package. This should be the same as the name of the
package directory. The package name must not contain any characters other than letters or digits.
LIBS
Lists all libraries on which the package depends. By default, the most common Avizo packages are
inserted here. You can modify this list as needed. For example, if you want to link against a library
called foo.lib on Windows or libfoo.so on Unix, you should add foo to LIBS.
In addition to a real library name, you may use the following aliases in the LIBS variable:
oiv - for the Open Inventor libraries
tcl - for the Tcl library
SHARE
Lists all files which should be copied from the package directory into the local Avizo directory. By
default, only the package resource file will be copied. However, you may add additional files here,
if necessary. Instead of explicit file names, you may use wildcards. These will be resolved using the
standard Tcl command glob. For example, if you have some demo scripts in your package, you could
copy them in the following way:
set SHARE {
share/resources/mypackage.rc
share/demo/mydemos/*.hx
}
As for the LIBS variable, you may append an arch string here, i.e., SHARE-arch. The files then will
only be copied on the specified platforms.
INCLUDES
This variable may contain a list of additional include paths. These paths are used by the com-
piler to locate header files. By default, the include path is set to $AVIZO ROOT/include,
$AVIZO ROOT/include/oiv, $AVIZO LOCAL/src, and the local package directory.
COPY
This may contain a list of files which are copied from a location other than the local package directory.
You need to specify the name of the target file followed by the name of the destination file relative to
the local Avizo directory. For example, you may want to copy certain data files from some archive into
the Avizo directory. This can be achieved in the following way.
set COPY {
D:/depot/data/28523763.dcm data/test
D:/depot/data/28578320.dcm data/test
D:/depot/data/28590591.dcm data/test
}
SRC
This variable specifies the source code files to be compiled for the package. The default value of this
variable is
set SRC {*.cpp *.c}
This means, that by default, all .cpp and .c files in the local package directory will be compiled.
Sometimes you may want to replace this default by an explicit list of source files.
Again, you may append an arch string to the SRC variable, so that certain files will only be compiled
on a particular platform.
INCSRC
This variable specifies the header files to be included into the Visual Studio package project file. The
default value of this variable is
set INCSRC {*.h *.hpp}
This means that, by default, all .h and .hpp files in the local package directory will be considered.
Again, you may append an arch string to the INCSRC variable, so that certain header files will only be
considered on a particular platform.
The full source code of the read routine is contained in the example package provided with Avizo
XPand Extension. In order to follow the example below, first create a local Avizo directory us-
ing the Development Wizard. Be sure that the toggle copy example package is activated, as de-
scribed in subsection 16.2.2. The read routine can then be found in the local Avizo directory under
src/mypackage/readppm3d.cpp.
Let us first take a look at the commented source code of the reader. Some general remarks follow
below.
MYPACKAGE_API int
readppm3d(const QString& filename)
{
FILE* f = fopen(filename.toLocal8Bit(), "r"); // open the file
if (!f)
{
theMsg->ioError(filename);
return 0; // indicate error
}
// Register the data object to make it visible in the object pool. The
// name for the new object is automatically generated from the filename.
HxData::registerData(field, filename);
The dataFile command registers a new file format called PPM3D Demo Format. The option
-header specifies a regular expression which is used for automatic file format detection. If the
first 64 bytes of a file match this expression, the file will be automatically loaded using this read rou-
tine. Of course, some data formats do not have a unique file header. In this case, the format may also
be detected from a standard file name extension. Such an extension may be specified using the -ext
option of the dataFile command. Multiple extensions can be specified as a comma-separated list.
You can find the full source code of the reader in the local Avizo directory under
src/mypackage/readtrimesh.cpp. Remember that the example package must have been
copied into the local Avizo directory before compiling. For details, refer to subsection 16.2.2. Let
us now look at the complete read routine before discussing the details:
///////////////////////////////////////////////////////////////////////
//
// Read routine for the trimesh file format
//
///////////////////////////////////////////////////////////////////////
#include "api.h"
MYPACKAGE_API int
readtrimesh(const QString& filename)
{
FILE* fp = fopen(filename.toLocal8Bit(), "r");
if (!fp)
{
theMsg->ioError(filename);
return 0;
}
char buffer[256];
fgets(buffer, 256, fp); // read first line
surface->points().resize(nPoints);
surface->triangles().resize(nTriangles);
patch->triangles.resize(nTriangles);
for (i = 0; i < nTriangles; i++)
patch->triangles[i] = i; // add all triangles to one patch
if (fields.size())
{
for (i = 0; i < nPoints; i++)
{ // read data values of all fields
fgets(buffer, 256, fp);
QStringList stringList = toQString(buffer).split(’ ’);
int indice = 0;
for (j = 0; j < fields.size(); j++)
{
int n = fields[j]->nDataVar();
float* v = &fields[j]->dataPtr()[i * n];
for (k = 0; k < n; k++)
{
if (indice < stringList.size())
{
v[k] = stringList[indice].toFloat();
return 1;
}
The first part of the read routine is very similar to the PPM3D reader outlined in the previous section.
Required header files are included, the file is opened, the number of points and triangles are read, and
a consistency check is performed.
Then an Avizo surface object of type HxSurface is created. The class HxSurface has been devised to
represent an arbitrary set of triangles. The triangles are organized into patches. A patch can be thought
of as the boundary between two volumetric regions, an ”inner” and an ”outer” region. Therefore, for
each patch, an inner region and an outer region should be defined. In our case, all triangles will be
inserted into a single patch. After this patch has been created and initialized, the number of points and
triangles is set, i.e., the dynamic arrays points and triangles are resized appropriately.
Next, the point coordinates and the triangles are read. Each triangle is defined by the three points of
which it consists. The point indices start at one in the file but should start at zero in the HxSurface class.
Therefore, all indices are decremented by one. Once all triangles have been read, they are inserted into
the patch we have created before. The surface is now fully initialized and can be added to the Project
View by calling HxData::registerData.
The second part of the read routine is reading the data values. First, we check how many data fields
are defined and how many data variables each field has.
For each group of data variables, a corresponding surface field is created. The fields are temporarily
stored in the dynamic array fields. Instead of directly calling the constructor of the class HxSur-
Most of the options of the dataFile command have already been explained in the previous section.
However, in contrast to the PPM3D format, the Trimesh format cannot be identified by its file header.
Therefore, we use the -ext option to tell Avizo that all files with file name extensions trimesh or tm
should be opened using the Trimesh reader.
Reading Multiple Images At Once The Avizo file browser allows you to select multiple files at
once. Usually, all these files are opened one after the other by first determining the file format and then
calling the appropriate read routine. However, in some cases the data of a single Avizo data object
are distributed among multiple files. The most prominent example is 3D images where every slice is
stored in a separate 2D image file. In order to be able to create a full 3D image, the file names of all
the individual 2D images must be available to a read routine. To facilitate this, read routines in Avizo
can have two different signatures. Besides the ordinary form
int myreader(const char* filename);
The Load Command The current state of the Avizo project with all its data objects and modules can
be stored in a script file. When executed, the script should restore the Avizo project again. Of course,
this is a difficult task especially if data objects have been modified since they have been loaded from
files. However, even if this is not the case, Avizo must know how to reload the data later on.
For this purpose, a special parameter called LoadCmd should be defined for the data object. This pa-
rameter should contain a Tcl command sequence which restores the data object on execution. Usually,
the load command is simply set to load <filename> when calling HxData::registerData.
However, this approach fails if the format of the file cannot be detected automatically, or if multiple
data objects are created from a single file, e.g., as in our Trimesh example.
In such cases, the load command should be set manually. In case of the Trimesh reader, this could
be done by adding the following lines of code at the very end of the routine just before the method’s
returning point:
QString loadCmd = QString(
"set TMPIO [load -trimesh \"%1\"]\n"
"lindex $TMPIO 0")
.arg(filename);
surface->setLoadCmd(loadCmd, 1);
This code requires some explanation. The file is loaded and all data objects are created when the first
line of the load command is executed. Note that we specified the -trimesh option as an argument
of load. This ensures that the Trimesh reader will always be used. The format of the file to be loaded
will not be determined automatically. The Tcl command load returns a list with the names of all
data objects which have been created. This list is stored in the variable TMPIO. Later the names of
the individual objects can be obtained by extracting the corresponding elements from this list. This is
done using the Tcl command lindex.
Using Dialog Boxes in a Read Routine In some cases, a file cannot be read successfully unless
certain parameters are interactively specified by the user. Usually this means that a special-purpose
dialog must be popped up within the read routine. This is done, for example, when raw data are
read in Avizo. In order to write your own dialogs, you must use Qt, a platform-independent toolkit for
MYPACKAGE_API
int
writeppm3d(HxUniformScalarField3* field, const char* filename)
{
// For the moment we only want to support byte data
if (field->primType() != McPrimType::MC_UINT8)
{
theMsg->printf("This format only supports byte data.");
return 0; // indicate error
}
if (!f)
{
theMsg->ioError(toQString(filename));
return 0; // indicate error
// Write header:
fprintf(f, "# PPM3D\n");
At the beginning, the same header files are included as in the reader.
api.h provides import and export storage-class specifiers for Windows systems. These are encoded in
the macro MYPACKAGE API. On Unix systems, this macro is empty and can be omitted.
HxMessage.h provides the global pointer theMsg, which allows us to print out text messages in the
Avizo console window.
Finally, HxUniformScalarField3.h contains the declaration of the data class to be written to the file.
The signature of a write routine differs from that of a read routine. It takes two arguments, namely a
pointer to the data object to be written to a file, as well as the name of the file. Before a write routine
is called, Avizo always checks if the specified file already exists. If this is the case, the user is asked
if the existing file should be overwritten. Therefore, such a check need not to be coded again in each
write routine. Like a read routine, a write routine should return 1 on success, or 0 if an error occurred
and the data object could not be saved.
The body of the write routine is almost self-explanatory. At the beginning, a check is made whether
the 3D image really consists of byte data. In general, the type of data values of such an image can
be 8-bit bytes, 16-bit shorts, 32-bit integers, floats, or doubles. If the image does contain bytes, a file
is opened and the image contents are written into it. However, note that the data object also contains
information which cannot be stored using our simple PPM3D file format. First of all, this applies to
the bounding box of the image volume, i.e., the position of the center of the first and the last voxel in
world coordinates. Also, all parameters of the object (defined in the member variable parameters of
type HxParamBundle) will be lost if the image is written into a PPM3D file and read again.
Like a read routine, a write routine must be registered in the package resource file, i.e., in
mypackage/share/resources/mypackage.rc. This is done by the following statement:
The option -save specifies the name of the write routine. The option -type specifies the C++ class
name of the data objects which can be saved using this format. Note that an export format may be
registered for multiple C++ objects of different type. In this case, multiple -type options should be
specified. However, for each type there must be a separate write routine with a different signature
(polymorphism). For example, if we additionally want to register the PPM3D format for objects of
type HxStackedScalarField3, we must additionally implement the following routine:
int writeppm3d(HxStackedScalarField3* field, const char* fname);
Besides the standard data classes, there are so-called interface classes that may be specified with the
-type option. For example, in this way it is possible to implement a generic writer for n-component
regular 3D fields. Such data is encapsulated by the interface HxLattice3. For more information about
interfaces, refer to section 16.5.
At this point, you may try to compile and execute the write routine by following the instructions given
in subsection 16.1.5 (Compiling and Debugging).
#include "api.h"
#include <hxcore/HxMessage.h>
#include <hxsurface/HxSurface.h>
#include <hxsurface/HxSurfaceField.h>
static int
writetrimesh(HxSurface* surface,
McDArray<HxSurfaceField*> fields,
const char* filename)
{
FILE* f = fopen(filename, "w");
if (!f)
{
theMsg->ioError(toQString(filename));
return 0;
}
int i, j, k;
McDArray<McVec3f>& points = surface->points();
McDArray<Surface::Triangle>& triangles = surface->triangles();
fclose(f); // done
return 1;
}
MYPACKAGE_API
int
writetrimesh(HxSurface* surface, const char* filename)
{
// Temporary array of surface data fields
McDArray<HxSurfaceField*> fields;
MYPACKAGE_API
int
writetrimesh(HxSurfaceField* field, const char* filename)
{
// Check if data is defined on nodes
if (field->getEncoding() != HxSurfaceField::ON_NODES)
{
theMsg->printf("Data must be defined on nodes.");
return 0;
}
In the upper part of the code, first a static utility method is defined which takes three arguments: a
pointer to a surface, a dynamic array of pointers to surface fields, and a file name. This is the function
that actually writes the data to a file. Once you have understood the Trimesh reader presented in
subsection 16.3.2.2, it should be no problem to follow the writer code too.
In the lower part of the code, two write routines mentioned above are defined, one for surfaces and the
other one for surface fields. Since these routines are to be exported for external use, we need to apply
In order to compile and execute the write, please follow the instructions given in subsection 16.1.5
(Compiling and Debugging).
16.3.4 Use the AmiraMesh API to read and write files in Avizo data format
Besides many standard file formats, Avizo also provides its own native format called Avizo data format.
The Avizo data file format is very flexible. It can be used to save many different data objects including
image data, finite-element grids, and solution data defined on such grids. Among other features, it
supports ASCII or binary data encoding, data compression, and storage of arbitrary parameters. The
format itself is described in more detail in the reference section of the users guide. In this section,
we want to discuss how to save custom data objects in Avizo format. For this purpose, a special C++
utility class called AmiraMesh is provided. Using this class, reading and writing files in Avizo format
becomes very easy.
Below we will first provide an overview of the AmiraMesh API. After that, we present two simple
examples. In the first one, we show how colormaps are written in Avizo format. In the second one, we
show how such colormaps are read back again.
16.3.4.1 Overview
The AmiraMesh API consists of a single C++ class. This class is called AmiraMesh. It is defined
in the header file include/amiramesh/AmiraMesh.h located in the Avizo root directory. The
class is designed to completely represent the information stored in an Avizo file in memory. When
reading a file, first an instance of an AmiraMesh class is created. This instance can then be interpreted
and the data contained in it can be copied into a matching Avizo data object. Likewise, when writing
This method is called whenever the ContentType parameter matches the one for which the read method
is registered. The reader should create an Avizo data object from the contents of the AmiraMesh class.
The filename can be used to define the name of the resulting data object. In order to register an Avizo
read routine, a statement similar to the following one must be put into the package resource file:
AvizoFormat -ContentType "MyType" \
-load "readMyAvizoFile" \
-package "mypackage"
AmiraMesh m;
m.parameters = map->parameters;
m.parameters.set("MinMax", 2, minmax);
m.parameters.set("ContentType", "Colormap");
AmiraMesh::Location* loc =
new AmiraMesh::Location("Lattice", 1, &size);
m.insert(loc);
if ( !m.write(filename,1) ) {
theMsg->ioError(filename);
return 0;
}
setLoadCmd(filename);
return 1;
}
In the first part of the routine, a variable m of type AmiraMesh is defined. The parameters of the
colormap are copied into m. In addition, two more parameters are set. The first one, called MinMax,
describes the coordinate range of the colormap. The second one indicates the content type of the Avizo
data file. This parameter ensures that the colormap can be read back again by a matching Avizo data
read routine (see subsection 16.3.4.3).
Before the RGBA data values can be stored, a Location of the right size must be created and
inserted into the AmiraMesh class. Afterwards, an instance of a Data class is created and inserted.
The constructor of the Data class takes a pointer to the Location as an argument. Moreover, a
pointer to the RGBA data values is specified. Each RGBA tuple consists of four numbers of type float.
This statement indicates that the static member method readAmiraMesh of the class
HxColormap256 defined in package hxcolor should be called if the Avizo data file contains a
parameter ContentType equal to Colormap. The source code of the read routine looks as follows:
int
HxColormap256::readAmiraMesh(AmiraMesh* m, const char* filename)
{
int count = 0;
if (data->getLocation()->getNumberOfDimensions() != 1)
continue;
HxColormap256* colormap =
(HxColormap256*)HxResource::createObject("HxColormap256");
if (!colormap)
return 0;
colormap->resize(size);
colormap->parameters = m->parameters;
colormap->historyLog = m->historyLog;
switch (data->getPrimitiveType().getType())
{
case McPrimType::MC_UINT8:
{
unsigned char* src = (unsigned char*)data->getDataPtr();
for (int k = 0; k < size; k++, src += dim)
{
float a = (dim > 3) ? (src[3]) / 255.0: 1;
colormap->setRGBA(k,
src[0] / 255.,
src[1] / 255.,
src[2] / 255.,
a);
}
case McPrimType::MC_INT16:
{
short* src = (short*)data->getDataPtr();
for (int k = 0; k < size; k++, src += dim)
{
float a = (dim > 3) ? (src[3]) / 255.0: 1;
colormap->setRGBA(k,
src[0] / 255.,
src[1] / 255.,
src[2] / 255.,
a);
}
}
break;
case McPrimType::MC_UINT16:
{
unsigned short* src = (unsigned short*)data->getDataPtr();
for (int k = 0; k < size; k++, src += dim)
{
float a = (dim > 3) ? (src[3]) / 255.0: 1;
colormap->setRGBA(k,
src[0] / 255.,
src[1] / 255.,
src[2] / 255.,
a);
}
}
break;
case McPrimType::MC_INT32:
{
int* src = (int*)data->getDataPtr();
for (int k = 0; k < size; k++, src += dim)
{
float a = (dim > 3) ? (src[3]) / 255.0: 1;
colormap->setRGBA(k,
src[0] / 255.,
src[1] / 255.,
src[2] / 255.,
a);
}
}
break;
case McPrimType::MC_FLOAT:
{
float* src = (float*)data->getDataPtr();
for (int k = 0; k < size; k++, src += dim)
{
float a = (dim > 3) ? src[3]: 1;
colormap->setRGBA(k, src[0], src[1], src[2], a);
case McPrimType::MC_DOUBLE:
{
double* src = (double*)data->getDataPtr();
for (int k = 0; k < size; k++, src += dim)
{
float a = (dim > 3) ? src[3]: 1;
colormap->setRGBA(k, src[0], src[1], src[2], a);
}
}
break;
}
float minmax[2] = { 0, 1 };
m->parameters.findReal("MinMax", 2, minmax);
colormap->HxColormap::setMinMax(minmax[0], minmax[1]);
{
int localInterpolate;
if (m->parameters.findNum("Interpolate", localInterpolate))
{
colormap->setInterpolate(localInterpolate ? true: false);
}
QString outOfBoundsBehavior;
if (m->parameters.findString("OutOfBoundsBehavior", outOfBoundsBehavior))
{
// i.e = 0
OutOfBoundsBehavior behavior = HxColormap256::DEFAULT_CLAMP;
if (outOfBoundsBehavior.contains("CycleLeft"))
*(int*)&behavior |= CYCLE_BEFORE_MIN;
if (outOfBoundsBehavior.contains("CycleRight"))
*(int*)&behavior |= CYCLE_AFTER_MAX;
colormap->setOutOfBoundsBehavior(behavior);
}
int isLabelField;
if (m->parameters.findNum("LabelField", isLabelField))
{
colormap->setLabelField(isLabelField);
colormap->editMinMax.setMinMaxEnabled(!isLabelField);
}
}
// Set the default alpha curve if the file does not provide an alpha channel.
if (dim != 4)
{
colormap->setAlphaCurve(AC_SOFT_RAMP);
}
return count;
}
Compared to the write routine, the read routine is a little bit more complex since some consistency
checks are performed. First, the member dataList of the AmiraMesh structure is searched for a
one-dimensional array containing vectors of three or four elements of type byte or float. This array
should contain the RGB or RGBA values of the colormap. If a matching Data structure is found, a
new instance of type HxColormap256 is created. The parameters are copied from the AmiraMesh
class into the new colormap. Afterwards, the actual color values are copied. Although the write routine
only exports RGBA tuples of type float, the read routine also supports byte data. For this reason, two
different cases are distinguished in a switch statement. If the file only contains 3-component data, the
opacity value of each colormap entry is set to 1. Finally, the coordinate range of the colormap is set by
evaluating the 2-component parameter MinMax, and the new colormap is added to the Project View by
calling HxData::registerData.
public:
// This virtual method will be called when the port changes.
virtual void compute();
#endif
#include <QApplication>
MyComputeThreshold1::MyComputeThreshold1()
: HxCompModule(HxUniformScalarField3::getClassTypeId())
, portRange(this,
"range",
QApplication::translate("MyComputeThreshold1", "Range"),
2) // we want to have two float fields
{
}
MyComputeThreshold1::˜MyComputeThreshold1()
{
}
void
// Now loop through the whole field and count the pixels.
int belowCnt = 0, aboveCnt = 0;
for (int k = 0; k < dims[2]; k++)
{
for (int j = 0; j < dims[1]; j++)
{
for (int i = 0; i < dims[0]; i++)
{
// This function returns the value at this specfic grid node.
// It implicitely casts the result to float if necessary.
float value = field->evalReg(i, j, k);
if (value < minValue)
belowCnt++;
else if (value > maxValue)
aboveCnt++;
}
}
}
Following the include statements and the obligatory HX INIT CLASS macro, the constructor is de-
fined. The usual C++ syntax must be used in order to call the constructors of the base class and the
class members. The constructor of the base class HxCompModule takes the class type of the input
data object to which this module can be connected. Avizo uses a special run-time type information
system that is independent of the rtti feature provided by ANSI C++ compilers.
The second method to define is the destructor.
The third method we have to implement is the compute method. We first retrieve a pointer to our
input data object through a member called portData. This port is inherited from the base class
This creates a new instance of type HxUniformScalarField3 with the same dimensions and the
same primitive data type as the input data object. Since the output has the same bounding box, i.e.,
the same voxel size as the input, we copy the bounding box. Note that this approach will only work
for fields with uniform coordinates. For other regular coordinate types, such as stacked or curvilinear
coordinates, we refer to subsection 16.5.2.
After the output object has been created, its voxel values are not yet initialized. This is done in the
inner part of the nested for-loops. The method set, used for this purpose, automatically performs a
cast from float to the primitive data type of the output field. In summary, the inner part of the for-loop
now looks as follows:
if (value<minValue)
belowCnt++;
else if (value>maxValue)
aboveCnt++;
else newValue = value;
output->set(i,j,k,newValue);
Creating a new data object using the new operator will not automatically make it appear in the Project
View. Instead, we must explicitly register it. In a compute module, this can be done by calling the
method setResult:
setResult(output); // register result
This method adds a data object to the Project View, if it is not already present there. In addition, it
connects the object’s master port to the compute module itself. Like any other connection, this link
will be represented by a black line in the Project View. The master port of a data object may be
connected to a compute module or to an editor. Such a master connection indicates that the data object
is controlled by an ’upstream’ component, i.e., that its contents may be overridden by the object to
which it is connected.
Now that we have created an output object, let us address the progress bar. Although, for the test
data set chocolate-bar.am, our threshold operation does not take very long, it is good practice
to indicate that the application is busy when computations are performed that could take a long time
on large input data. Even better is to show a progress bar, which is not difficult. Before the time-
consuming part of the compute routine, i.e., before the nested for-loops, we add the following line:
We use the global instance theProgress of class HxApplication here. The corresponding
header file must be included at the beginning of the source file. The method turns the application
into the ‘busy’ state and displays a working message in the status line. As opposed to the method
startWorking, this variant does not activate the stop button. See subsection 16.7.2 for details.
When the computation is done, we must call
theProgress->stopWorking(); // stop progress bar
in order to switch off the ‘busy’ state again. Inside the nested for-loops, we update the progress bar
just before a new 2D slice is processed. This is done by the following line of code:
// Set progress bar, the argument ranges between 0 and 1.
theProgress->setProgressValue((float)(k+1)/dims[2]);
You may now test this second version of the compute module by loading the test
data set chocolate-bar.am from Avizo’s data/tutorials directory. Attach the
ComputeThreshold2 module from the Local category inside the data popup menu. Open the
Console window to watch results as you change the port range values. You can also see new output
objects created in the Project View on each change. To better appreciate the progress bar, try to resam-
ple the input data, for example to 512x512x100, and connect the compute module to the resampled
data set. However, be sure that you have enough main memory installed on your system.
The getResult method checks whether there is a data set whose master port is connected to the com-
pute module. This typically is the object set by a previous call to setResult. However, it also may
be any other object. Therefore, a run-time type check must be performed by calling the isOfType
member method of the output object. If the output object is not of type HxUniformScalarField3,
the variable output will be set to null. Then a check is made whether the output object has the same
dimensions and the same primitive data type as the input object. If this test fails, output will also
be set to null. At the end, a new result object will only be created if no result exists already or if the
existing result does not match the input. It is possible to interactively try different range values without
creating a bunch of new results.
However, when one of the numbers of the range port is changed, computation starts immediately.
Sometimes this may be desired, but in this case, we prefer to add an Apply button as present in many
other compute modules. The user must explicitly push this button in order to start computation. In
order to use the Apply button, the following line of code must be added in the public section of the
module’s header file:
// Start computation when this button is clicked.
HxPortDoIt portDoIt;
To achieve the desired behavior, we finally change our compute method so that it immediately returns
unless the Apply button was pressed. This can be done by adding the following piece of code at the
beginning of the compute method:
// Check whether doIt button was hit
if (!portDoIt.wasHit()) return;
With these changes, the module is already quite usable. Load the test data set chocolate-bar.am
from Avizo’s data/tutorials directory. Attach the ComputeThreshold3 module from the
#include <Inventor/nodes/SoSeparator.h>
public:
// Input parameter.
HxPortIntSlider portNumTriangles;
protected:
McHandle<SoSeparator> scene;
};
The header file can be understood quite easily. First, some other header files are included. Then the
new module is declared as a child class of HxModule. As usual, the macros MYPACKAGE API and
HX HEADER are mandatory,the last one including the definition of the default constructor and destruc-
tor. Our module implements a compute method. In addition, it has a port of type HxPortIntSlider
which allows the user to specify the number of triangles of the vertices to be displayed.
A pointer to the actual Open Inventor scene is stored in the member variable scene of type
McHandle<SoSeparator>. A McHandle is a so-called smart pointer. It can be used like an
ordinary C pointer. However, each time a value is assigned to it, the reference counter of the ref-
erenced object is automatically increased or decreased. This is done by calling the ref or unref
method of the object. If the reference counter becomes zero or less, the object is deleted automatically.
We recommend using smart pointers instead of C pointers because they are safer.
The actual implementation of the module is contained in the file MyDisplayVertices1.cpp.
This file looks as follows:
///////////////////////////////////////////////////////////////////////
//
// Example of a compute module (version 1)
//
///////////////////////////////////////////////////////////////////////
#include <QApplication>
#include <Inventor/nodes/SoCube.h>
#include <Inventor/nodes/SoTranslation.h>
HX_INIT_CLASS(MyDisplayVertices1, HxModule)
MyDisplayVertices1::MyDisplayVertices1()
: HxModule(HxSurface::getClassTypeId())
, portNumTriangles(this,
"numTriangles",
QApplication::translate("MyDisplayVertices1", "Num Triangles"))
{
portNumTriangles.setMinMax(1, 12);
portNumTriangles.setValue(6);
scene = new SoSeparator;
}
MyDisplayVertices1::˜MyDisplayVertices1()
{
hideGeom(scene);
}
void
if (!surface)
{ // Check if input object is available
hideGeom(scene);
return;
}
// Now create the scene graph. First remove all previous childs:
scene->removeAllChildren();
scene->addChild(trans);
scene->addChild(cube);
count++;
A lot of things are happening here. Let us point out some of these in more detail now. The constructor
initializes the base class with the type returned by HxSurface::getClassTypeId. This ensures
that the module can only be attached to data objects of type HxSurface. The constructor also ini-
tializes the member variable portNumTriangles. The range of the slider is set from 1 to 12. The
initial value is set to 6. Finally, a new Open Inventor separator node is created and stored in scene.
The destructor contains only one call, hideGeom(scene). This causes the Open Inventor scene to
be removed from all viewers (provided it is visible). The scene itself is deleted automatically when the
destructor of McHandle is called.
The actual computation is performed in the compute method. The method returns immediately if no
input surface is present. If an input surface exists, the numbers of triangles per point are counted. For
this purpose, a dynamic array triCount is defined. The array provides a counter for each vertex.
Initially it is filled with zeros. The counters are increased in a loop over the vertices of all triangles.
In the second part of the compute method, the Open Inventor scene graph is created. First, all pre-
vious children of scene are removed. Then the length of the diagonal of the input surface is deter-
mined. The size of the cubes will be set proportional to this length. For convenience, the pointer
to the coordinates of the surface is stored in a local variable p. Actually, the coordinates are of
type McVec3<float>. However, this class is fully compatible with the Open Inventor vector class
SbVec3f. Therefore, the pointer to the coordinates can be cast as shown in the code.
After everything has been set up, every element of the array triCount is checked in a for-loop. If
the value of an element matches the selected number of triangles per vertex, two new Inventor nodes
of type SoTranslation and SoCube are created, initialized, and inserted into scene. Since the
SoTranslation also affects all subsequent translation nodes, we must remember the position of
the last point in q and subtract this position from the one of the current point. Alternatively, we could
have encapsulated the SoTranslation and the SoCube in an additional SoSeparator node.
However, this would have resulted in a more complex scene graph. At the very end of the compute
method, the new scene graph is made visible in the viewer by calling showGeom. This method
automatically checks if a node has already been visible. Therefore, it may be called multiple times
with the same argument.
The module is registered in the usual way in the package resource file, i.e., in
mypackage/share/resource/mypackage.rc. Once you have compiled the example
package, you may test the module by loading the surface mypackage/data/test.surf located
in the local Avizo directory. Attach the module DisplayVertices1 from the Local category inside the
popup menu of the data.
Of course, we must also include the header file of the class HxPortColormap. This file is located
in package hxcolor. Note that the order in which ports are displayed on the screen depends on
the order in which the ports are declared in the header file. If we declare portColormap before
portNumTriangles, the colormap port will be displayed before the integer slider.
In the compute method of our module, we add the following piece of code just after the previous
children of the scene graph have been removed:
SoMaterial* material = new SoMaterial;
material->diffuseColor =
portColormap.getColor(numTriPerVertex);
scene->addChild(material);
With these lines, we insert a material node right before all the translation and cube nodes into the sep-
arator. The material node causes the cubes to be displayed in a certain color. We call the getColor
method of the colormap port in order to determine this color. If the port is not connected to a colormap,
this method simply returns the default color. However, if it is connected, the color is taken from the
colormap. As an argument, we specify numTriPerVertex, the number of triangles of the selected
vertices. Depending on the value of portNumTriangles, the cubes, therefore, will be displayed in
different colors. Of course, this requires that the range of the colormap extend from something like 1
to 10 or 12.
Besides the colormap port, we also want to add a Tcl command interface to our module. This is done
by overloading the virtual method parse of HxModule. We, therefore, insert the following line into
the module’s class declaration:
virtual int parse(Tcl_Interp* t, int argc, char **argv);
In a parse method, special commands can be defined which allow us to control the module in a more
sophisticated way. A typical application is to set special parameters which should not be represented
by a separate port in the user interface. As an example, we want to provide a method which allows
us to change the size of the cubes. In the initial version of the module, the cubes were adjusted so
if (cmdCheck(cmd, "setScale"))
{
ASSERTARG(3);
scale = atof(argv[2]);
fire();
}
else if (cmdCheck(cmd, "getScale"))
{
Tcl_VaSetResult(t, "%g", scale);
}
else
return HxModule::parse(t, argc, argv);
return TCL_OK;
}
Commands are defined in a sequence of if-else statements. For each command, the method cmdCheck
should be used. At the end of the if-else sequence the parse method of the base class should be called.
Note that after a command is issued, the compute method of the module will not be called automati-
cally by default. This is in contrast to interactive changes of ports. However, we may explicitly call
fire in a command like shown above. In this case, the size of the cubes then will be adjusted imme-
diately. You may test the parse method by loading the file mypackage/data/test.surf, attach-
ing DisplayVertices2 to it, and then typing something like DisplayVertices2 setScale
0.03 into the Avizo console window.
The new radio box port lets the user switch between the two display modes. Like the compute method,
the update method takes no argument and also has no return value.
If you look into the source code file MyDisplayVertices3.cpp, you will notice that the radio
box port is initialized in the constructor of the module and that the text labels are set properly. The
update method itself is quite simple:
void
MyDisplayVertices3::update()
{
if (portMode.getValue() == 0)
portNumTriangles.show();
else
portNumTriangles.hide();
}
The slider portNumTriangles is shown or hidden depending on the value of the radio box port.
Note that before the update method is called, all ports are marked to be shown. Therefore, you must
hide them every time update is called. For example, the show and hide calls should not be encap-
sulated by an if statement which checks if some input port is new.
In order to support the new all-vertices display style, we slightly modify the way the Open Inventor
scene graph is created. Instead of a single SoMaterial node, we insert a new one whenever the
color of a cube needs to be changed, i.e., whenever the number of triangles of a vertex differs from the
previous one. The new for-loop looks as follows:
int lastNumTriPerVertex = -1;
int allVertices = portMode.getValue();
count++;
q = p[i];
}
}
Again, you can test the module by loading the file mypackage/data/test.surf and attaching
DisplayVertices3 to it. If you connect the physics.icol colormap to the colormap port, adjust the
colormap range to 1...9, and select the all-vertices display style, you should get an image similar to the
one shown in Figure 16.11.
Figure 16.11: The example module DisplayVertices3 displays little cubes at the vertices of a surface. The cubes are colored
according to the number of neighboring triangles.
public:
// Shows the plot window.
HxPortButtonList portAction;
protected:
McHandle<PzEasyPlot> plot;
};
#endif
The class declaration is very simple. The module is derived directly from HxModule. It provides a
compute method and a port of type HxPortButtonList. In fact, we will only use a single push
button in order to let the user pop up the plot window. The plot window class PzEasyPlot itself
is referenced by a smart pointer, i.e., by a variable of type McHandle<PzEasyPlot>. We have
already used smart pointers in subsection 16.4.2.1, for details see there.
Now let us take a look at the source file MyPlotAreaPerSlice.cpp:
///////////////////////////////////////////////////////////////////////
//
// Example of a plot module (source code)
//
HX_INIT_CLASS(MyPlotAreaPerSlice, HxModule)
MyPlotAreaPerSlice::MyPlotAreaPerSlice()
: HxModule(HxLabelLattice3::getClassTypeId())
, portAction(this,
"action",
QApplication::translate("MyPlotAreaPerSlice", "Action"),
1)
{
portAction.setLabel(0,
QApplication::translate("MyPlotAreaPerSlice", "Show Plot"));
plot = new PzEasyPlot("Area per slice");
plot->autoUpdate(0);
}
MyPlotAreaPerSlice::˜MyPlotAreaPerSlice()
{
}
void
MyPlotAreaPerSlice::compute()
{
HxLabelLattice3* lattice =
(HxLabelLattice3*)portData.getSource(HxLabelLattice3::getClassTypeId());
int i, k, n;
const McDim3l& dims = lattice->getDims();
unsigned char* data = lattice->getLabels<unsigned char>();
int nMaterials = lattice->materials()->getNumberOfBundles();
In the constructor, the base class HxModule is initialized with the class type ID of the class
HxLabelLattice3. This class is not a data class derived from HxData but a so-called interface.
Interfaces are used to provide a common API for objects not directly related by inheritance. In our case,
MyPlotAreaPerSlice can be connected to any data object providing a HxLabelLattice3 in-
terface. This might be a HxUniformLabelField3 but also a HxStackedLabelField3 or
something else.
Also in the constructor, a new plot window of type PzEasyPlot is created and stored in plot. Then
the method plot->autoUpdate(0) is called. This means that we must explicitly call the update
method of PzEasyPlot after the contents of the plot window are changed. Auto-update should be
disabled when more than one curve is being changed at once.
As usual, the actual work is performed by the compute method. First, we retrieve a pointer to the label
lattice. Since we want to use an interface instead of a data object itself, we must specify the class type
ID of the interface as an argument of the source method of portData. Otherwise, we would get a
pointer to the object providing the interface, but we can’t be sure about the type of this object.
The method returns if no label lattice is present or if the plot window is not visible and the show button
has not been pressed. Otherwise, the contents of the plot window are recomputed from scratch. For
this purpose, a dynamic array of arrays called count is defined. The array provides a counter for each
If you are not satisfied with the size of the plot window and you don’t want to change it using the
mouse every time, just call setSize right after creating the plot window:
plot->setSize(width, height);
As you would expect, the methods getMinMax, getAxisLabel and getSize are also available
with the same parameter list as their set counterparts.
Finally, it is also possible to have a legend or a grid in the plot. In this case, more arguments must be
specified in the constructor of PzEasyPlot:
int withLegend = 1;
int withGrid = 0;
plot = new PzEasyPlot("Area per slice",
withLegend, withGrid);
Like the axis, the legend and the grid are internally represented by separate objects of type
PzLegend and PzGrid. You can access these objects by calling the methods getTheLegend
and getTheGrid. Details about the member methods of these objects are listed in the class refer-
ence documentation.
16.4.4.1.1 CPU part Like most other modules, our compute module consists of a header file con-
taining the class declaration as well as a source file containing the actual code (or the class definition).
Let us look at the header file GaussianFilterCudaC.h first:
/////////////////////////////////////////////////////////////////
//
// Example of a convolution filter in CUDA C
//
/////////////////////////////////////////////////////////////////
#ifndef GAUSSIANFILTERCUDAC_H
#define GAUSSIANFILTERCUDAC_H
#include <hxcore/HxCompModule.h>
#include <hxcore/HxPortDoIt.h>
#include "api.h"
public:
// To have a Apply button
virtual void compute();
#endif // GAUSSIANFILTERCUDAC_H
As usual in C++ code, the file starts with a define statement that prevents the contents of the file from
being included multiple times. Then two header files are included. HxCompModule.h contains the
definition of the base class of our compute module. The other file, HxPortDoIt.h, allows the use
of the Apply button.
The package header file api.h is included. This file provides import and export storage-class speci-
fiers for Windows systems. These are encoded in the macro GAUSSIANFILTERCUDAC API. A class
declared without this macro will not be accessible from outside the DLL in which it is defined. On
Unix systems, the macro is empty and can be omitted.
The applyFilter function is declared with the extern "C" qualifier. This function is defined in
the Convolve2DCudaC.cu file and will be explained in the GPU section.
In the rest of the header file, the only tasks that remain are to derive a new class from HxCompModule
and define one member function, namely the overloaded virtual method called compute. The
compute method is called when the module has been created and whenever a change of state oc-
curs on one of the module’s input data objects or ports.
The corresponding source file looks like this:
/////////////////////////////////////////////////////////////////
//
// Example of a convolution filter in CUDA C
//
/////////////////////////////////////////////////////////////////
#include <QApplication>
#include <hxcore/HxApplication.h>
#include <hxcore/HxMessage.h>
#include "CudaCUtils.h"
#include "GaussianFilterCudaC.h"
HX_INIT_CLASS(GaussianFilterCudaC, HxCompModule)
GaussianFilterCudaC::GaussianFilterCudaC()
: HxCompModule(HxUniformScalarField3::getClassTypeId())
, portAction(this,
"action",
QApplication::translate("GaussianFilterCudaC", "Action"))
{
portAction.setLabel(0, QApplication::translate("GaussianFilterCudaC", "DoIt"));
}
GaussianFilterCudaC::˜GaussianFilterCudaC()
{
}
void
GaussianFilterCudaC::compute()
{
// Check whether Apply button was hit
if (!portAction.wasHit())
return;
// Register result
setResult(output);
}
Following the include statements, there is the required HX INIT CLASS macro for class initialization.
Next is the constructor definition which calls the constructor of the base class. There are no special
macros for this, so the usual C++ syntax is used to call the base class constructor and to initialize the
class members. The constructor of the base class HxCompModule takes the class type of the input
data object to which this module can be connected.
16.4.4.1.2 GPU part In GPU programming, it is important to know where a variable is located
in memory (specifically, which section of memory). To make it easier to keep track of this, variable
names are prefixed in the CUDA file with an identifier indicating their memory location:
• h if the variable is in host memory
• d if the variable is in device global memory
• c if the variable is in device constant memory
• s if the variable is in device shared memory
The CUDA file Convolve2DCudaC.cu is the following:
// In constant memory
__constant__ float c_filter[9]; // Convolution filter
__constant__ int c_dims[3]; // Size of data volume
// In shared memory
__shared__ unsigned char s_imageBlock[BLOCK_SIZE + 2][BLOCK_SIZE + 2];
int imageBlockSize = BLOCK_SIZE + 2 * BORDER_SIZE;
// Fill in imageBlock
// Main data
s_imageBlock[iBlock][jBlock] =
getValueDrv(i + threadIdx.x, j + threadIdx.y, d_slice );
if ( iBlock == 1 )
{
// Left border
s_imageBlock[0][jBlock] =
getValueDrv( blockIdx.x * blockDim.x - 1, j + threadIdx.y, d_slice );
s_imageBlock[0][jBlock - 1] =
getValueDrv( blockIdx.x * blockDim.x - 1, j + threadIdx.y - 1, d_slice );
}
else if ( iBlock == BLOCK_SIZE )
{
// Right border
s_imageBlock[imageBlockSize - 1][jBlock] =
getValueDrv( blockIdx.x * blockDim.x + imageBlockSize - 1,
j + threadIdx.y,
d_slice );
s_imageBlock[imageBlockSize - 1][jBlock + 1] =
getValueDrv( blockIdx.x * blockDim.x + imageBlockSize - 1,
j + threadIdx.y + 1,
d_slice );
}
if ( jBlock == 1 )
{
// Top border
s_imageBlock[iBlock][0] =
getValueDrv( i + threadIdx.x, j - 1, d_slice );
s_imageBlock[iBlock + 1][0] =
getValueDrv( i + threadIdx.x + 1, j - 1, d_slice );
This file begins with a definition of two global variables: BLOCK SIZE will be used to size the grid
and blocks and BORDER SIZE. Then, two variables are declared with the constant qualifier,
and they will be placed in constant memory. A variable in constant memory must be initialized by the
CPU and it is visible from all threads in read-only. The c filter will contain the convolution filter
and the c dims variable the size of data volume.
Following these declarations, the convolution product is defined in the convolve2D function. This
is a device function, i.e., it must be called from GPU and it is executed on the device. This
function computes the 2D convolution product at the point (i, j) with a 3 ∗ 3 filter.
The getValue function returns the voxel’s value (i, j) of a buffer.
The applyFilterKernel function is called for each voxel. It is defined using the global
qualifier. This means that the function is called from the host and executed on the device. It is a kernel
function, so it must have the void return type.
The initial 3D image is divided in several blocks of size BLOCK SIZE * BLOCK SIZE. Three in-
dexes i, j and k are declared to repair the top left corner of the current slice in d src and to define
d slice.
The s imageBlock buffer is created and placed in shared memory. Then this buffer is filled
in and represents a part of the initial image. The size of this buffer is (BLOCK SIZE + 2) *
(BLOCK SIZE + 2) in order to correctly treat the borders (1 size border around the image because
the convolution filter is a 3 ∗ 3 filter).
The two indexes iBlock and jBlock allow filling in the s imageBlock buffer.
Before using s imageBlock for calculation, we must be sure that this buffer is full, so we use the
syncthreads() function. This function acts as a barrier at which all threads in the block must
wait before any is allowed to proceed. After this, each thread computes one convolution product using
imageBlock.
The last function in this file is the applyFilter function which handles the interaction between the
CPU and GPU.
In order to manage CUDA errors, we first call the cudaGetLastError function which returns the
last error that has been produced by any of the runtime calls in the same host thread and resets it to
CUDA SUCCESS. Several pointers are declared in order to be allocated in GPU memory. They are
allocated in global memory using the cudaMalloc function. The cudaMemcpy function is used
to initialized the d src buffer from host memory. The direction of the transfer is indicated by the
16.5.1 Introduction
A profound knowledge of the Avizo data objects is essential to developers. Data objects occur as
input of write routines and almost all modules, and as output of read routines and compute modules.
In the previous sections, we already encountered several examples of Avizo data objects such as 3D
image data (represented by the class HxUniformScalarField3), triangular surfaces (represented
by the class HxSurface), or colormaps (represented by the class HxColormap). Like modules,
data objects are instances of C++ classes. All data objects are derived from the common base class
HxData. Data objects are represented by green icons in Avizo’s Project View.
In the following, let us first present an overview of the hierarchy of data classes. Afterwards, we will
discuss some of the general concepts behind it.
Note that you can find an in-depth description of every class in the online reference documen-
tation: share/devrefAvizo/Avizo.chm or share/devrefAvizo/index.html in the
Avizo root directory. The reference documentation not only covers data objects, but all classes pro-
vided with Avizo XPand Extension. As you already know, these classes are arranged in packages. For
example, all data classes derived from HxField3 are located in package hxfield, and all classes
Accessing the Data To learn what kind of methods are provided by the lattice class, please refer
to the online reference documentation or directly inspect the header file HxLattice3.h located in
package hxfield. At this point, we just present a short example which shows how the dimensionality
of the lattice, the number of data components, and the primitive data type can be queried. The primitive
switch (lattice.primType()) {
case McPrimType::mc_uint8: {
unsigned char* data = (unsigned char*) lattice.dataPtr();
unsigned char max = data[0];
for (int k=0; k<dims[2]; k++)
for (int j=0; j<dims[1]; j++)
for (int i=0; i<dims[0]; i++)
for (int n=0; n<nDataVar; n++) {
int idx =
nDataVar*((k*dims[1]+j)*dims[0]+i)+n;
if (data[idx]>max)
max = data[idx];
}
theMsg->printf("Max value is %d", max);
} break;
case McPrimType::mc_int16: {
short* data = (short*) lattice.dataPtr();
short max = data[0];
for (int k=0; k<dims[2]; k++)
for (int j=0; j<dims[1]; j++)
for (int i=0; i<dims[0]; i++)
for (int n=0; n<nDataVar; n++) {
int idx =
nDataVar*((k*dims[1]+j)*dims[0]+i)+n;
if (data[idx]>max)
max = data[idx];
}
theMsg->printf("Max value is %d", max);
} break;
As a tip, note that the processing of different primitive data types can often be simplified by defining
appropriate template functions locally. In the case of our example, such a template function may look
like this:
template<class T>
void getmax(T* data, const int* dims, int nDataVar)
{
T max = data[0];
for (int k=0; k<dims[2]; k++)
for (int j=0; j<dims[1]; j++)
for (int i=0; i<dims[0]; i++)
for (int n=0; n<nDataVar; n++) {
int idx =
nDataVar*((k*dims[1]+j)*dims[0]+i)+n;
if (data[idx]>max)
max = data[idx];
}
theMsg->printf("Max value is %d", max);
}
Using this template function, the above switch statement looks as follows:
switch (lattice.primType()) {
case McPrimType::mc_uint8:
getmax((unsigned char*)lattice.dataPtr(),dims,nDataVar);
break;
case McPrimType::mc_int16:
getmax((short*)lattice.dataPtr(),dims,nDataVar);
break;
...
Though less efficient, another possibility for handling different primitive data types is to use one of the
methods eval, set, getData, or putData. These methods always involve a cast to float, if the
primitive data type of the field requires it.
Accessing the Lattice Interface Imagine you want to write a module which operates on any kind
of regular field, i.e., on objects of type HxRegScalarField3, HxRegVectorField3, and so
on. One way to achieve this would be to configure the input port of the module so that it can
be connected to all possible regular field input objects. This can be done by calling the method
portData.addType() in the module’s constructor multiple times with the required class type
IDs. In addition, all input types must be listed in the package resource file. This can be done by
specifying a blank-separated list of types as the argument of the -primary option of the module
Creating a Field From an Existing Lattice When working with lattices, we may want to deposit
a new lattice in the Project View, for example, as the result of a compute module. However, since
HxLattice3 is not an Avizo data class, this is not possible. Instead we must create a suitable field
object of which the lattice is a member. For this purpose, the class HxLattice3 provides a static
method create which creates a regular field and puts an existing lattice into it. If the lattice contains
one data component, a scalar field will be created; if it contains three components, a vector field will
be created, and so on. The resulting field may then be used as the result of a compute module. Note
that the lattice must not be deleted once it has been put into a field object. The concept is illustrated
by the following example:
HxLattice3* lattice = new HxLattice3(dims, nDataVar,
primType, otherLattice->coords()->duplicate());
...
if (coord->coordType() == c_rectilinear) {
HxRectilinearCoord3* rectcoord =
(HxRectilinearCoord3*) coord;
...
}
Uniform Coordinates Uniform coordinates are the simplest form of regular coordinates. All grid
cells are axis-aligned and of equal size. In order to compute the position of a particular grid node, it is
sufficient to know the number of cells in each direction as well as the bounding box of the grid.
Uniform coordinates are represented by the class HxUniformCoord3. This class provides a method
bbox which returns a pointer to an array of six floats describing the bounding box of the grid. The six
numbers represent the minimum x-value, the maximum x-value, the minimum y-value, the maximum
y-value, the minimum z-value, and the maximum z-value in that order. Note that the values refer to
grid nodes, i.e., to the corner of a grid cell or to the center of a voxel. In order to compute the width of
a voxel, you should use code like this:
const int* dims = uniformcoords->dims();
const float* bbox = uniformcoords->bbox();
float width = (dims[0]>1) ? (bbox[1]-bbox[0])/(dims[0]-1):0;
Stacked Coordinates Stacked coordinates are used to describe a stack of uniform 2D slices with
variable slice distance. They are represented by the class HxStackedCoord3. This class provides
a method bboxXY which returns a pointer to an array of four floats describing the bounding box of a
2D slice. In addition, the method coordZ returns a pointer to an array containing the z-coordinate of
each 2D slice.
Rectilinear Coordinates Same as for uniform or stacked coordinates, in the case of rectilinear co-
ordinates the grid cells are aligned to the axes, but the grid spacing may vary from cell to cell in each
direction. Rectilinear coordinates are represented by the class HxRectilinearCoord3. This class
provides three methods, coordX, coordY, and coordZ, returning pointers to the arrays of x-, y-,
and z-coordinates, respectively.
Curvilinear Coordinates In the case of curvilinear coordinates, the position of each grid node is
stored explicitly as a 3D vector of floats. A single grid cell need not to be axis-aligned anymore. An
example of a 2D curvilinear grid is shown in Figure 16.13.
Curvilinear coordinates are represented by the class HxCurvilinearCoord3. This class provides
a method pos which can be used to query the position of a grid node indicated by an index triple (i,j,k).
Alternatively, a pointer to the coordinate values may be obtained by calling the method coords. The
coordinate vectors are stored one after another without padding and with index i running fastest. Here
is an example:
const int* dims = curvilinearcoords->dims();
The three arrays, points, tetras, and materialIds, must be provided by the ’user’. The
triangles of the grid are stored in an additional array called triangles. This array can be constructed
automatically by calling the member method createTriangles2. This method computes the
triangles from scratch and sets the triangle indices of all tetrahedra defined in tetras.
The triangles array also provides a way for accessing neighboring tetrahedra. Among other in-
formation (see reference documentation) stored for each triangle, the indices of the two tetrahedra it
belongs to are available. In the case of boundary triangles, one of these indices is -1. Therefore, in
order to get the index of a neighboring tetrahedron you can use the following code:
// Find tetra adjacent to tetra n at face 0:
int triangle = grid->tetras[n].triangles[0];
otherTetra = grid->triangles[triangle].tetras[0];
if (otherTetra == n)
otherTetra = grid->triangles[triangle].tetras[1];
if (otherTetra == -1) {
// No neighboring tetra, boundary face
...
}
Note that it is possible to define a grid with duplicated vertices, i.e., with vertices having exactly the
same coordinates. This is useful to represent discontinuous data fields. The method createTriangles2
checks for such duplicated nodes and correctly creates a single triangle between two geometrically
adjacent tetrahedra, even if these tetrahedra refer to duplicated points.
Optionally, the edges of a grid can be computed in addition to its points triangles, and tetrahe-
dra by calling createEdges. The edges are stored in an array called edges and another array
edgesPerTetra is used in order to store the indices of the six edges of a tetrahedron.
Moreover, the class Tetra Grid provides additional optional arrays, for example to store a dynamic list
of the indices of all tetrahedra adjacent to a particular point (tetrasPerPoint). This and other
information is primarily used for internal purposes, for example to facilitate editing and smoothing of
tetrahedral grids.
Data on tetrahedral grids must always be of type float. The data values may be stored in three
different ways, indicated by the encoding type as defined in HxTetraData:
• PER TETRA: One data vector is stored for each tetrahedron. The data are assumed to be constant
inside the tetrahedron.
• PER VERTEX: One data vector is stored for each vertex of the grid. The data are interpolated
linearly inside a tetrahedron.
• PER TETRA VERTEX: Four separate data vectors are stored for each tetrahedron. The data are
also interpolated linearly.
• PER VERTEX AND EDGE: One data vector is stored for each vertex and edge of the grid.
This last encoding scheme is useful for modeling discontinuous fields. In order to evaluate a field at an
arbitrary location in a transparent way, Avizo’s procedural data interface should be used. This interface
is described in subsection 16.5.6.1.
Like HxLattice3, the class HxTetraData provides a static method create which can be used
to create a matching data field, e.g., an object of type HxTetraScalarField3, from an existing
instance of HxTetraData. The HxTetraData object will not be copied but will be directly put
into the field object. Therefore, it may not be deleted afterwards. Also see subsection 16.5.2.1.
The three arrays, points, hexas, and materialIds, must be provided by the user. The faces of
the grid are stored in an additional array called faces. This array can be constructed automatically
by calling the member method createFaces. This method computes the faces from scratch and
sets the face indices of all hexahedra defined in hexas.
Note that, in contrast to tetrahedral grids, in a hexahedral grid degenerate cells are allowed, i.e., cells
where neighboring corners in a cell coincide. In this way, grids with mixed cell types can be defined.
The faces of a hexahedron are stored in a small dynamic array called faces. For a degenerate cell,
this array contains less than six faces.
Data on hexahedral grids must always be of type float. The data values may be stored in three
different ways, indicated by the encoding type defined in HxHexaData:
• PER HEXA: One data vector is stored for each hexahedron. The data are assumed to be constant
inside the hexahedron.
• PER VERTEX: One data vector is stored for each vertex of the grid. The data are interpolated
trilinearly inside a hexahedron.
• PER HEXA VERTEX: Eight separate data vectors are stored for each hexahedron. The data are
also interpolated trilinearly.
The last encoding scheme is useful for modeling discontinuous fields. In order to evaluate a field at an
arbitrary location in a transparent way, Avizo’s procedural data interface should be used. This interface
is described in subsection 16.5.6.1.
Like HxLattice3, the class HxHexaData provides a static method create which can be used
to create a matching data field, e.g., an object of type HxHexaScalarField3, from an existing
instance of HxHexaData. The HxHexaData object will not be copied but will be directly put into
the field object. Therefore, it may not be deleted afterwards. Also see subsection 16.5.2.1.
For the sake of efficiency, a slightly different interface is used in Avizo. Evaluating a field defined
on tetrahedral grid at an arbitrary location usually involves a global search to detect the tetrahedron,
which contains that point. The situation is similar for other grid types. In most algorithms, however,
the field is typically evaluated at points not far from each other, e.g., when integrating a field line.
To take advantage of this fact, the concept of an abstract Location class has been introduced. A
Location describes a point in 3D space. Depending on the underlying grid, Location may keep
track of additional information such as the current grid cell number. The Location class provides
First a location is created by calling the virtual method createLocation of the field to be evaluated.
The two methods, location->set(pos) and location->move(pos), both take an array of
three floats as argument, which describe a point in 3D space. The set method always performs a
global search in order to locate the point. In contrast, move first tries to locate the new point using a
local search strategy starting from the previous position. You should call move when the new position
differs only slightly from the previous one. Both set and move may return 0 in order to indicate that
the requested point could not be located, i.e., that it is not contained in any grid cell.
In order to locate the field at a particular location, field->eval( location, &value) is
called. The result is written to the variable pointed to by the second argument. Internally the eval
method does two things. First it interpolates the field values, for example, using the values at the
corners of the cell in which the current point is contained. Secondly, it converts the result to a float
value, if the field is represented internally by a different primitive data type.
Instead of this two-step approach, the two matrices could also be combined:
SbMatrix allInOne = matrixA;
allInOne.multRight(inverseMatrixB);
allInOne.multVecMatrix(origin,originB);
allInOne.multVecMatrix(origin,originB);
The class HxParamBundle provides several methods for looking up parameter values. All these
find-methods return 0 if the requested parameter could not be found. For example, in order to retrieve
the value of a one-component floating point parameter called Transparency, the following code may
be used:
float transparency = 0;
if (!material->findReal("Transparency",transparency))
theMsg->printf("Transparency not defined, using default");
In order to add a new parameter or to overwrite the value of an existing one, you may use one of several
different set-methods, for example:
material->set("Transparency",transparency);
Many modules check whether a color is associated with a particular ’material’ in the material list of
a data object. If this is not the case, the color or some other value is looked up in the global material
database Avizo provides. This database is represented by the class HxMatDatabase defined in
\begin{hxmodule}{MyModule}
This command indicates the begin of a description file. MyModule
is the module name.
\begin{hxdescription}
This block contains a general module description.
\begin{hxconnections}
\hxlabel{MyModule_data}
This command sets a label such that this
connection can be referenced in the documentation.
\hxport{Data}{\tt [required]}\\
Here the required master connection is described.
\end{hxconnections}
\begin{hxports}
The module ports are listed here.
\end{hxports}
\end{hxmodule}
Formulas can be included by means of the text processor LaTeX. They must be written in the Latex
syntax. This requires that LaTeX and Ghostscript be installed on the user’s system. The following
environment variables need to be set:
• DOC2HTML LATEX points to the LaTeX executable
• DOC2HTML DVIPS points to the dvi to PostScript converter (dvips)
• DOC2HTML GS points to Ghostscript
Miscellaneous 899
like an ordinary float slider but it provides many additional features. The most prominent one is the
possibility to auto-animate the slider. In addition, HxPortTime can be connected to a global time object
of type Time. In this way, multiple time-dependent modules can be synchronized. In order to create
a global Time object, select Animations And Scripts / Time from the main window’s Project >Create
Object... menu.
Another feature of HxPortTime is that the class is also an interface, i.e., it is derived from HxInterface
(compare subsection 16.5.1.2). In this way, it is possible to write modules which can be connected to
any object containing an instance of HxPortTime. An example is the Display Time module. In order
to access the time port of a source object, the following C++ dynamic cast construct should be used:
HxPortTime* time = dynamic_cast<HxPortTime*>(
portData.source(HxPortTime::getClassTypeid()));
In the previous section, we discussed how time-dependent data could be imported using special-
purpose control modules. Another alternative is to derive a time-dependent data object from an existing
static one. An example of this is the class MyDynamicColormap contained in the example package of
Avizo XPand Extension. Looking at the header file src/mypackage/MyDynamicColormap.h
in the local Avizo directory, you notice that this class is essentially an ordinary colormap with an
additional time port. Here is the class declaration:
class MYPACKAGE_API MyDynamicColormap: public HxColormap
{
HX_HEADER(MyDynamicColormap);
public:
// Constructor.
MyDynamicColormap();
The implementation of the dynamic colormap is very simple too (see the file
MyDynamicColormap.cpp). First, in the constructor the time slider is initialized:
portTime.setMinMax(0,1);
portTime.setIncrement(0.1);
portTime.setDiscrete(0);
portTime.setRealTimeFactor(0.5*0.001);
The first line indicates that the slider should go from 0 to 1. The increment set in the next line defines
by what amount the time value should be changed if the backward or the forward button of the slider
is pressed. The next line unsets the discrete flag. If this flag is on, the slider value always would be
Miscellaneous 900
an integer multiple of the increment. Finally, the so-called real-time factor is set. Setting this factor
to a non-zero value implies that the slider is associated with physical time in animation mode. More
precisely, the number of microseconds elapsed since the last animation update is multiplied with the
real-time factor. Then the result is added to the current time value.
In order to see the module in action compile, the example package, start Avizo (use the -debug option
or the debug executable, if you compiled in debug mode), and choose Other / DynamicColormap
from the main window’s Project >Create Object... menu. Attach a Colormap Legend module to
the colormap and change the value of the colormap’s time slider. Animate the slider. The speed of
the animation can be adjusted by resetting the value of the real-time factor using the Tcl command
DynamicColormap time setRealTimeFactor.
Instead of using a member method of an Avizo object class, you can also register an arbitrary static
function using the method addTimeOutFunction of class HxController. The corresponding
remove method is called removeTimeOutFunction. For more information, see the reference
documentation of HxController.
The Avizo XPand Extension example package contains the module MyAnimateColormap which
makes use of the above time-out mechanism. The source code of the module again is quite easy to
understand. After compiling the example package, you can attach to module under the name DoAni-
mate to an existing colormap. The colormap then is modified and copied. After pressing the animate
toggle of the module, the output colormap is shifted automatically at regular intervals. Note that in
this example the fire method of the module is used as time-out method. fire invokes the modules
compute method and also updates all down-stream objects.
Miscellaneous 901
stance. A short summary of these global objects is presented here. For details, please refer to the
online reference documentation by looking at the file share/devrefAvizo/index.html or
share/devrefAvizo/Avizo.chm in the Avizo root directory.
HxMessage: This class corresponds to the Avizo console window in the lower right part of the screen.
There is only one global instance of this class, which can be accessed by theMsg. All text output
should go to this object. Text can be printed using the function theMsg->printf("...",...),
which supports common C-style printf syntax. HxMessage also provides static methods for pop-
ping up error and warning messages or simple question dialogs.
HxObjectPool: This class maintains the list of all currently existing data objects and modules. In
the graphical user interface, this area is called the Project View and contains the modules and data
objects icons. There is only one global instance of this class, which can be accessed by the pointer
theObjectPool.
HxProgressInterface: This class displays the ports of selected objects in the Properties Area and
provides the progress bar and busy-state functionality. Important functions are startWorking,
stopWorking, wasInterrupted as well as busy and notBusy. There is only one global
instance of this class, which can be accessed by the pointer theProgress.
HxFileDialog: This class represents the file browser used for loading and saving data. Normally the
developer does not need to use this class since the standard I/O mechanism is completely implemented
in the Avizo kernel. However, for special purpose modules, a separate file browser might be useful.
There is a global instance of this class, which can be accessed by the pointer theFileDialog.
HxResource: This class maintains the list of all registered file formats and modules as defined in the
package resource files. It also provides information about the Avizo root directory, the local Avizo
directory, the version number, and so on. Normally there is no need for the developer to use this class
directly. There is no instance of this class, since all its members are static.
HxViewer: This class represents an Avizo 3D viewer. There can be multiple instances which are
accessed via the method viewer of the global object theController. Normally you will not not
need to use this class. Instead, you should use the member functions showGeom and hideGeom
which every module and data object provides in order to display geometry.
HxController: This class controls all 3D viewers and Open Inventor geometry. In order to access a
viewer, you may use the following statement:
HxViewer* v0 = theController->viewer(0,0);
The first argument indicates the ID number of the viewer to be retrieved. In total, there may be up to
16 different viewers. The second argument specifies whether the viewer should be created or not if it
does not already exist.
HxColorEditor: Avizo’s color editor. Used, for example, to define the background color of the viewer.
In a standard module, you should use a port such as HxPortColorList or HxPortColorMap
instead of directly accessing the color editor. There is a global instance of this class, which can be
accessed by the pointer theColorEditor.
HxHTML: A window used to display HTML files. This class is used for Avizo’s online help. The
global instance used for displaying the online user’s guide and the online programmer’s guide can be
accessed by the pointer theBrowser.
HxMatDatabase: This class represents Avizo’s global data parameter and material database. The
Miscellaneous 902
database can be accessed by the global pointer theDatabase. Details about the material database
are discussed in subsection 16.5.6.3.
Note that this method requires that HxArbitraryCut or some of its parent classes implement the
Tcl command setPlane. Hints about implementing new Tcl commands are given in subsection
16.4.2.2.
Some remarks about how to generate the load command for data objects are given in subsection 16.3.2.
Figure 16.16: When loading this Avizo project, the Resample module recreates the chocolate-bar.Resampled data object on the
fly.
There is a special optimization for data objects created by computational modules. Avizo automatically
determines whether data objects which are created by other modules are not yet saved and asks the user
Miscellaneous 903
to do so, if necessary. Avizo proposes also two policies for saving projects: ”Minimize project size”
and ”Minimize project computation”. If the user selects ”Minimize project size” then the data objects
will not be saved at project saving and they will be computed at project loading, otherwise they will
be saved at project saving and they will not be computed at project loading. As an example, consider
the Avizo project in Figure 16.16. In this case, if the user selects ”Minimize project size” as policy,
the resample module can automatically recompute the chocolate-bar.Resampled data object
when the Avizo project is loaded. An algorithm must determine whether the compute module can
create the data object.
Determining whether a compute module can create a data object may be tricky. Typically, it must be
assured that in the time between the actual creation of the data object by the computational module and
the execution of the save Avizo project command, neither the parameters nor the input has changed,
and that the resulting data object had not been edited.
This behavior is completely handled by HxCompModule while the method
HxCompModule::setResult is used to register the output data object.
16.7.4 Troubleshooting
This section describes some frequently occurring problems and some general problem solving ap-
proaches related to Avizo development.
The section is divided into two parts: Problems which may occur when compiling a new package, and
problems which may occur when executing it.
Miscellaneous 904
If the resource file is present, the next step is to check whether it is really parsed. Add a line
echo "hello mypackage" to the resource file. Verify that the message appears in the Avizo
console when Avizo starts. If not, probably the Local Avizo directory is not set correctly. Reset it with
the Development Wizard in Avizo. Details are given in subsection 16.2.2
If the file is parsed, but the module still does not show up, the syntax of the rc file entry might be wrong
or you specified a wrong primary data type, so that the module will appear in the menu of a different
data class.
There is an entry in the popup menu, but the module is not created: Probably something is wrong
with the shared library (the .so or .dll file). In the Avizo console, type dso verbose 1 and try to
create the module again. You will see some error messages, indicating that either the dll is not found, or
that it cannot be loaded (and why) or that some symbol is missing. Check whether your building mode
(debug/optimize) and execution mode are the same. In particular, if you have compiled debug code
you must start Avizo using the -debug command line option or the debug executable (see subsection
16.1.5).
A read or write routine does not work: The procedure for such problems is the same. First check
whether the load function is registered. Then verify that your save-file format shows up in the file
format list when saving the corresponding data object. For a load method, right-click on a filename in
the load-file dialog. Choose format and check whether your format appears in the list. If that is the
case, you probably have a dll problem. Follow the steps above. If the library can be loaded, but the
symbol cannot be found, your method may have either a wrong signature (wrong argument types) or
on Windows you might have forgotten the <PACKAGE>_API macro. This macro indicates that the
routine should be exported by the DLL.
In general, if you have problems with unresolved and/or missing symbols, you should take a look
at the symbols in your library. On Unix, type nm lib/arch-*-Debug/libmypackage.so.
On Windows, type in Visual Studio command prompt: dumpbin /exports
bin/arch-*-Debug/mypackage.dll.
Miscellaneous 905
Chapter 17
The Avizo Metrology workroom is only available on a Windows platform, and the workroom allows
creating test plans consisting of set of measures on a part. Once a test plan has been created and
saved on a reference part, then test plan can be reapplied to any similar part to validate or reject the
part. Measures should be created according to specific orientations. The first step is to realign the
part according to a specific orientation since a part may be tilted during CT acquisition, for instance,
to optimize the beam path. Different tools are provided to define orientation, including directions
defined by created geometries on the part. Once an orientation (i.e., Local Coordinate System or
LCS) or multiple orientations have been defined and geometries have been created, you can create
measurements. A set of LCS, geometries, and measures can be saved as a test plan.
• Data selection
• Data visualization
• Geometries fitting
• Inherited Geometries
• Local Coordinate Systems (LCS) creation
• Measurements creation
• Test plans usage
If parameters are modified, you can recompute the surface or restore default values.
Where:
• ω0 [t] and ω1 [t] are respectively the probabilities of being in classes C0 and C1 .
• µ0 [t] and µ1 [t] are respectively the means of classes C0 and C1 .
The algorithm is the following:
1. Compute histogram and probabilities ω0 [t] and ω1 [t]
2. Define initial ω0 [0] and ω1 [0]
3. Go through all available thresholds t
• Update ωi and µi
2
• Compute σB [t]
2
4. Otsu threshold corresponds to σB [t] maximum
Note: Float data are not supported for this method. Modules Background Detection Correction and
Convert Image Type can be used to convert data type.
• Surface Color: To set color for surface view. This option also changes the color for isocontours
in 2D viewers.
• View Parameters: To set opacity for surface view and enable or disable the display of oblique
views background in 3D viewer
Geometry fitting relies on selecting points that support the geometry lying on the interface between
the part and the ”outside” of the part (e.g., air). Select these points by clicking in one of the four
To fit geometry on an area that is not visible or hidden in the volume, activate the clipping by clicking
in the lower right corner of each 2D viewer (see Figure 17.8). Clipping is done through a plane
in which orientation is defined by the view orientation of the 2D viewer in one of the following modes:
No clipping is applied.
The clipping direction is either the direction of the normal to the plane or its inverse, depending
on which one forms the largest angle with the camera direction.
The clipping direction is the opposite direction of the normal to the plane.
This toolbar contains all geometry-related tools. The different tools include:
• Advanced Parameters: Use Metrology Preferences to customize the fitting method.
• Pick Geometry: Pick any geometry in 3D viewer to select the corresponding geometry in the
geometries panel.
The fitting methods based on the Chebyshev algorithm required a minimum number of points per
geometry. For the 3D geometries, the points used to fit must represent 3D volume.
The previous formula is the sum of the squares of the vertical deviations R2 of a set of n data points.
R2 is minimized when the following equation is verified:
∂(R2 )
∂(ai ) =0
Here is an example of 2D Circle fitting using the Least Square algorithm (see Figure 17.11):
The goal is to find the two circles that minimize the distance d. The minimum zone circle is the mean
of the two circles.
Note: Unlike the Minimum Zone Inner Method (MZI) and the Minimum Zone Outer Method (MZO),
the center of the circumscribed shape is often different from the center of the inscribed shape.
The following table summarizes the different fitting methods and the geometries you can fit with them:
The first part lists all available geometries and their parts. Any item can be selected by clicking on it.
Once the selection allows creating an inherited geometry, the second part will be updated with the
following information:
• Selection summary. There, the selection can be quickly switched if selection order is relevant.
• Relevant parameters.
Then, one or more of the operation buttons of the third part is available. When you click on an operation
button, the application tries to perform the corresponding operation. If the operation succeeds, then
the resulting geometry is added to the list. Otherwise, an error message will pop up describing why
the operation failed. Once an operation has been performed, the selection is cleared and the process
can be performed again to create another inherited geometry.
The next section describes the available combinations for each operation.
17.4.3 Intersection
Using the Intersection operation, you can create the following geometries:
• Point
17.4.4 Composition
Using the Composition operation, you can create the following geometries:
• Line
• Composition of 2 points. The first selected point will be the line origin, the other one will
be its extremity.
• Composition of a point and a direction (vector).
• Plane
• Composition of 3 points. The first point will be the plane origin, the second one will
determine the width of the plane and the last one will determine its height.
• Composition of a point and 2 vectors. The point will be the plane origin. The first vector
will be used as the half-width vector of the plane and the second one as its half-height
vector.
Note: It is possible to quickly switch the selection in the selection summary part of the Inherited
Geometry Editor (see Figure 17.15) in all cases where selection order matters.
17.4.5 Projection
Using the Projection operation, it is possible to create the following geometries:
• Point
• Projection of a point on a line.
• Projection of a point on a plane.
• Line
• Projection of a line on a plane.
Multiple LCSs can be created with the different tools and a user can switch from one to another using
the LCS toolbar. This allows aligning measures according to different orientations of the part.
To become more familiar with the usage of the Metrology workroom, you can follow the step-by-step
Metrology tutorial.
Avizo allows for the creation of reports. This is performed through the Reporting Workroom (see
Figure 18.1). From this room, report templates can be loaded. A report template is an HTML page with
frames. The Reporting Workroom allows for the user to associate snapshot and statistical results to the
HTML template. This can be done automatically by assigning a particular snapshot or table generated
when running a recipe to a specific frame; or by dragging-and-dropping a snapshot generated through
the Avizo snapshot tool, or a table resulting from an analysis.
Any HTML editor can be used to create a template suitable for the Reporting Workroom of Avizo. The
page should consist of frames and static elements, such as text or images. Each frame containing the
class=”reportContentContainer” will be able to receive a snapshot or a table from an Avizo session.
The Reporting Workroom is not designed to be an HTML viewer, it is designed to load a template,
populate a template during the session, and save a report. A saved report in HTML can be viewed with
any browser or via PDF with any PDF reader. Default report template provided with Avizo is loaded
when switching to the Reporting Workroom. From there, this default report can be used or a new one
can be loaded (see Figure 18.2).
The Content panel of the Reporting Workroom is split in two sub-panels. The top one lists the available
snapshots that can be imported to the template and the bottom one lists the tables. There are two
ways of populating these sub-panels. The table sub-panel will be automatically populated when a
spreadsheet resulting from any analysis is produced, such as a Label Analysis module. For the snapshot
panel, snapshots can be interactively generated from the Avizo snapshot tool where the Reporting
Workroom can be selected as destination for the snapshot (see Figure 18.3).
926
Figure 18.3: The Avizo Snapshot Tool
927
Figure 18.4: Drag-and-Drop of Snapshots
The same way, tables resulting from analysis will be sent to the Reporting Workroom where they can be
dragged-and-dropped into a frame of the template. The second way is by using recipes. A recipe may
automatically produce snapshots and tables resulting from analysis. Each snapshot and table produced
by a recipe is sequentially identified and will populate the sub-panels in the same order when played.
Replaying a recipe will replace in the same order the snapshots and tables in the two sub-panels.
1. Load AVIZO ROOT/data/tutorials/spring loaded cam.am.
2. Switch to the Recipes Workroom.
3. Load the AVIZO ROOT/data/tutorials/recipes/porosity.hxrecipe.
4. Add a snapshot step between each step.
5. Play the recipe.
6. Switch to the Reporting Workroom. The snapshots and tables appear in the sub-panels. Note
that when loading a recipe, Avizo automatically detects the snapshots generated by the recipe,
and the snapshot sub-panel is automatically populated with empty snapshot placeholders. This
is not true for tables since the recipe must be played once for Avizo to determine which tables
are generated (see Figure 18.5).
928
Figure 18.5: Snapshots and Table from Recipe
7. Snapshots and tables can then be dragged-and-dropped to each frame of the template. Once this
association is complete, the snapshots and tables will be automatically updated in the template
each time the recipe is played. Once the association has been set, the template can be saved as a
new template. This new template can be reloaded in Avizo and will be populated automatically
each time the associated recipe is played (see Figure 18.6).
929
Figure 18.6: Report Example
8. To remove a snapshot or a spreadsheet from the report, select it and press Delete.
The report can then be saved as an HTML page or exported to PDF (see Figure 18.7).
If desired, the date format of the report can be customized. To change the format of the date, add the
attribute format in the date span.
<span class="reportingDate" format="dd/MM/yy hh:mm:ss"><CurrentDateAndTime></span>
The default format is yyyy/MM/dd hh:mm:ss, it is possible to change it using this formalism:
• For the day: d, 1 to 31; dd, 01 to 31; ddd, the abbreviated local day name (for example: Mon)
or dddd, the full local day name (for example: Monday)
930
• For the month: M, 1 to 12; MM, 01 to 12; MMM, the abbreviated local month name (for example:
Jan) or MMMM, the full local day name (for example: January)
• For the year: yy, the year as two digit number (00 to 99) or yyyy, the year as four digit number
(for example: 2017)
• For the hour: h, 0 to 23 (1 to 12 if AP display) or hh, 00 to 23 (01 to 12 if AP display)
• For the minute: m, 0 to 59 or mm, 00 to 59
• For the second: s, 0 to 59 or ss, 00 to 59
• For the millisecond: z, 0 to 59 or zz, 00 to 59
• For the AP display: AP, will display either AM or PM or ap, will display either am or pm
A report can be filled using an Avizo script. To create such a report, set a unique HTML tag in each
frame (accesskey="key").
To set a snapshot in a given frame, use the following command line:
931
Chapter 19
Avizo XPoreNetworkModeling
Extension User’s Guide
Avizo (Avizo Lite Edition license is not sufficient) and Avizo XPoreNetworkModeling Extension are
required to play the tutorial and unlock the features described in this chapter.
It allows for access to different statistics from a labeled and separated pore space. The statistics include
distribution of the following parameters:
• Pore volume
• Pore area
• Pore equivalent radius
• Pore center of gravity
• Pore coordination number (i.e., number of connected neighbors)
• Intersection percentage between pore network model and original pore space
• Throat area
• Throat equivalent radius
• Throat channel length
• Throat connection (i.e., Id of pore 1, Id of pore 2)
The extension also allows for pore network code reading from the Pore Network Node-Link DATA
FORMAT.
The general workflow for accessing statistics includes the following:
• Create a binary pore space from the grayscale data (see Segmentation Workroom)
• If connected porosity needs to be analyzed, unconnected pores can be removed with the Axis
Connectivity module
• Separate the pore space into a set of connected and labeled pores using the Separate Objects
module. The extension provides a mode optimized for arbitrary pore shapes (i.e., Skeleton
-Aggressive). Spherical pores can be well separated with the default mode (i.e., Chamfer -
conservative).
• Generate a pore network model via the Generate Pore Network Model to extract network code.
The generated pore network model (PNM) contains the network code and can be used with the His-
togram to plot the distribution of the different parameters. To learn more about the tools available in
the extension, refer to the following links:
• Pore Space Analysis Tutorial
• Generate Pore Network Model
• Pore Intersection
• Pore Network Model Filter
• Pore Network Model View
• Separate Objects
• Pore Network Node-Link
Note: It is also possible to visualize the model on top of the original data. Figure 19.1 is a setup
showing the labeled and separated pore space overlaid on top of the model and the model within the
grayscale data.
The properties of a PNM generated with the Generate Pore Network Model can optionally be provided
by the same module. The Generate Pore Network Model module will then also outputs:
• The absolute permeability of the material
933
• The tortuosity of the material
• The flow rate per second of the fluid passing through each throat
• The total flow rate per second used to calculate the absolute permeability
Figure 19.2: PNM Displayed with Throat Scale based on Flow Rate per Second
to the output of the Auto Thresholding module (i.e., for amount of total porosity), respectively.
This example reports 51% of connected porosity for a total porosity of 54%.
5. To visualize the connected porosity vs. unconnected porosity: attach a Subtract Image module to
the output of the Auto Thresholding module and to the output of the Axis Connectivity module.
This will create a label representing the unconnected porosity (floating void). Attach a Volume
Rendering to this data, and use the seismic colormap. This colormap will colorize in blue the
data at 0 (connected porosity) and in red the data at 1 (unconnected porosity) Set the opacity to
0.2: it allows better visualization of the solid phase. (see Figure 19.7).
6. Apply a Separate Objects module on the output of the Axis Connectivity module. Set the Marker
Extent port value to 2 and the Output Type port to connected object. In this example, we keep
the default method (Chamfer - Conservative) since the pores are mostly spherical (see Figure
19.8).
7. Display the result by creating another Volume Rendering module on the previous output (see
If you have experience generating the properties of the PNM as well, you can then visualize the
network with Throat Scale based on the FlowRatePerSec value for instance. The purpose is to
provide a view that highlights the ”main roads” of the fluid passing through the material (see
Figure 19.14).
Figure 19.14: Pore Network Model View based on Total Flow Rate
4. When displaying the PNM with a Pore Network Model View and displaying the spreadsheet at
the same time in the table view, it is possible to highlight the pores or the throats that are selected
in the table from the Pores table or the Throats table. Select pores in the table by left-clicking
on one or several lines (i.e., left click + hold on a line and move up or down the table without
releasing). The corresponding pores will be highlighted in red in the 3D view (see Figure 19.16).
5. The generated PNM can be used to plot the statistics of the pore space (see Figures 19.17 and
19.18).
6. It is possible to plot the pore size distribution of the sample, using the Distribution Analysis
module (i.e., equivalent radius vs. cumulated pore volume within a bin).
• Attach a Distribution Analysis module to the generated PNM.
• Set the parameters as shown in Figure 19.19 and click Apply.
• The distribution curve as shown in Figure 19.20 is displayed using a Plot SpreadSheet
module (see Figure 19.21). The plot shows that the majority of the pore space is filled by
big pores, but the predominant small pores have a radius around 0.15.
7. Filter the data to keep only pores with volume greater than 0.02. Create a Pore Network Model
Filter module on the generated PNM and then add Volume > 0.02 in the Filter port. You can
visualize the filtered network by changing the Data port of the Pore Network Model View and
setting it to the new network (see Figures 19.22 and 19.23).
8. Compute the intersection percentage of the pores for the filtered network. Create a Pore Inter-
section module on the last result and connect the result of the Separate Objects module to the
Binary Image port. The module will output a new pore network code, including an intersection
column that represents the percentage of intersection with the real pore space (see Figures 19.24
and 19.25).
The project data/tutorials/PNM/2-GeneratePNM.hx allows reproducing all the steps of the tutorial.
Note: Further pore space analysis can be done with the Sieve Analysis module (which allows
for the classification of pores based on statistics), or with the Avizo XLabSuite Extension to calculate
the actual absolute permability of the material. In the latter, the Avizo XLabSuite Extension provides
you a different method to compute the absolute permeability: it runs a full fluid simulation, whereas
the Generate Pore Network Model module uses a mathematical modelization and approximation.
About Bio-Formats
Bio-Formats is a popular Java library for handling life science image data
(http://www.openmicroscopy.org/site/products/bio-formats). The Bio-Formats integration enables
Avizo to read image and metadata from over 140 file formats. For a list of all supported file formats and
additional information, please visit: https://docs.openmicroscopy.org/bio-formats/5.8.2/supported-
formats.html. To facilitate data exchange between different software packages and organizations,
Bio-Formats converts data stored in proprietary file formats into an open standard called the OME
Data Model, in particularly the OME-TIFF file format.
Bio-Formats Metadata
Bio-Formats categorizes metadata in three tiers:
• Core metadata: This is information necessary to understand the basic structure of the images
including image dimension, number of focal planes, time points, channels, byte order, dimen-
sion order, color arrangement (i.e., RGB, indexed color or separate channels), and thumbnail
dimensions.
• Original metadata: This is information specific to a particular file format. These fields are
key/value pairs in the original format with no guarantee of cross-format naming consistency or
compatibility. The nomenclature often differs between formats since vendors are free to use
their own terminology.
• OME metadata: This is information from Core metadata and Original metadata converted by
Bio-Formats into the OME data model. Performing this conversion is the primary task of Bio-
Formats.
Bio-Formats Integration
The integration into Avizo then organizes the opened image and metadata into the native Avizo data
structure with its well-known parameter bundles. During this process, standard image information
(e.g., voxel size, matrix dimensions etc.) is assigned to the corresponding standard Avizo parameter
bundles. All metadata is stored in a dedicated Bio-Formats parameter bundle. The Bio-Formats
integration is able to open data as scalar-, color-, and multi-channel fields as well as tiled images and
time series.
The Bio-Formats library is seamlessly integrated into Avizo. Avizo prioritizes its own format
implementation over Bio-Formats, so if a file format is known by Avizo, the native Avizo reader is
used for performance reasons. Reading such a file with Bio-Formats requires opening it using the
Open Data As... file dialog box and selecting Bio-Formats as the preferred reader. Files that Avizo
does not have a native reader for are automatically loaded using Bio-Formats.
Is it also possible to directly convert large data sets that may not fit into the system memory to Avizo’s
LDA multi-resolution format. This direct conversion will create individual LDA files for each 3D
volume, e.g. a time series with 10 time steps will result into 10 LDA files loaded as a time series into
Avizo. This will allow visualization and sub-volume extraction for further processing from data that
is larger than the system memory. The conversion can be initiated using the Avizo’s LDA dialog that
opens if the data size exceeds a threshold specified in the Preferences Dialog, or using the Convert to
Large Data Format module.
Note: Currently, settings for multi-channel time series such as color map & range per channel cannot
be stored in Avizo project files.
Commands
Caution: Bio-Formats reader is part of a separate library. When you use the TCL command directly,
this will require you to use the following command to manually load the separate library:
dso open hxbioformatreader
The following TCL commands can be used to parametrize the Bio-Formats reader.
bioFormats read [-series <seriesId>] [-time <timeId>] [-channel
<channelId>] [-xmin <xmin> -xmax <xmax> -ymin <ymin> -ymax <ymax>
-zmin <zmin> -zmax <zmax>] [-filledRGB <status>] <fileName>
This command reads an image file <fileName> using an absolute or relative path.
• It is possible to read a specific series number using the -series option. If the -series
option is not defined, the default setting is to read all the series.
• It is possible to read a specific time step using the -time option. If the -time option is not
defined, the default setting is to read all the time steps.
• It is possible to read a specific channel number using the -channel option. If the
-channel option is not defined, the default setting is to read all channels.
• It is possible to read a specific volume using the bounding box parameters (in pixels)
-xmin, -xmax, -ymin, -ymax, -zmin and -zmax. If these optional parameters
945
are not defined, the default setting is to read the volume max of the file.
• It is possible to force to fill the RGB color channels using the -filledRGB option
(status=1: Force to fill, status=0: Do not fill). If the -filledRGB option is not
defined, the default setting is to do not fill RGB color channels if it is not necessary.
The command returns the labels of the data objects created in the Project View. Note: All the
metadata that Bio-Formats reader gets from the file are copied as parameters of the created object.
bioFormats canRead <fileName>
This command checks if the image file can be read.
The command returns the value 1 if the <fileName> can be read, otherwise 0.
bioFormats format <fileName>
This command asks Bio-Formats the file format of the <fileName>.
The command returns the format (as a string) detected by Bio-Formats.
bioFormats info [-series <seriesId>] <fileName>
This command reads the image file information (all the metadata Bio-Formats gets). It is possible
to get the metadata of a specific series number using the -series option. If the -series option is not
defined, the default setting is to get the metadata of all the series successively.
The command returns a list of key:value pairs available.
bioFormats getInfo [-series <seriesId>] -param <parameter>
<fileName>
This command gets the information of the <parameter> for the <seriesId> image file.
If the -series option is not defined, the default setting is to read only the series 0. If the
<parameter> is found several times in the meta data dictionaries (Basics, Extended), the list of
values will be returned.
The command returns the information of the <parameter>.
bioFormats omexml <fileName>
This command reads the available or populated OME XML header file.
This command returns the metadata associated to presented as an XML tree. The XML format is
OME-XML.
bioFormats getSeriesCount <fileName>
This command gets the series count associated with the image file.
This command returns the series count.
bioFormats getDims [-series <seriesId>] <fileName>
This command gets the data dimension {SizeX SizeY SizeZ SizeC SizeT} of the
<seriesId>. If the -series option is not defined, the default setting is to read all the se-
ries.
This command returns the list of the data dimension.
946
Environment Variables:
The -Xms and -Xmx command line options are available to change the behaviour of JRockit JVM
to better suit the needs of the Bio-Formats reader Java application.
The -Xms option sets the initial and minimum Java heap size. The default allocated memory is
256MB. To change the size, add the following environment variable and set the new size:
HX JAVA HEAP SIZE MIN=<size>[g|G|m|M|k|K]
The -Xmx option sets the maximum Java heap size. The default allocated memory is 64GB. To
change the size, add the following environment variable and set the new size:
HX JAVA HEAP SIZE MAX=<size>[g|G|m|M|k|K]
947
Chapter 21
Avizo XDigitalVolumeCorrelation
Extension User’s Guide
The Avizo XDigitalVolumeCorrelation Extension is required to unlock the tutorials and features
described in this chapter.
The extension can for instance be used to visualize and quantify deformation-induced microstructural
changes during dynamic processes, such as localization phenomena induced by heterogeneities or
thermal expansion mismatch between materials. Furthermore, the output displacement field can be
used to enrich a numerical simulation by using measured boundary conditions, or to optimize this
simulation by comparing numerical and measured data.
To learn more about the tools available in the extension, please refer to the following links:
• Digital Volume Correlation Module
• Digital Volume Correlation Analysis
Note: see section 1.4 System Requirements about system requirements and hardware platform avail-
ability.
Acknowledgements
Avizo XDigitalVolumeCorrelation Extension has been developed in cooperation with the companies
3Dmagination (Didcot, UK) and Eikosim (Paris, France).
21.1 Digital Volume Correlation Analysis
This tutorial describes how to perform a DVC (Digital Volume Correlation) analysis and visualize
the corresponding displacement and strain fields. A subset-based (local) approach is used to capture
the large displacements on a coarse regular grid and the resulting data are used to initialize a most
robust Finite-Element-based (global) DVC technique on a finer mesh. The bone-cement data used in
this tutorial is a courtesy of Dr Gianluca Tozzi at University of Portsmouth and represents one of the
possible configurations of interdigitated bone structures in joint fixation [1].
To follow this tutorial, you should be familiar with the basic concepts of Avizo such as interaction with
the 3D viewer, segmentation editor, etc. All these topics are discussed in AvizoGetting Started chapter.
Note: see section 1.4 System Requirements about system requirements and hardware platform avail-
ability.
• Extract a region of interest in the bone-cement using an Extract Subvolume as shown in Figure
• Compute the length scale of the microstructure using the Radial Autocorrelation module.
This module calculates the two-point correlation function of the tomographic image.
• Attach a Plot Spreadsheet module as shown in Figure 21.3
• Plot the autocorrelation versus distance. The autocorrelation decreases progressively until an
asymptote is reached. The distance from which this asymptote reaches about 30 voxels is the
range of the microstructure. A rule of thumb for an optimal subset size is to take about 3-4 times
this value. We will use 110 voxels in this study (see Figure 21.4).
Figure 21.6: Quick Probe or Measure tool can be used to Estimate the Maximum Displacement
• Attach a Digital Volume Correlation module to the data BCI reference. Set the Deformed vol-
umeport to BCI peak force.am and DVC approach port to Subset-based (local). Activate the
Advanced toggle switch. Set the Sub-volume size port to 110, Max displacement to 10, and
Correlation Threshold to 0.7. Turn Enable Display port to ON to visualize the sub-volumes.
Set the Metric port to Correlation and Transform port to Translation + Rotation. For each sub-
volume, the algorithm finds iteratively the six parameters (three translations, three rotations) of
a rigid transformation matrix that satisfy the best match between the grey level intensity of the
Figure 21.8: Digital Volume Correlation module with Subset-based (local) approach.
5. Visualize the mesh by attaching a Grid View module to the created mesh
dvc mesh cellSize 48x48x48 . Set the Draw Style port to Solid Outline to visualize the
elements (see Figure 21.11).
Figure 21.11: Grid View Module Properties and Tetrahedral Grid Visualization
6. Change the port DVC Approach to Finite-Element-based (global). Set the Max Iterations port
to 30 and Convergence criterion to 0.001. Attach the mesh dvc mesh cellSize 48x48x48 to
the port Reference mesh. In the Optional Connections section, set the Initial displacement to
BCI reference.disp (displacements computed using the local approach with a sub-volume size
of 110 voxels) (see Figure 21.12). Click Apply.
Figure 21.13: Histogram of the Reference Volume (left) and Residual (right)
As shown in the In Range port of the Histogram module for the residuals image, mean is about 0.74
and standard deviation is 3.81, indicative of a good correlation.
• Attach an Ortho Slice module to the residuals image BCI reference.res and change the Colormap
by clicking on Edit, Adjust Range To then Data Histogram.
Weak correlation zones correspond to voxels with the lowest and highest intensities and are found at
the top in the bone region interface where the trabecular-like morphology is more complex and the
deformation is high (see Figure 21.14).
High intensity voxels are best highligthed while showing positive values.
21.1.4.1 Visualize the Vertical Displacement and Axial Strain over the DVC Mesh
• Attach an Arithmetic module to BCI reference2.disp. Set Output Data Type port to scalar and
Expression port to Az. Rename the output Result dataset to Uz (select Result and press F2).
• Attach an Arithmetic module to BCI reference2.strain. Set Output Data Type port to scalar and
Expression port to Akk. Rename the output Result dataset to e33 (select Result and press F2).
• Connect a Grid View module to Uz and e33 and visualize the vertical displacement and axial
strain.
Figure 21.16: 3D visualization of the vertical displacement (left) and axial strain (right)
Figure 21.17: 3D Visualization of the Axial Strain in the Bone-Cement (left) and Bone phase (right)
• To better reveal the internal strains, connect a Volume Edit module to BCI reference3.labels
with following parameters:
• Set Tool port to TabBox
• Select a quarter of the volume.
• Click on the button Inside from the Cut port. This action will remove the quarter of
volume selected.
• Repeat the previous steps on the new volume BCI reference3.labels.modif (generate a surface
by connecting a Generate Surface module and visualize it with a Surface View module).
• Connect a Vectors Slice module to DispVectors.RegularGrid with following parameters:
• Set the Resolution to 20 (x and y).
• Set the Colormap to Constant Color then select white.
Figure 21.18: Displacement Vectors Superimposed on the 3D Axial Strain in the Trabecular Bone (left) and Cement Phase
(right)
It is observed that most of the deformation is taken by the trabecular bone with a poor strain transfer
in the cement region. Other bone-cement composite formulations containing more cortical bone have
been tested and proved to be more efficient in diffusing the strains in the cement [1].
To see the implant deformation:
• Attach an Apply Deformation module to the surface created with following parameters:
• Set Vector Field port to DispVectors.RegularGrid.
• Press Apply.
• Attach a Surface View module.
• Switch between the view modules for the reference and the deformed surfaces to see the defor-
mation.
• Attach an Apply Deformation module to the tetrahedral grid with following parameters:
• Set Vector Field port to DispVectors.RegularGrid.
• Press Apply.
• Attach a Tetra Grid View module to reference tetra grid data. Set:
• Set Color Field port to e33.RegularGrid.
• Set Colormap to physics and adjust range to e33.RegularGrid then Data Histogram.
• Switch Data port between reference and deformed data to see the deformation.
Avizo with Avizo XInline Extension provides an Industrial automatic inspection framework that
enables the automation of specific tasks. It has the capability to work in high-volume inspection
processes.
For more information, see complete Avizo Inline documentation at Avizo Inline Userguide.
Index
INDEX 966
Open Data As, 436 User’s Guide, 448
Open Project, 438 hexahedral grids, 890
Open Time Series Data, 436 hidden data objects, 483
Open Time Series Data As, 436 hot-key procedure, 527, 551
Quit, 439 HxColormap, 859
Recent Files, 439 HxHexaGrid, 890
Recent Projects, 439 HxLabelLattice3, 865, 886
Save Data, 436 HxLattice3, 881
Save Data As, 437 HxMessage, 828, 836
Save Project, 438 HxParamBundle, 896
Save Project As, 439 HxPortButtonList, 863
Save Project As Template, 439 HxPortFloatTextN, 848
file name extension, 819 HxPortIntSlider, 856
firewall, 19 HxPortRadioBox, 861
firing algorithm, 482 HxTetraData, 889
font size, 525, 526 HxTetraGrid, 887
Fourier transform, 122 HxUniformScalarField3, 850
function key, 527
procedure, 551 immersion medium, 117
in-plane sampling, 107
global objects, 902 initial estimate, 111, 114
global search, 894 intensity attenuation, 109
gmake, 807, 813 interface, 837, 880
GNUmakefile, 807, 813 introduction, 14
Graph View, 450
graphical user interface, 806, 835 job dialog, 115
graphicscards, 15 Job dialog box, 479
INDEX 967
MAKE CFG, 813 Pool, 902
material database, 897, 903 Pool Menu
material ids, 887, 890 Auto adjust range of colormaps, 443
materials, 886, 896 Create Object, 442
matlab, 21 Duplicate Mode, 443
maximum-likelihood method, 106 Duplicate Object, 442
McHandle, 856, 863 Graph View, 441
McVec3, 858 Hide All From Viewer But This, 442
memory consumption, 122 Hide Object, 441
message window, 902 Make All Display Modules Pickable, 443
microsphere, 117 Make All Display Modules Unpickable,
model, 256 443
module Remove All Objects, 442
adding new one, 818 Remove Object, 441
example, 854 Rename Object, 442
multi-processing, 122 Show All Objects, 442
multiple file input, 820 Show Object, 442
Tree View, 441
no-show-news, 490 Port, 456
noise, 106, 107 portData, 850
non-conformal grids, 891 PPM3D format, 825, 835
numerical aperture, 107 preferences, 482
Nyquist sampling, 107 preferences-and-settings, 484
primitive data types, 882
Object Popup, 495 prioritizinghardaware, 14
oil immersion, 117 procedural data interface, 893
Open Inventor, 806, 855 processor, 13
OpenGL, 13, 806, 807 profile-selection, 484
optical sectioning microscopy, 105 progress, 851
osxstdinstall, 23 Progress Bar, 459
out-of-focus light, 106, 113 progress bar, 851
overrelaxation, 111, 114 Project Graph View, 450
oversampling, 107 PSF, 106, 109
overwrite dialog, 836 theoretical, 112
Python Common Global Commands, 572
package, 805, 817
Python Documentation, 563
parallel flags, 813
Python In Product, 568
parameters, 880, 896
Python Introduction, 563
parameters of data objects, 507
Python Modules, 575
parse method, 859
Python Package manager, 581
performance, 122, 854
Python Packages, 583
plot API, 862
Python Script Objects, 577
polymorphism, 837
INDEX 968
Python Tutorial, 586 smart pointer, 856, 863
Python Tutorials, 586 Snapshot dialog box, 493
Spacemouse, 526
Qt, 806, 835 SpatialData, 880
question dialog, 902 specialconsideration, 19
stacked coordinates, 885
read routine Standard Toolbar, 449
adding new one, 819 start-up script, 526, 551
example, 825 stdinstall, 22
multiple files, 833 stereo mode, 526
reampling, 110 storage-class specifier, 828, 836
recent-documents, 484 surface, 506, 829
rectilinear coordinates, 885 patch, 832
refracrtive index, 117 surface field, 829
refractive index, 107 system information dialog, 495
register system requirements
data, 828, 833 development, 13
read routine, 828 Mac, 20
write routine, 836, 840 systemmemory, 16
registry, 811, 816
regular grid, 506, 881 table coordinates, 894
remotedisplay, 22 TCL, 534
renaming a package, 814 Tcl, 527
resource file, 806, 828, 836, 840, 904 Tcl interface, 859
Tcl introduction, 528
sampling rate, 107 Tcl library, 806
saturation, 108 Tcl versioning, 560
save ports, 903 template function, 883
save project, 483, 551, 903 tetrahedral grid, 256
scalar fields, 504 tetrahedral grids, 506, 887
scanned volume, 107 transformations, 895
scene graph, 855 Trimesh format, 829, 837
script, 534 tutorials, 49
SCRIPTDIR, 536
SCRIPTFILE, 536 undersampling, 107
scripting, 534 uniform coordinates, 885
Scripting interface, 527 unknown identifier, 904
segmentation, 98 unresolved symbol, 904
set-prog-language, 484 update method, 860
Shadowing, 508 Upgrading to latest version of Avizo XPand
shared object, 805 Extension, 813
silentinstall, 23
simulation, 256 vector fields, 505
INDEX 969
VertexSets, 507 warning dialog, 902
View Menu wavelength, 107
Antialiasing, 445 widefield data, 107
Axis, 446 Window Menu, 446
Background, 444 About, 449
Enable Shadows, 446 Colormap, 447
Fog, 445 Console, 447
FPS (frames-per-second), 446 Correlation, 447
Frame counter, 446 Help, 447
Layout, 443 Hide Panels, 447
Lights, 444 Histogram, 447
Measuring, 446 Project View, 447
Transparency, 444 Properties, 447
Viewer, 459, 902 Restore default layout, 448
Fullscreen, 464 Tables, 447
Home, 462 Toolbars, 447
Interact, 461 Windows system, 13
interaction mode, 460 winsilentinstall, 23
Layout, 464 winstdinstall, 22
LinkObjectsVisibility, 464 work area, 456, 902
Measuring, 463 workroom concept, 519
Perspective/Ortho toggle, 463 workrooms-toolbar, 449
Pick, 461, 463 world coordinates, 894
rotate button , 462 write routine
Seek, 462 adding new one, 820
Set Home, 462 example, 835
Snapshot, 464
Stereo, 463 xpand, 20
Trackball, 461
Translate, 462
View, 461
View All, 462
viewing directions (geographic), 463
viewing directions (seismic), 463
viewing directions XY, XZ, YZ, 462
viewing mode, 460
Zoom, 462
zoom, 459
viewer toggles, 483
Visual Studio
debug code, 812
release code, 812
INDEX 970