how can I extract only the skin surface from a MRI nrrd file with SimpleITK, VTK, PyVista?

111 Views Asked by At

Starting from brain MRI I manage to obtain a raw 3D reconstruction of the skin plus other elements inside the brain MRI with thresholding in Pyvista, then with .extract_surface I obtained the PolyData from which I want to extract only the largest surface. The problem is that for extract the largest surface I need to fill all the holes in the contours and then apply some command for the extraction but I'm new to these libraries and I don't know how to do it. The main problem is how to keep only the surface of the image starting from Polydata file; if it's better to use another type of obect rather than a Polydata I'm open and I really appreciate new ideas

I tried with SimpleITK and PyVista: 1)

filter = sitk.BinaryThresholdImageFilter()
filter.SetLowerThreshold()
filter.SetUpperThreshold()
mask = filter.Execute(img) 

and then I would like to use BinaryMorphologicalClosing for fill the holes and then extract only the boundary

2) open the nrrd file (the DICOM file converted in nrrd) ad then wrap in Pyvsita for apply the thresholding and then .extract_surface() and .fill_holes(). But with this fill_holes() I don't obtain an improvement from the tresholding output

0

There are 0 best solutions below