Skip to content

Mesh Generation Module Guide

The Mesh Generation module converts segmented image stacks into 3D surface meshes using the Marching Cubes algorithm. These meshes can be visualized interactively, exported for 3D modeling software, or prepared for 3D printing.

For a conceptual overview, see Mesh Generation.

Mesh Generation module showing generation complete with download optionsThe Mesh Generation module after successfully creating a 3D mesh with download options


Prerequisites

Before using this module, ensure you have:

  • A segmented TIFF stack (from Segmentation inference or the Annotation tool)
  • The segmentation must contain at least one labeled class (non-background pixels)

Quick Start

  1. Launch module — Click "Mesh Generation" from the workspace hub
  2. Select segmentation — Choose a segmentation result or annotation file
  3. Choose formats — Select output formats (JSON, OBJ, STL)
  4. Generate — Click "Generate Mesh" and wait for processing
  5. Use results — Download files or open in 3D Visualization

Step-by-Step Guide

Step 1: Data Selection

Select the segmentation data to convert into a 3D mesh.

Step 1 showing file selection with validationStep 1 data selection with segmentation file validation

Input Options

SourceDescriptionWhen to Use
Recent ResultsSegmentation outputs from U-Net inferenceAfter running segmentation inference
Annotation FilesMasks from the Annotation ToolFor manually created segmentations
Uploaded FilesAny labeled TIFF stackFor external segmentation data

File Requirements

  • Format: Multi-page TIFF (.tif or .tiff)
  • Pixel Values: Integer class labels (0 = background, 1-255 = object classes)
  • Bit Depth: 8-bit recommended (16-bit auto-converts)

Validation

The module validates your file to ensure it's a proper segmentation:

CheckWhat It Means
Class DetectionFile must contain at least one non-background class
Value RangeRejects files with too many unique values (likely raw images)
Data TypeMust be integer type, not floating point

Note: Invalid uploaded files are automatically removed from your workspace to keep it clean.

For more details, see Segmentation Data.

Click "Next: Generate Mesh" to proceed to Step 2.


Step 2: Mesh Generation

Configure output options and generate your mesh.

Step 2 showing data summary and generation optionsStep 2 with data summary, format selection, and class options

Data Summary

Before generating, you'll see a summary of your selected file:

InformationExample
Filenameinference_result.tif
Dimensions64 × 512 × 512 (slices × height × width)
Detected ClassesClass 1, Class 2
Data Typeuint8
PreviewThumbnail of middle slice

Output Format Options

Select one or more output formats:

FormatDescriptionUse Case
Three.js JSONOptimized for built-in 3D viewerInteractive visualization in browser
OBJ (Wavefront)Industry-standard 3D formatBlender, Maya, 3ds Max, etc.
STLStereolithography format3D printing

Tip: Select Three.js JSON if you want to use the built-in 3D Visualization module. Add OBJ or STL if you need to work with external software.

Class Selection

Choose which classes to include in the mesh:

  • All Classes (default) — Generates surfaces for every detected class
  • Individual Class — Select a specific class to mesh only that region

For more details, see Output Options.

Click "Generate Mesh" to start processing.


Processing

During mesh generation, you'll see real-time progress updates.

Progress display showing generation in progressMesh generation progress with status and elapsed time

Progress Indicators

ElementDescription
Status TextCurrent operation (e.g., "Processing class 1 of 3")
Progress BarVisual percentage complete
PercentageNumeric progress (0-100%)
Elapsed TimeHow long generation has been running

Note: Generation time depends on data size and number of classes. Large volumes may take several minutes.


Results

After generation completes, you'll see the results summary.

Results section showing statistics and download buttonsResults section with mesh statistics and download options

Statistics Displayed

MetricDescription
Total VerticesNumber of 3D points in the mesh
Total FacesNumber of triangular surfaces
Classes ProcessedHow many classes were meshed
Output FormatsWhich formats were generated
Generation TimeTotal processing duration

Download Options

Each generated format has its own download button:

ButtonDownloads
Download JSONmesh_data.json — Three.js format
Download OBJmesh.obj + mesh.mtl — Wavefront format with materials
Download STLmesh.stl — Binary STL for 3D printing

Actions

  • Open in 3D Visualization — Launch the interactive 3D viewer with your mesh
  • Generate Another — Return to Step 1 to create another mesh

Output Files

FileFormatDescriptionLocation
mesh_data.jsonThree.jsOptimized mesh for web viewerresults/meshes/{meshId}/
mesh.objWavefront3D model with geometryresults/meshes/{meshId}/
mesh.mtlMaterialColor definitions for OBJresults/meshes/{meshId}/
mesh.stlSTL3D printing formatresults/meshes/{meshId}/
metadata.jsonJSONGeneration statisticsresults/meshes/{meshId}/

Troubleshooting

IssueCauseSolution
"No object classes found"File contains only background (0 values)Use a file with actual segmentation labels
"Too many unique values"File appears to be raw image dataSelect a segmentation output, not raw images
Generation takes very longLarge volume or many classesNormal for large data; wait for completion
Can't click GenerateNo output format selectedCheck at least one format checkbox
File validation failedUploaded file is not a valid segmentationEnsure file is a labeled TIFF with integer values

Module Overview:

Step-by-Step:

Part of DFG Priority Programme SPP2332 "Physics of Parasitism"