Example #1
0
def grid_view(files, bounds, padding=40):
	from lasagna.io import b_idx, compose_stacks, get_mapped_tif
	
	arr = []
	for filename, bounds_ in zip(files, bounds):
		I = get_mapped_tif(filename)
		I_cell = I[b_idx(None, bounds=bounds_, padding=((padding,padding), I.shape))]
		arr.append(I_cell.copy())

	return compose_stacks(arr)
Example #2
0
def test_nuclei_stitch(well=(('A2',),0)):
    io.initialize_paths('20150716', subset='stitched/',
                        lasagna_dir='/Volumes/blainey_lab/David/lasagna/')

    dict_20X = defaultdict(list)
    [dict_20X[io.get_well_site(f)].append(f) for f in io.DIR['stacks'] if '20X' in f]

    test_files = dict_20X[well]
    print '(well, site) found', dict_20X.keys()
    print 'from', well, 'loading', test_files
    data = {f: io.read_stack(f, memmap=False) for f in test_files}

    offsets = process.register_images(data.values())

    C = io.compose_stacks([io.offset_stack(d, offset)
                           for d, offset in zip(data.values(), offsets)])
    return data, offsets, C
Example #3
0
def test_nuclei_stitch(well=(('A2', ), 0)):
    io.initialize_paths('20150716',
                        subset='stitched/',
                        lasagna_dir='/Volumes/blainey_lab/David/lasagna/')

    dict_20X = defaultdict(list)
    [
        dict_20X[io.get_well_site(f)].append(f) for f in io.DIR['stacks']
        if '20X' in f
    ]

    test_files = dict_20X[well]
    print '(well, site) found', dict_20X.keys()
    print 'from', well, 'loading', test_files
    data = {f: io.read_stack(f, memmap=False) for f in test_files}

    offsets = process.register_images(data.values())

    C = io.compose_stacks(
        [io.offset(d, offset) for d, offset in zip(data.values(), offsets)])
    return data, offsets, C