From the Revit API perspective the element is visible (is not hidden or is not on a hidden category) but produce no visible geometry.
This is also possible on Rhino if you have a block instance on Layer A, but the Content is on Layer B and C, and you turn off Layer B and C the block instance is still “visible” but produce no geometry on viewport.
So what you want to filter out are elements that do not produce any geometry on a view.
‘Query Elements’ returns all visible elements, produce or not produce visible geometry on the view.
‘Element View Geometry’ extracts the geometry that element produce on the view, if the list length of the produced geometry is zero ‘Cull Pattern’ culls it.