Skip to content

Instantly share code, notes, and snippets.

@YoelShoshan
YoelShoshan / volume_rendering_vtk.py
Created May 1, 2021 05:24 — forked from somada141/volume_rendering_vtk.py
Volume rendering in Python using VTK-SimpleITK #python #visualization #vtk #simpleitk #itk
#!/usr/bin/python
import SimpleITK as sitk
import vtk
import numpy as np
from vtk.util.vtkConstants import *
def numpy2VTK(img,spacing=[1.0,1.0,1.0]):
# evolved from code from Stou S.,