Skip to main content

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.

New to Scripting?

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.

TutorialDescription
TotalSegmentatorTotalSegmentator segmentation tutorial script.
nnU-Netnn-UNet segmentation tutorial script.
MONAIMONAI segmentation tutorial script.
Cellpose-SAMCellpose-SAM instance segmentation tutorial script.

Application Basics

Learn the fundamentals of the Scripting API including initialization, project management, and basic operations.

TutorialDescription
Getting StartedGetting Started with the Scripting API.
Project ManagementProject Management Tutorial.
SnapshotsSnapshots Tutorial.
View OperationsView Operations Tutorial.

Object Operations

Work with volumes, masks, surfaces, volume meshes, measurements, primitives, registration, and analysis.

TutorialDescription
Volume OperationsVolume Operations Tutorial.
Mask OperationsMask Operations Tutorial.
Surface OperationsSurface Operations Tutorial.
Volume Mesh OperationsVolume Mesh Operations Tutorial.
Measurement OperationsMeasurement Operations Tutorial.
Primitive OperationsPrimitive Operations Tutorial
Registration OperationsRegistration Operations Tutorial.
Measure OperationsMeasure Operations Tutorial.
Analysis OperationsAnalysis Operations Tutorial.
FEM OperationsFEM Operations Tutorial.

Workflows

Complete workflow examples combining multiple operations.

TutorialDescription
Cone Beam Reconstruction and Void Analysis WorkflowAutomate CT Analysis in Volvicon — Reconstruction, Void Analysis, Reports.
Wall-Thickness Analysis WorkflowWall Thickness Analysis Workflow Tutorial.

Quick Tips

  • Use import ScriptingApi as api to 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