I have a binary mask of 3D medical images in nifti format, "mask.nii.gz" which I would like to extract surface mesh from.
I can load binary mask data into a numpy.ndarray as following
import numpy as np
import nibabel as nib
filePath = "mask.nii.gz"
image = nib.load(filePath)
image_data = image.get_data()
but not sure how to render the surface with vtkDiscreteMarchingCubes() using the image_data above and output the vertices from rendered surface.
Could someone shed a light on this issue? Sorry I am very new to VTK library here. Many Thanks in advance.