from nifti import NiftiImage from datetime import datetime prima=datetime.now() #FLAGS ############################# background_threshold=25 # reverse_YAxis=True # ############################# nim=NiftiImage("cervello") print "Processing '%s'" %nim.filename, nim.load() d=nim.extent #genearatin a 4-uple containing the dimension of nifti image (x,y,z,time) O=(d[0]/2,d[1]/2) print "(%dx%dx%d)\n" %(d[0],d[1],d[2]) print "--------------------------------------------------------------------------------" print bb=nim.bbox #ASSUMING IMAGE HAS TIME SIZE=1 -> program will work just on first istant on 4-dimensional images print "\tLeft Pole\tRight Pole\tAverage Pole" for z in range(bb[0][0],bb[0][1]) : #bottom-up scroll y=bb[1][0] found=False