from oct2py import octave import logging octave.addpath("/Users/ruhansa/Desktop/MRI/src/gvf_matlab_src/examples/") logging.basicConfig(level=logging.DEBUG) octave.logger = logging.getLogger() import numpy as np from src.utils.io import filename2binary img = filename2binary("/Users/ruhansa/Desktop/u64.jpg").astype("float") img = np.flipud(img) + 1 x, y = octave.gvf_spine(img) print "end"
# coding: utf-8 # # This is to test GVF in ASM for spine dicom # In[ ]: import os os.chdir('/Users/ruhansa/Dropbox/spine/') import numpy as np import pickle from src.util import read_jpg fn = '/Users/ruhansa/Desktop/ex.jpg' arr = read_jpg(fn) from oct2py import octave octave.addpath('/Users/ruhansa/Desktop/gvf_dist_v4.2c/examples/') octave.gvf_spine(arr) # In[ ]: