Help with obtaining a binary mask from Polygon Mesh

Hi everyone! I am brand new to using ParaView. My version is 5.10.1. I have downloaded the data from Dataset for modeling of a multiscale human cerebrovasculature where this group created a cerebral vasculature model I would like to use for future project. To do that, I would like to obtain a 3D binary mask of arteries and vessels, ideally exported as a NIFTI file. Is it possible to do so with ParaView? The data I’m interested in is in the folders “Vasculature(LV0)”, “Artery” and “Vein”, all .vtp files.

My attempt that didn’t work:
Import Artery.vtp
Apply Tube filter with “Vary Radius - By Absolute Scalar” (I would like the mask to be of this image, i.e. with realistic vessel widths)
Apply Clean filter (visually, this seems to close the holes in the tube image)

  • optional Apply ExtractSurface
  • optional Apply Transform to [0,0,0]
    Apply ResampleToImage (this results in an empty layout)
    Then I was planning on Thresholding the image and somehow exporting to Nifti.

Since I am not familiar with this field, I do not know the standard method, but I tried one approach that does not use the Tube filter:

  1. Calculate the orthogonal projection point on the arterial centerline from each point in the image data and determine the distance to that point.
  2. Extract the artery radius at the projection point.
  3. Compare the calculated distance with the radius to determine whether each point in the image data is inside or outside the artery.

I am sharing the State file for the implementation of the above using a Programmable Filter.

mask.pvsm (827.6 KB)

Here, when setting the resolution of the Resample To Image filter to 200x200x200, the computation time took several tens of minutes. However, the resolution still seems to be low, resulting in the formation of a distorted arterial wall. Further refinement appears necessary.