Exemple #1
0
 def setUp(self):
     ''' load inital parameters and/or data for testing'''
     self.fnameAdj = 'data/3d_grid_adj.txt'
     self.fnameCo = 'data/3d_grid_coords.txt'
     self.fnameProps = 'data/3d_grid_properties.txt'
     
     # initialise brain and plot objects
     self.a = mb.brainObj()
     self.b = plotObj()
     
     # some data
     self.edges = [(0,2),(0,4),(0,6)]
     
     self.locations = {0:(1,1,1), 2:(2,2,2), 4:(3,3,3), 6:(4,4,4)}
Exemple #2
0
    def setUp(self):
        ''' load inital parameters and/or data for testing'''
        self.fnameAdj = 'data/3d_grid_adj.txt'
        self.fnameCo = 'data/3d_grid_coords.txt'
        self.fnameProps = 'data/3d_grid_properties.txt'

        # initialise brain and plot objects
        self.a = mb.brainObj()
        self.b = plotObj()

        # some data
        self.edges = [(0, 2), (0, 4), (0, 6)]

        self.locations = {
            0: (1, 1, 1),
            2: (2, 2, 2),
            4: (3, 3, 3),
            6: (4, 4, 4)
        }
Exemple #3
0
a.localThresholding(edgePC=edgePC)
#weights = [weightDict[e]+1.0 for e in a.G.edges()]
#weights = [power(v,4)*v for v in weights]

# fudge the sizes a bit so there is more of a contrast, ie take the square
sizeList = [power(degs[v],2) for v in a.G.nodes()]


# import the spatial file
a.importSpatialInfo(spatFile)

# import MNI space as a background brain
a.importBackground("/usr/share/data/fsl-mni152-templates/MNI152_T1_2mm_brain.nii.gz")

# create a plotting object
b = mbp.plotObj()

# plot the brain edges
b.plotBrainEdges(a, opacity=0.7, lw=3.) #, scalars=weights

#plot the brain nodes
b.plotBrainCoords(a, col=(0.,0.,1.), sizeList = sizeList, opacity=0.5, sf=4.)

# plot the background MNI space
b.plotSkull(a, contourVals = [3000,9000])

#fEnd = "edgesOnly"
fEnd = None

saveFig(a, d, outDir, fEnd=fEnd, fType=".png")