def METHOD_NAME(self):
    self.PrintLog("Extracting surfaces.")
    def bnorm(data):
        bounds = data.GetBounds()
        return math.sqrt(sum((bounds[2*i+1]-bounds[2*i])**2 for i in range(3)))
    # Get bounds of entire surface
    bounds_norm = bnorm(self.Surface)
    # Currently assuming that this is the region numbers that were produced by coloring!
    # TODO: If necessary, get from array to be more robust.
    region_ids = (0, 1)
    # Extract each surface in turn to find the smallest one
    subsurfaces = {}
    for k in region_ids:
        connectivityFilter = vtk.vtkPolyDataConnectivityFilter()
        connectivityFilter.SetInputData(self.ColoredSurface)
        connectivityFilter.SetExtractionModeToSpecifiedRegions()
        connectivityFilter.AddSpecifiedRegion(k)
        connectivityFilter.ColorRegionsOff()
        connectivityFilter.SetScalarConnectivity(0)
        connectivityFilter.Update()
        subsurfaces[k] = connectivityFilter.GetOutput()
    # The inner surface has smaller bounds
    if bnorm(subsurfaces[region_ids[0]]) < bnorm(subsurfaces[region_ids[1]]):
        self.InnerRegionId = region_ids[0]
        self.OuterRegionId = region_ids[1]
    else:
        self.InnerRegionId = region_ids[1]
        self.OuterRegionId = region_ids[0]
    self.InnerSurface = subsurfaces[self.InnerRegionId]
    self.OuterSurface = subsurfaces[self.OuterRegionId]