W. Gray Roncal &c
Our current approach is to divide workflows into labeling, train, evaluate, and deploy.
The tools for processing exist in a variety of languages and frameworks, but these are the predominant use-cases.
| # cube aligned | |
| import ndio.remote.neurodata as neurodata | |
| from time import time | |
| import numpy as np | |
| import ndparse as ndp | |
| # slice | |
| start = time() | |
| nd = neurodata(chunk_size=1e5) | |
| xy = nd.get_xy_slice('kasthuri11cc','image',4096,4096+1024,4096,4096+1024,1,resolution=1) |
| addpath(genpath('TREES1.15')) | |
| start_trees | |
| files = dir('*.swc'); | |
| for i = 1:length(files) | |
| trees{i} = load_tree(files(i).name); | |
| end | |
| for i = 1:length(trees) | |
| try |
| import glob | |
| import os | |
| import matplotlib.pyplot as plt | |
| import matplotlib.image as mpimg | |
| import numpy as np | |
| import ndio.remote.OCP as OCP | |
| dir = '/Users/graywr1/Downloads/temp' | |
| os.chdir(dir) |
| %% for Sandra | |
| im = imread('~/Downloads/mGCaMP3 IEM SomatosensoryCx-bottom.jpg'); | |
| %experiment until you're happy | |
| figure, imagesc(im<40) | |
| it = im < 40; | |
| itd = imdilate(it, strel('disk', 15)); | |
| figure, imagesc(itd) | |
| rp = regionprops(itd,'PixelIdxList','Area'); |
| function ocp_upload_voxelList(server, token, RAMONVolume, protoRAMON, useSemaphore) | |
| % W. Gray Roncal | |
| % Function to upload objects in a RAMON volume as a voxelList | |
| % Requires that all objects begin from a common prototype, and that | |
| % RAMONVolume has appropriate fields (in particular resolution and XYZ | |
| % offset) | |
| % This only supports anno32 data for now and the preserve anno option |
| function metrics = pr_eval(detectVol, truthVol) | |
| % W. Gray Roncal - 02.12.2015 | |
| % Feedback welcome and encouraged. Let's make this better! | |
| % Other options (size filters, morphological priors, etc. can be added. | |
| % z = rand(100,100); | |
| % t = z > 0.8; | |
| % | |
| tic | |
| %% params |
| % Updated to channel conventions and data migrations as of 01.24.2016 | |
| % Demonstrates downloading from the server and uploading from the server (best practices) | |
| % W. Gray Roncal | |
| % Assumes CAJAL is on your path | |
| oo = OCP(); | |
| oo.setServerLocation('http://openconnecto.me'); | |
| oo.setImageToken('kasthuri11cc'); | |
| oo.setAnnoToken('ac3ac4'); | |
| oo.setAnnoChannel('ac4_neuron_truth'); |
| % W Gray Roncal - 01.29.2015 | |
| % Server upload test - demonstrates server write timing test and dense uploading best practices | |
| %% Get Data | |
| % View data cuboid here (100 megavoxels) | |
| % http://braingraph1dev.cs.jhu.edu/ocp/overlay/0.7/ac4/xy/1/4400,5424/5440,6464/1100/ | |
| % Careful to use an API version compatible with the server | |
| ocp = OCP(); | |
| ocp.setServerLocation('http://braingraph1.cs.jhu.edu'); | |
| ocp.setImageToken('kasthuri11cc'); |
| % Connectomics Class Matlab Crash Course - Part 1 | |
| % WRGR, 01.15.2015 | |
| x = 4 %init a variable | |
| x = 4; %with no output | |
| x %view variable | |
| x = 5 %now x is 5 | |
| clear x %delete x | |
| x = [5 4 3 2] %make a vector | |
| whos x %examine variable |