Scripting API Code Examples
Ready-to-use Python code examples demonstrating the Volvicon Scripting API. Each example includes complete, executable code that you can download and run directly.
Start with the Python Scripting Fundamentals tutorial to learn the API basics, then return here for specific code examples.
About These Examples
These examples are organized by functionality and demonstrate:
- Complete workflows - End-to-end examples you can run immediately
- Best practices - Proper error handling, logging, and code organization
- Real-world scenarios - Common tasks from simple operations to complex automation
Each example includes downloadable Python source code and detailed explanations.
Tutorial Categories
AI Segmentation
Use AI models like TotalSegmentator, nnU-Net, MONAI, and Cellpose-SAM for automated segmentation.
| Tutorial | Description |
|---|---|
| TotalSegmentator | TotalSegmentator segmentation tutorial script. |
| nnU-Net | nn-UNet segmentation tutorial script. |
| MONAI | MONAI segmentation tutorial script. |
| Cellpose-SAM | Cellpose-SAM instance segmentation tutorial script. |
Application Basics
Learn the fundamentals of the Scripting API including initialization, project management, and basic operations.
| Tutorial | Description |
|---|---|
| Getting Started | Getting Started with the Scripting API. |
| Project Management | Project Management Tutorial. |
| Snapshots | Snapshots Tutorial. |
| View Operations | View Operations Tutorial. |
Object Operations
Work with volumes, masks, surfaces, volume meshes, measurements, primitives, registration, and analysis.
| Tutorial | Description |
|---|---|
| Volume Operations | Volume Operations Tutorial. |
| Mask Operations | Mask Operations Tutorial. |
| Surface Operations | Surface Operations Tutorial. |
| Volume Mesh Operations | Volume Mesh Operations Tutorial. |
| Measurement Operations | Measurement Operations Tutorial. |
| Primitive Operations | Primitive Operations Tutorial |
| Registration Operations | Registration Operations Tutorial. |
| Measure Operations | Measure Operations Tutorial. |
| Analysis Operations | Analysis Operations Tutorial. |
| FEM Operations | FEM Operations Tutorial. |
Workflows
Complete workflow examples combining multiple operations.
| Tutorial | Description |
|---|---|
| Cone Beam Reconstruction and Void Analysis Workflow | Automate CT Analysis in Volvicon — Reconstruction, Void Analysis, Reports. |
| Wall-Thickness Analysis Workflow | Wall Thickness Analysis Workflow Tutorial. |
Quick Tips
- Use
import ScriptingApi as apito import the API module - Create an Application instance:
app = api.Application() - Access operations via the Application instance (e.g.,
app.get_mask_operations()) - Use descriptive variable names for better IntelliSense support
- All API calls require positional arguments; keyword arguments are not supported
Additional Resources
- API Reference - API documentation
- Quick Reference - Common methods reference
- Batch Processing & Automation - Process multiple datasets