()
| 50 | pf = vtkProgrammableFilter() |
| 51 | |
| 52 | def execute(): |
| 53 | info = pf.GetOutputInformation(0) |
| 54 | et = vtkExtentTranslator() |
| 55 | |
| 56 | if pf.GetInput().IsA("vtkDataSet"): |
| 57 | et.SetWholeExtent(info.Get(vtkStreamingDemandDrivenPipeline.WHOLE_EXTENT())) |
| 58 | et.SetPiece(info.Get(vtkStreamingDemandDrivenPipeline.UPDATE_PIECE_NUMBER())) |
| 59 | et.SetNumberOfPieces(info.Get(vtkStreamingDemandDrivenPipeline.UPDATE_NUMBER_OF_PIECES())) |
| 60 | et.PieceToExtent() |
| 61 | |
| 62 | output = pf.GetOutput() |
| 63 | input = pf.GetInput() |
| 64 | output.ShallowCopy(input) |
| 65 | if pf.GetInput().IsA("vtkDataSet"): |
| 66 | output.Crop(et.GetExtent()) |
| 67 | |
| 68 | pf.SetExecuteMethod(execute) |
| 69 |
nothing calls this directly
no test coverage detected