def __init__(self, module_manager):
     SimpleVTKClassModuleBase.__init__(
         self, module_manager,
         vtk.vtkProjectedTerrainPath(), 'Processing.',
         ('vtkPolyData', 'vtkImageData'), ('vtkPolyData',),
         replaceDoc=True,
         inputFunctions=None, outputFunctions=None)
 def __init__(self, module_manager):
     SimpleVTKClassModuleBase.__init__(self,
                                       module_manager,
                                       vtk.vtkProjectedTerrainPath(),
                                       'Processing.',
                                       ('vtkPolyData', 'vtkImageData'),
                                       ('vtkPolyData', ),
                                       replaceDoc=True,
                                       inputFunctions=None,
                                       outputFunctions=None)
Example #3
0
lines.InsertNextCell(3)
lines.InsertCellPoint(0)
lines.InsertCellPoint(1)
lines.InsertCellPoint(2)
lines.InsertNextCell(5)
lines.InsertCellPoint(3)
lines.InsertCellPoint(4)
lines.InsertCellPoint(5)
lines.InsertCellPoint(6)
lines.InsertCellPoint(7)

terrainPaths = vtk.vtkPolyData()
terrainPaths.SetPoints(pts)
terrainPaths.SetLines(lines)

projectedPaths = vtk.vtkProjectedTerrainPath()
projectedPaths.SetInputData(terrainPaths)
projectedPaths.SetSourceConnection(demReader.GetOutputPort())
projectedPaths.SetHeightOffset(25)
projectedPaths.SetHeightTolerance(5)
projectedPaths.SetProjectionModeToNonOccluded()
projectedPaths.SetProjectionModeToHug()

pathMapper = vtk.vtkPolyDataMapper()
pathMapper.SetInputConnection(projectedPaths.GetOutputPort())

paths = vtk.vtkActor()
paths.SetMapper(pathMapper)
paths.GetProperty().SetColor(1, 0, 0)

# Create the RenderWindow, Renderer and both Actors
lines.InsertNextCell(3)
lines.InsertCellPoint(0)
lines.InsertCellPoint(1)
lines.InsertCellPoint(2)
lines.InsertNextCell(5)
lines.InsertCellPoint(3)
lines.InsertCellPoint(4)
lines.InsertCellPoint(5)
lines.InsertCellPoint(6)
lines.InsertCellPoint(7)

terrainPaths = vtk.vtkPolyData()
terrainPaths.SetPoints(pts)
terrainPaths.SetLines(lines)

projectedPaths = vtk.vtkProjectedTerrainPath()
projectedPaths.SetInputData(terrainPaths)
projectedPaths.SetSourceConnection(demReader.GetOutputPort())
projectedPaths.SetHeightOffset(25)
projectedPaths.SetHeightTolerance(5)
projectedPaths.SetProjectionModeToNonOccluded()
projectedPaths.SetProjectionModeToHug()

pathMapper = vtk.vtkPolyDataMapper()
pathMapper.SetInputConnection(projectedPaths.GetOutputPort())

paths = vtk.vtkActor()
paths.SetMapper(pathMapper)
paths.GetProperty().SetColor(1, 0, 0)

# Create the RenderWindow, Renderer and both Actors