Use segmentations in CAD or FEM software

Hi Andras,
I am using filter like this. Could you please help me in understanding the pipeline for using filters?

First I am using connectivity filter to seperate the meshes. I am not sure I am using correctly the specified regions. then vtkgeometryfilter.

connect = vtk.vtkConnectivityFilter()
connect.SetInputData(mesh)
connect.SetExtractionModeToSpecifiedRegions()
connect.AddSpecifiedRegion(1)
connect2 = vtk.vtkConnectivityFilter()
connect2.SetInputData(mesh)
connect2.SetExtractionModeToSpecifiedRegions()
connect2.AddSpecifiedRegion(2)
connect3 = vtk.vtkConnectivityFilter()
connect3.SetInputData(mesh)
connect3.SetExtractionModeToSpecifiedRegions()
connect3.AddSpecifiedRegion(3)

brain = vtk.vtkGeometryFilter()
brain.SetInputConnection(connect3.GetOutputPort())

brainMapper = vtk.vtkPolyDataMapper()
brainMapper.SetInputConnection(brain.GetOutputPort())

brainActor = vtk.vtkActor()
brainActor.SetMapper(brainMapper)

Usual stuff:

ren = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)

ren.AddActor(brainActor)

Could you please tell me what I am doing right. Am I using it correctly?
I could not get the results (surface mesh corresponding to the volumetric mesh with direct correspondence to volumetric mesh point IDs, then you can use VTK geometry filter on the volumetric mesh)