Upload DICOM stackΒΆ
To convert a DICOM image stack to a WEBKNOSSOS dataset and upload it to webknossos.org the bioformats reader is necessary. This example shows how to create a new dataset from a dicom sequence, compress it and upload it to WEBKNOSSOS.
from pathlib import Path
import webknossos as wk
def main() -> None:
dataset = wk.Dataset.from_images(
str(Path(__file__).parent.parent / "testdata" / "dicoms"),
"dicom_dataset_upload",
voxel_size=(12, 12, 12),
)
dataset.compress()
remote_dataset = dataset.upload()
url = remote_dataset.url
print(f"Successfully uploaded {url}")
if __name__ == "__main__":
main()
- Get Help
- Community Forums
- Email Support