コード例 #1
0
ファイル: Scripts.py プロジェクト: EthanGlasserman/Brainbow
def LABVisualization(bins, slices, project=True,color=False,fullOpacity=True, data = "8bit"):
    startTime = time.time()
    colorMax = 255
    if data == "8bitsegmented":
        histogram = DataParse.loadStack(300, 200, 3000, mode="8bit", segmented=True)
    elif data == "8bit":
        histogram = DataParse.loadStack(300, 200, 3000, mode="8bit", segmented=False)
    elif data == "12bit":
        histogram = DataParse.loadStack(300, 200, 3000, mode="12bit", segmented=False)
        colorMax = 4095
    ColorPlots.histogramToLAB(histogram, colorMax, slices, project=project, color=color, fullOpacity=True)
    endTime = time.time()
    print "Total Time: %g Seconds" % (endTime-startTime)
コード例 #2
0
ファイル: Scripts.py プロジェクト: EthanGlasserman/Brainbow
def saveABPlot(slices, bins, floor, ceiling):
    startTime = time.time()
    histogram = DataParse.loadStack(slices, bins, floor, ceiling, bits=12, segmented=False, colorSpace="LAB")
    filename = "AB Plot" + str(bins) + "Bins" + "Floor" + str(floor) + "Ceiling" + str(ceiling) + ".png"
    ColorPlots.ABPlot(histogram, bins, filename)
    endTime = time.time()
    print "Total Time: %g Seconds" % (endTime-startTime)
    print "For %g Bins" % bins
コード例 #3
0
ファイル: Scripts.py プロジェクト: EthanGlasserman/Brainbow
def howManyClusters():
    histogram = DataParse.loadStack()
    Cluster.howManyClusters(histogram, 2, 45, 5)
コード例 #4
0
ファイル: Scripts.py プロジェクト: EthanGlasserman/Brainbow
def sliceDraw():
    histogram = DataParse.loadStack()
    data, centroidList, distance = Cluster.kMeans(histogram, main.CLUSTERS)
    Draw.drawSlice(data, centroidList)
コード例 #5
0
ファイル: Scripts.py プロジェクト: EthanGlasserman/Brainbow
def dirichelet():
    histogram = DataParse.loadStack()
    MG, obs = Cluster.expectationMaximization(histogram, main.CLUSTERS, mode="Dirichelet")
    Draw.EMDraw(obs, MG, histogram)    
コード例 #6
0
ファイル: Scripts.py プロジェクト: EthanGlasserman/Brainbow
def EM():
    histogram = DataParse.loadStack()
    MG, obs = Cluster.expectationMaximization(histogram, main.CLUSTERS)
    Draw.EMDraw(obs, MG, histogram)
コード例 #7
0
ファイル: Scripts.py プロジェクト: EthanGlasserman/Brainbow
def SVM():
    histogram = DataParse.loadStack()
    data, classifier = Classifier.train(histogram)
    Draw.SVMDraw(data, classifier, histogram)
コード例 #8
0
ファイル: Scripts.py プロジェクト: EthanGlasserman/Brainbow
def kMeans():
    histogram = DataParse.loadStack()
    data, centroidList, distance = Cluster.kMeans(histogram, main.CLUSTERS)
    Draw.clusterDraw(data, centroidList, histogram)
コード例 #9
0
ファイル: Scripts.py プロジェクト: EthanGlasserman/Brainbow
def histogram():
    histogram = DataParse.loadStack()
    Draw.draw(histogram)
コード例 #10
0
ファイル: Scripts.py プロジェクト: EthanGlasserman/Brainbow
def histogramToPNG():
    histogram = DataParse.loadStack(300, 200, 3000, mode="12bit", segmented=False)
    Utils.saveHistogramAsPNG(histogram)
コード例 #11
0
ファイル: Scripts.py プロジェクト: EthanGlasserman/Brainbow
def volumeRenderLowerCorner():
    histogram = DataParse.loadStack()
    histogram = Utils.magnifyLowerLeft(histogram, .25)
    Draw.volumeRender(histogram, mode="greyscale", prune=0)
コード例 #12
0
ファイル: Scripts.py プロジェクト: EthanGlasserman/Brainbow
def twelveBitVolumeRender():
    histogram = DataParse.loadStack(300, 200, 3000, mode="12bit")
    Draw.volumeRender(histogram, mode="greyscale", prune=0)
コード例 #13
0
ファイル: Scripts.py プロジェクト: EthanGlasserman/Brainbow
def volumeRender():
    histogram = DataParse.loadStack(300, 200, 3000, mode="8bit", segmented=False)
    Draw.volumeRender(histogram, mode="fullcolor", prune=0)