Closed dteinferno closed 9 years ago
Could you attach a script so I can replicate the problem? I didn't have any trouble setting the ring in 'Ring Segments.py' to parent.
I've commented out the relevant parentRegion code in the EB section (e.g. line 136): '''' #############################################################
#############################################################
#############################################################
import sys, os, inspect import math from math import pi
flyBrainOnt = library.ontology('Drosophila adult')
sys.path.append('csv') import csv
#############################################################
#############################################################
regions = {} colors = {} lineweight = {} colors['black'] = (0.0,0.0,0.0) colors['white'] = (1.0,1.0,1.0) colors['red'] = (1.0,0.0,0.0) colors['green'] = (0.0,1.0,0.0) colors['blue'] = (0.0,0.0,1.0) colors['purple'] = (0.5,0.0,0.5) colors['yellow'] = (1.0,1.0,0.0) colors['orange'] = (1.0,165.0/255.0,0.0) colors['gray'] = (0.5,0.5,0.5) colors['grey'] = (0.5,0.5,0.45) colors['pink'] = (1.0,192.0/255.0,203.0/255.0) lineweight['xthin'] = 0.444 lineweight['thin'] = 0.666 lineweight['regular'] = 1.000 lineweight['thick'] = 2.000 lineweight['xthick'] = 5.000
#############################################################
regions['protocerebralBridge'] = network.createRegion(ontologyTerm = flyBrainOnt.findTerm(name = 'Protocerebral bridge')) display.setVisiblePosition(regions['protocerebralBridge'], (0.0,2.00,0.0), True) display.setVisibleSize(regions['protocerebralBridge'], (4.0, 0.35, 0.4)) display.setLabel(regions['protocerebralBridge'], regions['protocerebralBridge'].name) display.setLabelPosition(regions['protocerebralBridge'], (0.0,0.75,0.0)) display.setVisibleColor(regions['protocerebralBridge'],colors['blue'])
regions['leftProtocerebralBridge'] = network.createRegion(name = 'Left Protocerebral bridge', parentRegion = regions['protocerebralBridge']) display.setLabel(regions['leftProtocerebralBridge'], '') display.setVisibleColor(regions['leftProtocerebralBridge'],colors['blue']) for i in range (9,0,-1): regions['pbL' + str(i)] = network.createRegion(name = 'PB-L' + str(i), ontologyTerm = flyBrainOnt.findTerm(abbreviation = 'pcb' + str(i)), abbreviation = str(i), parentRegion = regions['leftProtocerebralBridge'])
regions['rightProtocerebralBridge'] = network.createRegion(name = 'Right Protocerebral bridge', parentRegion = regions['protocerebralBridge']) display.setLabel(regions['rightProtocerebralBridge'], '') display.setVisibleColor(regions['rightProtocerebralBridge'],colors['blue']) for i in range (1,10): regions['pbR' + str(i)] = network.createRegion(name = 'PB-R' + str(i), ontologyTerm = flyBrainOnt.findTerm(abbreviation = 'pcb' + str(i)), abbreviation = str(i), parentRegion = regions['rightProtocerebralBridge'])
display.setArrangedSpacing(regions['protocerebralBridge'], 0.02, recurse = True)
#############################################################
regions['fanshapedBody'] = network.createRegion(ontologyTerm = flyBrainOnt.findTerm(name = 'Fan-shaped body')) display.setVisiblePosition(regions['fanshapedBody'], (0.0,0.756,0.0),True) display.setVisibleSize(regions['fanshapedBody'], (0.5,0.5,0.3)) display.setVisibleShape(regions['fanshapedBody'], None) display.setLabel(regions['fanshapedBody'], regions['fanshapedBody'].name) display.setLabelPosition(regions['fanshapedBody'], (0.0,-0.15,0.0)) display.setArrangedAxis(regions['fanshapedBody'], None) display.setVisibleColor(regions['fanshapedBody'],colors['red'])
for i in range (9,0,-1): regions['fbL' + str(i)] = network.createRegion(name = 'FB layer ' + str(i), abbreviation = str(i), parentRegion = regions['fanshapedBody']) layerheight = (i-1)_.2 display.setVisiblePosition(regions['fbL' + str(i)], (0,layerheight,0), True) if i == 9: layerwidth = 1.25 elif i == 8: layerwidth = 3 else: layerwidth = 0.75_i display.setVisibleSize(regions['fbL' + str(i)], (layerwidth,0.15,0.3)) display.setVisibleShape(regions['fbL'+ str(i)], shapes['Box']) display.setArrangedAxis(regions['fbL' + str(i)], 'X') display.setVisibleColor(regions['fbL' + str(i)],colors['red'])
for i in range(5,0,-1): if i == 1: j = 10 else: j = 9 for k in range(1,j): regions['fbL' + str(i) + 'C' + str(k)] = network.createRegion(name ='FBl' + str(i) + str(k), parentRegion = regions['fbL' + str(i)]) display.setLabel(regions['fbL' + str(i) + 'C' + str(k)], '') display.setArrangedSpacing(regions['fbL' + str(i)], 0.02)
#############################################################
regions['ellipsoidBody'] = network.createRegion(ontologyTerm = flyBrainOnt.findTerm(name = 'Ellipsoid Body')) display.setVisiblePosition(regions['ellipsoidBody'], (0.0,-0.5,0.0), True) display.setVisibleShape(regions['ellipsoidBody'], shapes['Ring'](holeSize = 0.0/5.0)) display.setVisibleSize(regions['ellipsoidBody'], (1.4, 1.4,0.7)) display.setVisibleOpacity(regions['ellipsoidBody'], 0.33) display.setLabel(regions['ellipsoidBody'], regions['ellipsoidBody'].name) display.setLabelPosition(regions['ellipsoidBody'], (0.0,-0.6,0.0)) display.setArrangedAxis(regions['ellipsoidBody'], None) display.setVisibleColor(regions['ellipsoidBody'],colors['orange'])
letters = ['G','F','E','D','C','B','A','H'] for i in range(0,8): regions['ebT' + letters[i]] = network.createRegion(name = 'EBtile' + letters[i], abbreviation = letters[i])#, parentRegion = regions['ellipsoidBody']) angles = [0, pi/4.00, pi/2.00, 3.00_pi/4.00, pi, 5.00_pi/4.00, 3.00_pi/2.00,7.00_pi/4.00] theta = angles[i] xpos = 0.7_math.cos(theta) ypos = 0.7_math.sin(theta) display.setVisiblePosition(regions['ebT' + letters[i]], (xpos, ypos-0.5, -0.25), True) display.setVisibleShape(regions['ebT' + letters[i]], shapes['Ring'](holeSize = 0.5 / 5.0, startAngle=ipi/4-pi/8, endAngle=%28i+1%29pi/4-pi/8)) display.setVisibleSize(regions['ebT' + letters[i]], (0.6, 0.6, 0.25)) display.setLabel(regions['ebT' + letters[i]], letters[i]) display.setVisibleColor(regions['ebT' + letters[i]],colors['orange'])
names = ['3L','6R','4L','5R','5L','4R','6L','3R','7L','2R','8L','1R','1L','8R','2L','7R'] for i in range(0,16): regions['ebW' + names[i]] = network.createRegion(name = 'EBwedge' + names[i], abbreviation = names[i])#, parentRegion = regions['ellipsoidBody']) angle = math.radians(11.25 + (22.5_i)) xpos = 0.8_math.cos(angle) ypos = 0.8_math.sin(angle)-0.5 display.setVisiblePosition(regions['ebW' + names[i]], (xpos,ypos,0.35), True) display.setVisibleShape(regions['ebW' + names[i]], shapes['Ring'](holeSize = 0.5 / 5.0, startAngle=i*pi/8, endAngle=(i+1)_pi/8)) display.setVisibleSize(regions['ebW' + names[i]], (0.8, 0.8, 0.25)) display.setLabel(regions['ebW' + names[i]], names[i]) display.setVisibleOpacity(regions['ebW' + names[i]], 0.65) display.setVisibleColor(regions['ebW' + names[i]],colors['orange'])
namesRing = ['1','2','3']
for i in range(0,3): regions['ebRing' + namesRing[i]] = network.createRegion(name = 'EB Ring' + namesRing[i], abbreviation = 'ring' + namesRing[i])#, parentRegion = regions['ellipsoidBody']) display.setVisiblePosition(regions['ebRing' + namesRing[i]], (0.0,-0.5,0.15), True) display.setVisibleShape(regions['ebRing' + namesRing[i]], shapes['Ring'](holeSize = %28i+1%29/2.5)) display.setVisibleSize(regions['ebRing' + namesRing[i]], (1.4(i+1)/3, 1.4(i+1)/3,0.4)) display.setLabel(regions['ebRing' + namesRing[i]], regions['ebRing' + namesRing[i]].name) display.setLabelPosition(regions['ebRing' + namesRing[i]], (0.0,-0.6,-0.4))
display.setArrangedAxis(regions['ebRing' + namesRing[i]], None)
display.setVisibleColor(regions['ebRing' + namesRing[i]],colors['orange'])
regions['EBnubbin'] = network.createRegion(name = 'EB Nubbin', abbreviation = 'Nub')#, parentRegion = regions['ellipsoidBody']) display.setVisiblePosition(regions['EBnubbin'], (0.0,0.09,-0.8), True) display.setVisibleShape(regions['EBnubbin'], shapes['Ball']) display.setVisibleSize(regions['EBnubbin'], (0.75,0.25,0.25)) display.setLabel(regions['EBnubbin'], 'EB Nubbin') display.setVisibleColor(regions['EBnubbin'],colors['orange'])
#############################################################
regions['leftnoduli'] = network.createRegion(name = 'Left Noduli') display.setVisiblePosition(regions['leftnoduli'], (-1.9,-1.8, 0.0), True) display.setVisibleSize(regions['leftnoduli'], (0.5,1.0,0.3)) display.setArrangedAxis(regions['leftnoduli'], 'Y') display.setLabel(regions['leftnoduli'], '') display.setVisibleColor(regions['leftnoduli'],colors['green'])
regions['leftnoduli1'] = network.createRegion(name = 'Left Noduli 1', abbreviation = 'NO1', parentRegion = regions['leftnoduli']) display.setLabel(regions['leftnoduli1'], 'NO1') display.setLabelPosition(regions['leftnoduli1'], (-0.8,0.0,0.0)) display.setArrangedAxis(regions['leftnoduli1'], 'X')
regions['LNO1L'] = network.createRegion(name = 'Left Noduli 1 Lateral', abbreviation = 'LNO1L', parentRegion = regions['leftnoduli1']) display.setLabel(regions['LNO1L'], 'L')
regions['LNO1M'] = network.createRegion(name = 'Left Noduli 1 Medial', abbreviation = 'LNO1M', parentRegion = regions['leftnoduli1']) display.setLabel(regions['LNO1M'], 'M')
display.setArrangedSpacing(regions['leftnoduli1'], 0.05)
regions['leftnoduli2'] = network.createRegion(name = 'Left Noduli 2', abbreviation = 'NO2', parentRegion = regions['leftnoduli']) display.setLabel(regions['leftnoduli2'], 'NO2') display.setLabelPosition(regions['leftnoduli2'], (-0.8,0.0,0.0)) display.setArrangedAxis(regions['leftnoduli2'], 'Y')
regions['LNO2D'] = network.createRegion(name = 'Left Noduli 2 Dorsal', abbreviation = 'LNO2D', parentRegion = regions['leftnoduli2']) display.setLabel(regions['LNO2D'], 'D')
regions['LNO2V'] = network.createRegion(name = 'Left Noduli 2 Ventral', abbreviation = 'LNO2V', parentRegion = regions['leftnoduli2']) display.setLabel(regions['LNO2V'], 'V')
display.setArrangedSpacing(regions['leftnoduli1'], 0.05)
regions['leftnoduli3'] = network.createRegion(name = 'Left Noduli 3', abbreviation = 'NO3', parentRegion = regions['leftnoduli']) display.setLabel(regions['leftnoduli3'], 'NO3') display.setLabelPosition(regions['leftnoduli3'], (-0.8, 0.0, 0.0)) display.setArrangedAxis(regions['leftnoduli3'], 'Z')
regions['LNO3A'] = network.createRegion(name = 'Left Noduli 3 Anterior', abbreviation = 'LNO3A', parentRegion = regions['leftnoduli3']) display.setLabel(regions['LNO3A'], 'A')
regions['LNO3M'] = network.createRegion(name = 'Left Noduli 3 Medial', abbreviation = 'LNO3A', parentRegion = regions['leftnoduli3']) display.setLabel(regions['LNO3M'], 'M')
regions['LNO3P'] = network.createRegion(name = 'Left Noduli 3 Posterior', abbreviation = 'LNO3P', parentRegion = regions['leftnoduli3']) display.setLabel(regions['LNO3P'], 'P')
display.setArrangedSpacing(regions['leftnoduli3'], 0.05)
regions['rightnoduli'] = network.createRegion(name = 'right Noduli') display.setVisiblePosition(regions['rightnoduli'], (1.9,-1.8, 0.0), True) display.setVisibleSize(regions['rightnoduli'], (0.5,1.0,0.3)) display.setArrangedAxis(regions['rightnoduli'], 'Y') display.setLabel(regions['rightnoduli'], '') display.setVisibleColor(regions['rightnoduli'],colors['green'])
regions['rightnoduli1'] = network.createRegion(name = 'right Noduli 1', abbreviation = 'NO1', parentRegion = regions['rightnoduli']) display.setLabel(regions['rightnoduli1'], 'NO1') display.setLabelPosition(regions['rightnoduli1'], (0.8,0.0,0.0)) display.setArrangedAxis(regions['rightnoduli1'], 'X')
regions['RNO1L'] = network.createRegion(name = 'right Noduli 1 Lateral', abbreviation = 'RNO1L', parentRegion = regions['rightnoduli1']) display.setLabel(regions['RNO1L'], 'L')
regions['RNO1M'] = network.createRegion(name = 'right Noduli 1 Medial', abbreviation = 'RNO1M', parentRegion = regions['rightnoduli1']) display.setLabel(regions['RNO1M'], 'M')
display.setArrangedSpacing(regions['rightnoduli1'], 0.05)
regions['rightnoduli2'] = network.createRegion(name = 'right Noduli 2', abbreviation = 'NO2', parentRegion = regions['rightnoduli']) display.setLabel(regions['rightnoduli2'], 'NO2') display.setLabelPosition(regions['rightnoduli2'], (0.8,0.0,0.0)) display.setArrangedAxis(regions['rightnoduli2'], 'Y')
regions['RNO2D'] = network.createRegion(name = 'right Noduli 2 Dorsal', abbreviation = 'RNO2D', parentRegion = regions['rightnoduli2']) display.setLabel(regions['RNO2D'], 'D')
regions['RNO2V'] = network.createRegion(name = 'right Noduli 2 Ventral', abbreviation = 'RNO2V', parentRegion = regions['rightnoduli2']) display.setLabel(regions['RNO2V'], 'V')
display.setArrangedSpacing(regions['rightnoduli2'], 0.05)
regions['rightnoduli3'] = network.createRegion(name = 'right Noduli 3', abbreviation = 'NO3', parentRegion = regions['rightnoduli']) display.setLabel(regions['rightnoduli3'], 'NO3') display.setLabelPosition(regions['rightnoduli3'], (0.8, 0.0, 0.0)) display.setArrangedAxis(regions['rightnoduli3'], 'Z')
regions['RNO3A'] = network.createRegion(name = 'right Noduli 3 Anterior', abbreviation = 'RNO3A', parentRegion = regions['rightnoduli3']) display.setLabel(regions['RNO3A'], 'A')
regions['RNO3M'] = network.createRegion(name = 'right Noduli 3 Medial', abbreviation = 'RNO3A', parentRegion = regions['rightnoduli3']) display.setLabel(regions['RNO3M'], 'M')
regions['RNO3P'] = network.createRegion(name = 'right Noduli 3 Posterior', abbreviation = 'RNO3P', parentRegion = regions['rightnoduli3']) display.setLabel(regions['RNO3P'], 'P')
display.setArrangedSpacing(regions['rightnoduli3'], 0.05)
#############################################################
regions['llateraltriangle'] = network.createRegion(name = 'Left Lateral Triangle', abbreviation = 'LT') display.setVisiblePosition(regions['llateraltriangle'], (-1.9, -0.5,0.0), True) display.setVisibleSize(regions['llateraltriangle'], (0.5,0.8,0.2)) display.setVisibleShape(regions['llateraltriangle'], shapes['Cone']) display.setLabel(regions['llateraltriangle'], 'LT') display.setVisibleRotation(regions['llateraltriangle'], (1,0,0,pi))
regions['rlateraltriangle'] = network.createRegion(name = 'Right Lateral Triangle', abbreviation = 'LT') display.setVisiblePosition(regions['rlateraltriangle'], (1.9, -0.5,0.0), True) display.setVisibleSize(regions['rlateraltriangle'], (0.5,0.8,0.2)) display.setVisibleShape(regions['rlateraltriangle'], shapes['Cone']) display.setLabel(regions['rlateraltriangle'], 'LT') display.setVisibleRotation(regions['rlateraltriangle'], (1,0,0,pi))
regions['rightgall'] = network.createRegion(name = 'rightgall', abbreviation = 'G') display.setVisiblePosition(regions['rightgall'], (2.75,-0.5,0.0),True) display.setVisibleSize(regions['rightgall'], (0.25,0.5,0.4)) display.setLabel(regions['rightgall'], 'Gall') display.setLabelPosition(regions['rightgall'], (0.0,0.76,0.0)) display.setArrangedAxis(regions['rightgall'], 'Y')
regions['RGallT'] = network.createRegion(name = 'rightgall Tip', abbreviation = 'T', parentRegion = regions['rightgall']) regions['RGallD'] = network.createRegion(name = 'Dorsal rightgall', abbreviation = 'D', parentRegion = regions['rightgall']) regions['RGallV'] = network.createRegion(name = 'Ventral rightgall', abbreviation = 'V', parentRegion = regions['rightgall'])
display.setArrangedSpacing(regions['rightgall'], 0.05)
regions['leftgall'] = network.createRegion(name = 'leftgall', abbreviation = 'G') display.setVisiblePosition(regions['leftgall'], (-2.75,-0.5,0.0),True) display.setVisibleSize(regions['leftgall'], (0.25,0.5,0.4)) display.setLabel(regions['leftgall'], 'Gall') display.setLabelPosition(regions['leftgall'], (0.0,0.76,0.0)) display.setArrangedAxis(regions['leftgall'], 'Y')
regions['LGallT'] = network.createRegion(name = 'leftgall Tip', abbreviation = 'T', parentRegion = regions['leftgall']) regions['LGallD'] = network.createRegion(name = 'Dorsal leftgall', abbreviation = 'D', parentRegion = regions['leftgall']) regions['LGallV'] = network.createRegion(name = 'Ventral leftgall', abbreviation = 'V', parentRegion = regions['leftgall'])
display.setArrangedSpacing(regions['leftgall'], 0.05)
regions['leftgallsurround'] = network.createRegion(name = 'left gall surround', abbreviation = 'GS') display.setVisiblePosition(regions['leftgallsurround'], (-2.55, -0.5,0.0), True) display.setVisibleSize(regions['leftgallsurround'], (0.1,0.5,0.4)) display.setArrangedAxis(regions['leftgallsurround'], 'Y') display.setLabel(regions['leftgallsurround'], '')
regions['leftDgallsurround'] = network.createRegion(name = 'left dorsal gall surround', abbreviation = 'DGS', parentRegion = regions['leftgallsurround']) regions['leftVgallsurround'] = network.createRegion(name = 'left ventral gall surround', abbreviation = 'VGS', parentRegion = regions['leftgallsurround'])
display.setArrangedSpacing(regions['leftgallsurround'], 0.05)
regions['rightgallsurround'] = network.createRegion(name = 'right gall surround', abbreviation = 'GS') display.setVisiblePosition(regions['rightgallsurround'], (2.55, -0.5,0.0), True) display.setVisibleSize(regions['rightgallsurround'], (0.1,0.5,0.4)) display.setArrangedAxis(regions['rightgallsurround'], 'Y') display.setLabel(regions['rightgallsurround'], '')
regions['rightDgallsurround'] = network.createRegion(name = 'right dorsal gall surround', abbreviation = 'DGS', parentRegion = regions['rightgallsurround']) regions['rightVgallsurround'] = network.createRegion(name = 'right ventral gall surround', abbreviation = 'VGS', parentRegion = regions['rightgallsurround'])
display.setArrangedSpacing(regions['rightgallsurround'], 0.05)
regions['rightLAL'] = network.createRegion(name = 'rightLAL') display.setVisiblePosition(regions['rightLAL'], (3.2,-0.5,0.0),True) display.setVisibleSize(regions['rightLAL'], (0.75, 0.8, 0.65)) display.setVisibleShape(regions['rightLAL'], shapes['Capsule']) display.setLabel(regions['rightLAL'], 'LAL') display.setLabelPosition(regions['rightLAL'], (0.0,-0.55,0.0))
regions['leftLAL'] = network.createRegion(name = 'leftLAL') display.setVisiblePosition(regions['leftLAL'], (-3.2,-0.5,0.0),True) display.setVisibleSize(regions['leftLAL'], (0.75, 0.8, 0.65)) display.setVisibleShape(regions['leftLAL'], shapes['Capsule']) display.setLabel(regions['leftLAL'], 'LAL') display.setLabelPosition(regions['leftLAL'], (0.0,-0.55,0.0))
regions['rightbulb'] = network.createRegion(name = 'right Bulb') display.setVisiblePosition(regions['rightbulb'], (3.2,-0.25, -0.125), True) display.setVisibleSize(regions['rightbulb'], (0.4,0.6,0.3)) display.setVisibleShape(regions['rightbulb'], shapes['Ball']) display.setLabel(regions['rightbulb'], 'BU') display.setLabelPosition(regions['rightbulb'], (0.0,0.55,0.0))
regions['leftbulb'] = network.createRegion(name = 'left Bulb') display.setVisiblePosition(regions['leftbulb'], (-3.2,-0.25, -0.125), True) display.setVisibleSize(regions['leftbulb'], (0.4,0.6,0.3)) display.setVisibleShape(regions['leftbulb'], shapes['Ball']) display.setLabel(regions['leftbulb'], 'BU') display.setLabelPosition(regions['leftbulb'], (0.0,0.55,0.0))
regions['rightcrepine'] = network.createRegion(name = 'right crepine', abbreviation = 'CRE') display.setVisiblePosition(regions['rightcrepine'], (2.2, 0.95, 0.2), True) display.setVisibleSize(regions['rightcrepine'], (1.00,1.00,1.00)) display.setVisibleShape(regions['rightcrepine'], shapes['Ball']) display.setLabel(regions['rightcrepine'], 'CRE') display.setLabelPosition(regions['rightcrepine'], (0.0,0.6,0.0))
regions['rightrubus'] = network.createRegion(name = 'right rubus')#, parentRegion = regions['rightcrepine']) display.setVisiblePosition(regions['rightrubus'], (2.2, 0.95, 0.7), True) display.setVisibleSize(regions['rightrubus'], (0.65,0.65,0.65)) display.setVisibleShape(regions['rightrubus'], shapes['Ball']) display.setLabel(regions['rightrubus'], 'RB')
regions['leftcrepine'] = network.createRegion(name = 'left crepine', abbreviation = 'CRE') display.setVisiblePosition(regions['leftcrepine'], (-2.2, 0.95, 0.2), True) display.setVisibleSize(regions['leftcrepine'], (1.00,1.00,1.00)) display.setVisibleShape(regions['leftcrepine'], shapes['Ball']) display.setLabel(regions['leftcrepine'], 'CRE') display.setLabelPosition(regions['leftcrepine'], (0.0,0.6,0.0))
regions['leftrubus'] = network.createRegion(name = 'left rubus')#, parentRegion = regions['leftcrepine']) display.setVisiblePosition(regions['leftrubus'], (-2.2, 0.95, 0.7), True) display.setVisibleSize(regions['leftrubus'], (0.65,0.65,0.65)) display.setVisibleShape(regions['leftrubus'], shapes['Ball']) display.setLabel(regions['leftrubus'], 'RB')
regions['inferiorBridge'] = network.createRegion(name = 'Inferior Bridge', abbreviation = 'IB') display.setVisiblePosition(regions['inferiorBridge'], (0.0,-2.05, -0.5), True) display.setVisibleSize(regions['inferiorBridge'], (1.35, 0.7, 0.6)) display.setVisibleShape(regions['inferiorBridge'], shapes['Capsule']) display.setLabel(regions['inferiorBridge'], regions['inferiorBridge'].name)
regions['LPS'] = network.createRegion(name = 'Left Posterior Slope', abbreviation = 'LPS') display.setVisiblePosition(regions['LPS'], (-2.2,-3.2,0.0), True) display.setVisibleSize(regions['LPS'], (1.1,1.1,1.1)) display.setArrangedAxis(regions['LPS'], 'Y') display.setLabel(regions['LPS'], '')
regions['LSPS'] = network.createRegion(name = 'Left Superior Posterior Slope', abbreviation = 'LSPS', parentRegion = regions['LPS']) display.setLabel(regions['LSPS'], 'SPS')
regions['LIPS'] = network.createRegion(name = 'Left Inferior Posterior Slope', abbreviation = 'LIPS', parentRegion = regions['LPS']) display.setLabel(regions['LIPS'], 'IPS')
display.setArrangedSpacing(regions['LPS'], 0.05)
regions['RPS'] = network.createRegion(name = 'Right Posterior Slope', abbreviation = 'RPS') display.setVisiblePosition(regions['RPS'], (2.2,-3.2,0.0), True) display.setVisibleSize(regions['RPS'], (1.1,1.1,1.1)) display.setArrangedAxis(regions['RPS'], 'Y') display.setLabel(regions['RPS'], '')
regions['RSPS'] = network.createRegion(name = 'Right Superior Posterior Slope', abbreviation = 'RSPS', parentRegion = regions['RPS']) display.setLabel(regions['RSPS'], 'SPS')
regions['RIPS'] = network.createRegion(name = 'Right Inferior Posterior Slope', abbreviation = 'RIPS', parentRegion = regions['RPS']) display.setLabel(regions['RIPS'], 'IPS')
display.setArrangedSpacing(regions['RPS'], 0.05)
regions['rdlProtocerebrum'] = network.createRegion(name = 'Right Dorso-lateral Protocerebrum', abbreviation = 'RDLP') display.setVisiblePosition(regions['rdlProtocerebrum'], (0.5,2.75,0.0), True) display.setVisibleSize(regions['rdlProtocerebrum'], (0.4, 0.4, 0.4))
regions['dfProtocerebrum'] = network.createRegion(name = 'Dorso-Frontal Protocerebrum', abbreviation = 'DFP') display.setVisiblePosition(regions['dfProtocerebrum'], (0.0,2.75,0.0), True) display.setVisibleSize(regions['dfProtocerebrum'], (0.4, 0.4, 0.4))
regions['ldlProtocerebrum'] = network.createRegion(name = 'Left Dorso-lateral Protocerebrum', abbreviation = 'LDLP') display.setVisiblePosition(regions['ldlProtocerebrum'], (-0.5,2.75,0.0), True) display.setVisibleSize(regions['ldlProtocerebrum'], (0.4, 0.4, 0.4))
#############################################################
#############################################################
csvfile = open('arborizationdata.csv', 'rU') arborizationFile = csv.reader(csvfile) neurons = {}
for row in arborizationFile: columncount = 0
for column in row:
if column == '':
columncount += 1
elif columncount == 0:
neuron = network.createNeuron(name = column, abbreviation = row[(columncount + 1)], neuronImage=row[(columncount+4)])
columncount += 1
elif columncount == 1:
columncount += 1
elif columncount == 2:
color = colors[column]
columncount+= 1
elif columncount == 3:
weight = lineweight[column]
columncount += 1
elif columncount == 4:
columncount += 1
elif columncount%2 == 0:
columncount += 1
elif columncount%2 == 1:
if column == 'STOP':
columncount = 0
else:
if row[(columncount + 1)] == '.ps':
sendsOutput = True
receivesInput = False
elif row[(columncount + 1)] == '.d':
receivesInput = True
sendsOutput = False
elif row[(columncount + 1)] == '.ps.d':
receivesInput = True
sendsOutput = True
arborization = neuron.arborize(regions[column], sendsOutput, receivesInput)
display.setVisibleColor(arborization, color)
display.setVisibleWeight(arborization, weight)
columncount += 1
display.autoLayout() display.setLabelsFloatOnTop(True)
''''
I've checked in code that fixes the issue.
You will probably need to edit your script to reposition the child shapes. For example for the tiles section of code I had to modify the x and y to the following:
xpos = 0.5*math.cos(theta)
ypos = 0.5 + 0.5*math.sin(theta)
A created 'Ring' region cannot be set as a parentRegion.