Create Volume
The Create tool generates a new blank volume object with user-defined properties. This is useful for creating custom volumes for testing, simulations, or as templates for manual editing.
Accessing the Tool
- Navigate to the Image tab in the ribbon.
- Click Create in the General section.
Parameters
Image Dimensions
Define the size of the volume in voxels (pixels):
| Parameter | Description | Range |
|---|---|---|
| X (pixels) | Width of the volume | 2 – 102,400 |
| Y (pixels) | Height of the volume | 2 – 102,400 |
| Z (pixels) | Depth (number of slices) | 2 – 102,400 |
Image Spacing
Define the physical size of each voxel in millimeters:
| Parameter | Description | Default |
|---|---|---|
| X (mm) | Voxel width | 1.0 |
| Y (mm) | Voxel height | 1.0 |
| Z (mm) | Slice thickness | 1.0 |
Set spacing values to match your target data. For example, a typical CT scan might use 0.5 × 0.5 × 1.0 mm spacing.
Voxel Type
Select the data type for storing voxel intensity values:
| Type | Range | Memory per Voxel |
|---|---|---|
| Unsigned 8-bit | 0 – 255 | 1 byte |
| Unsigned 16-bit | 0 – 65,535 | 2 bytes |
| Signed 16-bit | -32,768 – 32,767 | 2 bytes |
| Float 32-bit | ±3.4×10³⁸ | 4 bytes |
Choose the smallest data type that accommodates your intensity range to minimize memory usage. Medical imaging typically uses Signed 16-bit for CT/MRI data.
Workflow
- Open the Create tool from the Image tab.
- Enter the desired X, Y, and Z dimensions in pixels.
- Set the spacing values to define the physical voxel size.
- Select an appropriate voxel type based on your intensity requirements.
- Click Apply to create the volume.
The new volume appears in the Object Browser with all voxels initialized to zero (black).
Memory Considerations
Large volumes consume significant memory. A 512 × 512 × 512 volume using 16-bit voxels requires approximately 256 MB of RAM. Verify available system memory before creating very large volumes.
Approximate memory formula:
Use Cases
- Template creation: Build a blank canvas for manual drawing or painting operations.
- Testing and development: Generate synthetic data for algorithm testing.
- Placeholder volumes: Create empty volumes to receive data from scripting operations.
Scripting
This operation is available via the Python scripting API using create_blank_volume().
import ScriptingApi as api
app = api.Application()
volume_operations = app.get_volume_operations()
volume_name = volume_operations.create_blank_volume(
"MyVolume",
[256, 256, 100], # dimensions [x, y, z]
[0.5, 0.5, 1.0], # spacing [x, y, z] in mm
api.VoxelDataType.Signed16Bit
)
See the VolumeOperations API Reference for details.