def Process(): # output data_l = np.zeros((1, s)) data_W = np.zeros((1, s)) data_dW = np.zeros((1, s)) data_H = np.zeros((1, s)) data_sigma = np.zeros((1, s)) data_P = np.zeros((1, p), dtype=bool) data_offset = [] data_Y = [""] data_C = [] data_A = [] data_M = [] # ''' TODO [Soza2004] add range of cases in addition to min/max # E = [8.2,8.85] # v = [0.4552, 0.461] # ''' model = Linear.Generic("Linear MRI registration -min [Soza2004]", 0, 8.2 * kPa, 0.4552) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l[0, :] = l data_W[0, :] = W data_dW[0, :] = dW[0] data_H[0, :] = H[0, 0] data_sigma[0, :] = sigma[0] data_P[0, :] = P data_offset.append(offset) data_Y[0] = "Reg-min-Soza2004" data_C.append(c) data_A.append(Common.NH) data_M.append(Common.LIN) stretches = model.stretches model = Linear.Generic("Linear MRI registration -max [Soza2004]", 0, 8.85 * kPa, 0.461) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Reg-max-Soza2004") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.LIN) PlotMaterial.Groups("MRI Registration", stretches, data_l, data_W, data_dW, data_H, data_sigma, data_Y) return data_l, data_W, data_dW, data_H, data_sigma, data_P, data_offset, data_Y, data_C, data_A, data_M
def Process(): # output data_l = np.zeros((1, s)) data_W = np.zeros((1, s)) data_dW = np.zeros((1, s)) data_H = np.zeros((1, s)) data_sigma = np.zeros((1, s)) data_P = np.zeros((1, p), dtype=bool) data_offset = [] data_Y = [""] data_C = [] data_A = [] data_M = [] # [castellanoSmith2003] model = Linear.Generic("Linear sim abnormal dev --WM-- [castellanoSmith2003]", 0, 4.0 * kPa, 0.495) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9,1.1]) data_l[0, :] = l data_W[0, :] = W data_dW[0, :] = dW[0] data_H[0, :] = H[0,0] data_sigma[0, :] = sigma[0] data_P[0, :] = P data_offset.append(offset) data_Y[0] = "Abnormal-WM-castellanoSmith2003" data_C.append(c) data_A.append(Common.AB) data_M.append(Common.LIN) stretches = model.stretches # model.Plot() # [Sase2015] model = Linear.Generic("Linear sim abnormal dev --GM-- [castellanoSmith2003]", 0, 8.0 * kPa, 0.495) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9,1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0,0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Abnormal-GM-castellanoSmith2003") data_C.append(c) data_A.append(Common.AB) data_M.append(Common.LIN) # model.Plot() PlotMaterial.Groups("Simulation Abnormal Developments", stretches, data_l, data_W, data_dW, data_H, data_sigma, data_Y) return data_l, data_W, data_dW, data_H, data_sigma, data_P, data_offset, data_Y, data_C, data_A, data_M
def Process(): # output data_l = np.zeros((1, s)) data_W = np.zeros((1, s)) data_dW = np.zeros((1, s)) data_H = np.zeros((1, s)) data_sigma = np.zeros((1, s)) data_P = np.zeros((1, p), dtype=bool) data_offset = [] data_Y = [""] data_C = [] data_A = [] data_M = [] # [Dequidt2015] model = Linear.Generic("Linear brain surgery simulator [Dequidt2015]", 0, 2.1 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9,1.1]) data_l[0, :] = l data_W[0, :] = W data_dW[0, :] = dW[0] data_H[0, :] = H[0,0] data_sigma[0, :] = sigma[0] data_P[0, :] = P data_offset.append(offset) data_Y[0] = "SurgSim-Dequidt2015" data_C.append(c) data_A.append(Common.NH) data_M.append(Common.LIN) stretches = model.stretches # model.Plot() # [Sase2015] model = Linear.Generic("Linear brain surgery simulator [Sase2015]", 0, 1.0 * kPa, 0.4) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9,1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0,0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("SurgSim-Sase2015") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.LIN) # model.Plot() PlotMaterial.Groups("Brain Surgery Simulation", stretches, data_l, data_W, data_dW, data_H, data_sigma, data_Y) return data_l, data_W, data_dW, data_H, data_sigma, data_P, data_offset, data_Y, data_C, data_A, data_M
def Process(): # output data_l = np.zeros((1, s)) data_W = np.zeros((1, s)) data_dW = np.zeros((1, s)) data_H = np.zeros((1, s)) data_sigma = np.zeros((1, s)) data_P = np.zeros((1, p), dtype=bool) data_offset = [] data_Y = [""] data_C = [] data_A = [] data_M = [] # [Yousefi2013] # E +- 0.25 # v +- 0.145 model = Linear.Generic( "Linear pathological region growing --brain-- [Yousefi2013]", 0, 3.0 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l[0, :] = l data_W[0, :] = W data_dW[0, :] = dW[0] data_H[0, :] = H[0, 0] data_sigma[0, :] = sigma[0] data_P[0, :] = P data_offset.append(offset) data_Y[0] = "Pathos-Yousefi2013" data_C.append(c) data_A.append(Common.NH) data_M.append(Common.LIN) stretches = model.stretches # [Prastawa2009] model = Linear.Generic( "Linear pathological region growing --brain-- [Prastawa2009]", 0, 0.694 * kPa, 0.4) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Pathos-Prastawa2009") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.LIN) # model = Linear.Generic("Linear pathological region growing --falx-- [Prastawa2009]", 0, 200.0 * kPa, 0.4) # model.Compute() # l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9,1.1]) # data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) # data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) # data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) # data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) # data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) # data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) # data_offset.append(offset) # data_Y.append("Pathos-falx-Prastawa2009") # data_C.append(c) # data_A.append(Common.AB) # data_M.append(Common.LIN) # [Kyriacou1999] # TODO MICCAI exclusion # model = Nonlinear.Mihai2015a("Neo-Hookean --WM-- [Kyriacou1999]", 3.0 * kPa) # model.Compute() # l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.8,1.2]) # data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) # data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) # data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) # data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) # data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) # data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) # data_offset.append(offset) # data_Y.append("Pathos-WM-Kyriacou1999") # data_C.append(c) # data_A.append(Common.WM) # data_M.append(Common.HYP) # TODO MICCAI exclusion # model = Nonlinear.Mihai2015a("Neo-Hookean --GM-- [Kyriacou1999]", 30.0 * kPa) # model.Compute() # l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.8,1.2]) # data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) # data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) # data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) # data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) # data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) # data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) # data_offset.append(offset) # data_Y.append("Pathos-GM-Kyriacou1999") # data_C.append(c) # data_A.append(Common.GM) # data_M.append(Common.HYP) # [6] model = Nonlinear.Mihai2015a("Neo-Hookean --Tumour-- [Kyriacou1999]", 30.0 * kPa) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.8, 1.2]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Pathos-TUMOUR-Kyriacou1999") data_C.append(c) data_A.append(Common.AB) data_M.append(Common.HYP) # [Takizawa1994] # model = Linear.Generic("Linear pathological region growing --CSF-- [Takizawa1994]", 0, 1.0 * kPa, 0.47) # model.Compute() # l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9,1.1]) # data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) # data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) # data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) # data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) # data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) # data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) # data_offset.append(offset) # data_Y.append("Pathos-CSF-Takizawa1994") # data_C.append(c) # data_A.append(Common.AB) # data_M.append(Common.LIN) # model = Linear.Generic("Linear pathological region growing --falx-- [Takizawa1994]", 0, 100.0 * kPa, 0.47) # model.Compute() # l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9,1.1]) # data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) # data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) # data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) # data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) # data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) # data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) # data_offset.append(offset) # data_Y.append("Pathos-falx-Takizawa1994") # data_C.append(c) # data_A.append(Common.AB) # data_M.append(Common.LIN) model = Linear.Generic( "Linear pathological region growing --WM-- [Takizawa1994]", 0, 4.0 * kPa, 0.47) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Pathos-WM-Takizawa1994") data_C.append(c) data_A.append(Common.WM) data_M.append(Common.LIN) model = Linear.Generic( "Linear pathological region growing --GM-- [Takizawa1994]", 0, 8.0 * kPa, 0.47) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Pathos-GM-Takizawa1994") data_C.append(c) data_A.append(Common.GM) data_M.append(Common.LIN) # [Dumpuri2006,Chen2011] model = Linear.Generic( "Linear pathological region growing --tumour-- [Dumpuri2006,Chen2011]", 0, 100.0 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Pathos-Tumour-Dumpuri2006") data_C.append(c) data_A.append(Common.AB) data_M.append(Common.LIN) model = Linear.Generic( "Linear brain-shift compensation for ablation --tumour-- [Miller2013]", 0, 9.0 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("BrainShift-tumour-Miller2013") data_C.append(c) data_A.append(Common.AB) data_M.append(Common.LIN) model = Linear.Generic( "Linear brain-shift compensation for ablation --tumour-- [Morin2016]", 0, 10.0 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("BrainShift-tumour-Morin2016") data_C.append(c) data_A.append(Common.AB) data_M.append(Common.LIN) PlotMaterial.Groups("Pathological Region Growing", stretches, data_l, data_W, data_dW, data_H, data_sigma, data_Y) return data_l, data_W, data_dW, data_H, data_sigma, data_P, data_offset, data_Y, data_C, data_A, data_M
def Process(): # output data_l = np.zeros((1, s)) data_W = np.zeros((1, s)) data_dW = np.zeros((1, s)) data_H = np.zeros((1, s)) data_sigma = np.zeros((1, s)) data_P = np.zeros((1, p), dtype=bool) data_offset = [] data_Y = [""] data_C = [] data_A = [] data_M = [] ''' [Mihai2017] [38] ''' # TODO check - too flat and fitting is bad # TODO Recent papers to add model = Nonlinear.Mihai2017a("Ogden 1-term [Mihai2017]", -0.0939 * kPa, -4.0250) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.8, 1.2]) data_l[0, :] = l data_W[0, :] = W data_dW[0, :] = dW[0] data_H[0, :] = H[0, 0] data_sigma[0, :] = sigma[0] data_P[0, :] = P data_offset.append(offset) data_Y[0] = "Hyperelastic-Ogden1-Mihai2017" data_C.append(c) data_A.append(Common.NH) data_M.append(Common.HYP) stretches = model.stretches model = Nonlinear.Mihai2017b( "3-term Mooney-Rivlin: Ogden 1-term + MR 2-term [Mihai2017]", 0.0653 * kPa, 7.1813, -3.8201 * kPa, 3.5376 * kPa) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.8, 1.2]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-MR3-Mihai2017") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.HYP) # TODO check - negative # model = Nonlinear.Mihai2017c("3-term Ogden [Mihai2017]", 3, [-5.5090 * kPa, 2.9269 * kPa, 1.4653 * kPa], [2, -2, 4]) # model.Compute() # l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.8,1.2]) # data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) # data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) # data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) # data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) # data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) # data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) # data_offset.append(offset) # data_Y.append("Hyperelastic-Ogden3-Mihai2017") # data_C.append(c) # data_A.append(Common.NH) # data_M.append(Common.HYP) ''' [Mihai2015] ''' # model = Nonlinear.Mihai2015a("Neo-Hookean [Mihai2015]", 333.28 * kPa) model = Nonlinear.Mihai2015a("Neo-Hookean [Mihai2015]", 0.33328 * kPa) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.6, 1.4]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-NH-Mihai2015") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.HYP) # TODO check - prediction is poor # model = Nonlinear.Mihai2015b("Mooney-Rivlin [Mihai2015]", 0.28 * kPa, 333.0 * kPa) model = Nonlinear.Mihai2015b("Mooney-Rivlin [Mihai2015]", 0.28 * kPa, 0.333 * kPa) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.6, 1.4]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-MR-Mihai2015") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.HYP) # TODO check - fit crashes # model = Nonlinear.Mihai2015c("Fung [Mihai2015]", 166.64 * kPa, 2.4974) model = Nonlinear.Mihai2015c("Fung [Mihai2015]", 0.16664 * kPa, 2.4974) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.6, 1.4]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-Fung-Mihai2015") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.HYP) # TODO check fit nan # model = Nonlinear.Mihai2015d("Gent [Mihai2015]", 333.28 * kPa, 0.9918) model = Nonlinear.Mihai2015d("Gent [Mihai2015]", 0.33328 * kPa, 0.9918) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.6, 1.4]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-Gent-Mihai2015") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.HYP) # TODO check - change optimisation params # model = Nonlinear.Mihai2015e("Ogden 3-term [Mihai2015]", 3, [-3543 * kPa, -2723 * kPa, 654 * kPa], [1, -1, 2]) model = Nonlinear.Mihai2015e("Ogden 3-term [Mihai2015]", 3, [-3.543 * kPa, -2.723 * kPa, 0.654 * kPa], [1, -1, 2]) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.6, 1.4]) # l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.01, 5]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-Ogden3-Mihai2015") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.HYP) # TODO check - strain curve starts from megative values (consider only narrower window) # model = Nonlinear.Mihai2015e("Ogden 4-term [Mihai2015]", 4, [-5877 * kPa, -5043 * kPa, 1161 * kPa, 501 * kPa], [1, -1, 2, -2]) model = Nonlinear.Mihai2015e( "Ogden 4-term [Mihai2015]", 4, [-5.877 * kPa, -5.043 * kPa, 1.161 * kPa, 0.501 * kPa], [1, -1, 2, -2]) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.6, 1.4]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-Ogden4-Mihai2015") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.HYP) # TODO check - consider only narrower window # model = Nonlinear.Mihai2015e("Ogden 5-term [Mihai2015]", 5, [-34399 * kPa, -18718 * kPa, 14509 * kPa, 2947 * kPa, -2349 * kPa], [1, -1, 2, -2, 3]) model = Nonlinear.Mihai2015e("Ogden 5-term [Mihai2015]", 5, [ -34.399 * kPa, -18.718 * kPa, 14.509 * kPa, 2.947 * kPa, -2.349 * kPa ], [1, -1, 2, -2, 3]) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.6, 1.4]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-Ogden5-Mihai2015") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.HYP) # model = Nonlinear.Mihai2015e("Ogden 6-term [Mihai2015]", 6, [1189 * kPa, 16855 * kPa, 1444 * kPa, -10108 * kPa, -458 * kPa, 1889 * kPa], [1, -1, 2, -2, 3, -3]) model = Nonlinear.Mihai2015e("Ogden 6-term [Mihai2015]", 6, [ 1.189 * kPa, 16.855 * kPa, 1.444 * kPa, -10.108 * kPa, -0.458 * kPa, 1.889 * kPa ], [1, -1, 2, -2, 3, -3]) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.6, 1.4]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-Ogden6-Mihai2015") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.HYP) # model = Nonlinear.Mihai2015e("Ogden 7-term [Mihai2015]", 7, [-187150 * kPa, -91970 * kPa, 109290 * kPa, 23200 * kPa, -33290 * kPa, -2290 * kPa, 4100 * kPa], [1, -1, 2, -2, 3, -3, 4]) model = Nonlinear.Mihai2015e("Ogden 7-term [Mihai2015]", 7, [ -187.150 * kPa, -91.970 * kPa, 109.290 * kPa, 23.200 * kPa, -33.290 * kPa, -2.290 * kPa, 4.100 * kPa ], [1, -1, 2, -2, 3, -3, 4]) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.6, 1.4]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-Ogden7-Mihai2015") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.HYP) # TODO check - consider only window # model = Nonlinear.Mihai2015e("Ogden 8-term [Mihai2015]", 8, [-639530 * kPa, -544840 * kPa, 322660 * kPa, 237040 * kPa, -88640 * kPa, -57830 * kPa, 10150 * kPa, 6080 * kPa], [1, -1, 2, -2, 3, -3, 4, -4]) model = Nonlinear.Mihai2015e("Ogden 8-term [Mihai2015]", 8, [ -639.530 * kPa, -544.840 * kPa, 322.660 * kPa, 237.040 * kPa, -88.640 * kPa, -57.830 * kPa, 10.150 * kPa, 6.080 * kPa ], [1, -1, 2, -2, 3, -3, 4, -4]) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.6, 1.4]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-Ogden8-Mihai2015") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.HYP) ''' [Laksari2012] from [Morin2017] ''' # TODO c10=[+-0.06], c01=[+-0.05], c11=[+-0.01], K=[+-0.26] # model = Nonlinear.Laksari2012("Mooney Rivlin 3-term + Ogden 2-param [Laksari2012]", -1.34 * kPa, 1.83 * kPa, 0.29 * kPa, 46, 100, 0.49) # compressible model = Nonlinear.Laksari2012( "Mooney Rivlin 3-term + Ogden 2-param [Laksari2012]", -1.01 * kPa, 1.49 * kPa, 0.19 * kPa, 2.38, 100, 0.49) # incompressible model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.7, 1.3]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-MR3-Laksari2012") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.HYP) ''' [Schiavone2009] from [Morin2017] ''' # TODO MICCAI assumption for tension model = Nonlinear.Schiavone2009("Mooney Rivlin 2-term [Schiavone2009]", 0.24 * kPa, 3.42 * kPa) model.Compute() # l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [1.0,1.45]) l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.55, 1.45]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-MR2-Schiavone2009") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.HYP) ''' [Miller2002] ''' model = Nonlinear.Miller2002("Ogden mod 1-term [Miller2002]", 0.842 * kPa, -4.7) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.7, 1.3]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-OgdenMod1-Miller2002") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.HYP) # model = Nonlinear.Mihai2015e("Ogden 3-term Rubber", 3, [6300 * kPa, 1.2 * kPa, -10 * kPa], [1.3/2.0, 5.0/2.0, -2.0/2.0]) # model.Compute() # # l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.8,1.2]) # l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.001, 5]) # data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) # data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) # data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) # data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) # data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) # data_P = np.concatenate((data_P, P.reshape(1,p)), axis=0) # data_offset.append(offset) # data_Y.append("Hyperelastic-Ogden3-Mihai2015") # data_C.append(c) # data_A.append(Common.NH) # data_M.append(Common.HYP) ''' ############################################################################################# ''' ''' Budday NH [53]''' model = Nonlinear.Budday2017a("Neo-Hookean CC [Budday2017]", 0.99 * kPa, 0.29 * kPa) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-NH-CC-Budday2017") data_C.append(c) data_A.append(Common.WM) data_M.append(Common.HYP) model = Nonlinear.Budday2017a("Neo-Hookean CR [Budday2017]", 1.75 * kPa, 0.52 * kPa) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-NH-CR-Budday2017") data_C.append(c) data_A.append(Common.WM) data_M.append(Common.HYP) # [55] model = Nonlinear.Budday2017a("Neo-Hookean BG [Budday2017]", 1.37 * kPa, 0.57 * kPa) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-NH-BG-Budday2017") data_C.append(c) data_A.append(Common.GM) data_M.append(Common.HYP) model = Nonlinear.Budday2017a("Neo-Hookean C [Budday2017]", 2.80 * kPa, 1.22 * kPa) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-NH-C-Budday2017") data_C.append(c) data_A.append(Common.GM) data_M.append(Common.HYP) ''' Budday MR [57]''' model = Nonlinear.Budday2017b("Mooney-Rivlin CC [Budday2017]", 0.92 * kPa, 0.0 * kPa, 0.29 * kPa, 0.13 * kPa) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-MR-CC-Budday2017") data_C.append(c) data_A.append(Common.WM) data_M.append(Common.HYP) model = Nonlinear.Budday2017b("Mooney-Rivlin CR [Budday2017]", 1.62 * kPa, 0.0 * kPa, 0.52 * kPa, 0.26 * kPa) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-MR-CR-Budday2017") data_C.append(c) data_A.append(Common.WM) data_M.append(Common.HYP) # [59] model = Nonlinear.Budday2017b("Mooney-Rivlin BG [Budday2017]", 1.27 * kPa, 0.0 * kPa, 0.57 * kPa, 0.29 * kPa) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-MR-BG-Budday2017") data_C.append(c) data_A.append(Common.GM) data_M.append(Common.HYP) model = Nonlinear.Budday2017b("Mooney-Rivlin C [Budday2017]", 2.59 * kPa, 0.0 * kPa, 1.22 * kPa, 0.61 * kPa) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-MR-C-Budday2017") data_C.append(c) data_A.append(Common.GM) data_M.append(Common.HYP) ''' Budday DMR [61] ''' model = Nonlinear.Budday2017c("Demiray CC [Budday2017]", 0.55 * kPa, 28.4, 0.28 * kPa, 1.29) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-DMR-CC-Budday2017") data_C.append(c) data_A.append(Common.WM) data_M.append(Common.HYP) model = Nonlinear.Budday2017c("Demiray CR [Budday2017]", 1.05 * kPa, 24.6, 0.48 * kPa, 4.37) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-DMR-CR-Budday2017") data_C.append(c) data_A.append(Common.WM) data_M.append(Common.HYP) # [63] model = Nonlinear.Budday2017c("Demiray BG [Budday2017]", 0.97 * kPa, 17.1, 0.52 * kPa, 6.03) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-DMR-BG-Budday2017") data_C.append(c) data_A.append(Common.GM) data_M.append(Common.HYP) model = Nonlinear.Budday2017c("Demiray C [Budday2017]", 1.90 * kPa, 18.8, 0.91 * kPa, 16.7) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-DMR-C-Budday2017") data_C.append(c) data_A.append(Common.GM) data_M.append(Common.HYP) ''' Budday Gnt [65] ''' model = Nonlinear.Budday2017d("Gent CC [Budday2017]", 0.62 * kPa, 0.06, 0.29 * kPa, 85.0) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-Gent-CC-Budday2017") data_C.append(c) data_A.append(Common.WM) data_M.append(Common.HYP) model = Nonlinear.Budday2017d("Gent CR [Budday2017]", 1.16 * kPa, 0.06, 0.48 * kPa, 0.23) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-Gent-CR-Budday2017") data_C.append(c) data_A.append(Common.WM) data_M.append(Common.HYP) # [67] model = Nonlinear.Budday2017d("Gent BG [Budday2017]", 1.01 * kPa, 0.08, 0.52 * kPa, 0.18) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-Gent-BG-Budday2017") data_C.append(c) data_A.append(Common.GM) data_M.append(Common.HYP) model = Nonlinear.Budday2017d("Gent C [Budday2017]", 2.01 * kPa, 0.08, 0.92 * kPa, 0.08) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-Gent-C-Budday2017") data_C.append(c) data_A.append(Common.GM) data_M.append(Common.HYP) ''' Budday Ogden [69] ''' # model = Nonlinear.Budday2017e("Mod 1-term Ogden CC [Budday2017]", 0.47 * kPa, -11.4, 0.33*kPa, -25.6) model = Nonlinear.Budday2017e("Mod 1-term Ogden CC [Budday2017]", 0.43 * kPa, -22.8, 0.35 * kPa, -26.6) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-Ogden1-CC-Budday2017") data_C.append(c) data_A.append(Common.WM) data_M.append(Common.HYP) # model = Nonlinear.Budday2017e("Mod 1-term Ogden CR [Budday2017]", 0.86 * kPa, -19.9, 0.58 * kPa, -29.2) model = Nonlinear.Budday2017e("Mod 1-term Ogden CR [Budday2017]", 0.85 * kPa, -20.5, 0.61 * kPa, -30.5) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-Ogden1-CR-Budday2017") data_C.append(c) data_A.append(Common.WM) data_M.append(Common.HYP) # [71] # model = Nonlinear.Budday2017e("Mod 1-term Ogden BG [Budday2017]", 0.84 * kPa, -12.5, 0.64 * kPa, -30.0) model = Nonlinear.Budday2017e("Mod 1-term Ogden BG [Budday2017]", 0.83 * kPa, -15.5, 0.65 * kPa, -32.5) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-Ogden1-BG-Budday2017") data_C.append(c) data_A.append(Common.GM) data_M.append(Common.HYP) # model = Nonlinear.Budday2017e("Mod 1-term Ogden C [Budday2017]", 1.63 * kPa, -16.5, 1.16 * kPa, -38.9) model = Nonlinear.Budday2017e("Mod 1-term Ogden C [Budday2017]", 1.61 * kPa, -16.6, 1.20 * kPa, -43.6) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("Hyperelastic-Ogden1-C-Budday2017") data_C.append(c) data_A.append(Common.GM) data_M.append(Common.HYP) PlotMaterial.Groups("Hyperelastic Nonlinear", stretches, data_l, data_W, data_dW, data_H, data_sigma, data_Y) return data_l, data_W, data_dW, data_H, data_sigma, data_P, data_offset, data_Y, data_C, data_A, data_M
def Process(): # output data_l = np.zeros((1, s)) data_W = np.zeros((1, s)) data_dW = np.zeros((1, s)) data_H = np.zeros((1, s)) data_sigma = np.zeros((1, s)) data_P = np.zeros((1, p), dtype=bool) data_offset = [] data_Y = [""] data_C = [] data_A = [] data_M = [] # [Kruse1999] add individual cases in addition to this average # age = [18, 20, 26, 45, 52, 52, 62, 79] # WM: G = [6.5, 26.5, 12.0, 8.5, 12.0, 18.0, 16.0, 14.0] # GM: G = [5.0, 12.0, 5.5, 5.0, 6.0, 7.0, 7.5, 3.0] model = Linear.Generic("Linear MRE WM [Kruse1999]", 14.6 * kPa, 42.34 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.95,1.05]) data_l[0, :] = l data_W[0, :] = W data_dW[0, :] = dW[0] data_H[0, :] = H[0,0] data_sigma[0, :] = sigma[0] data_P[0, :] = P data_offset.append(offset) data_Y[0] = "MRE-WM-Kruse1999" data_C.append(c) data_A.append(Common.WM) data_M.append(Common.MRE) stretches = model.stretches model = Linear.Generic("Linear MRE GM [Kruse1999]", 6.43 * kPa, 18.65 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.95,1.05]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0,0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("MRE-GM-Kruse1999") data_C.append(c) data_A.append(Common.GM) data_M.append(Common.MRE) # [Uffmann2004] Need to add models under standard deviation model = Linear.Generic("Linear MRE WM [Uffmann2004]", 15.2 * kPa, 44.08 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.95,1.05]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("MRE-WM-Uffmann2004") data_C.append(c) data_A.append(Common.WM) data_M.append(Common.MRE) model = Linear.Generic("Linear MRE GM [Uffmann2004]", 12.9 * kPa, 37.41 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.95,1.05]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("MRE-GM-Uffmann2004") data_C.append(c) data_A.append(Common.GM) data_M.append(Common.MRE) # [McCracken2005] Need to add models under standard deviation model = Linear.Generic("Linear MRE WM [McCracken2005]", 10.7 * kPa, 31.03 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.95,1.05]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("MRE-WM-McCracken2005") data_C.append(c) data_A.append(Common.WM) data_M.append(Common.MRE) model = Linear.Generic("Linear MRE GM [McCracken2005]", 5.3 * kPa, 15.37 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.95,1.05]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("MRE-GM-McCracken2005") data_C.append(c) data_A.append(Common.GM) data_M.append(Common.MRE) # [Green2006] model = Linear.Generic("Linear MRE WM [Green2006]", 2.1 * kPa, 6.09 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.95,1.05]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("MRE-WM-Green2006") data_C.append(c) data_A.append(Common.WM) data_M.append(Common.MRE) model = Linear.Generic("Linear MRE GM [Green2006]", 2.8 * kPa, 8.12 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.95,1.05]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("MRE-GM-Green2006") data_C.append(c) data_A.append(Common.GM) data_M.append(Common.MRE) # [Kruse2008] # TODO CI=[12.3,14.8] model = Linear.Generic("Linear MRE WM [Kruse2008]", 13.6 * kPa, 39.44 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.95,1.05]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("MRE-WM-Kruse2008") data_C.append(c) data_A.append(Common.WM) data_M.append(Common.MRE) # TODO This case was added to include a MRE abnormality (100 times G) model = Linear.Generic("Linear MRE abnormal WM [Kruse2008]", 1360 * kPa, 3944 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.95, 1.05]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("MRE-abnormal-WM-Kruse2008") data_C.append(c) data_A.append(Common.AB) data_M.append(Common.MRE) # TODO CI=[4.76,5.66] model = Linear.Generic("Linear MRE GM [Kruse2008]", 5.22 * kPa, 15.14 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.95,1.05]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("MRE-GM-Kruse2008") data_C.append(c) data_A.append(Common.GM) data_M.append(Common.MRE) # TODO G=[1.7,6.1] over gray and white matter model = Linear.Generic("Linear MRE [Hamhaber2007]", 3.5 * kPa, 10.15 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.95,1.05]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("MRE-Hamhaber2007") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.MRE) PlotMaterial.Groups("MR Elastography", stretches, data_l, data_W, data_dW, data_H, data_sigma, data_Y) return data_l, data_W, data_dW, data_H, data_sigma, data_P, data_offset, data_Y, data_C, data_A, data_M
def Plot(self): # Plot PlotMaterial.Functions(self.name, self.stretches, self.W_v, self.dW_v, self.H_v, self.sigma_v)
def Process(): # output data_l = np.zeros((1, s)) data_W = np.zeros((1, s)) data_dW = np.zeros((1, s)) data_H = np.zeros((1, s)) data_sigma = np.zeros((1, s)) data_P = np.zeros((1, p), dtype=bool) data_offset = [] data_Y = [""] data_C = [] data_A = [] data_M = [] # [Clatz2005] model = Linear.Generic( "Linear brain-shift compensation for ablation [Clatz2005]", 0, 0.694 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l[0, :] = l data_W[0, :] = W data_dW[0, :] = dW[0] data_H[0, :] = H[0, 0] data_sigma[0, :] = sigma[0] data_P[0, :] = P data_offset.append(offset) data_Y[0] = "BrainShift-Clatz2005" data_C.append(c) data_A.append(Common.NH) data_M.append(Common.LIN) stretches = model.stretches # [Wittek2009] model = Linear.Generic( "Linear brain-shift compensation for ablation [Wittek2009]", 0, 2.5 * kPa, 0.49) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("BrainShift-Wittek2009") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.LIN) # [Dumpuri2006,Chen2011] model = Linear.Generic( "Linear brain-shift compensation for ablation [Dumpuri2006,Chen2011]", 0, 2.1 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("BrainShift-Dumpuri2006") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.LIN) # [Vigneron2012] model = Linear.Generic( "Linear brain-shift compensation for ablation [Vigneron2012]", 0, 3.0 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_Y.append("BrainShift-Vigneron2012") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.LIN) # [deLorenzo2012] # TODO E too high (may remove, no reference 27 within paper) model = Linear.Generic( "Linear brain-shift compensation for ablation [deLorenzo2012]", 0, 66.7 * kPa, 0.48) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("BrainShift-deLorenzo2012") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.LIN) # [Bucki2012] model = Linear.Generic( "Linear brain-shift compensation for ablation [Bucki2012]", 0, 0.694 * kPa, 0.4) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("BrainShift-Bucki2012") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.LIN) model = Linear.Generic( "Linear brain-shift compensation for ablation --ventricles-- [Bucki2012]", 0, 0.01 * kPa, 0.05) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("BrainShift-ventricles-Bucki2012") data_C.append(c) data_A.append(Common.AB) data_M.append(Common.LIN) # [Miller2013] model = Linear.Generic( "Linear brain-shift compensation for ablation --normal-- [Miller2013]", 0, 3.0 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_Y.append("BrainShift-Miller2013") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.LIN) # [Mohammadi2015] model = Linear.Generic( "Linear brain-shift compensation for ablation [Mohammadi2015]", 0, 0.7 * kPa, 0.42) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("BrainShift-Mohammadi2015") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.LIN) model = Linear.Generic( "Linear brain-shift compensation for ablation --ventricles-- [Mohammadi2015]", 0, 0.015 * kPa, 0.05) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("BrainShift-ventricles-Mohammadi2015") data_C.append(c) data_A.append(Common.AB) data_M.append(Common.LIN) # [Morin2016] model = Linear.Generic( "Linear brain-shift compensation for ablation --normal-- [Morin2016]", 0, 1.5 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("BrainShift-Morin2016") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.LIN) # [Clatz2003] model = Linear.Generic( "Linear brain-shift compensation for Parkinson [Clatz2003]", 0, 2.0 * kPa, 0.45) model.Compute() l, W, dW, H, sigma, P, offset = model.Evaluate(MechanicalTests.Uniaxial, [0.9, 1.1]) data_l = np.concatenate((data_l, l.reshape(1, s)), axis=0) data_W = np.concatenate((data_W, W.reshape(1, s)), axis=0) data_dW = np.concatenate((data_dW, dW[0].reshape(1, s)), axis=0) data_H = np.concatenate((data_H, H[0, 0].reshape(1, s)), axis=0) data_sigma = np.concatenate((data_sigma, sigma[0].reshape(1, s)), axis=0) data_P = np.concatenate((data_P, P.reshape(1, p)), axis=0) data_offset.append(offset) data_Y.append("BrainShift-Clatz2003") data_C.append(c) data_A.append(Common.NH) data_M.append(Common.LIN) PlotMaterial.Groups("Brain-shift Compensation", stretches, data_l, data_W, data_dW, data_H, data_sigma, data_Y) return data_l, data_W, data_dW, data_H, data_sigma, data_P, data_offset, data_Y, data_C, data_A, data_M