コード例 #1
0
ファイル: test_blocking.py プロジェクト: timoMa/skneuro
def test_blockwise():

    shape = [1000, 1000, 400]
    blockShape = [100, 100, 100]

    totalData = numpy.random.rand(*shape).astype(numpy.float32)

    print "blockwiseGaussianSmoothing"
    result = blockwise_filters.blockwiseGaussianSmoothing(totalData,1.0,nThreads=12,blockShape=blockShape)
    for x in range(20):
        blockwise_filters.blockwiseGaussianGradientMagnitude(totalData,1.0,nThreads=12,blockShape=blockShape)
コード例 #2
0
ファイル: test_blocking.py プロジェクト: timoMa/skneuro
def test_blockwise():

    shape = [1000, 1000, 400]
    blockShape = [100, 100, 100]

    totalData = numpy.random.rand(*shape).astype(numpy.float32)

    print "blockwiseGaussianSmoothing"
    result = blockwise_filters.blockwiseGaussianSmoothing(
        totalData, 1.0, nThreads=12, blockShape=blockShape)
    for x in range(20):
        blockwise_filters.blockwiseGaussianGradientMagnitude(
            totalData, 1.0, nThreads=12, blockShape=blockShape)
コード例 #3
0
ファイル: test_blocking_gui.py プロジェクト: timoMa/skneuro
import sys
import vigra
from time import time

path = "/home/tbeier/Desktop/data.h5"

shape = [1000, 100, 1000]

data = numpy.random.rand(*shape).astype(numpy.float32)
shape = data.shape
print shape
blockShape = [100, 100, 100]

print "blockwiseGaussianGradientMagnitude"
t0 = time()
result = blockwise_filters.blockwiseGaussianGradientMagnitude(
    data, 5.0, nThreads=22, blockShape=blockShape)
t1 = time()
print "done in", t1 - t0

tp = t0 - t1

print "blockwiseGaussianGradientMagnitude"
t0 = time()
result = vigra.filters.gaussianGradientMagnitude(data, 5.0)
t1 = time()
print "done in", t1 - t0

ts = t0 - t1

print ts / tp
コード例 #4
0
    def __call__(self):

        result = blockF.blockwiseGaussianGradientMagnitude(self.raw,
                                                           sigma=self.sigma)
        return result
コード例 #5
0
ファイル: test_blocking_gui.py プロジェクト: timoMa/skneuro
path = "/home/tbeier/Desktop/data.h5"

shape = [1000, 100, 1000]

data=numpy.random.rand(*shape).astype(numpy.float32)
shape = data.shape
print shape
blockShape = [100, 100, 100]





print "blockwiseGaussianGradientMagnitude"
t0=time()
result = blockwise_filters.blockwiseGaussianGradientMagnitude(data, 5.0, nThreads=22, blockShape=blockShape)
t1=time()
print "done in",t1-t0

tp = t0-t1

print "blockwiseGaussianGradientMagnitude"
t0=time()
result = vigra.filters.gaussianGradientMagnitude(data, 5.0)
t1=time()
print "done in",t1-t0

ts = t0-t1


print ts/tp