Skip to content

Commit

Permalink
Merge branch 'release-0.1.13'
Browse files Browse the repository at this point in the history
  • Loading branch information
mcvaneede committed Feb 19, 2016
2 parents 84492b2 + 626a032 commit da15ee9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
New in Version 0.1.13
=====================
* code changes to ensure python3 compatibility

New in Version 0.1.12
=====================
* added the option -flip-images to ray_trace_crosshair in case you are working with a version of
Expand Down
2 changes: 1 addition & 1 deletion python/rotational_minctracc.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_tempfile(suffix):

def get_centre_of_gravity(file):
lines = subprocess.check_output(["volume_cog", file])
line = lines.split('\n')[-2]
line = lines.decode().split('\n')[-2]
cog = array(line.strip().split(" ")).astype("float32")
return cog

Expand Down
8 changes: 3 additions & 5 deletions python/smooth_vector
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
# Created Aug 26, 2004

import sys
import string
import os, tempfile
import subprocess
import re
import exceptions
from optparse import OptionParser, Option, OptionValueError

program_name = 'smooth_vector.py'
Expand Down Expand Up @@ -43,8 +41,8 @@ def process_volume(input, output, options):
subprocess.check_call(('mincblur -fwhm %f %s %s' % (options.fwhm, working, smooth_base[i])).split())

subprocess.check_call(('mincconcat -clobber -concat_dimension vector_dimension %s %s'
% (string.join(smoothed), output)).split())
subprocess.check_call(('rm -f %s %s' % (string.join(smoothed), working)).split())
% (' '.join(smoothed), output)).split())
subprocess.check_call(('rm -f %s %s' % (' '.join(smoothed), working)).split())



Expand All @@ -54,7 +52,7 @@ def get_vector_length(input):
# sometimes the file exists, but the MINC file has not been
# properly written out to disk, check for this:
output = subprocess.check_output(["mincinfo", input], stderr=subprocess.STDOUT)
if re.search("Unable to open file", output):
if re.search(b"Unable to open file", output):
sys.exit("\nError: can not read input file: '%s'\n" % input)
length = int(subprocess.check_output(['mincinfo', '-dimlength', 'vector_dimension', input]))
return length
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
m.Extension.__dict__ = m._Extension.__dict__

setup(name="python-stuffs",
version='0.1.12',
version='0.1.13',
scripts=["python/TFCE",
"python/smooth_vector",
"python/measure_xcorr",
Expand Down

0 comments on commit da15ee9

Please sign in to comment.