Пример #1
0
def GetShapeMonolithicOrSequence(filename=None):
    filename = _select_file_if_none(filename)
    numFrames, w, h = GetShape(filename)
    isSequence = (numFrames == 1)
    if isSequence:
        numFrames = len(get_ne_files(filename, os.path.split(filename)[0]))
    return numFrames, w, h, isSequence
Пример #2
0
def LoadMonolithicOrSequenceSpecial(filename=None):
    filename = _select_file_if_none(filename)
    
    numFrames, w, h, isSequence = GetShapeMonolithicOrSequence(filename)
    
    if isSequence:
        files = get_ne_files(filename, os.path.split(filename)[0])
        if len(files)==0:
            print('Empty Directory!')
            return
        t0=LoadSingle(files[0])
        
        t=np.zeros([len(files), t0.shape[0], t0.shape[1]], t0.dtype)
        
        for i in range(len(files)):
            t[i] = LoadSingle(files[i])
        
        return t
    else:
        return LoadMonolithic(filename)