Exemplo n.º 1
0
assert not(args.it and args.t), "--it or --t option"
assert not(args.im and args.m and args.imz and args.mz ), "--m,im,mz or imz option"
assert not(args.tr and args.itr and args.tir and args.itir), "--tr,itr,tir or itir option"


mesh = TriMesh_Vtk(surface_file_in, None)
    
if args.test :
    tranfo = [-2,33,12]
    mesh.set_vertices(mesh.vertices_translation(tranfo))
    print "test : " + str(tranfo)
    
#todo nii rotation before or after translation?!?!?!
if args.r :
    tranfo = R
    mesh.set_vertices(mesh.vertices_rotation(tranfo))
    print "r : " + str(tranfo)
elif args.ir :
    tranfo = R.T
    mesh.set_vertices(mesh.vertices_rotation(R))
    print "ir : " + str(tranfo)
    
# nii translation
if args.t:
    tranfo = T
    mesh.set_vertices(mesh.vertices_translation(tranfo))
    print "t : " + str(tranfo)
elif args.t :
    tranfo = -T
    mesh.set_vertices(mesh.vertices_translation(tranfo))
    print "it : " + str(tranfo)