def save_fibers(oldhdr, oldfib, fname, indices):
 hdrnew = oldhdr.copy()
 outstreams = []
 for i in indices:
  outstreams.append(oldfib[i])
 n_fib_out = len(outstreams)
 hdrnew[u'n_count'] = n_fib_out
 iflogger.info((u'Writing final non-orphan fibers as %s' % fname))
 nb.trackvis.write(fname, outstreams, hdrnew)
 return n_fib_out

def save_fibers ( oldhdr , oldfib , fname , indices ) : hdrnew = oldhdr . copy ( ) outstreams = [ ] for i in indices : outstreams . append ( oldfib [ i ] ) n_fib_out = len ( outstreams ) hdrnew [ u'n_count' ] = n_fib_out iflogger . info ( ( u'Writing final non-orphan fibers as %s' % fname ) ) nb . trackvis . write ( fname , outstreams , hdrnew ) return n_fib_out
stores a new trackvis file fname using only given indices .