Commit 8171a948 authored by Radek Galabov's avatar Radek Galabov
Browse files

Added shift along z.

parent 30e2aa10
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -40,7 +40,8 @@ offset_file = "offset.txt"

o = numpy.loadtxt( info_folder + offset_file )
T = numpy.loadtxt( info_folder + matrix_file)
T_orig_wrong  =  [T[1],T[0],T[2]]
#T_orig_wrong  =  [T[1],T[0],T[2]]   #  if  matrix_poz.txt initially
T_orig_wrong  =  [T[1],T[0],-T[2]]   #  if  matrix_neg.txt initially
T_orig_wrong_inv  =  numpy.linalg.inv(T_orig_wrong)

print(glob.glob(
@@ -69,6 +70,11 @@ for filename in (glob.glob(
    for i in range(0,mesh.GetNumberOfPoints()):
        nodes[i,:] = T.dot(nodes[i,:])

    # shift  along the  z  axis, where,
    # first  number  is  Spacing  between  slices
    # and  the  other  is number  of  pixels in  3rd direction
    ##nodes =  nodes  - [0, 0, 1.5*(95 - 17)]
    nodes =  nodes  + [0, 0, 1.25*(95 -1)]

    for i in range (0,mesh.GetNumberOfPoints()):
        for j in range(0,3):