Skip to content

Commit

Permalink
Merge ce81257 into eb810c3
Browse files Browse the repository at this point in the history
  • Loading branch information
jni committed Jan 29, 2015
2 parents eb810c3 + ce81257 commit 93e645f
Show file tree
Hide file tree
Showing 66 changed files with 297 additions and 340 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
omit =
*test_package*
*test_*
*generate_test_results*
*auto*
*segmentation_stitch*
*stack_np*
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ build-*
tmp/
data/
cluster

# Cython
*.c
*.so
*.html

# Python bytecode
*.pyc
.*.swp
ipython_log.py*
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
clean:
rm gala/features/*.{c,html,so}
rm gala/*.{c,html,so}
rm -rf build
rm -rf gala.egg-info
rm -rf dist
rm -rf *.pyc */*.pyc */*/*.pyc
10 changes: 6 additions & 4 deletions bin/comparestacks
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import absolute_import
from __future__ import print_function
#!/usr/bin/env python

import os
Expand Down Expand Up @@ -69,7 +71,7 @@ def main(argv):

if args.relabel1:
stack1_int, dummy1, dummy2 = ev.relabel_from_one(stack1_int)
print "Imported first stack"
print("Imported first stack")


stackbase=args.stackbase
Expand All @@ -92,15 +94,15 @@ def main(argv):

if args.relabelbase:
stackbase_int, dummy1, dummy2 = ev.relabel_from_one(stackbase_int)
print "Imported base stack"
print("Imported base stack")

if args.synapsejson != '':
synaptic_vi, synaptic_comps = ev.make_synaptic_functions(args.synapsejson, [ev.split_vi_mem, ev.split_vi_mem])
merge, split, stack1_bodies2, stack1_vis2, gt_bodies2, gt_vis2 = synaptic_vi(stack1_int, stackbase_int)
print "SynMergeSplit: " + str((merge, split))
print("SynMergeSplit: " + str((merge, split)))
else:
merge, split, stack1_bodies2, stack1_vis2, gt_bodies2, gt_vis2 = ev.split_vi_mem(stack1_int, stackbase_int)
print "MergeSplit: " + str((merge, split))
print("MergeSplit: " + str((merge, split)))

data=[]
database=[]
Expand Down
1 change: 1 addition & 0 deletions bin/gala-auto
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import absolute_import
#!/usr/bin/env python

# ensure imported package is local to this executable
Expand Down
6 changes: 4 additions & 2 deletions bin/gala-evaluate
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import absolute_import
from __future__ import print_function
#!/usr/bin/env python

# ensure imported package is local to this executable
Expand All @@ -10,7 +12,7 @@ pkg_dir = os.path.abspath(os.path.join(this_dir, '..'))
sys.path.insert(0, pkg_dir)

# Python standard library
import argparse, cPickle
import argparse, six.moves.cPickle
import subprocess as sp
import logging

Expand Down Expand Up @@ -83,4 +85,4 @@ if __name__ == '__main__':
vi = np.concatenate((np.array([args.threshold]),
ev.split_vi(seg, gt)))[..., np.newaxis]
imio.write_h5_stack(vi, segfn, group='vi')
print vi[:, :max(6, len(vi[0]))]
print(vi[:, :max(6, len(vi[0]))])
1 change: 1 addition & 0 deletions bin/gala-pixel
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import absolute_import
#!/usr/bin/env python

# ensure imported package is local to this executable
Expand Down
1 change: 1 addition & 0 deletions bin/gala-remove-inclusions
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import absolute_import
#!/usr/bin/env python

# ensure imported package is local to this executable
Expand Down
4 changes: 3 additions & 1 deletion bin/gala-segment
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
from __future__ import absolute_import
#!/usr/bin/env python

# ensure imported package is local to this executable

import os
import sys
from six.moves import map

this_dir = os.path.dirname(sys.argv[0])
pkg_dir = os.path.abspath(os.path.join(this_dir, '..'))
sys.path.insert(0, pkg_dir)

# Python standard library
import argparse, cPickle
import argparse, six.moves.cPickle
import subprocess as sp
import logging
import functools
Expand Down
1 change: 1 addition & 0 deletions bin/gala-segmentation-pipeline
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import absolute_import
#!/usr/bin/env python

# ensure imported package is local to this executable
Expand Down
1 change: 1 addition & 0 deletions bin/gala-segmentation-stitch
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import absolute_import
#!/usr/bin/env python

# ensure imported package is local to this executable
Expand Down
1 change: 1 addition & 0 deletions bin/gala-test-package
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import absolute_import
#!/usr/bin/env python

# ensure imported package is local to this executable
Expand Down
1 change: 1 addition & 0 deletions bin/gala-train
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import absolute_import
#!/usr/bin/env python

# ensure imported package is local to this executable
Expand Down
1 change: 1 addition & 0 deletions bin/gala-valprob
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import absolute_import
#!/usr/bin/env python

# ensure imported package is local to this executable
Expand Down
10 changes: 6 additions & 4 deletions bin/h5cat
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import absolute_import
from __future__ import print_function
#!/usr/bin/env python

import os, sys, argparse
Expand All @@ -20,18 +22,18 @@ if __name__ == '__main__':

args = parser.parse_args()
for fin in args.fin:
print '>>>', fin
print('>>>', fin)
f = h5py.File(fin, 'r')
if args.group is not None:
groups = [args.group]
else:
groups = []
f.visit(groups.append)
for g in groups:
print '\n ', g
print('\n ', g)
if type(f[g]) == h5py.highlevel.Dataset:
a = f[g]
print ' shape: ', a.shape, '\n type: ', a.dtype
print(' shape: ', a.shape, '\n type: ', a.dtype)
if args.verbose:
a = array(f[g])
print a
print(a)
1 change: 1 addition & 0 deletions gala/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Gala is a Python package for nD image segmentation.
"""
from __future__ import absolute_import

import sys, logging
if sys.version_info[:2] < (2,6):
Expand Down
94 changes: 0 additions & 94 deletions gala/adaboost.py

This file was deleted.

Loading

0 comments on commit 93e645f

Please sign in to comment.