コード例 #1
0
### ndio membrane segmentation imports
import ndio
print ndio.version  # Prints version

import ndio.remote.OCP as OCP
oo = OCP()

import ndio.remote.OCPMeta as NDLIMS
nn = NDLIMS()
###

### Watershed segmentation imports
import numpy as np
import matplotlib.pyplot as plt
from scipy import ndimage as ndi

from skimage.morphology import watershed
from skimage.feature import peak_local_max
###

#########
# ndio demo for membrane segmentation
#########
'''
If you're running your own OCP server locally for testing, you can specify a
different hostname (instead of http://openconnecto.me) like this:

oo = OCP('your_ip_or_hostname.com')
'''

'''
コード例 #2
0
### ndio membrane segmentation imports
import ndio
import ndio.remote.OCP as OCP
import ndio.remote.OCPMeta as NDLIMS
import ndio.convert.tiff as ndtiff
###

### Create OCP / OCPMeta objects
oo = OCP()
nn = NDLIMS()
###

# Get all tokens
tokens = oo.get_public_tokens()

# Membrane group image and annotation tokens for membrane image in datamap
image_token = 'kasthuri11cc'
annotation_token = 'cv_kasthuri11_membrane_2014'

# Get channel ROI for token
channel_ROI = nn.get_metadata('cv_kasthuri11_membrane_2014')['channels']

# Get membrane ROI coordinates
membrane_group_ROI = channel_ROI['image']['rois']['ac4']

# Sets membrane query in Python
membrane_query = {
    'token': 'cv_kasthuri11_membrane_2014',
    'channel': 'image',
    'x_start': membrane_group_ROI['x'][0],
    'x_stop': membrane_group_ROI['x'][1],
コード例 #3
0
ファイル: import_json.py プロジェクト: neurodata/LIMS-Scripts
import ndio.remote.OCPMeta as LIMS
import json

lims = LIMS()

secret = "neurodata"
filename = 'w.ocp.me.images.json'

with open(filename) as data_file:
    data = json.load(data_file)


for project in data:
    project['secret'] = secret
    lims.set_metadata(project['token'], project)
コード例 #4
0
# How to grab our data and put it into a .npy file

# To load data in code:
#
# import numpy as np
#
# membrane_images = np.load('nXp_data.npy')
#

import ndio
import ndio.remote.OCP as OCP
oo = OCP()

import ndio.remote.OCPMeta as NDLIMS
nn = NDLIMS()

import ndio.convert.tiff as ndtiff  # For export to tiff later

import numpy as np

print "Done importing packages"

tokens = oo.get_public_tokens()

image_token = 'kasthuri11cc'
annotation_token = 'cv_kasthuri11_membrane_2014'

# Get channel ROI for token
channel_ROI = nn.get_metadata(annotation_token)['channels']

# Get membrane ROI coordinates
コード例 #5
0
### ndio membrane segmentation imports
import ndio
import ndio.remote.OCP as OCP
import ndio.remote.OCPMeta as NDLIMS
import numpy as np

### Create OCP / OCPMeta objects
oo = OCP()
nn = NDLIMS()
###

print "Done importing packages"

image_token = "kasthuri11cc"
annotation_token = "kasthuri2015_ramon_v"
segmentation_token = "ac3ac4"

# Get channel ROI for token
channel_ROI = nn.get_metadata(segmentation_token)["channels"]

# Get membrane ROI coordinates
membrane_group_ROI = channel_ROI["ac4_neuron_truth"]["rois"]["ac4"]

# Sets membrane query in Python
membrane_query = {
    "token": "ac3ac4",
    "channel": "ac4_neuron_truth",
    "x_start": membrane_group_ROI["x"][0],
    "x_stop": membrane_group_ROI["x"][1],
    "y_start": membrane_group_ROI["y"][0],
    "y_stop": membrane_group_ROI["y"][1],
コード例 #6
0
### ndio membrane segmentation imports
import ndio
print ndio.version  # Prints version

import ndio.remote.OCP as OCP
oo = OCP()

import ndio.remote.OCPMeta as NDLIMS
nn = NDLIMS()
###

### Watershed segmentation imports
import numpy as np
import matplotlib.pyplot as plt
from scipy import ndimage as ndi

from skimage.morphology import watershed
from skimage.feature import peak_local_max
###

#########
# ndio demo for membrane segmentation
#########
'''
If you're running your own OCP server locally for testing, you can specify a
different hostname (instead of http://openconnecto.me) like this:

oo = OCP('your_ip_or_hostname.com')
'''
'''
Now we're ready to download data. For this example, we'll download some data
コード例 #7
0
# How to grab our data and put it into a .npy file

# To load data in code:
#
# import numpy as np
#
# membrane_images = np.load('nXp_data.npy')
#

import ndio
import ndio.remote.OCP as OCP
oo = OCP()

import ndio.remote.OCPMeta as NDLIMS
nn = NDLIMS()

import ndio.convert.tiff as ndtiff	# For export to tiff later

import numpy as np

print "Done importing packages"

tokens = oo.get_public_tokens()

image_token = 'kasthuri11cc'
annotation_token = 'cv_kasthuri11_membrane_2014'

# Get channel ROI for token
channel_ROI = nn.get_metadata(annotation_token)['channels']

# Get membrane ROI coordinates