コード例 #1
0
ファイル: pvtools.py プロジェクト: kmader/TIPL
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
コード例 #2
0
ファイル: pvtools.py プロジェクト: kmader/TIPL
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
コード例 #3
0
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
コード例 #4
0
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
コード例 #5
0
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
コード例 #6
0
ファイル: pvtools.py プロジェクト: kmader/TIPL
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