示例#1
0
    os.makedirs(OUTDIR)
if not os.path.isdir(outSubDir):
    os.makedirs(outSubDir)
""" Read the files """
print('\nProcessing ' + nm + ' ...\n')
[vertices, faces] = readMesh(os.path.join(DATADIR, meshFile))
[OrigLatCoords, OrigLatVals] = readLAT(os.path.join(DATADIR, latFile))

if ablFile != '':
    ablFile = os.path.join(DATADIR, ablFile)
else:
    ablFile = None
    print('No ablation file available for this mesh... continuing...\n')
""" Pre-process the mesh and LAT samples. """
mesh = Mesh([vertices, faces])
mesh.c('grey')

n = len(vertices)

mapIdx = [i for i in range(n)]
mapCoord = [vertices[i] for i in mapIdx]

# Map the LAT samples to nearest mesh vertices
allLatIdx, allLatCoord, allLatVal = utils.mapSamps(mapIdx, mapCoord,
                                                   OrigLatCoords, OrigLatVals)

M = len(allLatIdx)

# Identify and exclude anomalous LAT samples
anomalous = np.zeros(M)
if remove_anomalies:
示例#2
0
for i in range(n):
    if i not in TrIdx:
        latNN[i] = unknownCoord[currIdx]
        currIdx += 1
    else:
        latNN[i] = mapLAT[i]

updatedFaces = magicLAT.updateFaces(vertices, faces, latNN, TrCoord,
                                    EDGE_THRESHOLD)

latEst = magicLAT.magicLAT(vertices, faces, TrIdx, TrCoord, TrVal,
                           EDGE_THRESHOLD)

mesh = Mesh([vertices, faces])
# mesh.backColor('white').lineColor('black').lineWidth(0.25)
mesh.c('grey')

size = (100, 800)
fontSize = 35

verPoints = Points(vertices, r=10, c='white')
origLatPoints = Points(OrigLatCoords, r=10).cmap('gist_rainbow',
                                                 OrigLatVals,
                                                 vmin=MINLAT,
                                                 vmax=MAXLAT).addScalarBar(
                                                     c='white',
                                                     title='LAT (ms)   ',
                                                     titleFontSize=fontSize,
                                                     size=size)
allLatPoints = Points(allLatCoord, r=10).cmap('gist_rainbow',
                                              allLatVal,