voxelkit preview¶
Generates a 2D PNG slice from your file and saves it to disk. The centre slice is used by default. You can control the plane, axis, and slice index with flags.
Usage¶
Arguments¶
| Argument | Description |
|---|---|
FILE |
Path to a supported file |
Flags¶
| Flag | Format | Description |
|---|---|---|
--output PATH |
All | Required. Output .png file path |
--plane PLANE |
NIfTI only | One of axial, coronal, sagittal. Defaults to axial |
--dataset PATH |
HDF5 only | Dataset path inside the file, e.g. data/subject01/run1/bold |
--array NAME |
.npz only |
Array name inside the archive |
--axis INT |
HDF5 / NumPy / TIFF | Axis to slice along (0, 1, or 2). Required for 3D HDF5 datasets |
--slice INT |
All | Slice index. Defaults to the centre slice |
Format-specific flags
--plane is NIfTI-only. --dataset is HDF5-only. --array is .npz-only. Passing the wrong flag for a format raises an error.
Examples¶
Output¶
The PNG is written to the path given by --output. Parent directories are created automatically if they don't exist. The image is grayscale, normalised to 0–255.