Beispiel #1
0
    if yCropLists is not None: yCropList = yCropLists[ibaseDir]
    else: yCropList = None
    correctionBaseDir = correctionBaseDirs[ibaseDir]
    for fileIndex in range(len(fusionFileNames)):
        if not separateFileMultiView:
            fusionFileName = os.path.join(baseDir,fusionFileNames[fileIndex])
            # check whether already fused (only checking for registration channel file!
            tmpFinalFile = os.path.join(os.path.dirname(fusionFileName),
                                     outFilePattern %(os.path.basename(fusionFileName.split('.')[0]),registrationChannel))
            if os.path.exists(tmpFinalFile): continue

            # load files
            print 'loading file %s...' %fusionFileName
            inarray = czifile.imread(fusionFileName)
            print 'finished loading'
            infoDict = zf.getStackInfoFromCZI(fusionFileName)
        else:
            fusionFileName = os.path.join(baseDir,fusionFileNames[fileIndex][0])
            tmpFinalFile = os.path.join(os.path.dirname(fusionFileName),
                                     outFilePattern %(os.path.basename(fusionFileName.split('.')[0]),registrationChannel))
            if os.path.exists(tmpFinalFile): continue

            readPaths = [os.path.join(baseDir,fusionFileNames[fileIndex][i]) for i in range(len(fusionFileNames[fileIndex]))]

            # load files
            print 'loading file %s...' %fusionFileName
            inarrays = []
            shapes = []
            for ifile in range(len(fusionFileNames[fileIndex])):
                tmpArray = czifile.imread(readPaths[ifile])
                inarrays.append(tmpArray)
Beispiel #2
0
__author__ = 'malbert'

import sys
sys.path = [sys.path[0]]+['..']+sys.path[1:]
from dependencies import *

# filePath = prefix+'/data/malbert/data/dbspim/osmo/20151220_p2y12_45dpf_15s_3cells_Subset.czi'
filePath = prefix+'/data/malbert/data/dbspim/20160118_4dpf_myosin/20160118_myosin_pu1_4dpf_30s_2_Subset.czi'
import zeissFusion as zf
info = zf.getStackInfoFromCZI(filePath)
# spacing = n.array([])

times = range(120)
# times = range(1)

bs = []

b = brain.Brain(filePath,
                dimc=2,
                times=times,
                baseDataDir=prefix+'/data/malbert/quantification',
                subDir = '20160118_4dpf_myosin',
                fileNameFormat='f%06d.h5',
                # spacing = n.array([info['spacing'][2]]*3),
                spacing = info['spacing'],
                # spacing = n.array([0.6,0.6,0.4]),
                origin = n.zeros(3)
                )

descriptors.RawChannel(b,1,nickname='signal',hierarchy='signal',redo=False,
                       compression='jls',compressionOption=2)