def initCol(cName, data, keepPoints): name = vtk.vtkTypeFloat32Array() name.SetNumberOfComponents(1) name.SetNumberOfTuples(0) name.SetName(cName) if keepPoints is None: keepPoints = range(0, len(data)) for cI in keepPoints: name.InsertNextTuple((data[cI], )) return name
def initCol3(cName, dat1, dat2, dat3, keepPoints=None): name = vtk.vtkTypeFloat32Array() name.SetNumberOfComponents(3) name.SetNumberOfTuples(0) name.SetName(cName) if keepPoints is None: keepPoints = range(0, len(dat1)) for cI in keepPoints: name.InsertNextTuple((dat1[cI], dat2[cI], dat3[cI])) print(cName, len(keepPoints)) return name
def initCol(cName, data, keepPoints): name = vtk.vtkTypeFloat32Array() name.SetNumberOfComponents(1) name.SetNumberOfTuples(0) name.SetName(cName) if keepPoints is None: keepPoints = range(0, len(data)) for cI in keepPoints: name.InsertNextTuple((data[cI],)) return name
def initCol3(cName, dat1, dat2, dat3, keepPoints=None): name = vtk.vtkTypeFloat32Array() name.SetNumberOfComponents(3) name.SetNumberOfTuples(0) name.SetName(cName) if keepPoints is None: keepPoints = range(0, len(dat1)) for cI in keepPoints: name.InsertNextTuple((dat1[cI], dat2[cI], dat3[cI])) print (cName, len(keepPoints)) return name
def initColTens(cName, dat1, dat2, dat3, dat4, dat5, dat6, dat7, dat8, dat9, keepPoints=None): name = vtk.vtkTypeFloat32Array() name.SetNumberOfComponents(9) name.SetNumberOfTuples(0) name.SetName(cName + "_T") if keepPoints is None: keepPoints = range(0, len(dat1)) for cI in keepPoints: name.InsertNextTuple((dat1[cI], dat2[cI], dat3[cI], dat4[cI], dat5[cI], dat6[cI], dat7[cI], dat8[cI], dat9[cI])) print (cName, len(keepPoints)) return name
def initColTens(cName, dat1, dat2, dat3, dat4, dat5, dat6, dat7, dat8, dat9, keepPoints=None): name = vtk.vtkTypeFloat32Array() name.SetNumberOfComponents(9) name.SetNumberOfTuples(0) name.SetName(cName + '_T') if keepPoints is None: keepPoints = range(0, len(dat1)) for cI in keepPoints: name.InsertNextTuple((dat1[cI], dat2[cI], dat3[cI], dat4[cI], dat5[cI], dat6[cI], dat7[cI], dat8[cI], dat9[cI])) print(cName, len(keepPoints)) return name