def create(filename, hdr=None, anatFile=None): f = open(filename, 'wb') f.write(FIB.MAGIC_NUMBER + "\n") f.close() if hdr is None: hdr = VTK.get_empty_header() else: hdr = copy.deepcopy(hdr) fib = FIB(filename, load=False) fib.hdr = hdr fib.writeHeader() return fib
def _check(filename): if VTK._check(filename): return False return filename[-3:].lower() == FIB.MAGIC_NUMBER