""" Created on May 21, 2013 @author: Jamesan """ import numpy as np from scipy.spatial import kdtree, distance import networkx as nx import connectome_analysis.datamodels.graphs.structurelocations as structurelocations from connectome_analysis.enum import enum iLoc = enum(X=0, Y=1, Z=2, Radius=3, ID=4) _morphologyCache = {} DefaultScalars = np.double([2.18, 2.18, -90]) # nm/pixel of our TEM @ 5000x in microns DefaultScalars *= 0.001 def Load(structureID, useCache=True, XYZScalars=None): if useCache: if structureID in _morphologyCache: return _morphologyCache[structureID] structureLocationsGraph = structurelocations.Load(structureID) morphology = Morphology(structureLocationsGraph) if useCache: _morphologyCache[structureID] = morphology
''' Created on May 22, 2013 @author: u0490822 ''' import networkx as nx import logging import os from connectome_analysis.enum import enum SWCType = enum(UNDEFINED=0, SOMA=1, AXON=2, DENDRITE=3, APICAL_DENDRITE=4, FORK_POINT=5, END_POINT=6, CUSTOM=7) class SWCEntry(object): @property def location(self): return self._location @property def swc_base_type(self): '''Allows SOMA, AXON, APICAL_DENDRITE, or DENDRITE'''
''' Created on May 21, 2013 @author: Jamesan ''' import numpy as np from scipy.spatial import kdtree, distance import networkx as nx import connectome_analysis.datamodels.graphs.structurelocations as structurelocations from connectome_analysis.enum import enum iLoc = enum(X=0, Y=1, Z=2, Radius=3, ID=4) iBBox = enum(MinX=0, MinY=1, MinZ=2, MaxX=3, MaxY=4, MaxZ=5, ID=6) _morphologyCache = {} DefaultScalars = np.double([2.18, 2.18, -90]) # nm/pixel of our TEM @ 5000x in microns DefaultScalars *= 0.001