0

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

MIM
  • 11
  • 2
  • Can you post some pictures illustrating your problem? A single threshold ought to be able to separate the head from the surround air. – Dave Chen Nov 10 '22 at 14:57
  • Yes with a single threshold I obtain the skin profile separate from the background but the problem is that for my model I only want the skin surface without any element inside and with a simple threshold there are some parts of the brain that have the same pixel intensity of the skin (like the air that you mention or the ventricles and the tumor). The goal is to separate the skin from everything else that have a threshold intensity near the one of the skin , with something like "erode" or "extractLargestConnectedComponent" in SimpleITK. The starting files are DICOM MRI images – MIM Nov 11 '22 at 14:32

0 Answers0