Exemplo n.º 1
0
if args.tracking is not None:
    lines = compress_streamlines(np.swapaxes(flow, 0, 1))
    lines_polydata = lines_to_vtk_polydata(lines, None, np.float32)
    save_polydata(lines_polydata, args.tracking, True)

    
# save
if args.end_points is not None:
    # save only not masked points
    if args.mask is not None:
        np.save(args.end_points, end_vertices[mask])
    else:
        np.save(args.end_points, end_vertices)
    
if args.end_normal is not None:
    end_normal = end_mesh.vertices_normal(args.ed_not_normed, args.ed_not_weighted)
    
    # save only not masked points
    if args.mask is not None:
        np.save(args.end_normal, end_normal[mask])
    else:
        np.save(args.end_normal, end_normal)
    
if args.end_surf is not None:
    end_mesh.save(args.end_surf)
    
if args.info is not None:
    info = np.array([args.nb_step, args.step_size], np.object)
    np.save(args.info, info)
    
# display